From cf7e48e5405590948ab8d6803b9ba230d89aa326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E9=98=BF=E6=B1=9F=28Relakkes?= =?UTF-8?q?=29?= Date: Thu, 11 Jun 2026 00:36:39 +0800 Subject: [PATCH] fix(desktop): restore visual selection history cards Restore visual-selection prompts from persisted transcript history as annotated screenshot attachments instead of exposing the model-facing selector prompt after reopening a session. Tested: cd desktop && bun run test -- --run src/stores/chatStore.test.ts -t "restores visual selection history" --reporter verbose Tested: bun run check:desktop Confidence: high Scope-risk: narrow --- desktop/src/stores/chatStore.test.ts | 50 ++++++++++++++++++++++ desktop/src/stores/chatStore.ts | 64 +++++++++++++++++++++++++++- 2 files changed, 112 insertions(+), 2 deletions(-) diff --git a/desktop/src/stores/chatStore.test.ts b/desktop/src/stores/chatStore.test.ts index 47276030..ced3ef43 100644 --- a/desktop/src/stores/chatStore.test.ts +++ b/desktop/src/stores/chatStore.test.ts @@ -567,6 +567,56 @@ describe('chatStore history mapping', () => { ]) }) + it('restores visual selection history as annotated screenshot attachment without exposing model prompt', () => { + const modelPrompt = [ + '请根据截图中编号 1 的蓝色标注修改本地前端。', + '目标元素: