From fe4f760b4a3aea8184ee7d397c52d267b19cb22d Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sat, 5 Apr 2025 05:57:25 -0600 Subject: [PATCH] refac --- src/lib/components/chat/Chat.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 5d7a98866..2b378271d 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -1322,6 +1322,10 @@ history.messages[messages.at(-1).id].childrenIds.push(userMessageId); } + if (autoScroll) { + scrollToBottom(); + } + // focus on chat input const chatInput = document.getElementById('chat-input'); chatInput?.focus();