Skip to content

Keep generic tool previews responsive while they stream - #199

Merged
dnouri merged 1 commit into
masterfrom
fix/generic-tool-streaming-header
Apr 27, 2026
Merged

dnouri merged 1 commit into
masterfrom
fix/generic-tool-streaming-header

Conversation

@dnouri

@dnouri dnouri commented Apr 27, 2026

Copy link
Copy Markdown
Owner

When pi streams a generic tool call, Emacs used to rebuild the growing
JSON argument header on every small update. Large subagent or extension
calls could make the chat buffer pause while the call was still only a
preview.

Show just the generic tool name during that live phase, then restore the
full arguments when the tool call finishes streaming or execution starts
with authoritative arguments. Built-in tools keep their compact streaming
headers, so bash commands and file paths still appear as soon as pi knows
them.

Handle each streaming tool call by its content index, so completing one
preview does not force neighboring previews to reveal partial arguments.

When pi streams a generic tool call, Emacs used to rebuild the growing
JSON argument header on every small update.  Large subagent or extension
calls could make the chat buffer pause while the call was still only a
preview.

Show just the generic tool name during that live phase, then restore the
full arguments when the tool call finishes streaming or execution starts
with authoritative arguments.  Built-in tools keep their compact streaming
headers, so bash commands and file paths still appear as soon as pi knows
them.

Handle each streaming tool call by its content index, so completing one
preview does not force neighboring previews to reveal partial arguments.
@dnouri
dnouri merged commit 65cd408 into master Apr 27, 2026
11 checks passed
@dnouri
dnouri deleted the fix/generic-tool-streaming-header branch April 28, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant