MCPcopy
hub / github.com/FlowiseAI/Flowise / streamStartEvent

Method streamStartEvent

packages/server/src/utils/SSEStreamer.ts:151–163  ·  view source on GitHub ↗
(chatId: string, data: string)

Source from the content-addressed store, hash-verified

149 }
150
151 streamStartEvent(chatId: string, data: string) {
152 const client = this.clients.get(chatId)
153 // prevent multiple start events being streamed to the client
154 if (client && !client.started) {
155 const clientResponse = {
156 event: 'start',
157 data: data
158 }
159 if (this.safeWrite(chatId, 'message:\ndata:' + JSON.stringify(clientResponse) + '\n\n')) {
160 client.started = true
161 }
162 }
163 }
164
165 streamTokenEvent(chatId: string, data: string) {
166 const clientResponse = {

Callers

nothing calls this directly

Calls 3

safeWriteMethod · 0.95
stringifyMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected