Add 'git show' to auto-executable allow-list

This commit is contained in:
John Stearns
2024-11-06 14:54:12 -08:00
parent 48d7ef958c
commit 9153a962e5
4 changed files with 324 additions and 41 deletions

View File

@@ -56,13 +56,13 @@ type UserContent = Array<
Anthropic.TextBlockParam | Anthropic.ImageBlockParam | Anthropic.ToolUseBlockParam | Anthropic.ToolResultBlockParam
>
// Add near the top of the file, after imports:
const ALLOWED_AUTO_EXECUTE_COMMANDS = [
'npm',
'npx',
'tsc',
'git log',
'git diff',
'git show',
'list'
] as const
@@ -134,7 +134,7 @@ export class Cline {
}
}
protected isAllowedCommand(command?: string): boolean {
private isAllowedCommand(command?: string): boolean {
if (!command) {
return false;
}