fix(message): render markdown while streaming assistant output#3337
fix(message): render markdown while streaming assistant output#3337SuMuxi66 wants to merge 1 commit into
Conversation
SivanCola
left a comment
There was a problem hiding this comment.
Thanks, this is the right direction and the scope is much cleaner than the broader streaming-markdown work in #3140. I think this PR should be the main path for the focused assistant streaming markdown fix.
Before merging, please fix the streaming cursor placement. Markdown renders a block-level .md wrapper, so rendering <span className="cursor" /> as a sibling after <Markdown /> places the cursor after the markdown block rather than at the end of the rendered text. For normal paragraphs this will show the cursor on the next line, not after the last token.
Please make the cursor render as part of the final rendered markdown content, then verify paragraphs, lists, tables, and code blocks while streaming.
Once this is addressed and verification stays green, I will consider merging it into main-v2.
Summary
Fix assistant messages to render Markdown while streaming, instead of showing raw Markdown text until the assistant turn completes.
Before
During streaming, assistant output was rendered as raw text, so users could temporarily see Markdown syntax such as:
| table |**bold**Markdown formatting only appeared after the turn finished.
After
Assistant output always renders through the Markdown component.
When the message is still streaming, the cursor is appended after the rendered Markdown.
Files changed
desktop/frontend/src/components/Message.tsxTest checklist
|Scope
This PR only changes assistant message rendering while streaming.
It does not change the Composer,
past:chats, file references, or the CLI/TUI flow.