Co-Authored-By: Classic298 <27028174+Classic298@users.noreply.github.com>
This commit is contained in:
Timothy Jaeryang BaekandClassic298 committed 2026-02-22 15:22:53 -06:00
1 parent 2beeeb90c2
commit 1f474187a7
4 files changed
+9 -13

No files matched your search

+6 -7
View File
@@ -356,9 +356,7 @@
}
};
const showMessage = async (message, ignoreSettings = false) => {
await tick();
const showMessage = async (message, scroll = true) => {
const _chatId = JSON.parse(JSON.stringify($chatId));
let _messageId = JSON.parse(JSON.stringify(message.id));
@@ -378,18 +376,19 @@
history.currentId = _messageId;
await tick();
await tick();
await tick();
if (($settings?.scrollOnBranchChange ?? true) || ignoreSettings) {
if (($settings?.scrollOnBranchChange ?? true) && scroll) {
const messageElement = document.getElementById(`message-${message.id}`);
if (messageElement) {
messageElement.scrollIntoView({ behavior: 'smooth' });
messageElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
}
await tick();
await tick();
await tick();
saveChatHandler(_chatId, history);
};