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
e9a0164690
commit
88e78b7819
1 changed files with 7 additions and 8 deletions
|
|
@ -1250,10 +1250,13 @@
|
|||
updateLastReadAt($chatId);
|
||||
}
|
||||
}
|
||||
} else if (type === 'response:completion') {
|
||||
responseCompletionEventHandler(data, message);
|
||||
} else if (type === 'chat:completion') {
|
||||
chatCompletionEventHandler(data, message, event.chat_id);
|
||||
} else if (type === 'response:completion' || type === 'chat:completion') {
|
||||
if (type === 'response:completion') {
|
||||
responseCompletionEventHandler(data, message);
|
||||
} else {
|
||||
await chatCompletionEventHandler(data, message, event.chat_id);
|
||||
}
|
||||
autoScrollToBottom();
|
||||
} else if (type === 'chat:tasks:cancel') {
|
||||
dismissContextCompactionToast();
|
||||
if (data?.output) {
|
||||
|
|
@ -2766,7 +2769,6 @@
|
|||
|
||||
history.messages[message.id] = message;
|
||||
history = history;
|
||||
autoScrollToBottom();
|
||||
};
|
||||
|
||||
const chatCompletionEventHandler = async (data, message, chatId) => {
|
||||
|
|
@ -2884,9 +2886,6 @@
|
|||
}
|
||||
|
||||
console.log(data);
|
||||
await tick();
|
||||
|
||||
autoScrollToBottom();
|
||||
};
|
||||
|
||||
//////////////////////////
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue