mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-05-15 22:30:38 +08:00
Refactor rerun and summary rebuild ranges
This commit is contained in:
47
index.js
47
index.js
@@ -71,6 +71,7 @@ import {
|
||||
} from "./host/event-binding.js";
|
||||
import {
|
||||
executeExtractionBatchController,
|
||||
onExtractionTaskController,
|
||||
onManualExtractController,
|
||||
onRerollController,
|
||||
resolveAutoExtractionPlanController,
|
||||
@@ -12682,6 +12683,47 @@ async function onManualExtract(options = {}) {
|
||||
);
|
||||
}
|
||||
|
||||
async function onExtractionTask(options = {}) {
|
||||
return await onExtractionTaskController(
|
||||
{
|
||||
beginStageAbortController,
|
||||
clampInt,
|
||||
console,
|
||||
createEmptyGraph,
|
||||
ensureGraphMutationReady,
|
||||
executeExtractionBatch,
|
||||
finishStageAbortController,
|
||||
getAssistantTurns,
|
||||
getContext,
|
||||
getCurrentChatId,
|
||||
getCurrentGraph: () => currentGraph,
|
||||
getGraphMutationBlockReason,
|
||||
getGraphPersistenceState: () => graphPersistenceState,
|
||||
getIsExtracting: () => isExtracting,
|
||||
getLastExtractionStatusLevel: () => lastExtractionStatus?.level || "idle",
|
||||
getLastProcessedAssistantFloor,
|
||||
getSettings,
|
||||
isAbortError,
|
||||
normalizeGraphRuntimeState,
|
||||
onManualExtract,
|
||||
recoverHistoryIfNeeded,
|
||||
refreshPanelLiveState,
|
||||
retryPendingGraphPersist,
|
||||
rollbackGraphForReroll,
|
||||
setCurrentGraph: (graph) => {
|
||||
currentGraph = graph;
|
||||
},
|
||||
setIsExtracting: (value) => {
|
||||
isExtracting = value;
|
||||
},
|
||||
setLastExtractionStatus,
|
||||
setRuntimeStatus,
|
||||
toastr,
|
||||
},
|
||||
options,
|
||||
);
|
||||
}
|
||||
|
||||
async function onReroll({ fromFloor } = {}) {
|
||||
return await onRerollController(
|
||||
{
|
||||
@@ -12750,7 +12792,7 @@ async function onManualSummaryRollup() {
|
||||
});
|
||||
}
|
||||
|
||||
async function onRebuildSummaryState() {
|
||||
async function onRebuildSummaryState(options = {}) {
|
||||
return await onRebuildSummaryStateController({
|
||||
ensureGraphMutationReady,
|
||||
getContext,
|
||||
@@ -12761,7 +12803,7 @@ async function onRebuildSummaryState() {
|
||||
saveGraphToChat,
|
||||
setRuntimeStatus,
|
||||
toastr,
|
||||
});
|
||||
}, options);
|
||||
}
|
||||
|
||||
async function onClearSummaryState() {
|
||||
@@ -12913,6 +12955,7 @@ async function onDeleteServerSyncFile() {
|
||||
syncGraphLoadFromLiveContext({
|
||||
source: "panel-open-sync",
|
||||
}),
|
||||
extractTask: onExtractionTask,
|
||||
extract: onManualExtract,
|
||||
compress: onManualCompress,
|
||||
sleep: onManualSleep,
|
||||
|
||||
Reference in New Issue
Block a user