From 4d36c0466bd41d9d8693d5c29c195a84d67562f7 Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Fri, 3 Jul 2026 19:20:14 +0800 Subject: [PATCH] docs(acp): drop tool/result field enumeration in ToolPresenter comment Same stale enumeration as the presenter-note fix, in the ToolPresenter JSDoc: it said the tool/result event "carries only { callId, content, isError }". The event also carries error and meta; the load-bearing fact is that it omits the tool name/args (why the presenter remembers them per callId). State that instead of an exhaustive list that drifts. --- packages/ui/acp/src/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/ui/acp/src/index.ts b/packages/ui/acp/src/index.ts index c01c004d91..231848de01 100644 --- a/packages/ui/acp/src/index.ts +++ b/packages/ui/acp/src/index.ts @@ -869,11 +869,11 @@ const noTerminalRendering: TerminalRendering = { enabled: false, cwd: undefined * by name in the registry and applies a generic fallback when a tool defines * neither. The returned view is what {@link streamSessionEventUpdate} switches on. * - * The `tool/result` session event carries only `{ callId, content, isError }` — - * NOT the tool name or args — so to call a tool's `presentResult` (which needs - * both), the presenter remembers each `tool/call`'s `{ name, args, card }` keyed - * by callId and looks it up on the matching result. The map is bridge-LOCAL (not - * a change to the event schema or a core service): one presenter per live session + * The `tool/result` session event does NOT carry the tool name or args — so to + * call a tool's `presentResult` (which needs both), the presenter remembers each + * `tool/call`'s `{ name, args, card }` keyed by callId and looks it up on the + * matching result. The map is bridge-LOCAL (not a change to the event schema or a + * core service): one presenter per live session * (and a throwaway per `session/load` replay), and each entry is removed when its * result arrives. In the normal loop a `tool/call` is always followed by a * `tool/result` (the registry turns even a thrown tool into an isError result),