MCPcopy Index your code
hub / github.com/simstudioai/sim / drainStream

Function drainStream

apps/sim/lib/copilot/request/lifecycle/start.test.ts:116–122  ·  view source on GitHub ↗
(stream: ReadableStream)

Source from the content-addressed store, hash-verified

114import { createSSEStream } from './start'
115
116async function drainStream(stream: ReadableStream) {
117 const reader = stream.getReader()
118 while (true) {
119 const { done } = await reader.read()
120 if (done) break
121 }
122}
123
124describe('createSSEStream terminal error handling', () => {
125 beforeEach(() => {

Callers 1

start.test.tsFile · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected