Просмотр исходного кода

fix: wire hookDebtBlock into reviser user prompt

reviser.ts called buildGovernedMemoryEvidenceBlocks() but only
destructured hooksBlock, dropping the hookDebtBlock field.
The hook debt briefs (original seed text from hook-planting chapters)
were constructed but never reached the repair prompt.

Now hookDebtBlock is extracted and prepended to the hooks section
in the user prompt, giving the reviser the same hook context
that the main writer path already has.
Ma 7 месяцев назад
Родитель
Сommit
2b652cbaae
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      packages/core/src/agents/reviser.ts

+ 2 - 1
packages/core/src/agents/reviser.ts

@@ -197,6 +197,7 @@ ${outputFormat}`;
     const governedMemoryBlocks = options?.contextPackage
       ? buildGovernedMemoryEvidenceBlocks(options.contextPackage, resolvedLanguage)
       : undefined;
+    const hookDebtBlock = governedMemoryBlocks?.hookDebtBlock ?? "";
     const hooksBlock = governedMemoryBlocks?.hooksBlock
       ?? `\n## 伏笔池\n${hooksWorkingSet}\n`;
     const outlineBlock = volumeOutline !== "(文件不存在)"
@@ -242,7 +243,7 @@ ${issueList}
 ## 当前状态卡
 ${currentState}
 ${ledgerBlock}
-${hooksBlock}${volumeSummariesBlock}${reducedControlBlock || outlineBlock}${bibleBlock}${matrixBlock}${summariesBlock}${canonBlock}${fanficCanonBlock}${styleGuideBlock}${lengthGuidanceBlock}
+${hookDebtBlock}${hooksBlock}${volumeSummariesBlock}${reducedControlBlock || outlineBlock}${bibleBlock}${matrixBlock}${summariesBlock}${canonBlock}${fanficCanonBlock}${styleGuideBlock}${lengthGuidanceBlock}
 
 ## 待修正章节
 ${chapterContent}`;