fix(types): remove plugin context cast
This commit is contained in:
parent
1033d0c46c
commit
e2c4365fa0
1 changed files with 2 additions and 2 deletions
|
|
@ -97,11 +97,11 @@ export namespace ToolRegistry {
|
||||||
parameters: z.object(def.args),
|
parameters: z.object(def.args),
|
||||||
description: def.description,
|
description: def.description,
|
||||||
execute: async (args, toolCtx) => {
|
execute: async (args, toolCtx) => {
|
||||||
const pluginCtx = {
|
const pluginCtx: PluginToolContext = {
|
||||||
...toolCtx,
|
...toolCtx,
|
||||||
directory: ctx.directory,
|
directory: ctx.directory,
|
||||||
worktree: ctx.worktree,
|
worktree: ctx.worktree,
|
||||||
} as unknown as PluginToolContext
|
}
|
||||||
const result = await def.execute(args as any, pluginCtx)
|
const result = await def.execute(args as any, pluginCtx)
|
||||||
const out = await Truncate.output(result, {}, await Agent.get(toolCtx.agent))
|
const out = await Truncate.output(result, {}, await Agent.get(toolCtx.agent))
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue