gongzhiyongandClaude Sonnet 4.6 e9808cc44f fix: deduplicate messages and UI cards when streamSubgraphs is true
With streamSubgraphs:true, subgraph values events push messages that
the parent Supervisor later merges, causing the same message.id to
appear multiple times in thread.messages. Similarly, the same card_id
can appear in both subgraph and parent values snapshots.

- Add deduplicateMessages() at module level: keeps the last (most
  up-to-date) copy per message.id, eliminating duplicate AI messages
  caused by subgraph-then-parent merge events.
- Apply deduplicateUiItems() to the full allUi array before per-message
  card matching, so loading→done card pairs pushed by subgraphs and
  parent are collapsed globally before orphan attribution runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 15:36:40 +08:00
S
Description
No description provided
17 MiB
Languages
TypeScript 98%
CSS 1.1%
JavaScript 0.6%
Dockerfile 0.1%