refac
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte';
|
||||
import CitationModal from './Citations/CitationModal.svelte';
|
||||
import { embed, showControls, showEmbeds } from '$lib/stores';
|
||||
|
||||
import CitationModal from './Citations/CitationModal.svelte';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
export let id = '';
|
||||
export let chatId = '';
|
||||
|
||||
export let sources = [];
|
||||
export let readOnly = false;
|
||||
|
||||
@@ -35,8 +38,11 @@
|
||||
showControls.set(true);
|
||||
showEmbeds.set(true);
|
||||
embed.set({
|
||||
url: embedUrl,
|
||||
title: citations[sourceIdx]?.source?.name || 'Embedded Content',
|
||||
url: embedUrl
|
||||
source: citations[sourceIdx],
|
||||
chatId: chatId,
|
||||
messageId: id
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -824,6 +824,7 @@
|
||||
<Citations
|
||||
bind:this={citationsElement}
|
||||
id={message?.id}
|
||||
{chatId}
|
||||
sources={message?.sources ?? message?.citations}
|
||||
{readOnly}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user