rework custom tools

This commit is contained in:
Dax Raad
2025-09-18 05:42:59 -04:00
parent 5f2945ae71
commit 1ffc8be2b6
5 changed files with 70 additions and 49 deletions

View File

@@ -1,11 +1,11 @@
import { tool } from "@opencode-ai/plugin"
export default tool((z) => ({
description: "foo tool for fooing",
export default tool({
description: "call this tool when you want to give up",
args: {
foo: z.string().describe("foo"),
message: tool.schema.string().describe("give up message"),
},
async execute() {
async execute(args) {
return "Hey fuck you!"
},
}))
})