Sfoglia il codice sorgente

fix(types): remove plugin context cast

Kit Langton 1 settimana fa
parent
commit
e2c4365fa0
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      packages/opencode/src/tool/registry.ts

+ 2 - 2
packages/opencode/src/tool/registry.ts

@@ -97,11 +97,11 @@ export namespace ToolRegistry {
               parameters: z.object(def.args),
               description: def.description,
               execute: async (args, toolCtx) => {
-                const pluginCtx = {
+                const pluginCtx: PluginToolContext = {
                   ...toolCtx,
                   directory: ctx.directory,
                   worktree: ctx.worktree,
-                } as unknown as PluginToolContext
+                }
                 const result = await def.execute(args as any, pluginCtx)
                 const out = await Truncate.output(result, {}, await Agent.get(toolCtx.agent))
                 return {