From d39b279684ec306cf9e826edf6f4d4a9cbdb2911 Mon Sep 17 00:00:00 2001 From: DrMelone <27028174+Classic298@users.noreply.github.com> Date: Sat, 29 Nov 2025 14:07:35 +0100 Subject: [PATCH 1/6] init impl. add webpage modal --- src/lib/components/chat/Chat.svelte | 16 ++- .../MessageInput/AttachWebpageModal.svelte | 106 ++++++++---------- .../workspace/Knowledge/KnowledgeBase.svelte | 69 +++++++++++- .../KnowledgeBase/AddContentMenu.svelte | 21 ++++ 4 files changed, 149 insertions(+), 63 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 7f80bca601..7acf3ee60e 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -2531,7 +2531,13 @@ const { type, data } = e.detail; if (type === 'web') { - await uploadWeb(data); + if (Array.isArray(data)) { + for (const url of data) { + await uploadWeb(url); + } + } else { + await uploadWeb(data); + } } else if (type === 'youtube') { await uploadYoutubeTranscription(data); } else if (type === 'google-drive') { @@ -2583,7 +2589,13 @@ const { type, data } = e.detail; if (type === 'web') { - await uploadWeb(data); + if (Array.isArray(data)) { + for (const url of data) { + await uploadWeb(url); + } + } else { + await uploadWeb(data); + } } else if (type === 'youtube') { await uploadYoutubeTranscription(data); } diff --git a/src/lib/components/chat/MessageInput/AttachWebpageModal.svelte b/src/lib/components/chat/MessageInput/AttachWebpageModal.svelte index ae6f63ef22..be085b9d20 100644 --- a/src/lib/components/chat/MessageInput/AttachWebpageModal.svelte +++ b/src/lib/components/chat/MessageInput/AttachWebpageModal.svelte @@ -1,85 +1,77 @@ - -
-
-

- {$i18n.t('Attach Webpage')} -

+ +
+
+
{$i18n.t('Attach Webpage')}
-
-
{ - e.preventDefault(); - submitHandler(); - }} - > -
- -
+
+
+ {$i18n.t('Enter one URL per line.')} +
- +