From 3435de5af6918cb41d3918cc0715d2f54327e53e Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 10 Nov 2024 19:24:53 -0800 Subject: [PATCH] refac: citations --- .../components/chat/Messages/Citations.svelte | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/components/chat/Messages/Citations.svelte b/src/lib/components/chat/Messages/Citations.svelte index c5a2d6ea4..b6385e2b2 100644 --- a/src/lib/components/chat/Messages/Citations.svelte +++ b/src/lib/components/chat/Messages/Citations.svelte @@ -54,7 +54,7 @@ } if (id.startsWith('http://') || id.startsWith('https://')) { - source = { name: id, ...source, url: id }; + source = { ...source, name: id, url: id }; } const existingSource = acc.find((item) => item.id === id); @@ -89,28 +89,28 @@ /> {#if _citations.length > 0} -
+
{#if _citations.length <= 3} - {#each _citations as citation, idx} -
+
+ {#each _citations as citation, idx} -
- {/each} + {/each} +
{:else}