Merge pull request #7 from RooVetGit/feature/addGitShow

Add 'git show' to auto-executable allow-list
This commit is contained in:
John Stearns
2024-11-06 15:04:35 -08:00
committed by GitHub
4 changed files with 324 additions and 41 deletions

355
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
"name": "roo-cline", "name": "roo-cline",
"displayName": "Roo Cline", "displayName": "Roo Cline",
"description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.",
"version": "1.0.4", "version": "1.0.5",
"icon": "assets/icons/icon.png", "icon": "assets/icons/icon.png",
"galleryBanner": { "galleryBanner": {
"color": "#617A91", "color": "#617A91",
@@ -142,7 +142,9 @@
"@typescript-eslint/parser": "^7.11.0", "@typescript-eslint/parser": "^7.11.0",
"@vscode/test-cli": "^0.0.9", "@vscode/test-cli": "^0.0.9",
"@vscode/test-electron": "^2.4.0", "@vscode/test-electron": "^2.4.0",
"esbuild": "^0.24.0",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"jest": "^29.7.0",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"ts-jest": "^29.2.5", "ts-jest": "^29.2.5",
"typescript": "^5.4.5" "typescript": "^5.4.5"
@@ -163,11 +165,9 @@
"default-shell": "^2.2.0", "default-shell": "^2.2.0",
"delay": "^6.0.0", "delay": "^6.0.0",
"diff": "^5.2.0", "diff": "^5.2.0",
"esbuild": "^0.24.0",
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"globby": "^14.0.2", "globby": "^14.0.2",
"isbinaryfile": "^5.0.2", "isbinaryfile": "^5.0.2",
"jest": "^29.7.0",
"mammoth": "^1.8.0", "mammoth": "^1.8.0",
"monaco-vscode-textmate-theme-converter": "^0.1.7", "monaco-vscode-textmate-theme-converter": "^0.1.7",
"openai": "^4.61.0", "openai": "^4.61.0",

View File

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