mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-07 02:58:21 +00:00
fix: older responses keep a loading cursor forever after opening a chat (#31895)
Opening a chat only cleared the loading cursor on the newest response that never finished, so an older one (from a cancelled generation, or a turn an earlier Open WebUI version left unfinished) kept spinning and never showed its copy and regenerate buttons. Now, when no generation is running in the chat, every unfinished response shows as finished on load, except one waiting for the user to answer a tool's question. While a generation is running nothing changes, because another model's response to the same message may still be streaming in. Fixes #14806
This commit is contained in:
parent
7e6c8d7b6f
commit
394295ec76
1 changed files with 10 additions and 6 deletions
|
|
@ -2470,12 +2470,16 @@
|
|||
} else {
|
||||
taskIds = null;
|
||||
// No active tasks and message incomplete → generation was interrupted
|
||||
if (
|
||||
currentMessage?.role === 'assistant' &&
|
||||
!currentMessage.done &&
|
||||
!messageHasPendingAskUser(currentMessage)
|
||||
) {
|
||||
currentMessage.done = true;
|
||||
if (pendingTaskIds.length === 0) {
|
||||
for (const message of Object.values(history.messages)) {
|
||||
if (
|
||||
message?.role === 'assistant' &&
|
||||
!message.done &&
|
||||
!messageHasPendingAskUser(message)
|
||||
) {
|
||||
message.done = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue