MCPcopy Index your code
hub / github.com/anomalyco/opencode / handler

Function handler

packages/opencode/src/control-plane/util.ts:13–22  ·  view source on GitHub ↗
(event: GlobalEvent)

Source from the content-addressed store, hash-verified

11 }
12
13 const handler = (event: GlobalEvent) => {
14 try {
15 if (!input.fn(event)) return
16 cleanup()
17 resume(Effect.void)
18 } catch (error) {
19 cleanup()
20 resume(Effect.fail(error))
21 }
22 }
23
24 const cleanup = () => {
25 clearTimeout(timeout)

Callers

nothing calls this directly

Calls 2

resumeFunction · 0.85
cleanupFunction · 0.70

Tested by

no test coverage detected