Skip to content

Proposal for tool combination approval#302395

Merged
alexr00 merged 5 commits intomainfrom
alexr00/concrete-cricket
Mar 19, 2026
Merged

Proposal for tool combination approval#302395
alexr00 merged 5 commits intomainfrom
alexr00/concrete-cricket

Conversation

@alexr00
Copy link
Member

@alexr00 alexr00 commented Mar 17, 2026

Adds support for approving a specific tool + args combination Part of #302393

Adds support for approving a specific tool + args combination
Part of #302393
Copilot AI review requested due to automatic review settings March 17, 2026 10:21
@alexr00 alexr00 self-assigned this Mar 17, 2026
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

Adds a new proposed API and corresponding workbench support to let users approve (and later auto-confirm) a specific tool + argument combination, addressing #302393’s request for argument-scoped confirmations.

Changes:

  • Introduces proposed API toolInvocationApproveCombination via LanguageModelToolConfirmationMessages.approveCombination.
  • Threads an optional combinationLabel through tool confirmation plumbing to offer combination-scoped approval actions and auto-confirm checks.
  • Persists combination approvals in a new confirmation store and gates extension usage behind the proposal flag.

Reviewed changes

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

Show a summary per file
File Description
src/vscode-dts/vscode.proposed.toolInvocationApproveCombination.d.ts New proposed API surface adding approveCombination to tool confirmation messages.
src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.ts Adds approveCombination to internal confirmation message shape.
src/vs/workbench/contrib/chat/common/tools/languageModelToolsConfirmationService.ts Extends confirmation ref with combinationLabel to enable combination-scoped actions.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.ts Passes combinationLabel to confirmation service; keeps “Allow Once” primary when combination approvals exist.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.ts Adds overridable hook to keep “Allow Once” as primary button.
src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.ts Includes combination label in pre-confirm/auto-confirm lookup path.
src/vs/workbench/contrib/chat/browser/tools/languageModelToolsConfirmationService.ts Implements combination approval actions + storage and checks combination approvals before tool/server approvals.
src/vs/workbench/api/common/extHostLanguageModelTools.ts Gates new field behind toolInvocationApproveCombination proposal and serializes it to DTO.
src/vs/platform/extensions/common/extensionsApiProposals.ts Registers the new proposal file in the proposals list.

You can also share your feedback on Copilot code review. Take the survey.

@alexr00 alexr00 requested review from connor4312 and Copilot March 17, 2026 16:45
@alexr00 alexr00 marked this pull request as ready for review March 17, 2026 16:46
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

Adds a proposed API and workbench support for approving a specific tool + argument combination (rather than approving the tool globally), addressing the “tool confirmations for specific arguments” request in #302393.

Changes:

  • Introduces proposed API toolInvocationApproveCombination that adds approveCombination to tool confirmation messages.
  • Plumbs the new approveCombination label through ext host → tool invocation preparation → confirmation UI/service to offer combination-scoped approvals.
  • Expands confirmation service tests to cover combination-level actions and storage format handling.

Reviewed changes

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

Show a summary per file
File Description
src/vscode-dts/vscode.proposed.toolInvocationApproveCombination.d.ts Adds the proposed API surface (approveCombination) for combination approval labels.
src/vs/platform/extensions/common/extensionsApiProposals.ts Registers the new proposal so extensions can opt-in.
src/vs/workbench/api/common/extHostLanguageModelTools.ts Gates the new field behind the proposal and converts it for main-thread consumption.
src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.ts Extends internal confirmation messages with approveCombination.
src/vs/workbench/contrib/chat/common/tools/languageModelToolsConfirmationService.ts Extends the confirmation ref with combinationLabel.
src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.ts Passes approveCombination through auto-confirm evaluation.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.ts Surfaces combination actions in the UI and adjusts primary-button selection behavior.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.ts Adds an override point to keep “Allow Once” as primary when desired.
src/vs/workbench/contrib/chat/test/browser/tools/languageModelToolsConfirmationService.test.ts Adds unit tests for combination-scoped actions and storage migration behavior.

You can also share your feedback on Copilot code review. Take the survey.

@alexr00 alexr00 enabled auto-merge (squash) March 19, 2026 10:18
@alexr00 alexr00 merged commit e74653b into main Mar 19, 2026
21 checks passed
@alexr00 alexr00 deleted the alexr00/concrete-cricket branch March 19, 2026 10:30
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