@pagelines/sdk 1.0.765 → 1.0.766

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/AgentWrap.js CHANGED
@@ -4581,16 +4581,30 @@ var kr = [
4581
4581
  class: "flex-1 flex flex-col"
4582
4582
  }, [re(e.$slots, "default")], 512)], 34));
4583
4583
  }
4584
- }), li = ["data-voice-state", "data-voice-activity"], ui = { class: "flex flex-1 flex-col items-center justify-center pb-8" }, di = { "data-voice-assistant-avatar": "" }, fi = {
4584
+ }), li = {
4585
+ VOICE_MIC_UNAVAILABLE: "I couldn't reach your microphone. Check that this site is allowed to use it, then try again.",
4586
+ VOICE_AGENT_UNAVAILABLE: "Your assistant didn't pick up. Give it a moment and start the call again.",
4587
+ VOICE_CONNECT_TIMEOUT: "The call took too long to connect. Try again in a moment.",
4588
+ VOICE_CONNECTION_LOST: "The call dropped. Start it again when you're ready.",
4589
+ VOICE_UNAVAILABLE: "Voice isn't available right now. You can keep going by typing.",
4590
+ VOICE_MINT_INVALID: "That call couldn't be started. Refresh the page and try again.",
4591
+ VOICE_PROVIDER_ERROR: "The call ended unexpectedly. Try again, or keep going by typing."
4592
+ }, ui = "The call ended unexpectedly. Try again, or keep going by typing.";
4593
+ function voiceErrorMessage(e) {
4594
+ return e && li[e] || ui;
4595
+ }
4596
+ //#endregion
4597
+ //#region agent/ui/VoiceMode.vue?vue&type=script&setup=true&lang.ts
4598
+ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1 flex-col items-center justify-center pb-8" }, pi = { "data-voice-assistant-avatar": "" }, mi = {
4585
4599
  "data-test": "voice-histogram",
4586
4600
  "aria-hidden": "true",
4587
4601
  class: "mt-10 flex h-4 items-center gap-[3px]"
