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
+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.14.5',
message: 'Metona Ollama Desktop v0.14.6',
detail: 'TypeScript + Electron Ollama AI 聊天客户端\n\nhttps://gitee.com/thzxx/metona-ollama',
icon: getIconPath()
});
+4 -2
View File
@@ -529,7 +529,8 @@ async function handleRetry(): Promise<void> {
});
},
onNewIteration: (toolCalls) => {
if (retryContent || toolCalls) {
const hasToolCalls = toolCalls && toolCalls.length > 0;
if (retryContent || hasToolCalls) {
const now = Date.now();
const toolCallRecords: ToolCallRecord[] | undefined = toolCalls?.map(tc => ({
name: tc.function.name, arguments: tc.function.arguments,
@@ -1283,7 +1284,8 @@ async function sendMessageWithAgentLoop(text: string, currentSession: ChatSessio
if (oldPlaceholder) oldPlaceholder.remove();
// 有文本内容 或 有工具调用 → 保存为独立消息
if (assistantContent || toolCalls) {
const hasToolCalls = toolCalls && toolCalls.length > 0;
if (assistantContent || hasToolCalls) {
const now = Date.now();
// 计算本轮迭代的 token 和时长
const currentEvalCount = state.get<number>('_currentEvalCount', 0);
+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.14.5</span>
<span class="app-version">v0.14.6</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"/>