Timothy Jaeryang Baek 5 月之前
父节点
当前提交
50c3be2136
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/lib/components/chat/Messages/CitationsModal.svelte

+ 3 - 1
src/lib/components/chat/Messages/CitationsModal.svelte

@@ -38,7 +38,9 @@
 			};
 		});
 		if (mergedDocuments.every((doc) => doc.distance !== undefined)) {
-			mergedDocuments.sort((a, b) => (a.distance ?? Infinity) - (b.distance ?? Infinity));
+			mergedDocuments = mergedDocuments.sort(
+				(a, b) => (b.distance ?? Infinity) - (a.distance ?? Infinity)
+			);
 		}
 	}
 </script>