diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 48f2607f0..c7104be99 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -369,59 +369,102 @@ class="prose chat-{message.role} w-full max-w-full dark:prose-invert prose-headings:my-0 prose-p:m-0 prose-p:-mb-6 prose-pre:my-0 prose-table:my-0 prose-blockquote:my-0 prose-img:my-0 prose-ul:-my-4 prose-ol:-my-4 prose-li:-my-3 prose-ul:-mb-6 prose-ol:-mb-8 prose-ol:p-0 prose-li:-mb-4 whitespace-pre-line" >
- {#if message.progress} + {#if message.progress || message.files}
-
- +
+ {/if} + {#if message.files} + {#each message.files as file} +
+ {#if file.type === 'websearch'} + + {/if}
- -
+ {/each} + {/if}
{/if} diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index 022ba81f5..a4a75c30b 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -327,11 +327,10 @@ messages = messages; return; } - const parentMessage = history.messages[parentId]; - if (!parentMessage.files) { - parentMessage.files = []; + if (!responseMessage.files) { + responseMessage.files = []; } - parentMessage.files.push({ + responseMessage.files.push({ collection_name: searchDocument!.collection_name, name: searchQuery, type: 'websearch', diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index b2cca1653..16afff36c 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -332,11 +332,10 @@ messages = messages; return; } - const parentMessage = history.messages[parentId]; - if (!parentMessage.files) { - parentMessage.files = []; + if (!responseMessage.files) { + responseMessage.files = []; } - parentMessage.files.push({ + responseMessage.files.push({ collection_name: searchDocument!.collection_name, name: searchQuery, type: 'websearch',