Merge pull request #12491 from open-webui/dev

refac
This commit is contained in:
Timothy Jaeryang Baek 2025-04-05 10:24:32 -07:00 committed by GitHub
commit 41aca84913
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1322,10 +1322,6 @@
history.messages[messages.at(-1).id].childrenIds.push(userMessageId); history.messages[messages.at(-1).id].childrenIds.push(userMessageId);
} }
if (autoScroll) {
scrollToBottom();
}
// focus on chat input // focus on chat input
const chatInput = document.getElementById('chat-input'); const chatInput = document.getElementById('chat-input');
chatInput?.focus(); chatInput?.focus();
@ -1341,6 +1337,10 @@
parentId: string, parentId: string,
{ modelId = null, modelIdx = null, newChat = false } = {} { modelId = null, modelIdx = null, newChat = false } = {}
) => { ) => {
if (autoScroll) {
scrollToBottom();
}
let _chatId = JSON.parse(JSON.stringify($chatId)); let _chatId = JSON.parse(JSON.stringify($chatId));
_history = JSON.parse(JSON.stringify(_history)); _history = JSON.parse(JSON.stringify(_history));