Skip to content

More effective disabling of browser tools in agents app#312535

Merged
kycutler merged 2 commits intomainfrom
kycutler/agentstools
Apr 25, 2026
Merged

More effective disabling of browser tools in agents app#312535
kycutler merged 2 commits intomainfrom
kycutler/agentstools

Conversation

@kycutler
Copy link
Copy Markdown
Contributor

No description provided.

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings April 25, 2026 16:01
@kycutler kycutler self-assigned this Apr 25, 2026
@kycutler kycutler enabled auto-merge (squash) April 25, 2026 16:01
@vs-code-engineering
Copy link
Copy Markdown
Contributor

vs-code-engineering Bot commented Apr 25, 2026

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@jruales

Matched files:

  • src/vs/workbench/contrib/browserView/electron-browser/features/browserEditorChatFeatures.ts
  • src/vs/workbench/contrib/browserView/electron-browser/tools/browserTools.contribution.ts

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 aims to make browser chat tools disable more reliably in the Agents (sessions) window by switching gating from a config-change listener to context-key based rules, and by explicitly excluding sessions windows from “share with agent” eligibility.

Changes:

  • Replace configuration-based enablement checks for browser chat tools with IContextKeyService + contextMatchesRules(...) logic.
  • Export and reuse a shared context expression (canShareBrowserWithAgentContext) to control both tool registration and sharing UI.
  • Add IsSessionsWindowContext.negate() to prevent browser sharing/tools in sessions windows.
Show a summary per file
File Description
src/vs/workbench/contrib/browserView/electron-browser/tools/browserTools.contribution.ts Switches tool registration updates from config events to context-key changes; gates registration via canShareBrowserWithAgentContext.
src/vs/workbench/contrib/browserView/electron-browser/features/browserEditorChatFeatures.ts Exports canShareBrowserWithAgentContext and updates it to exclude sessions windows.

Copilot's findings

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

Co-authored-by: Copilot <copilot@github.com>
@kycutler kycutler merged commit e98c872 into main Apr 25, 2026
26 checks passed
@kycutler kycutler deleted the kycutler/agentstools branch April 25, 2026 18:31
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 25, 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