fix(coding-agent): align ToolDefinition.execute signature with AgentTool

BREAKING CHANGE: ToolDefinition.execute parameter order changed from
(id, params, onUpdate, ctx, signal) to (id, params, signal, onUpdate, ctx).

This aligns with AgentTool.execute so wrapping built-in tools no longer
requires parameter reordering. Update extensions by swapping signal and
onUpdate parameters.
This commit is contained in:
Mario Zechner 2026-02-02 00:29:47 +01:00
parent 287a0b606d
commit 0a26db53ef
17 changed files with 36 additions and 25 deletions

View file

@ -352,7 +352,7 @@ export default function antigravityImageGen(pi: ExtensionAPI) {
description:
"Generate an image via Google Antigravity image models. Returns the image as a tool result attachment. Optional saving via save=project|global|custom|none, or PI_IMAGE_SAVE_MODE/PI_IMAGE_SAVE_DIR.",
parameters: TOOL_PARAMS,
async execute(_toolCallId, params: ToolParams, onUpdate, ctx, signal) {
async execute(_toolCallId, params: ToolParams, signal, onUpdate, ctx) {
const { accessToken, projectId } = await getCredentials(ctx);
const model = params.model || DEFAULT_MODEL;
const aspectRatio = params.aspectRatio || DEFAULT_ASPECT_RATIO;