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:
@@ -1591,9 +1591,13 @@
|
||||
// Reconcile active tasks with message state:
|
||||
// If the response is already done, remaining tasks are just background
|
||||
// work (follow-ups, title gen) that shouldn't block the input.
|
||||
const activeTaskIds = taskIds;
|
||||
const pendingTaskIds = await getTaskIdsByChatId(localStorage.token, $chatId)
|
||||
.then((res) => res?.task_ids ?? [])
|
||||
.catch(() => []);
|
||||
if (taskIds !== activeTaskIds) {
|
||||
return;
|
||||
}
|
||||
const currentMessage = history.currentId ? history.messages[history.currentId] : null;
|
||||
const responseComplete = currentMessage?.role === 'assistant' && currentMessage?.done;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user