mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-28 20:49:55 +00:00
docs(core): plugin tool context updates
This commit is contained in:
parent
095328faf4
commit
b4e0cdbe8e
2 changed files with 9 additions and 5 deletions
|
|
@ -269,8 +269,9 @@ export const CustomToolsPlugin: Plugin = async (ctx) => {
|
|||
args: {
|
||||
foo: tool.schema.string(),
|
||||
},
|
||||
async execute(args, ctx) {
|
||||
return `Hello ${args.foo}!`
|
||||
async execute(args, context) {
|
||||
const { directory, worktree } = context
|
||||
return `Hello ${args.foo} from ${directory} (worktree: ${worktree})`
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue