mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-08 03:08:02 +00:00
refac
This commit is contained in:
parent
7be009649a
commit
388f62f8a0
1 changed files with 6 additions and 5 deletions
|
|
@ -555,6 +555,10 @@
|
|||
}
|
||||
} else if (type === 'context_compaction') {
|
||||
handleContextCompactionStatus(data);
|
||||
} else if (type === 'chat:active') {
|
||||
if (!data?.active) {
|
||||
taskIds = null;
|
||||
}
|
||||
} else if (type === 'chat:completion') {
|
||||
chatCompletionEventHandler(data, message, event.chat_id);
|
||||
} else if (type === 'chat:tasks:cancel') {
|
||||
|
|
@ -1614,7 +1618,6 @@
|
|||
currentChatPage.set(1);
|
||||
await chats.set(await getChatList(localStorage.token, $currentChatPage));
|
||||
}
|
||||
taskIds = null;
|
||||
};
|
||||
|
||||
const chatActionHandler = async (_chatId, actionId, modelId, responseMessageId, event = null) => {
|
||||
|
|
@ -2584,10 +2587,8 @@
|
|||
} else {
|
||||
// Backend returns task_ids (multi-model) or task_id (single model)
|
||||
const newTaskIds = res.task_ids ?? (res.task_id ? [res.task_id] : []);
|
||||
if (taskIds) {
|
||||
taskIds.push(...newTaskIds);
|
||||
} else {
|
||||
taskIds = newTaskIds;
|
||||
if (newTaskIds.length > 0) {
|
||||
taskIds = [...(taskIds ?? []), ...newTaskIds];
|
||||
}
|
||||
|
||||
// Backend returns chat_id for new chats — set store + URL.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue