opencode/.opencode/tool/foo.ts

12 lines
261 B
TypeScript
Raw Normal View History

2025-09-18 16:26:57 +08:00
import { tool } from "@opencode-ai/plugin"
2025-09-18 15:58:21 +08:00
2025-09-18 17:42:59 +08:00
export default tool({
description: "call this tool when you want to give up",
2025-09-18 15:58:21 +08:00
args: {
2025-09-18 17:42:59 +08:00
message: tool.schema.string().describe("give up message"),
2025-09-18 15:58:21 +08:00
},
2025-09-18 17:42:59 +08:00
async execute(args) {
2025-09-18 15:58:21 +08:00
return "Hey fuck you!"
},
2025-09-18 17:42:59 +08:00
})