fix: tool description lost

This commit is contained in:
Simon
2025-12-24 19:28:59 +08:00
parent 0fd4eaf9af
commit 66be1e56e3
2 changed files with 1 additions and 4 deletions

View File

@@ -263,9 +263,7 @@ export class PageAgent extends EventTarget {
const tools = this.tools
const actionSchemas = Array.from(tools.entries()).map(([toolName, tool]) => {
return zod.object({
[toolName]: tool.inputSchema,
})
return zod.object({ [toolName]: tool.inputSchema }).describe(tool.description)
})
const actionSchema = zod.union(