fix(story-summary): restore getStorySummaryForEna export for ena planner
This commit is contained in:
@@ -116,6 +116,7 @@ let events = null;
|
|||||||
let activeChatId = null;
|
let activeChatId = null;
|
||||||
let vectorCancelled = false;
|
let vectorCancelled = false;
|
||||||
let vectorAbortController = null;
|
let vectorAbortController = null;
|
||||||
|
let _lastBuiltPromptText = "";
|
||||||
|
|
||||||
// ═══════════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════════
|
||||||
// TaskGuard — 互斥任务管理(summary / vector / anchor)
|
// 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) {
|
function parseRelationTargetFromPredicate(predicate) {
|
||||||
const text = String(predicate || "").trim();
|
const text = String(predicate || "").trim();
|
||||||
if (!text.startsWith("对")) return null;
|
if (!text.startsWith("对")) return null;
|
||||||
@@ -1811,6 +1818,7 @@ async function handleGenerationStarted(type, _params, isDryRun) {
|
|||||||
} else {
|
} else {
|
||||||
text = buildNonVectorPromptText() || "";
|
text = buildNonVectorPromptText() || "";
|
||||||
}
|
}
|
||||||
|
_lastBuiltPromptText = text;
|
||||||
if (!text.trim()) return;
|
if (!text.trim()) return;
|
||||||
|
|
||||||
// 获取用户配置的 role
|
// 获取用户配置的 role
|
||||||
|
|||||||
Reference in New Issue
Block a user