refactor(core): replace positional execute params with ExecuteOptions bag (#22674)

This commit is contained in:
Adam Weidman
2026-03-16 17:50:24 -04:00
committed by GitHub
parent 990d010ecf
commit 605432ea70
10 changed files with 50 additions and 50 deletions

View File

@@ -22,13 +22,13 @@ import {
type ToolExecuteConfirmationDetails,
type PolicyUpdateOptions,
type ToolLiveOutput,
type ExecuteOptions,
} from './tools.js';
import { getErrorMessage } from '../utils/errors.js';
import { summarizeToolOutput } from '../utils/summarizer.js';
import {
ShellExecutionService,
type ShellExecutionConfig,
type ShellOutputEvent,
} from '../services/shellExecutionService.js';
import { formatBytes } from '../utils/formatters.js';
@@ -150,9 +150,9 @@ export class ShellToolInvocation extends BaseToolInvocation<
async execute(
signal: AbortSignal,
updateOutput?: (output: ToolLiveOutput) => void,
shellExecutionConfig?: ShellExecutionConfig,
setExecutionIdCallback?: (executionId: number) => void,
options?: ExecuteOptions,
): Promise<ToolResult> {
const { shellExecutionConfig, setExecutionIdCallback } = options ?? {};
const strippedCommand = stripShellWrapper(this.params.command);
if (signal.aborted) {