Commit Graph

8 Commits

Author SHA1 Message Date
Youzini-afk
64dec0df2b recall: sectioned recentMessages with context/target split for LLM prompt
- prompt-builder.js: add RECALL_TARGET_CONTENT_HEADER, update splitSectionedTranscriptPayloadMessage to recognize recall-specific target header
- retriever.js: add buildRecallSectionedTranscript helper, format recentMessages as sectioned transcript with context-review and recall-target headers for prompt building while keeping flat string[] for ranking
- p0-regressions.mjs: add testRecallUsesSectionedPromptMessagesForContextAndTarget regression asserting two system messages with correct transcriptSection and headers
2026-04-12 16:07:38 +08:00
Youzini-afk
f40b03c306 feat: hide assistant card names in extraction transcript, split sectioned recentMessages into 2 system messages 2026-04-12 13:33:41 +08:00
Youzini-afk
559312c1b6 fix: preserve isContextOnly context/target dividers in final prompt transcript rendering
Root cause: formatPromptMessageTranscript in prompt-builder.js ignored
isContextOnly, so context review and extraction target sections were
flattened into plain transcript even though the flag was correctly set
in intermediate layers. Additionally, userPromptSections (which
contained the dividers) was only a fallback that never reached the
final prompt when block-based profiles had user blocks.

Fix:
- getPromptMessageLikeDescriptor now preserves isContextOnly flag
- formatPromptMessageTranscript now inserts context/target section
  dividers when messages carry isContextOnly, ensuring the final
  LLM prompt always shows the distinction regardless of which
  rendering path (recentMessages, chatMessages, dialogueText) is used

Regression tests:
- prompt-builder-mixed-transcript: verify recentMessages block content
  includes context review and extraction target dividers
- extractor-phase3-layered-context: end-to-end test proving default
  extract profile + default structured mode produces final promptMessages
  with context/target section dividers
2026-04-12 13:04:04 +08:00
Youzini-afk
0cb95c4f2b phase2-4 recall prompt-flow hardening 2026-04-11 18:51:59 +08:00
Youzini-afk
322752bb43 feat: improve shujuku-compatible extraction and recall input 2026-04-11 16:05:34 +08:00
Youzini-afk
ab99ca4fcc Fix world info at-depth chat injection ordering 2026-04-09 22:50:52 +08:00
Youzini-afk
922b716ff6 Fix host regex reuse for extraction inputs 2026-04-09 00:28:29 +08:00
Youzini-afk
feec17f3e3 Reorganize modules into layered directories 2026-04-08 01:17:57 +08:00