Skip to content

Fix Agent Host chat picker disposal#322195

Merged
roblourens merged 1 commit into
mainfrom
agents/fix-disposable-store-leak-error-e71e7ca8
Jun 20, 2026
Merged

Fix Agent Host chat picker disposal#322195
roblourens merged 1 commit into
mainfrom
agents/fix-disposable-store-leak-error-e71e7ca8

Conversation

@roblourens

@roblourens roblourens commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

  • cancel the initial session-config resolve when the Agent Host chat input picker is disposed
  • guard late chip renders after the picker render store has been disposed

Validation

  • npm run typecheck-client
  • npm run gulp compile
  • ./scripts/test.sh --runGlob '**/agentHostChatInputPicker.test.js'
  • npm run valid-layers-check

(Written by Copilot)

Cancel pending initial config resolution before the picker render store is disposed, and ignore late render attempts after disposal.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 20, 2026 03:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 lifecycle/disposal edge cases in the workbench chat “Agent Host” input picker so that async session-config resolution and late UI updates don’t run after the picker has been disposed.

Changes:

  • Cancel any in-flight initial resolveSessionConfig work when the picker is disposed.
  • Guard _renderChip() against late invocations after the render disposable store has already been disposed.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.ts Ensures picker disposal cancels initial config resolution and prevents late chip renders after disposal.

Copilot's findings

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

@roblourens roblourens marked this pull request as ready for review June 20, 2026 03:28
@roblourens roblourens enabled auto-merge (squash) June 20, 2026 03:28
@roblourens roblourens merged commit d6085d1 into main Jun 20, 2026
29 checks passed
@roblourens roblourens deleted the agents/fix-disposable-store-leak-error-e71e7ca8 branch June 20, 2026 05:18
@vs-code-engineering vs-code-engineering Bot added this to the 1.126.0 milestone Jun 20, 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