chore: v0.10.3 — 选择支持think的模型自动启用思考模式, 修复AI回复不显示模型标签, 版本号升级
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<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/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/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">
|
<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
|
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
|
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
|
## 🛠️ Common Commands
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -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 安装包。
|
> 仅提供 NSIS 安装包。
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ npm run dist # NSIS 安装包
|
|||||||
TOKEN="your_access_token"
|
TOKEN="your_access_token"
|
||||||
curl -X POST "https://gitee.com/api/v5/repos/thzxx/metona-ollama-desktop/releases?access_token=$TOKEN" \
|
curl -X POST "https://gitee.com/api/v5/repos/thzxx/metona-ollama-desktop/releases?access_token=$TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-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"
|
TOKEN="your_access_token"
|
||||||
RELEASE_ID="<release_id>"
|
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" \
|
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
@@ -1,6 +1,6 @@
|
|||||||
# Metona Ollama Desktop — 开发规范
|
# Metona Ollama Desktop — 开发规范
|
||||||
|
|
||||||
> 版本: v0.10.2 | 更新: 2026-06-05 | 维护: 项目团队
|
> 版本: v0.10.3 | 更新: 2026-06-05 | 维护: 项目团队
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "metona-ollama-desktop",
|
"name": "metona-ollama-desktop",
|
||||||
"version": "0.10.2",
|
"version": "0.10.3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "metona-ollama-desktop",
|
"name": "metona-ollama-desktop",
|
||||||
"version": "0.10.2",
|
"version": "0.10.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"sql.js": "^1.11.0"
|
"sql.js": "^1.11.0"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "metona-ollama-desktop",
|
"name": "metona-ollama-desktop",
|
||||||
"version": "0.10.2",
|
"version": "0.10.3",
|
||||||
"description": "Metona Ollama - TypeScript + Electron 桌面 AI 聊天客户端",
|
"description": "Metona Ollama - TypeScript + Electron 桌面 AI 聊天客户端",
|
||||||
"main": "dist/main/main.js",
|
"main": "dist/main/main.js",
|
||||||
"author": "thzxx",
|
"author": "thzxx",
|
||||||
|
|||||||
+1
-1
@@ -101,7 +101,7 @@ export function createMenu(): void {
|
|||||||
dialog.showMessageBox(mainWindow!, {
|
dialog.showMessageBox(mainWindow!, {
|
||||||
type: 'info',
|
type: 'info',
|
||||||
title: '关于 Metona Ollama',
|
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',
|
detail: 'TypeScript + Electron Ollama AI 聊天客户端\n\nhttps://gitee.com/thzxx/metona-ollama',
|
||||||
icon: getIconPath()
|
icon: getIconPath()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ async function handleRetry(): Promise<void> {
|
|||||||
...s, messages: [...s.messages, lastMsg], updatedAt: Date.now()
|
...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 {
|
} else {
|
||||||
const assistantMsg: ChatMessage = {
|
const assistantMsg: ChatMessage = {
|
||||||
role: 'assistant', content: finalContent || '', timestamp: Date.now(),
|
role: 'assistant', content: finalContent || '', timestamp: Date.now(),
|
||||||
@@ -431,7 +431,7 @@ async function handleRetry(): Promise<void> {
|
|||||||
state.update(KEYS.CURRENT_SESSION, (s: any) => ({
|
state.update(KEYS.CURRENT_SESSION, (s: any) => ({
|
||||||
...s, messages: [...s.messages, assistantMsg], updatedAt: Date.now()
|
...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();
|
renderMessages();
|
||||||
await saveCurrentSession();
|
await saveCurrentSession();
|
||||||
@@ -984,7 +984,7 @@ async function sendMessageWithAgentLoop(text: string, currentSession: ChatSessio
|
|||||||
updatedAt: Date.now()
|
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 {
|
} else {
|
||||||
// 单迭代模式:正常保存
|
// 单迭代模式:正常保存
|
||||||
const assistantMsg: ChatMessage = {
|
const assistantMsg: ChatMessage = {
|
||||||
@@ -1002,7 +1002,7 @@ async function sendMessageWithAgentLoop(text: string, currentSession: ChatSessio
|
|||||||
messages: [...session.messages, assistantMsg],
|
messages: [...session.messages, assistantMsg],
|
||||||
updatedAt: Date.now()
|
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();
|
renderMessages();
|
||||||
await saveCurrentSession();
|
await saveCurrentSession();
|
||||||
|
|||||||
@@ -224,12 +224,15 @@ function applyCapability(_modelName: string, caps: { think: boolean; vision: boo
|
|||||||
|
|
||||||
function setThinkAvailable(available: boolean): void {
|
function setThinkAvailable(available: boolean): void {
|
||||||
if (available) {
|
if (available) {
|
||||||
|
thinkCheckbox.checked = true;
|
||||||
thinkCheckbox.disabled = false;
|
thinkCheckbox.disabled = false;
|
||||||
|
state.set('thinkEnabled', true);
|
||||||
thinkWrap.title = 'Think 模式:启用深度推理';
|
thinkWrap.title = 'Think 模式:启用深度推理';
|
||||||
thinkWrap.classList.remove('unavailable');
|
thinkWrap.classList.remove('unavailable');
|
||||||
} else {
|
} else {
|
||||||
thinkCheckbox.checked = false;
|
thinkCheckbox.checked = false;
|
||||||
thinkCheckbox.disabled = true;
|
thinkCheckbox.disabled = true;
|
||||||
|
state.set('thinkEnabled', false);
|
||||||
thinkWrap.title = '当前模型不支持 Think 模式';
|
thinkWrap.title = '当前模型不支持 Think 模式';
|
||||||
thinkWrap.classList.add('unavailable');
|
thinkWrap.classList.add('unavailable');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<div class="header-left">
|
<div class="header-left">
|
||||||
<span class="logo">🦙</span>
|
<span class="logo">🦙</span>
|
||||||
<span class="app-title">Metona Ollama</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="使用帮助">
|
<button class="icon-btn help-btn" id="btnHelp" title="使用帮助">
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
<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"/>
|
<circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user