mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 22:14:52 -07:00
prefactor: add rootCommands as array so it can be used for policy parsing (#16640)
This commit is contained in:
@@ -1245,6 +1245,7 @@ describe('CoreToolScheduler request queueing', () => {
|
||||
title: 'Confirm Shell Command',
|
||||
command: String(params['command'] ?? ''),
|
||||
rootCommand: 'git',
|
||||
rootCommands: ['git'],
|
||||
onConfirm: async () => {},
|
||||
}),
|
||||
execute: () => executeFn({}),
|
||||
|
||||
@@ -136,6 +136,7 @@ export const MOCK_TOOL_SHOULD_CONFIRM_EXECUTE = () =>
|
||||
title: 'Confirm mockTool',
|
||||
command: 'mockTool',
|
||||
rootCommand: 'mockTool',
|
||||
rootCommands: ['mockTool'],
|
||||
onConfirm: async () => {},
|
||||
});
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ export class ShellToolInvocation extends BaseToolInvocation<
|
||||
title: 'Confirm Shell Command',
|
||||
command: this.params.command,
|
||||
rootCommand: rootCommands.join(', '),
|
||||
rootCommands,
|
||||
onConfirm: async (outcome: ToolConfirmationOutcome) => {
|
||||
await this.publishPolicyUpdate(outcome);
|
||||
},
|
||||
|
||||
@@ -693,6 +693,7 @@ export interface ToolExecuteConfirmationDetails {
|
||||
onConfirm: (outcome: ToolConfirmationOutcome) => Promise<void>;
|
||||
command: string;
|
||||
rootCommand: string;
|
||||
rootCommands: string[];
|
||||
}
|
||||
|
||||
export interface ToolMcpConfirmationDetails {
|
||||
|
||||
Reference in New Issue
Block a user