mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-05-15 22:30:38 +08:00
Fix processed history hash rebuild after recovery
This commit is contained in:
9
index.js
9
index.js
@@ -11609,6 +11609,14 @@ async function recoverHistoryIfNeeded(trigger = "history-recovery") {
|
||||
resultCode: "history.recovery.fallback-full-rebuild",
|
||||
}),
|
||||
);
|
||||
const recoveredLastProcessedFloor = Number.isFinite(
|
||||
currentGraph?.historyState?.lastProcessedAssistantFloor,
|
||||
)
|
||||
? currentGraph.historyState.lastProcessedAssistantFloor
|
||||
: -1;
|
||||
if (recoveredLastProcessedFloor >= 0) {
|
||||
updateProcessedHistorySnapshot(chat, recoveredLastProcessedFloor);
|
||||
}
|
||||
currentGraph.vectorIndexState.lastIntegrityIssue = null;
|
||||
saveGraphToChat({ reason: "history-recovery-fallback-rebuild" });
|
||||
refreshPanelLiveState();
|
||||
@@ -12390,6 +12398,7 @@ async function onRebuild() {
|
||||
replayExtractionFromHistory,
|
||||
restoreRuntimeUiState,
|
||||
saveGraphToChat,
|
||||
updateProcessedHistorySnapshot,
|
||||
setCurrentGraph: (graph) => {
|
||||
currentGraph = graph;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user