4588
- }, pi = {
4602
+ }, hi = {
4589
4603
  "data-test": "voice-presence-status",
4590
4604
  role: "status",
4591
4605
  "aria-live": "polite",
4592
4606
  class: "sr-only"
4593
- }, mi = .1, hi = 60, gi = 320, _i = /* @__PURE__ */ S({
4607
+ }, gi = .1, _i = 60, vi = 320, yi = /* @__PURE__ */ S({
4594
4608
  __name: "VoiceMode",
4595
4609
  props: {
4596
4610
  agent: {},
@@ -4618,13 +4632,13 @@ var kr = [
4618
4632
  let t = Math.min(64, Math.max(0, e - oe));
4619
4633
  oe = e;
4620
4634
  let ease = (e, n) => {
4621
- let r = n > e ? hi : gi;
4635
+ let r = n > e ? _i : vi;
4622
4636
  return e + (n - e) * (1 - Math.exp(-t / r));
4623
4637
  };
4624
4638
  A.value = A.value.map((e, t) => ease(e, C.value[t] ?? 0)), !A.value.every((e, t) => Math.abs((C.value[t] ?? 0) - e) <= 5e-4) || C.value.some((e) => e > 0) ? ae = F(easeFrame) : A.value = S;
4625
4639
  }
4626
4640
  function followLevel(e) {
4627
- let gate = (e) => Math.max(0, e - mi) / (1 - mi);
4641
+ let gate = (e) => Math.max(0, e - gi) / (1 - gi);
4628
4642
  if (C.value = b.map((t) => gate(Math.min(1, Math.max(0, e?.[t] ?? i.value)))), re?.matches) {
4629
4643
  A.value = C.value;
4630
4644
  return;
@@ -4649,7 +4663,10 @@ var kr = [
4649
4663
  o.value = e, e === "ended" && (s.value ? m = setTimeout(emitEnd, 1600) : emitEnd());
4650
4664
  },
4651
4665
  onError: (t) => {
4652
- s.value = !0, e.chatController?.notify?.(t.message);
4666
+ s.value = !0, e.chatController?.notify?.(voiceErrorMessage(t.code)), e.chatController?.logger?.warn("voice.session.failed", {
4667
+ code: t.code,
4668
+ providerMessage: t.message
4669
+ });
4653
4670
  }
4654
4671
  });
4655
4672
  if (!t) {
@@ -4664,15 +4681,15 @@ var kr = [
4664
4681
  "data-voice-state": o.value,
4665
4682
  "data-voice-activity": h.value,
4666
4683
  class: "relative flex min-h-0 flex-1 flex-col px-4 pt-8 pb-5"
4667
- }, [v("div", ui, [
4668
- v("div", di, [x(ze, {
4684
+ }, [v("div", fi, [
4685
+ v("div", pi, [x(ze, {
4669
4686
  agent: e.agent,
4670
4687
  "show-status": !1,
4671
4688
  "show-owner-mark": !1,
4672
4689
  "is-light": e.isLight,
4673
4690
  class: "size-28"
4674
4691
  }, null, 8, ["agent", "is-light"])]),
4675
- v("div", fi, [(j(!0), _(f, null, P(se.value, (e, t) => (j(), _("span", {
4692
+ v("div", mi, [(j(!0), _(f, null, P(se.value, (e, t) => (j(), _("span", {
4676
4693
  key: t,
4677
4694
  "data-test": "voice-histogram-bar",
4678
4695
  class: T(["w-[2.5px] rounded-full transition-colors duration-150", [R.value, h.value === "connecting" ? "pl-voice-bar-wave" : ""]]),
@@ -4681,27 +4698,27 @@ var kr = [
4681
4698
  ...h.value === "connecting" ? { animationDelay: `${t * 90}ms` } : {}
4682
4699
  })
4683
4700
  }, null, 6))), 128))]),
4684
- v("div", pi, I(ue.value), 1)
4685
- ])], 8, li));
4701
+ v("div", hi, I(ue.value), 1)
4702
+ ])], 8, di));
4686
4703
  }
4687
- }), vi = {
4704
+ }), bi = {
4688
4705
  key: 0,
4689
4706
  class: "pb-4"
4690
- }, yi = {
4707
+ }, xi = {
4691
4708
  key: 1,
4692
4709
  "data-test": "messaging-sdk-header",
4693
4710
  class: "shrink-0 border-b border-theme-100 px-4 py-3"
4694
- }, bi = { class: "min-w-0 flex-1" }, xi = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, Si = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, Ci = {
4711
+ }, Si = { class: "min-w-0 flex-1" }, Ci = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, wi = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, Ti = {
4695
4712
  key: 0,
4696
4713
  class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
4697
- }, wi = {
4714
+ }, Ei = {
4698
4715
  key: 0,
4699
4716
  "data-test": "messaging-empty-state",
4700
4717
  class: "flex flex-col items-center justify-center px-4"
4701
- }, Ti = ["title"], Ei = {
4718
+ }, Di = ["title"], Oi = {
4702
4719
  key: 0,
4703
4720
  class: "flex items-center gap-3 py-3 px-2"
4704
- }, Di = ["data-journal-outcome"], Oi = [
4721
+ }, ki = ["data-journal-outcome"], Ai = [
4705
4722
  "data-message-id",
4706
4723
  "data-message-sender",
4707
4724
  "data-conversation-id",
@@ -4712,7 +4729,7 @@ var kr = [
4712
4729
  "data-issue-action-label",
4713
4730
  "data-issue-action-url",
4714
4731
  "data-streaming"
4715
- ], ki = { class: "max-w-[85%] min-w-0" }, Ai = ["href"], ji = [
4732
+ ], ji = { class: "max-w-[85%] min-w-0" }, Mi = ["href"], Ni = [
4716
4733
  "data-message-id",
4717
4734
  "data-message-sender",
4718
4735
  "data-conversation-id",
@@ -4721,7 +4738,7 @@ var kr = [
4721
4738
  "data-issue-code",
4722
4739
  "data-issue-bucket",
4723
4740
  "data-streaming"
4724
- ], Mi = [
4741
+ ], Pi = [
4725
4742
  "data-test",
4726
4743
  "data-message-id",
4727
4744
  "data-message-sender",
@@ -4731,61 +4748,61 @@ var kr = [
4731
4748
  "data-streaming",
4732
4749
  "data-queued",
4733
4750
  "aria-label"
4734
- ], Ni = ["src", "alt"], Pi = ["src"], Fi = ["href"], Ii = {
4751
+ ], Fi = ["src", "alt"], Ii = ["src"], Li = ["href"], Ri = {
4735
4752
  key: 0,
4736
4753
  "data-test": "messaging-message-text-part"
4737
- }, Li = [
4754
+ }, zi = [
4738
4755
  "src",
4739
4756
  "alt",
4740
4757
  "data-attachment-placement"
4741
- ], Ri = ["src", "data-attachment-placement"], zi = ["href", "data-attachment-placement"], Bi = ["data-journal-outcome"], Vi = {
4758
+ ], Bi = ["src", "data-attachment-placement"], Vi = ["href", "data-attachment-placement"], Hi = ["data-journal-outcome"], Ui = {
4742
4759
  key: 2,
4743
4760
  "data-test": "messaging-tool-activity-tail",
4744
4761
  "aria-label": "Assistant is still working",
4745
4762
  class: "mb-4 grid h-[17px] w-5 place-items-center"
4746
- }, Hi = ["data-journal-outcome"], Ui = ["data-test", "data-working-description"], Wi = {
4763
+ }, Wi = ["data-journal-outcome"], Gi = ["data-test", "data-working-description"], Ki = {
4747
4764
  class: "flex items-center gap-[5px]",
4748
4765
  "aria-hidden": "true"
4749
- }, Gi = { class: "truncate" }, Ki = ["data-issue-code"], qi = ["href"], Ji = ["src", "alt"], Yi = { class: "max-w-20 truncate" }, Xi = ["onClick"], Zi = {
4766
+ }, qi = { class: "truncate" }, Ji = ["data-issue-code"], Yi = ["href"], Xi = ["src", "alt"], Zi = { class: "max-w-20 truncate" }, Qi = ["onClick"], $i = {
4750
4767
  key: 0,
4751
4768
  class: "shrink-0 flex items-center justify-center size-14"
4752
- }, Qi = ["data-composer-action"], $i = ["placeholder", "disabled"], ea = { class: "font-mono text-sm tabular-nums" }, ta = { class: "mt-2.5 flex items-center" }, na = [
4769
+ }, ea = ["data-composer-action"], ta = ["placeholder", "disabled"], na = { class: "font-mono text-sm tabular-nums" }, ra = { class: "mt-2.5 flex items-center" }, ia = [
4753
4770
  "disabled",
4754
4771
  "aria-label",
4755
4772
  "title"
4756
- ], ra = {
4773
+ ], aa = {
4757
4774
  key: 0,
4758
4775
  class: "i-svg-spinners-ring-resize size-5"
4759
- }, ia = {
4776
+ }, oa = {
4760
4777
  key: 1,
4761
4778
  class: "i-tabler-plus size-5"
4762
- }, aa = { class: "sr-only" }, oa = { class: "flex items-center gap-2" }, sa = ["aria-label", "title"], ca = { class: "sr-only" }, la = [
4779
+ }, sa = { class: "sr-only" }, ca = { class: "flex items-center gap-2" }, la = ["aria-label", "title"], ua = { class: "sr-only" }, da = [
4763
4780
  "disabled",
4764
4781
  "aria-label",
4765
4782
  "title"
4766
- ], ua = {
4783
+ ], fa = {
4767
4784
  class: "flex h-4 items-center gap-[2px]",
4768
4785
  "aria-hidden": "true"
4769
- }, da = [
4786
+ }, pa = [
4770
4787
  "data-composer-action",
4771
4788
  "disabled",
4772
4789
  "aria-label",
4773
4790
  "title"
4774
- ], fa = {
4791
+ ], ma = {
4775
4792
  key: 0,
4776
4793
  class: "i-tabler-player-stop-filled size-3.5"
4777
- }, pa = {
4794
+ }, ha = {
4778
4795
  key: 1,
4779
4796
  class: "i-tabler-arrow-up size-[17px]"
4780
- }, ma = { class: "sr-only" }, ha = {
4797
+ }, ga = { class: "sr-only" }, _a = {
4781
4798
  key: 2,
4782
4799
  "data-test": "messaging-ai-disclosure",
4783
4800
  class: "mt-2.5 text-center text-[12px] text-theme-300"
4784
- }, ga = {
4801
+ }, va = {
4785
4802
  key: 3,
4786
4803
  "data-test": "messaging-suggested-prompts",
4787
4804
  class: "mt-3 w-full sm:mx-auto sm:mt-5 sm:max-w-[720px]"
4788
- }, _a = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, va = ["disabled", "onClick"], ya = ["aria-expanded"], ba = /* @__PURE__ */ S({
4805
+ }, ya = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, ba = ["disabled", "onClick"], xa = ["aria-expanded"], Sa = /* @__PURE__ */ S({
4789
4806
  __name: "ElAgentChat",
4790
4807
  props: {
4791
4808
  chatController: {},
@@ -5021,19 +5038,19 @@ var kr = [
5021
5038
  "data-test": "messaging-root",
5022
5039
  class: T(["@container/chat relative flex h-full flex-col", B.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
5023
5040
  }, [
5024
- e.showHeader && !K.value ? (j(), _("div", vi, [x(Pe, {
5041
+ e.showHeader && !K.value ? (j(), _("div", bi, [x(Pe, {
5025
5042
  agent: e.agent,
5026
5043
  "is-online": s.value
5027
- }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (j(), _("div", yi, [v("div", { class: T(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
5044
+ }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (j(), _("div", xi, [v("div", { class: T(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
5028
5045
  x(ze, {
5029
5046
  agent: e.agent,
5030
5047
  "is-light": K.value,
5031
5048
  class: "size-10"
5032
5049
  }, null, 8, ["agent", "is-light"]),
5033
- v("div", bi, [v("div", xi, I(e.agent.displayName.value), 1), v("div", Si, I(e.agent.title.value || "Assistant"), 1)]),
5034
- e.headerMeta ? (j(), _("span", Ci, I(e.headerMeta), 1)) : h("", !0)
5050
+ v("div", Si, [v("div", Ci, I(e.agent.displayName.value), 1), v("div", wi, I(e.agent.title.value || "Assistant"), 1)]),
5051
+ e.headerMeta ? (j(), _("span", Ti, I(e.headerMeta), 1)) : h("", !0)
5035
5052
  ], 2)])) : h("", !0),
5036
- We.value ? (j(), m(_i, {
5053
+ We.value ? (j(), m(yi, {
5037
5054
  key: 2,
5038
5055
  ref_key: "voiceMode",
5039
5056
  ref: Ge,
@@ -5057,7 +5074,7 @@ var kr = [
5057
5074
  class: T(B.value.length === 0 ? "flex-none" : "flex-1")
5058
5075
  }, {
5059
5076
  default: R(() => [v("div", { class: T([B.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 @lg/chat:px-5 space-y-2" : "pt-4 pb-[120px] px-3 @lg/chat:px-5 space-y-2", e.centered ? B.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
5060
- B.value.length === 0 && !S.value ? (j(), _("div", wi, [re(t.$slots, "empty-heading", {
5077
+ B.value.length === 0 && !S.value ? (j(), _("div", Ei, [re(t.$slots, "empty-heading", {
5061
5078
  agent: e.agent,
5062
5079
  isLight: K.value
5063
5080
  }, () => [x(ze, {
@@ -5067,9 +5084,9 @@ var kr = [
5067
5084
  }, null, 8, ["agent", "is-light"]), v("div", { class: T(["text-base @sm/chat:text-lg font-semibold", K.value ? "text-theme-900" : "text-white"]) }, I(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? h("", !0) : (j(), _(f, { key: 0 }, [v("p", { class: T(["mt-1 text-center text-xs @sm/chat:text-sm", Qe.value]) }, I(e.emptyStateMessage || "Type your message to get started."), 3), v("div", {
5068
5085
  class: T(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", K.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
5069
5086
  title: n.value.tooltip
5070
- }, [v("i", { class: T([n.value.icon, "size-3"]) }, null, 2), v("span", null, I(n.value.label), 1)], 10, Ti)], 64))])) : h("", !0),
5087
+ }, [v("i", { class: T([n.value.icon, "size-3"]) }, null, 2), v("span", null, I(n.value.label), 1)], 10, Di)], 64))])) : h("", !0),
5071
5088
  (j(!0), _(f, null, P(B.value, (e, t) => (j(), _(f, { key: e.id }, [
5072
- shouldShowTimeDivider(B.value, t) ? (j(), _("div", Ei, [
5089
+ shouldShowTimeDivider(B.value, t) ? (j(), _("div", Oi, [
5073
5090
  v("div", { class: T(["flex-1 h-px", Ze.value]) }, null, 2),
5074
5091
  v("span", { class: T(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", Qe.value]) }, I(shouldShowTimeDivider(B.value, t)), 3),
5075
5092
  v("div", { class: T(["flex-1 h-px", Ze.value]) }, null, 2)
@@ -5082,7 +5099,7 @@ var kr = [
5082
5099
  }, [x(Je, {
5083
5100
  model: messageWorkJournal(e),
5084
5101
  "is-light": K.value
5085
- }, null, 8, ["model", "is-light"])], 8, Di)) : h("", !0),
5102
+ }, null, 8, ["model", "is-light"])], 8, ki)) : h("", !0),
5086
5103
  isSystemExplainerMessage(e) ? (j(), _("div", {
5087
5104
  key: 2,
5088
5105
  "data-test": "messaging-system-msg",
@@ -5097,7 +5114,7 @@ var kr = [
5097
5114
  "data-issue-action-url": e.issue?.actionUrl,
5098
5115
  "data-streaming": e.id === ye.value ? "true" : void 0,
5099
5116
  class: "flex gap-2 items-end justify-start mb-4"
5100
- }, [v("div", ki, [v("div", { class: T(["mb-1 pl-1 text-[11px] font-medium", K.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), v("div", { class: T(["pl-1", K.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (j(), m(ai, {
5117
+ }, [v("div", ji, [v("div", { class: T(["mb-1 pl-1 text-[11px] font-medium", K.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), v("div", { class: T(["pl-1", K.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (j(), m(ai, {
5101
5118
  key: 0,
5102
5119
  text: e.text,
5103
5120
  inverted: !K.value,
@@ -5118,7 +5135,7 @@ var kr = [
5118
5135
  "data-test": "messaging-system-msg-action",
5119
5136
  class: T(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", K.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
5120
5137
  onClick: o[1] || (o[1] = de(() => {}, ["stop"]))
5121
- }, [b(I(e.issue.actionLabel) + " ", 1), o[22] || (o[22] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, Ai)) : h("", !0)], 2)])], 8, Oi)) : e.sender === "system" ? (j(), _("div", {
5138
+ }, [b(I(e.issue.actionLabel) + " ", 1), o[22] || (o[22] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, Mi)) : h("", !0)], 2)])], 8, Ai)) : e.sender === "system" ? (j(), _("div", {
5122
5139
  key: 3,
5123
5140
  "data-test": "messaging-system-status-msg",
5124
5141
  "data-message-id": e.id,
@@ -5137,7 +5154,7 @@ var kr = [
5137
5154
  text: e.text,
5138
5155
  inverted: !K.value,
5139
5156
  onClick: o[2] || (o[2] = de(() => {}, ["stop"]))
5140
- }, null, 8, ["text", "inverted"])], 10, ji)) : (j(), _("div", {
5157
+ }, null, 8, ["text", "inverted"])], 10, Ni)) : (j(), _("div", {
5141
5158
  key: 4,
5142
5159
  "data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
5143
5160
  "data-message-id": e.id,
@@ -5167,14 +5184,14 @@ var kr = [
5167
5184
  "data-test": "messaging-attachment",
5168
5185
  "data-attachment-placement": "block",
5169
5186
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5170
- }, null, 8, Ni)) : e.type === "audio" ? (j(), _("audio", {
5187
+ }, null, 8, Fi)) : e.type === "audio" ? (j(), _("audio", {
5171
5188
  key: 1,
5172
5189
  src: e.src,
5173
5190
  controls: "",
5174
5191
  "data-test": "messaging-attachment",
5175
5192
  "data-attachment-placement": "block",
5176
5193
  class: "max-w-full"
5177
- }, null, 8, Pi)) : (j(), _("a", {
5194
+ }, null, 8, Ii)) : (j(), _("a", {
5178
5195
  key: 2,
5179
5196
  href: e.src,
5180
5197
  target: "_blank",
@@ -5182,11 +5199,11 @@ var kr = [
5182
5199
  "data-test": "messaging-attachment",
5183
5200
  "data-attachment-placement": "block",
5184
5201
  class: T(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5185
- }, [o[24] || (o[24] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), b(" " + I(e.filename), 1)], 10, Fi))], 64))), 128))], 2)) : h("", !0), messageRenderParts(e).length ? (j(), _("div", {
5202
+ }, [o[24] || (o[24] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), b(" " + I(e.filename), 1)], 10, Li))], 64))), 128))], 2)) : h("", !0), messageRenderParts(e).length ? (j(), _("div", {
5186
5203
  key: 1,
5187
5204
  "data-test": "messaging-message-content",
5188
5205
  class: T(e.sender === "user" ? K.value ? "rounded-[14px] px-4 py-2.5 bg-theme-100 text-theme-900" : "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : K.value ? "text-theme-800" : "text-white/95")
5189
- }, [(j(!0), _(f, null, P(messageRenderParts(e), (t) => (j(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (j(), _("div", Ii, [x(ai, {
5206
+ }, [(j(!0), _(f, null, P(messageRenderParts(e), (t) => (j(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (j(), _("div", Ri, [x(ai, {
5190
5207
  text: t.text,
5191
5208
  inverted: e.sender === "user" || !K.value,
5192
5209
  streaming: e.id === ye.value,
@@ -5203,14 +5220,14 @@ var kr = [
5203
5220
  "data-test": "messaging-attachment",
5204
5221
  "data-attachment-placement": t.placement,
5205
5222
  class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5206
- }, null, 8, Li)) : t.kind === "attachment" && t.attachment.type === "audio" ? (j(), _("audio", {
5223
+ }, null, 8, zi)) : t.kind === "attachment" && t.attachment.type === "audio" ? (j(), _("audio", {
5207
5224
  key: 2,
5208
5225
  src: t.attachment.src,
5209
5226
  controls: "",
5210
5227
  "data-test": "messaging-attachment",
5211
5228
  "data-attachment-placement": t.placement,
5212
5229
  class: "my-2 max-w-full"
5213
- }, null, 8, Ri)) : t.kind === "attachment" ? (j(), _("a", {
5230
+ }, null, 8, Bi)) : t.kind === "attachment" ? (j(), _("a", {
5214
5231
  key: 3,
5215
5232
  href: t.attachment.src,
5216
5233
  target: "_blank",
@@ -5218,7 +5235,7 @@ var kr = [
5218
5235
  "data-test": "messaging-attachment",
5219
5236
  "data-attachment-placement": t.placement,
5220
5237
  class: T(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5221
- }, [o[25] || (o[25] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), b(" " + I(t.attachment.filename), 1)], 10, zi)) : h("", !0)], 64))), 128))], 2)) : h("", !0)], 2)], 10, Mi)),
5238
+ }, [o[25] || (o[25] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), b(" " + I(t.attachment.filename), 1)], 10, Vi)) : h("", !0)], 64))), 128))], 2)) : h("", !0)], 2)], 10, Pi)),
5222
5239
  e.id === _e.value ? (j(), _(f, { key: 5 }, [F.value.length ? (j(!0), _(f, { key: 0 }, P(F.value, (e) => (j(), _(f, { key: e.id }, [e.kind === "work" ? (j(), _("div", {
5223
5240
  key: 0,
5224
5241
  "data-test": "messaging-tool-activity",
@@ -5227,7 +5244,7 @@ var kr = [
5227
5244
  }, [x(Je, {
5228
5245
  model: e.journal,
5229
5246
  "is-light": K.value
5230
- }, null, 8, ["model", "is-light"])], 8, Bi)) : e.kind === "text" && e.content ? (j(), _("div", {
5247
+ }, null, 8, ["model", "is-light"])], 8, Hi)) : e.kind === "text" && e.content ? (j(), _("div", {
5231
5248
  key: 1,
5232
5249
  "data-test": "messaging-live-text-block",
5233
5250
  class: T(["mb-4", K.value ? "text-theme-800" : "text-white/95"])
@@ -5241,7 +5258,7 @@ var kr = [
5241
5258
  "text",
5242
5259
  "inverted",
5243
5260
  "streaming"
5244
- ])], 2)) : (j(), _("div", Vi, [x(pe, { class: T(["size-3.5", K.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : he.value ? (j(), _("div", {
5261
+ ])], 2)) : (j(), _("div", Ui, [x(pe, { class: T(["size-3.5", K.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : he.value ? (j(), _("div", {
5245
5262
  key: 1,
5246
5263
  "data-test": "messaging-tool-activity",
5247
5264
  "data-journal-outcome": he.value.outcome,
@@ -5249,7 +5266,7 @@ var kr = [
5249
5266
  }, [x(Je, {
5250
5267
  model: he.value,
5251
5268
  "is-light": K.value
5252
- }, null, 8, ["model", "is-light"])], 8, Hi)) : h("", !0)], 64)) : h("", !0)
5269
+ }, null, 8, ["model", "is-light"])], 8, Wi)) : h("", !0)], 64)) : h("", !0)
5253
5270
  ], 64))), 128)),
5254
5271
  be.value ? (j(), _("div", {
5255
5272
  key: 1,
@@ -5258,12 +5275,12 @@ var kr = [
5258
5275
  role: "status",
5259
5276
  "aria-live": "polite",
5260
5277
  class: T(["mb-4 flex items-center gap-2.5 pl-0.5 text-[13.5px] leading-none", K.value ? "text-theme-500" : "text-white/50"])
5261
- }, [v("span", Wi, [(j(), _(f, null, P(3, (e) => v("span", {
5278
+ }, [v("span", Ki, [(j(), _(f, null, P(3, (e) => v("span", {
5262
5279
  key: e,
5263
5280
  "data-test": "messaging-thinking-dot",
5264
5281
  class: "chat-working-dot size-1.5 rounded-full bg-current",
5265
5282
  style: k({ animationDelay: `${(e - 1) * .18}s` })
5266
- }, null, 4)), 64))]), v("span", Gi, I(be.value), 1)], 10, Ui)) : h("", !0),
5283
+ }, null, 4)), 64))]), v("span", qi, I(be.value), 1)], 10, Gi)) : h("", !0),
5267
5284
  U.value ? (j(), _("div", {
5268
5285
  key: 2,
5269
5286
  "data-test": "messaging-transient-issue",
@@ -5280,8 +5297,8 @@ var kr = [
5280
5297
  href: U.value.actionUrl,
5281
5298
  class: "shrink-0 underline underline-offset-2",
5282
5299
  onClick: o[5] || (o[5] = de(() => {}, ["stop"]))
5283
- }, I(U.value.actionLabel), 9, qi)) : h("", !0)
5284
- ], 10, Ki)) : h("", !0)
5300
+ }, I(U.value.actionLabel), 9, Yi)) : h("", !0)
5301
+ ], 10, Ji)) : h("", !0)
5285
5302
  ], 2)]),
5286
5303
  _: 3
5287
5304
  }, 8, ["class"])], 64)),
@@ -5304,13 +5321,13 @@ var kr = [
5304
5321
  src: e.src,
5305
5322
  alt: e.filename,
5306
5323
  class: T(["size-14 rounded-xl object-cover border", K.value ? "border-black/10" : "border-white/20"])
5307
- }, null, 10, Ji)) : (j(), _("div", {
5324
+ }, null, 10, Xi)) : (j(), _("div", {
5308
5325
  key: 1,
5309
5326
  class: T(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", K.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5310
- }, [o[27] || (o[27] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span", Yi, I(e.filename), 1)], 2)), v("button", {
5327
+ }, [o[27] || (o[27] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span", Zi, I(e.filename), 1)], 2)), v("button", {
5311
5328
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
5312
5329
  onClick: (e) => removeAttachment(t)
5313
- }, [...o[28] || (o[28] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Xi)]))), 128)), De.value ? (j(), _("div", Zi, [x(pe, { class: "size-5" })])) : h("", !0)], 2)) : h("", !0),
5330
+ }, [...o[28] || (o[28] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Qi)]))), 128)), De.value ? (j(), _("div", $i, [x(pe, { class: "size-5" })])) : h("", !0)], 2)) : h("", !0),
5314
5331
  Ae.value ? (j(), _("input", {
5315
5332
  key: 1,
5316
5333
  ref_key: "fileInput",
@@ -5331,7 +5348,7 @@ var kr = [
5331
5348
  class: T(["flex min-w-0 items-center gap-2 py-1", K.value ? "text-theme-700" : "text-white/80"])
5332
5349
  }, [
5333
5350
  o[29] || (o[29] = v("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5334
- v("span", ea, I(Ve.value), 1),
5351
+ v("span", na, I(Ve.value), 1),
5335
5352
  v("span", { class: T(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, I(He.value), 3)
5336
5353
  ], 2)) : ce((j(), _("textarea", {
5337
5354
  key: 0,
@@ -5354,7 +5371,7 @@ var kr = [
5354
5371
  },
5355
5372
  class: T(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", K.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5356
5373
  onKeydown: handleKeydown
5357
- }, null, 42, $i)), [[oe, Te.value]]), v("div", ta, [
5374
+ }, null, 42, ta)), [[oe, Te.value]]), v("div", ra, [
5358
5375
  v("button", {
5359
5376
  class: T(["-ml-2 flex size-11 items-center justify-center transition-opacity hover:opacity-70", [
5360
5377
  Ae.value ? "cursor-pointer" : "cursor-default",
@@ -5365,9 +5382,9 @@ var kr = [
5365
5382
  "aria-label": Ae.value ? "Attach file" : "File attachments unavailable",
5366
5383
  title: Ae.value ? "Attach file" : "File attachments unavailable",
5367
5384
  onClick: o[7] || (o[7] = (e) => Ae.value && triggerFileInput())
5368
- }, [De.value ? (j(), _("i", ra)) : (j(), _("i", ia)), v("span", aa, I(Ae.value ? "Attach file" : "File attachments unavailable"), 1)], 10, na),
5385
+ }, [De.value ? (j(), _("i", aa)) : (j(), _("i", oa)), v("span", sa, I(Ae.value ? "Attach file" : "File attachments unavailable"), 1)], 10, ia),
5369
5386
  o[33] || (o[33] = v("div", { class: "flex-1" }, null, -1)),
5370
- v("div", oa, [(Re.value || Be.value) && !We.value ? (j(), _("button", {
5387
+ v("div", ca, [(Re.value || Be.value) && !We.value ? (j(), _("button", {
5371
5388
  key: 0,
5372
5389
  "data-test": "messaging-record-audio-btn",
5373
5390
  class: T(["flex size-11 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70", Be.value ? K.value ? "text-theme-900 scale-110" : "text-white scale-110" : K.value ? "text-theme-500" : "text-white/60"]),
@@ -5382,7 +5399,7 @@ var kr = [
5382
5399
  o[15] || (o[15] = ue(de((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5383
5400
  ],
5384
5401
  onKeyup: [o[12] || (o[12] = ue(de((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), o[14] || (o[14] = ue(de((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5385
- }, [v("i", { class: T([Be.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", ca, I(Ue.value), 1)], 42, sa)) : h("", !0), We.value ? (j(), _("button", {
5402
+ }, [v("i", { class: T([Be.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", ua, I(Ue.value), 1)], 42, la)) : h("", !0), We.value ? (j(), _("button", {
5386
5403
  key: 1,
5387
5404
  "data-test": "messaging-voice-end-btn",
5388
5405
  class: "flex size-11 cursor-pointer items-center justify-center rounded-full bg-red-600 text-white transition-colors duration-150 hover:bg-red-700",
@@ -5400,7 +5417,7 @@ var kr = [
5400
5417
  "aria-label": Xe.value,
5401
5418
  title: Xe.value,
5402
5419
  onClick: o[17] || (o[17] = (e) => startVoiceConversation())
5403
- }, [v("span", ua, [(j(), _(f, null, P([
5420
+ }, [v("span", fa, [(j(), _(f, null, P([
5404
5421
  7,
5405
5422
  13,
5406
5423
  16,
@@ -5410,7 +5427,7 @@ var kr = [
5410
5427
  key: e,
5411
5428
  class: "w-[2px] rounded-full bg-current",
5412
5429
  style: k({ height: `${e}px` })
5413
- }, null, 4)), 64))]), o[31] || (o[31] = v("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, la)) : Be.value ? h("", !0) : (j(), _(f, { key: 3 }, [Fe.value ? (j(), _("button", {
5430
+ }, null, 4)), 64))]), o[31] || (o[31] = v("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, da)) : Be.value ? h("", !0) : (j(), _(f, { key: 3 }, [Fe.value ? (j(), _("button", {
5414
5431
  key: 0,
5415
5432
  "data-test": "messaging-secondary-stop-btn",
5416
5433
  class: T(["mr-2 flex size-11 cursor-pointer items-center justify-center rounded-full transition-colors duration-150", K.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
@@ -5428,37 +5445,37 @@ var kr = [
5428
5445
  "aria-label": Le.value,
5429
5446
  title: Le.value,
5430
5447
  onClick: o[19] || (o[19] = (e) => handleComposerAction())
5431
- }, [Me.value === "stop" ? (j(), _("i", fa)) : (j(), _("i", pa)), v("span", ma, I(Le.value), 1)], 10, da)], 64))])
5432
- ])], 10, Qi),
5433
- K.value && e.centered && e.scope === "private" ? (j(), _("div", ha, I(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : h("", !0),
5434
- !We.value && B.value.length === 0 && e.suggestedPrompts.length > 0 ? (j(), _("div", ga, [v("div", _a, [(j(!0), _(f, null, P(e.suggestedPrompts, (e, t) => (j(), _("button", {
5448
+ }, [Me.value === "stop" ? (j(), _("i", ma)) : (j(), _("i", ha)), v("span", ga, I(Le.value), 1)], 10, pa)], 64))])
5449
+ ])], 10, ea),
5450
+ K.value && e.centered && e.scope === "private" ? (j(), _("div", _a, I(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : h("", !0),
5451
+ !We.value && B.value.length === 0 && e.suggestedPrompts.length > 0 ? (j(), _("div", va, [v("div", ya, [(j(!0), _(f, null, P(e.suggestedPrompts, (e, t) => (j(), _("button", {
5435
5452
  key: e.id,
5436
5453
  type: "button",
5437
5454
  disabled: Se.value,
5438
5455
  "data-test": "messaging-suggested-prompt",
5439
5456
  class: T(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", [Se.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !A.value && t >= 3 ? "max-sm:hidden" : ""]]),
5440
5457
  onClick: (t) => sendSuggestedPrompt(e)
5441
- }, I(e.label), 11, va))), 128)), e.suggestedPrompts.length > 3 ? (j(), _("button", {
5458
+ }, I(e.label), 11, ba))), 128)), e.suggestedPrompts.length > 3 ? (j(), _("button", {
5442
5459
  key: 0,
5443
5460
  type: "button",
5444
5461
  "data-test": "messaging-suggested-prompts-more",
5445
5462
  "aria-expanded": A.value,
5446
5463
  class: "flex w-full cursor-pointer items-center justify-center gap-1.5 rounded-2xl px-4 py-3 text-[14px] font-medium text-theme-600 ring-1 ring-theme-200 transition-colors hover:bg-theme-50 hover:text-theme-900 sm:hidden",
5447
5464
  onClick: o[20] || (o[20] = (e) => A.value = !A.value)
5448
- }, [b(I(A.value ? "See less" : "See more") + " ", 1), v("i", { class: T(["i-tabler-chevron-down size-4 transition-transform", A.value ? "rotate-180" : ""]) }, null, 2)], 8, ya)) : h("", !0)])])) : h("", !0)
5465
+ }, [b(I(A.value ? "See less" : "See more") + " ", 1), v("i", { class: T(["i-tabler-chevron-down size-4 transition-transform", A.value ? "rotate-180" : ""]) }, null, 2)], 8, xa)) : h("", !0)])])) : h("", !0)
5449
5466
  ], 2)
5450
5467
  ], 2));
5451
5468
  }
5452
- }), xa = { class: "agent-wrap" }, Sa = {
5469
+ }), Ca = { class: "agent-wrap" }, wa = {
5453
5470
  key: 0,
5454
5471
  class: "flex items-center justify-center h-full"
5455
- }, Ca = {
5472
+ }, Ta = {
5456
5473
  key: 2,
5457
5474
  class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
5458
5475
  role: "status",
5459
5476
  "aria-live": "polite",
5460
5477
  "data-test": "agent-unavailable"
5461
- }, wa = /* @__PURE__ */ S({
5478
+ }, Ea = /* @__PURE__ */ S({
5462
5479
  __name: "AgentWrap",
5463
5480
  props: {
5464
5481
  sdk: {},
@@ -5554,7 +5571,7 @@ var kr = [
5554
5571
  });
5555
5572
  }
5556
5573
  }
5557
- return te(loadAgent), (t, n) => (j(), _("div", xa, [s.value ? (j(), _("div", Sa, [v("div", { class: T(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? re(t.$slots, "default", {
5574
+ return te(loadAgent), (t, n) => (j(), _("div", Ca, [s.value ? (j(), _("div", wa, [v("div", { class: T(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? re(t.$slots, "default", {
5558
5575
  sdk: ae(o),
5559
5576
  agent: c.value,
5560
5577
  context: e.clientContext ?? e.context,
@@ -5562,7 +5579,7 @@ var kr = [
5562
5579
  buttonText: e.buttonText,
5563
5580
  buttonIcon: e.buttonIcon,
5564
5581
  loading: s.value
5565
- }, void 0, void 0, 1) : u.value ? (j(), _("div", Ca, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
5582
+ }, void 0, void 0, 1) : u.value ? (j(), _("div", Ta, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
5566
5583
  type: "button",
5567
5584
  class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
5568
5585
  "data-test": "agent-unavailable-retry",
@@ -5571,6 +5588,6 @@ var kr = [
5571
5588
  }
5572
5589
  });
5573
5590
  //#endregion
5574
- export { Pe as a, we as c, parseButtonTemplate as d, AgentChatController as f, pe as h, ai as i, getAgentAvatarUrl as l, n as m, ba as n, Oe as o, he as p, _i as r, Ee as s, wa as t, handleImageError as u };
5591
+ export { Pe as a, we as c, parseButtonTemplate as d, AgentChatController as f, pe as h, ai as i, getAgentAvatarUrl as l, n as m, Sa as n, Oe as o, he as p, yi as r, Ee as s, Ea as t, handleImageError as u };
5575
5592
 
5576
5593
  //# sourceMappingURL=AgentWrap.js.map