diff --git a/src/lib/components/chat/Messages/UserMessage.svelte b/src/lib/components/chat/Messages/UserMessage.svelte index 689008e22..e416c5510 100644 --- a/src/lib/components/chat/Messages/UserMessage.svelte +++ b/src/lib/components/chat/Messages/UserMessage.svelte @@ -55,14 +55,47 @@
+ {#if !($settings?.chatBubble ?? true)} + modelfile.tagName === message.user)?.imageUrl ?? + '/user.png' + : user?.profile_image_url ?? '/user.png'} + /> + {/if}
+ {#if !($settings?.chatBubble ?? true)} +
+ + {#if message.user} + {#if $modelfiles.map((modelfile) => modelfile.tagName).includes(message.user)} + {$modelfiles.find((modelfile) => modelfile.tagName === message.user)?.title} + {:else} + {$i18n.t('You')} + {message?.user ?? ''} + {/if} + {:else if $settings.showUsername} + {user.name} + {:else} + {$i18n.t('You')} + {/if} + + {#if message.timestamp} + + {/if} + +
+ {/if} +
{#if message.files}
{#each message.files as file} -
+
{#if file.type === 'image'} input {:else if file.type === 'doc'} @@ -185,17 +218,76 @@
{:else}
-
+
{message.content}
-
+
+ {#if !($settings?.chatBubble ?? true)} + {#if siblings.length > 1} +
+ + +
+ {siblings.indexOf(message.id) + 1}/{siblings.length} +
+ + +
+ {/if} + {/if} {#if !readOnly} -
- {siblings.indexOf(message.id) + 1}/{siblings.length} + {#if $settings?.chatBubble ?? true} + {#if siblings.length > 1} +
+ + +
+ {siblings.indexOf(message.id) + 1}/{siblings.length} +
+ +
- - -
+ {/if} {/if}
diff --git a/src/lib/components/chat/Settings/Interface.svelte b/src/lib/components/chat/Settings/Interface.svelte index 87a8d7ec5..131417f41 100644 --- a/src/lib/components/chat/Settings/Interface.svelte +++ b/src/lib/components/chat/Settings/Interface.svelte @@ -22,6 +22,7 @@ // Interface let promptSuggestions = []; let showUsername = false; + let chatBubble = true; const toggleSplitLargeChunks = async () => { splitLargeChunks = !splitLargeChunks; @@ -33,6 +34,11 @@ saveSettings({ fullScreenMode: fullScreenMode }); }; + const toggleChatBubble = async () => { + chatBubble = !chatBubble; + saveSettings({ chatBubble: chatBubble }); + }; + const toggleShowUsername = async () => { showUsername = !showUsername; saveSettings({ showUsername: showUsername }); @@ -105,6 +111,7 @@ responseAutoCopy = settings.responseAutoCopy ?? false; showUsername = settings.showUsername ?? false; + chatBubble = settings.chatBubble ?? true; fullScreenMode = settings.fullScreenMode ?? false; splitLargeChunks = settings.splitLargeChunks ?? false; }); @@ -121,6 +128,26 @@
{$i18n.t('WebUI Add-ons')}
+
+
+
{$i18n.t('Chat Bubble UI')}
+ + +
+
+
{$i18n.t('Title Auto-Generation')}
diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index b54e8d496..fdbf7509a 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -85,8 +85,6 @@ onMount(async () => { mobile.subscribe((e) => { - console.log(e); - if ($showSidebar && e) { showSidebar.set(false); } diff --git a/src/lib/components/workspace/Documents.svelte b/src/lib/components/workspace/Documents.svelte index 6b7219b2a..2f700bd0f 100644 --- a/src/lib/components/workspace/Documents.svelte +++ b/src/lib/components/workspace/Documents.svelte @@ -90,7 +90,6 @@ const onDrop = async (e) => { e.preventDefault(); - console.log(e); if (e.dataTransfer?.files) { let reader = new FileReader();