You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
thread:send IPC handler always returns { ok: true } even when launch fails #57
In apps/desktop/src/main/index.ts, the thread:send IPC handler attempts to catch early failures from runner.send() and return { ok: false, error } to the caller. However, because runner.send is an async function and is invoked unawaited (void runner.send(...)), initialization errors return a rejected Promise that bypasses the try...catch block.
As a result, thread:send unconditionally returns { ok: true }, and error handling in the renderer is never triggered.
ipcMain.handle("thread:send",async(_e,{ threadId, text }: {threadId: string;text: string})=>{try{voidrunner.send(threadId,text).catch((err)=>{console.error(`thread:send uncaught in background for ${threadId}:`,err);});// Yield briefly so a synchronously-failing send surfaces an error to the caller.awaitnewPromise((r)=>setTimeout(r,0));return{ok: true};}catch(err){return{ok: false,error: errinstanceofError ? err.message : String(err)};}});
Activity