diff --git a/app/src/lib/components/ChatBoxAndWidget.svelte b/app/src/lib/components/ChatBoxAndWidget.svelte index e317254..e42dadc 100644 --- a/app/src/lib/components/ChatBoxAndWidget.svelte +++ b/app/src/lib/components/ChatBoxAndWidget.svelte @@ -37,6 +37,13 @@ if (!searchTerm.trim()) return; dispatch('submitSearch', { value: searchTerm }); } + + function auto_resize(element: EventTarget & HTMLTextAreaElement) { + requestAnimationFrame(() => { + element.style.height = 'auto'; + element.style.height = element.scrollHeight + 'px'; + }); + }