Description:
When asking Copilot Chat to provide multiple code blocks in a single response, only the last code block (or no code blocks) displays initially. All code blocks appear correctly only after reloading the chat window.
Steps to Reproduce:
- Open Copilot Chat in VS Code
- Ask Copilot for multiple code examples, e.g.: "Can you show me some code block? anything code is fine"
- Request multiple code samples in different languages (JavaScript, TypeScript, Python, etc.)
- Observe the initial response
Expected Behavior:
All code blocks should render and display properly in the chat message on first load, without requiring a window reload.
Actual Behavior:
- Initial load: Only the last code block visible (or all code blocks are hidden)
- After window reload (F5 or browser refresh): All code blocks display correctly
- The code blocks exist in the DOM after reload, confirming they were sent by the server
Screenshots/Evidence:
- Before reload: Only 1 code block visible (or none)
- After reload: All 5+ code blocks visible as expected
System Information:
- OS: Windows 11
- VS Code Version: 1.113.0
- Copilot Extension Version: 0.41.1
- Model: Claude Haiku 4.5
Reproduction:
Consistently reproducible - happens every time multiple code blocks are requested in one response.
Workaround:
Reload the VS Code window (F5) or refresh the chat to display all code blocks.
Root Cause Analysis (likely):
- Client-side rendering/lazy-loading issue
- Code blocks in DOM but not displayed initially
- Probable JavaScript initialization or component mounting issue in chat UI
- Not a server/backend issue (content is received correctly)
Suggested Investigation:
- Check chat component rendering lifecycle
- Verify code block component mounting on initial render
- Check for race conditions in markdown parsing or syntax highlighting
Description:
When asking Copilot Chat to provide multiple code blocks in a single response, only the last code block (or no code blocks) displays initially. All code blocks appear correctly only after reloading the chat window.
Steps to Reproduce:
Expected Behavior:
All code blocks should render and display properly in the chat message on first load, without requiring a window reload.
Actual Behavior:
Screenshots/Evidence:
System Information:
Reproduction:
Consistently reproducible - happens every time multiple code blocks are requested in one response.
Workaround:
Reload the VS Code window (F5) or refresh the chat to display all code blocks.
Root Cause Analysis (likely):
Suggested Investigation: