Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(desktop): Hook bot 路径接入计划对账注入
Kafeifei4e859cd89b03
diff --git a/apps/desktop/src/main/hook-control/session-runner.ts b/apps/desktop/src/main/hook-control/session-runner.tsindex 99dfb8cc75..115b3ee9d5 100644--- a/apps/desktop/src/main/hook-control/session-runner.ts+++ b/apps/desktop/src/main/hook-control/session-runner.ts@@ -64,8 +64,11 @@ import {type InteractionRouteLease,type TurnOrigin as RoutedTurnOrigin,} from '../maker-ipc/interactionRouter.js';-import { prependHandoffToUserMessage } from '../maker-ipc/agentHandoff.js';+import { prependHandoffToUserMessage, prependNoteToWireUserMessage } from '../maker-ipc/agentHandoff.js';import { agentHandoffPending } from '../maker-ipc/agentHandoffPendingSingleton.js';+import { summarizeOpenPlan, buildPlanReconcileNote } from '../maker-ipc/planReconcile.js';+import { listMessagesForAgentHandoff } from '../localDb/ipc/messages.js';+import { enqueueDurableWrite } from '../messagePersistBroadcaster.js';import { toDesktopSessionDispatchOutcome } from '../maker-host/send-outcome.js';import { createMessage } from '../localDb/ipc/messages.js';import {@@ -968,12 +971,26 @@ export function createMakerHookSessionRunner(deps: {let turnChangeSetStarted = false;try {const pendingHandoff = await agentHandoffPending.peek(session.id);- const outgoingMessage: UserMessage = pendingHandoff+ const withHandoff: UserMessage = pendingHandoff? (prependHandoffToUserMessage({ type: 'user', content: sendContent },pendingHandoff,) as UserMessage): { type: 'user', content: sendContent };+ const planReconcileNote = await (async () => {+ try {+ const rows = await enqueueDurableWrite(`plan-reconcile-read:${session.id}`, () =>+ listMessagesForAgentHandoff(session.id, 1000),+ );+ const summary = summarizeOpenPlan(rows);+ return summary ? buildPlanReconcileNote(summary) : null;+ } catch {+ return null;+ }+ })();+ const outgoingMessage: UserMessage = planReconcileNote+ ? (prependNoteToWireUserMessage(withHandoff, planReconcileNote) as UserMessage)+ : withHandoff;const sendResult = await session.send(outgoingMessage, {origin,planMode: false,