MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / pull

Method pull

packages/baseai/src/dev/utils/stream/stream.ts:197–208  ·  view source on GitHub ↗
(ctrl: any)

Source from the content-addressed store, hash-verified

195 iter = self[Symbol.asyncIterator]();
196 },
197 async pull(ctrl: any) {
198 try {
199 const { value, done } = await iter.next();
200 if (done) return ctrl.close();
201
202 const bytes = encoder.encode(JSON.stringify(value) + '\n');
203
204 ctrl.enqueue(bytes);
205 } catch (err) {
206 ctrl.error(err);
207 }
208 },
209 async cancel() {
210 await iter.return?.();
211 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected