chore: v0.10.3 — 选择支持think的模型自动启用思考模式, 修复AI回复不显示模型标签, 版本号升级

This commit is contained in:
thzxx
2026-06-10 13:14:58 +08:00
parent f334c6b31e
commit 23918b8223
9 changed files with 19 additions and 16 deletions
+3 -3
View File
@@ -14,7 +14,7 @@
</p>
<p align="center">
<img src="https://img.shields.io/badge/version-v0.10.2-E8734A?style=flat-square" alt="version">
<img src="https://img.shields.io/badge/version-v0.10.3-E8734A?style=flat-square" alt="version">
<img src="https://img.shields.io/badge/electron-33+-47848F?style=flat-square&logo=electron" alt="electron">
<img src="https://img.shields.io/badge/typescript-5.7+-3178C6?style=flat-square&logo=typescript" alt="typescript">
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="license">
@@ -231,7 +231,7 @@ npm start
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ npm run dist
```
产出:`release/Metona Ollama Setup v0.10.2.exe`
产出:`release/Metona Ollama Setup v0.10.3.exe`
## 🛠️ 常用命令
@@ -454,7 +454,7 @@ npm start
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ npm run dist
```
Output: `release/Metona Ollama Setup v0.10.2.exe`
Output: `release/Metona Ollama Setup v0.10.3.exe`
## 🛠️ Common Commands
+3 -3
View File
@@ -91,7 +91,7 @@ npm run dist # NSIS 安装包
| 文件 | 说明 |
|------|------|
| `release/Metona Ollama Setup v0.10.2.exe` | NSIS 安装包(可选目录、创建快捷方式) |
| `release/Metona Ollama Setup v0.10.3.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.10.2","name":"v0.10.2","body":"Release notes","target_commitish":"master"}'
-d '{"tag_name":"v0.10.3","name":"v0.10.3","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="<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.10.2.exe"
-H "Content-Type: multipart/form-data" -F "file=@release/Metona Ollama Setup v0.10.3.exe"
```
## 故障排查
+1 -1
View File
@@ -1,6 +1,6 @@
# Metona Ollama Desktop — 开发规范
> 版本: v0.10.2 | 更新: 2026-06-05 | 维护: 项目团队
> 版本: v0.10.3 | 更新: 2026-06-05 | 维护: 项目团队
---
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "metona-ollama-desktop",
"version": "0.10.2",
"version": "0.10.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "metona-ollama-desktop",
"version": "0.10.2",
"version": "0.10.3",
"license": "MIT",
"dependencies": {
"sql.js": "^1.11.0"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "metona-ollama-desktop",
"version": "0.10.2",
"version": "0.10.3",
"description": "Metona Ollama - TypeScript + Electron 桌面 AI 聊天客户端",
"main": "dist/main/main.js",
"author": "thzxx",
+1 -1
View File
@@ -101,7 +101,7 @@ export function createMenu(): void {
dialog.showMessageBox(mainWindow!, {
type: 'info',
title: '关于 Metona Ollama',
message: 'Metona Ollama Desktop v0.10.2',
message: 'Metona Ollama Desktop v0.10.3',
detail: 'TypeScript + Electron Ollama AI 聊天客户端\n\nhttps://gitee.com/thzxx/metona-ollama',
icon: getIconPath()
});
+4 -4
View File
@@ -418,7 +418,7 @@ async function handleRetry(): Promise<void> {
...s, messages: [...s.messages, lastMsg], updatedAt: Date.now()
}));
}
updateLastAssistantMessage(finalContent, retryThinkContent || null, loopStats || null, undefined, Date.now(), toolRecords?.length ? toolRecords : undefined);
updateLastAssistantMessage(finalContent, retryThinkContent || null, loopStats || null, getSelectedModel(), Date.now(), toolRecords?.length ? toolRecords : undefined);
} else {
const assistantMsg: ChatMessage = {
role: 'assistant', content: finalContent || '', timestamp: Date.now(),
@@ -431,7 +431,7 @@ async function handleRetry(): Promise<void> {
state.update(KEYS.CURRENT_SESSION, (s: any) => ({
...s, messages: [...s.messages, assistantMsg], updatedAt: Date.now()
}));
updateLastAssistantMessage(finalContent, retryThinkContent || null, loopStats || null, undefined, Date.now(), toolRecords?.length ? toolRecords : undefined);
updateLastAssistantMessage(finalContent, retryThinkContent || null, loopStats || null, getSelectedModel(), Date.now(), toolRecords?.length ? toolRecords : undefined);
}
renderMessages();
await saveCurrentSession();
@@ -984,7 +984,7 @@ async function sendMessageWithAgentLoop(text: string, currentSession: ChatSessio
updatedAt: Date.now()
}));
}
updateLastAssistantMessage(assistantContent, thinkContent || null, loopStats || null, undefined, Date.now(), toolRecords?.length ? toolRecords : undefined);
updateLastAssistantMessage(assistantContent, thinkContent || null, loopStats || null, getSelectedModel(), Date.now(), toolRecords?.length ? toolRecords : undefined);
} else {
// 单迭代模式:正常保存
const assistantMsg: ChatMessage = {
@@ -1002,7 +1002,7 @@ async function sendMessageWithAgentLoop(text: string, currentSession: ChatSessio
messages: [...session.messages, assistantMsg],
updatedAt: Date.now()
}));
updateLastAssistantMessage(assistantContent, thinkContent || null, loopStats || null, undefined, Date.now(), toolRecords?.length ? toolRecords : undefined);
updateLastAssistantMessage(assistantContent, thinkContent || null, loopStats || null, getSelectedModel(), Date.now(), toolRecords?.length ? toolRecords : undefined);
}
renderMessages();
await saveCurrentSession();
+3
View File
@@ -224,12 +224,15 @@ function applyCapability(_modelName: string, caps: { think: boolean; vision: boo
function setThinkAvailable(available: boolean): void {
if (available) {
thinkCheckbox.checked = true;
thinkCheckbox.disabled = false;
state.set('thinkEnabled', true);
thinkWrap.title = 'Think 模式:启用深度推理';
thinkWrap.classList.remove('unavailable');
} else {
thinkCheckbox.checked = false;
thinkCheckbox.disabled = true;
state.set('thinkEnabled', false);
thinkWrap.title = '当前模型不支持 Think 模式';
thinkWrap.classList.add('unavailable');
}
+1 -1
View File
@@ -28,7 +28,7 @@
<div class="header-left">
<span class="logo">🦙</span>
<span class="app-title">Metona Ollama</span>
<span class="app-version">v0.10.2</span>
<span class="app-version">v0.10.3</span>
<button class="icon-btn help-btn" id="btnHelp" title="使用帮助">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/>