Skip to content

Conversation

@roblourens
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings January 22, 2026 20:19
@roblourens roblourens enabled auto-merge (squash) January 22, 2026 20:19
@roblourens roblourens self-assigned this Jan 22, 2026
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 22, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a rendering issue where tool calls could be lost in thinking/subagent blocks when content was not yet expanded. The fix introduces an early initialization mechanism that ensures DOM elements are ready to receive content updates even before the user expands the collapsible section.

Changes:

  • Added a shouldInitEarly() hook to ChatCollapsibleContentPart to allow subclasses to initialize content before expansion
  • Implemented early initialization in ChatThinkingContentPart for fixed scrolling mode
  • Implemented early initialization in ChatSubagentContentPart when actively streaming
  • Added null safety checks for textContainer in ChatThinkingContentPart to handle cases where it may not be initialized

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
chatCollapsibleContentPart.ts Added shouldInitEarly() hook that allows subclasses to trigger content initialization before expansion
chatThinkingContentPart.ts Implemented shouldInitEarly() to return true for fixed scrolling mode and added null checks for textContainer access
chatSubagentContentPart.ts Implemented shouldInitEarly() to return true when not initially complete (actively streaming)

@roblourens roblourens merged commit a78d4d4 into main Jan 22, 2026
27 of 28 checks passed
@roblourens roblourens deleted the roblou/entire-swan branch January 22, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants