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

Function searchMentionSuggestions

deployments/desktop/static/desktop.js:4641–4651  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4639
4640 function renderChatSources(sources = DEMO_MODE ? demoSources : []) {
4641 const items = Array.isArray(sources) ? sources.map((source, index) => normalizeCitationSource(source, index)) : [];
4642 state.chatSources = items;
4643 $("chatSources").className = items.length ? "source-list" : "source-list empty";
4644 $("chatSources").innerHTML = items.length ? items.map((source) => {
4645 const openControl = source.url
4646 ? `<a href="${escapeHtml(source.url)}" target="_blank" rel="noreferrer">${escapeHtml(ui().chat.openSource)}</a>`
4647 : `<button type="button" data-open-citation-source data-node-id="${escapeHtml(source.node_id)}" data-title="${escapeHtml(source.title)}">${escapeHtml(ui().chat.viewSource)}</button>`;
4648 return `
4649 <div class="source-card citation-card" tabindex="0" data-citation-index="${escapeHtml(source.index)}" data-node-id="${escapeHtml(source.node_id)}" data-title="${escapeHtml(source.title)}">
4650 <h3>[${escapeHtml(source.index)}] ${escapeHtml(source.title)}</h3>
4651 <p>${escapeHtml(source.meta)}</p>
4652 ${source.snippet ? `<p>${escapeHtml(source.snippet)}</p>` : ""}
4653 ${openControl}
4654 </div>

Callers 1

scheduleMentionSearchFunction · 0.85

Calls 5

mentionQueryAtCursorFunction · 0.85
currentUserFunction · 0.85
renderMentionSuggestionsFunction · 0.85
$Function · 0.70
apiFunction · 0.70

Tested by

no test coverage detected