MCPcopy
hub / github.com/MiniMax-AI/cli / start

Function start

test/client/stream.test.ts:246–252  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

244 it('preserves event fields split across network chunks', async () => {
245 const body = new ReadableStream<Uint8Array>({
246 start(controller) {
247 const encoder = new TextEncoder();
248 controller.enqueue(encoder.encode('id: 7\nevent: mes'));
249 controller.enqueue(encoder.encode('sage\ndata: hel'));
250 controller.enqueue(encoder.encode('lo\n\n'));
251 controller.close();
252 },
253 });
254
255 const events = await collectEvents(new Response(body));

Callers

nothing calls this directly

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected