mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-06-14 02:40:45 +08:00
Harden graph recovery and shadow persistence
This commit is contained in:
@@ -685,6 +685,24 @@ export function onMessageReceivedController(
|
||||
dbReady,
|
||||
},
|
||||
);
|
||||
if (
|
||||
runtime.getIsHostGenerationRunning?.() === true &&
|
||||
typeof runtime.deferAutoExtraction === "function"
|
||||
) {
|
||||
runtime.console?.debug?.(
|
||||
"[ST-BME] assistant message received during host generation, deferring auto extraction",
|
||||
{
|
||||
messageId: Number.isFinite(Number(targetMessageIndex))
|
||||
? Number(targetMessageIndex)
|
||||
: null,
|
||||
},
|
||||
);
|
||||
runtime.deferAutoExtraction("generation-running", {
|
||||
messageId: targetMessageIndex,
|
||||
});
|
||||
runtime.refreshPersistedRecallMessageUi?.();
|
||||
return;
|
||||
}
|
||||
enqueueMicrotask(() => {
|
||||
void runtime.runExtraction().catch((error) => {
|
||||
runtime.console.error("[ST-BME] 异步自动提取失败:", error);
|
||||
|
||||
Reference in New Issue
Block a user