From 45b50e4dc707d9407925bcd8fa0ee92095790e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=B4=AB=E5=BD=B1233?= Date: Thu, 16 Jul 2026 16:56:32 +0800 Subject: [PATCH] =?UTF-8?q?v0.16.11:=20Plan=20Mode=20=E6=9C=80=E5=B0=8F?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E6=80=A7=E6=B8=85=E7=90=86=20=E2=80=94=20?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=BF=9B=E5=BA=A6=E6=B3=A8=E5=85=A5=E5=92=8C?= =?UTF-8?q?=E6=AD=BB=E4=BB=A3=E7=A0=81=E9=93=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除项: - Plan Mode 每轮进度注入代码(formatPlanStatus() 主动注入到 user 消息) AI 改为从 plan_track mark_done/status 工具返回值自行推断进度 - _lastPlanStatus 死代码链(agent-engine.ts 2 处保存 + input-area.ts 2 处清空) 保存后从未被读取使用,纯死代码 - formatPlanStatus import(已无调用点) - _lastPlanStatus 和 _planLastInjectedDone StateKey 声明 简化项: - "计划已批准"消息移除 (web_search、write_file 等) 工具名列举,让 AI 自行判断 修正项: - L2431 注释从"AI 可通过 formatPlanStatus() 看到剩余步骤" 改为"AI 通过 plan_track mark_done/status 的工具返回值获知进度" 总计 8 文件变更 --- README.md | 6 +++--- package-lock.json | 4 ++-- package.json | 2 +- src/main/menu.ts | 2 +- src/renderer/components/input-area.ts | 5 ----- src/renderer/index.html | 2 +- src/renderer/services/agent-engine.ts | 29 ++++----------------------- src/renderer/types.d.ts | 2 -- 8 files changed, 12 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 6983e27..9645f91 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@

- version + version electron typescript license @@ -253,7 +253,7 @@ npm start ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ npm run dist ``` -产出:`release/Metona Ollama Setup v0.16.10.exe` +产出:`release/Metona Ollama Setup v0.16.11.exe` ## 🛠️ 常用命令 @@ -501,7 +501,7 @@ npm start ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ npm run dist ``` -Output: `release/Metona Ollama Setup v0.16.10.exe` +Output: `release/Metona Ollama Setup v0.16.11.exe` ## 🛠️ Common Commands diff --git a/package-lock.json b/package-lock.json index 5fc3d96..ef6323a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "metona-ollama-desktop", - "version": "0.16.10", + "version": "0.16.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "metona-ollama-desktop", - "version": "0.16.10", + "version": "0.16.11", "license": "MIT", "dependencies": { "ffmpeg-static": "^5.2.0", diff --git a/package.json b/package.json index a16cbd9..bd6906f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metona-ollama-desktop", - "version": "0.16.10", + "version": "0.16.11", "description": "Metona Ollama - TypeScript + Electron 桌面 AI 聊天客户端", "main": "dist/main/main.js", "author": "thzxx", diff --git a/src/main/menu.ts b/src/main/menu.ts index 7235831..c1da712 100644 --- a/src/main/menu.ts +++ b/src/main/menu.ts @@ -101,7 +101,7 @@ export function createMenu(): void { dialog.showMessageBox(mainWindow!, { type: 'info', title: '关于 Metona Ollama', - message: 'Metona Ollama Desktop v0.16.10', + message: 'Metona Ollama Desktop v0.16.11', detail: 'TypeScript + Electron Ollama AI 聊天客户端\n\nhttps://gitee.com/thzxx/metona-ollama', icon: getIconPath() }); diff --git a/src/renderer/components/input-area.ts b/src/renderer/components/input-area.ts index 122197b..8100ce6 100644 --- a/src/renderer/components/input-area.ts +++ b/src/renderer/components/input-area.ts @@ -669,8 +669,6 @@ async function handleRetry(): Promise { // renderMessages 统一渲染 session 数据,先清掉流式 placeholder 避免 DOM 重复 clearMessagesDOM(); renderMessages(); - // ── 消费 _lastPlanStatus(不再保存为 session 消息,避免 system 消息渲染到聊天界面)── - state.set('_lastPlanStatus', ''); await saveCurrentSession(); } }); @@ -1372,9 +1370,6 @@ async function sendMessageWithAgentLoop(text: string, currentSession: ChatSessio // 先移除流式 placeholder 再 renderMessages,避免未渲染(纯文本)和已渲染(markdown)两个卡片同时存在 removeCurrentPlaceholder(); renderMessages(); - - // ── 消费 _lastPlanStatus(不再保存为 session 消息,避免 system 消息渲染到聊天界面)── - state.set('_lastPlanStatus', ''); await saveCurrentSession(); } }); diff --git a/src/renderer/index.html b/src/renderer/index.html index 77b9420..7be3b82 100644 --- a/src/renderer/index.html +++ b/src/renderer/index.html @@ -28,7 +28,7 @@

Metona Ollama - v0.16.10 + v0.16.11