Skip to content

Commit a94fdb0

Browse files
authored
WebUI: fix edit msg form textarea height (ggml-org#20830)
* autoresize textarea on mount * allow textarea to grow to same height as rendered messages * add UI build file
1 parent c9dc433 commit a94fdb0

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

tools/server/public/index.html.gz

11 Bytes
Binary file not shown.

tools/server/webui/src/lib/components/app/chat/ChatForm/ChatFormTextarea.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
2727
onMount(() => {
2828
if (textareaElement) {
29+
autoResizeTextarea(textareaElement);
2930
textareaElement.focus();
3031
}
3132
});
@@ -50,8 +51,9 @@
5051
<textarea
5152
bind:this={textareaElement}
5253
bind:value
53-
class="text-md max-h-32 min-h-12 w-full resize-none border-0 bg-transparent p-0 leading-6 outline-none placeholder:text-muted-foreground focus-visible:ring-0 focus-visible:ring-offset-0"
54+
class="text-md min-h-12 w-full resize-none border-0 bg-transparent p-0 leading-6 outline-none placeholder:text-muted-foreground focus-visible:ring-0 focus-visible:ring-offset-0"
5455
class:cursor-not-allowed={disabled}
56+
style="max-height: var(--max-message-height);"
5557
{disabled}
5658
onkeydown={onKeydown}
5759
oninput={(event) => {

0 commit comments

Comments
 (0)