teodor-new-chat-ui 4.3.719 → 4.3.720

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -3642,9 +3642,10 @@ function Cl(e, t) {
3642
3642
  const n = yr(t), r = n.interrupt, o = n.latest, s = mx(n.checkpoints);
3643
3643
  let i = s.length ? s : o == null ? void 0 : o.messages;
3644
3644
  if (i) {
3645
- if (e.assemblingId && !i.some((a) => a.id === e.assemblingId)) {
3646
- const a = e.messages.find((l) => l.id === e.assemblingId);
3647
- a && (i = [...i, a]);
3645
+ const a = new Set(i.map((c) => c.id)), l = e.messages.filter((c) => !a.has(c.id));
3646
+ if (l.length && (i = [...i, ...l]), e.assemblingId && !i.some((c) => c.id === e.assemblingId)) {
3647
+ const c = e.messages.find((u) => u.id === e.assemblingId);
3648
+ c && (i = [...i, c]);
3648
3649
  }
3649
3650
  i = Mo(i);
3650
3651
  } else