fix: inline citations click issue

This commit is contained in:
Timothy Jaeryang Baek committed 2025-08-14 14:33:49 +04:00
1 parent 7dd5c957cf
commit 53f1caf91f
3 files changed
+19 -27

No files matched your search

@@ -18,6 +18,13 @@
let selectedCitation: any = null;
let isCollapsibleOpen = false;
export const showSourceModal = (sourceIdx) => {
if (citations[sourceIdx]) {
selectedCitation = citations[sourceIdx];
showCitationModal = true;
}
};
function calculateShowRelevance(sources: any[]) {
const distances = sources.flatMap((citation) => citation.distances ?? []);
const inRange = distances.filter((d) => d !== undefined && d >= -1 && d <= 1).length;