소스 검색

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

Aiden Cline 7 달 전
부모
커밋
55895d0663
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  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) {
         for (const hook of state.hooks) {
           const fn = hook[name] as any
           const fn = hook[name] as any
           if (!fn) continue
           if (!fn) continue
-          yield* Effect.promise(() => fn(input, output))
+          yield* Effect.promise(async () => fn(input, output))
         }
         }
         return output
         return output
       })
       })