mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-05-15 14:20:35 +08:00
Fix recall card persistence backfill
This commit is contained in:
@@ -427,8 +427,16 @@ export async function onGenerationAfterCommandsController(
|
||||
// 后续 GENERATE_BEFORE_COMBINE_PROMPTS 阶段会通过
|
||||
// applyFinalRecallInjectionForGeneration 做 deferred rewrite 兜底。
|
||||
if (deliveryMode === "immediate") {
|
||||
// immediate 路径下 runRecall 已经完成持久化 recall record,
|
||||
// 这里补一次 UI 刷新,避免需要等到消息编辑/历史恢复后才看到 Recall Card。
|
||||
runtime.ensurePersistedRecallRecordForGeneration?.({
|
||||
generationType: recallContext.generationType,
|
||||
recallResult,
|
||||
transaction: recallContext.transaction,
|
||||
recallOptions: runtimeRecallOptions,
|
||||
hookName: recallContext.hookName,
|
||||
});
|
||||
// immediate 路径通常会在 runRecall 内完成持久化;如果当时 user 楼层还没稳定,
|
||||
// 上面的兜底补写会把 fresh recall 绑定回最终 user 楼层。
|
||||
// 这里再补一次 UI 刷新,避免需要等到消息编辑/历史恢复后才看到 Recall Card。
|
||||
runtime.refreshPersistedRecallMessageUi?.();
|
||||
console.warn("[ST-BME:DIAG] DONE: immediate mode, injection via setExtensionPrompt in runRecall");
|
||||
return recallResult;
|
||||
|
||||
Reference in New Issue
Block a user