mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-24 03:04:21 +01:00
rework custom tools
This commit is contained in:
@@ -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!"
|
||||
},
|
||||
}))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user