chore: format code

This commit is contained in:
GitHub Action
2025-09-22 19:59:29 +00:00
parent 6107666d04
commit 2db73c39df

View File

@@ -32,12 +32,12 @@ import { tool } from "@opencode-ai/plugin"
export default tool({ export default tool({
description: "Query the project database", description: "Query the project database",
args: { args: {
query: tool.schema.string().describe("SQL query to execute") query: tool.schema.string().describe("SQL query to execute"),
}, },
async execute(args) { async execute(args) {
// Your database logic here // Your database logic here
return `Executed query: ${args.query}` return `Executed query: ${args.query}`
} },
}) })
``` ```
@@ -63,7 +63,7 @@ import { z } from "zod"
export default { export default {
description: "Tool description", description: "Tool description",
args: { args: {
param: z.string().describe("Parameter description") param: z.string().describe("Parameter description"),
}, },
async execute(args, context) { async execute(args, context) {
// Tool implementation // Tool implementation
@@ -105,22 +105,22 @@ export const add = tool({
description: "Add two numbers", description: "Add two numbers",
args: { args: {
a: tool.schema.number().describe("First number"), a: tool.schema.number().describe("First number"),
b: tool.schema.number().describe("Second number") b: tool.schema.number().describe("Second number"),
}, },
async execute(args) { async execute(args) {
return args.a + args.b return args.a + args.b
} },
}) })
export const multiply = tool({ export const multiply = tool({
description: "Multiply two numbers", description: "Multiply two numbers",
args: { args: {
a: tool.schema.number().describe("First number"), a: tool.schema.number().describe("First number"),
b: tool.schema.number().describe("Second number") b: tool.schema.number().describe("Second number"),
}, },
async execute(args) { async execute(args) {
return args.a * args.b return args.a * args.b
} },
}) })
``` ```