From ccbf5a08f36114a6dd297adc8653468f38fdc0db Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 6 Nov 2024 02:19:04 -0800 Subject: [PATCH] refac --- .../chat/Messages/ProfileImage.svelte | 22 ++++++++++++++----- .../chat/Messages/ProfileImageBase.svelte | 21 ------------------ .../chat/Messages/ResponseMessage.svelte | 11 ++++++---- .../chat/Messages/UserMessage.svelte | 14 +++++++----- src/lib/components/chat/Overview/Node.svelte | 6 ++--- 5 files changed, 35 insertions(+), 39 deletions(-) delete mode 100644 src/lib/components/chat/Messages/ProfileImageBase.svelte diff --git a/src/lib/components/chat/Messages/ProfileImage.svelte b/src/lib/components/chat/Messages/ProfileImage.svelte index 7161ef92c..dce2385a5 100644 --- a/src/lib/components/chat/Messages/ProfileImage.svelte +++ b/src/lib/components/chat/Messages/ProfileImage.svelte @@ -1,11 +1,21 @@ -
- -
+profile diff --git a/src/lib/components/chat/Messages/ProfileImageBase.svelte b/src/lib/components/chat/Messages/ProfileImageBase.svelte deleted file mode 100644 index dce2385a5..000000000 --- a/src/lib/components/chat/Messages/ProfileImageBase.svelte +++ /dev/null @@ -1,21 +0,0 @@ - - -profile diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 6d987e8d5..40ffc0e29 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -477,10 +477,13 @@ id="message-{message.id}" dir={$settings.chatDirection} > - +
+ +
diff --git a/src/lib/components/chat/Messages/UserMessage.svelte b/src/lib/components/chat/Messages/UserMessage.svelte index 44d1cf3da..7fad8fef1 100644 --- a/src/lib/components/chat/Messages/UserMessage.svelte +++ b/src/lib/components/chat/Messages/UserMessage.svelte @@ -88,11 +88,15 @@
{#if !($settings?.chatBubble ?? true)} - m.id === message.user)?.info?.meta?.profile_image_url ?? '/user.png') - : (user?.profile_image_url ?? '/user.png')} - /> +
+ m.id === message.user)?.info?.meta?.profile_image_url ?? + '/user.png') + : (user?.profile_image_url ?? '/user.png')} + className={'size-8'} + /> +
{/if}
{#if !($settings?.chatBubble ?? true)} diff --git a/src/lib/components/chat/Overview/Node.svelte b/src/lib/components/chat/Overview/Node.svelte index e00f53653..45afa222a 100644 --- a/src/lib/components/chat/Overview/Node.svelte +++ b/src/lib/components/chat/Overview/Node.svelte @@ -2,7 +2,7 @@ import { WEBUI_BASE_URL } from '$lib/constants'; import { Handle, Position, type NodeProps } from '@xyflow/svelte'; - import ProfileImageBase from '../Messages/ProfileImageBase.svelte'; + import ProfileImage from '../Messages/ProfileImage.svelte'; import Tooltip from '$lib/components/common/Tooltip.svelte'; import Heart from '$lib/components/icons/Heart.svelte'; @@ -20,7 +20,7 @@ > {#if data.message.role === 'user'}
- @@ -40,7 +40,7 @@
{:else}
-