MCPcopy Index your code
hub / github.com/CommandCodeAI/BaseAI / next

Function next

packages/baseai/src/dev/utils/stream/stream.ts:516–525  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

514 const reader = stream.getReader();
515 return {
516 async next() {
517 try {
518 const result = await reader.read();
519 if (result?.done) reader.releaseLock(); // release lock when stream becomes closed
520 return result;
521 } catch (e) {
522 reader.releaseLock(); // release lock when stream becomes errored
523 throw e;
524 }
525 },
526 async return() {
527 const cancelPromise = reader.cancel();
528 reader.releaseLock();

Callers 5

preFlightFunction · 0.50
poweredByFunction · 0.50
loggerFunction · 0.50
allowOnlyPostFunction · 0.50
debugBaseFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected