Skip to content

fix(llm): avoid interrupting reasoning display with streamed content#109

Merged
F16shen merged 1 commit intoAI-Shell-Team:mainfrom
jexShain:fix/streaming-content-display
Apr 16, 2026
Merged

fix(llm): avoid interrupting reasoning display with streamed content#109
F16shen merged 1 commit intoAI-Shell-Team:mainfrom
jexShain:fix/streaming-content-display

Conversation

@jexShain
Copy link
Copy Markdown
Collaborator

Summary

  • Only emit content_delta events during streaming when tool calls are present, preventing the reasoning Live display from being disrupted in plain conversations
  • Expose content_was_streamed property on PTYAIShell for clean cross-object access, replacing getattr on private attributes
  • Remove redundant emit_content_delta(is_final=True) in non-streaming path without tool calls

Test plan

  • Verify plain conversation (no tool calls) does not stream content to terminal during LLM response
  • Verify tool-call conversations still display streamed content correctly
  • Verify error fix and question flows render responses properly in both modes

@github-actions
Copy link
Copy Markdown
Contributor

Thanks for the pull request. A maintainer will review it when available.

Please keep the PR focused, explain the why in the description, and make sure local checks pass before requesting review.

Contribution guide: https://github.com/AI-Shell-Team/aish/blob/main/CONTRIBUTING.md

@github-actions
Copy link
Copy Markdown
Contributor

This pull request description looks incomplete. Please update the missing sections below before review.

Missing items:

  • User-visible Changes
  • Compatibility
  • Testing
  • Change Type
  • Scope

Only emit content_delta events during streaming when tool calls are
present. For plain conversations the response is now rendered by the
caller after the LLM operation completes, preventing the Live reasoning
display from being disrupted.

Also expose content_was_streamed property on PTYAIShell for clean
cross-object access instead of getattr on private attributes.
@jexShain jexShain force-pushed the fix/streaming-content-display branch from 6b80df7 to 2cc00a2 Compare April 15, 2026 09:47
@github-actions github-actions Bot added the tests label Apr 15, 2026
@F16shen F16shen self-requested a review April 15, 2026 09:53
@F16shen F16shen self-assigned this Apr 15, 2026
@F16shen F16shen merged commit 21ff31c into AI-Shell-Team:main Apr 16, 2026
9 checks passed
@jexShain jexShain deleted the fix/streaming-content-display branch April 16, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants