Fix agent tool result typing
This commit is contained in:
parent
88f26bdbee
commit
856c9a6f3d
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -107,7 +107,7 @@ function createXWorkmateArtifactsTool(api, ctx) {
|
||||
config: ctx.config ?? api.config,
|
||||
pluginConfig: api.pluginConfig,
|
||||
});
|
||||
return { content: [{ type: "text", text: payload.manifestMarkdown }] };
|
||||
return { content: [{ type: "text", text: payload.manifestMarkdown }], details: {} };
|
||||
}
|
||||
if (action === "read") {
|
||||
const payload = await readXWorkmateArtifact({
|
||||
@ -125,7 +125,7 @@ function createXWorkmateArtifactsTool(api, ctx) {
|
||||
: `\`${artifact.relativePath}\` is larger than maxInlineBytes; use the workspace path to download it directly.`,
|
||||
].join("\n")
|
||||
: payload.manifestMarkdown;
|
||||
return { content: [{ type: "text", text }] };
|
||||
return { content: [{ type: "text", text }], details: {} };
|
||||
}
|
||||
throw new Error("action must be list or read");
|
||||
},
|
||||
|
||||
6
index.ts
6
index.ts
@ -126,7 +126,7 @@ function createXWorkmateArtifactsTool(
|
||||
config: ctx.config ?? api.config,
|
||||
pluginConfig: api.pluginConfig,
|
||||
});
|
||||
return { content: [{ type: "text", text: payload.manifestMarkdown }] };
|
||||
return { content: [{ type: "text", text: payload.manifestMarkdown }], details: {} };
|
||||
}
|
||||
if (action === "read") {
|
||||
const payload = await readXWorkmateArtifact({
|
||||
@ -144,9 +144,9 @@ function createXWorkmateArtifactsTool(
|
||||
: `\`${artifact.relativePath}\` is larger than maxInlineBytes; use the workspace path to download it directly.`,
|
||||
].join("\n")
|
||||
: payload.manifestMarkdown;
|
||||
return { content: [{ type: "text", text }] };
|
||||
return { content: [{ type: "text", text }], details: {} };
|
||||
}
|
||||
throw new Error("action must be list or read");
|
||||
},
|
||||
} as AnyAgentTool;
|
||||
} as unknown as AnyAgentTool;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user