@pagelines/sdk 1.0.728 → 1.0.730

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
@@ -1,9 +1,9 @@
1
1
  import "./rolldown-runtime.js";
2
2
  import { s as e, t } from "./sdkClient.js";
3
3
  import { Agent as n, CHAT_ISSUE_COPY as r, SettingsObject as i, createLogger as a, getDefaultAvatarUrl as o, isAssistantSilenceControl as s, parseChatCardFencePayload as c, parseChatVisualFencePayload as u } from "@pagelines/core";
4
- import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as _, createElementVNode as v, createTextVNode as te, createVNode as b, defineComponent as x, nextTick as ne, normalizeClass as S, normalizeStyle as C, onBeforeUnmount as re, onMounted as ie, onUnmounted as ae, openBlock as T, ref as k, renderList as A, renderSlot as oe, resolveDynamicComponent as j, shallowRef as se, toDisplayString as P, unref as ce, vModelText as ue, watch as de, withCtx as F, withDirectives as pe, withKeys as he, withModifiers as I } from "vue";
4
+ import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as _, createElementVNode as v, createTextVNode as te, createVNode as b, defineComponent as x, nextTick as ne, normalizeClass as S, normalizeStyle as C, onBeforeUnmount as re, onMounted as ie, onUnmounted as ae, openBlock as T, ref as k, renderList as A, renderSlot as oe, resolveDynamicComponent as j, shallowRef as P, toDisplayString as F, unref as se, vModelText as ce, watch as ue, withCtx as I, withDirectives as de, withKeys as pe, withModifiers as R } from "vue";
5
5
  //#region ui/FSpinner.vue?vue&type=script&setup=true&lang.ts
