teodor-new-chat-ui 4.3.609 → 4.3.611

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
@@ -3679,9 +3679,9 @@ function Hg(e, t) {
3679
3679
  if (r === -1) return n;
3680
3680
  const o = /* @__PURE__ */ new Map();
3681
3681
  let s = 0;
3682
- for (let c = r - 1; c >= 0; c--) {
3682
+ for (let c = r; c >= 0; c--) {
3683
3683
  const l = e[c];
3684
- if (l.role === "assistant" && !fu(l))
3684
+ if (c < r && l.role === "assistant" && !fu(l))
3685
3685
  break;
3686
3686
  if (l.role === "assistant") {
3687
3687
  const u = Array.isArray(l.content) ? l.content : Array.isArray(l.parts) ? l.parts : [];
@@ -3705,7 +3705,7 @@ function Hg(e, t) {
3705
3705
  }
3706
3706
  if (o.size === 0) return n;
3707
3707
  const i = /* @__PURE__ */ new Map();
3708
- for (let c = 0; c < r; c++) {
3708
+ for (let c = r + 1; c < e.length; c++) {
3709
3709
  const l = e[c];
3710
3710
  if (l.role === "tool") {
3711
3711
  const f = ws(l).toolCallId;