open-webui/backend
Claude 7dc4d843fa
fix(stream): harden done-detection and isolate resume seq from persisted state
Two review findings:

1. Backend: the `done:True` detection in get_event_emitter called
   `.get('done')` on whatever `event_data['data']` happened to be. For
   most event types that's a dict, but some custom/pipeline events can
   legitimately emit non-dict inner payloads (list/string/None), which
   would raise AttributeError and break emission for that event. Now
   narrowed properly:

       inner = event_data.get('data') if isinstance(event_data, dict) else None
       if isinstance(inner, dict) and inner.get('done') is True:
           ...

2. Frontend: previously stored `message.lastSeq = incomingSeq` directly
   on the message object, which is part of `history` and gets serialized
   by saveChatHandler. That leaked transport-level resume metadata into
   persisted chat state. Moved bookkeeping into a component-local
   `resumeSeqByMessageId: Map<string, number>` so it stays in memory
   only and never touches the persisted schema. All reads/writes of
   lastSeq now go through the map.
2026-04-14 21:28:03 +00:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
open_webui fix(stream): harden done-detection and isolate resume seq from persisted state 2026-04-14 21:28:03 +00:00
.dockerignore fix: litellm config issue 2024-02-24 22:35:11 -08:00
.gitignore refac 2024-09-06 04:59:20 +02:00
dev.sh refac 2026-03-24 19:43:30 -05:00
requirements-min.txt refac 2026-04-13 23:40:09 -05:00
requirements.txt refac 2026-04-13 23:40:09 -05:00
start.sh refac 2026-03-24 19:43:30 -05:00
start_windows.bat refac 2026-03-24 19:43:30 -05:00