diff --git a/src/lib/components/playground/ChatCompletion.svelte b/src/lib/components/playground/ChatCompletion.svelte index e3d822d61..06f522199 100644 --- a/src/lib/components/playground/ChatCompletion.svelte +++ b/src/lib/components/playground/ChatCompletion.svelte @@ -2,10 +2,9 @@ import { onMount } from 'svelte'; export let messages = []; - + let textareaElement: HTMLTextAreaElement; onMount(() => { messages.forEach((message, idx) => { - let textareaElement = document.getElementById(`${message.role}-${idx}-textarea`); textareaElement.style.height = ''; textareaElement.style.height = textareaElement.scrollHeight + 'px'; }); @@ -27,16 +26,17 @@