Fix: final response markdown not rendered during streaming#326497
Open
tamuratak wants to merge 6 commits into
Open
Fix: final response markdown not rendered during streaming#326497tamuratak wants to merge 6 commits into
tamuratak wants to merge 6 commits into
Conversation
…dling, and ensure consistent content structure
…d streamline positional tail slot handling
…larity and consistency
…tPart and enhance error content comparison in ChatErrorContentPart
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes missing final chat markdown during streaming by aligning progressive and final renderer content arrays.
Changes:
- Adds a dedicated tail-slot placeholder.
- Stabilizes renderer slot ordering.
- Adjusts working-progress visibility.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
chatViewModel.ts |
Defines the tail placeholder content type. |
chatListRenderer.ts |
Aligns rendering slots and updates progress behavior. |
…citations in ChatListItemRenderer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: final response markdown not rendered during streaming
Close #324774 #324608 #325601
Bug: With
workbench.reduceMotionenabled, the final markdown content fails to display during streaming when a response goes through thinking → tool invocation → markdown. The content briefly disappears and only reappears after the response is finalized.Root cause: The progressive and final rendering paths in
ChatListItemRendererproduced content arrays of different lengths. The progressive path was missingcodeCitations/errorDetailsslots, andchangesSummary/turnPills/workingProgresswere conditionally appended. Thediff()algorithm compares by index, so the length mismatch caused the final markdown to be matched against the wrong rendered part, preventing it from rendering.Fix: Introduce
IChatTailPlaceholder— a sentinel value that occupies a fixed position in the content array when a slot has no data. A sharedappendTailPlaceholdershelper ensures both progressive and final paths always produce identical-length arrays with the same slot order: codeCitations → errorDetails → changesSummary → turnPills → workingProgress. The "Thinking" shimmer is also suppressed for markdown-only responses where no thinking or tool activity is present.Repro steps:
workbench.reduceMotiontoon.Written with GitHub Copilot + MiMo-V2.5-Pro
CC: @justschen