mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-29 14:34:55 -07:00
fix(core): properly support allowRedirect in policy engine (#23579)
This commit is contained in:
committed by
GitHub
parent
42a673a52c
commit
37857ab956
@@ -100,10 +100,12 @@ export class ShellToolInvocation extends BaseToolInvocation<
|
||||
) {
|
||||
const command = stripShellWrapper(this.params.command);
|
||||
const rootCommands = [...new Set(getCommandRoots(command))];
|
||||
const allowRedirection = hasRedirection(command) ? true : undefined;
|
||||
|
||||
if (rootCommands.length > 0) {
|
||||
return { commandPrefix: rootCommands };
|
||||
return { commandPrefix: rootCommands, allowRedirection };
|
||||
}
|
||||
return { commandPrefix: this.params.command };
|
||||
return { commandPrefix: this.params.command, allowRedirection };
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user