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

Function firstText

deployments/desktop/static/desktop.js:4925–4938  ·  view source on GitHub ↗
(...values)

Source from the content-addressed store, hash-verified

4923
4924 async function streamWikiAsk(payload, answerTarget, message) {
4925 const response = await fetch("/api/wiki/ask/stream", {
4926 method: "POST",
4927 headers: { "Content-Type": "application/json" },
4928 body: JSON.stringify(payload)
4929 });
4930 if (!response.ok || !response.body) throw new Error(ui().chat.streamUnavailable);
4931
4932 const decoder = new TextDecoder();
4933 const reader = response.body.getReader();
4934 let buffer = "";
4935 let text = "";
4936 let result = {};
4937 let citations = [];
4938 let doneReceived = false;
4939
4940 const processFrame = (frame) => {
4941 if (!frame.trim()) return;

Callers 4

profileAffiliationFunction · 0.85
profileInfoItemFunction · 0.85
renderProfileInfoGridFunction · 0.85
renderProfileFormFunction · 0.85

Calls 1

splitListValueFunction · 0.85

Tested by

no test coverage detected