Files
paseo/packages/server/src
Mohamed Boudra abcccce846 Show a streamed tool call's final title and icon from its first frame (#9248)
* fix(server): give streamed tool calls their final title from the first frame

Claude opens a tool_use block with `input: {}` and OpenCode reports a
pending part with `input: {}` before the arguments arrive. The shared
detail primitives rejected the empty input, so the first row carried an
`unknown` detail and rendered the raw tool name with a wrench icon
("Bash"), then switched to "Shell" and the terminal icon once the command
arrived. Grep/Glob, WebFetch and MultiEdit flipped the same way, and
WebFetch flipped again while only `url` had streamed.

A known tool with no arguments and no output now yields its canonical
detail with empty fields. The app already reads empty read/edit/write/
search/fetch fields as loading details; a shell with no command and no
output now reads as loading too, instead of opening an empty sheet.

* fix(server): keep a tool call's title while optional arguments arrive first

Claude writes a tool's arguments in whatever order the model chooses, so a Bash
call can stream `{description}` before `command`. That partial input failed the
Bash schema and the row fell back to "Bash" with the wrench icon until the
command arrived.

Parsing now retries a call without output as having no arguments when its
input does not yet satisfy its tool's schema. This happens once, over the whole
branch set, so tools with several input shapes (OpenCode apply_patch) still
reach the branch their complete input matches.
2026-11-10 11:05:31 +07:00
..
2026-06-03 17:25:07 +07:00