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:
@@ -127,7 +127,7 @@ export default function (pi: ExtensionAPI) {
|
||||
|
||||
pi.registerTool({
|
||||
...localRead,
|
||||
async execute(id, params, onUpdate, _ctx, signal) {
|
||||
async execute(id, params, signal, onUpdate, _ctx) {
|
||||
const ssh = getSsh();
|
||||
if (ssh) {
|
||||
const tool = createReadTool(localCwd, {
|
||||
@@ -141,7 +141,7 @@ export default function (pi: ExtensionAPI) {
|
||||
|
||||
pi.registerTool({
|
||||
...localWrite,
|
||||
async execute(id, params, onUpdate, _ctx, signal) {
|
||||
async execute(id, params, signal, onUpdate, _ctx) {
|
||||
const ssh = getSsh();
|
||||
if (ssh) {
|
||||
const tool = createWriteTool(localCwd, {
|
||||
@@ -155,7 +155,7 @@ export default function (pi: ExtensionAPI) {
|
||||
|
||||
pi.registerTool({
|
||||
...localEdit,
|
||||
async execute(id, params, onUpdate, _ctx, signal) {
|
||||
async execute(id, params, signal, onUpdate, _ctx) {
|
||||
const ssh = getSsh();
|
||||
if (ssh) {
|
||||
const tool = createEditTool(localCwd, {
|
||||
@@ -169,7 +169,7 @@ export default function (pi: ExtensionAPI) {
|
||||
|
||||
pi.registerTool({
|
||||
...localBash,
|
||||
async execute(id, params, onUpdate, _ctx, signal) {
|
||||
async execute(id, params, signal, onUpdate, _ctx) {
|
||||
const ssh = getSsh();
|
||||
if (ssh) {
|
||||
const tool = createBashTool(localCwd, {
|
||||
|
||||
Reference in New Issue
Block a user