Increase chat send RPC timeout to 120s for high-latency networks (#311)

This commit is contained in:
paisley
2026-03-05 15:49:36 +08:00
committed by GitHub
Unverified
parent c5058908af
commit 0901d9912a
2 changed files with 6 additions and 2 deletions

View File

@@ -1421,6 +1421,9 @@ export const useChatStore = create<ChatState>((set, get) => ({
let result: { success: boolean; result?: { runId?: string }; error?: string };
// Longer timeout for chat sends to tolerate high-latency networks (avoids connect error)
const CHAT_SEND_TIMEOUT_MS = 120_000;
if (hasMedia) {
result = await window.electron.ipcRenderer.invoke(
'chat:sendWithMedia',
@@ -1446,6 +1449,7 @@ export const useChatStore = create<ChatState>((set, get) => ({
deliver: false,
idempotencyKey,
},
CHAT_SEND_TIMEOUT_MS,
) as { success: boolean; result?: { runId?: string }; error?: string };
}