aboutsummaryrefslogtreecommitdiff
path: root/opencode/tools/hello.ts
blob: 0b4931605e0a00dab5c6c946ae354cf632282943 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { tool } from "@opencode-ai/plugin"

export default tool({
  description: "Say hello to a person. Use this tool when explicitly asked to call the hello tool.",

  args: {
    name: tool.schema.string().describe("The name of the person to greet"),
  },

  async execute(args) {
    const message = `HELLO_TOOL_CALLED ${Date.now()}: Hello, ${args.name}!`
    console.error(`[hobs.nvim] hello tool called with name=${JSON.stringify(args.name)}`)
    return message
  },
})