@pagelines/sdk 1.0.765 → 1.0.767

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,13 @@ 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
+ });
4670
+ },
4671
+ onMetric: (t) => {
4672
+ e.chatController?.logger?.info(t.name, { durationMs: t.durationMs });
4653
4673
  }
4654
4674
  });
4655
4675
  if (!t) {
@@ -4664,15 +4684,15 @@ var kr = [
4664
4684
  "data-voice-state": o.value,
4665
4685
  "data-voice-activity": h.value,
4666
4686
  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, {
4687
+ }, [v("div", fi, [
4688
+ v("div", pi, [x(ze, {
4669
4689
  agent: e.agent,
4670
4690
  "show-status": !1,
4671
4691
  "show-owner-mark": !1,
4672
4692
  "is-light": e.isLight,
4673
4693
  class: "size-28"
4674
4694
  }, null, 8, ["agent", "is-light"])]),
4675
- v("div", fi, [(j(!0), _(f, null, P(se.value, (e, t) => (j(), _("span", {
4695
+ v("div", mi, [(j(!0), _(f, null, P(se.value, (e, t) => (j(), _("span", {
4676
4696
  key: t,
4677
4697
  "data-test": "voice-histogram-bar",
4678
4698
  class: T(["w-[2.5px] rounded-full transition-colors duration-150", [R.value, h.value === "connecting" ? "pl-voice-bar-wave" : ""]]),
@@ -4681,27 +4701,27 @@ var kr = [
4681
4701
  ...h.value === "connecting" ? { animationDelay: `${t * 90}ms` } : {}
4682
4702
  })
4683
4703
  }, null, 6))), 128))]),
4684
- v("div", pi, I(ue.value), 1)
4685
- ])], 8, li));
4704
+ v("div", hi, I(ue.value), 1)
4705
+ ])], 8, di));
4686
4706
  }
4687
- }), vi = {
4707
+ }), bi = {
4688
4708
  key: 0,
4689
4709
  class: "pb-4"
4690
- }, yi = {
4710
+ }, xi = {
4691
4711
  key: 1,
4692
4712
  "data-test": "messaging-sdk-header",
4693
4713
  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 = {
4714
+ }, 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
4715
  key: 0,
4696
4716
  class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
4697
- }, wi = {
4717
+ }, Ei = {
4698
4718
  key: 0,
4699
4719
  "data-test": "messaging-empty-state",
4700
4720
  class: "flex flex-col items-center justify-center px-4"
4701
- }, Ti = ["title"], Ei = {
4721
+ }, Di = ["title"], Oi = {
4702
4722
  key: 0,
4703
4723
  class: "flex items-center gap-3 py-3 px-2"
4704
- }, Di = ["data-journal-outcome"], Oi = [
4724
+ }, ki = ["data-journal-outcome"], Ai = [
4705
4725
  "data-message-id",
4706
4726
  "data-message-sender",
4707
4727
  "data-conversation-id",
@@ -4712,7 +4732,7 @@ var kr = [
4712
4732
  "data-issue-action-label",
4713
4733
  "data-issue-action-url",
4714
4734
  "data-streaming"
4715
- ], ki = { class: "max-w-[85%] min-w-0" }, Ai = ["href"], ji = [
4735
+ ], ji = { class: "max-w-[85%] min-w-0" }, Mi = ["href"], Ni = [
4716
4736
  "data-message-id",
4717
4737
  "data-message-sender",
4718
4738
  "data-conversation-id",
@@ -4721,7 +4741,7 @@ var kr = [
4721
4741
  "data-issue-code",
4722
4742
  "data-issue-bucket",
4723
4743
  "data-streaming"
4724
- ], Mi = [
4744
+ ], Pi = [
4725
4745
  "data-test",
4726
4746
  "data-message-id",
4727
4747
  "data-message-sender",
@@ -4731,61 +4751,61 @@ var kr = [
4731
4751
  "data-streaming",
4732
4752
  "data-queued",
4733
4753
  "aria-label"
4734
- ], Ni = ["src", "alt"], Pi = ["src"], Fi = ["href"], Ii = {
4754
+ ], Fi = ["src", "alt"], Ii = ["src"], Li = ["href"], Ri = {
4735
4755
  key: 0,
4736
4756
  "data-test": "messaging-message-text-part"
4737
- }, Li = [
4757
+ }, zi = [
4738
4758
  "src",
4739
4759
  "alt",
4740
4760
  "data-attachment-placement"
4741
- ], Ri = ["src", "data-attachment-placement"], zi = ["href", "data-attachment-placement"], Bi = ["data-journal-outcome"], Vi = {
4761
+ ], Bi = ["src", "data-attachment-placement"], Vi = ["href", "data-attachment-placement"], Hi = ["data-journal-outcome"], Ui = {
4742
4762
  key: 2,
4743
4763
  "data-test": "messaging-tool-activity-tail",
4744
4764
  "aria-label": "Assistant is still working",
4745
4765
  class: "mb-4 grid h-[17px] w-5 place-items-center"
4746
- }, Hi = ["data-journal-outcome"], Ui = ["data-test", "data-working-description"], Wi = {
4766
+ }, Wi = ["data-journal-outcome"], Gi = ["data-test", "data-working-description"], Ki = {
4747
4767
  class: "flex items-center gap-[5px]",
4748
4768
  "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 = {
4769
+ }, qi = { class: "truncate" }, Ji = ["data-issue-code"], Yi = ["href"], Xi = ["src", "alt"], Zi = { class: "max-w-20 truncate" }, Qi = ["onClick"], $i = {
4750
4770
  key: 0,
4751
4771
  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 = [
4772
+ }, 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
4773
  "disabled",
4754
4774
  "aria-label",
4755
4775
  "title"
4756
- ], ra = {
4776
+ ], aa = {
4757
4777
  key: 0,
4758
4778
  class: "i-svg-spinners-ring-resize size-5"
4759
- }, ia = {
4779
+ }, oa = {
4760
4780
  key: 1,
4761
4781
  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 = [
4782
+ }, sa = { class: "sr-only" }, ca = { class: "flex items-center gap-2" }, la = ["aria-label", "title"], ua = { class: "sr-only" }, da = [
4763
4783
  "disabled",
4764
4784
  "aria-label",
4765
4785
  "title"
4766
- ], ua = {
4786
+ ], fa = {
4767
4787
  class: "flex h-4 items-center gap-[2px]",
4768
4788
  "aria-hidden": "true"
4769
- }, da = [
4789
+ }, pa = [
4770
4790
  "data-composer-action",
4771
4791
  "disabled",
4772
4792
  "aria-label",
4773
4793
  "title"
4774
- ], fa = {
4794
+ ], ma = {
4775
4795
  key: 0,
4776
4796
  class: "i-tabler-player-stop-filled size-3.5"
4777
- }, pa = {
4797
+ }, ha = {
4778
4798
  key: 1,
4779
4799
  class: "i-tabler-arrow-up size-[17px]"
4780
- }, ma = { class: "sr-only" }, ha = {
4800
+ }, ga = { class: "sr-only" }, _a = {
4781
4801
  key: 2,
4782
4802
  "data-test": "messaging-ai-disclosure",
4783
4803
  class: "mt-2.5 text-center text-[12px] text-theme-300"
4784
- }, ga = {
4804
+ }, va = {
4785
4805
  key: 3,
4786
4806
  "data-test": "messaging-suggested-prompts",
4787
4807
  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({
4808
+ }, 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
4809
  __name: "ElAgentChat",
4790
4810
  props: {
4791
4811
  chatController: {},
@@ -5021,19 +5041,19 @@ var kr = [
5021
5041
  "data-test": "messaging-root",
5022
5042
  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
5043
  }, [
5024
- e.showHeader && !K.value ? (j(), _("div", vi, [x(Pe, {
5044
+ e.showHeader && !K.value ? (j(), _("div", bi, [x(Pe, {
5025
5045
  agent: e.agent,
5026
5046
  "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" : ""]) }, [
5047
+ }, 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
5048
  x(ze, {
5029
5049
  agent: e.agent,
5030
5050
  "is-light": K.value,
5031
5051
  class: "size-10"
5032
5052
  }, 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)
5053
+ v("div", Si, [v("div", Ci, I(e.agent.displayName.value), 1), v("div", wi, I(e.agent.title.value || "Assistant"), 1)]),
5054
+ e.headerMeta ? (j(), _("span", Ti, I(e.headerMeta), 1)) : h("", !0)
5035
5055
  ], 2)])) : h("", !0),
5036
- We.value ? (j(), m(_i, {
5056
+ We.value ? (j(), m(yi, {
5037
5057
  key: 2,
5038
5058
  ref_key: "voiceMode",
5039
5059
  ref: Ge,
@@ -5057,7 +5077,7 @@ var kr = [
5057
5077
  class: T(B.value.length === 0 ? "flex-none" : "flex-1")
5058
5078
  }, {
5059
5079
  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", {
5080
+ B.value.length === 0 && !S.value ? (j(), _("div", Ei, [re(t.$slots, "empty-heading", {
5061
5081
  agent: e.agent,
5062
5082
  isLight: K.value
5063
5083
  }, () => [x(ze, {
@@ -5067,9 +5087,9 @@ var kr = [
5067
5087
  }, 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
5088
  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
5089
  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),
5090
+ }, [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
5091
  (j(!0), _(f, null, P(B.value, (e, t) => (j(), _(f, { key: e.id }, [
5072
- shouldShowTimeDivider(B.value, t) ? (j(), _("div", Ei, [
5092
+ shouldShowTimeDivider(B.value, t) ? (j(), _("div", Oi, [
5073
5093
  v("div", { class: T(["flex-1 h-px", Ze.value]) }, null, 2),
5074
5094
  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
5095
  v("div", { class: T(["flex-1 h-px", Ze.value]) }, null, 2)
@@ -5082,7 +5102,7 @@ var kr = [
5082
5102
  }, [x(Je, {
5083
5103
  model: messageWorkJournal(e),
5084
5104
  "is-light": K.value
5085
- }, null, 8, ["model", "is-light"])], 8, Di)) : h("", !0),
5105
+ }, null, 8, ["model", "is-light"])], 8, ki)) : h("", !0),
5086
5106
  isSystemExplainerMessage(e) ? (j(), _("div", {
5087
5107
  key: 2,
5088
5108
  "data-test": "messaging-system-msg",
@@ -5097,7 +5117,7 @@ var kr = [
5097
5117
  "data-issue-action-url": e.issue?.actionUrl,
5098
5118
  "data-streaming": e.id === ye.value ? "true" : void 0,
5099
5119
  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, {
5120
+ }, [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
5121
  key: 0,
5102
5122
  text: e.text,
5103
5123
  inverted: !K.value,
@@ -5118,7 +5138,7 @@ var kr = [
5118
5138
  "data-test": "messaging-system-msg-action",
5119
5139
  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
5140
  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", {
5141
+ }, [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
5142
  key: 3,
5123
5143
  "data-test": "messaging-system-status-msg",
5124
5144
  "data-message-id": e.id,
@@ -5137,7 +5157,7 @@ var kr = [
5137
5157
  text: e.text,
5138
5158
  inverted: !K.value,
5139
5159
  onClick: o[2] || (o[2] = de(() => {}, ["stop"]))
5140
- }, null, 8, ["text", "inverted"])], 10, ji)) : (j(), _("div", {
5160
+ }, null, 8, ["text", "inverted"])], 10, Ni)) : (j(), _("div", {
5141
5161
  key: 4,
5142
5162
  "data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
5143
5163
  "data-message-id": e.id,
@@ -5167,14 +5187,14 @@ var kr = [
5167
5187
  "data-test": "messaging-attachment",
5168
5188
  "data-attachment-placement": "block",
5169
5189
  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", {
5190
+ }, null, 8, Fi)) : e.type === "audio" ? (j(), _("audio", {
5171
5191
  key: 1,
5172
5192
  src: e.src,
5173
5193
  controls: "",
5174
5194
  "data-test": "messaging-attachment",
5175
5195
  "data-attachment-placement": "block",
5176
5196
  class: "max-w-full"
5177
- }, null, 8, Pi)) : (j(), _("a", {
5197
+ }, null, 8, Ii)) : (j(), _("a", {
5178
5198
  key: 2,
5179
5199
  href: e.src,
5180
5200
  target: "_blank",
@@ -5182,11 +5202,11 @@ var kr = [
5182
5202
  "data-test": "messaging-attachment",
5183
5203
  "data-attachment-placement": "block",
5184
5204
  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", {
5205
+ }, [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
5206
  key: 1,
5187
5207
  "data-test": "messaging-message-content",
5188
5208
  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, {
5209
+ }, [(j(!0), _(f, null, P(messageRenderParts(e), (t) => (j(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (j(), _("div", Ri, [x(ai, {
5190
5210
  text: t.text,
5191
5211
  inverted: e.sender === "user" || !K.value,
5192
5212
  streaming: e.id === ye.value,
@@ -5203,14 +5223,14 @@ var kr = [
5203
5223
  "data-test": "messaging-attachment",
5204
5224
  "data-attachment-placement": t.placement,
5205
5225
  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", {
5226
+ }, null, 8, zi)) : t.kind === "attachment" && t.attachment.type === "audio" ? (j(), _("audio", {
5207
5227
  key: 2,
5208
5228
  src: t.attachment.src,
5209
5229
  controls: "",
5210
5230
  "data-test": "messaging-attachment",
5211
5231
  "data-attachment-placement": t.placement,
5212
5232
  class: "my-2 max-w-full"
5213
- }, null, 8, Ri)) : t.kind === "attachment" ? (j(), _("a", {
5233
+ }, null, 8, Bi)) : t.kind === "attachment" ? (j(), _("a", {
5214
5234
  key: 3,
5215
5235
  href: t.attachment.src,
5216
5236
  target: "_blank",
@@ -5218,7 +5238,7 @@ var kr = [
5218
5238
  "data-test": "messaging-attachment",
5219
5239
  "data-attachment-placement": t.placement,
5220
5240
  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)),
5241
+ }, [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
5242
  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
5243
  key: 0,
5224
5244
  "data-test": "messaging-tool-activity",
@@ -5227,7 +5247,7 @@ var kr = [
5227
5247
  }, [x(Je, {
5228
5248
  model: e.journal,
5229
5249
  "is-light": K.value
5230
- }, null, 8, ["model", "is-light"])], 8, Bi)) : e.kind === "text" && e.content ? (j(), _("div", {
5250
+ }, null, 8, ["model", "is-light"])], 8, Hi)) : e.kind === "text" && e.content ? (j(), _("div", {
5231
5251
  key: 1,
5232
5252
  "data-test": "messaging-live-text-block",
5233
5253
  class: T(["mb-4", K.value ? "text-theme-800" : "text-white/95"])
@@ -5241,7 +5261,7 @@ var kr = [
5241
5261
  "text",
5242
5262
  "inverted",
5243
5263
  "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", {
5264
+ ])], 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
5265
  key: 1,
5246
5266
  "data-test": "messaging-tool-activity",
5247
5267
  "data-journal-outcome": he.value.outcome,
@@ -5249,7 +5269,7 @@ var kr = [
5249
5269
  }, [x(Je, {
5250
5270
  model: he.value,
5251
5271
  "is-light": K.value
5252
- }, null, 8, ["model", "is-light"])], 8, Hi)) : h("", !0)], 64)) : h("", !0)
5272
+ }, null, 8, ["model", "is-light"])], 8, Wi)) : h("", !0)], 64)) : h("", !0)
5253
5273
  ], 64))), 128)),
5254
5274
  be.value ? (j(), _("div", {
5255
5275
  key: 1,
@@ -5258,12 +5278,12 @@ var kr = [
5258
5278
  role: "status",
5259
5279
  "aria-live": "polite",
5260
5280
  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", {
5281
+ }, [v("span", Ki, [(j(), _(f, null, P(3, (e) => v("span", {
5262
5282
  key: e,
5263
5283
  "data-test": "messaging-thinking-dot",
5264
5284
  class: "chat-working-dot size-1.5 rounded-full bg-current",
5265
5285
  style: k({ animationDelay: `${(e - 1) * .18}s` })
5266
- }, null, 4)), 64))]), v("span", Gi, I(be.value), 1)], 10, Ui)) : h("", !0),
5286
+ }, null, 4)), 64))]), v("span", qi, I(be.value), 1)], 10, Gi)) : h("", !0),
5267
5287
  U.value ? (j(), _("div", {
5268
5288
  key: 2,
5269
5289
  "data-test": "messaging-transient-issue",
@@ -5280,8 +5300,8 @@ var kr = [
5280
5300
  href: U.value.actionUrl,
5281
5301
  class: "shrink-0 underline underline-offset-2",
5282
5302
  onClick: o[5] || (o[5] = de(() => {}, ["stop"]))
5283
- }, I(U.value.actionLabel), 9, qi)) : h("", !0)
5284
- ], 10, Ki)) : h("", !0)
5303
+ }, I(U.value.actionLabel), 9, Yi)) : h("", !0)
5304
+ ], 10, Ji)) : h("", !0)
5285
5305
  ], 2)]),
5286
5306
  _: 3
5287
5307
  }, 8, ["class"])], 64)),
