(sourcePrefs, env)
| 4873 | } |
| 4874 | } |
| 4875 | |
| 4876 | function focusCitationSource(index) { |
| 4877 | const card = document.querySelector(`#chatSources [data-citation-index="${CSS.escape(String(index))}"]`); |
| 4878 | if (!card) return; |
| 4879 | document.querySelectorAll("#chatSources .source-card.active").forEach((item) => item.classList.remove("active")); |
| 4880 | card.classList.add("active"); |
| 4881 | card.scrollIntoView({ behavior: "smooth", block: "nearest" }); |
| 4882 | window.setTimeout(() => card.classList.remove("active"), 2600); |
| 4883 | } |
| 4884 | |
| 4885 | async function openCitationSource(nodeId, title) { |
| 4886 | setView("wiki", true, { skipLoad: true }); |
| 4887 | $("wikiQuery").value = title || nodeId || ""; |
| 4888 | await searchWiki(); |
| 4889 | } |
| 4890 | |
| 4891 | function chunkText(text) { |
no test coverage detected