mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-17 12:56:41 +02:00
core: fix plugin hooks to properly handle async operations ensuring plugins can execute async code without errors (#19586)
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user