mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-17 23:52:29 +00:00
refac
This commit is contained in:
parent
3d6598fccb
commit
dfde08aa73
1 changed files with 4 additions and 3 deletions
|
|
@ -2460,7 +2460,7 @@
|
|||
|
||||
let scrollRAF = null;
|
||||
let contentsRAF = null;
|
||||
const scheduleResponseScrollToBottom = () => {
|
||||
const autoScrollToBottom = () => {
|
||||
if (!shouldAutoScrollResponse()) return;
|
||||
|
||||
if (!scrollRAF) {
|
||||
|
|
@ -2766,6 +2766,7 @@
|
|||
|
||||
history.messages[message.id] = message;
|
||||
history = history;
|
||||
autoScrollToBottom();
|
||||
};
|
||||
|
||||
const chatCompletionEventHandler = async (data, message, chatId) => {
|
||||
|
|
@ -2885,7 +2886,7 @@
|
|||
console.log(data);
|
||||
await tick();
|
||||
|
||||
scheduleResponseScrollToBottom();
|
||||
autoScrollToBottom();
|
||||
};
|
||||
|
||||
//////////////////////////
|
||||
|
|
@ -3931,7 +3932,7 @@
|
|||
history.messages[messageId] = message;
|
||||
}
|
||||
|
||||
scheduleResponseScrollToBottom();
|
||||
autoScrollToBottom();
|
||||
}
|
||||
|
||||
await saveChatHandler(_chatId, history);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue