Timothy Jaeryang Baek 1 miesiąc temu
rodzic
commit
40d019ff50
1 zmienionych plików z 9 dodań i 0 usunięć
  1. 9 0
      src/lib/components/chat/Chat.svelte

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

@@ -1744,6 +1744,11 @@
 		history.currentId = userMessageId;
 
 		await tick();
+
+		if (autoScroll) {
+			scrollToBottom();
+		}
+
 		await sendPrompt(history, userPrompt, userMessageId);
 	};
 
@@ -1754,6 +1759,10 @@
 			let userMessage = history.messages[message.parentId];
 			let userPrompt = userMessage.content;
 
+			if (autoScroll) {
+				scrollToBottom();
+			}
+
 			if ((userMessage?.models ?? [...selectedModels]).length == 1) {
 				// If user message has only one model selected, sendPrompt automatically selects it for regeneration
 				await sendPrompt(history, userPrompt, userMessage.id);