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

Function start

apps/sim/app/api/copilot/chat/stream/route.ts:261–266  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

259
260 const stream = new ReadableStream({
261 async start(controller) {
262 // Re-enter the root OTel context so any `withCopilotSpan` call below
263 // (inside flushEvents/checkForReplayGap/etc.) parents under
264 // copilot.resume.request instead of becoming an orphan.
265 return otelContext.with(rootContext, () => startInner(controller))
266 },
267 })
268
269 async function startInner(controller: ReadableStreamDefaultController) {

Callers

nothing calls this directly

Calls 1

startInnerFunction · 0.85

Tested by

no test coverage detected