diff --git a/src/lib/components/chat/Messages/UserMessage.svelte b/src/lib/components/chat/Messages/UserMessage.svelte index af902c908..681086ff1 100644 --- a/src/lib/components/chat/Messages/UserMessage.svelte +++ b/src/lib/components/chat/Messages/UserMessage.svelte @@ -165,38 +165,6 @@
{$i18n.t('Collection')}
- {:else if file.type === 'websearch'} - {/if} {/each} diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index df43fcb5c..7c607902d 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -321,7 +321,7 @@ responseMessage.progress = $i18n.t("Searching the web for '{{searchQuery}}'", { searchQuery }); messages = messages; const searchDocument = await runWebSearch(localStorage.token, searchQuery); - if (!searchDocument) { + if (searchDocument === undefined) { toast.warning($i18n.t('No search results found')); responseMessage.progress = undefined; messages = messages; @@ -331,11 +331,12 @@ responseMessage.files = []; } responseMessage.files.push({ - collection_name: searchDocument!.collection_name, + collection_name: searchDocument.collection_name, name: searchQuery, type: 'websearch', upload_status: true, - error: '' + error: '', + urls: searchDocument.filenames, }); responseMessage.progress = undefined; messages = messages; diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index f86aaa0c3..eb48157e7 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -326,7 +326,7 @@ responseMessage.progress = $i18n.t("Searching the web for '{{searchQuery}}'", { searchQuery }); messages = messages; const searchDocument = await runWebSearch(localStorage.token, searchQuery); - if (!searchDocument) { + if (searchDocument === undefined) { toast.warning($i18n.t('No search results found')); responseMessage.progress = undefined; messages = messages; @@ -336,11 +336,12 @@ responseMessage.files = []; } responseMessage.files.push({ - collection_name: searchDocument!.collection_name, + collection_name: searchDocument.collection_name, name: searchQuery, type: 'websearch', upload_status: true, - error: '' + error: '', + urls: searchDocument.filenames, }); responseMessage.progress = undefined; messages = messages;