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

Function normalizeCitations

deployments/desktop/static/desktop.js:4204–4208  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

4202 }
4203
4204 function normalizeCitations(data) {
4205 const raw = Array.isArray(data?.citations) && data.citations.length ? data.citations : data?.sources;
4206 const items = Array.isArray(raw) ? raw : DEMO_MODE ? demoSources : [];
4207 return items.map((source, index) => normalizeCitationSource(source, index));
4208 }
4209
4210 function renderAnswerWithCitations(text, citations = []) {
4211 const refs = new Map(citations.map((citation) => [String(citation.index), citation]));

Callers 3

renderChatMessagesFunction · 0.85
processFrameFunction · 0.85
askWikiFunction · 0.85

Calls 1

normalizeCitationSourceFunction · 0.85

Tested by

no test coverage detected