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

Function sseResponse

test/helpers/mock-server.ts:56–64  ·  view source on GitHub ↗
(events: Array<{ data: string }>)

Source from the content-addressed store, hash-verified

54}
55
56export function sseResponse(events: Array<{ data: string }>): Response {
57 const body = events
58 .map(e => `data: ${e.data}\n\n`)
59 .join('') + 'data: [DONE]\n\n';
60
61 return new Response(body, {
62 headers: { 'Content-Type': 'text/event-stream' },
63 });
64}

Callers 2

chat.test.tsFile · 0.90
text.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected