MCPcopy Create free account
hub / github.com/Alphanimble/htmlstream / writeStreamPart

Function writeStreamPart

demo/server/openrouter-chat.ts:153–156  ·  view source on GitHub ↗
(res: ServerResponse, part: StreamPart)

Source from the content-addressed store, hash-verified

151}
152
153function writeStreamPart(res: ServerResponse, part: StreamPart): void {
154 res.write(`${JSON.stringify(part)}\n`);
155 flushResponse(res);
156}
157
158function flushResponse(res: ServerResponse): void {
159 const flushable = res as ServerResponse & { flush?: () => void };

Callers 1

pipeOpenRouterStreamFunction · 0.85

Calls 1

flushResponseFunction · 0.85

Tested by

no test coverage detected