diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index c63fd0243..7f3c435a4 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -264,6 +264,8 @@ messages: {}, currentId: null }; + + chatFiles = []; params = {}; if ($page.url.searchParams.get('models')) { diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index b8675a64e..a3500b77e 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -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 }; diff --git a/src/lib/components/chat/Messages/UserMessage.svelte b/src/lib/components/chat/Messages/UserMessage.svelte index 5aa06ffe0..ac36dc7fd 100644 --- a/src/lib/components/chat/Messages/UserMessage.svelte +++ b/src/lib/components/chat/Messages/UserMessage.svelte @@ -99,12 +99,8 @@
{#if file.type === 'image'} input - {:else if file.type === 'file'} - - {:else if file.type === 'doc'} - - {:else if file.type === 'collection'} - + {:else} + {/if}
{/each}