MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / streamAnswerText

Function streamAnswerText

deployments/desktop/static/desktop.js:4503–4512  ·  view source on GitHub ↗
(target, text, citations)

Source from the content-addressed store, hash-verified

4501 }
4502
4503 async function streamAnswerText(target, text, citations) {
4504 target.classList.remove("loading");
4505 let partial = "";
4506 for (const chunk of chunkText(text)) {
4507 partial += chunk;
4508 target.innerHTML = renderAnswerWithCitations(partial, citations);
4509 $("chatThread").scrollTop = $("chatThread").scrollHeight;
4510 await new Promise((resolve) => window.setTimeout(resolve, 12));
4511 }
4512 }
4513
4514 function parseSseFrame(frame) {
4515 const lines = frame.split(/\r?\n/);

Callers 1

askWikiFunction · 0.85

Calls 3

chunkTextFunction · 0.85
$Function · 0.70

Tested by

no test coverage detected