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

Function drain

packages/opencode/test/session/llm.test.ts:58–58  ·  view source on GitHub ↗
(input: LLM.StreamInput)

Source from the content-addressed store, hash-verified

56
57// LLM.stream returns a Stream, not an Effect, so we can't use the serviceUse proxy.
58const drain = (input: LLM.StreamInput) => LLM.Service.use((svc) => svc.stream(input).pipe(Stream.runDrain))
59
60// drainWith builds an isolated runtime so custom replacements fully own LLM and
61// its transitive deps.

Callers 1

llm.test.tsFile · 0.70

Calls 2

streamMethod · 0.80
useMethod · 0.45

Tested by

no test coverage detected