mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 08:40:58 +00:00
commit
6668d79519
@ -264,6 +264,8 @@
|
||||
messages: {},
|
||||
currentId: null
|
||||
};
|
||||
|
||||
chatFiles = [];
|
||||
params = {};
|
||||
|
||||
if ($page.url.searchParams.get('models')) {
|
||||
|
@ -566,6 +566,11 @@
|
||||
const metadata = citation.metadata?.[index];
|
||||
const id = metadata?.source ?? 'N/A';
|
||||
let source = citation?.source;
|
||||
|
||||
if (metadata?.name) {
|
||||
source = { ...source, name: metadata.name };
|
||||
}
|
||||
|
||||
// Check if ID looks like a URL
|
||||
if (id.startsWith('http://') || id.startsWith('https://')) {
|
||||
source = { name: id };
|
||||
|
@ -99,12 +99,8 @@
|
||||
<div class={$settings?.chatBubble ?? true ? 'self-end' : ''}>
|
||||
{#if file.type === 'image'}
|
||||
<img src={file.url} alt="input" class=" max-h-96 rounded-lg" draggable="false" />
|
||||
{:else if file.type === 'file'}
|
||||
<FileItem url={`${file?.url}/content`} name={file.name} type={$i18n.t('File')} />
|
||||
{:else if file.type === 'doc'}
|
||||
<FileItem url={`${file?.url}`} name={file.name} type={$i18n.t('Document')} />
|
||||
{:else if file.type === 'collection'}
|
||||
<FileItem name={file?.title ?? `#${file.name}`} type={$i18n.t('Collection')} />
|
||||
{:else}
|
||||
<FileItem url={file.url} name={file.name} type={file.type} />
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
|
Loading…
Reference in New Issue
Block a user