fix: name each tool once, and stream the reasoning live

The transcript listed every tool call in order, so a research turn read
`_Tools: web_search, web_search, web_search, web_fetch (failed), ..._` over
three lines of the same two words. Each tool is now named once, in the order
it was first used, with the failures counted: `_Tools: web_search, web_fetch
(4 failed)_`.

`Show Tool Calls` now actually hides the list. The old rule kept the whole
list on screen whenever any call failed or was refused as a repeat, which is
what left the setting looking broken. Failures are still mentioned, in one
sentence and without the names: `_2 tool calls failed._`, or `_a call kept
repeating, so the turn was cut short._`.

Reasoning now streams into the transcript while a turn is in flight whatever
`Show Reasoning` says, because a model that is thinking rather than writing
has nothing else on screen; the preference governs only where the trace
settles once the turn ends. The live view is the segment since the last tool
call, cleared at each tool start and kept whole for storage, so a dozen
rounds of thinking no longer stack on screen at once.
This commit is contained in:
2026-10-06 22:18:13 +08:00
parent ff99778e5d
commit bf2b5f40a2
7 changed files with 426 additions and 58 deletions
+8
View File
@@ -12,6 +12,14 @@ export interface LiveState {
isStreaming: boolean;
/** Partial answer for the turn currently in flight. */
response: string;
/**
* Reasoning to show for the turn in flight.
*
* Only the part since the last tool call, not the whole trace: the live
* transcript clears it each time a tool starts, so a research turn does not
* stack every round's thinking on screen. The stored turn keeps the whole
* trace separately.
*/
thinking: string;
/** Activity line, e.g. "Searching the web". Only meaningful mid-turn. */
status?: string;