mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Port the Goose two-stage tool-title pattern for individual tool calls. emit_pending now sends a deterministic friendly title (server: tool plus a detail excerpt from path/command/query-style args, 60-char first-line cap, multibyte-safe) alongside an explicit toolName so the desktop never loses tool identity. For runnable tools a fire-and-forget fast pass asks the LLM (64 output tokens, 300-char args excerpt, one retry) for a friendlier title and publishes it as a title-only tool_call_update tagged _meta.buzz.toolSummary — deliberately without a status field so it can never clobber pending/executing/terminal state. Cancel-aware via the session watch channel; silent on failure. Kill switch BUZZ_AGENT_NO_TOOL_SUMMARY=1 disables the fast pass; model override via BUZZ_AGENT_TOOL_SUMMARY_MODEL. The regression harness sets the kill switch since those tests queue exact LLM response sequences and count requests; golden_transcripts.rs carries the explicit summary-path coverage (pending title + toolName, title-only async update, kill switch). No chain summaries in this slice. Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>