From a74fca741d949d3295a4121f71424e183b74871c Mon Sep 17 00:00:00 2001 From: thzxx Date: Wed, 17 Jun 2026 12:34:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Think=20=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E5=BC=80=E5=85=B3=E6=97=A0=E6=95=88=20=E2=80=94=20tog?= =?UTF-8?q?gleThink=20=E7=BC=BA=E5=B0=91=20change=20=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=20state=20=E6=9C=AA=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - model-bar.ts: 新增 toggleThink change 事件监听,同步 state.thinkEnabled - setThinkAvailable(true) 保留自动开启行为(模型支持时强制开启) - 版本号 0.11.5 → 0.11.6,同步7个文件13处 --- README.md | 6 +++--- docs/BUILD.md | 6 +++--- docs/DEVELOPMENT.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/main/menu.ts | 2 +- src/renderer/components/model-bar.ts | 6 ++++++ src/renderer/index.html | 4 ++-- 8 files changed, 19 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 9ebc28b..6b6a70e 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@

- version + version electron typescript license @@ -245,7 +245,7 @@ npm start ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ npm run dist ``` -产出:`release/Metona Ollama Setup v0.11.5.exe` +产出:`release/Metona Ollama Setup v0.11.6.exe` ## 🛠️ 常用命令 @@ -481,7 +481,7 @@ npm start ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ npm run dist ``` -Output: `release/Metona Ollama Setup v0.11.5.exe` +Output: `release/Metona Ollama Setup v0.11.6.exe` ## 🛠️ Common Commands diff --git a/docs/BUILD.md b/docs/BUILD.md index 73436fb..c820148 100644 --- a/docs/BUILD.md +++ b/docs/BUILD.md @@ -91,7 +91,7 @@ npm run dist # NSIS 安装包 | 文件 | 说明 | |------|------| -| `release/Metona Ollama Setup v0.11.5.exe` | NSIS 安装包(可选目录、创建快捷方式) | +| `release/Metona Ollama Setup v0.11.6.exe` | NSIS 安装包(可选目录、创建快捷方式) | > 仅提供 NSIS 安装包。 @@ -103,7 +103,7 @@ npm run dist # NSIS 安装包 TOKEN="your_access_token" curl -X POST "https://gitee.com/api/v5/repos/thzxx/metona-ollama-desktop/releases?access_token=$TOKEN" \ -H "Content-Type: application/json" \ - -d '{"tag_name":"v0.11.5","name":"v0.11.5","body":"Release notes","target_commitish":"master"}' + -d '{"tag_name":"v0.11.6","name":"v0.11.6","body":"Release notes","target_commitish":"master"}' ``` ### 上传附件 @@ -112,7 +112,7 @@ curl -X POST "https://gitee.com/api/v5/repos/thzxx/metona-ollama-desktop/release TOKEN="your_access_token" RELEASE_ID="" curl -X POST "https://gitee.com/api/v5/repos/thzxx/metona-ollama-desktop/releases/$RELEASE_ID/attach_files?access_token=$TOKEN" \ - -H "Content-Type: multipart/form-data" -F "file=@release/Metona Ollama Setup v0.11.5.exe" + -H "Content-Type: multipart/form-data" -F "file=@release/Metona Ollama Setup v0.11.6.exe" ``` ## 故障排查 diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index f9f9218..f468a5a 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -1,6 +1,6 @@ # Metona Ollama Desktop — 开发规范 -> 版本: v0.11.5 | 更新: 2026-06-05 | 维护: 项目团队 +> 版本: v0.11.6 | 更新: 2026-06-05 | 维护: 项目团队 --- diff --git a/package-lock.json b/package-lock.json index ae78700..2645d7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "metona-ollama-desktop", - "version": "0.11.5", + "version": "0.11.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "metona-ollama-desktop", - "version": "0.11.5", + "version": "0.11.6", "license": "MIT", "dependencies": { "sql.js": "^1.11.0" diff --git a/package.json b/package.json index e815f1d..4f60458 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metona-ollama-desktop", - "version": "0.11.5", + "version": "0.11.6", "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 6f3250a..9210a53 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.11.5', + message: 'Metona Ollama Desktop v0.11.6', detail: 'TypeScript + Electron Ollama AI 聊天客户端\n\nhttps://gitee.com/thzxx/metona-ollama', icon: getIconPath() }); diff --git a/src/renderer/components/model-bar.ts b/src/renderer/components/model-bar.ts index a4571af..e9b538c 100644 --- a/src/renderer/components/model-bar.ts +++ b/src/renderer/components/model-bar.ts @@ -30,6 +30,12 @@ export function initModelBar(): void { thinkWrap = document.querySelector('#thinkToggleWrap')!; btnAttachImg = document.querySelector('#btnAttachImg')!; + // Think 开关:同步 state 中的 thinkEnabled + thinkCheckbox.addEventListener('change', () => { + state.set('thinkEnabled', thinkCheckbox.checked); + logDebug(`Think 模式: ${thinkCheckbox.checked ? '开启' : '关闭'}`); + }); + modelSelectEl.addEventListener('change', async () => { const model = modelSelectEl.value; const db = state.get(KEYS.DB); diff --git a/src/renderer/index.html b/src/renderer/index.html index 0e4e0a0..f8df08f 100644 --- a/src/renderer/index.html +++ b/src/renderer/index.html @@ -28,7 +28,7 @@

Metona Ollama - v0.11.5 + v0.11.6