mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-06-14 02:40:45 +08:00
fix: 修复召回拦截管线三个致命bug
1. recordRecallSentUserMessage 不再在 MESSAGE_SENT 阶段清空 pendingRecallSendIntent/pendingHostGenerationInputSnapshot/transactions, 避免 GENERATION_AFTER_COMMANDS 找不到用户输入而跳过召回 2. resolveGenerationRecallDeliveryMode 将 GENERATION_AFTER_COMMANDS 从 deferred 改为 immediate,使召回完成后通过 setExtensionPrompt 即时注入 3. onGenerationAfterCommandsController 在 immediate 模式下完成 runRecall 后直接返回(注入已在 applyRecallInjection 内完成), GENERATE_BEFORE_COMBINE_PROMPTS 保留 deferred rewrite 兜底
This commit is contained in:
@@ -337,7 +337,11 @@ export async function onGenerationAfterCommandsController(
|
||||
);
|
||||
}
|
||||
|
||||
if (deliveryMode === "deferred") {
|
||||
// immediate 模式下,runRecall → applyRecallInjection 内部已通过
|
||||
// setExtensionPrompt 完成了注入,此处直接返回召回结果。
|
||||
// 后续 GENERATE_BEFORE_COMBINE_PROMPTS 阶段会通过
|
||||
// applyFinalRecallInjectionForGeneration 做 deferred rewrite 兜底。
|
||||
if (deliveryMode === "immediate") {
|
||||
return recallResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user