mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 21:32:56 -07:00
refactor(core): consolidate execute() arguments into ExecuteOptions (#25101)
This commit is contained in:
@@ -26,7 +26,6 @@ import {
|
||||
type ToolCallConfirmationDetails,
|
||||
type ToolExecuteConfirmationDetails,
|
||||
type PolicyUpdateOptions,
|
||||
type ToolLiveOutput,
|
||||
type ExecuteOptions,
|
||||
type ForcedToolDecision,
|
||||
} from './tools.js';
|
||||
@@ -434,12 +433,13 @@ export class ShellToolInvocation extends BaseToolInvocation<
|
||||
return confirmationDetails;
|
||||
}
|
||||
|
||||
async execute(
|
||||
signal: AbortSignal,
|
||||
updateOutput?: (output: ToolLiveOutput) => void,
|
||||
options?: ExecuteOptions,
|
||||
): Promise<ToolResult> {
|
||||
const { shellExecutionConfig, setExecutionIdCallback } = options ?? {};
|
||||
async execute(options: ExecuteOptions): Promise<ToolResult> {
|
||||
const {
|
||||
abortSignal: signal,
|
||||
updateOutput,
|
||||
shellExecutionConfig,
|
||||
setExecutionIdCallback,
|
||||
} = options;
|
||||
const strippedCommand = stripShellWrapper(this.params.command);
|
||||
|
||||
if (signal.aborted) {
|
||||
|
||||
Reference in New Issue
Block a user