From 72ca8bb90547387b2dc5004b132cd94c94ee9392 Mon Sep 17 00:00:00 2001 From: bielie Date: Wed, 25 Feb 2026 00:12:01 +0800 Subject: [PATCH] fix(story-summary): restore getStorySummaryForEna export for ena planner --- modules/story-summary/story-summary.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/story-summary/story-summary.js b/modules/story-summary/story-summary.js index 9e2dd5a..40d1c01 100644 --- a/modules/story-summary/story-summary.js +++ b/modules/story-summary/story-summary.js @@ -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