chore: 版本号 0.14.5 → 0.14.6

fix: onNewIteration 空数组真值导致重复消息卡片([] truthy in JS)
This commit is contained in:
thzxx
2026-06-28 21:08:50 +08:00
parent 2f37111074
commit 20701433dd
6 changed files with 12 additions and 10 deletions
+3 -3
View File
@@ -14,7 +14,7 @@
</p> </p>
<p align="center"> <p align="center">
<img src="https://img.shields.io/badge/version-v0.14.5-E8734A?style=flat-square" alt="version"> <img src="https://img.shields.io/badge/version-v0.14.6-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">
@@ -253,7 +253,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.14.5.exe` 产出:`release/Metona Ollama Setup v0.14.6.exe`
## 🛠️ 常用命令 ## 🛠️ 常用命令
@@ -501,7 +501,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.14.5.exe` Output: `release/Metona Ollama Setup v0.14.6.exe`
## 🛠️ Common Commands ## 🛠️ Common Commands
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "metona-ollama-desktop", "name": "metona-ollama-desktop",
"version": "0.14.5", "version": "0.14.6",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "metona-ollama-desktop", "name": "metona-ollama-desktop",
"version": "0.14.5", "version": "0.14.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"ffmpeg-static": "^5.2.0", "ffmpeg-static": "^5.2.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "metona-ollama-desktop", "name": "metona-ollama-desktop",
"version": "0.14.5", "version": "0.14.6",
"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
View File
@@ -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.14.5', message: 'Metona Ollama Desktop v0.14.6',
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()
}); });
+4 -2
View File
@@ -529,7 +529,8 @@ async function handleRetry(): Promise<void> {
}); });
}, },
onNewIteration: (toolCalls) => { onNewIteration: (toolCalls) => {
if (retryContent || toolCalls) { const hasToolCalls = toolCalls && toolCalls.length > 0;
if (retryContent || hasToolCalls) {
const now = Date.now(); const now = Date.now();
const toolCallRecords: ToolCallRecord[] | undefined = toolCalls?.map(tc => ({ const toolCallRecords: ToolCallRecord[] | undefined = toolCalls?.map(tc => ({
name: tc.function.name, arguments: tc.function.arguments, name: tc.function.name, arguments: tc.function.arguments,
@@ -1283,7 +1284,8 @@ async function sendMessageWithAgentLoop(text: string, currentSession: ChatSessio
if (oldPlaceholder) oldPlaceholder.remove(); if (oldPlaceholder) oldPlaceholder.remove();
// 有文本内容 或 有工具调用 → 保存为独立消息 // 有文本内容 或 有工具调用 → 保存为独立消息
if (assistantContent || toolCalls) { const hasToolCalls = toolCalls && toolCalls.length > 0;
if (assistantContent || hasToolCalls) {
const now = Date.now(); const now = Date.now();
// 计算本轮迭代的 token 和时长 // 计算本轮迭代的 token 和时长
const currentEvalCount = state.get<number>('_currentEvalCount', 0); const currentEvalCount = state.get<number>('_currentEvalCount', 0);
+1 -1
View File
@@ -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.14.5</span> <span class="app-version">v0.14.6</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"/>