Skip to content

Conversation

@dmitrivMS
Copy link
Contributor

Fixes #264548

Copilot AI review requested due to automatic review settings December 13, 2025 11:05
@dmitrivMS dmitrivMS requested a review from aeschli December 13, 2025 11:05
@dmitrivMS dmitrivMS enabled auto-merge (squash) December 13, 2025 11:05
@dmitrivMS dmitrivMS self-assigned this Dec 13, 2025
@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 13, 2025
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 issue #264548 by ensuring the tools picker automatically closes when the chat mode changes. The implementation adds cancellation token support to the tools picker and uses an observable-based pattern to detect mode changes.

Key Changes

  • Added optional CancellationToken parameter to showToolsPicker function to support external cancellation
  • Implemented mode change detection in ConfigureToolsAction using autorun to monitor the current chat mode
  • Properly manages resource disposal with try-finally blocks to prevent leaks

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.ts Adds optional cancellation token parameter and listener to close picker when token is cancelled
src/vs/workbench/contrib/chat/browser/actions/chatToolActions.ts Implements mode change detection using autorun observable pattern and passes cancellation token to picker

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing mode while tool set picker is open will apply tools to new mode

2 participants