refactor(core): consolidate execute() arguments into ExecuteOptions (#25101)

This commit is contained in:
Michael Bleigh
2026-04-10 10:11:17 -07:00
committed by GitHub
parent 1d36309f5f
commit 3b7c17a22c
69 changed files with 849 additions and 527 deletions
+5 -4
View File
@@ -12,6 +12,7 @@ import {
type AnyDeclarativeTool,
type ToolResult,
type ToolInvocation,
type ExecuteOptions,
} from './tools.js';
import type { Config } from '../config/config.js';
import { ApprovalMode } from '../policy/types.js';
@@ -55,10 +56,10 @@ class DiscoveredToolInvocation extends BaseToolInvocation<
return safeJsonStringify(this.params);
}
async execute(
_signal: AbortSignal,
_updateOutput?: (output: string) => void,
): Promise<ToolResult> {
async execute({
abortSignal: _signal,
updateOutput: _updateOutput,
}: ExecuteOptions): Promise<ToolResult> {
const callCommand = this.config.getToolCallCommand()!;
const args = [this.originalToolName];