Timothy Jaeryang Baek 2 months ago
parent
commit
6478a50c72
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/lib/components/chat/Chat.svelte

+ 8 - 0
src/lib/components/chat/Chat.svelte

@@ -1352,6 +1352,12 @@
 			);
 
 			history.messages[message.id] = message;
+
+			await tick();
+			if (autoScroll) {
+				scrollToBottom();
+			}
+
 			await chatCompletedHandler(
 				chatId,
 				message.model,
@@ -1361,6 +1367,8 @@
 		}
 
 		console.log(data);
+		await tick();
+
 		if (autoScroll) {
 			scrollToBottom();
 		}