Przeglądaj źródła

core: fix plugin hooks to properly handle async operations ensuring plugins can execute async code without errors (#19586)

Aiden Cline 3 tygodni temu
rodzic
commit
55895d0663
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      packages/opencode/src/plugin/index.ts

+ 1 - 1
packages/opencode/src/plugin/index.ts

@@ -292,7 +292,7 @@ export namespace Plugin {
         for (const hook of state.hooks) {
           const fn = hook[name] as any
           if (!fn) continue
-          yield* Effect.promise(() => fn(input, output))
+          yield* Effect.promise(async () => fn(input, output))
         }
         return output
       })