Skip to content

Clear more of response on ChatResponseModel dispose#308653

Merged
roblourens merged 1 commit intomainfrom
roblou/drab-vole
Apr 9, 2026
Merged

Clear more of response on ChatResponseModel dispose#308653
roblourens merged 1 commit intomainfrom
roblou/drab-vole

Conversation

@roblourens
Copy link
Copy Markdown
Member

Followup from #308638

@roblourens roblourens enabled auto-merge (squash) April 9, 2026 01:35
Copilot AI review requested due to automatic review settings April 9, 2026 01:35
@roblourens roblourens self-assigned this Apr 9, 2026
Copy link
Copy Markdown
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 is a follow-up to prior leak-mitigation work in the chat model, aiming to reduce memory retention by clearing more state when a ChatResponseModel is disposed.

Changes:

  • Clear the response content on ChatResponseModel.dispose().
  • Clear codeBlockInfos on dispose to drop references to associated metadata.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/common/model/chatModel.ts Extends ChatResponseModel.dispose() to clear response and code-block metadata to reduce retention impact.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread src/vs/workbench/contrib/chat/common/model/chatModel.ts
Comment thread src/vs/workbench/contrib/chat/common/model/chatModel.ts
@roblourens roblourens merged commit 253860d into main Apr 9, 2026
27 checks passed
@roblourens roblourens deleted the roblou/drab-vole branch April 9, 2026 02:45
@vs-code-engineering vs-code-engineering bot added this to the 1.116.0 milestone Apr 9, 2026
joshspicer pushed a commit that referenced this pull request Apr 9, 2026
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