Disclaimer: Generated via T3Code
Fixes #349.
Summary
When Stream assistant messages is enabled, assistant responses can appear twice in the desktop app.
This happens when:
- assistant text is emitted incrementally from streaming deltas
- item.completed later arrives with payload.detail containing the full response
- the completion path treats that detail as fallback text even though content was already streamed
Fix
- track whether assistant text has already been emitted for a given message
- only use item.completed.detail as fallback when no assistant text was previously emitted
- keep normal completion behavior unchanged for non-streamed or fallback-only cases
Validation
- added a regression test covering streamed deltas followed by item.completed.detail
- build and tested locally
Before:

After:

Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
aea3a42c-e37f-4677-8d67-6bb70200faccYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip
Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Share your feedback on Discord.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share