MCPcopy
hub / github.com/simstudioai/sim / createRawSseResponse

Function createRawSseResponse

apps/sim/lib/copilot/request/go/stream.test.ts:70–85  ·  view source on GitHub ↗
(payload: string)

Source from the content-addressed store, hash-verified

68}
69
70function createRawSseResponse(payload: string): Response {
71 return new Response(
72 new ReadableStream<Uint8Array>({
73 start(controller) {
74 controller.enqueue(new TextEncoder().encode(payload))
75 controller.close()
76 },
77 }),
78 {
79 status: 200,
80 headers: {
81 'Content-Type': 'text/event-stream',
82 },
83 }
84 )
85}
86
87function createStreamingContext(): StreamingContext {
88 return {

Callers 1

stream.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected