Skip to content

Correct auto approve setting about inline commands#275909

Merged
Tyriar merged 1 commit intomainfrom
tyriar/275889
Nov 6, 2025
Merged

Correct auto approve setting about inline commands#275909
Tyriar merged 1 commit intomainfrom
tyriar/275889

Conversation

@Tyriar
Copy link
Member

@Tyriar Tyriar commented Nov 6, 2025

Fixes #275889

@Tyriar Tyriar added this to the October 2025 milestone Nov 6, 2025
@Tyriar Tyriar self-assigned this Nov 6, 2025
Copilot AI review requested due to automatic review settings November 6, 2025 18:59
@Tyriar Tyriar enabled auto-merge November 6, 2025 19:02
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 updates the documentation text describing how inline commands (specifically process substitution) are handled in the terminal chat agent tools auto-approval feature. The change clarifies that process substitution patterns like <(foo) are detected rather than "blocked by default via broad rules."

Key Changes

  • Updated localization string to reflect accurate behavior of inline command detection

localize('autoApprove.description.intro', "A list of commands or regular expressions that control whether the run in terminal tool commands require explicit approval. These will be matched against the start of a command. A regular expression can be provided by wrapping the string in {0} characters followed by optional flags such as {1} for case-insensitivity.", '`/`', '`i`'),
localize('autoApprove.description.values', "Set to {0} to automatically approve commands, {1} to always require explicit approval or {2} to unset the value.", '`true`', '`false`', '`null`'),
localize('autoApprove.description.subCommands', "Note that these commands and regular expressions are evaluated for every _sub-command_ within the full _command line_, so {0} for example will need both {1} and {2} to match a {3} entry and must not match a {4} entry in order to auto approve. Inline commands such as {5} (process substitution) are currently blocked by default via broad rules that detect these patterns.", '`foo && bar`', '`foo`', '`bar`', '`true`', '`false`', '`<(foo)`'),
localize('autoApprove.description.subCommands', "Note that these commands and regular expressions are evaluated for every _sub-command_ within the full _command line_, so {0} for example will need both {1} and {2} to match a {3} entry and must not match a {4} entry in order to auto approve. Inline commands such as {5} (process substitution) should also be detected.", '`foo && bar`', '`foo`', '`bar`', '`true`', '`false`', '`<(foo)`'),
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrase "should also be detected" is ambiguous and lacks clarity. The word "should" implies uncertainty or a recommendation rather than stating what actually happens. Based on the test file (treeSitterCommandParser.test.ts line 65) and the comment at line 242, process substitution IS detected and parsed. Consider using "are also detected and evaluated" to clearly communicate the actual behavior.

Suggested change
localize('autoApprove.description.subCommands', "Note that these commands and regular expressions are evaluated for every _sub-command_ within the full _command line_, so {0} for example will need both {1} and {2} to match a {3} entry and must not match a {4} entry in order to auto approve. Inline commands such as {5} (process substitution) should also be detected.", '`foo && bar`', '`foo`', '`bar`', '`true`', '`false`', '`<(foo)`'),
localize('autoApprove.description.subCommands', "Note that these commands and regular expressions are evaluated for every _sub-command_ within the full _command line_, so {0} for example will need both {1} and {2} to match a {3} entry and must not match a {4} entry in order to auto approve. Inline commands such as {5} (process substitution) are also detected and evaluated.", '`foo && bar`', '`foo`', '`bar`', '`true`', '`false`', '`<(foo)`'),

Copilot uses AI. Check for mistakes.
@Tyriar Tyriar merged commit eaf1753 into main Nov 6, 2025
33 of 34 checks passed
@Tyriar Tyriar deleted the tyriar/275889 branch November 6, 2025 19:18
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Dec 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto approve setting docs is wrong about inline commands

3 participants