fix(wiki): strip internal chunk aliases from page content

Wiki ingest prompts previously encouraged inline [cNNN] citations that
leak internal chunk metadata into reader-facing Markdown. Strip legacy
aliases on read/write paths and update the modify prompt to keep prose
clean while source links remain in ChunkRefs.
This commit is contained in:
wizardchen
2026-07-13 13:24:19 +08:00
committed by lyingbug
parent 07ba01ec93
commit eacc278b9a
5 changed files with 76 additions and 8 deletions
@@ -1877,7 +1877,10 @@ func (s *wikiIngestService) reduceSlugUpdates(
}
}
existingContent := page.Content
// Older generated pages may still contain short chunk aliases such as
// [c003]. They are internal ingest metadata; keep the editor context
// clean so a subsequent update cannot copy them into rewritten prose.
existingContent := stripWikiInlineChunkCitations(page.Content)
if !exists || existingContent == "" {
existingContent = "(New page)"
}