@@ -5304,13 +5324,13 @@ var kr = [
5304
5324
  src: e.src,
5305
5325
  alt: e.filename,
5306
5326
  class: T(["size-14 rounded-xl object-cover border", K.value ? "border-black/10" : "border-white/20"])
5307
- }, null, 10, Ji)) : (j(), _("div", {
5327
+ }, null, 10, Xi)) : (j(), _("div", {
5308
5328
  key: 1,
5309
5329
  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", {
5330
+ }, [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
5331
  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
5332
  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),
5333
+ }, [...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
5334
  Ae.value ? (j(), _("input", {
5315
5335
  key: 1,
5316
5336
  ref_key: "fileInput",
@@ -5331,7 +5351,7 @@ var kr = [
5331
5351
  class: T(["flex min-w-0 items-center gap-2 py-1", K.value ? "text-theme-700" : "text-white/80"])
5332
5352
  }, [
5333
5353
  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),
5354
+ v("span", na, I(Ve.value), 1),
5335
5355
  v("span", { class: T(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, I(He.value), 3)
5336
5356
  ], 2)) : ce((j(), _("textarea", {
5337
5357
  key: 0,
@@ -5354,7 +5374,7 @@ var kr = [
5354
5374
  },
5355
5375
  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
5376
  onKeydown: handleKeydown
5357
- }, null, 42, $i)), [[oe, Te.value]]), v("div", ta, [
5377
+ }, null, 42, ta)), [[oe, Te.value]]), v("div", ra, [
5358
5378
  v("button", {
5359
5379
  class: T(["-ml-2 flex size-11 items-center justify-center transition-opacity hover:opacity-70", [
5360
5380
  Ae.value ? "cursor-pointer" : "cursor-default",
@@ -5365,9 +5385,9 @@ var kr = [
5365
5385
  "aria-label": Ae.value ? "Attach file" : "File attachments unavailable",
5366
5386
  title: Ae.value ? "Attach file" : "File attachments unavailable",
5367
5387
  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),
5388
+ }, [De.value ? (j(), _("i", aa)) : (j(), _("i", oa)), v("span", sa, I(Ae.value ? "Attach file" : "File attachments unavailable"), 1)], 10, ia),
5369
5389
  o[33] || (o[33] = v("div", { class: "flex-1" }, null, -1)),
5370
- v("div", oa, [(Re.value || Be.value) && !We.value ? (j(), _("button", {
5390
+ v("div", ca, [(Re.value || Be.value) && !We.value ? (j(), _("button", {
5371
5391
  key: 0,
5372
5392
  "data-test": "messaging-record-audio-btn",
5373
5393
  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 +5402,7 @@ var kr = [
5382
5402
  o[15] || (o[15] = ue(de((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5383
5403
  ],
5384
5404
  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", {
5405
+ }, [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
5406
  key: 1,
5387
5407
  "data-test": "messaging-voice-end-btn",
5388
5408
  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 +5420,7 @@ var kr = [
5400
5420
  "aria-label": Xe.value,
5401
5421
  title: Xe.value,
5402
5422
  onClick: o[17] || (o[17] = (e) => startVoiceConversation())
5403
- }, [v("span", ua, [(j(), _(f, null, P([
5423
+ }, [v("span", fa, [(j(), _(f, null, P([
5404
5424
  7,
5405
5425
  13,
5406
5426
  16,
@@ -5410,7 +5430,7 @@ var kr = [
5410
5430
  key: e,
5411
5431
  class: "w-[2px] rounded-full bg-current",
5412
5432
  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", {
5433
+ }, 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
5434
  key: 0,
5415
5435
  "data-test": "messaging-secondary-stop-btn",
5416
5436
  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 +5448,37 @@ var kr = [
5428
5448
  "aria-label": Le.value,
5429
5449
  title: Le.value,
5430
5450
  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", {
5451
+ }, [Me.value === "stop" ? (j(), _("i", ma)) : (j(), _("i", ha)), v("span", ga, I(Le.value), 1)], 10, pa)], 64))])
5452
+ ])], 10, ea),
5453
+ K.value && e.centered && e.scope === "private" ? (j(), _("div", _a, I(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : h("", !0),
5454
+ !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
5455
  key: e.id,
5436
5456
  type: "button",
5437
5457
  disabled: Se.value,
5438
5458
  "data-test": "messaging-suggested-prompt",
5439
5459
  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
5460
  onClick: (t) => sendSuggestedPrompt(e)
5441
- }, I(e.label), 11, va))), 128)), e.suggestedPrompts.length > 3 ? (j(), _("button", {
5461
+ }, I(e.label), 11, ba))), 128)), e.suggestedPrompts.length > 3 ? (j(), _("button", {
5442
5462
  key: 0,
5443
5463
  type: "button",
5444
5464
  "data-test": "messaging-suggested-prompts-more",
5445
5465
  "aria-expanded": A.value,
5446
5466
  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
5467
  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)
5468
+ }, [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
5469
  ], 2)
5450
5470
  ], 2));
5451
5471
  }
5452
- }), xa = { class: "agent-wrap" }, Sa = {
5472
+ }), Ca = { class: "agent-wrap" }, wa = {
5453
5473
  key: 0,
5454
5474
  class: "flex items-center justify-center h-full"
5455
- }, Ca = {
5475
+ }, Ta = {
5456
5476
  key: 2,
5457
5477
  class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
5458
5478
  role: "status",
5459
5479
  "aria-live": "polite",
5460
5480
  "data-test": "agent-unavailable"
5461
- }, wa = /* @__PURE__ */ S({
5481
+ }, Ea = /* @__PURE__ */ S({
5462
5482
  __name: "AgentWrap",
5463
5483
  props: {
5464
5484
  sdk: {},
@@ -5554,7 +5574,7 @@ var kr = [
5554
5574
  });
5555
5575
  }
5556
5576
  }
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", {
5577
+ 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
5578
  sdk: ae(o),
5559
5579
  agent: c.value,
5560
5580
  context: e.clientContext ?? e.context,
@@ -5562,7 +5582,7 @@ var kr = [
5562
5582
  buttonText: e.buttonText,
5563
5583
  buttonIcon: e.buttonIcon,
5564
5584
  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", {
5585
+ }, 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
5586
  type: "button",
5567
5587
  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
5588
  "data-test": "agent-unavailable-retry",
@@ -5571,6 +5591,6 @@ var kr = [
5571
5591
  }
5572
5592
  });
5573
5593
  //#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 };
5594
+ 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
5595
 
5576
5596
  //# sourceMappingURL=AgentWrap.js.map