MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / flush

Function flush

sdk/src/impl/chatgpt-backend-fetch.ts:436–448  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

434 },
435
436 flush(controller) {
437 if (buffer.trim().startsWith('data: ')) {
438 const jsonStr = buffer.trim().slice(6).trim()
439 if (jsonStr && jsonStr !== '[DONE]') {
440 try {
441 const parsed = JSON.parse(jsonStr) as Record<string, unknown>
442 processEvent(controller, parsed)
443 } catch {
444 // skip
445 }
446 }
447 }
448 },
449 })
450}
451

Callers

nothing calls this directly

Calls 2

processEventFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected