fix(story-summary): restore getStorySummaryForEna export for ena planner

This commit is contained in:
2026-02-25 00:12:01 +08:00
parent b5d9723663
commit 72ca8bb905

View File

@@ -116,6 +116,7 @@ let events = null;
let activeChatId = null;
let vectorCancelled = false;
let vectorAbortController = null;
let _lastBuiltPromptText = "";
// ═══════════════════════════════════════════════════════════════════════════
// TaskGuard — 互斥任务管理summary / vector / anchor
@@ -1028,6 +1029,12 @@ function buildFramePayload(store) {
};
}
// Compatibility export for ena-planner.
// Returns a compact plain-text snapshot of story-summary memory.
export function getStorySummaryForEna() {
return _lastBuiltPromptText;
}
function parseRelationTargetFromPredicate(predicate) {
const text = String(predicate || "").trim();
if (!text.startsWith("对")) return null;
@@ -1811,6 +1818,7 @@ async function handleGenerationStarted(type, _params, isDryRun) {
} else {
text = buildNonVectorPromptText() || "";
}
_lastBuiltPromptText = text;
if (!text.trim()) return;
// 获取用户配置的 role