Files
Memoh/apps
Acbox 7de55f6b49 fix(web): prevent duplicate assistant message after refresh with tool-call sequences
When messages like [assistant(tool_calls), tool, assistant(text)] are
merged into a single ChatMessage by convertMessagesToChats, the merged
message uses the first assistant's ID. The SSE /messages/events backlog
(which uses >= for the since filter) could re-deliver the final assistant
message, and hasMessageWithId failed to recognize it because the merged
ID was different. This caused the last assistant message to appear twice
after a page refresh.

Track all original server message IDs in a Set (knownServerMessageIds)
so that hasMessageWithId can catch messages whose IDs were absorbed
during merging.
2026-03-31 18:46:48 +08:00
..
2026-03-31 15:19:53 +08:00
2026-03-31 15:19:53 +08:00