From: Piero Evangelista Date: Sun, 26 Jul 2026 22:03:06 +0000 (-0400) Subject: ui: fix system message edit box not expanding to fit content (#26006) X-Git-Tag: upstream/0.0.10438~298 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=d4d057b6dd6a9df2a44479a68d737154600e6162;p=pkg%2Fggml%2Fsources%2Fllama.cpp ui: fix system message edit box not expanding to fit content (#26006) The in-conversation system-message edit textarea had a fixed min-height and no auto-resize, so long messages were crammed to 2 lines. Reused existing autoResizeTextarea helper on input and when the editor opens, and added max-height to cap growth. --- diff --git a/tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageSystem/ChatMessageSystem.svelte b/tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageSystem/ChatMessageSystem.svelte index 36798e228..24b3be4c5 100644 --- a/tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageSystem/ChatMessageSystem.svelte +++ b/tools/ui/src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessageSystem/ChatMessageSystem.svelte @@ -7,7 +7,7 @@ import { getMessageEditContext } from '$lib/contexts'; import { KeyboardKey, MessageRole } from '$lib/enums'; import { config } from '$lib/stores/settings.svelte'; - import { isIMEComposing } from '$lib/utils'; + import { autoResizeTextarea, isIMEComposing } from '$lib/utils'; interface Props { class?: string; @@ -91,6 +91,11 @@ resizeObserver.disconnect(); }; }); + $effect(() => { + if (editCtx.isEditing && textareaElement) { + autoResizeTextarea(textareaElement); + } + }); function toggleExpand() { isExpanded = !isExpanded; @@ -105,11 +110,15 @@ {#if editCtx.isEditing}