Commit Graph

2 Commits

Author SHA1 Message Date
teknium1 7aa8249876 fix(cli): clear the preparing-line dedupe set on every stream reset
A tool batch that is cancelled or errors before any tool.started event
left the tool name in _tool_gen_announced, muting the next invocation's
'preparing <tool>…' line. Reset it in _reset_stream_state alongside the
other per-invocation state. Found by independent review before merge.
2026-09-12 08:43:12 -07:00
teknium1 cc269866aa fix(cli): announce "preparing <tool>…" once per tool per batch
The tool-gen callback fires once per tool CALL, so a model issuing three
parallel terminal calls printed three identical status lines before the
spinner took over (#10478). Coalesce repeats of the same tool name until a
tool actually starts (tool.started), which marks the next generation batch.

The line itself stays: it is the only feedback while a large argument
payload (e.g. a 45 KB write_file) streams, before the spinner exists.
PR #10598 removed it entirely; this keeps the first line and drops only
the duplicates.

Live A/B (in-process HTTP mock streaming 3 parallel terminal calls into a
real HermesCLI with display.streaming on): before 3 lines, after 1.

Fixes #10478
2026-09-12 08:43:12 -07:00