MCPcopy Index your code
hub / github.com/simstudioai/sim /

Class

apps/sim/lib/copilot/request/lifecycle/start.test.ts:69–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67 SSE_RESPONSE_HEADERS: {},
68 StreamWriter: vi.fn().mockImplementation(
69 class {
70 attach = vi.fn().mockImplementation((ctrl: ReadableStreamDefaultController) => {
71 mockPublisherController = ctrl
72 })
73 startKeepalive = vi.fn()
74 stopKeepalive = vi.fn()
75 flush = vi.fn()
76 close = vi.fn().mockImplementation(() => {
77 try {
78 mockPublisherController?.close()
79 } catch {
80 // already closed
81 }
82 })
83 markDisconnected = vi.fn()
84 publish = vi.fn().mockImplementation(async (event: Record<string, unknown>) => {
85 appendEvent(event)
86 })
87 get clientDisconnected() {
88 return false
89 }
90 get sawComplete() {
91 return false
92 }
93 }
94 ),
95}))
96vi.mock('@/lib/copilot/request/session/sse', () => ({

Callers

nothing calls this directly

Calls 2

appendEventFunction · 0.85
closeMethod · 0.65

Tested by

no test coverage detected