feat(agent): live progress during hidden tool-call generation#139
Open
bararchy wants to merge 1 commit into
Open
feat(agent): live progress during hidden tool-call generation#139bararchy wants to merge 1 commit into
bararchy wants to merge 1 commit into
Conversation
The stream renderer hides <tool_call> tokens, so while the model writes a whole file inline (tens of seconds at ~15 tok/s) the screen sat silent until the ⚒ line appeared all at once. Render a dim spinner + running char count while in tool mode, cleared when the call closes, so there's visible progress instead of dead air. Reasoning (<think>) already streams; normal answer text unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The streaming renderer has three modes:
:normal(printed),:think(dim gray), and:tool(hidden). When the model writes a file, it streams the entire file inline inside<tool_call>…</tool_call>— all hidden — so the UI sat in dead silence for tens of seconds (≈3 KB file at ~15 tok/s) before the⚒line appeared at once. Felt like a freeze / "BOOM text wall".Fix
While in
:toolmode, render a dim spinner + running char count (⠋ writing tool call… (N chars)) updated per token via\r, cleared when the tool call closes or generation ends. Visible progress instead of dead air.<think>already streams (gray);:normalanswer text is unchanged.Verified
crystal tool formatclean,ameba0.<tool_call>tag leaks, and:think/:normaltext + trailing text after the call all render.