From d6877c27fd005b286b4e34f57c58e54fdac88807 Mon Sep 17 00:00:00 2001 From: digua Date: Sun, 9 Aug 2026 18:07:22 +0800 Subject: [PATCH] fix(memory): keep index load failures non-destructive Show a retry-only state when summary index reads fail so transient errors cannot expose the full rebuild action and erase summaries. Also align newly added implementation comments with repository style. --- packages/node-runtime/src/ai/summary/index.ts | 2 +- .../common/ChatRecord/ChatRecordDrawer.vue | 4 +- .../common/ChatRecord/ChatRecordWorkspace.vue | 42 ++++++++++++++++--- .../common/ChatRecord/SessionTimeline.vue | 4 +- .../common/ChatRecord/query-session.ts | 2 +- .../common/ChatRecord/workspace-state.test.ts | 20 +++++++++ .../common/ChatRecord/workspace-state.ts | 13 ++++++ src/i18n/locales/en-US/records.json | 4 +- src/i18n/locales/ja-JP/records.json | 4 +- src/i18n/locales/zh-CN/records.json | 4 +- src/i18n/locales/zh-TW/records.json | 4 +- 11 files changed, 88 insertions(+), 15 deletions(-) create mode 100644 src/components/common/ChatRecord/workspace-state.test.ts create mode 100644 src/components/common/ChatRecord/workspace-state.ts diff --git a/packages/node-runtime/src/ai/summary/index.ts b/packages/node-runtime/src/ai/summary/index.ts index 0a0e0576..5a0a654f 100644 --- a/packages/node-runtime/src/ai/summary/index.ts +++ b/packages/node-runtime/src/ai/summary/index.ts @@ -308,7 +308,7 @@ export async function generateSessionSummary( summary = postProcessSummary(summary, lengthLimit) deps.saveSummary(segmentId, summary) - // 摘要属于用户聊天内容,日志只记录定位故障所需的元数据,避免持久化明文。 + // Summaries contain private chat data, so persist only diagnostic metadata in logs. log?.info('Summary', `Summary generated for segment ${segmentId} (${summary.length} characters)`) return { success: true, summary } } catch (error) { diff --git a/src/components/common/ChatRecord/ChatRecordDrawer.vue b/src/components/common/ChatRecord/ChatRecordDrawer.vue index 410b5355..a3ef17fa 100644 --- a/src/components/common/ChatRecord/ChatRecordDrawer.vue +++ b/src/components/common/ChatRecord/ChatRecordDrawer.vue @@ -1,7 +1,7 @@