mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-23 09:10:55 -05:00
refac
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user