refac: inline citation handling

This commit is contained in:
Timothy Jaeryang Baek
2025-03-03 19:48:00 -08:00
parent 3468dda556
commit d844fc7edb
2 changed files with 44 additions and 34 deletions

View File

@@ -17,6 +17,7 @@
import Collapsible from '$lib/components/common/Collapsible.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte';
import ArrowDownTray from '$lib/components/icons/ArrowDownTray.svelte';
import Source from './Source.svelte';
const dispatch = createEventDispatcher();
@@ -261,6 +262,8 @@
{@html html}
{:else if token.text.includes(`<iframe src="${WEBUI_BASE_URL}/api/v1/files/`)}
{@html `${token.text}`}
{:else if token.text.includes(`<source_id`)}
<Source {id} {token} onClick={onSourceClick} />
{:else}
{token.text}
{/if}