Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(new-task): 转正完成后复核账号,切换时留作原账号的残留
Dash4f4b232a2b5d
diff --git a/apps/desktop/src/main/localDb/ipc/sessions.ts b/apps/desktop/src/main/localDb/ipc/sessions.tsindex 8a375f5766..0f307ba8ed 100644--- a/apps/desktop/src/main/localDb/ipc/sessions.ts+++ b/apps/desktop/src/main/localDb/ipc/sessions.ts@@ -1095,9 +1095,9 @@ export async function touchUserSendInDb(id: string, atMs?: number): Promise<void*/export async function commitProvisionalSession(sessionId: string): Promise<boolean> {if (claimOwnedProvisionalSession(sessionId) !== 'owned') return false;- forgetProvisionalSession(sessionId);- const [row] = await getDbClient()- .drizzle.select({+ const db = getDbClient().drizzle;+ const [row] = await db+ .select({workingDir: sessions.workingDir,workspaceKind: sessions.workspaceKind,remoteHostId: sessions.remoteHostId,@@ -1112,6 +1112,10 @@ export async function commitProvisionalSession(sessionId: string): Promise<booleerror: error instanceof Error ? error.message : String(error),});});+ // The account may have changed during the awaits: then it stays an unsent leftover of the+ // old account (claim parks it) instead of becoming an ordinary task there.+ if (claimOwnedProvisionalSession(sessionId) !== 'owned') return false;+ forgetProvisionalSession(sessionId);emitSessionCreated(sessionId);void import('../../cindy-brain/index.js').then((m) =>