fix: inline citations

This commit is contained in:
Timothy Jaeryang Baek
2025-02-19 00:35:01 -08:00
parent c073b8b4ee
commit dab6396ebe
4 changed files with 11 additions and 9 deletions
@@ -29,7 +29,7 @@
{:else if token.text.includes(`<iframe src="${WEBUI_BASE_URL}/api/v1/files/`)}
{@html `${token.text}`}
{:else if token.text.includes(`<source_id`)}
<Source {token} onClick={onSourceClick} />
<Source {id} {token} onClick={onSourceClick} />
{:else}
{token.text}
{/if}
@@ -1,4 +1,5 @@
<script lang="ts">
export let id;
export let token;
export let onClick: Function = () => {};
@@ -39,7 +40,7 @@
<button
class="text-xs font-medium w-fit translate-y-[2px] px-2 py-0.5 dark:bg-white/5 dark:text-white/60 dark:hover:text-white bg-gray-50 text-black/60 hover:text-black transition rounded-lg"
on:click={() => {
onClick(attributes.data);
onClick(id, attributes.data);
}}
>
<span class="line-clamp-1">