From dccfcc02eb16eedb2690080684fd50beb7104aee Mon Sep 17 00:00:00 2001 From: Imad Saddik Date: Sat, 20 Dec 2025 09:09:45 +0100 Subject: [PATCH] Used the new getChatWidth function in ChatForm --- .../src/lib/components/app/chat/ChatForm/ChatForm.svelte | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatForm.svelte b/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatForm.svelte index 4af4101f0a..599b49454e 100644 --- a/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatForm.svelte +++ b/tools/server/webui/src/lib/components/app/chat/ChatForm/ChatForm.svelte @@ -7,7 +7,7 @@ ChatFormHelperText, ChatFormTextarea } from '$lib/components/app'; - import { MAX_WIDTH_CLASSES, DEFAULT_MAX_WIDTH_CLASS } from '$lib/constants/width-classes'; + import { getChatWidth } from '$lib/utils/chat-width'; import { INPUT_CLASSES } from '$lib/constants/input-classes'; import { config } from '$lib/stores/settings.svelte'; import { FileTypeCategory, MimeTypeApplication } from '$lib/enums/files'; @@ -63,8 +63,8 @@ let previousIsLoading = $state(isLoading); let recordingSupported = $state(false); let textareaRef: ChatFormTextarea | undefined = $state(undefined); - let maxWidthClass = $derived( - currentConfig.responsiveChatWidth ? MAX_WIDTH_CLASSES : DEFAULT_MAX_WIDTH_CLASS + let widthConfig = $derived( + getChatWidth(currentConfig.autoChatWidth, currentConfig.customChatWidth) ); function getAcceptStringForFileType(fileType: FileTypeCategory): string { @@ -234,7 +234,8 @@