MCPcopy Create free account
hub / github.com/xerrors/Yuxi / dispatch

Function dispatch

web/src/composables/useAgentRunStream.js:42–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40 let dataLines = []
41
42 const dispatch = () => {
43 if (dataLines.length === 0) return
44 const dataText = dataLines.join('\n')
45 try {
46 const parsed = JSON.parse(dataText)
47 onEvent(eventType, parsed, eventId)
48 } catch (e) {
49 console.warn('Failed to parse run SSE data:', e, dataText)
50 }
51 }
52
53 try {
54 while (true) {

Callers 1

processRunSseResponseFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected