File tree Expand file tree Collapse file tree 1 file changed +26
-14
lines changed
src/vs/workbench/contrib/terminalContrib/chatAgentTools/common Expand file tree Collapse file tree 1 file changed +26
-14
lines changed Original file line number Diff line number Diff line change @@ -89,35 +89,47 @@ export const terminalChatAgentToolsConfiguration: IStringDictionary<IConfigurati
89
89
default : {
90
90
// Safe and common readonly commands (automatically approved)
91
91
echo : true ,
92
- 'Write-Host' : true ,
93
- 'Write-Output' : true ,
94
92
ls : true ,
95
93
find : true ,
96
- 'Get-ChildItem' : true ,
97
94
pwd : true ,
98
- 'Get-Location' : true ,
99
95
cat : true ,
100
96
head : true ,
101
97
tail : true ,
102
- 'Get-Content' : true ,
103
98
grep : true ,
104
99
wc : true ,
105
- 'Select-Object' : true ,
106
- 'Select-String' : true ,
107
- 'Where-Obejct' : true ,
108
- 'Measure-Object' : true ,
109
100
sort : true ,
110
101
uniq : true ,
111
- 'Sort-Object' : true ,
102
+ tr : true ,
112
103
which : true ,
113
- 'Get-Command' : true ,
114
104
date : true ,
115
- 'Get-Date' : true ,
105
+ time : true ,
106
+ env : true ,
107
+ printenv : true ,
108
+ uname : true ,
116
109
hostname : true ,
117
- 'Get-Host' : true ,
118
110
ps : true ,
119
- 'Get-Process' : true ,
120
111
whoami : true ,
112
+ basename : true ,
113
+ dirname : true ,
114
+ realpath : true ,
115
+ readlink : true ,
116
+ stat : true ,
117
+ file : true ,
118
+ du : true ,
119
+ df : true ,
120
+ // While these PowerShell verbs can have side effects, they are generally innocuous (eg.
121
+ // updating OS-level file access info) and and often have prompts if they're more
122
+ // involved (eg. Get-Credential)
123
+ '/Get-[a-z0-9]/i' : true ,
124
+ '/Select-[a-z0-9]/i' : true ,
125
+ '/Measure-[a-z0-9]/i' : true ,
126
+ '/Compare-[a-z0-9]/i' : true ,
127
+ '/Format-[a-z0-9]/i' : true ,
128
+ '/Sort-[a-z0-9]/i' : true ,
129
+ 'Write-Host' : true ,
130
+ 'Write-Output' : true ,
131
+ 'Split-Path' : true ,
132
+ 'Join-Path' : true ,
121
133
122
134
// There are countless dangerous commands available on the command line, the defaults here
123
135
// include common ones that the user is likely to want to explicitly approve first. This is
You can’t perform that action at this time.
0 commit comments