Skip to content

Conversation

@joshspicer
Copy link
Member

@joshspicer joshspicer commented Dec 16, 2025

Copilot AI review requested due to automatic review settings December 16, 2025 19:33
@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 16, 2025
@joshspicer joshspicer enabled auto-merge (squash) December 16, 2025 19:37
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 enhances the EligibleForAutoApproval evaluation logic to support backward compatibility for namespaced legacy tool names. When a tool was previously namespaced (e.g., gitTools/gitCommit) and is now renamed or moved, users can configure eligibility using either the full legacy name or just the last segment (e.g., gitCommit).

Key Changes

  • Added logic to extract and check the last segment of namespaced legacy tool names when evaluating eligibility for auto-approval
  • Replaced hardcoded string literals with the ChatConfiguration.EligibleForAutoApproval constant in tests
  • Added comprehensive test coverage for namespaced legacy tool name scenarios (both eligible and ineligible cases)

Reviewed changes

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

File Description
src/vs/workbench/contrib/chat/browser/languageModelToolsService.ts Enhanced isToolEligibleForAutoApproval to check both full legacy names and their trimmed segments (after the last /) when evaluating eligibility configuration
src/vs/workbench/contrib/chat/test/browser/languageModelToolsService.test.ts Replaced hardcoded configuration strings with constant; added four new tests covering namespaced legacy tool name scenarios for both eligible and ineligible cases

@joshspicer joshspicer disabled auto-merge December 16, 2025 19:50
@joshspicer joshspicer merged commit 7763ee5 into main Dec 16, 2025
33 of 34 checks passed
@joshspicer joshspicer deleted the joshspicer/legacyToolsNamespaced branch December 16, 2025 19:52
joshspicer added a commit that referenced this pull request Dec 16, 2025
…`EligibleForAutoApproval` (#283887)

* check the end part of legacyToolReferenceFullNames when evaluating EligibleForAutoApproval

* improve

* tests
joshspicer added a commit that referenced this pull request Dec 16, 2025
…`EligibleForAutoApproval` (#283914)

check the end part of `legacyToolReferenceFullNames` when evaluating `EligibleForAutoApproval` (#283887)

* check the end part of legacyToolReferenceFullNames when evaluating EligibleForAutoApproval

* improve

* tests
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.

4 participants