Skip to content

Adopt forceConfirmationReason for preToolUse hook#3500

Merged
roblourens merged 2 commits intomainfrom
roblou/systematic-goldfish
Feb 6, 2026
Merged

Adopt forceConfirmationReason for preToolUse hook#3500
roblourens merged 2 commits intomainfrom
roblou/systematic-goldfish

Conversation

@roblourens
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 5, 2026 23:58
@roblourens roblourens enabled auto-merge February 5, 2026 23:58
@roblourens roblourens self-assigned this Feb 5, 2026
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 6, 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

This PR adopts the forceConfirmationReason field from the LanguageModelToolInvocationPrepareOptions interface for the pre-tool-use hook. When this field is set, it forces tools to display confirmation messages to users before executing file edit operations, regardless of user settings or file sensitivity.

Changes:

  • Added forceConfirmationReason optional field to LanguageModelToolInvocationPrepareOptions interface in the VS Code API
  • Enhanced createEditConfirmation function to support forced confirmations with custom reasons
  • Updated all edit-related tools to thread through the forceConfirmationReason parameter

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/extension/vscode.proposed.chatParticipantPrivate.d.ts Added forceConfirmationReason optional field to LanguageModelToolInvocationPrepareOptions interface and removed trailing whitespace
src/extension/tools/node/editFileToolUtils.tsx Added forceConfirmationReason parameter to createEditConfirmation function with logic to force confirmation for all URIs when provided
src/extension/tools/node/insertEditTool.tsx Thread through options.forceConfirmationReason to createEditConfirmation call
src/extension/tools/node/editNotebookTool.tsx Thread through options.forceConfirmationReason to createEditConfirmation call
src/extension/tools/node/createFileTool.tsx Thread through options.forceConfirmationReason to createEditConfirmation call
src/extension/tools/node/createDirectoryTool.tsx Thread through options.forceConfirmationReason to createEditConfirmation call
src/extension/tools/node/applyPatchTool.tsx Thread through options.forceConfirmationReason to createEditConfirmation call
src/extension/tools/node/abstractReplaceStringTool.tsx Thread through options.forceConfirmationReason to createEditConfirmation call

pwang347
pwang347 previously approved these changes Feb 6, 2026
@roblourens roblourens added this pull request to the merge queue Feb 6, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 6, 2026
@roblourens roblourens added this pull request to the merge queue Feb 6, 2026
Merged via the queue into main with commit 00db3ec Feb 6, 2026
19 checks passed
@roblourens roblourens deleted the roblou/systematic-goldfish branch February 6, 2026 04:24
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