aboutsummaryrefslogtreecommitdiff
path: root/opencode/tools/hello.ts
diff options
context:
space:
mode:
authorJosh Rahm <rahm@josher.dev>2026-08-11 11:19:51 -0600
committerJosh Rahm <rahm@josher.dev>2026-08-11 11:19:51 -0600
commit19ca36dfe8cc99321fcbde26a9387e3fac74509d (patch)
treec650df1c655df572bfaed31a0291bf84e7a036e3 /opencode/tools/hello.ts
parentd7829c069b09d2115daa1aa33a729dd9ffee301e (diff)
downloadhobs.nvim-19ca36dfe8cc99321fcbde26a9387e3fac74509d.tar.gz
hobs.nvim-19ca36dfe8cc99321fcbde26a9387e3fac74509d.tar.bz2
hobs.nvim-19ca36dfe8cc99321fcbde26a9387e3fac74509d.zip
[feat] add the opencode tools directory.HEADmain
Diffstat (limited to 'opencode/tools/hello.ts')
-rw-r--r--opencode/tools/hello.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/opencode/tools/hello.ts b/opencode/tools/hello.ts
new file mode 100644
index 0000000..0b49316
--- /dev/null
+++ b/opencode/tools/hello.ts
@@ -0,0 +1,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
+ },
+})