Skip to content

Commit 5296ee0

Browse files
committed
refac
1 parent 13dfca4 commit 5296ee0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib/components/chat/Chat.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,10 +1322,6 @@
13221322
history.messages[messages.at(-1).id].childrenIds.push(userMessageId);
13231323
}
13241324
1325-
if (autoScroll) {
1326-
scrollToBottom();
1327-
}
1328-
13291325
// focus on chat input
13301326
const chatInput = document.getElementById('chat-input');
13311327
chatInput?.focus();
@@ -1341,6 +1337,10 @@
13411337
parentId: string,
13421338
{ modelId = null, modelIdx = null, newChat = false } = {}
13431339
) => {
1340+
if (autoScroll) {
1341+
scrollToBottom();
1342+
}
1343+
13441344
let _chatId = JSON.parse(JSON.stringify($chatId));
13451345
_history = JSON.parse(JSON.stringify(_history));
13461346

0 commit comments

Comments
 (0)