docs(core): plugin tool context updates

This commit is contained in:
adamelmore 2026-01-27 06:29:14 -06:00
parent 095328faf4
commit b4e0cdbe8e
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
2 changed files with 9 additions and 5 deletions

View file

@ -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})`
},
}),
},