mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-01 07:24:38 -07:00
Revert "Make --allowed-tools work in non-interactive mode" (#10006)
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
|
||||
import type { AnyDeclarativeTool, AnyToolInvocation } from '../index.js';
|
||||
import { isTool } from '../index.js';
|
||||
import { SHELL_TOOL_NAMES } from './shell-utils.js';
|
||||
|
||||
const SHELL_TOOL_NAMES = ['run_shell_command', 'ShellTool'];
|
||||
|
||||
/**
|
||||
* Checks if a tool invocation matches any of a list of patterns.
|
||||
@@ -60,7 +61,7 @@ export function doesToolInvocationMatch(
|
||||
|
||||
if (
|
||||
'command' in invocation.params &&
|
||||
toolNames.some((name) => SHELL_TOOL_NAMES.includes(name))
|
||||
toolNames.includes('run_shell_command')
|
||||
) {
|
||||
const argValue = String(
|
||||
(invocation.params as { command: string }).command,
|
||||
|
||||
Reference in New Issue
Block a user