6
- var R = { class: "spinner max-w-sm" }, z = {
6
+ var he = { class: "spinner max-w-sm" }, z = {
7
7
  class: "ring-circular h-full w-full origin-center",
8
8
  viewBox: "25 25 50 50"
9
9
  }, _e = /* @__PURE__ */ x({
@@ -19,7 +19,7 @@ var R = { class: "spinner max-w-sm" }, z = {
19
19
  }
20
20
  },
21
21
  setup(e) {
22
- return (t, n) => (T(), _("div", R, [(T(), _("svg", z, [v("circle", {
22
+ return (t, n) => (T(), _("div", he, [(T(), _("svg", z, [v("circle", {
23
23
  class: S([e.colorMode, "ring-path"]),
24
24
  cx: "50",
25
25
  cy: "50",
@@ -401,7 +401,7 @@ var AgentChatController = class extends i {
401
401
  super("AgentChatController", t), e(this, "isTextMode", !1), e(this, "lastMessage", {
402
402
  hash: "",
403
403
  time: 0
404
- }), e(this, "isConnecting", !1), e(this, "activeTurnGeneration", 0), e(this, "boundaryTimer", void 0), e(this, "nowMs", se(Date.now())), e(this, "toolActivityTiming", se({})), e(this, "lastVisibleProgressAtMs", se()), e(this, "liveSegments", se([])), e(this, "liveStreamMessageId", se(void 0)), e(this, "conversationId", void 0), e(this, "textState", k({
404
+ }), e(this, "isConnecting", !1), e(this, "activeTurnGeneration", 0), e(this, "boundaryTimer", void 0), e(this, "nowMs", P(Date.now())), e(this, "toolActivityTiming", P({})), e(this, "lastVisibleProgressAtMs", P()), e(this, "liveSegments", P([])), e(this, "liveStreamMessageId", P(void 0)), e(this, "conversationId", void 0), e(this, "textState", k({
405
405
  isActive: !1,
406
406
  isConnected: !1,
407
407
  isThinking: !1,
@@ -577,7 +577,7 @@ Current User:
577
577
  });
578
578
  }
579
579
  setupBoundaryWatcher() {
580
- de(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
580
+ ue(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
581
581
  this.scheduleBoundary(e);
582
582
  });
583
583
  }
@@ -639,12 +639,12 @@ Current User:
639
639
  });
640
640
  }
641
641
  setupModeWatcher() {
642
- de(this.agentMode, async (e, t) => {
642
+ ue(this.agentMode, async (e, t) => {
643
643
  this.logger.info(`Mode changed from ${t} to ${e}`), this.isTextMode && (t === "talk" || t === "chat") && await this.endConversation();
644
644
  });
645
645
  }
646
646
  setupAvailabilityWatcher() {
647
- de(() => this.chatEnabled, (e) => {
647
+ ue(() => this.chatEnabled, (e) => {
648
648
  if (!(!this.isTextMode || this.isConnecting)) {
649
649
  if (e) {
650
650
  this.textState.value.isConnected || this.updateState(this.textState, {
@@ -1067,11 +1067,11 @@ var we = {
1067
1067
  src: e.agent.avatarUrl.value,
1068
1068
  alt: e.agent.displayName.value,
1069
1069
  class: "w-full h-full object-cover",
1070
- onError: n[0] || (n[0] = (...e) => ce(handleImageError) && ce(handleImageError)(...e))
1070
+ onError: n[0] || (n[0] = (...e) => se(handleImageError) && se(handleImageError)(...e))
1071
1071
  }, null, 40, Ae)], 2), v("div", je, [e.isOnline ? (T(), _(f, { key: 0 }, [n[1] || (n[1] = v("div", {
1072
1072
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
1073
1073
  style: { "animation-duration": "3s" }
1074
- }, null, -1)), n[2] || (n[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (T(), _("div", Me))])]), v("div", Ne, [v("h1", { class: S(["font-light text-white mb-1 truncate", [e.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight", e.layout === "horizontal" ? "text-white/95" : ""]]) }, P(e.agent.displayName.value), 3), v("p", { class: S(["font-light line-clamp-1", [e.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base", e.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"]]) }, P(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1074
+ }, null, -1)), n[2] || (n[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (T(), _("div", Me))])]), v("div", Ne, [v("h1", { class: S(["font-light text-white mb-1 truncate", [e.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight", e.layout === "horizontal" ? "text-white/95" : ""]]) }, F(e.agent.displayName.value), 3), v("p", { class: S(["font-light line-clamp-1", [e.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base", e.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"]]) }, F(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1075
1075
  }
1076
1076
  }), Fe = { class: "relative shrink-0 rounded-full" }, Ie = ["src", "alt"], Le = ["src", "alt"], Re = ["aria-label"], ze = /* @__PURE__ */ x({
1077
1077
  __name: "AgentAvatar",
@@ -1133,7 +1133,7 @@ var we = {
1133
1133
  class: "sr-only",
1134
1134
  role: "status",
1135
1135
  "aria-live": "polite"
1136
- }, K = ["aria-expanded", "disabled"], Ve = ["aria-expanded"], He = {
1136
+ }, Ve = ["aria-expanded", "disabled"], He = ["aria-expanded"], K = {
1137
1137
  class: "flex w-5 shrink-0 justify-center self-stretch",
1138
1138
  "aria-hidden": "true"
1139
1139
  }, Ue = ["data-journal-row"], We = {
@@ -1149,7 +1149,7 @@ var we = {
1149
1149
  isLight: { type: Boolean }
1150
1150
  },
1151
1151
  setup(e) {
1152
- let t = e, n = se(!1);
1152
+ let t = e, n = P(!1);
1153
1153
  function toggle() {
1154
1154
  n.value = !n.value;
1155
1155
  }
@@ -1220,7 +1220,7 @@ var we = {
1220
1220
  };
1221
1221
  });
1222
1222
  return (t, u) => (T(), _("div", { class: S(["w-full py-0.5", s.value.muted]) }, [
1223
- a.value ? (T(), _("span", Be, P(a.value), 1)) : h("", !0),
1223
+ a.value ? (T(), _("span", Be, F(a.value), 1)) : h("", !0),
1224
1224
  r.value ? (T(), _("button", {
1225
1225
  key: 1,
1226
1226
  type: "button",
@@ -1236,13 +1236,13 @@ var we = {
1236
1236
  class: "i-tabler-circle-check size-3.5 shrink-0 text-green-600",
1237
1237
  "aria-hidden": "true"
1238
1238
  }, null, -1)),
1239
- v("span", { class: S(["text-[12.5px] font-medium leading-none", s.value.muted]) }, P(e.model.terminal?.label), 3),
1239
+ v("span", { class: S(["text-[12.5px] font-medium leading-none", s.value.muted]) }, F(e.model.terminal?.label), 3),
1240
1240
  i.value ? (T(), _("i", {
1241
1241
  key: 0,
1242
1242
  class: S(["size-[13px] shrink-0", [n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right", s.value.muted]]),
1243
1243
  "aria-hidden": "true"
1244
1244
  }, null, 2)) : h("", !0)
1245
- ], 10, K)) : i.value ? (T(), _("button", {
1245
+ ], 10, Ve)) : i.value ? (T(), _("button", {
1246
1246
  key: 2,
1247
1247
  type: "button",
1248
1248
  "data-test": "messaging-tool-activity-summary",
@@ -1250,13 +1250,13 @@ var we = {
1250
1250
  "aria-expanded": n.value,
1251
1251
  class: S(["flex min-h-11 w-full gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", s.value.ring]),
1252
1252
  onClick: toggle
1253
- }, [v("span", He, [v("span", {
1253
+ }, [v("span", K, [v("span", {
1254
1254
  "data-journal-spine": "dashed",
1255
1255
  class: S(["w-0 border-l border-dashed", s.value.dashed])
1256
- }, null, 2)]), v("span", { class: S(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [te(P(i.value) + " earlier updates ", 1), v("i", {
1256
+ }, null, 2)]), v("span", { class: S(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [te(F(i.value) + " earlier updates ", 1), v("i", {
1257
1257
  class: S(["size-3 shrink-0", n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1258
1258
  "aria-hidden": "true"
1259
- }, null, 2)], 2)], 10, Ve)) : h("", !0),
1259
+ }, null, 2)], 2)], 10, He)) : h("", !0),
1260
1260
  (T(!0), _(f, null, A(o.value, (e, t) => (T(), _("div", {
1261
1261
  key: e.id,
1262
1262
  "data-test": "messaging-tool-activity-row",
@@ -1268,15 +1268,15 @@ var we = {
1268
1268
  }, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? h("", !0) : (T(), _("span", {
1269
1269
  key: 0,
1270
1270
  class: S(["w-px flex-1", s.value.spine])
1271
- }, null, 2))]), v("div", { class: S(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [v("span", { class: S(["relative block leading-snug", c.value[e.tone].label]) }, [te(P(e.label), 1), c.value[e.tone].statusWord ? (T(), _("span", Ke, ", " + P(c.value[e.tone].statusWord), 1)) : h("", !0)], 2), e.note ? (T(), _("p", {
1271
+ }, null, 2))]), v("div", { class: S(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [v("span", { class: S(["relative block leading-snug", c.value[e.tone].label]) }, [te(F(e.label), 1), c.value[e.tone].statusWord ? (T(), _("span", Ke, ", " + F(c.value[e.tone].statusWord), 1)) : h("", !0)], 2), e.note ? (T(), _("p", {
1272
1272
  key: 0,
1273
1273
  class: S(["pt-0.5 text-[11.5px] leading-snug", s.value.muted])
1274
- }, P(e.note), 3)) : h("", !0)], 2)], 10, Ue))), 128)),
1274
+ }, F(e.note), 3)) : h("", !0)], 2)], 10, Ue))), 128)),
1275
1275
  !r.value && e.model.hint ? (T(), _("p", {
1276
1276
  key: 3,
1277
1277
  "data-test": "messaging-tool-activity-hint",
1278
1278
  class: S(["pl-[30px] pt-2.5 text-[12px] leading-snug", s.value.muted])
1279
- }, P(e.model.hint), 3)) : h("", !0)
1279
+ }, F(e.model.hint), 3)) : h("", !0)
1280
1280
  ], 2));
1281
1281
  }
1282
1282
  });
@@ -1562,9 +1562,9 @@ function createDOMPurify() {
1562
1562
  }
1563
1563
  }, oe = function _getDefaultTrustedTypesPolicy() {
1564
1564
  return ie || (re = Yt(u, r), ie = !0), re;
1565
- }, j = t, se = j.implementation, P = j.createNodeIterator, ce = j.createDocumentFragment, ue = j.getElementsByTagName, de = n.importNode, F = Xt();
1566
- DOMPurify.isSupported = typeof Je == "function" && typeof v == "function" && se && se.createHTMLDocument !== void 0;
1567
- let pe = Nt, he = Pt, I = Ft, R = It, z = Lt, _e = zt, ve = Bt, B = Ht, ye = Rt, H = null, be = addToSet({}, [
1565
+ }, j = t, P = j.implementation, F = j.createNodeIterator, se = j.createDocumentFragment, ce = j.getElementsByTagName, ue = n.importNode, I = Xt();
1566
+ DOMPurify.isSupported = typeof Je == "function" && typeof v == "function" && P && P.createHTMLDocument !== void 0;
1567
+ let de = Nt, pe = Pt, R = Ft, he = It, z = Lt, _e = zt, ve = Bt, B = Ht, ye = Rt, H = null, be = addToSet({}, [
1568
1568
  ...St,
1569
1569
  ...Ct,
1570
1570
  ...wt,
@@ -1607,7 +1607,7 @@ function createDOMPurify() {
1607
1607
  enumerable: !0,
1608
1608
  value: null
1609
1609
  }
1610
- })), Ee = !0, De = !0, Oe = !1, ke = !0, G = !1, Ae = !0, je = !1, Me = !1, Ne = null, Pe = null, Fe = !1, Ie = !1, Le = !1, Re = !1, ze = !0, Be = !1, K = "user-content-", Ve = !0, He = !1, Ue = {}, We = null, Ge = addToSet({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ke = null, qe = addToSet({}, [
1610
+ })), Ee = !0, De = !0, Oe = !1, ke = !0, G = !1, Ae = !0, je = !1, Me = !1, Ne = null, Pe = null, Fe = !1, Ie = !1, Le = !1, Re = !1, ze = !0, Be = !1, Ve = "user-content-", He = !0, K = !1, Ue = {}, We = null, Ge = addToSet({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ke = null, qe = addToSet({}, [
1611
1611
  "audio",
1612
1612
  "video",
1613
1613
  "img",
@@ -1656,9 +1656,9 @@ function createDOMPurify() {
1656
1656
  }), Ke = Zt(e, "ADD_DATA_URI_TAGS", qe, {
1657
1657
  transform: Q,
1658
1658
  base: qe
1659
- }), We = Zt(e, "FORBID_CONTENTS", Ge, { transform: Q }), Ce = Zt(e, "FORBID_TAGS", clone({}), { transform: Q }), we = Zt(e, "FORBID_ATTR", clone({}), { transform: Q }), Ue = X(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Ee = e.ALLOW_ARIA_ATTR !== !1, De = e.ALLOW_DATA_ATTR !== !1, Oe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ke = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = e.SAFE_FOR_TEMPLATES || !1, Ae = e.SAFE_FOR_XML !== !1, je = e.WHOLE_DOCUMENT || !1, Ie = e.RETURN_DOM || !1, Le = e.RETURN_DOM_FRAGMENT || !1, Re = e.RETURN_TRUSTED_TYPE || !1, Fe = e.FORCE_BODY || !1, ze = e.SANITIZE_DOM !== !1, Be = e.SANITIZE_NAMED_PROPS || !1, Ve = e.KEEP_CONTENT !== !1, He = e.IN_PLACE || !1, ye = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Rt, tt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : et, yt = X(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, vt), Qt = X(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, bt);
1659
+ }), We = Zt(e, "FORBID_CONTENTS", Ge, { transform: Q }), Ce = Zt(e, "FORBID_TAGS", clone({}), { transform: Q }), we = Zt(e, "FORBID_ATTR", clone({}), { transform: Q }), Ue = X(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Ee = e.ALLOW_ARIA_ATTR !== !1, De = e.ALLOW_DATA_ATTR !== !1, Oe = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ke = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = e.SAFE_FOR_TEMPLATES || !1, Ae = e.SAFE_FOR_XML !== !1, je = e.WHOLE_DOCUMENT || !1, Ie = e.RETURN_DOM || !1, Le = e.RETURN_DOM_FRAGMENT || !1, Re = e.RETURN_TRUSTED_TYPE || !1, Fe = e.FORCE_BODY || !1, ze = e.SANITIZE_DOM !== !1, Be = e.SANITIZE_NAMED_PROPS || !1, He = e.KEEP_CONTENT !== !1, K = e.IN_PLACE || !1, ye = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Rt, tt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : et, yt = X(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, vt), Qt = X(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, bt);
1660
1660
  let t = X(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : $e(null);
1661
- if (W = $e(null), X(t, "tagNameCheck") && an(t.tagNameCheck) && (W.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && an(t.attributeNameCheck) && (W.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), J(W), G && (De = !1), Le && (Ie = !0), Ue && (H = addToSet({}, Ot), U = $e(null), Ue.html === !0 && (addToSet(H, St), addToSet(U, kt)), Ue.svg === !0 && (addToSet(H, Ct), addToSet(U, At), addToSet(U, Mt)), Ue.svgFilters === !0 && (addToSet(H, wt), addToSet(U, At), addToSet(U, Mt)), Ue.mathMl === !0 && (addToSet(H, Et), addToSet(U, jt), addToSet(U, Mt))), Te.tagCheck = null, Te.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Te.tagCheck = e.ADD_TAGS : lt(e.ADD_TAGS) && (H === be && (H = clone(H)), addToSet(H, e.ADD_TAGS, Q))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Te.attributeCheck = e.ADD_ATTR : lt(e.ADD_ATTR) && (U === Se && (U = clone(U)), addToSet(U, e.ADD_ATTR, Q))), X(e, "ADD_URI_SAFE_ATTR") && lt(e.ADD_URI_SAFE_ATTR) && addToSet(Ye, e.ADD_URI_SAFE_ATTR, Q), X(e, "FORBID_CONTENTS") && lt(e.FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.FORBID_CONTENTS, Q)), X(e, "ADD_FORBID_CONTENTS") && lt(e.ADD_FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.ADD_FORBID_CONTENTS, Q)), Ve && (H["#text"] = !0), je && addToSet(H, [
1661
+ if (W = $e(null), X(t, "tagNameCheck") && an(t.tagNameCheck) && (W.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && an(t.attributeNameCheck) && (W.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), J(W), G && (De = !1), Le && (Ie = !0), Ue && (H = addToSet({}, Ot), U = $e(null), Ue.html === !0 && (addToSet(H, St), addToSet(U, kt)), Ue.svg === !0 && (addToSet(H, Ct), addToSet(U, At), addToSet(U, Mt)), Ue.svgFilters === !0 && (addToSet(H, wt), addToSet(U, At), addToSet(U, Mt)), Ue.mathMl === !0 && (addToSet(H, Et), addToSet(U, jt), addToSet(U, Mt))), Te.tagCheck = null, Te.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Te.tagCheck = e.ADD_TAGS : lt(e.ADD_TAGS) && (H === be && (H = clone(H)), addToSet(H, e.ADD_TAGS, Q))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Te.attributeCheck = e.ADD_ATTR : lt(e.ADD_ATTR) && (U === Se && (U = clone(U)), addToSet(U, e.ADD_ATTR, Q))), X(e, "ADD_URI_SAFE_ATTR") && lt(e.ADD_URI_SAFE_ATTR) && addToSet(Ye, e.ADD_URI_SAFE_ATTR, Q), X(e, "FORBID_CONTENTS") && lt(e.FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.FORBID_CONTENTS, Q)), X(e, "ADD_FORBID_CONTENTS") && lt(e.ADD_FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.ADD_FORBID_CONTENTS, Q)), He && (H["#text"] = !0), je && addToSet(H, [
1662
1662
  "html",
1663
1663
  "head",
1664
1664
  "body"
@@ -1786,20 +1786,20 @@ function createDOMPurify() {
1786
1786
  n = new c().parseFromString(i, en);
1787
1787
  } catch {}
1788
1788
  if (!n || !n.documentElement) {
1789
- n = se.createDocument(tt, "template", null);
1789
+ n = P.createDocument(tt, "template", null);
1790
1790
  try {
1791
1791
  n.documentElement.innerHTML = nt ? C : i;
1792
1792
  } catch {}
1793
1793
  }
1794
1794
  let a = n.body || n.documentElement;
1795
- return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), tt === et ? ue.call(n, je ? "html" : "body")[0] : je ? n.documentElement : a;
1795
+ return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), tt === et ? ce.call(n, je ? "html" : "body")[0] : je ? n.documentElement : a;
1796
1796
  }, bn = function _createNodeIterator(e) {
1797
- return P.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1797
+ return F.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1798
1798
  }, xn = function _stripTemplateExpressions(e) {
1799
- return e = pt(e, pe, " "), e = pt(e, he, " "), e = pt(e, I, " "), e;
1799
+ return e = pt(e, de, " "), e = pt(e, pe, " "), e = pt(e, R, " "), e;
1800
1800
  }, Sn = function _scrubTemplateExpressions(e) {
1801
1801
  e.normalize();
1802
- let t = P.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1802
+ let t = F.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1803
1803
  for (; n;) n.data = xn(n.data), n = t.nextNode();
1804
1804
  let r = e.querySelectorAll?.call(e, "template");
1805
1805
  r && rt(r, (e) => {
@@ -1832,40 +1832,40 @@ function createDOMPurify() {
1832
1832
  return !!(Ae && e.hasChildNodes() && !Tn(e.firstElementChild) && Z(Ut, e.textContent) && Z(Ut, e.innerHTML) || Ae && e.namespaceURI === et && t === "style" && Tn(e.firstElementChild) || e.nodeType === qt.processingInstruction || Ae && e.nodeType === qt.comment && Z(Wt, e.data));
1833
1833
  }, Dn = function _sanitizeDisallowedNode(e, t) {
1834
1834
  if (!Ce[t] && jn(t) && (W.tagNameCheck instanceof RegExp && Z(W.tagNameCheck, t) || W.tagNameCheck instanceof Function && W.tagNameCheck(t))) return !1;
1835
- if (Ve && !We[t]) {
1835
+ if (He && !We[t]) {
1836
1836
  let t = v(e), n = _(e);
1837
1837
  if (n && t) {
1838
1838
  let r = n.length;
1839
1839
  for (let i = r - 1; i >= 0; --i) {
1840
- let r = He ? n[i] : p(n[i], !0);
1840
+ let r = K ? n[i] : p(n[i], !0);
1841
1841
  t.insertBefore(r, h(e));
1842
1842
  }
1843
1843
  }
1844
1844
  }
1845
1845
  return pn(e), !0;
1846
1846
  }, On = function _sanitizeElements(e, t) {
1847
- if (_executeHooks(F.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1847
+ if (_executeHooks(I.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1848
1848
  if (Cn(e)) return pn(e), !0;
1849
1849
  let n = Q(ne ? ne(e) : e.nodeName);
1850
- if (_executeHooks(F.uponSanitizeElement, e, {
1850
+ if (_executeHooks(I.uponSanitizeElement, e, {
1851
1851
  tagName: n,
1852
1852
  allowedTags: H
1853
1853
  }), e !== t && v(e) === null) return !0;
1854
1854
  if (En(e, n)) return pn(e), !0;
1855
1855
  if (Ce[n] || !(Te.tagCheck instanceof Function && Te.tagCheck(n)) && !H[n]) {
1856
1856
  let t = Dn(e, n);
1857
- return t === !1 && _executeHooks(F.afterSanitizeElements, e, null), t;
1857
+ return t === !1 && _executeHooks(I.afterSanitizeElements, e, null), t;
1858
1858
  }
1859
1859
  if ((x ? x(e) : e.nodeType) === qt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Z(Gt, e.innerHTML)) return pn(e), !0;
1860
1860
  if (G && e.nodeType === qt.text) {
1861
1861
  let t = xn(e.textContent);
1862
1862
  e.textContent !== t && (st(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1863
1863
  }
1864
- return _executeHooks(F.afterSanitizeElements, e, null), !1;
1864
+ return _executeHooks(I.afterSanitizeElements, e, null), !1;
1865
1865
  }, kn = function _isValidAttribute(e, n, r) {
1866
1866
  if (we[n] || Ae && n === "patchsrc" || Ae && n === "for" && e !== "label" && e !== "output" || ze && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1867
1867
  let i = U[n] || Te.attributeCheck instanceof Function && Te.attributeCheck(n, e);
1868
- if (!(De && Z(R, n)) && !(Ee && Z(z, n))) {
1868
+ if (!(De && Z(he, n)) && !(Ee && Z(z, n))) {
1869
1869
  if (!i) {
1870
1870
  if (!(jn(e) && (W.tagNameCheck instanceof RegExp && Z(W.tagNameCheck, e) || W.tagNameCheck instanceof Function && W.tagNameCheck(e)) && (W.attributeNameCheck instanceof RegExp && Z(W.attributeNameCheck, n) || W.attributeNameCheck instanceof Function && W.attributeNameCheck(n, e)) || n === "is" && W.allowCustomizedBuiltInElements && (W.tagNameCheck instanceof RegExp && Z(W.tagNameCheck, r) || W.tagNameCheck instanceof Function && W.tagNameCheck(r)))) return !1;
1871
1871
  } else if (!Ye[n] && !Z(ye, pt(r, ve, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && mt(r, "data:") === 0 && Ke[e]) && !(Oe && !Z(_e, pt(r, ve, ""))) && r) return !1;
@@ -1895,7 +1895,7 @@ function createDOMPurify() {
1895
1895
  hn(t, e);
1896
1896
  }
1897
1897
  }, Pn = function _sanitizeAttributes(e) {
1898
- _executeHooks(F.beforeSanitizeAttributes, e, null);
1898
+ _executeHooks(I.beforeSanitizeAttributes, e, null);
1899
1899
  let t = e.attributes;
1900
1900
  if (!t || Cn(e)) return;
1901
1901
  let n = {
@@ -1907,7 +1907,7 @@ function createDOMPurify() {
1907
1907
  }, r = t.length, i = Q(e.nodeName);
1908
1908
  for (; r--;) {
1909
1909
  let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f : ht(f);
1910
- if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(F.uponSanitizeAttribute, e, n), p = n.attrValue, Be && (u === "id" || u === "name") && mt(p, K) !== 0 && (hn(o, e), p = K + p), Ae && Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1910
+ if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(I.uponSanitizeAttribute, e, n), p = n.attrValue, Be && (u === "id" || u === "name") && mt(p, Ve) !== 0 && (hn(o, e), p = Ve + p), Ae && Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1911
1911
  hn(o, e);
1912
1912
  continue;
1913
1913
  }
@@ -1931,14 +1931,14 @@ function createDOMPurify() {
1931
1931
  p = Mn(i, u, s, p), p !== f && Nn(e, o, s, p);
1932
1932
  }
1933
1933
  }
1934
- _executeHooks(F.afterSanitizeAttributes, e, null);
1934
+ _executeHooks(I.afterSanitizeAttributes, e, null);
1935
1935
  }, Fn = function _sanitizeShadowDOM(e) {
1936
1936
  let t = null, n = bn(e);
1937
- for (_executeHooks(F.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(F.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (x ? x(t) : t.nodeType) === qt.element) {
1937
+ for (_executeHooks(I.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(I.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (x ? x(t) : t.nodeType) === qt.element) {
1938
1938
  let e = te(t);
1939
1939
  wn(e) && (In(e), Fn(e));
1940
1940
  }
1941
- _executeHooks(F.afterSanitizeShadowDOM, e, null);
1941
+ _executeHooks(I.afterSanitizeShadowDOM, e, null);
1942
1942
  }, In = function _sanitizeAttachedShadowRoots(e) {
1943
1943
  let t = [{
1944
1944
  node: e,
@@ -1981,8 +1981,8 @@ function createDOMPurify() {
1981
1981
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, i = null, a = null, o = null;
1982
1982
  if (nt = !e, nt && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw xt("dirty is not a string, aborting");
1983
1983
  if (!DOMPurify.isSupported) return e;
1984
- Me ? (H = Ne, U = Pe) : on(t), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (H = clone(H)), F.uponSanitizeAttribute.length > 0 && (U = clone(U)), DOMPurify.removed = [];
1985
- let s = He && typeof e != "string" && Tn(e);
1984
+ Me ? (H = Ne, U = Pe) : on(t), (I.uponSanitizeElement.length > 0 || I.uponSanitizeAttribute.length > 0) && (H = clone(H)), I.uponSanitizeAttribute.length > 0 && (U = clone(U)), DOMPurify.removed = [];
1985
+ let s = K && typeof e != "string" && Tn(e);
1986
1986
  if (s) {
1987
1987
  vn(e);
1988
1988
  let t = ne ? ne(e) : e.nodeName;
@@ -2014,9 +2014,9 @@ function createDOMPurify() {
2014
2014
  e.element && _n(e.element);
2015
2015
  }), G && Sn(e), e;
2016
2016
  if (Ie) {
2017
- if (G && Sn(r), Le) for (o = ce.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2017
+ if (G && Sn(r), Le) for (o = se.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2018
2018
  else o = r;
2019
- return (U.shadowroot || U.shadowrootmode) && (o = de.call(n, o, !0)), o;
2019
+ return (U.shadowroot || U.shadowrootmode) && (o = ue.call(n, o, !0)), o;
2020
2020
  }
2021
2021
  let f = je ? r.outerHTML : r.innerHTML;
2022
2022
  return je && H["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Z(Vt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), G && (f = xn(f)), S && Re ? k(f) : f;
@@ -2030,19 +2030,19 @@ function createDOMPurify() {
2030
2030
  let r = Q(e), i = Q(t);
2031
2031
  return kn(r, i, n);
2032
2032
  }, DOMPurify.addHook = function(e, t) {
2033
- typeof t == "function" && X(F, e) && st(F[e], t);
2033
+ typeof t == "function" && X(I, e) && st(I[e], t);
2034
2034
  }, DOMPurify.removeHook = function(e, t) {
2035
- if (X(F, e)) {
2035
+ if (X(I, e)) {
2036
2036
  if (t !== void 0) {
2037
- let n = it(F[e], t);
2038
- return n === -1 ? void 0 : ct(F[e], n, 1)[0];
2037
+ let n = it(I[e], t);
2038
+ return n === -1 ? void 0 : ct(I[e], n, 1)[0];
2039
2039
  }
2040
- return at(F[e]);
2040
+ return at(I[e]);
2041
2041
  }
2042
2042
  }, DOMPurify.removeHooks = function(e) {
2043
- X(F, e) && (F[e] = []);
2043
+ X(I, e) && (I[e] = []);
2044
2044
  }, DOMPurify.removeAllHooks = function() {
2045
- F = Xt();
2045
+ I = Xt();
2046
2046
  }, DOMPurify;
2047
2047
  }
2048
2048
  var Qt = createDOMPurify(), _Class;
@@ -3484,7 +3484,7 @@ var mr = ["aria-label"], hr = { class: "px-4 pb-2 pt-4" }, gr = ["innerHTML"], _
3484
3484
  if (!n.spec.body) return "";
3485
3485
  let e = g.parse(n.spec.body, { async: !1 });
3486
3486
  return Qt.sanitize(e, { ADD_ATTR: ["target"] });
3487
- }), a = p(() => n.inverted ? "rgba(255, 255, 255, 0.22)" : "rgba(0, 0, 0, 0.16)"), o = p(() => n.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-200) 80%, transparent)"), s = p(() => n.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), c = p(() => n.inverted ? "rgba(255, 255, 255, 0.8)" : "var(--color-theme-800)"), u = p(() => n.inverted ? `inset 0 0 0 1px ${a.value}` : `inset 0 0 0 1px ${a.value}, 0 4px 16px rgba(15, 23, 42, 0.05)`);
3487
+ }), a = p(() => n.inverted ? "rgba(255, 255, 255, 0.22)" : "rgba(0, 0, 0, 0.16)"), o = p(() => n.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-200) 80%, transparent)"), s = p(() => n.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), c = p(() => n.inverted ? "rgba(255, 255, 255, 0.8)" : "var(--color-theme-800)"), u = p(() => n.inverted ? `inset 0 0 0 1px ${a.value}` : `inset 0 0 0 1px ${a.value}, 0 4px 16px rgba(15, 23, 42, 0.05)`), m = p(() => n.inverted ? "transparent" : "var(--color-theme-0)");
3488
3488
  function actionStyle(e) {
3489
3489
  return e === "primary" || e === "destructive" ? {
3490
3490
  background: n.inverted ? "rgba(255, 255, 255, 0.92)" : "var(--color-theme-900)",
@@ -3497,13 +3497,16 @@ var mr = ["aria-label"], hr = { class: "px-4 pb-2 pt-4" }, gr = ["innerHTML"], _
3497
3497
  return (t, n) => (T(), _("div", {
3498
3498
  "data-test": "chat-card",
3499
3499
  class: "my-6 w-full max-w-[55ch] self-start overflow-hidden rounded-2xl",
3500
- style: C({ boxShadow: u.value }),
3500
+ style: C({
3501
+ background: m.value,
3502
+ boxShadow: u.value
3503
+ }),
3501
3504
  "aria-label": e.spec.title
3502
3505
  }, [
3503
3506
  v("div", hr, [v("div", {
3504
3507
  class: "text-[14px] font-semibold leading-tight",
3505
3508
  style: C({ color: s.value })
3506
- }, P(e.spec.title), 5)]),
3509
+ }, F(e.spec.title), 5)]),
3507
3510
  i.value ? (T(), _("div", {
3508
3511
  key: 0,
3509
3512
  class: "chat-msg-prose px-4 pb-4 pt-2 text-[14px] leading-relaxed",
@@ -3521,7 +3524,7 @@ var mr = ["aria-label"], hr = { class: "px-4 pb-2 pt-4" }, gr = ["innerHTML"], _
3521
3524
  class: "inline-flex h-10 items-center justify-center rounded-full px-5 text-[14px] font-semibold transition-colors duration-150 active:opacity-80",
3522
3525
  style: C(actionStyle(e.style)),
3523
3526
  onClick: (t) => r("action", e.reply)
3524
- }, P(e.label), 13, _r))), 128))], 4)) : h("", !0)
3527
+ }, F(e.label), 13, _r))), 128))], 4)) : h("", !0)
3525
3528
  ], 12, mr));
3526
3529
  }
3527
3530
  }), yr = 112, br = 52, xr = 14, Sr = 54, Cr = 34, wr = 260;
@@ -3756,7 +3759,7 @@ var kr = [
3756
3759
  inverted: { type: Boolean }
3757
3760
  },
3758
3761
  setup(e) {
3759
- let t = e, n = k(), r = se(360), i;
3762
+ let t = e, n = k(), r = P(360), i;
3760
3763
  ie(() => {
3761
3764
  typeof ResizeObserver > "u" || !n.value || (i = new ResizeObserver((e) => {
3762
3765
  let t = e[0]?.contentRect.width;
@@ -3891,7 +3894,7 @@ var kr = [
3891
3894
  return `${r === 0 ? "M" : "L"} ${xForIndex(r, t.data.length).toFixed(1)} ${yForValue(i).toFixed(1)}`;
3892
3895
  }).join(" ") : "";
3893
3896
  }
3894
- let ue = p(() => {
3897
+ let ce = p(() => {
3895
3898
  let e = m.value;
3896
3899
  if (!e?.trendLine || e.chartType !== "line" && e.chartType !== "scatter") return null;
3897
3900
  let t = trendLinePoints(e, e.trendLine.dataKey), n = linearTrend(t);
@@ -3902,7 +3905,7 @@ var kr = [
3902
3905
  dataKey: e.trendLine.dataKey,
3903
3906
  seriesIndex: s
3904
3907
  };
3905
- }), de = p(() => {
3908
+ }), ue = p(() => {
3906
3909
  let e = m.value;
3907
3910
  if (!e || e.chartType !== "bar") return [];
3908
3911
  let t = j.value, n = (t.width - t.left - t.right) / Math.max(e.data.length, 1), r = yForValue(0);
@@ -3939,7 +3942,7 @@ var kr = [
3939
3942
  dataKey: e.dataKey
3940
3943
  };
3941
3944
  }));
3942
- }), F = p(() => {
3945
+ }), I = p(() => {
3943
3946
  let e = m.value;
3944
3947
  if (!e) return [];
3945
3948
  let t = e.data;
@@ -3952,7 +3955,7 @@ var kr = [
3952
3955
  anchor: i ? "end" : e === 0 ? "start" : e === n ? "end" : "middle",
3953
3956
  angled: i
3954
3957
  })).filter((e) => e.label);
3955
- }), pe = p(() => {
3958
+ }), de = p(() => {
3956
3959
  let e = m.value;
3957
3960
  if (!e || e.chartType !== "bar" || e.series.length !== 1 || x.value) return [];
3958
3961
  let t = e.series[0], n = e.data.map((n, r) => {
@@ -3975,7 +3978,7 @@ var kr = [
3975
3978
  width: e.rawValue <= 0 ? 0 : Math.max(2, e.rawValue / r * 100),
3976
3979
  seriesIndex: 0
3977
3980
  }));
3978
- }), he = p(() => {
3981
+ }), pe = p(() => {
3979
3982
  let e = m.value;
3980
3983
  if (!e?.data.length) return [];
3981
3984
  let t = e.data[e.data.length - 1];
@@ -3991,7 +3994,7 @@ var kr = [
3991
3994
  seriesIndex: n
3992
3995
  };
3993
3996
  });
3994
- }), I = p(() => {
3997
+ }), R = p(() => {
3995
3998
  let e = m.value;
3996
3999
  if (!e?.data.length || e.chartType !== "line") return [];
3997
4000
  let t = e.data.length - 1, n = e.data[t];
@@ -4004,7 +4007,7 @@ var kr = [
4004
4007
  seriesIndex: i
4005
4008
  };
4006
4009
  }).filter((e) => e !== null);
4007
- }), R = p(() => {
4010
+ }), he = p(() => {
4008
4011
  let e = b.value;
4009
4012
  if (!e) return [];
4010
4013
  let t = e.data.map((t) => ({
@@ -4039,7 +4042,7 @@ var kr = [
4039
4042
  function diagramNodeStroke(e) {
4040
4043
  return e === "decision" ? t.inverted ? "rgba(255, 255, 255, 0.26)" : "color-mix(in oklch, var(--color-primary-500) 32%, var(--color-theme-300))" : Se.value;
4041
4044
  }
4042
- let B = p(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), ye = p(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), H = p(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), be = p(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), U = p(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), Se = p(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), W = p(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), Ce = p(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), we = p(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
4045
+ let B = p(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), ye = p(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), H = p(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), be = p(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), U = p(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), Se = p(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), W = p(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), Ce = p(() => t.inverted ? "transparent" : "var(--color-theme-0)"), we = p(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), Te = p(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
4043
4046
  return (e, r) => o.value ? (T(), _("section", {
4044
4047
  key: 0,
4045
4048
  "data-test": "chat-visual",
@@ -4048,17 +4051,20 @@ var kr = [
4048
4051
  "data-stacking": x.value ? "stacked" : void 0,
4049
4052
  "data-diagram-type": c.value?.diagramType,
4050
4053
  class: "my-6 w-full rounded-[20px] px-4 pb-3.5 pt-4",
4051
- style: C({ boxShadow: `inset 0 0 0 1px ${W.value}` }),
4054
+ style: C({
4055
+ background: Ce.value,
4056
+ boxShadow: `inset 0 0 0 1px ${W.value}`
4057
+ }),
4052
4058
  "aria-label": o.value.meta.title
4053
4059
  }, [
4054
4060
  v("header", Ar, [v("h4", {
4055
4061
  class: "text-[13px] font-semibold leading-tight",
4056
4062
  style: C({ color: B.value })
4057
- }, P(o.value.meta.title), 5), o.value.meta.description ? (T(), _("p", {
4063
+ }, F(o.value.meta.title), 5), o.value.meta.description ? (T(), _("p", {
4058
4064
  key: 0,
4059
4065
  class: "mt-0.5 text-[12px] leading-snug",
4060
4066
  style: C({ color: ye.value })
4061
- }, P(o.value.meta.description), 5)) : h("", !0)]),
4067
+ }, F(o.value.meta.description), 5)) : h("", !0)]),
4062
4068
  v("div", {
4063
4069
  ref_key: "bodyEl",
4064
4070
  ref: n
@@ -4066,19 +4072,19 @@ var kr = [
4066
4072
  key: 0,
4067
4073
  role: "img",
4068
4074
  "aria-label": o.value.meta.title
4069
- }, [pe.value.length ? (T(), _("div", Mr, [(T(!0), _(f, null, A(pe.value, (e) => (T(), _("div", {
4075
+ }, [de.value.length ? (T(), _("div", Mr, [(T(!0), _(f, null, A(de.value, (e) => (T(), _("div", {
4070
4076
  key: e.key,
4071
4077
  "data-test": "chat-visual-horizontal-bar",
4072
4078
  class: "min-w-0"
4073
4079
  }, [v("div", Nr, [v("span", {
4074
4080
  class: "line-clamp-2 min-w-0 font-medium leading-snug",
4075
4081
  style: C({ color: B.value })
4076
- }, P(e.label), 5), v("span", {
4082
+ }, F(e.label), 5), v("span", {
4077
4083
  class: "shrink-0 font-semibold tabular-nums",
4078
4084
  style: C({ color: B.value })
4079
- }, P(e.value), 5)]), v("div", {
4085
+ }, F(e.value), 5)]), v("div", {
4080
4086
  class: "h-2 w-full overflow-hidden rounded-full",
4081
- style: C({ background: we.value })
4087
+ style: C({ background: Te.value })
4082
4088
  }, [v("div", {
4083
4089
  class: "h-full rounded-full",
4084
4090
  style: C({
@@ -4110,11 +4116,11 @@ var kr = [
4110
4116
  "text-anchor": "end",
4111
4117
  "font-size": "9.5",
4112
4118
  style: C({ fill: H.value })
4113
- }, P(ce(formatChatVisualTick)({
4119
+ }, F(se(formatChatVisualTick)({
4114
4120
  value: e,
4115
4121
  shared: ae.value
4116
4122
  })), 13, Ir))), 128))]),
4117
- m.value.chartType === "bar" ? (T(!0), _(f, { key: 0 }, A(de.value, (e) => (T(), _("rect", {
4123
+ m.value.chartType === "bar" ? (T(!0), _(f, { key: 0 }, A(ue.value, (e) => (T(), _("rect", {
4118
4124
  key: e.key,
4119
4125
  "data-test": "chat-visual-bar",
4120
4126
  "data-row-index": e.rowIndex,
@@ -4127,18 +4133,18 @@ var kr = [
4127
4133
  rx: "2.5",
4128
4134
  style: C({ fill: seriesColor(e.seriesIndex) })
4129
4135
  }, null, 12, Lr))), 128)) : (T(), _(f, { key: 1 }, [
4130
- ue.value ? (T(), _("path", {
4136
+ ce.value ? (T(), _("path", {
4131
4137
  key: 0,
4132
4138
  "data-test": "chat-visual-trend-line",
4133
- "data-trend-key": ue.value.dataKey,
4134
- d: ue.value.path,
4139
+ "data-trend-key": ce.value.dataKey,
4140
+ d: ce.value.path,
4135
4141
  fill: "none",
4136
4142
  "stroke-width": "1.4",
4137
4143
  "stroke-linecap": "round",
4138
4144
  "stroke-linejoin": "round",
4139
4145
  "stroke-dasharray": "4 3",
4140
4146
  "vector-effect": "non-scaling-stroke",
4141
- style: C({ stroke: seriesColor(ue.value.seriesIndex) })
4147
+ style: C({ stroke: seriesColor(ce.value.seriesIndex) })
4142
4148
  }, null, 12, Rr)) : h("", !0),
4143
4149
  (T(!0), _(f, null, A(te.value, (e, t) => (T(), _("g", { key: e.dataKey }, [m.value.chartType === "line" ? (T(), _("path", {
4144
4150
  key: 0,
@@ -4156,7 +4162,7 @@ var kr = [
4156
4162
  r: "2.6",
4157
4163
  style: C({ fill: seriesColor(t) })
4158
4164
  }, null, 12, Br)) : h("", !0)], 64))), 128))]))), 128)),
4159
- (T(!0), _(f, null, A(I.value, (e) => (T(), _("circle", {
4165
+ (T(!0), _(f, null, A(R.value, (e) => (T(), _("circle", {
4160
4166
  key: `marker-${e.key}`,
4161
4167
  cx: e.cx,
4162
4168
  cy: e.cy,
@@ -4164,16 +4170,16 @@ var kr = [
4164
4170
  style: C({ fill: seriesColor(e.seriesIndex) })
4165
4171
  }, null, 12, Vr))), 128))
4166
4172
  ], 64)),
4167
- (T(!0), _(f, null, A(F.value, (e) => (T(), _("text", {
4173
+ (T(!0), _(f, null, A(I.value, (e) => (T(), _("text", {
4168
4174
  key: e.key,
4169
4175
  x: e.x,
4170
4176
  y: e.angled ? j.value.height - j.value.bottom + 12 : j.value.height - 6,
4171
4177
  "text-anchor": e.anchor,
4172
4178
  "font-size": "9.5",
4173
- transform: e.angled ? `rotate(${ce(-40)} ${e.x} ${j.value.height - j.value.bottom + 12})` : void 0,
4179
+ transform: e.angled ? `rotate(${se(-40)} ${e.x} ${j.value.height - j.value.bottom + 12})` : void 0,
4174
4180
  style: C({ fill: H.value })
4175
- }, P(e.label), 13, Hr))), 128))
4176
- ], 12, Pr)), he.value.length > 1 || m.value.chartType !== "bar" ? (T(), _("div", Ur, [(T(!0), _(f, null, A(he.value, (e) => (T(), _("div", {
4181
+ }, F(e.label), 13, Hr))), 128))
4182
+ ], 12, Pr)), pe.value.length > 1 || m.value.chartType !== "bar" ? (T(), _("div", Ur, [(T(!0), _(f, null, A(pe.value, (e) => (T(), _("div", {
4177
4183
  key: e.key,
4178
4184
  class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
4179
4185
  }, [
@@ -4181,23 +4187,23 @@ var kr = [
4181
4187
  class: "size-2.5 shrink-0 rounded-full",
4182
4188
  style: C({ background: seriesColor(e.seriesIndex) })
4183
4189
  }, null, 4),
4184
- v("span", { style: C({ color: ye.value }) }, P(e.label), 5),
4190
+ v("span", { style: C({ color: ye.value }) }, F(e.label), 5),
4185
4191
  v("span", {
4186
4192
  class: "font-semibold tabular-nums",
4187
4193
  style: C({ color: B.value })
4188
- }, P(e.value), 5)
4189
- ]))), 128))])) : h("", !0)], 8, jr)) : b.value ? (T(), _("div", Wr, [(T(!0), _(f, null, A(R.value, (e, t) => (T(), _("div", { key: e.key }, [v("div", Gr, [v("span", {
4194
+ }, F(e.value), 5)
4195
+ ]))), 128))])) : h("", !0)], 8, jr)) : b.value ? (T(), _("div", Wr, [(T(!0), _(f, null, A(he.value, (e, t) => (T(), _("div", { key: e.key }, [v("div", Gr, [v("span", {
4190
4196
  class: "truncate font-medium",
4191
4197
  style: C({ color: B.value })
4192
- }, P(e.name), 5), v("span", Kr, [v("span", {
4198
+ }, F(e.name), 5), v("span", Kr, [v("span", {
4193
4199
  class: "font-semibold",
4194
4200
  style: C({ color: B.value })
4195
- }, P(e.display), 5), v("span", {
4201
+ }, F(e.display), 5), v("span", {
4196
4202
  class: "ml-1.5",
4197
4203
  style: C({ color: ye.value })
4198
- }, P(Math.round(e.percent * 100)) + "%", 5)])]), v("div", {
4204
+ }, F(Math.round(e.percent * 100)) + "%", 5)])]), v("div", {
4199
4205
  class: "h-1.5 w-full overflow-hidden rounded-full",
4200
- style: C({ background: we.value })
4206
+ style: C({ background: Te.value })
4201
4207
  }, [v("div", {
4202
4208
  class: "h-full rounded-full",
4203
4209
  style: C({
@@ -4227,14 +4233,14 @@ var kr = [
4227
4233
  "stroke-width": "1.4",
4228
4234
  "stroke-linecap": "round",
4229
4235
  "vector-effect": "non-scaling-stroke",
4230
- style: C({ stroke: Ce.value })
4236
+ style: C({ stroke: we.value })
4231
4237
  }, null, 12, Yr))), 128)),
4232
4238
  (T(!0), _(f, null, A(z.value.edges, (e) => (T(), _("circle", {
4233
4239
  key: `${e.key}-dot`,
4234
4240
  cx: e.x2,
4235
4241
  cy: e.y2,
4236
4242
  r: "2.4",
4237
- style: C({ fill: Ce.value })
4243
+ style: C({ fill: we.value })
4238
4244
  }, null, 12, Xr))), 128)),
4239
4245
  (T(!0), _(f, null, A(z.value.edges.filter((e) => e.label), (e) => (T(), _("foreignObject", {
4240
4246
  key: `${e.key}-label`,
@@ -4249,7 +4255,7 @@ var kr = [
4249
4255
  color: ye.value,
4250
4256
  background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
4251
4257
  })
4252
- }, P(e.label), 5)], 8, Zr))), 128)),
4258
+ }, F(e.label), 5)], 8, Zr))), 128)),
4253
4259
  (T(!0), _(f, null, A(z.value.nodes, (e) => (T(), _("g", {
4254
4260
  key: e.id,
4255
4261
  "data-test": "chat-visual-diagram-node",
@@ -4284,17 +4290,17 @@ var kr = [
4284
4290
  }, [v("div", ni, [v("div", {
4285
4291
  class: "line-clamp-2 text-[13px] font-semibold leading-tight",
4286
4292
  style: C({ color: B.value })
4287
- }, P(e.label), 5), e.detail ? (T(), _("div", {
4293
+ }, F(e.label), 5), e.detail ? (T(), _("div", {
4288
4294
  key: 0,
4289
4295
  class: "mt-0.5 line-clamp-1 text-[10.5px] leading-none",
4290
4296
  style: C({ color: ye.value })
4291
- }, P(e.detail), 5)) : h("", !0)])], 8, ti))], 8, Qr))), 128))
4297
+ }, F(e.detail), 5)) : h("", !0)])], 8, ti))], 8, Qr))), 128))
4292
4298
  ], 12, Jr))])) : h("", !0)], 512),
4293
4299
  o.value.meta.footer ? (T(), _("footer", {
4294
4300
  key: 0,
4295
4301
  class: "mt-3 text-[11px] leading-snug",
4296
4302
  style: C({ color: H.value })
4297
- }, P(o.value.meta.footer), 5)) : h("", !0)
4303
+ }, F(o.value.meta.footer), 5)) : h("", !0)
4298
4304
  ], 12, kr)) : h("", !0);
4299
4305
  }
4300
4306
  }), ii = ["innerHTML"], ai = /* @__PURE__ */ x({
@@ -4306,8 +4312,8 @@ var kr = [
4306
4312
  },
4307
4313
  emits: ["action"],
4308
4314
  setup(e, { emit: t }) {
4309
- let n = e, r = t, i = se(n.text), a;
4310
- de([() => n.text, () => n.streaming], ([e, t]) => {
4315
+ let n = e, r = t, i = P(n.text), a;
4316
+ ue([() => n.text, () => n.streaming], ([e, t]) => {
4311
4317
  if (!t) {
4312
4318
  a !== void 0 && (cancelAnimationFrame(a), a = void 0), i.value = e;
4313
4319
  return;
@@ -4490,6 +4496,7 @@ var kr = [
4490
4496
  role: "status",
4491
4497
  class: "my-6 flex items-center gap-2.5 rounded-[20px] px-4 py-5 text-[12px] font-medium",
4492
4498
  style: C({
4499
+ background: e.inverted ? "transparent" : "var(--color-theme-0)",
4493
4500
  boxShadow: `inset 0 0 0 1px ${e.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"}`,
4494
4501
  color: e.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"
4495
4502
  })
@@ -4594,11 +4601,10 @@ var kr = [
4594
4601
  "data-test": "messaging-tool-activity-tail",
4595
4602
  "aria-label": "Assistant is still working",
4596
4603
  class: "mb-4 grid h-[17px] w-5 place-items-center"
4597
- }, Ni = ["data-journal-outcome"], Pi = ["data-working-description"], Fi = { class: "truncate" }, Ii = ["data-issue-code"], Li = ["href"], Ri = {
4598
- key: 3,
4599
- "data-test": "messaging-thinking-indicator",
4600
- class: "flex gap-2 justify-start items-center mb-4"
4601
- }, zi = ["src", "alt"], Bi = { class: "max-w-20 truncate" }, Vi = ["onClick"], Hi = {
4604
+ }, Ni = ["data-journal-outcome"], Pi = ["data-test", "data-working-description"], Fi = {
4605
+ class: "flex items-center gap-[5px]",
4606
+ "aria-hidden": "true"
4607
+ }, Ii = { class: "truncate" }, Li = ["data-issue-code"], Ri = ["href"], zi = ["src", "alt"], Bi = { class: "max-w-20 truncate" }, Vi = ["onClick"], Hi = {
4602
4608
  key: 0,
4603
4609
  class: "shrink-0 flex items-center justify-center size-14"
4604
4610
  }, Ui = ["data-composer-action"], Wi = ["placeholder", "disabled"], Gi = { class: "font-mono text-sm tabular-nums" }, Ki = { class: "mt-2.5 flex items-center" }, qi = [
@@ -4624,9 +4630,13 @@ var kr = [
4624
4630
  class: "i-tabler-arrow-up size-[17px]"
4625
4631
  }, ra = { class: "sr-only" }, ia = {
4626
4632
  key: 2,
4633
+ "data-test": "messaging-ai-disclosure",
4634
+ class: "mt-2.5 text-center text-[12px] text-theme-300"
4635
+ }, aa = {
4636
+ key: 3,
4627
4637
  "data-test": "messaging-suggested-prompts",
4628
4638
  class: "mt-5 w-full sm:mx-auto sm:max-w-[720px]"
4629
- }, aa = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, oa = ["disabled", "onClick"], sa = ["aria-expanded"], ca = /* @__PURE__ */ x({
4639
+ }, oa = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, sa = ["disabled", "onClick"], ca = ["aria-expanded"], la = /* @__PURE__ */ x({
4630
4640
  __name: "ElAgentChat",
4631
4641
  props: {
4632
4642
  chatController: {},
@@ -4672,29 +4682,29 @@ var kr = [
4672
4682
  return e ? /\[[^\]]+\]\([^)]+\)/.test(e) : !1;
4673
4683
  }
4674
4684
  function isSystemExplainerMessage(e) {
4675
- return e.sender === "system" && (!!e.issue || e.id === be.value);
4685
+ return e.sender === "system" && (!!e.issue || e.id === U.value);
4676
4686
  }
4677
4687
  function isGroupEnd(e, t) {
4678
4688
  let n = e[t], r = e[t + 1];
4679
4689
  return !r || r.sender !== n.sender;
4680
4690
  }
4681
- let s = p(() => e.chatController?.textState.value), c = p(() => s.value?.isConnected ?? !1), u = p(() => s.value?.isThinking ?? !1), x = p(() => s.value?.connectionStatus === "disconnected" && !!s.value?.error), C = p(() => s.value?.connectionStatus !== "connected" && !s.value?.error), re = k(!1), j = p(() => e.chatController?.liveTurnBlocks?.value ?? []), se = p(() => {
4682
- for (let e = j.value.length - 1; e >= 0; e--) {
4683
- let t = j.value[e];
4691
+ let s = p(() => e.chatController?.textState.value), c = p(() => s.value?.isConnected ?? !1), u = p(() => s.value?.isThinking ?? !1), x = p(() => s.value?.connectionStatus === "disconnected" && !!s.value?.error), re = p(() => s.value?.connectionStatus !== "connected" && !s.value?.error), j = k(!1), P = p(() => e.chatController?.liveTurnBlocks?.value ?? []), se = p(() => {
4692
+ for (let e = P.value.length - 1; e >= 0; e--) {
4693
+ let t = P.value[e];
4684
4694
  if (t?.kind === "text") return t.id;
4685
4695
  }
4686
- }), ce = p(() => e.chatController?.liveStreamMessageId?.value), R = p(() => {
4696
+ }), he = p(() => e.chatController?.liveStreamMessageId?.value), z = p(() => {
4687
4697
  let t = e.chatController?.sharedMessages.value ?? [];
4688
- return j.value.length && ce.value ? t.filter((e) => e.id !== ce.value) : t;
4689
- }), z = p(() => {
4698
+ return P.value.length && he.value ? t.filter((e) => e.id !== he.value) : t;
4699
+ }), ve = p(() => {
4690
4700
  if (!e.chatController?.workJournal?.value) return s.value?.workingDescription?.trim() || void 0;
4691
- }), ve = p(() => e.chatController?.workJournal?.value), B = p(() => {
4692
- if (!ve.value && !j.value.length) return;
4693
- let e = R.value, t = e[e.length - 1];
4701
+ }), B = p(() => e.chatController?.workJournal?.value), ye = p(() => {
4702
+ if (!B.value && !P.value.length) return;
4703
+ let e = z.value, t = e[e.length - 1];
4694
4704
  if (t) return t.sender === "agent" || t.sender === "system" ? e.length >= 2 ? e[e.length - 2].id : void 0 : t.id;
4695
- }), ye = p(() => {
4705
+ }), H = p(() => {
4696
4706
  let t = {};
4697
- for (let n of R.value) {
4707
+ for (let n of z.value) {
4698
4708
  if (n.sender === "user" || !n.toolActivities?.length) continue;
4699
4709
  let r = e.chatController?.workJournalFor?.({
4700
4710
  activities: n.toolActivities,
@@ -4706,7 +4716,7 @@ var kr = [
4706
4716
  return t;
4707
4717
  });
4708
4718
  function messageWorkJournal(e) {
4709
- return ye.value[e.id];
4719
+ return H.value[e.id];
4710
4720
  }
4711
4721
  function inlineOffset(e, t) {
4712
4722
  return e.placement?.kind !== "inline" || !Number.isFinite(e.placement.offset) ? null : Math.max(0, Math.min(t.length, Math.trunc(e.placement.offset)));
@@ -4754,60 +4764,60 @@ var kr = [
4754
4764
  text: t.slice(i)
4755
4765
  }), r;
4756
4766
  }
4757
- let H = p(() => s.value?.transientIssue), be = p(() => {
4767
+ let be = p(() => s.value?.transientIssue), U = p(() => {
4758
4768
  if (!u.value) return;
4759
- let e = R.value, t = e[e.length - 1];
4769
+ let e = z.value, t = e[e.length - 1];
4760
4770
  return t?.sender === "agent" || t?.sender === "system" ? t.id : void 0;
4761
- }), U = p(() => !u.value || z.value || ve.value || j.value.length ? !1 : be.value === void 0), Se = p(() => s.value?.sendBlockedReason), W = p(() => Se.value === "agent_deleted"), Ce = p(() => x.value ? `${e.agent.displayName.value || e.agent.name.value || "Assistant"} is offline` : C.value ? "Connecting..." : Se.value === "agent_deleted" ? "This assistant was deleted" : `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}`), we = p(() => e.chatController?.composerState?.value ?? {
4771
+ }), Se = p(() => !u.value || ve.value || B.value || P.value.length ? !1 : U.value === void 0), W = p(() => ve.value ?? (Se.value ? "Thinking…" : void 0)), Ce = p(() => s.value?.sendBlockedReason), we = p(() => Ce.value === "agent_deleted"), Te = p(() => x.value ? `${e.agent.displayName.value || e.agent.name.value || "Assistant"} is offline` : re.value ? "Connecting..." : Ce.value === "agent_deleted" ? "This assistant was deleted" : `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}`), Ee = p(() => e.chatController?.composerState?.value ?? {
4762
4772
  text: "",
4763
4773
  pendingAttachments: [],
4764
4774
  isUploading: !1
4765
- }), Te = p({
4766
- get: () => we.value.text,
4775
+ }), De = p({
4776
+ get: () => Ee.value.text,
4767
4777
  set: (t) => e.chatController?.setComposerText?.({ text: t })
4768
- }), Ee = p(() => we.value.pendingAttachments), De = p(() => we.value.isUploading), Oe = p(() => e.chatController?.voiceRecorder), ke = p(() => Oe.value?.isBusy.value ?? !1), G = p(() => e.chatController?.canAttachFile?.value ?? !1), Ae = p(() => e.chatController?.canRecordAudio?.value ?? !1), je = p(() => e.chatController?.composerAction?.value ?? "idle"), Me = p(() => je.value !== "idle"), Ne = p(() => je.value === "stop" ? "Stop reply" : "Send message"), Fe = p(() => Ae.value && !ke.value && !!Oe.value?.canUseBrowserRecording), Ie = p(() => Oe.value?.isActive.value ?? !1), Le = p(() => Oe.value?.elapsedLabel.value ?? "0:00"), Re = p(() => Oe.value?.statusText.value ?? "Release to send"), Be = p(() => Oe.value?.state.value.phase === "sending" ? "Sending voice message" : Ie.value ? "Release to send voice message" : "Hold to record voice message"), K = p(() => e.variant === "light"), Ve = p(() => K.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), He = p(() => K.value ? "text-theme-300" : "text-white/30");
4778
+ }), Oe = p(() => Ee.value.pendingAttachments), ke = p(() => Ee.value.isUploading), G = p(() => e.chatController?.voiceRecorder), Ae = p(() => G.value?.isBusy.value ?? !1), je = p(() => e.chatController?.canAttachFile?.value ?? !1), Me = p(() => e.chatController?.canRecordAudio?.value ?? !1), Ne = p(() => e.chatController?.composerAction?.value ?? "idle"), Fe = p(() => Ne.value !== "idle"), Ie = p(() => Ne.value === "stop" ? "Stop reply" : "Send message"), Le = p(() => Me.value && !Ae.value && !!G.value?.canUseBrowserRecording), Re = p(() => G.value?.isActive.value ?? !1), Be = p(() => G.value?.elapsedLabel.value ?? "0:00"), Ve = p(() => G.value?.statusText.value ?? "Release to send"), He = p(() => G.value?.state.value.phase === "sending" ? "Sending voice message" : Re.value ? "Release to send voice message" : "Hold to record voice message"), K = p(() => e.variant === "light"), Ue = p(() => K.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), We = p(() => K.value ? "text-theme-300" : "text-white/30");
4769
4779
  ie(async () => {
4770
4780
  e.chatController && !c.value && await e.chatController.startTextConversation();
4771
4781
  }), ae(() => {
4772
4782
  e.chatController?.voiceRecorder?.teardown();
4773
4783
  });
4774
4784
  async function sendMessage() {
4775
- !e.chatController || je.value !== "send" || (a.value && (a.value.style.height = "auto", a.value.focus()), i.value?.pin(), await e.chatController.sendComposerMessage());
4785
+ !e.chatController || Ne.value !== "send" || (a.value && (a.value.style.height = "auto", a.value.focus()), i.value?.pin(), await e.chatController.sendComposerMessage());
4776
4786
  }
4777
4787
  async function handleCardAction(t) {
4778
- !e.chatController || W.value || (i.value?.pin(), await e.chatController.sendChatMessage(t));
4788
+ !e.chatController || we.value || (i.value?.pin(), await e.chatController.sendChatMessage(t));
4779
4789
  }
4780
4790
  async function sendSuggestedPrompt(t) {
4781
- !e.chatController || W.value || (i.value?.pin(), await e.chatController.sendChatMessage(t.prompt));
4791
+ !e.chatController || we.value || (i.value?.pin(), await e.chatController.sendChatMessage(t.prompt));
4782
4792
  }
4783
4793
  async function handleComposerAction() {
4784
- e.chatController && (je.value === "send" && i.value?.pin(), await e.chatController.handleComposerAction());
4794
+ e.chatController && (Ne.value === "send" && i.value?.pin(), await e.chatController.handleComposerAction());
4785
4795
  }
4786
4796
  async function handleKeydown(e) {
4787
4797
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await sendMessage());
4788
4798
  }
4789
4799
  function focusComposer(e) {
4790
- Ie.value || W.value || e.target instanceof Element && e.target.closest("button, a, textarea") || a.value?.focus();
4800
+ Re.value || we.value || e.target instanceof Element && e.target.closest("button, a, textarea") || a.value?.focus();
4791
4801
  }
4792
4802
  function adjustTextareaHeight() {
4793
4803
  a.value && (a.value.style.height = "auto", a.value.style.height = `${Math.min(a.value.scrollHeight, 150)}px`);
4794
4804
  }
4795
- de(Te, () => ne(() => adjustTextareaHeight()));
4805
+ ue(De, () => ne(() => adjustTextareaHeight()));
4796
4806
  function triggerFileInput() {
4797
4807
  o.value?.click();
4798
4808
  }
4799
4809
  async function handleFileSelect(t) {
4800
4810
  let n = t.target, r = n.files?.[0];
4801
- !r || !e.chatController || ke.value || (await e.chatController.attachFile({ file: r }), n.value = "");
4811
+ !r || !e.chatController || Ae.value || (await e.chatController.attachFile({ file: r }), n.value = "");
4802
4812
  }
4803
4813
  function removeAttachment(t) {
4804
4814
  e.chatController?.removeAttachment({ index: t });
4805
4815
  }
4806
4816
  function startRecording() {
4807
- Oe.value?.start();
4817
+ G.value?.start();
4808
4818
  }
4809
4819
  function finishRecording(e) {
4810
- Oe.value?.finish(e);
4820
+ G.value?.finish(e);
4811
4821
  }
4812
4822
  function shouldShowTimeDivider(e, t) {
4813
4823
  if (t === 0) {
@@ -4836,7 +4846,7 @@ var kr = [
4836
4846
  ...o ? {} : { year: "numeric" }
4837
4847
  })}, ${a}`;
4838
4848
  }
4839
- return (t, s) => (T(), _("div", { class: S(["@container/chat relative flex h-full flex-col", R.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""]) }, [
4849
+ return (t, s) => (T(), _("div", { class: S(["@container/chat relative flex h-full flex-col", z.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""]) }, [
4840
4850
  e.showHeader && !K.value ? (T(), _("div", li, [b(Pe, {
4841
4851
  agent: e.agent,
4842
4852
  "is-online": c.value
@@ -4846,38 +4856,38 @@ var kr = [
4846
4856
  "is-light": K.value,
4847
4857
  class: "size-10"
4848
4858
  }, null, 8, ["agent", "is-light"]),
4849
- v("div", di, [v("div", fi, P(e.agent.displayName.value), 1), v("div", pi, P(e.agent.title.value || "Assistant"), 1)]),
4850
- e.headerMeta ? (T(), _("span", mi, P(e.headerMeta), 1)) : h("", !0)
4859
+ v("div", di, [v("div", fi, F(e.agent.displayName.value), 1), v("div", pi, F(e.agent.title.value || "Assistant"), 1)]),
4860
+ e.headerMeta ? (T(), _("span", mi, F(e.headerMeta), 1)) : h("", !0)
4851
4861
  ], 2)])) : h("", !0),
4852
- C.value ? (T(), _("div", {
4862
+ re.value ? (T(), _("div", {
4853
4863
  key: 2,
4854
4864
  class: S(["py-16 flex flex-col items-center justify-center gap-2 text-sm", K.value ? "text-theme-400" : "text-theme-600"])
4855
4865
  }, [b(_e, { class: "size-4" })], 2)) : e.setupHint ? (T(), _("div", {
4856
4866
  key: 3,
4857
- class: S(["flex items-center justify-center gap-1.5 py-2 text-[11px]", He.value])
4858
- }, [s[20] || (s[20] = v("i", { class: "i-tabler-tool size-3" }, null, -1)), v("span", null, P(e.setupHint), 1)], 2)) : h("", !0),
4867
+ class: S(["flex items-center justify-center gap-1.5 py-2 text-[11px]", We.value])
4868
+ }, [s[20] || (s[20] = v("i", { class: "i-tabler-tool size-3" }, null, -1)), v("span", null, F(e.setupHint), 1)], 2)) : h("", !0),
4859
4869
  b(ci, {
4860
4870
  ref_key: "chatScroller",
4861
4871
  ref: i,
4862
- class: S(R.value.length === 0 ? "flex-none" : "flex-1")
4872
+ class: S(z.value.length === 0 ? "flex-none" : "flex-1")
4863
4873
  }, {
4864
- default: F(() => [v("div", { class: S([R.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-[120px] px-3 space-y-2" : "pt-4 pb-[120px] px-3 space-y-2", e.centered ? R.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
4865
- R.value.length === 0 && !C.value ? (T(), _("div", hi, [oe(t.$slots, "empty-heading", {
4874
+ default: I(() => [v("div", { class: S([z.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-[148px] px-3 space-y-2" : "pt-4 pb-[120px] px-3 space-y-2", e.centered ? z.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
4875
+ z.value.length === 0 && !re.value ? (T(), _("div", hi, [oe(t.$slots, "empty-heading", {
4866
4876
  agent: e.agent,
4867
4877
  isLight: K.value
4868
4878
  }, () => [b(ze, {
4869
4879
  agent: e.agent,
4870
4880
  "is-light": K.value,
4871
4881
  class: "mb-4 size-20 @sm/chat:size-24"
4872
- }, null, 8, ["agent", "is-light"]), v("div", { class: S(["text-base @sm/chat:text-lg font-semibold", K.value ? "text-theme-900" : "text-white"]) }, P(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? h("", !0) : (T(), _(f, { key: 0 }, [v("p", { class: S(["mt-1 text-center text-xs @sm/chat:text-sm", He.value]) }, P(e.emptyStateMessage || "Type your message to get started."), 3), v("div", {
4882
+ }, null, 8, ["agent", "is-light"]), v("div", { class: S(["text-base @sm/chat:text-lg font-semibold", K.value ? "text-theme-900" : "text-white"]) }, F(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? h("", !0) : (T(), _(f, { key: 0 }, [v("p", { class: S(["mt-1 text-center text-xs @sm/chat:text-sm", We.value]) }, F(e.emptyStateMessage || "Type your message to get started."), 3), v("div", {
4873
4883
  class: S(["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"]),
4874
4884
  title: n.value.tooltip
4875
- }, [v("i", { class: S([n.value.icon, "size-3"]) }, null, 2), v("span", null, P(n.value.label), 1)], 10, gi)], 64))])) : h("", !0),
4876
- (T(!0), _(f, null, A(R.value, (e, t) => (T(), _(f, { key: e.id }, [
4877
- shouldShowTimeDivider(R.value, t) ? (T(), _("div", _i, [
4878
- v("div", { class: S(["flex-1 h-px", Ve.value]) }, null, 2),
4879
- v("span", { class: S(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", He.value]) }, P(shouldShowTimeDivider(R.value, t)), 3),
4880
- v("div", { class: S(["flex-1 h-px", Ve.value]) }, null, 2)
4885
+ }, [v("i", { class: S([n.value.icon, "size-3"]) }, null, 2), v("span", null, F(n.value.label), 1)], 10, gi)], 64))])) : h("", !0),
4886
+ (T(!0), _(f, null, A(z.value, (e, t) => (T(), _(f, { key: e.id }, [
4887
+ shouldShowTimeDivider(z.value, t) ? (T(), _("div", _i, [
4888
+ v("div", { class: S(["flex-1 h-px", Ue.value]) }, null, 2),
4889
+ v("span", { class: S(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", We.value]) }, F(shouldShowTimeDivider(z.value, t)), 3),
4890
+ v("div", { class: S(["flex-1 h-px", Ue.value]) }, null, 2)
4881
4891
  ])) : h("", !0),
4882
4892
  messageWorkJournal(e) ? (T(), _("div", {
4883
4893
  key: 1,
@@ -4900,14 +4910,14 @@ var kr = [
4900
4910
  "data-issue-bucket": e.issue?.bucket,
4901
4911
  "data-issue-action-label": e.issue?.actionLabel,
4902
4912
  "data-issue-action-url": e.issue?.actionUrl,
4903
- "data-streaming": e.id === be.value ? "true" : void 0,
4913
+ "data-streaming": e.id === U.value ? "true" : void 0,
4904
4914
  class: "flex gap-2 items-end justify-start mb-4"
4905
4915
  }, [v("div", bi, [v("div", { class: S(["mb-1 pl-1 text-[11px] font-medium", K.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), v("div", { class: S(["rounded-[20px] rounded-bl-[4px] px-4 py-2.5 border system-msg-content", K.value ? "bg-theme-25 border-theme-200 text-theme-700" : "bg-white/[0.08] border-white/10 text-white/85"]) }, [e.text ? (T(), m(ai, {
4906
4916
  key: 0,
4907
4917
  text: e.text,
4908
4918
  inverted: !K.value,
4909
- streaming: e.id === be.value,
4910
- onClick: s[0] || (s[0] = I(() => {}, ["stop"])),
4919
+ streaming: e.id === U.value,
4920
+ onClick: s[0] || (s[0] = R(() => {}, ["stop"])),
4911
4921
  onAction: handleCardAction
4912
4922
  }, null, 8, [
4913
4923
  "text",
@@ -4922,8 +4932,8 @@ var kr = [
4922
4932
  href: e.issue.actionUrl,
4923
4933
  "data-test": "messaging-system-msg-action",
4924
4934
  class: S(["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"]),
4925
- onClick: s[1] || (s[1] = I(() => {}, ["stop"]))
4926
- }, [te(P(e.issue.actionLabel) + " ", 1), s[21] || (s[21] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, xi)) : h("", !0)], 2)])], 8, yi)) : e.sender === "system" ? (T(), _("div", {
4935
+ onClick: s[1] || (s[1] = R(() => {}, ["stop"]))
4936
+ }, [te(F(e.issue.actionLabel) + " ", 1), s[21] || (s[21] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, xi)) : h("", !0)], 2)])], 8, yi)) : e.sender === "system" ? (T(), _("div", {
4927
4937
  key: 3,
4928
4938
  "data-test": "messaging-system-status-msg",
4929
4939
  "data-message-id": e.id,
@@ -4933,12 +4943,12 @@ var kr = [
4933
4943
  "data-system-kind": e.systemKind,
4934
4944
  "data-issue-code": e.issue?.code,
4935
4945
  "data-issue-bucket": e.issue?.bucket,
4936
- "data-streaming": e.id === be.value ? "true" : void 0,
4946
+ "data-streaming": e.id === U.value ? "true" : void 0,
4937
4947
  class: S(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", K.value ? "text-theme-500" : "text-white/60"])
4938
4948
  }, [s[22] || (s[22] = v("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)), b(ai, {
4939
4949
  text: e.text,
4940
4950
  inverted: !K.value,
4941
- onClick: s[2] || (s[2] = I(() => {}, ["stop"]))
4951
+ onClick: s[2] || (s[2] = R(() => {}, ["stop"]))
4942
4952
  }, null, 8, ["text", "inverted"])], 10, Si)) : (T(), _("div", {
4943
4953
  key: 4,
4944
4954
  "data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
@@ -4947,11 +4957,11 @@ var kr = [
4947
4957
  "data-conversation-id": e.conversationId,
4948
4958
  "data-message-sequence": e.sequence,
4949
4959
  "data-system-kind": e.systemKind,
4950
- "data-streaming": e.id === be.value ? "true" : void 0,
4960
+ "data-streaming": e.id === U.value ? "true" : void 0,
4951
4961
  class: S(["flex gap-2 items-end", {
4952
4962
  "justify-end": e.sender === "user",
4953
4963
  "justify-start": e.sender === "agent",
4954
- "mb-6": isGroupEnd(R.value, t)
4964
+ "mb-6": isGroupEnd(z.value, t)
4955
4965
  }])
4956
4966
  }, [v("div", {
4957
4967
  "data-test": "messaging-message-body",
@@ -4981,15 +4991,15 @@ var kr = [
4981
4991
  "data-test": "messaging-attachment",
4982
4992
  "data-attachment-placement": "block",
4983
4993
  class: S(["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"])
4984
- }, [s[23] || (s[23] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + P(e.filename), 1)], 10, Ei))], 64))), 128))], 2)) : h("", !0), messageRenderParts(e).length ? (T(), _("div", {
4994
+ }, [s[23] || (s[23] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + F(e.filename), 1)], 10, Ei))], 64))), 128))], 2)) : h("", !0), messageRenderParts(e).length ? (T(), _("div", {
4985
4995
  key: 1,
4986
4996
  "data-test": "messaging-message-content",
4987
4997
  class: S(e.sender === "user" ? K.value ? "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-900 text-theme-0 shadow-[0_1px_2px_rgba(5,15,25,0.14)]" : "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-0 text-theme-950" : K.value ? "text-theme-800" : "text-white/95")
4988
4998
  }, [(T(!0), _(f, null, A(messageRenderParts(e), (t) => (T(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (T(), _("div", Di, [b(ai, {
4989
4999
  text: t.text,
4990
5000
  inverted: e.sender === "user" || !K.value,
4991
- streaming: e.id === be.value,
4992
- onClick: s[3] || (s[3] = I(() => {}, ["stop"])),
5001
+ streaming: e.id === U.value,
5002
+ onClick: s[3] || (s[3] = R(() => {}, ["stop"])),
4993
5003
  onAction: handleCardAction
4994
5004
  }, null, 8, [
4995
5005
  "text",
@@ -5017,8 +5027,8 @@ var kr = [
5017
5027
  "data-test": "messaging-attachment",
5018
5028
  "data-attachment-placement": t.placement,
5019
5029
  class: S(["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"])
5020
- }, [s[24] || (s[24] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + P(t.attachment.filename), 1)], 10, Ai)) : h("", !0)], 64))), 128))], 2)) : h("", !0)], 2)], 10, Ci)),
5021
- e.id === B.value ? (T(), _(f, { key: 5 }, [j.value.length ? (T(!0), _(f, { key: 0 }, A(j.value, (e) => (T(), _(f, { key: e.id }, [e.kind === "work" ? (T(), _("div", {
5030
+ }, [s[24] || (s[24] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + F(t.attachment.filename), 1)], 10, Ai)) : h("", !0)], 64))), 128))], 2)) : h("", !0)], 2)], 10, Ci)),
5031
+ e.id === ye.value ? (T(), _(f, { key: 5 }, [P.value.length ? (T(!0), _(f, { key: 0 }, A(P.value, (e) => (T(), _(f, { key: e.id }, [e.kind === "work" ? (T(), _("div", {
5022
5032
  key: 0,
5023
5033
  "data-test": "messaging-tool-activity",
5024
5034
  "data-journal-outcome": e.journal.outcome,
@@ -5034,61 +5044,61 @@ var kr = [
5034
5044
  text: e.content,
5035
5045
  inverted: !K.value,
5036
5046
  streaming: e.id === se.value,
5037
- onClick: s[4] || (s[4] = I(() => {}, ["stop"])),
5047
+ onClick: s[4] || (s[4] = R(() => {}, ["stop"])),
5038
5048
  onAction: handleCardAction
5039
5049
  }, null, 8, [
5040
5050
  "text",
5041
5051
  "inverted",
5042
5052
  "streaming"
5043
- ])], 2)) : (T(), _("div", Mi, [b(_e, { class: S(["size-3.5", K.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : ve.value ? (T(), _("div", {
5053
+ ])], 2)) : (T(), _("div", Mi, [b(_e, { class: S(["size-3.5", K.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : B.value ? (T(), _("div", {
5044
5054
  key: 1,
5045
5055
  "data-test": "messaging-tool-activity",
5046
- "data-journal-outcome": ve.value.outcome,
5056
+ "data-journal-outcome": B.value.outcome,
5047
5057
  class: "mb-4 w-full"
5048
5058
  }, [b(qe, {
5049
- model: ve.value,
5059
+ model: B.value,
5050
5060
  "is-light": K.value
5051
5061
  }, null, 8, ["model", "is-light"])], 8, Ni)) : h("", !0)], 64)) : h("", !0)
5052
5062
  ], 64))), 128)),
5053
- z.value ? (T(), _("div", {
5063
+ W.value ? (T(), _("div", {
5054
5064
  key: 1,
5055
- "data-test": "messaging-working-state",
5056
- "data-working-description": z.value,
5057
- class: S(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", K.value ? "text-theme-500" : "text-white/45"])
5058
- }, [s[25] || (s[25] = v("i", {
5059
- class: "i-tabler-loader-2 size-3.5 shrink-0 animate-spin opacity-70",
5060
- "aria-hidden": "true"
5061
- }, null, -1)), v("span", Fi, P(z.value), 1)], 10, Pi)) : h("", !0),
5062
- H.value ? (T(), _("div", {
5065
+ "data-test": ve.value ? "messaging-working-state" : "messaging-thinking-indicator",
5066
+ "data-working-description": ve.value,
5067
+ role: "status",
5068
+ "aria-live": "polite",
5069
+ class: S(["mb-4 flex items-center gap-2.5 pl-0.5 text-[13.5px] leading-none", K.value ? "text-theme-500" : "text-white/50"])
5070
+ }, [v("span", Fi, [(T(), _(f, null, A(3, (e) => v("span", {
5071
+ key: e,
5072
+ "data-test": "messaging-thinking-dot",
5073
+ class: "chat-working-dot size-1.5 rounded-full bg-current",
5074
+ style: C({ animationDelay: `${(e - 1) * .18}s` })
5075
+ }, null, 4)), 64))]), v("span", Ii, F(W.value), 1)], 10, Pi)) : h("", !0),
5076
+ be.value ? (T(), _("div", {
5063
5077
  key: 2,
5064
5078
  "data-test": "messaging-transient-issue",
5065
- "data-issue-code": H.value.code,
5079
+ "data-issue-code": be.value.code,
5066
5080
  class: S(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", K.value ? "text-theme-600" : "text-white/60"])
5067
5081
  }, [
5068
- s[26] || (s[26] = v("i", {
5082
+ s[25] || (s[25] = v("i", {
5069
5083
  class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
5070
5084
  "aria-hidden": "true"
5071
5085
  }, null, -1)),
5072
- v("span", null, [te(P(H.value.message), 1), H.value.help ? (T(), _(f, { key: 0 }, [te(P(H.value.help), 1)], 64)) : h("", !0)]),
5073
- H.value.actionUrl && H.value.actionLabel ? (T(), _("a", {
5086
+ v("span", null, [te(F(be.value.message), 1), be.value.help ? (T(), _(f, { key: 0 }, [te(F(be.value.help), 1)], 64)) : h("", !0)]),
5087
+ be.value.actionUrl && be.value.actionLabel ? (T(), _("a", {
5074
5088
  key: 0,
5075
- href: H.value.actionUrl,
5089
+ href: be.value.actionUrl,
5076
5090
  class: "shrink-0 underline underline-offset-2",
5077
- onClick: s[5] || (s[5] = I(() => {}, ["stop"]))
5078
- }, P(H.value.actionLabel), 9, Li)) : h("", !0)
5079
- ], 10, Ii)) : h("", !0),
5080
- U.value ? (T(), _("div", Ri, [v("i", {
5081
- class: S(["i-svg-spinners-3-dots-bounce size-7", K.value ? "text-theme-400" : "text-white/50"]),
5082
- "aria-hidden": "true"
5083
- }, null, 2)])) : h("", !0)
5091
+ onClick: s[5] || (s[5] = R(() => {}, ["stop"]))
5092
+ }, F(be.value.actionLabel), 9, Ri)) : h("", !0)
5093
+ ], 10, Li)) : h("", !0)
5084
5094
  ], 2)]),
5085
5095
  _: 3
5086
5096
  }, 8, ["class"]),
5087
- v("div", { class: S(["left-0 right-0 z-30 px-5 pb-4 pt-3", [R.value.length === 0 ? "relative shrink-0" : "absolute bottom-0", K.value ? "bg-gradient-to-t from-theme-0/90 via-theme-0/55 to-transparent" : "bg-gradient-to-t from-black/90 via-black/60 to-transparent"]]) }, [
5088
- Ee.value.length > 0 ? (T(), _("div", {
5097
+ v("div", { class: S(["left-0 right-0 z-30 px-5 pb-4 pt-3", [z.value.length === 0 ? "relative shrink-0" : "absolute bottom-0", K.value ? e.centered ? "bg-gradient-to-t from-theme-25/50 via-theme-25/25 to-transparent" : "bg-gradient-to-t from-theme-0/90 via-theme-0/55 to-transparent" : "bg-gradient-to-t from-black/90 via-black/60 to-transparent"]]) }, [
5098
+ Oe.value.length > 0 ? (T(), _("div", {
5089
5099
  key: 0,
5090
5100
  class: S(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e.centered ? "max-w-[720px] mx-auto" : ""])
5091
- }, [(T(!0), _(f, null, A(Ee.value, (e, t) => (T(), _("div", {
5101
+ }, [(T(!0), _(f, null, A(Oe.value, (e, t) => (T(), _("div", {
5092
5102
  key: t,
5093
5103
  class: "relative shrink-0 group"
5094
5104
  }, [e.type === "image" ? (T(), _("img", {
@@ -5099,11 +5109,11 @@ var kr = [
5099
5109
  }, null, 10, zi)) : (T(), _("div", {
5100
5110
  key: 1,
5101
5111
  class: S(["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"])
5102
- }, [s[27] || (s[27] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span", Bi, P(e.filename), 1)], 2)), v("button", {
5112
+ }, [s[26] || (s[26] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span", Bi, F(e.filename), 1)], 2)), v("button", {
5103
5113
  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",
5104
5114
  onClick: (e) => removeAttachment(t)
5105
- }, [...s[28] || (s[28] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Vi)]))), 128)), De.value ? (T(), _("div", Hi, [b(_e, { class: "size-5" })])) : h("", !0)], 2)) : h("", !0),
5106
- G.value ? (T(), _("input", {
5115
+ }, [...s[27] || (s[27] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Vi)]))), 128)), ke.value ? (T(), _("div", Hi, [b(_e, { class: "size-5" })])) : h("", !0)], 2)) : h("", !0),
5116
+ je.value ? (T(), _("input", {
5107
5117
  key: 1,
5108
5118
  ref_key: "fileInput",
5109
5119
  ref: o,
@@ -5114,27 +5124,27 @@ var kr = [
5114
5124
  }, null, 544)) : h("", !0),
5115
5125
  v("div", {
5116
5126
  "data-test": "messaging-composer",
5117
- "data-composer-action": je.value,
5127
+ "data-composer-action": Ne.value,
5118
5128
  class: S(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? "max-w-[720px] mx-auto" : "", K.value ? r.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-300" : "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300" : r.value ? "bg-white/15 backdrop-blur-xl ring-1 ring-white/25" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25"]]),
5119
5129
  onClick: focusComposer
5120
- }, [Ie.value ? (T(), _("div", {
5130
+ }, [Re.value ? (T(), _("div", {
5121
5131
  key: 1,
5122
5132
  "data-test": "messaging-recording-state",
5123
5133
  class: S(["flex min-w-0 items-center gap-2 py-1", K.value ? "text-theme-700" : "text-white/80"])
5124
5134
  }, [
5125
- s[29] || (s[29] = v("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5126
- v("span", Gi, P(Le.value), 1),
5127
- v("span", { class: S(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, P(Re.value), 3)
5128
- ], 2)) : pe((T(), _("textarea", {
5135
+ s[28] || (s[28] = v("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5136
+ v("span", Gi, F(Be.value), 1),
5137
+ v("span", { class: S(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, F(Ve.value), 3)
5138
+ ], 2)) : de((T(), _("textarea", {
5129
5139
  key: 0,
5130
5140
  ref_key: "textarea",
5131
5141
  ref: a,
5132
- "onUpdate:modelValue": s[6] || (s[6] = (e) => Te.value = e),
5142
+ "onUpdate:modelValue": s[6] || (s[6] = (e) => De.value = e),
5133
5143
  "data-test": "messaging-input",
5134
5144
  rows: "1",
5135
5145
  enterkeyhint: "send",
5136
- placeholder: Ce.value,
5137
- disabled: W.value,
5146
+ placeholder: Te.value,
5147
+ disabled: we.value,
5138
5148
  style: {
5139
5149
  fontSize: "16px",
5140
5150
  resize: "none"
@@ -5143,73 +5153,74 @@ var kr = [
5143
5153
  onKeydown: handleKeydown,
5144
5154
  onFocus: s[7] || (s[7] = (e) => r.value = !0),
5145
5155
  onBlur: s[8] || (s[8] = (e) => r.value = !1)
5146
- }, null, 42, Wi)), [[ue, Te.value]]), v("div", Ki, [
5156
+ }, null, 42, Wi)), [[ce, De.value]]), v("div", Ki, [
5147
5157
  v("button", {
5148
5158
  class: S(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70", [
5149
- G.value ? "cursor-pointer" : "cursor-default",
5159
+ je.value ? "cursor-pointer" : "cursor-default",
5150
5160
  K.value ? "text-theme-500" : "text-white/50",
5151
- De.value || ke.value ? "opacity-50 pointer-events-none" : ""
5161
+ ke.value || Ae.value ? "opacity-50 pointer-events-none" : ""
5152
5162
  ]]),
5153
- disabled: W.value || De.value || ke.value || !G.value,
5154
- "aria-label": G.value ? "Attach file" : "File attachments unavailable",
5155
- title: G.value ? "Attach file" : "File attachments unavailable",
5156
- onClick: s[9] || (s[9] = (e) => G.value && triggerFileInput())
5157
- }, [De.value ? (T(), _("i", Ji)) : (T(), _("i", Yi)), v("span", Xi, P(G.value ? "Attach file" : "File attachments unavailable"), 1)], 10, qi),
5158
- s[30] || (s[30] = v("div", { class: "flex-1" }, null, -1)),
5159
- v("div", Zi, [Fe.value || Ie.value ? (T(), _("button", {
5163
+ disabled: we.value || ke.value || Ae.value || !je.value,
5164
+ "aria-label": je.value ? "Attach file" : "File attachments unavailable",
5165
+ title: je.value ? "Attach file" : "File attachments unavailable",
5166
+ onClick: s[9] || (s[9] = (e) => je.value && triggerFileInput())
5167
+ }, [ke.value ? (T(), _("i", Ji)) : (T(), _("i", Yi)), v("span", Xi, F(je.value ? "Attach file" : "File attachments unavailable"), 1)], 10, qi),
5168
+ s[29] || (s[29] = v("div", { class: "flex-1" }, null, -1)),
5169
+ v("div", Zi, [Le.value || Re.value ? (T(), _("button", {
5160
5170
  key: 0,
5161
5171
  "data-test": "messaging-record-audio-btn",
5162
- class: S(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70", Ie.value ? K.value ? "text-theme-900 scale-110" : "text-white scale-110" : K.value ? "text-theme-500" : "text-white/60"]),
5163
- "aria-label": Be.value,
5164
- title: Be.value,
5165
- onPointerdown: s[10] || (s[10] = I((e) => startRecording(), ["prevent"])),
5166
- onPointerup: s[11] || (s[11] = I((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5167
- onPointercancel: s[12] || (s[12] = I((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5172
+ class: S(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70", Re.value ? K.value ? "text-theme-900 scale-110" : "text-white scale-110" : K.value ? "text-theme-500" : "text-white/60"]),
5173
+ "aria-label": He.value,
5174
+ title: He.value,
5175
+ onPointerdown: s[10] || (s[10] = R((e) => startRecording(), ["prevent"])),
5176
+ onPointerup: s[11] || (s[11] = R((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5177
+ onPointercancel: s[12] || (s[12] = R((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5168
5178
  onKeydown: [
5169
- s[13] || (s[13] = he(I((e) => startRecording(), ["prevent"]), ["enter"])),
5170
- s[15] || (s[15] = he(I((e) => startRecording(), ["prevent"]), ["space"])),
5171
- s[17] || (s[17] = he(I((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5179
+ s[13] || (s[13] = pe(R((e) => startRecording(), ["prevent"]), ["enter"])),
5180
+ s[15] || (s[15] = pe(R((e) => startRecording(), ["prevent"]), ["space"])),
5181
+ s[17] || (s[17] = pe(R((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5172
5182
  ],
5173
- onKeyup: [s[14] || (s[14] = he(I((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), s[16] || (s[16] = he(I((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5174
- }, [v("i", { class: S([Ie.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", $i, P(Be.value), 1)], 42, Qi)) : h("", !0), Ie.value ? h("", !0) : (T(), _("button", {
5183
+ onKeyup: [s[14] || (s[14] = pe(R((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), s[16] || (s[16] = pe(R((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5184
+ }, [v("i", { class: S([Re.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", $i, F(He.value), 1)], 42, Qi)) : h("", !0), Re.value ? h("", !0) : (T(), _("button", {
5175
5185
  key: 1,
5176
5186
  "data-test": "messaging-send-btn",
5177
- "data-composer-action": je.value,
5178
- class: S(["flex size-8 items-center justify-center rounded-full transition-colors duration-150", Me.value ? K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer" : "bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer" : K.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
5179
- disabled: !Me.value,
5180
- "aria-label": Ne.value,
5181
- title: Ne.value,
5187
+ "data-composer-action": Ne.value,
5188
+ class: S(["flex size-8 items-center justify-center rounded-full transition-colors duration-150", Fe.value ? K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer" : "bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer" : K.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
5189
+ disabled: !Fe.value,
5190
+ "aria-label": Ie.value,
5191
+ title: Ie.value,
5182
5192
  onClick: s[18] || (s[18] = (e) => handleComposerAction())
5183
- }, [je.value === "stop" ? (T(), _("i", ta)) : (T(), _("i", na)), v("span", ra, P(Ne.value), 1)], 10, ea))])
5193
+ }, [Ne.value === "stop" ? (T(), _("i", ta)) : (T(), _("i", na)), v("span", ra, F(Ie.value), 1)], 10, ea))])
5184
5194
  ])], 10, Ui),
5185
- R.value.length === 0 && e.suggestedPrompts.length > 0 ? (T(), _("div", ia, [v("div", aa, [(T(!0), _(f, null, A(e.suggestedPrompts, (e, t) => (T(), _("button", {
5195
+ K.value && e.centered && e.scope === "private" ? (T(), _("div", ia, F(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : h("", !0),
5196
+ z.value.length === 0 && e.suggestedPrompts.length > 0 ? (T(), _("div", aa, [v("div", oa, [(T(!0), _(f, null, A(e.suggestedPrompts, (e, t) => (T(), _("button", {
5186
5197
  key: e.id,
5187
5198
  type: "button",
5188
- disabled: W.value,
5199
+ disabled: we.value,
5189
5200
  "data-test": "messaging-suggested-prompt",
5190
- class: S(["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]", [W.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !re.value && t >= 3 ? "max-sm:hidden" : ""]]),
5201
+ class: S(["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]", [we.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !j.value && t >= 3 ? "max-sm:hidden" : ""]]),
5191
5202
  onClick: (t) => sendSuggestedPrompt(e)
5192
- }, P(e.label), 11, oa))), 128)), e.suggestedPrompts.length > 3 ? (T(), _("button", {
5203
+ }, F(e.label), 11, sa))), 128)), e.suggestedPrompts.length > 3 ? (T(), _("button", {
5193
5204
  key: 0,
5194
5205
  type: "button",
5195
5206
  "data-test": "messaging-suggested-prompts-more",
5196
- "aria-expanded": re.value,
5207
+ "aria-expanded": j.value,
5197
5208
  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",
5198
- onClick: s[19] || (s[19] = (e) => re.value = !re.value)
5199
- }, [te(P(re.value ? "See less" : "See more") + " ", 1), v("i", { class: S(["i-tabler-chevron-down size-4 transition-transform", re.value ? "rotate-180" : ""]) }, null, 2)], 8, sa)) : h("", !0)])])) : h("", !0)
5209
+ onClick: s[19] || (s[19] = (e) => j.value = !j.value)
5210
+ }, [te(F(j.value ? "See less" : "See more") + " ", 1), v("i", { class: S(["i-tabler-chevron-down size-4 transition-transform", j.value ? "rotate-180" : ""]) }, null, 2)], 8, ca)) : h("", !0)])])) : h("", !0)
5200
5211
  ], 2)
5201
5212
  ], 2));
5202
5213
  }
5203
- }), la = { class: "agent-wrap" }, ua = {
5214
+ }), ua = { class: "agent-wrap" }, da = {
5204
5215
  key: 0,
5205
5216
  class: "flex items-center justify-center h-full"
5206
- }, da = {
5217
+ }, fa = {
5207
5218
  key: 2,
5208
5219
  class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
5209
5220
  role: "status",
5210
5221
  "aria-live": "polite",
5211
5222
  "data-test": "agent-unavailable"
5212
- }, fa = /* @__PURE__ */ x({
5223
+ }, pa = /* @__PURE__ */ x({
5213
5224
  __name: "AgentWrap",
5214
5225
  props: {
5215
5226
  sdk: {},
@@ -5229,7 +5240,7 @@ var kr = [
5229
5240
  let r = a("AgentWrap"), i = e, o = i.sdk || t.getInstance({
5230
5241
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
5231
5242
  ...i.apiBase && { apiBase: i.apiBase }
5232
- }), s = se(!i.agent), c = se(i.agent ? new n({ config: i.agent }) : void 0), u = se();
5243
+ }), s = P(!i.agent), c = P(i.agent ? new n({ config: i.agent }) : void 0), u = P();
5233
5244
  async function loadAgent() {
5234
5245
  if (i.agent) {
5235
5246
  r.debug("Agent provided via props, skipping fetch", {
@@ -5305,15 +5316,15 @@ var kr = [
5305
5316
  });
5306
5317
  }
5307
5318
  }
5308
- return ie(loadAgent), (t, n) => (T(), _("div", la, [s.value ? (T(), _("div", ua, [v("div", { class: S(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? oe(t.$slots, "default", {
5309
- sdk: ce(o),
5319
+ return ie(loadAgent), (t, n) => (T(), _("div", ua, [s.value ? (T(), _("div", da, [v("div", { class: S(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? oe(t.$slots, "default", {
5320
+ sdk: se(o),
5310
5321
  agent: c.value,
5311
5322
  context: e.clientContext ?? e.context,
5312
5323
  firstMessage: e.firstMessage,
5313
5324
  buttonText: e.buttonText,
5314
5325
  buttonIcon: e.buttonIcon,
5315
5326
  loading: s.value
5316
- }, void 0, void 0, 1) : u.value ? (T(), _("div", da, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
5327
+ }, void 0, void 0, 1) : u.value ? (T(), _("div", fa, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
5317
5328
  type: "button",
5318
5329
  class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
5319
5330
  "data-test": "agent-unavailable-retry",
@@ -5322,6 +5333,6 @@ var kr = [
5322
5333
  }
5323
5334
  });
5324
5335
  //#endregion
5325
- export { ke as a, getAgentAvatarUrl as c, AgentChatController as d, ve as f, Pe as i, handleImageError as l, _e as m, ca as n, De as o, n as p, ai as r, Te as s, fa as t, parseButtonTemplate as u };
5336
+ export { ke as a, getAgentAvatarUrl as c, AgentChatController as d, ve as f, Pe as i, handleImageError as l, _e as m, la as n, De as o, n as p, ai as r, Te as s, pa as t, parseButtonTemplate as u };
5326
5337
 
5327
5338
  //# sourceMappingURL=AgentWrap.js.map