Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
feat: agent overlay hotkey display and cloud streaming fixes
Gabriel Stein1fdd21329d6f
diff --git a/src/components/AgentOverlay.tsx b/src/components/AgentOverlay.tsxindex 7cac5aa7c..92528758b 100644--- a/src/components/AgentOverlay.tsx+++ b/src/components/AgentOverlay.tsx@@ -58,7 +58,12 @@ export default function AgentOverlay() {conversationIdRef.current = conv?.id ?? null;}- const userMsg: Message = { id: crypto.randomUUID(), role: "user", content: text, isStreaming: false };+ const userMsg: Message = {+ id: crypto.randomUUID(),+ role: "user",+ content: text,+ isStreaming: false,+ };setMessages((prev) => [...prev, userMsg]);if (conversationIdRef.current) {@@ -83,7 +88,10 @@ export default function AgentOverlay() {];const assistantId = crypto.randomUUID();- setMessages((prev) => [...prev, { id: assistantId, role: "assistant", content: "", isStreaming: true }]);+ setMessages((prev) => [+ ...prev,+ { id: assistantId, role: "assistant", content: "", isStreaming: true },+ ]);setAgentState("streaming");const isCloudAgent = settings.isSignedIn && settings.cloudAgentMode === "openwhispr";@@ -132,7 +140,13 @@ export default function AgentOverlay() {am.setSkipReasoning(true);am.setContext("agent");am.setCallbacks({- onStateChange: ({ isRecording, isProcessing }: { isRecording: boolean; isProcessing: boolean }) => {+ onStateChange: ({+ isRecording,+ isProcessing,+ }: {+ isRecording: boolean;+ isProcessing: boolean;+ }) => {if (isRecording) setAgentState("listening");else if (isProcessing) setAgentState("transcribing");},diff --git a/src/components/ReasoningModelSelector.tsx b/src/components/ReasoningModelSelector.tsxindex 07dd13f31..8966d8dd5 100644--- a/src/components/ReasoningModelSelector.tsx+++ b/src/components/ReasoningModelSelector.tsx@@ -112,8 +112,14 @@ function GpuStatusBadge() {setActivationFailed(true);}, 10000);const fastPoll = setInterval(() => {- window.electronAPI?.llamaServerStatus?.().then(setServerStatus).catch(() => {});- window.electronAPI?.getLlamaVulkanStatus?.().then(setVulkanStatus).catch(() => {});+ window.electronAPI+ ?.llamaServerStatus?.()+ .then(setServerStatus)+ .catch(() => {});+ window.electronAPI+ ?.getLlamaVulkanStatus?.()+ .then(setVulkanStatus)+ .catch(() => {});}, 1000);return () => {clearTimeout(timeout);diff --git a/src/components/agent/AgentChat.tsx b/src/components/agent/AgentChat.tsxindex 7fab08faa..923b5d54f 100644--- a/src/components/agent/AgentChat.tsx+++ b/src/components/agent/AgentChat.tsx@@ -2,6 +2,8 @@ import { useRef, useEffect } from "react";import { useTranslation } from "react-i18next";import { cn } from "../lib/utils";import { AgentMessage } from "./AgentMessage";+import { useSettingsStore } from "../../stores/settingsStore";+import { formatHotkeyLabel } from "../../utils/hotkeys";interface Message {id: string;@@ -17,6 +19,8 @@ interface AgentChatProps {export function AgentChat({ messages }: AgentChatProps) {const { t } = useTranslation();const scrollRef = useRef<HTMLDivElement>(null);+ const agentKey = useSettingsStore((s) => s.agentKey);+ const hotkeyLabel = formatHotkeyLabel(agentKey);useEffect(() => {const el = scrollRef.current;@@ -26,17 +30,11 @@ export function AgentChat({ messages }: AgentChatProps) {}, [messages]);return (- <div- ref={scrollRef}- className={cn(- "flex-1 overflow-y-auto agent-chat-scroll",- "px-3 py-2"- )}- >+ <div ref={scrollRef} className={cn("flex-1 overflow-y-auto agent-chat-scroll", "px-3 py-2")}>{messages.length === 0 ? (<div className="flex items-center justify-center h-full"><p className="text-[12px] text-muted-foreground/60 text-center select-none">- {t("agentMode.chat.emptyState")}+ {t("agentMode.chat.emptyState", { hotkey: hotkeyLabel })}</p></div>) : (diff --git a/src/components/agent/AgentInput.tsx b/src/components/agent/AgentInput.tsxindex 8020ba1d1..d715dd6a9 100644--- a/src/components/agent/AgentInput.tsx+++ b/src/components/agent/AgentInput.tsx@@ -1,6 +1,8 @@import { Mic } from "lucide-react";import { useTranslation } from "react-i18next";import { cn } from "../lib/utils";+import { useSettingsStore } from "../../stores/settingsStore";+import { formatHotkeyLabel, isGlobeLikeHotkey } from "../../utils/hotkeys";type AgentState = "idle" | "listening" | "transcribing" | "thinking" | "streaming";@@ -9,6 +11,42 @@ interface AgentInputProps {partialTranscript: string;}+function Kbd({ children }: { children: React.ReactNode }) {+ return (+ <kbd+ className={cn(+ "inline-flex items-center justify-center",+ "min-w-5 h-4.5 px-1.5",+ "text-[10px] font-medium leading-none",+ "text-muted-foreground/70",+ "bg-foreground/6 border border-foreground/8",+ "rounded-sm",+ "shadow-[0_1px_0_0_rgba(0,0,0,0.04)]"+ )}+ >+ {children}+ </kbd>+ );+}++function HotkeyKeys({ hotkey }: { hotkey: string }) {+ const label = formatHotkeyLabel(hotkey);++ if (isGlobeLikeHotkey(hotkey) || !label.includes("+")) {+ return <Kbd>{label}</Kbd>;+ }++ const parts = label.split("+");++ return (+ <span className="inline-flex items-center gap-0.5">+ {parts.map((part, i) => (+ <Kbd key={i}>{part}</Kbd>+ ))}+ </span>+ );+}+function WaveBars() {return (<div className="flex items-center justify-center gap-[3px] h-4">@@ -44,6 +82,7 @@ function InputLoadingDots() {export function AgentInput({ agentState, partialTranscript }: AgentInputProps) {const { t } = useTranslation();+ const agentKey = useSettingsStore((s) => s.agentKey);return (<div@@ -53,17 +92,26 @@ export function AgentInput({ agentState, partialTranscript }: AgentInputProps) {)}>{agentState === "idle" && (- <>- <div- className="text-muted-foreground/50"- style={{ animation: "agent-mic-pulse 2.5s ease-in-out infinite" }}- >- <Mic size={16} />+ <div className="flex items-center justify-between w-full">+ <div className="flex items-center gap-2">+ <div+ className="text-muted-foreground/50"+ style={{ animation: "agent-mic-pulse 2.5s ease-in-out infinite" }}+ >+ <Mic size={14} />+ </div>+ <span className="text-[11px] text-muted-foreground/50 select-none">+ {t("agentMode.input.holdToSpeak")}+ </span>+ <HotkeyKeys hotkey={agentKey} /></div>- <span className="text-[12px] text-muted-foreground/50 select-none">- {t("agentMode.input.idle")}- </span>- </>+ <div className="flex items-center gap-1.5">+ <Kbd>Esc</Kbd>+ <span className="text-[10px] text-muted-foreground/35 select-none">+ {t("agentMode.input.toClose")}+ </span>+ </div>+ </div>)}{agentState === "listening" && (diff --git a/src/helpers/database.js b/src/helpers/database.jsindex d4cd294fd..51533d68a 100644--- a/src/helpers/database.js+++ b/src/helpers/database.js@@ -563,11 +563,7 @@ class DatabaseManager {.prepare("SELECT * FROM agent_conversations WHERE id = ?").get(result.lastInsertRowid);} catch (error) {- debugLogger.error(- "Error creating agent conversation",- { error: error.message },- "database"- );+ debugLogger.error("Error creating agent conversation", { error: error.message }, "database");throw error;}}@@ -579,11 +575,7 @@ class DatabaseManager {.prepare("SELECT * FROM agent_conversations ORDER BY updated_at DESC LIMIT ?").all(limit);} catch (error) {- debugLogger.error(- "Error getting agent conversations",- { error: error.message },- "database"- );+ debugLogger.error("Error getting agent conversations", { error: error.message }, "database");throw error;}}@@ -600,11 +592,7 @@ class DatabaseManager {.all(id);return { ...conversation, messages };} catch (error) {- debugLogger.error(- "Error getting agent conversation",- { error: error.message },- "database"- );+ debugLogger.error("Error getting agent conversation", { error: error.message }, "database");throw error;}}@@ -613,16 +601,10 @@ class DatabaseManager {try {if (!this.db) throw new Error("Database not initialized");this.db.prepare("DELETE FROM agent_messages WHERE conversation_id = ?").run(id);- const result = this.db- .prepare("DELETE FROM agent_conversations WHERE id = ?")- .run(id);+ const result = this.db.prepare("DELETE FROM agent_conversations WHERE id = ?").run(id);return { success: result.changes > 0 };} catch (error) {- debugLogger.error(- "Error deleting agent conversation",- { error: error.message },- "database"- );+ debugLogger.error("Error deleting agent conversation", { error: error.message }, "database");throw error;}}@@ -650,24 +632,16 @@ class DatabaseManager {try {if (!this.db) throw new Error("Database not initialized");const result = this.db- .prepare(- "INSERT INTO agent_messages (conversation_id, role, content) VALUES (?, ?, ?)"- )+ .prepare("INSERT INTO agent_messages (conversation_id, role, content) VALUES (?, ?, ?)").run(conversationId, role, content);this.db- .prepare(- "UPDATE agent_conversations SET updated_at = CURRENT_TIMESTAMP WHERE id = ?"- )+ .prepare("UPDATE agent_conversations SET updated_at = CURRENT_TIMESTAMP WHERE id = ?").run(conversationId);return this.db.prepare("SELECT * FROM agent_messages WHERE id = ?").get(result.lastInsertRowid);} catch (error) {- debugLogger.error(- "Error adding agent message",- { error: error.message },- "database"- );+ debugLogger.error("Error adding agent message", { error: error.message }, "database");throw error;}}@@ -679,11 +653,7 @@ class DatabaseManager {.prepare("SELECT * FROM agent_messages WHERE conversation_id = ? ORDER BY created_at ASC").all(conversationId);} catch (error) {- debugLogger.error(- "Error getting agent messages",- { error: error.message },- "database"- );+ debugLogger.error("Error getting agent messages", { error: error.message }, "database");throw error;}}diff --git a/src/helpers/hotkeyManager.js b/src/helpers/hotkeyManager.jsindex 996fb43e7..577b71551 100644--- a/src/helpers/hotkeyManager.js+++ b/src/helpers/hotkeyManager.js@@ -155,11 +155,7 @@ class HotkeyManager {if (!slot || !slot.hotkey) return;const hk = slot.hotkey;- if (- !isGlobeLikeHotkey(hk) &&- !isRightSideModifier(hk) &&- !isModifierOnlyHotkey(hk)- ) {+ if (!isGlobeLikeHotkey(hk) && !isRightSideModifier(hk) && !isModifierOnlyHotkey(hk)) {const accel = normalizeToAccelerator(hk);try {globalShortcut.unregister(accel);diff --git a/src/helpers/ipcHandlers.js b/src/helpers/ipcHandlers.jsindex abfd466d8..c23b235cd 100644--- a/src/helpers/ipcHandlers.js+++ b/src/helpers/ipcHandlers.js@@ -2035,32 +2035,14 @@ class IPCHandlers {const reader = response.body.getReader();const decoder = new TextDecoder();- let buffer = "";try {while (true) {const { done, value } = await reader.read();if (done) break;- buffer += decoder.decode(value, { stream: true });- const lines = buffer.split("\n");- buffer = lines.pop() || "";-- for (const line of lines) {- const trimmed = line.trim();- if (!trimmed) continue;-- // Handle Vercel AI SDK data stream format- // Text chunks are prefixed with "0:" followed by a JSON string- if (trimmed.startsWith("0:")) {- try {- const text = JSON.parse(trimmed.slice(2));- if (text) event.sender.send("agent-stream-chunk", text);- } catch {- // skip malformed chunks- }- }- }+ const text = decoder.decode(value, { stream: true });+ if (text) event.sender.send("agent-stream-chunk", text);}} finally {reader.releaseLock();diff --git a/src/helpers/windowManager.js b/src/helpers/windowManager.jsindex 4099e4dc1..ff2f58d9c 100644--- a/src/helpers/windowManager.js+++ b/src/helpers/windowManager.js@@ -623,8 +623,14 @@ class WindowManager {if (!this.agentWindow || this.agentWindow.isDestroyed()) return;const clamped = {- width: Math.max(AGENT_OVERLAY_CONFIG.minWidth, Math.min(width, AGENT_OVERLAY_CONFIG.maxWidth)),- height: Math.max(AGENT_OVERLAY_CONFIG.minHeight, Math.min(height, AGENT_OVERLAY_CONFIG.maxHeight)),+ width: Math.max(+ AGENT_OVERLAY_CONFIG.minWidth,+ Math.min(width, AGENT_OVERLAY_CONFIG.maxWidth)+ ),+ height: Math.max(+ AGENT_OVERLAY_CONFIG.minHeight,+ Math.min(height, AGENT_OVERLAY_CONFIG.maxHeight)+ ),};const bounds = this.agentWindow.getBounds();diff --git a/src/locales/de/translation.json b/src/locales/de/translation.jsonindex 0d564d36b..14f68f70f 100644--- a/src/locales/de/translation.json+++ b/src/locales/de/translation.json@@ -925,11 +925,7 @@"enterprise": {"name": "Enterprise","price": "Individuell",- "features": [- "Cloud-Synchronisation",- "Team-Funktionen (demnächst)",- "SSO & Compliance"- ],+ "features": ["Cloud-Synchronisation", "Team-Funktionen (demnächst)", "SSO & Compliance"],"cta": "Kontakt aufnehmen"},"currentPlan": "Aktueller Tarif"@@ -1619,7 +1615,7 @@"newConversation": "Neu","copyToClipboard": "In Zwischenablage kopieren","copied": "Kopiert!",- "emptyState": "Drücke die Agent-Tastenkombination, um eine Unterhaltung zu starten",+ "emptyState": "{{hotkey}} gedrückt halten, um eine Unterhaltung zu starten","errorPrefix": "Fehler"},"titleBar": {@@ -1628,7 +1624,8 @@"close": "Schließen"},"input": {- "idle": "Taste gedrückt halten zum Sprechen",+ "holdToSpeak": "Gedrückt halten zum Sprechen",+ "toClose": "schließen","listening": "Hört zu...","transcribing": "Transkribiert...","thinking": "Denkt nach..."diff --git a/src/locales/en/translation.json b/src/locales/en/translation.jsonindex 60af9653f..ad33c7c47 100644--- a/src/locales/en/translation.json+++ b/src/locales/en/translation.json@@ -925,11 +925,7 @@"enterprise": {"name": "Enterprise","price": "Custom",- "features": [- "Cloud sync",- "Team features (coming soon)",- "SSO & compliance"- ],+ "features": ["Cloud sync", "Team features (coming soon)", "SSO & compliance"],"cta": "Contact Us"},"currentPlan": "Current plan"@@ -1619,7 +1615,7 @@"newConversation": "New","copyToClipboard": "Copy to clipboard","copied": "Copied!",- "emptyState": "Press your agent hotkey to start a conversation",+ "emptyState": "Hold {{hotkey}} to start a conversation","errorPrefix": "Error"},"titleBar": {@@ -1628,10 +1624,11 @@"close": "Close"},"input": {- "idle": "Hold hotkey to speak",+ "holdToSpeak": "Hold to speak",+ "toClose": "close","listening": "Listening...","transcribing": "Transcribing...","thinking": "Thinking..."}}-}\ No newline at end of file+}diff --git a/src/locales/es/translation.json b/src/locales/es/translation.jsonindex c3494bd00..f4c1efa20 100644--- a/src/locales/es/translation.json+++ b/src/locales/es/translation.json@@ -1619,7 +1619,7 @@"newConversation": "Nuevo","copyToClipboard": "Copiar al portapapeles","copied": "¡Copiado!",- "emptyState": "Presiona la tecla del agente para iniciar una conversación",+ "emptyState": "Mantén {{hotkey}} para iniciar una conversación","errorPrefix": "Error"},"titleBar": {@@ -1628,7 +1628,8 @@"close": "Cerrar"},"input": {- "idle": "Mantén la tecla para hablar",+ "holdToSpeak": "Mantén para hablar",+ "toClose": "cerrar","listening": "Escuchando...","transcribing": "Transcribiendo...","thinking": "Pensando..."diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.jsonindex eccff07e9..362616287 100644--- a/src/locales/fr/translation.json+++ b/src/locales/fr/translation.json@@ -1619,7 +1619,7 @@"newConversation": "Nouveau","copyToClipboard": "Copier dans le presse-papiers","copied": "Copié !",- "emptyState": "Appuyez sur le raccourci agent pour démarrer une conversation",+ "emptyState": "Maintenez {{hotkey}} pour démarrer une conversation","errorPrefix": "Erreur"},"titleBar": {@@ -1628,7 +1628,8 @@"close": "Fermer"},"input": {- "idle": "Maintenez la touche pour parler",+ "holdToSpeak": "Maintenez pour parler",+ "toClose": "fermer","listening": "Écoute...","transcribing": "Transcription...","thinking": "Réflexion..."diff --git a/src/locales/it/translation.json b/src/locales/it/translation.jsonindex 09381c974..2912d3d60 100644--- a/src/locales/it/translation.json+++ b/src/locales/it/translation.json@@ -1619,7 +1619,7 @@"newConversation": "Nuovo","copyToClipboard": "Copia negli appunti","copied": "Copiato!",- "emptyState": "Premi il tasto agente per iniziare una conversazione",+ "emptyState": "Tieni premuto {{hotkey}} per iniziare una conversazione","errorPrefix": "Errore"},"titleBar": {@@ -1628,7 +1628,8 @@"close": "Chiudi"},"input": {- "idle": "Tieni premuto il tasto per parlare",+ "holdToSpeak": "Tieni premuto per parlare",+ "toClose": "chiudi","listening": "Ascolto...","transcribing": "Trascrizione...","thinking": "Pensiero..."diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.jsonindex 6a2eeec5a..3d4d8ca38 100644--- a/src/locales/ja/translation.json+++ b/src/locales/ja/translation.json@@ -925,11 +925,7 @@"enterprise": {"name": "Enterprise","price": "カスタム",- "features": [- "クラウド同期",- "チーム機能(近日公開)",- "SSO & コンプライアンス"- ],+ "features": ["クラウド同期", "チーム機能(近日公開)", "SSO & コンプライアンス"],"cta": "お問い合わせ"},"currentPlan": "現在のプラン"@@ -1619,7 +1615,7 @@"newConversation": "新規","copyToClipboard": "クリップボードにコピー","copied": "コピーしました!",- "emptyState": "エージェントホットキーを押して会話を開始",+ "emptyState": "{{hotkey}} を長押しして会話を開始","errorPrefix": "エラー"},"titleBar": {@@ -1628,7 +1624,8 @@"close": "閉じる"},"input": {- "idle": "ホットキーを押し続けて話す",+ "holdToSpeak": "長押しして話す",+ "toClose": "閉じる","listening": "聞いています...","transcribing": "文字起こし中...","thinking": "考え中..."diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.jsonindex 5f2d4dcdb..4d58cd338 100644--- a/src/locales/pt/translation.json+++ b/src/locales/pt/translation.json@@ -1619,7 +1619,7 @@"newConversation": "Novo","copyToClipboard": "Copiar para área de transferência","copied": "Copiado!",- "emptyState": "Pressione a tecla do agente para iniciar uma conversa",+ "emptyState": "Segure {{hotkey}} para iniciar uma conversa","errorPrefix": "Erro"},"titleBar": {@@ -1628,7 +1628,8 @@"close": "Fechar"},"input": {- "idle": "Segure a tecla para falar",+ "holdToSpeak": "Segure para falar",+ "toClose": "fechar","listening": "Ouvindo...","transcribing": "Transcrevendo...","thinking": "Pensando..."diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.jsonindex 87add7935..e9bbd7417 100644--- a/src/locales/ru/translation.json+++ b/src/locales/ru/translation.json@@ -1619,7 +1619,7 @@"newConversation": "Новый","copyToClipboard": "Копировать в буфер обмена","copied": "Скопировано!",- "emptyState": "Нажмите горячую клавишу агента, чтобы начать разговор",+ "emptyState": "Удерживайте {{hotkey}}, чтобы начать разговор","errorPrefix": "Ошибка"},"titleBar": {@@ -1628,7 +1628,8 @@"close": "Закрыть"},"input": {- "idle": "Удерживайте клавишу для разговора",+ "holdToSpeak": "Удерживайте для разговора",+ "toClose": "закрыть","listening": "Слушаю...","transcribing": "Транскрибирую...","thinking": "Думаю..."diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.jsonindex 67b6f2eb0..80a7e1bfc 100644--- a/src/locales/zh-CN/translation.json+++ b/src/locales/zh-CN/translation.json@@ -945,11 +945,7 @@"enterprise": {"name": "企业版","price": "自定义",- "features": [- "云端同步",- "团队功能(即将推出)",- "SSO 与合规"- ],+ "features": ["云端同步", "团队功能(即将推出)", "SSO 与合规"],"cta": "联系我们"},"currentPlan": "当前套餐"@@ -1619,7 +1615,7 @@"newConversation": "新建","copyToClipboard": "复制到剪贴板","copied": "已复制!",- "emptyState": "按下助手热键开始对话",+ "emptyState": "按住 {{hotkey}} 开始对话","errorPrefix": "错误"},"titleBar": {@@ -1628,7 +1624,8 @@"close": "关闭"},"input": {- "idle": "按住快捷键说话",+ "holdToSpeak": "按住说话",+ "toClose": "关闭","listening": "正在聆听...","transcribing": "正在转录...","thinking": "正在思考..."diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.jsonindex 5df1cd307..8c19187d5 100644--- a/src/locales/zh-TW/translation.json+++ b/src/locales/zh-TW/translation.json@@ -945,11 +945,7 @@"enterprise": {"name": "企業版","price": "自訂",- "features": [- "雲端同步",- "團隊功能(即將推出)",- "SSO 與合規"- ],+ "features": ["雲端同步", "團隊功能(即將推出)", "SSO 與合規"],"cta": "聯絡我們"},"currentPlan": "目前方案"@@ -1619,7 +1615,7 @@"newConversation": "新建","copyToClipboard": "複製到剪貼簿","copied": "已複製!",- "emptyState": "按下助手熱鍵開始對話",+ "emptyState": "按住 {{hotkey}} 開始對話","errorPrefix": "錯誤"},"titleBar": {@@ -1628,7 +1624,8 @@"close": "關閉"},"input": {- "idle": "按住快捷鍵說話",+ "holdToSpeak": "按住說話",+ "toClose": "關閉","listening": "正在聆聽...","transcribing": "正在轉錄...","thinking": "正在思考..."diff --git a/src/models/modelRegistryData.json b/src/models/modelRegistryData.jsonindex b0051cb29..96fc97b14 100644--- a/src/models/modelRegistryData.json+++ b/src/models/modelRegistryData.json@@ -648,4 +648,4 @@}]}-}\ No newline at end of file+}diff --git a/src/services/ReasoningService.ts b/src/services/ReasoningService.tsindex b9a407a25..e24af4930 100644--- a/src/services/ReasoningService.ts+++ b/src/services/ReasoningService.ts@@ -1113,9 +1113,7 @@ class ReasoningService extends BaseReasoningService {messages,stream: true,temperature: config.temperature ?? 0.3,- max_tokens:- config.maxTokens ||- Math.max(4096, TOKEN_LIMITS.MAX_TOKENS),+ max_tokens: config.maxTokens || Math.max(4096, TOKEN_LIMITS.MAX_TOKENS),};logger.logReasoning("AGENT_STREAM_REQUEST", {@@ -1140,7 +1138,10 @@ class ReasoningService extends BaseReasoningService {try {const errorData = JSON.parse(errorText);errorMessage =- errorData.error?.message || errorData.message || errorData.error || `API error: ${response.status}`;+ errorData.error?.message ||+ errorData.message ||+ errorData.error ||+ `API error: ${response.status}`;} catch {errorMessage = errorText || `API error: ${response.status}`;}@@ -1214,7 +1215,9 @@ class ReasoningService extends BaseReasoningService {if (chunks.length > 0) {yield chunks.shift()!;} else if (!done) {- await new Promise<void>((r) => { waiting = r; });+ await new Promise<void>((r) => {+ waiting = r;+ });waiting = null;}}diff --git a/src/types/electron.ts b/src/types/electron.tsindex b4438391d..83debff4b 100644--- a/src/types/electron.ts+++ b/src/types/electron.ts@@ -894,10 +894,7 @@ declare global {}>;} | null>;deleteAgentConversation?: (id: number) => Promise<{ success: boolean }>;- updateAgentConversationTitle?: (- id: number,- title: string- ) => Promise<{ success: boolean }>;+ updateAgentConversationTitle?: (id: number, title: string) => Promise<{ success: boolean }>;addAgentMessage?: (conversationId: number,role: "user" | "assistant" | "system",@@ -909,9 +906,7 @@ declare global {content: string;created_at: string;}>;- getAgentMessages?: (- conversationId: number- ) => Promise<+ getAgentMessages?: (conversationId: number) => Promise<Array<{id: number;conversation_id: number;