Skip to content

Conversation

@evalstate
Copy link
Owner

Fixed buffer management in StreamingMessageHandle._render_current_buffer() that was causing the display to freeze when streaming tool arguments.

Changes:

  • Consolidate buffer without truncating content when > 10 items
  • Separate display_text from buffer storage to preserve full content
  • Remove problematic buffer resets that stored truncated content
  • Improve error handling with proper logging instead of silent pass

The issue occurred when tool arguments streamed rapidly from providers like OpenAI. The buffer would exceed 10 items, trigger truncation, and reset to truncated content. Subsequent chunks would append to incomplete data, causing the display to appear frozen.

All existing tests pass.

Fixed buffer management in StreamingMessageHandle._render_current_buffer()
that was causing the display to freeze when streaming tool arguments.

Changes:
- Consolidate buffer without truncating content when > 10 items
- Separate display_text from buffer storage to preserve full content
- Remove problematic buffer resets that stored truncated content
- Improve error handling with proper logging instead of silent pass

The issue occurred when tool arguments streamed rapidly from providers
like OpenAI. The buffer would exceed 10 items, trigger truncation, and
reset to truncated content. Subsequent chunks would append to incomplete
data, causing the display to appear frozen.

All existing tests pass.
@evalstate evalstate merged commit 851b2a8 into main Nov 6, 2025
6 checks passed
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.

3 participants