You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
markdownDescription: localize('allowList',"A list of commands or regular expressions that allow the run in terminal tool commands to run without explicit approval. These will be matched against the start of a command. A regular expression can be provided by wrapping the string in `/` characters.\n\nExamples:\n- `\"mkdir\"` Will allow all command lines starting with `mkdir`\n- `\"npm run build\"` Will allow all command lines starting with `npm run build`\n- `\"/^git (status|show\\b.*)$/\"` will allow `git status` and all command lines starting with `git show`\n- `\"/.*/\"` will allow all command lines\n\nThis will be overridden by anything that matches an entry in `#chat.agent.terminal.denyList#`."),
29
+
[TerminalChatAgentToolsSettingId.AutoApprove]: {
30
+
markdownDescription: localize('autoApprove',"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 `/` characters.\n\nSet to `true` to automatically approve commands, `false` to always require explicit approval or `null` to unset the value.\n\nExamples:\n- `\"mkdir\": true` Will allow all command lines starting with `mkdir`\n- `\"npm run build\": true` Will allow all command lines starting with `npm run build`\n- `\"rm\": false` Will require explicit approval for all command lines starting with `rm`\n- `\"/^git (status|show\\b.*)$/\": true` will allow `git status` and all command lines starting with `git show`\n- `\"/.*/\": true` will allow all command lines\n- `\"rm\": null` will unset the default `false` value for `rm`\n\nNote that these commands and regular expressions are evaluated for every _sub-command_ within a single command line, so `foo && bar` for example will need both `foo` and `bar` to match a `true` entry and must not match a `false` entry in order to auto approve. Inline commands are also detected so `echo $(rm file)` will need both `echo $(rm file)` and `rm file` to pass."),
33
31
type: 'object',
34
32
additionalProperties: {
35
-
type: 'boolean',
36
-
enum: [
37
-
true,
38
-
false,
39
-
],
40
-
enumDescriptions: [
41
-
localize('allowList.true',"Allow the pattern."),
42
-
localize('allowList.false',"Do not allow the pattern."),
43
-
],
44
-
description: localize('allowList.key',"The start of a command to match against. A regular expression can be provided by wrapping the string in `/` characters."),
45
-
},
46
-
tags: [
47
-
'experimental'
48
-
],
49
-
default: {},
50
-
},
51
-
[TerminalChatAgentToolsSettingId.DenyList]: {
52
-
markdownDescription: localize('denyList',"A list of commands or regular expressions that override matches in `#chat.agent.terminal.allowList#` and force a command line to require explicit approval. This will be matched against the start of a command. A regular expression can be provided by wrapping the string in `/` characters.\n\nExamples:\n- `\"rm\"` will require explicit approval for any command starting with `rm`\n- `\"/^git (push|pull)/\"` will require explicit approval for any command starting with `git push` or `git pull` \n\nThis provides basic protection by preventing certain commands from running automatically, especially those a user would likely want to approve first. It is not intended as a comprehensive security measure or a defense against prompt injection."),
53
-
type: 'object',
54
-
additionalProperties: {
55
-
type: 'boolean',
56
-
enum: [
57
-
true,
58
-
false
59
-
],
60
-
enumDescriptions: [
61
-
localize('denyList.value.true',"Deny the pattern."),
62
-
localize('denyList.value.false',"Do not deny the pattern."),
63
-
],
64
-
description: localize('denyList.key',"The start of a command to match against. A regular expression can be provided by wrapping the string in `/` characters.")
33
+
anyOf: [
34
+
{
35
+
type: 'boolean',
36
+
enum: [
37
+
true,
38
+
false,
39
+
],
40
+
enumDescriptions: [
41
+
localize('autoApprove.true',"Automatically approve the pattern."),
42
+
localize('autoApprove.false',"Require explicit approval for the pattern."),
43
+
],
44
+
description: localize('autoApprove.key',"The start of a command to match against. A regular expression can be provided by wrapping the string in `/` characters."),
45
+
},
46
+
{
47
+
type: 'null',
48
+
description: localize('autoApprove.null',"Ignore the pattern, this is useful for unsetting the same pattern set at a higher scope."),
0 commit comments