Correct auto approve setting about inline commands#275909
Conversation
There was a problem hiding this comment.
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)`'), |
There was a problem hiding this comment.
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.
| 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)`'), |
Fixes #275889