MCPcopy
hub / github.com/anomalyco/opencode / readEvent

Function readEvent

packages/opencode/test/server/httpapi-v2-location.test.ts:61–65  ·  view source on GitHub ↗
(reader: AsyncIterator<typeof Event.Type>)

Source from the content-addressed store, hash-verified

59}
60
61async function readEvent(reader: AsyncIterator<typeof Event.Type>) {
62 const value = await reader.next()
63 if (value.done) throw new Error("event stream closed")
64 return value.value
65}
66
67async function readEventType(reader: AsyncIterator<typeof Event.Type>, type: string) {
68 for (let index = 0; index < 20; index++) {

Callers 2

readEventTypeFunction · 0.70

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected