@8wave/ai-elements 0.121.0-beta.58 → 0.121.0-beta.59

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.
Files changed (62) hide show
  1. package/dist/ai-elements.es.js +2303 -2267
  2. package/dist/ai-elements.es.js.map +1 -1
  3. package/dist-vue/PkChatbot.js +1 -1
  4. package/dist-vue/PkChatbotEmptyState.js +1 -1
  5. package/dist-vue/PkChatbotInput.js +1 -1
  6. package/dist-vue/PkChatbotViewChat.js +1 -1
  7. package/dist-vue/PkChatbotViewConversations.js +1 -1
  8. package/dist-vue/PkChatbotViewFiles.js +1 -1
  9. package/dist-vue/PkChatbotViewProfile.js +1 -1
  10. package/dist-vue/_chunks/PkAvatar-DwtZWSW4.js +38 -0
  11. package/dist-vue/_chunks/PkAvatar-DwtZWSW4.js.map +1 -0
  12. package/dist-vue/_chunks/{PkChatbot-BjD_4yaD.js → PkChatbot-DtyJG8HB.js} +7 -8
  13. package/dist-vue/_chunks/PkChatbot-DtyJG8HB.js.map +1 -0
  14. package/dist-vue/_chunks/{PkChatbotEmptyState-CMNmmQdu.js → PkChatbotEmptyState-CivaIYxu.js} +2 -3
  15. package/dist-vue/_chunks/PkChatbotEmptyState-CivaIYxu.js.map +1 -0
  16. package/dist-vue/_chunks/{PkChatbotInput-CdpjDIzr.js → PkChatbotInput-mBl1PWIU.js} +88 -88
  17. package/dist-vue/_chunks/PkChatbotInput-mBl1PWIU.js.map +1 -0
  18. package/dist-vue/_chunks/{PkChatbotViewChat-BqFY0Evp.js → PkChatbotViewChat-ZOpF5REL.js} +248 -243
  19. package/dist-vue/_chunks/PkChatbotViewChat-ZOpF5REL.js.map +1 -0
  20. package/dist-vue/_chunks/{PkChatbotViewConversations-DF_c4X6k.js → PkChatbotViewConversations-THKK5wGp.js} +52 -34
  21. package/dist-vue/_chunks/PkChatbotViewConversations-THKK5wGp.js.map +1 -0
  22. package/dist-vue/_chunks/{PkChatbotViewFiles-B76IwGGP.js → PkChatbotViewFiles-BOGd3r0o.js} +3 -3
  23. package/dist-vue/_chunks/{PkChatbotViewFiles-B76IwGGP.js.map → PkChatbotViewFiles-BOGd3r0o.js.map} +1 -1
  24. package/dist-vue/_chunks/{PkChatbotViewProfile-Bt0eH8fO.js → PkChatbotViewProfile-XtL9RfC7.js} +3 -4
  25. package/dist-vue/_chunks/PkChatbotViewProfile-XtL9RfC7.js.map +1 -0
  26. package/dist-vue/_chunks/{createChatbotApiClient-BYGLKd_e.js → createChatbotApiClient-Bt387Z64.js} +6 -5
  27. package/dist-vue/_chunks/createChatbotApiClient-Bt387Z64.js.map +1 -0
  28. package/dist-vue/_chunks/{useChatbotStore-O0u7mVit.js → useChatbotStore-pnj_3y4N.js} +718 -687
  29. package/dist-vue/_chunks/useChatbotStore-pnj_3y4N.js.map +1 -0
  30. package/dist-vue/_chunks/useDialogConfirm-fn7iV-iE.js +86 -0
  31. package/dist-vue/_chunks/useDialogConfirm-fn7iV-iE.js.map +1 -0
  32. package/dist-vue/api.js +1 -1
  33. package/dist-vue/composables.js +12 -4
  34. package/dist-vue/composables.js.map +1 -1
  35. package/dist-vue/index.js +4252 -4009
  36. package/dist-vue/index.js.map +1 -1
  37. package/dist-vue/locales.js +22 -12
  38. package/dist-vue/packages/components/src/chat/PkAvatar.d.ts +6 -7
  39. package/dist-vue/packages/components/src/chat/PkChatSearchDialog.d.ts +19 -0
  40. package/dist-vue/packages/components/src/chat/{PkAgentSelectorInline.d.ts → PkChatShortcutsDialog.d.ts} +8 -5
  41. package/dist-vue/packages/components/src/chat/PkChatSidebar.d.ts +7 -8
  42. package/dist-vue/packages/components/src/chat/PkChatSidebarConversationItem.d.ts +2 -2
  43. package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +4 -1
  44. package/dist-vue/packages/components/src/chat/index.d.ts +1 -2
  45. package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +11 -1
  46. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +21 -3
  47. package/dist-vue/packages/composable/src/chatbot/useConversationActions.d.ts +54 -1
  48. package/dist-vue/packages/models/src/schema/Chat.d.ts +1 -0
  49. package/dist-vue/style.css +1 -1
  50. package/package.json +1 -1
  51. package/dist-vue/_chunks/PkAvatar-uVRs_DD9.js +0 -43
  52. package/dist-vue/_chunks/PkAvatar-uVRs_DD9.js.map +0 -1
  53. package/dist-vue/_chunks/PkChatbot-BjD_4yaD.js.map +0 -1
  54. package/dist-vue/_chunks/PkChatbotEmptyState-CMNmmQdu.js.map +0 -1
  55. package/dist-vue/_chunks/PkChatbotInput-CdpjDIzr.js.map +0 -1
  56. package/dist-vue/_chunks/PkChatbotViewChat-BqFY0Evp.js.map +0 -1
  57. package/dist-vue/_chunks/PkChatbotViewConversations-DF_c4X6k.js.map +0 -1
  58. package/dist-vue/_chunks/PkChatbotViewProfile-Bt0eH8fO.js.map +0 -1
  59. package/dist-vue/_chunks/createChatbotApiClient-BYGLKd_e.js.map +0 -1
  60. package/dist-vue/_chunks/useChatbotStore-O0u7mVit.js.map +0 -1
  61. package/dist-vue/_chunks/useDialogConfirm-CyD9VTKg.js +0 -84
  62. package/dist-vue/_chunks/useDialogConfirm-CyD9VTKg.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { C as e, D as t, O as n, S as r, _ as i, a, g as o, h as s, i as c, l, m as u, o as d, p as f, r as p, s as m, u as h, v as g, w as _, x as v } from "./schemas-BO5QlXAp.js";
2
2
  import { $ as y, B as b, G as ee, Q as te, W as ne, Y as re, et as ie, q as ae } from "./Agent-CZUFbLo7.js";
3
- import { r as oe, t as se } from "./createChatbotApiClient-BYGLKd_e.js";
3
+ import { r as oe, t as se } from "./createChatbotApiClient-Bt387Z64.js";
4
4
  import { n as ce } from "./src-B-ZKEhTU.js";
5
5
  import { d as le, r as ue } from "./message-DuibQyHy.js";
6
6
  import { n as de, t as fe } from "./useSafeLocalStorage-a2eHEqAi.js";
@@ -531,7 +531,7 @@ function I() {
531
531
  }
532
532
  function bt(e, t) {
533
533
  let n = { type: "array" };
534
- return e.type?._def && e.type?._def?.typeName !== "ZodAny" && (n.items = K(e.type._def, {
534
+ return e.type?._def && e.type?._def?.typeName !== "ZodAny" && (n.items = q(e.type._def, {
535
535
  ...t,
536
536
  currentPath: [...t.currentPath, "items"]
537
537
  })), e.minLength && (n.minItems = e.minLength.value), e.maxLength && (n.maxItems = e.maxLength.value), e.exactLength && (n.minItems = e.exactLength.value, n.maxItems = e.exactLength.value), n;
@@ -557,12 +557,12 @@ function L() {
557
557
  return { type: "boolean" };
558
558
  }
559
559
  function St(e, t) {
560
- return K(e.type._def, t);
560
+ return q(e.type._def, t);
561
561
  }
562
- var R = (e, t) => K(e.innerType._def, t);
563
- function Ct(e, t, n) {
562
+ var Ct = (e, t) => q(e.innerType._def, t);
563
+ function wt(e, t, n) {
564
564
  let r = n ?? t.dateStrategy;
565
- if (Array.isArray(r)) return { anyOf: r.map((n) => Ct(e, t, n)) };
565
+ if (Array.isArray(r)) return { anyOf: r.map((n) => wt(e, t, n)) };
566
566
  switch (r) {
567
567
  case "string":
568
568
  case "format:date-time": return {
@@ -573,10 +573,10 @@ function Ct(e, t, n) {
573
573
  type: "string",
574
574
  format: "date"
575
575
  };
576
- case "integer": return wt(e);
576
+ case "integer": return Tt(e);
577
577
  }
578
578
  }
579
- var wt = (e) => {
579
+ var Tt = (e) => {
580
580
  let t = {
581
581
  type: "integer",
582
582
  format: "unix-time"
@@ -589,14 +589,14 @@ var wt = (e) => {
589
589
  }
590
590
  return t;
591
591
  };
592
- function Tt(e, t) {
592
+ function Et(e, t) {
593
593
  return {
594
- ...K(e.innerType._def, t),
594
+ ...q(e.innerType._def, t),
595
595
  default: e.defaultValue()
596
596
  };
597
597
  }
598
- function Et(e, t) {
599
- return t.effectStrategy === "input" ? K(e.schema._def, t) : I();
598
+ function R(e, t) {
599
+ return t.effectStrategy === "input" ? q(e.schema._def, t) : I();
600
600
  }
601
601
  function Dt(e) {
602
602
  return {
@@ -606,14 +606,14 @@ function Dt(e) {
606
606
  }
607
607
  var Ot = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
608
608
  function kt(e, t) {
609
- let n = [K(e.left._def, {
609
+ let n = [q(e.left._def, {
610
610
  ...t,
611
611
  currentPath: [
612
612
  ...t.currentPath,
613
613
  "allOf",
614
614
  "0"
615
615
  ]
616
- }), K(e.right._def, {
616
+ }), q(e.right._def, {
617
617
  ...t,
618
618
  currentPath: [
619
619
  ...t.currentPath,
@@ -633,19 +633,19 @@ function kt(e, t) {
633
633
  }
634
634
  }), r.length ? { allOf: r } : void 0;
635
635
  }
636
- function At(e) {
636
+ function z(e) {
637
637
  let t = typeof e.value;
638
638
  return t !== "bigint" && t !== "number" && t !== "boolean" && t !== "string" ? { type: Array.isArray(e.value) ? "array" : "object" } : {
639
639
  type: t === "bigint" ? "integer" : t,
640
640
  const: e.value
641
641
  };
642
642
  }
643
- var jt = void 0, z = {
643
+ var B = void 0, V = {
644
644
  cuid: /^[cC][^\s-]{8,}$/,
645
645
  cuid2: /^[0-9a-z]+$/,
646
646
  ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
647
647
  email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}$/,
648
- emoji: () => (jt === void 0 && (jt = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), jt),
648
+ emoji: () => (B === void 0 && (B = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), B),
649
649
  uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
650
650
  ipv4: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
651
651
  ipv4Cidr: /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,
@@ -656,7 +656,7 @@ var jt = void 0, z = {
656
656
  nanoid: /^[a-zA-Z0-9_-]{21}$/,
657
657
  jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
658
658
  };
659
- function B(e, t) {
659
+ function At(e, t) {
660
660
  let n = { type: "string" };
661
661
  if (e.checks) for (let r of e.checks) switch (r.kind) {
662
662
  case "min":
@@ -668,108 +668,108 @@ function B(e, t) {
668
668
  case "email":
669
669
  switch (t.emailStrategy) {
670
670
  case "format:email":
671
- U(n, "email", r.message, t);
671
+ H(n, "email", r.message, t);
672
672
  break;
673
673
  case "format:idn-email":
674
- U(n, "idn-email", r.message, t);
674
+ H(n, "idn-email", r.message, t);
675
675
  break;
676
- case "pattern:zod": W(n, z.email, r.message, t);
676
+ case "pattern:zod": U(n, V.email, r.message, t);
677
677
  }
678
678
  break;
679
679
  case "url":
680
- U(n, "uri", r.message, t);
680
+ H(n, "uri", r.message, t);
681
681
  break;
682
682
  case "uuid":
683
- U(n, "uuid", r.message, t);
683
+ H(n, "uuid", r.message, t);
684
684
  break;
685
685
  case "regex":
686
- W(n, r.regex, r.message, t);
686
+ U(n, r.regex, r.message, t);
687
687
  break;
688
688
  case "cuid":
689
- W(n, z.cuid, r.message, t);
689
+ U(n, V.cuid, r.message, t);
690
690
  break;
691
691
  case "cuid2":
692
- W(n, z.cuid2, r.message, t);
692
+ U(n, V.cuid2, r.message, t);
693
693
  break;
694
694
  case "startsWith":
695
- W(n, RegExp(`^${V(r.value, t)}`), r.message, t);
695
+ U(n, RegExp(`^${jt(r.value, t)}`), r.message, t);
696
696
  break;
697
697
  case "endsWith":
698
- W(n, RegExp(`${V(r.value, t)}$`), r.message, t);
698
+ U(n, RegExp(`${jt(r.value, t)}$`), r.message, t);
699
699
  break;
700
700
  case "datetime":
701
- U(n, "date-time", r.message, t);
701
+ H(n, "date-time", r.message, t);
702
702
  break;
703
703
  case "date":
704
- U(n, "date", r.message, t);
704
+ H(n, "date", r.message, t);
705
705
  break;
706
706
  case "time":
707
- U(n, "time", r.message, t);
707
+ H(n, "time", r.message, t);
708
708
  break;
709
709
  case "duration":
710
- U(n, "duration", r.message, t);
710
+ H(n, "duration", r.message, t);
711
711
  break;
712
712
  case "length":
713
713
  n.minLength = typeof n.minLength == "number" ? Math.max(n.minLength, r.value) : r.value, n.maxLength = typeof n.maxLength == "number" ? Math.min(n.maxLength, r.value) : r.value;
714
714
  break;
715
715
  case "includes":
716
- W(n, RegExp(V(r.value, t)), r.message, t);
716
+ U(n, RegExp(jt(r.value, t)), r.message, t);
717
717
  break;
718
718
  case "ip":
719
- r.version !== "v6" && U(n, "ipv4", r.message, t), r.version !== "v4" && U(n, "ipv6", r.message, t);
719
+ r.version !== "v6" && H(n, "ipv4", r.message, t), r.version !== "v4" && H(n, "ipv6", r.message, t);
720
720
  break;
721
721
  case "base64url":
722
- W(n, z.base64url, r.message, t);
722
+ U(n, V.base64url, r.message, t);
723
723
  break;
724
724
  case "jwt":
725
- W(n, z.jwt, r.message, t);
725
+ U(n, V.jwt, r.message, t);
726
726
  break;
727
727
  case "cidr":
728
- r.version !== "v6" && W(n, z.ipv4Cidr, r.message, t), r.version !== "v4" && W(n, z.ipv6Cidr, r.message, t);
728
+ r.version !== "v6" && U(n, V.ipv4Cidr, r.message, t), r.version !== "v4" && U(n, V.ipv6Cidr, r.message, t);
729
729
  break;
730
730
  case "emoji":
731
- W(n, z.emoji(), r.message, t);
731
+ U(n, V.emoji(), r.message, t);
732
732
  break;
733
733
  case "ulid":
734
- W(n, z.ulid, r.message, t);
734
+ U(n, V.ulid, r.message, t);
735
735
  break;
736
736
  case "base64":
737
737
  switch (t.base64Strategy) {
738
738
  case "format:binary":
739
- U(n, "binary", r.message, t);
739
+ H(n, "binary", r.message, t);
740
740
  break;
741
741
  case "contentEncoding:base64":
742
742
  n.contentEncoding = "base64";
743
743
  break;
744
- case "pattern:zod": W(n, z.base64, r.message, t);
744
+ case "pattern:zod": U(n, V.base64, r.message, t);
745
745
  }
746
746
  break;
747
- case "nanoid": W(n, z.nanoid, r.message, t);
747
+ case "nanoid": U(n, V.nanoid, r.message, t);
748
748
  }
749
749
  return n;
750
750
  }
751
- function V(e, t) {
752
- return t.patternStrategy === "escape" ? Mt(e) : e;
751
+ function jt(e, t) {
752
+ return t.patternStrategy === "escape" ? Nt(e) : e;
753
753
  }
754
- var H = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
755
- function Mt(e) {
754
+ var Mt = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
755
+ function Nt(e) {
756
756
  let t = "";
757
- for (let n = 0; n < e.length; n++) H.has(e[n]) || (t += "\\"), t += e[n];
757
+ for (let n = 0; n < e.length; n++) Mt.has(e[n]) || (t += "\\"), t += e[n];
758
758
  return t;
759
759
  }
760
- function U(e, t, n, r) {
760
+ function H(e, t, n, r) {
761
761
  e.format || e.anyOf?.some((e) => e.format) ? (e.anyOf ||= [], e.format && (e.anyOf.push({ format: e.format }), delete e.format), e.anyOf.push({
762
762
  format: t,
763
763
  ...n && r.errorMessages && { errorMessage: { format: n } }
764
764
  })) : e.format = t;
765
765
  }
766
- function W(e, t, n, r) {
766
+ function U(e, t, n, r) {
767
767
  e.pattern || e.allOf?.some((e) => e.pattern) ? (e.allOf ||= [], e.pattern && (e.allOf.push({ pattern: e.pattern }), delete e.pattern), e.allOf.push({
768
- pattern: Nt(t, r),
768
+ pattern: W(t, r),
769
769
  ...n && r.errorMessages && { errorMessage: { pattern: n } }
770
- })) : e.pattern = Nt(t, r);
770
+ })) : e.pattern = W(t, r);
771
771
  }
772
- function Nt(e, t) {
772
+ function W(e, t) {
773
773
  if (!t.applyRegexFlags || !e.flags) return e.source;
774
774
  let n = {
775
775
  i: e.flags.includes("i"),
@@ -808,16 +808,16 @@ function Nt(e, t) {
808
808
  }
809
809
  return i;
810
810
  }
811
- function Pt(e, t) {
811
+ function G(e, t) {
812
812
  let n = {
813
813
  type: "object",
814
- additionalProperties: K(e.valueType._def, {
814
+ additionalProperties: q(e.valueType._def, {
815
815
  ...t,
816
816
  currentPath: [...t.currentPath, "additionalProperties"]
817
817
  }) ?? t.allowedAdditionalProperties
818
818
  };
819
819
  if (e.keyType?._def.typeName === "ZodString" && e.keyType._def.checks?.length) {
820
- let { type: r, ...i } = B(e.keyType._def, t);
820
+ let { type: r, ...i } = At(e.keyType._def, t);
821
821
  return {
822
822
  ...n,
823
823
  propertyNames: i
@@ -836,13 +836,13 @@ function Pt(e, t) {
836
836
  }
837
837
  return n;
838
838
  }
839
- function Ft(e, t) {
840
- return t.mapStrategy === "record" ? Pt(e, t) : {
839
+ function Pt(e, t) {
840
+ return t.mapStrategy === "record" ? G(e, t) : {
841
841
  type: "array",
842
842
  maxItems: 125,
843
843
  items: {
844
844
  type: "array",
845
- items: [K(e.keyType._def, {
845
+ items: [q(e.keyType._def, {
846
846
  ...t,
847
847
  currentPath: [
848
848
  ...t.currentPath,
@@ -850,7 +850,7 @@ function Ft(e, t) {
850
850
  "items",
851
851
  "0"
852
852
  ]
853
- }) || I(), K(e.valueType._def, {
853
+ }) || I(), q(e.valueType._def, {
854
854
  ...t,
855
855
  currentPath: [
856
856
  ...t.currentPath,
@@ -864,31 +864,31 @@ function Ft(e, t) {
864
864
  }
865
865
  };
866
866
  }
867
- function It(e) {
867
+ function Ft(e) {
868
868
  let t = e.values, n = Object.keys(e.values).filter((e) => typeof t[t[e]] != "number").map((e) => t[e]), r = Array.from(new Set(n.map((e) => typeof e)));
869
869
  return {
870
870
  type: r.length === 1 ? r[0] === "string" ? "string" : "number" : ["string", "number"],
871
871
  enum: n
872
872
  };
873
873
  }
874
- function Lt() {
874
+ function It() {
875
875
  return { not: I() };
876
876
  }
877
- function Rt() {
877
+ function Lt() {
878
878
  return { type: "null" };
879
879
  }
880
- var zt = {
880
+ var Rt = {
881
881
  ZodString: "string",
882
882
  ZodNumber: "number",
883
883
  ZodBigInt: "integer",
884
884
  ZodBoolean: "boolean",
885
885
  ZodNull: "null"
886
886
  };
887
- function Bt(e, t) {
887
+ function zt(e, t) {
888
888
  let n = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
889
- if (n.every((e) => e._def.typeName in zt && (!e._def.checks || !e._def.checks.length))) {
889
+ if (n.every((e) => e._def.typeName in Rt && (!e._def.checks || !e._def.checks.length))) {
890
890
  let e = n.reduce((e, t) => {
891
- let n = zt[t._def.typeName];
891
+ let n = Rt[t._def.typeName];
892
892
  return n && !e.includes(n) ? [...e, n] : e;
893
893
  }, []);
894
894
  return { type: e.length > 1 ? e : e[0] };
@@ -916,10 +916,10 @@ function Bt(e, t) {
916
916
  type: "string",
917
917
  enum: n.reduce((e, t) => [...e, ...t._def.values.filter((t) => !e.includes(t))], [])
918
918
  };
919
- return Vt(e, t);
919
+ return Bt(e, t);
920
920
  }
921
- var Vt = (e, t) => {
922
- let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => K(e._def, {
921
+ var Bt = (e, t) => {
922
+ let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => q(e._def, {
923
923
  ...t,
924
924
  currentPath: [
925
925
  ...t.currentPath,
@@ -929,15 +929,15 @@ var Vt = (e, t) => {
929
929
  })).filter((e) => !!e && (!t.strictUnions || typeof e == "object" && Object.keys(e).length > 0));
930
930
  return n.length ? { anyOf: n } : void 0;
931
931
  };
932
- function Ht(e, t) {
932
+ function Vt(e, t) {
933
933
  if ([
934
934
  "ZodString",
935
935
  "ZodNumber",
936
936
  "ZodBigInt",
937
937
  "ZodBoolean",
938
938
  "ZodNull"
939
- ].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return { type: [zt[e.innerType._def.typeName], "null"] };
940
- let n = K(e.innerType._def, {
939
+ ].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return { type: [Rt[e.innerType._def.typeName], "null"] };
940
+ let n = q(e.innerType._def, {
941
941
  ...t,
942
942
  currentPath: [
943
943
  ...t.currentPath,
@@ -947,7 +947,7 @@ function Ht(e, t) {
947
947
  });
948
948
  return n && { anyOf: [n, { type: "null" }] };
949
949
  }
950
- function Ut(e) {
950
+ function Ht(e) {
951
951
  let t = { type: "number" };
952
952
  if (!e.checks) return t;
953
953
  for (let n of e.checks) switch (n.kind) {
@@ -964,7 +964,7 @@ function Ut(e) {
964
964
  }
965
965
  return t;
966
966
  }
967
- function Wt(e, t) {
967
+ function Ut(e, t) {
968
968
  let n = {
969
969
  type: "object",
970
970
  properties: {}
@@ -972,7 +972,7 @@ function Wt(e, t) {
972
972
  for (let e in i) {
973
973
  let a = i[e];
974
974
  if (a === void 0 || a._def === void 0) continue;
975
- let o = Kt(a), s = K(a._def, {
975
+ let o = Gt(a), s = q(a._def, {
976
976
  ...t,
977
977
  currentPath: [
978
978
  ...t.currentPath,
@@ -988,11 +988,11 @@ function Wt(e, t) {
988
988
  s !== void 0 && (n.properties[e] = s, o || r.push(e));
989
989
  }
990
990
  r.length && (n.required = r);
991
- let a = Gt(e, t);
991
+ let a = Wt(e, t);
992
992
  return a !== void 0 && (n.additionalProperties = a), n;
993
993
  }
994
- function Gt(e, t) {
995
- if (e.catchall._def.typeName !== "ZodNever") return K(e.catchall._def, {
994
+ function Wt(e, t) {
995
+ if (e.catchall._def.typeName !== "ZodNever") return q(e.catchall._def, {
996
996
  ...t,
997
997
  currentPath: [...t.currentPath, "additionalProperties"]
998
998
  });
@@ -1002,16 +1002,16 @@ function Gt(e, t) {
1002
1002
  case "strip": return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
1003
1003
  }
1004
1004
  }
1005
- function Kt(e) {
1005
+ function Gt(e) {
1006
1006
  try {
1007
1007
  return e.isOptional();
1008
1008
  } catch {
1009
1009
  return !0;
1010
1010
  }
1011
1011
  }
1012
- var qt = (e, t) => {
1013
- if (t.currentPath.toString() === t.propertyPath?.toString()) return K(e.innerType._def, t);
1014
- let n = K(e.innerType._def, {
1012
+ var Kt = (e, t) => {
1013
+ if (t.currentPath.toString() === t.propertyPath?.toString()) return q(e.innerType._def, t);
1014
+ let n = q(e.innerType._def, {
1015
1015
  ...t,
1016
1016
  currentPath: [
1017
1017
  ...t.currentPath,
@@ -1020,10 +1020,10 @@ var qt = (e, t) => {
1020
1020
  ]
1021
1021
  });
1022
1022
  return n ? { anyOf: [{ not: I() }, n] } : I();
1023
- }, G = (e, t) => {
1024
- if (t.pipeStrategy === "input") return K(e.in._def, t);
1025
- if (t.pipeStrategy === "output") return K(e.out._def, t);
1026
- let n = K(e.in._def, {
1023
+ }, qt = (e, t) => {
1024
+ if (t.pipeStrategy === "input") return q(e.in._def, t);
1025
+ if (t.pipeStrategy === "output") return q(e.out._def, t);
1026
+ let n = q(e.in._def, {
1027
1027
  ...t,
1028
1028
  currentPath: [
1029
1029
  ...t.currentPath,
@@ -1031,7 +1031,7 @@ var qt = (e, t) => {
1031
1031
  "0"
1032
1032
  ]
1033
1033
  });
1034
- return { allOf: [n, K(e.out._def, {
1034
+ return { allOf: [n, q(e.out._def, {
1035
1035
  ...t,
1036
1036
  currentPath: [
1037
1037
  ...t.currentPath,
@@ -1041,13 +1041,13 @@ var qt = (e, t) => {
1041
1041
  })].filter((e) => e !== void 0) };
1042
1042
  };
1043
1043
  function Jt(e, t) {
1044
- return K(e.type._def, t);
1044
+ return q(e.type._def, t);
1045
1045
  }
1046
1046
  function Yt(e, t) {
1047
1047
  let n = {
1048
1048
  type: "array",
1049
1049
  uniqueItems: !0,
1050
- items: K(e.valueType._def, {
1050
+ items: q(e.valueType._def, {
1051
1051
  ...t,
1052
1052
  currentPath: [...t.currentPath, "items"]
1053
1053
  })
@@ -1058,7 +1058,7 @@ function Xt(e, t) {
1058
1058
  return e.rest ? {
1059
1059
  type: "array",
1060
1060
  minItems: e.items.length,
1061
- items: e.items.map((e, n) => K(e._def, {
1061
+ items: e.items.map((e, n) => q(e._def, {
1062
1062
  ...t,
1063
1063
  currentPath: [
1064
1064
  ...t.currentPath,
@@ -1066,7 +1066,7 @@ function Xt(e, t) {
1066
1066
  `${n}`
1067
1067
  ]
1068
1068
  })).reduce((e, t) => t === void 0 ? e : [...e, t], []),
1069
- additionalItems: K(e.rest._def, {
1069
+ additionalItems: q(e.rest._def, {
1070
1070
  ...t,
1071
1071
  currentPath: [...t.currentPath, "additionalItems"]
1072
1072
  })
@@ -1074,7 +1074,7 @@ function Xt(e, t) {
1074
1074
  type: "array",
1075
1075
  minItems: e.items.length,
1076
1076
  maxItems: e.items.length,
1077
- items: e.items.map((e, n) => K(e._def, {
1077
+ items: e.items.map((e, n) => q(e._def, {
1078
1078
  ...t,
1079
1079
  currentPath: [
1080
1080
  ...t.currentPath,
@@ -1090,41 +1090,41 @@ function Zt() {
1090
1090
  function Qt() {
1091
1091
  return I();
1092
1092
  }
1093
- var $t = (e, t) => K(e.innerType._def, t), en = (e, t, n) => {
1093
+ var $t = (e, t) => q(e.innerType._def, t), K = (e, t, n) => {
1094
1094
  switch (t) {
1095
- case "ZodString": return B(e, n);
1096
- case "ZodNumber": return Ut(e);
1097
- case "ZodObject": return Wt(e, n);
1095
+ case "ZodString": return At(e, n);
1096
+ case "ZodNumber": return Ht(e);
1097
+ case "ZodObject": return Ut(e, n);
1098
1098
  case "ZodBigInt": return xt(e);
1099
1099
  case "ZodBoolean": return L();
1100
- case "ZodDate": return Ct(e, n);
1100
+ case "ZodDate": return wt(e, n);
1101
1101
  case "ZodUndefined": return Zt();
1102
- case "ZodNull": return Rt();
1102
+ case "ZodNull": return Lt();
1103
1103
  case "ZodArray": return bt(e, n);
1104
1104
  case "ZodUnion":
1105
- case "ZodDiscriminatedUnion": return Bt(e, n);
1105
+ case "ZodDiscriminatedUnion": return zt(e, n);
1106
1106
  case "ZodIntersection": return kt(e, n);
1107
1107
  case "ZodTuple": return Xt(e, n);
1108
- case "ZodRecord": return Pt(e, n);
1109
- case "ZodLiteral": return At(e);
1108
+ case "ZodRecord": return G(e, n);
1109
+ case "ZodLiteral": return z(e);
1110
1110
  case "ZodEnum": return Dt(e);
1111
- case "ZodNativeEnum": return It(e);
1112
- case "ZodNullable": return Ht(e, n);
1113
- case "ZodOptional": return qt(e, n);
1114
- case "ZodMap": return Ft(e, n);
1111
+ case "ZodNativeEnum": return Ft(e);
1112
+ case "ZodNullable": return Vt(e, n);
1113
+ case "ZodOptional": return Kt(e, n);
1114
+ case "ZodMap": return Pt(e, n);
1115
1115
  case "ZodSet": return Yt(e, n);
1116
1116
  case "ZodLazy": return () => e.getter()._def;
1117
1117
  case "ZodPromise": return Jt(e, n);
1118
1118
  case "ZodNaN":
1119
- case "ZodNever": return Lt();
1120
- case "ZodEffects": return Et(e, n);
1119
+ case "ZodNever": return It();
1120
+ case "ZodEffects": return R(e, n);
1121
1121
  case "ZodAny": return I();
1122
1122
  case "ZodUnknown": return Qt();
1123
- case "ZodDefault": return Tt(e, n);
1123
+ case "ZodDefault": return Et(e, n);
1124
1124
  case "ZodBranded": return St(e, n);
1125
1125
  case "ZodReadonly": return $t(e, n);
1126
- case "ZodCatch": return R(e, n);
1127
- case "ZodPipeline": return G(e, n);
1126
+ case "ZodCatch": return Ct(e, n);
1127
+ case "ZodPipeline": return qt(e, n);
1128
1128
  case "ZodFunction":
1129
1129
  case "ZodVoid":
1130
1130
  case "ZodSymbol": return;
@@ -1132,19 +1132,19 @@ var $t = (e, t) => K(e.innerType._def, t), en = (e, t, n) => {
1132
1132
  /* c8 ignore next */
1133
1133
  return ((e) => void 0)(t);
1134
1134
  }
1135
- }, tn = (e, t) => {
1135
+ }, en = (e, t) => {
1136
1136
  let n = 0;
1137
1137
  for (; n < e.length && n < t.length && e[n] === t[n]; n++);
1138
1138
  return [(e.length - n).toString(), ...t.slice(n)].join("/");
1139
1139
  };
1140
- function K(e, t, n = !1) {
1140
+ function q(e, t, n = !1) {
1141
1141
  let r = t.seen.get(e);
1142
1142
  if (t.override) {
1143
1143
  let i = t.override?.(e, t, r, n);
1144
1144
  if (i !== _t) return i;
1145
1145
  }
1146
1146
  if (r && !n) {
1147
- let e = nn(r, t);
1147
+ let e = tn(r, t);
1148
1148
  if (e !== void 0) return e;
1149
1149
  }
1150
1150
  let i = {
@@ -1153,21 +1153,21 @@ function K(e, t, n = !1) {
1153
1153
  jsonSchema: void 0
1154
1154
  };
1155
1155
  t.seen.set(e, i);
1156
- let a = en(e, e.typeName, t), o = typeof a == "function" ? K(a(), t) : a;
1157
- if (o && rn(e, t, o), t.postProcess) {
1156
+ let a = K(e, e.typeName, t), o = typeof a == "function" ? q(a(), t) : a;
1157
+ if (o && nn(e, t, o), t.postProcess) {
1158
1158
  let n = t.postProcess(o, e, t);
1159
1159
  return i.jsonSchema = o, n;
1160
1160
  }
1161
1161
  return i.jsonSchema = o, o;
1162
1162
  }
1163
- var nn = (e, t) => {
1163
+ var tn = (e, t) => {
1164
1164
  switch (t.$refStrategy) {
1165
1165
  case "root": return { $ref: e.path.join("/") };
1166
- case "relative": return { $ref: tn(t.currentPath, e.path) };
1166
+ case "relative": return { $ref: en(t.currentPath, e.path) };
1167
1167
  case "none":
1168
1168
  case "seen": return e.path.length < t.currentPath.length && e.path.every((e, n) => t.currentPath[n] === e) ? (console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`), I()) : t.$refStrategy === "seen" ? I() : void 0;
1169
1169
  }
1170
- }, rn = (e, t, n) => (e.description && (n.description = e.description), n), an = (e) => {
1170
+ }, nn = (e, t, n) => (e.description && (n.description = e.description), n), rn = (e) => {
1171
1171
  let t = yt(e), n = t.name === void 0 ? t.basePath : [
1172
1172
  ...t.basePath,
1173
1173
  t.definitionPath,
@@ -1187,10 +1187,10 @@ var nn = (e, t) => {
1187
1187
  jsonSchema: void 0
1188
1188
  }]))
1189
1189
  };
1190
- }, on = (e, t) => {
1191
- let n = an(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
1190
+ }, an = (e, t) => {
1191
+ let n = rn(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
1192
1192
  ...e,
1193
- [t]: K(r._def, {
1193
+ [t]: q(r._def, {
1194
1194
  ...n,
1195
1195
  currentPath: [
1196
1196
  ...n.basePath,
@@ -1198,7 +1198,7 @@ var nn = (e, t) => {
1198
1198
  t
1199
1199
  ]
1200
1200
  }, !0) ?? I()
1201
- }), {}) : void 0, i = typeof t == "string" ? t : t?.nameStrategy === "title" ? void 0 : t?.name, a = K(e._def, i === void 0 ? n : {
1201
+ }), {}) : void 0, i = typeof t == "string" ? t : t?.nameStrategy === "title" ? void 0 : t?.name, a = q(e._def, i === void 0 ? n : {
1202
1202
  ...n,
1203
1203
  currentPath: [
1204
1204
  ...n.basePath,
@@ -1222,14 +1222,14 @@ var nn = (e, t) => {
1222
1222
  }
1223
1223
  };
1224
1224
  return s.$schema = "http://json-schema.org/draft-07/schema#", s;
1225
- }, sn = Symbol.for("vercel.ai.schema");
1226
- function cn(e) {
1225
+ }, on = Symbol.for("vercel.ai.schema");
1226
+ function sn(e) {
1227
1227
  let t;
1228
1228
  return () => (t ??= e(), t);
1229
1229
  }
1230
- function ln(e, { validate: t } = {}) {
1230
+ function cn(e, { validate: t } = {}) {
1231
1231
  return {
1232
- [sn]: !0,
1232
+ [on]: !0,
1233
1233
  _type: void 0,
1234
1234
  get jsonSchema() {
1235
1235
  return typeof e == "function" && (e = e()), e;
@@ -1237,19 +1237,19 @@ function ln(e, { validate: t } = {}) {
1237
1237
  validate: t
1238
1238
  };
1239
1239
  }
1240
- function un(e) {
1241
- return typeof e == "object" && !!e && sn in e && e[sn] === !0 && "jsonSchema" in e && "validate" in e;
1240
+ function ln(e) {
1241
+ return typeof e == "object" && !!e && on in e && e[on] === !0 && "jsonSchema" in e && "validate" in e;
1242
1242
  }
1243
- function dn(e) {
1244
- return e == null ? ln({
1243
+ function un(e) {
1244
+ return e == null ? cn({
1245
1245
  type: "object",
1246
1246
  properties: {},
1247
1247
  additionalProperties: !1
1248
- }) : un(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? gn(e) : fn(e) : e();
1248
+ }) : ln(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? gn(e) : dn(e) : e();
1249
1249
  }
1250
- function fn(e) {
1251
- return ln(() => {
1252
- if (!pn(e)) throw Error(`Standard schema vendor '${e["~standard"].vendor}' does not support JSON Schema conversion.`);
1250
+ function dn(e) {
1251
+ return cn(() => {
1252
+ if (!fn(e)) throw Error(`Standard schema vendor '${e["~standard"].vendor}' does not support JSON Schema conversion.`);
1253
1253
  return gt(e["~standard"].jsonSchema.input({ target: "draft-07" }));
1254
1254
  }, { validate: async (t) => {
1255
1255
  let n = await e["~standard"].validate(t);
@@ -1265,12 +1265,12 @@ function fn(e) {
1265
1265
  };
1266
1266
  } });
1267
1267
  }
1268
- function pn(e) {
1268
+ function fn(e) {
1269
1269
  return e["~standard"].jsonSchema != null;
1270
1270
  }
1271
- function mn(e, t) {
1271
+ function pn(e, t) {
1272
1272
  let n = t?.useReferences ?? !1;
1273
- return ln(() => on(e, { $refStrategy: n ? "root" : "none" }), { validate: async (t) => {
1273
+ return cn(() => an(e, { $refStrategy: n ? "root" : "none" }), { validate: async (t) => {
1274
1274
  let n = await e.safeParseAsync(t);
1275
1275
  return n.success ? {
1276
1276
  success: !0,
@@ -1281,9 +1281,9 @@ function mn(e, t) {
1281
1281
  };
1282
1282
  } });
1283
1283
  }
1284
- function hn(e, r) {
1284
+ function mn(e, r) {
1285
1285
  let i = r?.useReferences ?? !1;
1286
- return ln(() => gt(n(e, {
1286
+ return cn(() => gt(n(e, {
1287
1287
  target: "draft-7",
1288
1288
  io: "input",
1289
1289
  reused: i ? "ref" : "inline"
@@ -1298,11 +1298,11 @@ function hn(e, r) {
1298
1298
  };
1299
1299
  } });
1300
1300
  }
1301
- function q(e) {
1301
+ function hn(e) {
1302
1302
  return "_zod" in e;
1303
1303
  }
1304
1304
  function gn(e, t) {
1305
- return q(e) ? hn(e, t) : mn(e, t);
1305
+ return hn(e) ? mn(e, t) : pn(e, t);
1306
1306
  }
1307
1307
  async function _n({ value: e, schema: t, context: n }) {
1308
1308
  let r = await vn({
@@ -1318,7 +1318,7 @@ async function _n({ value: e, schema: t, context: n }) {
1318
1318
  return r.value;
1319
1319
  }
1320
1320
  async function vn({ value: e, schema: t, context: n }) {
1321
- let r = dn(t);
1321
+ let r = un(t);
1322
1322
  try {
1323
1323
  if (r.validate == null) return {
1324
1324
  success: !0,
@@ -1386,28 +1386,28 @@ async function xn(e) {
1386
1386
  }
1387
1387
  new TextDecoder();
1388
1388
  // ../../node_modules/.pnpm/ai@7.0.154_zod@4.6.7/node_modules/ai/dist/index.js
1389
- var Sn = "AI_InvalidArgumentError", Cn = `vercel.ai.error.${Sn}`, wn = Symbol.for(Cn), Tn = class extends w {
1389
+ var J = "AI_InvalidArgumentError", Sn = `vercel.ai.error.${J}`, Cn = Symbol.for(Sn), wn = class extends w {
1390
1390
  constructor({ parameter: e, value: t, message: n }) {
1391
1391
  super({
1392
- name: Sn,
1392
+ name: J,
1393
1393
  message: `Invalid argument for parameter ${e}: ${n}`
1394
- }), this[wn] = !0, this.parameter = e, this.value = t;
1394
+ }), this[Cn] = !0, this.parameter = e, this.value = t;
1395
1395
  }
1396
1396
  static isInstance(e) {
1397
- return w.hasMarker(e, Cn);
1397
+ return w.hasMarker(e, Sn);
1398
1398
  }
1399
- }, En = "AI_UIMessageStreamError", Dn = `vercel.ai.error.${En}`, On = Symbol.for(Dn), J = class extends w {
1399
+ }, Tn = "AI_UIMessageStreamError", En = `vercel.ai.error.${Tn}`, Dn = Symbol.for(En), Y = class extends w {
1400
1400
  constructor({ chunkType: e, chunkId: t, message: n }) {
1401
1401
  super({
1402
- name: En,
1402
+ name: Tn,
1403
1403
  message: n
1404
- }), this[On] = !0, this.chunkType = e, this.chunkId = t;
1404
+ }), this[Dn] = !0, this.chunkType = e, this.chunkId = t;
1405
1405
  }
1406
1406
  static isInstance(e) {
1407
- return w.hasMarker(e, Dn);
1407
+ return w.hasMarker(e, En);
1408
1408
  }
1409
1409
  };
1410
- function kn(e, t) {
1410
+ function On(e, t) {
1411
1411
  if (e === void 0 && t === void 0) return;
1412
1412
  if (e === void 0) return t;
1413
1413
  if (t === void 0) return e;
@@ -1416,11 +1416,11 @@ function kn(e, t) {
1416
1416
  let i = t[r];
1417
1417
  if (i === void 0) continue;
1418
1418
  let a = r in e ? e[r] : void 0, o = typeof i == "object" && !!i && !Array.isArray(i) && !(i instanceof Date) && !(i instanceof RegExp), s = typeof a == "object" && !!a && !Array.isArray(a) && !(a instanceof Date) && !(a instanceof RegExp);
1419
- n[r] = o && s ? kn(a, i) : i;
1419
+ n[r] = o && s ? On(a, i) : i;
1420
1420
  }
1421
1421
  return n;
1422
1422
  }
1423
- var Y = {
1423
+ var X = {
1424
1424
  array: d,
1425
1425
  boolean: m,
1426
1426
  custom: l,
@@ -1438,214 +1438,214 @@ var Y = {
1438
1438
  string: r,
1439
1439
  union: e,
1440
1440
  unknown: _
1441
- }, X = Y.lazy(() => Y.union([
1442
- Y.null(),
1443
- Y.string(),
1444
- Y.number(),
1445
- Y.boolean(),
1446
- Y.record(Y.string(), X.optional()),
1447
- Y.array(X)
1448
- ])), Z = Y.record(Y.string(), Y.record(Y.string(), X.optional())), An = Y.union([
1449
- Y.string(),
1450
- Y.instanceof(Uint8Array),
1451
- Y.instanceof(ArrayBuffer),
1452
- Y.custom(P, { message: "Must be a Buffer" })
1453
- ]), jn = Y.record(Y.string(), Y.string()), Mn = Y.object({
1454
- type: Y.literal("text"),
1455
- text: Y.string(),
1441
+ }, kn = X.lazy(() => X.union([
1442
+ X.null(),
1443
+ X.string(),
1444
+ X.number(),
1445
+ X.boolean(),
1446
+ X.record(X.string(), kn.optional()),
1447
+ X.array(kn)
1448
+ ])), Z = X.record(X.string(), X.record(X.string(), kn.optional())), An = X.union([
1449
+ X.string(),
1450
+ X.instanceof(Uint8Array),
1451
+ X.instanceof(ArrayBuffer),
1452
+ X.custom(P, { message: "Must be a Buffer" })
1453
+ ]), jn = X.record(X.string(), X.string()), Mn = X.object({
1454
+ type: X.literal("text"),
1455
+ text: X.string(),
1456
1456
  providerOptions: Z.optional()
1457
- }), Nn = Y.object({
1458
- type: Y.literal("image"),
1459
- image: Y.union([
1457
+ }), Nn = X.object({
1458
+ type: X.literal("image"),
1459
+ image: X.union([
1460
1460
  An,
1461
- Y.instanceof(URL),
1461
+ X.instanceof(URL),
1462
1462
  jn
1463
1463
  ]),
1464
- mediaType: Y.string().optional(),
1464
+ mediaType: X.string().optional(),
1465
1465
  providerOptions: Z.optional()
1466
- }), Pn = Y.discriminatedUnion("type", [
1467
- Y.object({
1468
- type: Y.literal("data"),
1466
+ }), Pn = X.discriminatedUnion("type", [
1467
+ X.object({
1468
+ type: X.literal("data"),
1469
1469
  data: An
1470
1470
  }),
1471
- Y.object({
1472
- type: Y.literal("url"),
1473
- url: Y.instanceof(URL)
1471
+ X.object({
1472
+ type: X.literal("url"),
1473
+ url: X.instanceof(URL)
1474
1474
  }),
1475
- Y.object({
1476
- type: Y.literal("reference"),
1475
+ X.object({
1476
+ type: X.literal("reference"),
1477
1477
  reference: jn
1478
1478
  }),
1479
- Y.object({
1480
- type: Y.literal("text"),
1481
- text: Y.string()
1479
+ X.object({
1480
+ type: X.literal("text"),
1481
+ text: X.string()
1482
1482
  })
1483
- ]), Fn = Y.discriminatedUnion("type", [Y.object({
1484
- type: Y.literal("data"),
1483
+ ]), Fn = X.discriminatedUnion("type", [X.object({
1484
+ type: X.literal("data"),
1485
1485
  data: An
1486
- }), Y.object({
1487
- type: Y.literal("url"),
1488
- url: Y.instanceof(URL)
1489
- })]), In = Y.object({
1490
- type: Y.literal("file"),
1491
- data: Y.union([
1486
+ }), X.object({
1487
+ type: X.literal("url"),
1488
+ url: X.instanceof(URL)
1489
+ })]), In = X.object({
1490
+ type: X.literal("file"),
1491
+ data: X.union([
1492
1492
  Pn,
1493
1493
  An,
1494
- Y.instanceof(URL),
1494
+ X.instanceof(URL),
1495
1495
  jn
1496
1496
  ]),
1497
- filename: Y.string().optional(),
1498
- mediaType: Y.string(),
1497
+ filename: X.string().optional(),
1498
+ mediaType: X.string(),
1499
1499
  providerOptions: Z.optional()
1500
- }), Ln = Y.object({
1501
- type: Y.literal("reasoning"),
1502
- text: Y.string(),
1500
+ }), Ln = X.object({
1501
+ type: X.literal("reasoning"),
1502
+ text: X.string(),
1503
1503
  providerOptions: Z.optional()
1504
- }), Rn = Y.object({
1505
- type: Y.literal("custom"),
1506
- kind: Y.string().transform((e) => e),
1504
+ }), Rn = X.object({
1505
+ type: X.literal("custom"),
1506
+ kind: X.string().transform((e) => e),
1507
1507
  providerOptions: Z.optional()
1508
- }), zn = Y.object({
1509
- type: Y.literal("reasoning-file"),
1510
- data: Y.union([
1508
+ }), zn = X.object({
1509
+ type: X.literal("reasoning-file"),
1510
+ data: X.union([
1511
1511
  Fn,
1512
1512
  An,
1513
- Y.instanceof(URL)
1513
+ X.instanceof(URL)
1514
1514
  ]),
1515
- mediaType: Y.string(),
1515
+ mediaType: X.string(),
1516
1516
  providerOptions: Z.optional()
1517
- }), Bn = Y.object({
1518
- type: Y.literal("tool-call"),
1519
- toolCallId: Y.string(),
1520
- toolName: Y.string(),
1521
- input: Y.unknown(),
1517
+ }), Bn = X.object({
1518
+ type: X.literal("tool-call"),
1519
+ toolCallId: X.string(),
1520
+ toolName: X.string(),
1521
+ input: X.unknown(),
1522
1522
  providerOptions: Z.optional(),
1523
- providerExecuted: Y.boolean().optional()
1524
- }), Vn = Y.discriminatedUnion("type", [
1525
- Y.object({
1526
- type: Y.literal("text"),
1527
- value: Y.string(),
1523
+ providerExecuted: X.boolean().optional()
1524
+ }), Vn = X.discriminatedUnion("type", [
1525
+ X.object({
1526
+ type: X.literal("text"),
1527
+ value: X.string(),
1528
1528
  providerOptions: Z.optional()
1529
1529
  }),
1530
- Y.object({
1531
- type: Y.literal("json"),
1532
- value: X,
1530
+ X.object({
1531
+ type: X.literal("json"),
1532
+ value: kn,
1533
1533
  providerOptions: Z.optional()
1534
1534
  }),
1535
- Y.object({
1536
- type: Y.literal("execution-denied"),
1537
- reason: Y.string().optional(),
1535
+ X.object({
1536
+ type: X.literal("execution-denied"),
1537
+ reason: X.string().optional(),
1538
1538
  providerOptions: Z.optional()
1539
1539
  }),
1540
- Y.object({
1541
- type: Y.literal("error-text"),
1542
- value: Y.string(),
1540
+ X.object({
1541
+ type: X.literal("error-text"),
1542
+ value: X.string(),
1543
1543
  providerOptions: Z.optional()
1544
1544
  }),
1545
- Y.object({
1546
- type: Y.literal("error-json"),
1547
- value: X,
1545
+ X.object({
1546
+ type: X.literal("error-json"),
1547
+ value: kn,
1548
1548
  providerOptions: Z.optional()
1549
1549
  }),
1550
- Y.object({
1551
- type: Y.literal("content"),
1552
- value: Y.array(Y.union([
1553
- Y.object({
1554
- type: Y.literal("text"),
1555
- text: Y.string(),
1550
+ X.object({
1551
+ type: X.literal("content"),
1552
+ value: X.array(X.union([
1553
+ X.object({
1554
+ type: X.literal("text"),
1555
+ text: X.string(),
1556
1556
  providerOptions: Z.optional()
1557
1557
  }),
1558
- Y.object({
1559
- type: Y.literal("file"),
1558
+ X.object({
1559
+ type: X.literal("file"),
1560
1560
  data: Pn,
1561
- mediaType: Y.string(),
1562
- filename: Y.string().optional(),
1561
+ mediaType: X.string(),
1562
+ filename: X.string().optional(),
1563
1563
  providerOptions: Z.optional()
1564
1564
  }),
1565
- Y.object({
1566
- type: Y.literal("file-data"),
1567
- data: Y.string(),
1568
- mediaType: Y.string(),
1569
- filename: Y.string().optional(),
1565
+ X.object({
1566
+ type: X.literal("file-data"),
1567
+ data: X.string(),
1568
+ mediaType: X.string(),
1569
+ filename: X.string().optional(),
1570
1570
  providerOptions: Z.optional()
1571
1571
  }),
1572
- Y.object({
1573
- type: Y.literal("file-url"),
1574
- url: Y.string(),
1575
- mediaType: Y.string().optional(),
1572
+ X.object({
1573
+ type: X.literal("file-url"),
1574
+ url: X.string(),
1575
+ mediaType: X.string().optional(),
1576
1576
  providerOptions: Z.optional()
1577
1577
  }),
1578
- Y.object({
1579
- type: Y.literal("file-id"),
1580
- fileId: Y.union([Y.string(), Y.record(Y.string(), Y.string())]),
1578
+ X.object({
1579
+ type: X.literal("file-id"),
1580
+ fileId: X.union([X.string(), X.record(X.string(), X.string())]),
1581
1581
  providerOptions: Z.optional()
1582
1582
  }),
1583
- Y.object({
1584
- type: Y.literal("file-reference"),
1585
- providerReference: Y.record(Y.string(), Y.string()),
1583
+ X.object({
1584
+ type: X.literal("file-reference"),
1585
+ providerReference: X.record(X.string(), X.string()),
1586
1586
  providerOptions: Z.optional()
1587
1587
  }),
1588
- Y.object({
1589
- type: Y.literal("image-data"),
1590
- data: Y.string(),
1591
- mediaType: Y.string(),
1588
+ X.object({
1589
+ type: X.literal("image-data"),
1590
+ data: X.string(),
1591
+ mediaType: X.string(),
1592
1592
  providerOptions: Z.optional()
1593
1593
  }),
1594
- Y.object({
1595
- type: Y.literal("image-url"),
1596
- url: Y.string(),
1594
+ X.object({
1595
+ type: X.literal("image-url"),
1596
+ url: X.string(),
1597
1597
  providerOptions: Z.optional()
1598
1598
  }),
1599
- Y.object({
1600
- type: Y.literal("image-file-id"),
1601
- fileId: Y.union([Y.string(), Y.record(Y.string(), Y.string())]),
1599
+ X.object({
1600
+ type: X.literal("image-file-id"),
1601
+ fileId: X.union([X.string(), X.record(X.string(), X.string())]),
1602
1602
  providerOptions: Z.optional()
1603
1603
  }),
1604
- Y.object({
1605
- type: Y.literal("image-file-reference"),
1606
- providerReference: Y.record(Y.string(), Y.string()),
1604
+ X.object({
1605
+ type: X.literal("image-file-reference"),
1606
+ providerReference: X.record(X.string(), X.string()),
1607
1607
  providerOptions: Z.optional()
1608
1608
  }),
1609
- Y.object({
1610
- type: Y.literal("custom"),
1609
+ X.object({
1610
+ type: X.literal("custom"),
1611
1611
  providerOptions: Z.optional()
1612
1612
  })
1613
1613
  ]))
1614
1614
  })
1615
- ]), Hn = Y.object({
1616
- type: Y.literal("tool-result"),
1617
- toolCallId: Y.string(),
1618
- toolName: Y.string(),
1615
+ ]), Hn = X.object({
1616
+ type: X.literal("tool-result"),
1617
+ toolCallId: X.string(),
1618
+ toolName: X.string(),
1619
1619
  output: Vn,
1620
1620
  providerOptions: Z.optional()
1621
- }), Un = Y.object({
1622
- type: Y.literal("tool-approval-request"),
1623
- approvalId: Y.string(),
1624
- toolCallId: Y.string(),
1625
- reason: Y.string().optional(),
1626
- isAutomatic: Y.boolean().optional(),
1627
- signature: Y.string().optional(),
1628
- inputSchemaInput: Y.unknown().optional()
1629
- }), Wn = Y.object({
1630
- type: Y.literal("tool-approval-response"),
1631
- approvalId: Y.string(),
1632
- approved: Y.boolean(),
1633
- reason: Y.string().optional()
1634
- }), Gn = Y.object({
1635
- role: Y.literal("system"),
1636
- content: Y.string(),
1621
+ }), Un = X.object({
1622
+ type: X.literal("tool-approval-request"),
1623
+ approvalId: X.string(),
1624
+ toolCallId: X.string(),
1625
+ reason: X.string().optional(),
1626
+ isAutomatic: X.boolean().optional(),
1627
+ signature: X.string().optional(),
1628
+ inputSchemaInput: X.unknown().optional()
1629
+ }), Wn = X.object({
1630
+ type: X.literal("tool-approval-response"),
1631
+ approvalId: X.string(),
1632
+ approved: X.boolean(),
1633
+ reason: X.string().optional()
1634
+ }), Gn = X.object({
1635
+ role: X.literal("system"),
1636
+ content: X.string(),
1637
1637
  providerOptions: Z.optional()
1638
- }), Kn = Y.object({
1639
- role: Y.literal("user"),
1640
- content: Y.union([Y.string(), Y.array(Y.union([
1638
+ }), Kn = X.object({
1639
+ role: X.literal("user"),
1640
+ content: X.union([X.string(), X.array(X.union([
1641
1641
  Mn,
1642
1642
  Nn,
1643
1643
  In
1644
1644
  ]))]),
1645
1645
  providerOptions: Z.optional()
1646
- }), qn = Y.object({
1647
- role: Y.literal("assistant"),
1648
- content: Y.union([Y.string(), Y.array(Y.union([
1646
+ }), qn = X.object({
1647
+ role: X.literal("assistant"),
1648
+ content: X.union([X.string(), X.array(X.union([
1649
1649
  Mn,
1650
1650
  Rn,
1651
1651
  In,
@@ -1656,12 +1656,12 @@ var Y = {
1656
1656
  Un
1657
1657
  ]))]),
1658
1658
  providerOptions: Z.optional()
1659
- }), Jn = Y.object({
1660
- role: Y.literal("tool"),
1661
- content: Y.array(Y.union([Hn, Wn])),
1659
+ }), Jn = X.object({
1660
+ role: X.literal("tool"),
1661
+ content: X.array(X.union([Hn, Wn])),
1662
1662
  providerOptions: Z.optional()
1663
1663
  });
1664
- Y.union([
1664
+ X.union([
1665
1665
  Gn,
1666
1666
  Kn,
1667
1667
  qn,
@@ -1876,193 +1876,193 @@ N({
1876
1876
  prefix: "call",
1877
1877
  size: 24
1878
1878
  }), TransformStream;
1879
- var Zn = Y.object({
1880
- source: Y.discriminatedUnion("sourceType", [Y.object({
1881
- type: Y.literal("source"),
1882
- sourceType: Y.literal("url"),
1883
- id: Y.string(),
1884
- url: Y.string(),
1885
- title: Y.string().optional(),
1879
+ var Zn = X.object({
1880
+ source: X.discriminatedUnion("sourceType", [X.object({
1881
+ type: X.literal("source"),
1882
+ sourceType: X.literal("url"),
1883
+ id: X.string(),
1884
+ url: X.string(),
1885
+ title: X.string().optional(),
1886
1886
  providerMetadata: Z.optional()
1887
- }), Y.object({
1888
- type: Y.literal("source"),
1889
- sourceType: Y.literal("document"),
1890
- id: Y.string(),
1891
- mediaType: Y.string(),
1892
- title: Y.string(),
1893
- filename: Y.string().optional(),
1887
+ }), X.object({
1888
+ type: X.literal("source"),
1889
+ sourceType: X.literal("document"),
1890
+ id: X.string(),
1891
+ mediaType: X.string(),
1892
+ title: X.string(),
1893
+ filename: X.string().optional(),
1894
1894
  providerMetadata: Z.optional()
1895
1895
  })]),
1896
- startIndex: Y.number().int().nonnegative().optional(),
1897
- endIndex: Y.number().int().nonnegative().optional(),
1898
- citedText: Y.string().optional()
1899
- }), Qn = Y.record(Y.string(), X.optional()), $n = cn(() => gn(Y.union([
1900
- Y.looseObject({
1901
- type: Y.literal("text-start"),
1902
- id: Y.string(),
1896
+ startIndex: X.number().int().nonnegative().optional(),
1897
+ endIndex: X.number().int().nonnegative().optional(),
1898
+ citedText: X.string().optional()
1899
+ }), Qn = X.record(X.string(), kn.optional()), $n = sn(() => gn(X.union([
1900
+ X.looseObject({
1901
+ type: X.literal("text-start"),
1902
+ id: X.string(),
1903
1903
  providerMetadata: Z.optional()
1904
1904
  }),
1905
- Y.looseObject({
1906
- type: Y.literal("text-delta"),
1907
- id: Y.string(),
1908
- delta: Y.string(),
1905
+ X.looseObject({
1906
+ type: X.literal("text-delta"),
1907
+ id: X.string(),
1908
+ delta: X.string(),
1909
1909
  providerMetadata: Z.optional()
1910
1910
  }),
1911
- Y.looseObject({
1912
- type: Y.literal("text-end"),
1913
- id: Y.string(),
1914
- citations: Y.array(Zn).optional(),
1911
+ X.looseObject({
1912
+ type: X.literal("text-end"),
1913
+ id: X.string(),
1914
+ citations: X.array(Zn).optional(),
1915
1915
  providerMetadata: Z.optional()
1916
1916
  }),
1917
- Y.looseObject({
1918
- type: Y.literal("error"),
1919
- errorText: Y.string()
1917
+ X.looseObject({
1918
+ type: X.literal("error"),
1919
+ errorText: X.string()
1920
1920
  }),
1921
- Y.looseObject({
1922
- type: Y.literal("tool-input-start"),
1923
- toolCallId: Y.string(),
1924
- toolName: Y.string(),
1925
- inputEncoding: Y.enum(["json", "text"]).optional(),
1926
- providerExecuted: Y.boolean().optional(),
1921
+ X.looseObject({
1922
+ type: X.literal("tool-input-start"),
1923
+ toolCallId: X.string(),
1924
+ toolName: X.string(),
1925
+ inputEncoding: X.enum(["json", "text"]).optional(),
1926
+ providerExecuted: X.boolean().optional(),
1927
1927
  providerMetadata: Z.optional(),
1928
1928
  toolMetadata: Qn.optional(),
1929
- dynamic: Y.boolean().optional(),
1930
- title: Y.string().optional()
1929
+ dynamic: X.boolean().optional(),
1930
+ title: X.string().optional()
1931
1931
  }),
1932
- Y.looseObject({
1933
- type: Y.literal("tool-input-delta"),
1934
- toolCallId: Y.string(),
1935
- inputTextDelta: Y.string()
1932
+ X.looseObject({
1933
+ type: X.literal("tool-input-delta"),
1934
+ toolCallId: X.string(),
1935
+ inputTextDelta: X.string()
1936
1936
  }),
1937
- Y.looseObject({
1938
- type: Y.literal("tool-input-available"),
1939
- toolCallId: Y.string(),
1940
- toolName: Y.string(),
1941
- input: Y.unknown(),
1942
- providerExecuted: Y.boolean().optional(),
1937
+ X.looseObject({
1938
+ type: X.literal("tool-input-available"),
1939
+ toolCallId: X.string(),
1940
+ toolName: X.string(),
1941
+ input: X.unknown(),
1942
+ providerExecuted: X.boolean().optional(),
1943
1943
  providerMetadata: Z.optional(),
1944
1944
  toolMetadata: Qn.optional(),
1945
- dynamic: Y.boolean().optional(),
1946
- title: Y.string().optional()
1945
+ dynamic: X.boolean().optional(),
1946
+ title: X.string().optional()
1947
1947
  }),
1948
- Y.looseObject({
1949
- type: Y.literal("tool-input-error"),
1950
- toolCallId: Y.string(),
1951
- toolName: Y.string(),
1952
- input: Y.unknown(),
1953
- providerExecuted: Y.boolean().optional(),
1948
+ X.looseObject({
1949
+ type: X.literal("tool-input-error"),
1950
+ toolCallId: X.string(),
1951
+ toolName: X.string(),
1952
+ input: X.unknown(),
1953
+ providerExecuted: X.boolean().optional(),
1954
1954
  providerMetadata: Z.optional(),
1955
1955
  toolMetadata: Qn.optional(),
1956
- dynamic: Y.boolean().optional(),
1957
- errorText: Y.string(),
1958
- title: Y.string().optional()
1956
+ dynamic: X.boolean().optional(),
1957
+ errorText: X.string(),
1958
+ title: X.string().optional()
1959
1959
  }),
1960
- Y.looseObject({
1961
- type: Y.literal("tool-approval-request"),
1962
- approvalId: Y.string(),
1963
- toolCallId: Y.string(),
1964
- approvalDescriptor: Y.unknown().optional(),
1965
- inputSchemaInput: Y.unknown().optional(),
1966
- reason: Y.string().optional(),
1967
- isAutomatic: Y.boolean().optional(),
1968
- signature: Y.string().optional()
1960
+ X.looseObject({
1961
+ type: X.literal("tool-approval-request"),
1962
+ approvalId: X.string(),
1963
+ toolCallId: X.string(),
1964
+ approvalDescriptor: X.unknown().optional(),
1965
+ inputSchemaInput: X.unknown().optional(),
1966
+ reason: X.string().optional(),
1967
+ isAutomatic: X.boolean().optional(),
1968
+ signature: X.string().optional()
1969
1969
  }),
1970
- Y.looseObject({
1971
- type: Y.literal("tool-approval-response"),
1972
- approvalId: Y.string(),
1973
- approved: Y.boolean(),
1974
- reason: Y.string().optional(),
1975
- providerExecuted: Y.boolean().optional(),
1970
+ X.looseObject({
1971
+ type: X.literal("tool-approval-response"),
1972
+ approvalId: X.string(),
1973
+ approved: X.boolean(),
1974
+ reason: X.string().optional(),
1975
+ providerExecuted: X.boolean().optional(),
1976
1976
  providerMetadata: Z.optional()
1977
1977
  }),
1978
- Y.looseObject({
1979
- type: Y.literal("tool-output-available"),
1980
- toolCallId: Y.string(),
1981
- output: Y.unknown(),
1982
- providerExecuted: Y.boolean().optional(),
1978
+ X.looseObject({
1979
+ type: X.literal("tool-output-available"),
1980
+ toolCallId: X.string(),
1981
+ output: X.unknown(),
1982
+ providerExecuted: X.boolean().optional(),
1983
1983
  providerMetadata: Z.optional(),
1984
1984
  toolMetadata: Qn.optional(),
1985
- dynamic: Y.boolean().optional(),
1986
- preliminary: Y.boolean().optional()
1985
+ dynamic: X.boolean().optional(),
1986
+ preliminary: X.boolean().optional()
1987
1987
  }),
1988
- Y.looseObject({
1989
- type: Y.literal("tool-output-error"),
1990
- toolCallId: Y.string(),
1991
- errorText: Y.string(),
1992
- providerExecuted: Y.boolean().optional(),
1988
+ X.looseObject({
1989
+ type: X.literal("tool-output-error"),
1990
+ toolCallId: X.string(),
1991
+ errorText: X.string(),
1992
+ providerExecuted: X.boolean().optional(),
1993
1993
  providerMetadata: Z.optional(),
1994
1994
  toolMetadata: Qn.optional(),
1995
- dynamic: Y.boolean().optional()
1995
+ dynamic: X.boolean().optional()
1996
1996
  }),
1997
- Y.looseObject({
1998
- type: Y.literal("tool-output-denied"),
1999
- toolCallId: Y.string()
1997
+ X.looseObject({
1998
+ type: X.literal("tool-output-denied"),
1999
+ toolCallId: X.string()
2000
2000
  }),
2001
- Y.looseObject({
2002
- type: Y.literal("reasoning-start"),
2003
- id: Y.string(),
2001
+ X.looseObject({
2002
+ type: X.literal("reasoning-start"),
2003
+ id: X.string(),
2004
2004
  providerMetadata: Z.optional()
2005
2005
  }),
2006
- Y.looseObject({
2007
- type: Y.literal("reasoning-delta"),
2008
- id: Y.string(),
2009
- delta: Y.string(),
2006
+ X.looseObject({
2007
+ type: X.literal("reasoning-delta"),
2008
+ id: X.string(),
2009
+ delta: X.string(),
2010
2010
  providerMetadata: Z.optional()
2011
2011
  }),
2012
- Y.looseObject({
2013
- type: Y.literal("reasoning-end"),
2014
- id: Y.string(),
2012
+ X.looseObject({
2013
+ type: X.literal("reasoning-end"),
2014
+ id: X.string(),
2015
2015
  providerMetadata: Z.optional()
2016
2016
  }),
2017
- Y.looseObject({
2018
- type: Y.literal("custom"),
2019
- kind: Y.string().transform((e) => e),
2017
+ X.looseObject({
2018
+ type: X.literal("custom"),
2019
+ kind: X.string().transform((e) => e),
2020
2020
  providerMetadata: Z.optional()
2021
2021
  }),
2022
- Y.looseObject({
2023
- type: Y.literal("source-url"),
2024
- sourceId: Y.string(),
2025
- url: Y.string(),
2026
- title: Y.string().optional(),
2022
+ X.looseObject({
2023
+ type: X.literal("source-url"),
2024
+ sourceId: X.string(),
2025
+ url: X.string(),
2026
+ title: X.string().optional(),
2027
2027
  providerMetadata: Z.optional()
2028
2028
  }),
2029
- Y.looseObject({
2030
- type: Y.literal("source-document"),
2031
- sourceId: Y.string(),
2032
- mediaType: Y.string(),
2033
- title: Y.string(),
2034
- filename: Y.string().optional(),
2029
+ X.looseObject({
2030
+ type: X.literal("source-document"),
2031
+ sourceId: X.string(),
2032
+ mediaType: X.string(),
2033
+ title: X.string(),
2034
+ filename: X.string().optional(),
2035
2035
  providerMetadata: Z.optional()
2036
2036
  }),
2037
- Y.looseObject({
2038
- type: Y.literal("file"),
2039
- url: Y.string(),
2040
- mediaType: Y.string(),
2037
+ X.looseObject({
2038
+ type: X.literal("file"),
2039
+ url: X.string(),
2040
+ mediaType: X.string(),
2041
2041
  providerMetadata: Z.optional()
2042
2042
  }),
2043
- Y.looseObject({
2044
- type: Y.literal("reasoning-file"),
2045
- url: Y.string(),
2046
- mediaType: Y.string(),
2043
+ X.looseObject({
2044
+ type: X.literal("reasoning-file"),
2045
+ url: X.string(),
2046
+ mediaType: X.string(),
2047
2047
  providerMetadata: Z.optional()
2048
2048
  }),
2049
- Y.looseObject({
2050
- type: Y.custom((e) => typeof e == "string" && e.startsWith("data-"), { message: "Type must start with \"data-\"" }),
2051
- id: Y.string().optional(),
2052
- data: Y.unknown(),
2053
- transient: Y.boolean().optional()
2049
+ X.looseObject({
2050
+ type: X.custom((e) => typeof e == "string" && e.startsWith("data-"), { message: "Type must start with \"data-\"" }),
2051
+ id: X.string().optional(),
2052
+ data: X.unknown(),
2053
+ transient: X.boolean().optional()
2054
2054
  }),
2055
- Y.looseObject({ type: Y.literal("start-step") }),
2056
- Y.looseObject({ type: Y.literal("finish-step") }),
2057
- Y.looseObject({ type: Y.literal("reset-step") }),
2058
- Y.looseObject({
2059
- type: Y.literal("start"),
2060
- messageId: Y.string().optional(),
2061
- messageMetadata: Y.unknown().optional()
2055
+ X.looseObject({ type: X.literal("start-step") }),
2056
+ X.looseObject({ type: X.literal("finish-step") }),
2057
+ X.looseObject({ type: X.literal("reset-step") }),
2058
+ X.looseObject({
2059
+ type: X.literal("start"),
2060
+ messageId: X.string().optional(),
2061
+ messageMetadata: X.unknown().optional()
2062
2062
  }),
2063
- Y.looseObject({
2064
- type: Y.literal("finish"),
2065
- finishReason: Y.enum([
2063
+ X.looseObject({
2064
+ type: X.literal("finish"),
2065
+ finishReason: X.enum([
2066
2066
  "stop",
2067
2067
  "length",
2068
2068
  "content-filter",
@@ -2071,15 +2071,15 @@ var Zn = Y.object({
2071
2071
  "interrupted",
2072
2072
  "other"
2073
2073
  ]).optional(),
2074
- messageMetadata: Y.unknown().optional()
2074
+ messageMetadata: X.unknown().optional()
2075
2075
  }),
2076
- Y.looseObject({
2077
- type: Y.literal("abort"),
2078
- reason: Y.string().optional()
2076
+ X.looseObject({
2077
+ type: X.literal("abort"),
2078
+ reason: X.string().optional()
2079
2079
  }),
2080
- Y.looseObject({
2081
- type: Y.literal("message-metadata"),
2082
- messageMetadata: Y.unknown()
2080
+ X.looseObject({
2081
+ type: X.literal("message-metadata"),
2082
+ messageMetadata: X.unknown()
2083
2083
  })
2084
2084
  ])));
2085
2085
  function er(e) {
@@ -2151,7 +2151,7 @@ function or({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2151
2151
  }
2152
2152
  }
2153
2153
  }
2154
- if (t == null) throw new J({
2154
+ if (t == null) throw new Y({
2155
2155
  chunkType: "tool-invocation",
2156
2156
  chunkId: e,
2157
2157
  message: `No tool invocation found for tool call ID "${e}".`
@@ -2160,7 +2160,7 @@ function or({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2160
2160
  }
2161
2161
  function h(e) {
2162
2162
  let t = r.message.parts.filter(Q).find((t) => t.approval?.id === e);
2163
- if (t == null) throw new J({
2163
+ if (t == null) throw new Y({
2164
2164
  chunkType: "tool-approval-response",
2165
2165
  chunkId: e,
2166
2166
  message: `No tool invocation found for approval ID "${e}".`
@@ -2225,7 +2225,7 @@ function or({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2225
2225
  }
2226
2226
  async function v(e) {
2227
2227
  if (e != null) {
2228
- let n = r.message.metadata == null ? e : kn(r.message.metadata, e);
2228
+ let n = r.message.metadata == null ? e : On(r.message.metadata, e);
2229
2229
  t != null && await _n({
2230
2230
  value: n,
2231
2231
  schema: t,
@@ -2249,7 +2249,7 @@ function or({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2249
2249
  }
2250
2250
  case "text-delta": {
2251
2251
  let t = r.activeTextParts[e.id];
2252
- if (t == null) throw new J({
2252
+ if (t == null) throw new Y({
2253
2253
  chunkType: "text-delta",
2254
2254
  chunkId: e.id,
2255
2255
  message: `Received text-delta for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`
@@ -2259,7 +2259,7 @@ function or({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2259
2259
  }
2260
2260
  case "text-end": {
2261
2261
  let t = r.activeTextParts[e.id];
2262
- if (t == null) throw new J({
2262
+ if (t == null) throw new Y({
2263
2263
  chunkType: "text-end",
2264
2264
  chunkId: e.id,
2265
2265
  message: `Received text-end for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`
@@ -2289,7 +2289,7 @@ function or({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2289
2289
  }
2290
2290
  case "reasoning-delta": {
2291
2291
  let t = r.activeReasoningParts[e.id];
2292
- if (t == null) throw new J({
2292
+ if (t == null) throw new Y({
2293
2293
  chunkType: "reasoning-delta",
2294
2294
  chunkId: e.id,
2295
2295
  message: `Received reasoning-delta for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`
@@ -2299,7 +2299,7 @@ function or({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2299
2299
  }
2300
2300
  case "reasoning-end": {
2301
2301
  let t = r.activeReasoningParts[e.id];
2302
- if (t == null) throw new J({
2302
+ if (t == null) throw new Y({
2303
2303
  chunkType: "reasoning-end",
2304
2304
  chunkId: e.id,
2305
2305
  message: `Received reasoning-end for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`
@@ -2370,7 +2370,7 @@ function or({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2370
2370
  }
2371
2371
  case "tool-input-delta": {
2372
2372
  let t = r.partialToolCalls[e.toolCallId];
2373
- if (t == null) throw new J({
2373
+ if (t == null) throw new Y({
2374
2374
  chunkType: "tool-input-delta",
2375
2375
  chunkId: e.toolCallId,
2376
2376
  message: `Received tool-input-delta for missing tool call with ID "${e.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`
@@ -2612,7 +2612,7 @@ N({
2612
2612
  }), N({
2613
2613
  prefix: "call",
2614
2614
  size: 24
2615
- }), Y.record(Y.string(), X.optional()), Y.record(Y.string(), Y.string()), N({
2615
+ }), X.record(X.string(), kn.optional()), X.record(X.string(), X.string()), N({
2616
2616
  prefix: "call",
2617
2617
  size: 24
2618
2618
  }), N({
@@ -2663,9 +2663,9 @@ N({
2663
2663
  }), N({
2664
2664
  prefix: "call",
2665
2665
  size: 24
2666
- }), Y.object({
2667
- token: Y.string().refine((e) => e.trim().length > 0),
2668
- url: Y.string().refine((e) => {
2666
+ }), X.object({
2667
+ token: X.string().refine((e) => e.trim().length > 0),
2668
+ url: X.string().refine((e) => {
2669
2669
  try {
2670
2670
  let t = new URL(e);
2671
2671
  return (t.protocol === "ws:" || t.protocol === "wss:") && t.hostname !== "";
@@ -2673,12 +2673,12 @@ N({
2673
2673
  return !1;
2674
2674
  }
2675
2675
  }),
2676
- expiresAt: Y.number().positive().max(2 ** 53 - 1).optional(),
2677
- tools: Y.array(Y.object({
2678
- type: Y.literal("function"),
2679
- name: Y.string().min(1),
2680
- description: Y.string().optional(),
2681
- parameters: Y.record(Y.string(), Y.unknown())
2676
+ expiresAt: X.number().positive().max(2 ** 53 - 1).optional(),
2677
+ tools: X.array(X.object({
2678
+ type: X.literal("function"),
2679
+ name: X.string().min(1),
2680
+ description: X.string().optional(),
2681
+ parameters: X.record(X.string(), X.unknown())
2682
2682
  })).optional()
2683
2683
  }), N({
2684
2684
  prefix: "call",
@@ -2787,7 +2787,7 @@ var mr = class {
2787
2787
  requestMetadata: e.metadata
2788
2788
  }), o = a?.api;
2789
2789
  if (o == null) {
2790
- if (e.chatId === "." || e.chatId === "..") throw new Tn({
2790
+ if (e.chatId === "." || e.chatId === "..") throw new wn({
2791
2791
  parameter: "chatId",
2792
2792
  value: e.chatId,
2793
2793
  message: "Chat IDs must not be \".\" or \"..\" when using the default reconnect URL."
@@ -2866,12 +2866,12 @@ var mr = class {
2866
2866
  } else n = e;
2867
2867
  if (e.messageId != null) {
2868
2868
  let t = this.state.messages.findIndex((t) => t.id === e.messageId);
2869
- if (t === -1) throw new Tn({
2869
+ if (t === -1) throw new wn({
2870
2870
  parameter: "message.messageId",
2871
2871
  value: e.messageId,
2872
2872
  message: `message with id ${e.messageId} not found`
2873
2873
  });
2874
- if (this.state.messages[t].role !== "user") throw new Tn({
2874
+ if (this.state.messages[t].role !== "user") throw new wn({
2875
2875
  parameter: "message.messageId",
2876
2876
  value: e.messageId,
2877
2877
  message: `message with id ${e.messageId} is not a user message`
@@ -2895,7 +2895,7 @@ var mr = class {
2895
2895
  });
2896
2896
  }, this.regenerate = async ({ messageId: e, ...t } = {}) => {
2897
2897
  let n = e == null ? this.state.messages.length - 1 : this.state.messages.findIndex((t) => t.id === e);
2898
- if (n === -1) throw new Tn({
2898
+ if (n === -1) throw new wn({
2899
2899
  parameter: "messageId",
2900
2900
  value: e,
2901
2901
  message: `message ${e} not found`
@@ -3767,7 +3767,7 @@ function ui(e) {
3767
3767
  }
3768
3768
  });
3769
3769
  async function k() {
3770
- A(), ke.value = void 0, Pe.value = !1, H.value = "", await F.value.stop();
3770
+ A(), ke.value = void 0, Pe.value = !1, G.value = "", await F.value.stop();
3771
3771
  }
3772
3772
  function A() {
3773
3773
  it.cancelAll(), O.value?.answer(!1);
@@ -3781,7 +3781,7 @@ function ui(e) {
3781
3781
  M.value.includes(e) || (M.value = [...M.value, e]), dt.set(e, Date.now()), n ? ft.add(e) : ft.delete(e), t && (P.value = {
3782
3782
  ...P.value,
3783
3783
  [e]: t
3784
- }), q || vn();
3784
+ }), J || wn();
3785
3785
  }
3786
3786
  function mt(e) {
3787
3787
  P.value = Object.fromEntries(Object.entries(P.value).filter(([t]) => t !== e));
@@ -3849,15 +3849,15 @@ function ui(e) {
3849
3849
  },
3850
3850
  onFinish: () => {
3851
3851
  let e = E.value;
3852
- !T.value && !L.value.some((t) => t.id === e) && zt(o.value);
3852
+ !T.value && !L.value.some((t) => t.id === e) && Ut(o.value);
3853
3853
  }
3854
3854
  })), F = x(() => _e(gt)), _t = () => F.value.messages[F.value.messages.length - 1];
3855
3855
  C(E, (e, t) => {
3856
- if (t && !T.value && (G() || j?.chatId === t)) {
3856
+ if (t && !T.value && (K() || j?.chatId === t)) {
3857
3857
  let e = F.value.messages.filter((e) => e.role === "user"), n = e[e.length - 1];
3858
3858
  pt(t, n ? ue(n) ?? "" : "", F.value.status === "streaming" || j?.chatId === t);
3859
3859
  }
3860
- ht(e), ct = void 0, clearTimeout(fn), dn.value = !1, F.value.stop();
3860
+ ht(e), ct = void 0, clearTimeout(vn), _n.value = !1, F.value.stop();
3861
3861
  }, { flush: "sync" });
3862
3862
  let vt = x(() => {
3863
3863
  let e = u.value?.initialMessage;
@@ -3892,29 +3892,29 @@ function ui(e) {
3892
3892
  }), xt = x(() => {
3893
3893
  let e = u.value?.messagePlaceholder;
3894
3894
  return e?.[r.value] ? e[r.value] : n("placeholder.askAnything") ? t("placeholder.askAnything") : "";
3895
- }), L = S([]), St = S(!1), R = S([]), Ct = S(!1), wt = S("chat"), Tt = S([]), Et = S(), Dt = S(!1), Ot = S(!1), kt = S(), At = S(!1), jt = S(!1), z = S(), B = S(""), V = S([]), H = S(""), Mt = S(0), U = de(x(() => `${o.value}-queue`), {}), W = x(() => U.value[E.value] ?? []), Nt = x(() => !T.value);
3896
- function Pt(e, t) {
3897
- let n = Object.fromEntries(Object.entries(U.value).filter(([t]) => t !== e));
3898
- U.value = t.length > 0 ? {
3895
+ }), L = S([]), St = S(!1), Ct = S(1), wt = S(!1), Tt = S(!1), Et, R = S([]), Dt = S(!1), Ot = S("chat"), kt = S(0), z = S([]), B = S(), V = S(!1), At = S(!1), jt = S(), Mt = S(!1), Nt = S(!1), H = S(), U = S(""), W = S([]), G = S(""), Pt = S(0), Ft = de(x(() => `${o.value}-queue`), {}), It = x(() => Ft.value[E.value] ?? []), Lt = x(() => !T.value);
3896
+ function Rt(e, t) {
3897
+ let n = Object.fromEntries(Object.entries(Ft.value).filter(([t]) => t !== e));
3898
+ Ft.value = t.length > 0 ? {
3899
3899
  ...n,
3900
3900
  [e]: t
3901
3901
  } : n;
3902
3902
  }
3903
- function Ft(e) {
3904
- let t = (U.value[e] ?? []).join(oi);
3905
- return Pt(e, []), t;
3903
+ function zt(e) {
3904
+ let t = (Ft.value[e] ?? []).join(oi);
3905
+ return Rt(e, []), t;
3906
3906
  }
3907
- function It(e) {
3908
- e && (B.value = B.value ? `${B.value}${oi}${e}` : e);
3907
+ function Bt(e) {
3908
+ e && (U.value = U.value ? `${U.value}${oi}${e}` : e);
3909
3909
  }
3910
- function Lt(e) {
3911
- Pt(E.value, W.value.filter((t, n) => n !== e));
3910
+ function Vt(e) {
3911
+ Rt(E.value, It.value.filter((t, n) => n !== e));
3912
3912
  }
3913
- function Rt(e) {
3914
- let t = W.value[e];
3915
- Lt(e), It(t ?? "");
3913
+ function Ht(e) {
3914
+ let t = It.value[e];
3915
+ Vt(e), Bt(t ?? "");
3916
3916
  }
3917
- async function zt(e) {
3917
+ async function Ut(e) {
3918
3918
  if (T.value) L.value = [];
3919
3919
  else {
3920
3920
  St.value = !0;
@@ -3926,58 +3926,80 @@ function ui(e) {
3926
3926
  summary: null,
3927
3927
  messages: [],
3928
3928
  lastMessageAt: /* @__PURE__ */ new Date()
3929
- }));
3930
- L.value = [...r, ...t];
3929
+ })), i = `${e}:${l.value ?? ""}`;
3930
+ i !== Et && (Ct.value = 1);
3931
+ let a = new Set(r.map((e) => e.id)), o = Ct.value > 1 ? L.value.filter((e) => !n.has(e.id) && !a.has(e.id)) : [];
3932
+ L.value = [
3933
+ ...r,
3934
+ ...t,
3935
+ ...o
3936
+ ], Et = i, Ct.value === 1 && (wt.value = t.length >= 100);
3931
3937
  } catch {
3932
- L.value = [];
3938
+ L.value = [], Ct.value = 1, Et = void 0, wt.value = !1;
3933
3939
  return;
3934
3940
  } finally {
3935
3941
  St.value = !1;
3936
3942
  }
3937
- yn([.../* @__PURE__ */ new Set([...mn(), ...L.value.map((e) => e.id)])]);
3943
+ Tn([.../* @__PURE__ */ new Set([...bn(), ...L.value.map((e) => e.id)])]);
3944
+ }
3945
+ }
3946
+ async function Wt() {
3947
+ if (!wt.value || Tt.value || T.value) return;
3948
+ Tt.value = !0;
3949
+ let e = Et;
3950
+ try {
3951
+ let t = Ct.value + 1, n = await D.value.getConversations(o.value, l.value, { page: t });
3952
+ if (e !== Et) return;
3953
+ let r = new Set(L.value.map((e) => e.id));
3954
+ L.value = [...L.value, ...n.filter((e) => !r.has(e.id))], Ct.value = t, wt.value = n.length >= 100;
3955
+ } catch {} finally {
3956
+ Tt.value = !1;
3938
3957
  }
3939
3958
  }
3940
- async function Bt() {
3959
+ async function Gt(e) {
3960
+ return T.value ? [] : D.value.getConversations(o.value, l.value, { search: e });
3961
+ }
3962
+ async function Kt() {
3941
3963
  let e = E.value;
3942
3964
  if (!e) R.value = [];
3943
3965
  else {
3944
- Ct.value = !0;
3966
+ Dt.value = !0;
3945
3967
  try {
3946
3968
  R.value = await D.value.getChatFiles(e);
3947
3969
  } catch {
3948
3970
  R.value = [];
3949
3971
  } finally {
3950
- Ct.value = !1;
3972
+ Dt.value = !1;
3951
3973
  }
3952
3974
  }
3953
3975
  }
3954
- function Vt(e, t = !1) {
3976
+ function qt(e, t = !1) {
3955
3977
  return D.value.getChatFileDownloadUrl(e, t);
3956
3978
  }
3957
- function Ht(e) {
3979
+ function Jt(e) {
3958
3980
  return D.value.getChatFilePreviewUrl(e);
3959
3981
  }
3960
- async function Ut(e) {
3982
+ async function Yt(e) {
3961
3983
  await D.value.deleteChatFile(e);
3962
3984
  let t = R.value.find((t) => t.documentId === e), n = t?.kind === "spreadsheet" ? t.sourceAttachmentId ?? t.documentId : void 0;
3963
3985
  R.value = R.value.filter((t) => t.documentId !== e && (!n || t.documentId !== n && t.sourceAttachmentId !== n));
3964
3986
  }
3965
- async function Wt(e, t) {
3987
+ async function Xt(e, t) {
3966
3988
  if (!T.value) try {
3967
3989
  let n = await D.value.getChat(e, t);
3968
3990
  if (t !== E.value || F.value.status !== "ready" || F.value.messages.length > 0) return;
3969
- n && (F.value.messages = n.messages, Ye.value = n.blocked ?? !1, Gt(e, t, n.turnInProgress === !0));
3991
+ n && (F.value.messages = n.messages, Ye.value = n.blocked ?? !1, Zt(e, t, n.turnInProgress === !0));
3970
3992
  } catch {}
3971
3993
  }
3972
- async function Gt(e, t, n) {
3973
- n && (await Kt(t), t !== E.value || G()) || (await qt(e, t), t === E.value && await Zt());
3994
+ async function Zt(e, t, n) {
3995
+ n && (await Qt(t), t !== E.value || K()) || (await $t(e, t), t === E.value && await nn());
3974
3996
  }
3975
- async function Kt(e) {
3997
+ async function Qt(e) {
3976
3998
  let t = { chatId: e };
3977
3999
  j = t, st.value = e;
3978
4000
  let n = () => j === t && e === E.value, r = Date.now() + Qr;
3979
4001
  try {
3980
- for (; n() && !G() && Date.now() < r;) {
4002
+ for (; n() && !K() && Date.now() < r;) {
3981
4003
  ot = !0;
3982
4004
  try {
3983
4005
  await F.value.resumeStream();
@@ -3987,7 +4009,7 @@ function ui(e) {
3987
4009
  if (!n()) return;
3988
4010
  F.value.clearError();
3989
4011
  let t = await D.value.getChat(o.value, e).catch(() => null);
3990
- if (!t || !n() || G()) return;
4012
+ if (!t || !n() || K()) return;
3991
4013
  if (!t.turnInProgress) {
3992
4014
  F.value.messages = t.messages;
3993
4015
  return;
@@ -3998,7 +4020,7 @@ function ui(e) {
3998
4020
  j === t && (j = void 0, st.value = void 0);
3999
4021
  }
4000
4022
  }
4001
- async function qt(e, t) {
4023
+ async function $t(e, t) {
4002
4024
  let n;
4003
4025
  try {
4004
4026
  n = Number(sessionStorage.getItem(Oe)), sessionStorage.removeItem(Oe);
@@ -4031,93 +4053,93 @@ function ui(e) {
4031
4053
  }
4032
4054
  }
4033
4055
  }
4034
- let G = () => {
4056
+ let K = () => {
4035
4057
  let e = F.value.status;
4036
4058
  return e === "submitted" || e === "streaming";
4037
- }, Jt = () => G() || j?.chatId === E.value || me.value > 0, Yt = () => {
4059
+ }, en = () => K() || j?.chatId === E.value || me.value > 0, q = () => {
4038
4060
  let e = _t();
4039
4061
  return O.value !== void 0 || qr(e) || ci(e);
4040
- }, Xt = /* @__PURE__ */ new Set();
4041
- async function Zt() {
4062
+ }, tn = /* @__PURE__ */ new Set();
4063
+ async function nn() {
4042
4064
  let e = E.value;
4043
- if (!(Xt.has(e) || W.value.length === 0 || Jt() || Je.value)) {
4044
- if (Yt()) It(Ft(e));
4065
+ if (!(tn.has(e) || It.value.length === 0 || en() || Je.value)) {
4066
+ if (q()) Bt(zt(e));
4045
4067
  else {
4046
- Xt.add(e);
4068
+ tn.add(e);
4047
4069
  try {
4048
4070
  let t = Date.now() + ri;
4049
4071
  for (; Date.now() < t && (await Promise.race([D.value.getRunningTurns(o.value, [e]).catch(() => []), new Promise((t) => setTimeout(() => t([e]), ai))])).includes(e);) await new Promise((e) => setTimeout(e, ii));
4050
- if (e !== E.value || Jt()) return;
4051
- let n = Ft(e);
4052
- n && sn(n);
4072
+ if (e !== E.value || en()) return;
4073
+ let n = zt(e);
4074
+ n && pn(n);
4053
4075
  } finally {
4054
- Xt.delete(e);
4076
+ tn.delete(e);
4055
4077
  }
4056
4078
  }
4057
4079
  }
4058
4080
  }
4059
- let Qt = 0, $t = 0;
4060
- async function en() {
4061
- if (T.value || G()) return "indeterminate";
4062
- let e = E.value, t = Qt += 1;
4081
+ let rn = 0, an = 0;
4082
+ async function on() {
4083
+ if (T.value || K()) return "indeterminate";
4084
+ let e = E.value, t = rn += 1;
4063
4085
  try {
4064
4086
  let n = await D.value.getChat(o.value, e);
4065
- if (!n || e !== E.value || G() || t <= $t) return "indeterminate";
4066
- $t = t;
4087
+ if (!n || e !== E.value || K() || t <= an) return "indeterminate";
4088
+ an = t;
4067
4089
  let r = n.messages, i = Zr(r, F.value.messages);
4068
4090
  return F.value.messages = [...r, ...i], Ye.value = n.blocked ?? !1, i.length > 0 ? "pending" : "caught-up";
4069
4091
  } catch {}
4070
4092
  return "indeterminate";
4071
4093
  }
4072
- function tn(e) {
4094
+ function sn(e) {
4073
4095
  F.value.messages = [...F.value.messages, e];
4074
4096
  }
4075
- async function K(e) {
4097
+ async function cn(e) {
4076
4098
  try {
4077
- Tt.value = await D.value.getMessageFeedbacks(e);
4099
+ z.value = await D.value.getMessageFeedbacks(e);
4078
4100
  } catch {
4079
- Tt.value = [];
4101
+ z.value = [];
4080
4102
  }
4081
4103
  }
4082
- function nn(e) {
4083
- let t = Tt.value.findIndex((t) => t.messageId === e.messageId);
4084
- t >= 0 ? Tt.value[t] = e : Tt.value.push(e);
4104
+ function ln(e) {
4105
+ let t = z.value.findIndex((t) => t.messageId === e.messageId);
4106
+ t >= 0 ? z.value[t] = e : z.value.push(e);
4085
4107
  }
4086
- function rn(e) {
4108
+ function un(e) {
4087
4109
  let t = bt.value, n = t.findIndex((t) => t.id === e.id), r = ue(e) ?? "", i = t.slice(0, n).reverse().find((e) => e.role === "user");
4088
4110
  return {
4089
4111
  userQuestion: ue(i ?? e) ?? "",
4090
4112
  assistantMessage: r
4091
4113
  };
4092
4114
  }
4093
- async function an(e, t) {
4115
+ async function dn(e, t) {
4094
4116
  await Promise.all([
4095
- Wt(e, t),
4096
- zt(e),
4097
- K(t)
4117
+ Xt(e, t),
4118
+ Ut(e),
4119
+ cn(t)
4098
4120
  ]), $e.value || De((e, t) => D.value.reverseGeocode(e, t, r.value)).then((e) => {
4099
4121
  e && ($e.value = e);
4100
4122
  });
4101
4123
  }
4102
- async function on() {
4103
- let e = B.value.trim(), t = V.value.filter((e) => e.state === "done" && e.mediaSource !== void 0).map((e) => ({
4124
+ async function fn() {
4125
+ let e = U.value.trim(), t = W.value.filter((e) => e.state === "done" && e.mediaSource !== void 0).map((e) => ({
4104
4126
  type: "file",
4105
4127
  mediaType: e.mediaSource.mimeType,
4106
4128
  url: e.localUrl,
4107
4129
  filename: e.mediaSource.name,
4108
4130
  providerMetadata: { "8bot": { media: e.mediaSource } }
4109
4131
  }));
4110
- !T.value && Jt() ? e && t.length === 0 && (Pt(E.value, [...W.value, e]), B.value = "") : (T.value && bt.value.length > 0 && await wn(), sn(e, t), B.value = "", Cn());
4132
+ !T.value && en() ? e && t.length === 0 && (Rt(E.value, [...It.value, e]), U.value = "") : (T.value && bt.value.length > 0 && await X(), pn(e, t), U.value = "", On());
4111
4133
  }
4112
- function sn(e, t = []) {
4113
- A(), H.value = e, Mt.value = F.value.messages.length;
4134
+ function pn(e, t = []) {
4135
+ A(), G.value = e, Pt.value = F.value.messages.length;
4114
4136
  let n = F.value.sendMessage;
4115
4137
  n({
4116
4138
  text: e,
4117
4139
  files: t.length > 0 ? t : void 0
4118
4140
  });
4119
4141
  }
4120
- function cn(e) {
4142
+ function mn(e) {
4121
4143
  let t = e.trim();
4122
4144
  if (!t) return;
4123
4145
  if (F.value.status !== "ready") {
@@ -4127,25 +4149,25 @@ function ui(e) {
4127
4149
  let n = F.value.sendMessage;
4128
4150
  A(), n({ text: t });
4129
4151
  }
4130
- async function ln() {
4131
- let e = F.value.messages.slice(Mt.value).some((e) => e.parts.some(ie)), t = H.value, n = t.length > 0 && !e, r = E.value, i = Mt.value, a = j?.chatId === r, s = ct, c = Ft(r), l = (e = "") => {
4132
- B.value = [
4152
+ async function hn() {
4153
+ let e = F.value.messages.slice(Pt.value).some((e) => e.parts.some(ie)), t = G.value, n = t.length > 0 && !e, r = E.value, i = Pt.value, a = j?.chatId === r, s = ct, c = zt(r), l = (e = "") => {
4154
+ U.value = [
4133
4155
  e,
4134
4156
  c,
4135
- B.value
4157
+ U.value
4136
4158
  ].filter(Boolean).join(oi);
4137
- }, u = () => r === E.value && !G() && Mt.value === i ? !1 : (c && Pt(r, [c, ...U.value[r] ?? []]), !0);
4159
+ }, u = () => r === E.value && !K() && Pt.value === i ? !1 : (c && Rt(r, [c, ...Ft.value[r] ?? []]), !0);
4138
4160
  j = void 0, st.value = void 0, A(), await F.value.stop();
4139
4161
  let d = T.value || e && !a || await D.value.stopChatTurn(o.value, r, s).catch(() => !0);
4140
4162
  if (!u()) {
4141
4163
  if (a || !d) {
4142
- if (await en(), u()) return;
4143
- if (a || F.value.messages.length > Mt.value) {
4144
- H.value = "", l();
4164
+ if (await on(), u()) return;
4165
+ if (a || F.value.messages.length > Pt.value) {
4166
+ G.value = "", l();
4145
4167
  return;
4146
4168
  }
4147
4169
  }
4148
- n ? (l(t), F.value.messages = F.value.messages.slice(0, Mt.value), H.value = "") : l();
4170
+ n ? (l(t), F.value.messages = F.value.messages.slice(0, Pt.value), G.value = "") : l();
4149
4171
  }
4150
4172
  }
4151
4173
  C(() => F.value.messages, (e) => {
@@ -4154,88 +4176,88 @@ function ui(e) {
4154
4176
  }), C(() => F.value.status, (e) => {
4155
4177
  e === "submitted" && (w.value++, ct = void 0);
4156
4178
  });
4157
- let un;
4179
+ let gn;
4158
4180
  C(() => [F.value.status, me.value], ([e, t]) => {
4159
- clearTimeout(un), e === "ready" && t === 0 && (un = setTimeout(() => {
4181
+ clearTimeout(gn), e === "ready" && t === 0 && (gn = setTimeout(() => {
4160
4182
  Pe.value = !1;
4161
4183
  }, 1500));
4162
4184
  });
4163
- let dn = S(!1), fn;
4164
- C(() => !O.value && !qr(_t()) && (G() || me.value > 0), (e) => {
4165
- clearTimeout(fn), e ? dn.value = !0 : fn = setTimeout(() => {
4166
- dn.value = !1;
4185
+ let _n = S(!1), vn;
4186
+ C(() => !O.value && !qr(_t()) && (K() || me.value > 0), (e) => {
4187
+ clearTimeout(vn), e ? _n.value = !0 : vn = setTimeout(() => {
4188
+ _n.value = !1;
4167
4189
  }, 400);
4168
4190
  }, { immediate: !0 });
4169
- let pn = x(() => {
4191
+ let yn = x(() => {
4170
4192
  let e = lt.value.filter((e) => e !== E.value);
4171
- return dn.value || st.value === E.value ? [...e, E.value] : e;
4172
- }), mn = () => [.../* @__PURE__ */ new Set([...lt.value, ...M.value])], hn = Ce(), q, gn = 0, _n = 0;
4173
- function vn() {
4174
- clearTimeout(q), q = void 0, mn().length !== 0 && hn.value === "visible" && (q = setTimeout(() => {
4175
- q = void 0, yn(mn());
4193
+ return _n.value || st.value === E.value ? [...e, E.value] : e;
4194
+ }), bn = () => [.../* @__PURE__ */ new Set([...lt.value, ...M.value])], xn = Ce(), J, Sn = 0, Cn = 0;
4195
+ function wn() {
4196
+ clearTimeout(J), J = void 0, bn().length !== 0 && xn.value === "visible" && (J = setTimeout(() => {
4197
+ J = void 0, Tn(bn());
4176
4198
  }, ei));
4177
4199
  }
4178
- async function yn(e) {
4200
+ async function Tn(e) {
4179
4201
  let t = e.slice(0, ti);
4180
4202
  if (T.value || t.length === 0) {
4181
- vn();
4203
+ wn();
4182
4204
  return;
4183
4205
  }
4184
- let n = gn += 1, r;
4206
+ let n = Sn += 1, r;
4185
4207
  try {
4186
4208
  r = await D.value.getRunningTurns(o.value, t);
4187
4209
  } catch {
4188
- vn();
4210
+ wn();
4189
4211
  return;
4190
4212
  }
4191
- if (n <= _n) return;
4192
- _n = n;
4213
+ if (n <= Cn) return;
4214
+ Cn = n;
4193
4215
  for (let e of r) ft.add(e);
4194
- let i = new Set(t), a = mn().filter((e) => i.has(e) && !r.includes(e)), s = (e) => M.value.includes(e) && !ft.has(e), c = a.filter((e) => s(e) && Date.now() - (dt.get(e) ?? 0) > ni), l = a.filter((e) => !s(e));
4216
+ let i = new Set(t), a = bn().filter((e) => i.has(e) && !r.includes(e)), s = (e) => M.value.includes(e) && !ft.has(e), c = a.filter((e) => s(e) && Date.now() - (dt.get(e) ?? 0) > ni), l = a.filter((e) => !s(e));
4195
4217
  lt.value = [...lt.value.filter((e) => !i.has(e)), ...r];
4196
4218
  let u = l.filter((e) => M.value.includes(e));
4197
- (u.length > 0 || c.length > 0) && (M.value = M.value.filter((e) => !u.includes(e) && !c.includes(e)), N.value = [...N.value, ...u.filter((e) => e !== E.value && !N.value.includes(e))]), l.length > 0 && zt(o.value), vn();
4219
+ (u.length > 0 || c.length > 0) && (M.value = M.value.filter((e) => !u.includes(e) && !c.includes(e)), N.value = [...N.value, ...u.filter((e) => e !== E.value && !N.value.includes(e))]), l.length > 0 && Ut(o.value), wn();
4198
4220
  }
4199
- C(hn, (e) => {
4200
- e === "visible" ? yn(mn()) : (clearTimeout(q), q = void 0);
4201
- }), ge(() => clearTimeout(q));
4202
- let bn = x(() => N.value.map((e) => ({
4221
+ C(xn, (e) => {
4222
+ e === "visible" ? Tn(bn()) : (clearTimeout(J), J = void 0);
4223
+ }), ge(() => clearTimeout(J));
4224
+ let En = x(() => N.value.map((e) => ({
4203
4225
  chatId: e,
4204
4226
  title: L.value.find((t) => t.id === e)?.title || P.value[e] || void 0
4205
4227
  })));
4206
- function xn(e) {
4207
- ht(e), E.value = e, Bn("chat");
4228
+ function Dn(e) {
4229
+ ht(e), E.value = e, qn("chat");
4208
4230
  }
4209
- function Sn(e) {
4231
+ function Y(e) {
4210
4232
  N.value = N.value.filter((t) => t !== e), mt(e);
4211
4233
  }
4212
4234
  C(() => [F.value.status, F.value.id], ([e, t], [n, r]) => {
4213
4235
  if (t === r) {
4214
- if (e === "error") j?.chatId !== E.value && It(Ft(E.value));
4236
+ if (e === "error") j?.chatId !== E.value && Bt(zt(E.value));
4215
4237
  else if (e === "ready" && (n === "streaming" || n === "submitted")) {
4216
- if (Yt()) {
4217
- It(Ft(E.value));
4238
+ if (q()) {
4239
+ Bt(zt(E.value));
4218
4240
  return;
4219
4241
  }
4220
- Zt();
4242
+ nn();
4221
4243
  }
4222
4244
  }
4223
4245
  }), C(me, (e) => {
4224
- e === 0 && F.value.status === "ready" && Zt();
4246
+ e === 0 && F.value.status === "ready" && nn();
4225
4247
  }), C(() => F.value.status, (e) => {
4226
- e === "ready" && H.value.length > 0 && (H.value = "");
4248
+ e === "ready" && G.value.length > 0 && (G.value = "");
4227
4249
  });
4228
- function Cn(e = !1) {
4229
- for (let t of V.value) (e || t.state !== "done") && URL.revokeObjectURL(t.localUrl);
4230
- V.value = [], Z.value = null;
4250
+ function On(e = !1) {
4251
+ for (let t of W.value) (e || t.state !== "done") && URL.revokeObjectURL(t.localUrl);
4252
+ W.value = [], In.value = null;
4231
4253
  }
4232
- async function wn() {
4233
- return H.value = "", Ne.value = {}, E.value = ut(), await he(), F.value.clearError(), Je.value = void 0, Ye.value = !1, Cn(!0), Bn("chat"), E.value;
4254
+ async function X() {
4255
+ return G.value = "", Ne.value = {}, E.value = ut(), await he(), F.value.clearError(), Je.value = void 0, Ye.value = !1, On(!0), qn("chat"), E.value;
4234
4256
  }
4235
- async function Tn(e) {
4236
- F.value.status !== "ready" && (H.value = "", await ln()), A(), await F.value.regenerate(e);
4257
+ async function kn(e) {
4258
+ F.value.status !== "ready" && (G.value = "", await hn()), A(), await F.value.regenerate(e);
4237
4259
  }
4238
- function En(e) {
4260
+ function Z(e) {
4239
4261
  if (e.tool === "requestGeolocation") {
4240
4262
  let t = e.output;
4241
4263
  "latitude" in t && ($e.value = {
@@ -4247,23 +4269,23 @@ function ui(e) {
4247
4269
  }
4248
4270
  F.value.addToolOutput(e);
4249
4271
  }
4250
- function Dn(e) {
4272
+ function An(e) {
4251
4273
  F.value.addToolApprovalResponse(e);
4252
4274
  }
4253
- let On = x(() => F.value.messages.reduce((e, t) => e + t.parts.filter((e) => e.type === "file").length, 0)), J = x(() => _.value?.maxFilesPerMessage ?? 5), kn = x(() => _.value?.maxFilesPerChat ?? 20), Y = x(() => Math.max(0, Math.min(J.value - V.value.length, kn.value - On.value - V.value.length))), X = x(() => Y.value <= 0), Z = S(null), An = () => {
4254
- Z.value = null;
4275
+ let jn = x(() => F.value.messages.reduce((e, t) => e + t.parts.filter((e) => e.type === "file").length, 0)), Mn = x(() => _.value?.maxFilesPerMessage ?? 5), Nn = x(() => _.value?.maxFilesPerChat ?? 20), Pn = x(() => Math.max(0, Math.min(Mn.value - W.value.length, Nn.value - jn.value - W.value.length))), Fn = x(() => Pn.value <= 0), In = S(null), Ln = () => {
4276
+ In.value = null;
4255
4277
  };
4256
- C(X, (e) => {
4257
- e || (Z.value = null);
4278
+ C(Fn, (e) => {
4279
+ e || (In.value = null);
4258
4280
  });
4259
- async function jn(e) {
4260
- if (X.value) {
4261
- Z.value = kn.value - On.value - V.value.length <= J.value - V.value.length ? {
4281
+ async function Rn(e) {
4282
+ if (Fn.value) {
4283
+ In.value = Nn.value - jn.value - W.value.length <= Mn.value - W.value.length ? {
4262
4284
  reason: "per-chat",
4263
- max: kn.value
4285
+ max: Nn.value
4264
4286
  } : {
4265
4287
  reason: "per-message",
4266
- max: J.value
4288
+ max: Mn.value
4267
4289
  };
4268
4290
  return;
4269
4291
  }
@@ -4273,26 +4295,26 @@ function ui(e) {
4273
4295
  localUrl: URL.createObjectURL(e),
4274
4296
  state: "uploading"
4275
4297
  };
4276
- V.value = [...V.value, n];
4298
+ W.value = [...W.value, n];
4277
4299
  try {
4278
4300
  let n = await D.value.uploadMedia(o.value, E.value, e);
4279
- V.value = V.value.map((e) => e.id === t ? {
4301
+ W.value = W.value.map((e) => e.id === t ? {
4280
4302
  ...e,
4281
4303
  state: "done",
4282
4304
  mediaSource: n
4283
4305
  } : e);
4284
4306
  } catch (e) {
4285
4307
  let n = e instanceof Error ? e.message : "Upload failed";
4286
- V.value = V.value.map((e) => e.id === t ? {
4308
+ W.value = W.value.map((e) => e.id === t ? {
4287
4309
  ...e,
4288
4310
  state: "error",
4289
4311
  error: n
4290
4312
  } : e);
4291
4313
  }
4292
4314
  }
4293
- async function Mn(e, t) {
4294
- let { userQuestion: n, assistantMessage: r } = rn(e);
4295
- nn(await D.value.submitMessageFeedback({
4315
+ async function zn(e, t) {
4316
+ let { userQuestion: n, assistantMessage: r } = un(e);
4317
+ ln(await D.value.submitMessageFeedback({
4296
4318
  messageId: e.id,
4297
4319
  chatId: E.value,
4298
4320
  agentId: o.value,
@@ -4301,70 +4323,73 @@ function ui(e) {
4301
4323
  assistantMessage: r
4302
4324
  }));
4303
4325
  }
4304
- async function Nn(e) {
4305
- await Mn(e, "upvote");
4326
+ async function Bn(e) {
4327
+ await zn(e, "upvote");
4306
4328
  }
4307
- async function Pn(e) {
4308
- await Mn(e, "downvote");
4329
+ async function Vn(e) {
4330
+ await zn(e, "downvote");
4309
4331
  }
4310
- function Fn(e) {
4311
- Ot.value = !1, kt.value = void 0, Et.value = e;
4332
+ function Hn(e) {
4333
+ At.value = !1, jt.value = void 0, B.value = e;
4312
4334
  }
4313
- async function In(e) {
4314
- if (Et.value) try {
4315
- Dt.value = !0, Ot.value = !1, kt.value = void 0;
4316
- let { userQuestion: t, assistantMessage: n } = rn(Et.value);
4317
- nn(await D.value.submitMessageFeedback({
4318
- messageId: Et.value.id,
4335
+ async function Un(e) {
4336
+ if (B.value) try {
4337
+ V.value = !0, At.value = !1, jt.value = void 0;
4338
+ let { userQuestion: t, assistantMessage: n } = un(B.value);
4339
+ ln(await D.value.submitMessageFeedback({
4340
+ messageId: B.value.id,
4319
4341
  chatId: E.value,
4320
4342
  agentId: o.value,
4321
4343
  userQuestion: t,
4322
4344
  assistantMessage: n,
4323
4345
  comment: e
4324
- })), Ot.value = !0, await K(E.value);
4346
+ })), At.value = !0, await cn(E.value);
4325
4347
  } catch {
4326
- kt.value = n("message.feedbackSubmitError") ? t("message.feedbackSubmitError") : "Failed to submit feedback";
4348
+ jt.value = n("message.feedbackSubmitError") ? t("message.feedbackSubmitError") : "Failed to submit feedback";
4327
4349
  } finally {
4328
- Dt.value = !1;
4350
+ V.value = !1;
4329
4351
  }
4330
4352
  }
4331
- async function Ln(e) {
4353
+ async function Wn(e) {
4332
4354
  try {
4333
- jt.value = !0, At.value = !1, z.value = void 0, await D.value.submitLead({
4355
+ Nt.value = !0, Mt.value = !1, H.value = void 0, await D.value.submitLead({
4334
4356
  agentId: o.value,
4335
4357
  chatId: E.value,
4336
4358
  ...e
4337
- }), At.value = !0;
4359
+ }), Mt.value = !0;
4338
4360
  } catch {
4339
- z.value = n("message.leadSubmitError") ? t("message.leadSubmitError") : "Failed to submit lead";
4361
+ H.value = n("message.leadSubmitError") ? t("message.leadSubmitError") : "Failed to submit lead";
4340
4362
  } finally {
4341
- jt.value = !1;
4363
+ Nt.value = !1;
4342
4364
  }
4343
4365
  }
4344
- async function Rn(e, t) {
4366
+ async function Gn(e, t) {
4345
4367
  let n = await D.value.updateChatTitle(o.value, e, t);
4346
4368
  L.value = L.value.map((t) => t.id === e ? {
4347
4369
  ...t,
4348
4370
  title: n.title
4349
4371
  } : t);
4350
4372
  }
4351
- async function zn(e) {
4352
- await D.value.deleteChat(o.value, e), L.value = L.value.filter((t) => t.id !== e), E.value === e && await wn();
4373
+ async function Kn(e) {
4374
+ await D.value.deleteChat(o.value, e), L.value = L.value.filter((t) => t.id !== e), E.value === e && await X();
4353
4375
  }
4354
- function Bn(e) {
4355
- wt.value = e;
4376
+ function qn(e) {
4377
+ Ot.value = e;
4356
4378
  }
4357
- let Vn;
4358
- function Hn(e) {
4379
+ function Jn() {
4380
+ qn("chat"), kt.value++;
4381
+ }
4382
+ let Yn;
4383
+ function Xn(e) {
4359
4384
  let t = () => D.value.getChat(o.value, e).then((e) => e !== null);
4360
4385
  return t().catch(() => t().catch(() => !1));
4361
4386
  }
4362
4387
  return C(l, async (e) => {
4363
- if (!e || e === Vn) return;
4364
- let t = Vn;
4365
- if (Vn = e, t === void 0) return;
4366
- let n = E.value, r = !T.value && await Hn(n);
4367
- l.value === e && E.value === n && (r ? zt(o.value) : (L.value = [], Tt.value = [], R.value = [], lt.value = [], M.value = [], N.value = [], P.value = {}, await wn(), B.value = ""));
4388
+ if (!e || e === Yn) return;
4389
+ let t = Yn;
4390
+ if (Yn = e, t === void 0) return;
4391
+ let n = E.value, r = !T.value && await Xn(n);
4392
+ l.value === e && E.value === n && (r ? Ut(o.value) : (L.value = [], z.value = [], R.value = [], lt.value = [], M.value = [], N.value = [], P.value = {}, await X(), U.value = ""));
4368
4393
  }), {
4369
4394
  apiClient: D,
4370
4395
  baseUrl: i,
@@ -4395,7 +4420,7 @@ function ui(e) {
4395
4420
  pageAction: ke,
4396
4421
  hostStepTitles: Ne,
4397
4422
  pageControlActive: Pe,
4398
- isWorking: dn,
4423
+ isWorking: _n,
4399
4424
  stopHostActions: k,
4400
4425
  pageNoticeLevel: Ke,
4401
4426
  closePageNotice: qe,
@@ -4411,63 +4436,69 @@ function ui(e) {
4411
4436
  messages: bt,
4412
4437
  conversations: L,
4413
4438
  isLoadingConversations: St,
4439
+ hasMoreConversations: wt,
4440
+ isLoadingMoreConversations: Tt,
4414
4441
  chatFiles: R,
4415
- isLoadingChatFiles: Ct,
4416
- input: B,
4417
- pendingAttachments: V,
4418
- isAttachmentLimitReached: X,
4419
- fileLimitError: Z,
4442
+ isLoadingChatFiles: Dt,
4443
+ input: U,
4444
+ pendingAttachments: W,
4445
+ isAttachmentLimitReached: Fn,
4446
+ fileLimitError: In,
4420
4447
  localChatId: E,
4421
4448
  isConversationBlocked: Ye,
4422
4449
  inputMessagePlaceholder: xt,
4423
4450
  chatError: Je,
4424
- runningChatIds: pn,
4425
- backgroundAnswers: bn,
4426
- openBackgroundAnswer: xn,
4427
- dismissBackgroundAnswer: Sn,
4428
- canQueue: Nt,
4429
- queuedMessages: W,
4430
- removeQueuedMessage: Lt,
4431
- editQueuedMessage: Rt,
4432
- activeView: wt,
4433
- messageFeedbacks: Tt,
4434
- feedbackDialogMessage: Et,
4435
- isFeedbackSubmitting: Dt,
4436
- isFeedbackSubmitted: Ot,
4437
- feedbackSubmitError: kt,
4438
- isLeadSubmitted: At,
4439
- isLoadingSubmitLead: jt,
4440
- submitLeadError: z,
4451
+ runningChatIds: yn,
4452
+ backgroundAnswers: En,
4453
+ openBackgroundAnswer: Dn,
4454
+ dismissBackgroundAnswer: Y,
4455
+ canQueue: Lt,
4456
+ queuedMessages: It,
4457
+ removeQueuedMessage: Vt,
4458
+ editQueuedMessage: Ht,
4459
+ activeView: Ot,
4460
+ inputFocusRequest: kt,
4461
+ messageFeedbacks: z,
4462
+ feedbackDialogMessage: B,
4463
+ isFeedbackSubmitting: V,
4464
+ isFeedbackSubmitted: At,
4465
+ feedbackSubmitError: jt,
4466
+ isLeadSubmitted: Mt,
4467
+ isLoadingSubmitLead: Nt,
4468
+ submitLeadError: H,
4441
4469
  buildDeviceContext: et,
4442
- initialize: an,
4443
- loadConversations: zt,
4444
- loadChatFiles: Bt,
4445
- refreshMessages: en,
4446
- appendMessage: tn,
4447
- getChatFileUrl: Vt,
4448
- getChatFilePreviewUrl: Ht,
4449
- deleteChatFile: Ut,
4450
- handleSubmit: on,
4451
- sendMessage: cn,
4452
- stopGeneration: ln,
4453
- startNewChat: wn,
4454
- regenerate: Tn,
4455
- addToolOutput: En,
4456
- addToolApprovalResponse: Dn,
4457
- handleFileSelect: jn,
4458
- clearFileLimitError: An,
4459
- clearPendingAttachments: Cn,
4460
- onUpvote: Nn,
4461
- onDownvote: Pn,
4462
- onFeedback: Fn,
4463
- onFeedbackSubmit: In,
4464
- onLeadSubmit: Ln,
4465
- navigate: Bn,
4466
- renameChatTitle: Rn,
4467
- deleteChat: zn
4470
+ initialize: dn,
4471
+ loadConversations: Ut,
4472
+ loadMoreConversations: Wt,
4473
+ searchConversations: Gt,
4474
+ loadChatFiles: Kt,
4475
+ refreshMessages: on,
4476
+ appendMessage: sn,
4477
+ getChatFileUrl: qt,
4478
+ getChatFilePreviewUrl: Jt,
4479
+ deleteChatFile: Yt,
4480
+ handleSubmit: fn,
4481
+ sendMessage: mn,
4482
+ stopGeneration: hn,
4483
+ startNewChat: X,
4484
+ regenerate: kn,
4485
+ addToolOutput: Z,
4486
+ addToolApprovalResponse: An,
4487
+ handleFileSelect: Rn,
4488
+ clearFileLimitError: Ln,
4489
+ clearPendingAttachments: On,
4490
+ onUpvote: Bn,
4491
+ onDownvote: Vn,
4492
+ onFeedback: Hn,
4493
+ onFeedbackSubmit: Un,
4494
+ onLeadSubmit: Wn,
4495
+ navigate: qn,
4496
+ focusInput: Jn,
4497
+ renameChatTitle: Gn,
4498
+ deleteChat: Kn
4468
4499
  };
4469
4500
  })();
4470
4501
  }
4471
4502
  export { ut as a, hr as i, ui as n, Gr as r, Kr as t };
4472
4503
 
4473
- //# sourceMappingURL=useChatbotStore-O0u7mVit.js.map
4504
+ //# sourceMappingURL=useChatbotStore-pnj_3y4N.js.map