MCPcopy Create free account
hub / github.com/anomalyco/opencode / closeScope

Function closeScope

packages/opencode/src/cli/cmd/run/stream.transport.ts:413–421  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

411 closeStream()
412 }
413 const closeScope = () => {
414 if (closed) {
415 return Effect.void
416 }
417
418 closed = true
419 stop()
420 return Scope.close(scope, Exit.void)
421 }
422
423 input.signal?.addEventListener("abort", halt, { once: true })
424 yield* Effect.addFinalizer(() => closeScope())

Callers 1

createLayerFunction · 0.85

Calls 2

stopFunction · 0.70
closeMethod · 0.45

Tested by

no test coverage detected