@pagelines/sdk 1.0.766 → 1.0.768
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 +69 -39
- package/dist/AgentWrap.js.map +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/ui/VoiceMode.vue.d.ts +3 -0
- package/dist/agent/voice/provider.d.ts +7 -0
- package/dist/agent/voice/providers/elevenlabs/provider.d.ts +7 -6
- package/dist/agent/voice/voice-session-client.d.ts +17 -1
- package/dist/agent.js +22 -8
- package/dist/agent.js.map +1 -1
- package/dist/contract.js +1 -0
- package/dist/contract.js.map +1 -1
- package/dist/provider.js.map +1 -1
- package/dist/provider2.js +3 -0
- package/dist/provider2.js.map +1 -1
- package/dist/widget.js +1 -1
- package/package.json +1 -1
package/dist/AgentWrap.js
CHANGED
|
@@ -1358,7 +1358,7 @@ function _unsupportedIterableToArray(e, t) {
|
|
|
1358
1358
|
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _arrayLikeToArray(e, t) : void 0;
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
|
-
var Ye = Object.entries, Xe = Object.setPrototypeOf,
|
|
1361
|
+
var Ye = Object.entries, Xe = Object.setPrototypeOf, Ze = Object.isFrozen, K = Object.getPrototypeOf, Qe = Object.getOwnPropertyDescriptor, q = Object.freeze, J = Object.seal, $e = Object.create, et = typeof Reflect < "u" && Reflect, tt = et.apply, nt = et.construct;
|
|
1362
1362
|
q || (q = function freeze(e) {
|
|
1363
1363
|
return e;
|
|
1364
1364
|
}), J || (J = function seal(e) {
|
|
@@ -1390,7 +1390,7 @@ function addToSet(e, t) {
|
|
|
1390
1390
|
let i = t[r];
|
|
1391
1391
|
if (typeof i == "string") {
|
|
1392
1392
|
let e = n(i);
|
|
1393
|
-
e !== i && (
|
|
1393
|
+
e !== i && (Ze(t) || (t[r] = e), i = e);
|
|
1394
1394
|
}
|
|
1395
1395
|
e[i] = !0;
|
|
1396
1396
|
}
|
|
@@ -1437,7 +1437,7 @@ function lookupGetter(e, t) {
|
|
|
1437
1437
|
if (n.get) return unapply(n.get);
|
|
1438
1438
|
if (typeof n.value == "function") return unapply(n.value);
|
|
1439
1439
|
}
|
|
1440
|
-
e =
|
|
1440
|
+
e = K(e);
|
|
1441
1441
|
}
|
|
1442
1442
|
function fallbackValue() {
|
|
1443
1443
|
return null;
|
|
@@ -1651,7 +1651,7 @@ function createDOMPurify() {
|
|
|
1651
1651
|
"source",
|
|
1652
1652
|
"image",
|
|
1653
1653
|
"track"
|
|
1654
|
-
]), Xe = null,
|
|
1654
|
+
]), Xe = null, Ze = addToSet({}, [
|
|
1655
1655
|
"alt",
|
|
1656
1656
|
"class",
|
|
1657
1657
|
"for",
|
|
@@ -1666,8 +1666,8 @@ function createDOMPurify() {
|
|
|
1666
1666
|
"value",
|
|
1667
1667
|
"style",
|
|
1668
1668
|
"xmlns"
|
|
1669
|
-
]),
|
|
1670
|
-
|
|
1669
|
+
]), K = "http://www.w3.org/1998/Math/MathML", Qe = "http://www.w3.org/2000/svg", et = "http://www.w3.org/1999/xhtml", tt = et, nt = !1, gt = null, _t = addToSet({}, [
|
|
1670
|
+
K,
|
|
1671
1671
|
Qe,
|
|
1672
1672
|
et
|
|
1673
1673
|
], dt), vt = q([
|
|
@@ -1687,9 +1687,9 @@ function createDOMPurify() {
|
|
|
1687
1687
|
}, on = function _parseConfig() {
|
|
1688
1688
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1689
1689
|
if (nn && nn === e) return;
|
|
1690
|
-
(!e || typeof e != "object") && (e = {}), e = clone(e), en = tn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = en === "application/xhtml+xml" ? dt : ut, U = Zt(e, "ALLOWED_TAGS", ye, { transform: Q }), W = Zt(e, "ALLOWED_ATTR", be, { transform: Q }), gt = Zt(e, "ALLOWED_NAMESPACES", _t, { transform: dt }), Xe = Zt(e, "ADD_URI_SAFE_ATTR",
|
|
1690
|
+
(!e || typeof e != "object") && (e = {}), e = clone(e), en = tn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = en === "application/xhtml+xml" ? dt : ut, U = Zt(e, "ALLOWED_TAGS", ye, { transform: Q }), W = Zt(e, "ALLOWED_ATTR", be, { transform: Q }), gt = Zt(e, "ALLOWED_NAMESPACES", _t, { transform: dt }), Xe = Zt(e, "ADD_URI_SAFE_ATTR", Ze, {
|
|
1691
1691
|
transform: Q,
|
|
1692
|
-
base:
|
|
1692
|
+
base: Ze
|
|
1693
1693
|
}), qe = Zt(e, "ADD_DATA_URI_TAGS", Je, {
|
|
1694
1694
|
transform: Q,
|
|
1695
1695
|
base: Je
|
|
@@ -1716,11 +1716,11 @@ function createDOMPurify() {
|
|
|
1716
1716
|
...wt,
|
|
1717
1717
|
...Tt
|
|
1718
1718
|
]), cn = addToSet({}, [...Et, ...Dt]), ln = function _checkSvgNamespace(e, t, n) {
|
|
1719
|
-
return t.namespaceURI === et ? e === "svg" : t.namespaceURI ===
|
|
1719
|
+
return t.namespaceURI === et ? e === "svg" : t.namespaceURI === K ? e === "svg" && (n === "annotation-xml" || yt[n]) : !!sn[e];
|
|
1720
1720
|
}, un = function _checkMathMlNamespace(e, t, n) {
|
|
1721
1721
|
return t.namespaceURI === et ? e === "math" : t.namespaceURI === Qe ? e === "math" && Qt[n] : !!cn[e];
|
|
1722
1722
|
}, dn = function _checkHtmlNamespace(e, t, n) {
|
|
1723
|
-
return t.namespaceURI === Qe && !Qt[n] || t.namespaceURI ===
|
|
1723
|
+
return t.namespaceURI === Qe && !Qt[n] || t.namespaceURI === K && !yt[n] ? !1 : !cn[e] && ($t[e] || !sn[e]);
|
|
1724
1724
|
}, fn = function _checkValidNamespace(e) {
|
|
1725
1725
|
let t = v(e);
|
|
1726
1726
|
(!t || !t.tagName) && (t = {
|
|
@@ -1728,7 +1728,7 @@ function createDOMPurify() {
|
|
|
1728
1728
|
tagName: "template"
|
|
1729
1729
|
});
|
|
1730
1730
|
let n = ut(e.tagName), r = ut(t.tagName);
|
|
1731
|
-
return gt[e.namespaceURI] ? e.namespaceURI === Qe ? ln(n, t, r) : e.namespaceURI ===
|
|
1731
|
+
return gt[e.namespaceURI] ? e.namespaceURI === Qe ? ln(n, t, r) : e.namespaceURI === K ? un(n, t, r) : e.namespaceURI === et ? dn(n, t, r) : !!(en === "application/xhtml+xml" && gt[e.namespaceURI]) : !1;
|
|
1732
1732
|
}, pn = function _forceRemove(e) {
|
|
1733
1733
|
st(DOMPurify.removed, { element: e });
|
|
1734
1734
|
try {
|
|
@@ -4626,7 +4626,13 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
4626
4626
|
async function end() {
|
|
4627
4627
|
u = !0, await c.value?.end();
|
|
4628
4628
|
}
|
|
4629
|
-
|
|
4629
|
+
function sendUserMessage(e) {
|
|
4630
|
+
return c.value?.sendUserMessage(e) ?? !1;
|
|
4631
|
+
}
|
|
4632
|
+
t({
|
|
4633
|
+
end,
|
|
4634
|
+
sendUserMessage
|
|
4635
|
+
});
|
|
4630
4636
|
function easeFrame(e) {
|
|
4631
4637
|
ae = 0;
|
|
4632
4638
|
let t = Math.min(64, Math.max(0, e - oe));
|
|
@@ -4667,6 +4673,9 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
4667
4673
|
code: t.code,
|
|
4668
4674
|
providerMessage: t.message
|
|
4669
4675
|
});
|
|
4676
|
+
},
|
|
4677
|
+
onMetric: (t) => {
|
|
4678
|
+
e.chatController?.logger?.info(t.name, { durationMs: t.durationMs });
|
|
4670
4679
|
}
|
|
4671
4680
|
});
|
|
4672
4681
|
if (!t) {
|
|
@@ -4949,12 +4958,23 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
4949
4958
|
function startVoiceConversation() {
|
|
4950
4959
|
!qe.value || Ye.value || (We.value = !0);
|
|
4951
4960
|
}
|
|
4961
|
+
let Ze = p(() => We.value && we.value.text.trim().length > 0);
|
|
4962
|
+
async function sendVoiceUserMessage() {
|
|
4963
|
+
let t = we.value.text.trim();
|
|
4964
|
+
if (t) {
|
|
4965
|
+
if (Ge.value?.sendUserMessage(t)) {
|
|
4966
|
+
e.chatController?.setComposerText?.({ text: "" }), i.value?.focus();
|
|
4967
|
+
return;
|
|
4968
|
+
}
|
|
4969
|
+
await sendMessage();
|
|
4970
|
+
}
|
|
4971
|
+
}
|
|
4952
4972
|
async function endVoiceConversation() {
|
|
4953
4973
|
if (!We.value) return;
|
|
4954
4974
|
let t = Ge.value?.end();
|
|
4955
4975
|
We.value = !1, await C(), await t, i.value?.focus(), await e.chatController?.refreshMessages();
|
|
4956
4976
|
}
|
|
4957
|
-
let K = p(() => e.variant === "light"),
|
|
4977
|
+
let K = p(() => e.variant === "light"), Qe = 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"), q = p(() => K.value ? "text-theme-300" : "text-white/30");
|
|
4958
4978
|
te(async () => {
|
|
4959
4979
|
e.chatController && !s.value && await e.chatController.startTextConversation();
|
|
4960
4980
|
}), ne(() => {
|
|
@@ -4982,7 +5002,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
4982
5002
|
}
|
|
4983
5003
|
}
|
|
4984
5004
|
async function handleKeydown(e) {
|
|
4985
|
-
e.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await sendMessage());
|
|
5005
|
+
e.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await (Ze.value ? sendVoiceUserMessage() : sendMessage()));
|
|
4986
5006
|
}
|
|
4987
5007
|
function focusComposer(e) {
|
|
4988
5008
|
Be.value || Se.value || e.target instanceof Element && e.target.closest("button, a, textarea") || i.value?.focus();
|
|
@@ -5067,8 +5087,8 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5067
5087
|
class: T(["py-16 flex flex-col items-center justify-center gap-2 text-sm", K.value ? "text-theme-400" : "text-theme-600"])
|
|
5068
5088
|
}, [x(pe, { class: "size-4" })], 2)) : e.setupHint ? (j(), _("div", {
|
|
5069
5089
|
key: 1,
|
|
5070
|
-
class: T(["flex items-center justify-center gap-1.5 py-2 text-[11px]",
|
|
5071
|
-
}, [o[
|
|
5090
|
+
class: T(["flex items-center justify-center gap-1.5 py-2 text-[11px]", q.value])
|
|
5091
|
+
}, [o[22] || (o[22] = v("i", { class: "i-tabler-tool size-3" }, null, -1)), v("span", null, I(e.setupHint), 1)], 2)) : h("", !0), x(ci, {
|
|
5072
5092
|
ref_key: "chatScroller",
|
|
5073
5093
|
ref: r,
|
|
5074
5094
|
class: T(B.value.length === 0 ? "flex-none" : "flex-1")
|
|
@@ -5081,15 +5101,15 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5081
5101
|
agent: e.agent,
|
|
5082
5102
|
"is-light": K.value,
|
|
5083
5103
|
class: "mb-4 size-20 @sm/chat:size-24"
|
|
5084
|
-
}, null, 8, ["agent", "is-light"]), v("div", { class: T(["text-base @sm/chat:text-lg font-semibold", K.value ? "text-theme-900" : "text-white"]) }, I(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? h("", !0) : (j(), _(f, { key: 0 }, [v("p", { class: T(["mt-1 text-center text-xs @sm/chat:text-sm",
|
|
5104
|
+
}, null, 8, ["agent", "is-light"]), v("div", { class: T(["text-base @sm/chat:text-lg font-semibold", K.value ? "text-theme-900" : "text-white"]) }, I(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? h("", !0) : (j(), _(f, { key: 0 }, [v("p", { class: T(["mt-1 text-center text-xs @sm/chat:text-sm", q.value]) }, I(e.emptyStateMessage || "Type your message to get started."), 3), v("div", {
|
|
5085
5105
|
class: T(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", K.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
|
|
5086
5106
|
title: n.value.tooltip
|
|
5087
5107
|
}, [v("i", { class: T([n.value.icon, "size-3"]) }, null, 2), v("span", null, I(n.value.label), 1)], 10, Di)], 64))])) : h("", !0),
|
|
5088
5108
|
(j(!0), _(f, null, P(B.value, (e, t) => (j(), _(f, { key: e.id }, [
|
|
5089
5109
|
shouldShowTimeDivider(B.value, t) ? (j(), _("div", Oi, [
|
|
5090
|
-
v("div", { class: T(["flex-1 h-px",
|
|
5091
|
-
v("span", { class: T(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase",
|
|
5092
|
-
v("div", { class: T(["flex-1 h-px",
|
|
5110
|
+
v("div", { class: T(["flex-1 h-px", Qe.value]) }, null, 2),
|
|
5111
|
+
v("span", { class: T(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", q.value]) }, I(shouldShowTimeDivider(B.value, t)), 3),
|
|
5112
|
+
v("div", { class: T(["flex-1 h-px", Qe.value]) }, null, 2)
|
|
5093
5113
|
])) : h("", !0),
|
|
5094
5114
|
messageWorkJournal(e) ? (j(), _("div", {
|
|
5095
5115
|
key: 1,
|
|
@@ -5135,7 +5155,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5135
5155
|
"data-test": "messaging-system-msg-action",
|
|
5136
5156
|
class: T(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", K.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
|
|
5137
5157
|
onClick: o[1] || (o[1] = de(() => {}, ["stop"]))
|
|
5138
|
-
}, [b(I(e.issue.actionLabel) + " ", 1), o[
|
|
5158
|
+
}, [b(I(e.issue.actionLabel) + " ", 1), o[23] || (o[23] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, Mi)) : h("", !0)], 2)])], 8, Ai)) : e.sender === "system" ? (j(), _("div", {
|
|
5139
5159
|
key: 3,
|
|
5140
5160
|
"data-test": "messaging-system-status-msg",
|
|
5141
5161
|
"data-message-id": e.id,
|
|
@@ -5147,7 +5167,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5147
5167
|
"data-issue-bucket": e.issue?.bucket,
|
|
5148
5168
|
"data-streaming": e.id === ye.value ? "true" : void 0,
|
|
5149
5169
|
class: T(["mb-4 flex w-fit max-w-[85%] items-start gap-2 rounded-2xl px-3 py-2 text-[13px] leading-relaxed ring-1", K.value ? "bg-theme-100 text-theme-600 ring-theme-200" : "bg-white/10 text-white/70 ring-white/10"])
|
|
5150
|
-
}, [o[
|
|
5170
|
+
}, [o[24] || (o[24] = v("i", {
|
|
5151
5171
|
class: "i-tabler-info-circle size-4 mt-0.5 shrink-0",
|
|
5152
5172
|
"aria-hidden": "true"
|
|
5153
5173
|
}, null, -1)), x(ai, {
|
|
@@ -5199,7 +5219,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5199
5219
|
"data-test": "messaging-attachment",
|
|
5200
5220
|
"data-attachment-placement": "block",
|
|
5201
5221
|
class: T(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
|
|
5202
|
-
}, [o[
|
|
5222
|
+
}, [o[25] || (o[25] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), b(" " + I(e.filename), 1)], 10, Li))], 64))), 128))], 2)) : h("", !0), messageRenderParts(e).length ? (j(), _("div", {
|
|
5203
5223
|
key: 1,
|
|
5204
5224
|
"data-test": "messaging-message-content",
|
|
5205
5225
|
class: T(e.sender === "user" ? K.value ? "rounded-[14px] px-4 py-2.5 bg-theme-100 text-theme-900" : "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : K.value ? "text-theme-800" : "text-white/95")
|
|
@@ -5235,7 +5255,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5235
5255
|
"data-test": "messaging-attachment",
|
|
5236
5256
|
"data-attachment-placement": t.placement,
|
|
5237
5257
|
class: T(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
|
|
5238
|
-
}, [o[
|
|
5258
|
+
}, [o[26] || (o[26] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), b(" " + I(t.attachment.filename), 1)], 10, Vi)) : h("", !0)], 64))), 128))], 2)) : h("", !0)], 2)], 10, Pi)),
|
|
5239
5259
|
e.id === _e.value ? (j(), _(f, { key: 5 }, [F.value.length ? (j(!0), _(f, { key: 0 }, P(F.value, (e) => (j(), _(f, { key: e.id }, [e.kind === "work" ? (j(), _("div", {
|
|
5240
5260
|
key: 0,
|
|
5241
5261
|
"data-test": "messaging-tool-activity",
|
|
@@ -5287,7 +5307,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5287
5307
|
"data-issue-code": U.value.code,
|
|
5288
5308
|
class: T(["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"])
|
|
5289
5309
|
}, [
|
|
5290
|
-
o[
|
|
5310
|
+
o[27] || (o[27] = v("i", {
|
|
5291
5311
|
class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
|
|
5292
5312
|
"aria-hidden": "true"
|
|
5293
5313
|
}, null, -1)),
|
|
@@ -5324,10 +5344,10 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5324
5344
|
}, null, 10, Xi)) : (j(), _("div", {
|
|
5325
5345
|
key: 1,
|
|
5326
5346
|
class: T(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", K.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
|
|
5327
|
-
}, [o[
|
|
5347
|
+
}, [o[28] || (o[28] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span", Zi, I(e.filename), 1)], 2)), v("button", {
|
|
5328
5348
|
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",
|
|
5329
5349
|
onClick: (e) => removeAttachment(t)
|
|
5330
|
-
}, [...o[
|
|
5350
|
+
}, [...o[29] || (o[29] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Qi)]))), 128)), De.value ? (j(), _("div", $i, [x(pe, { class: "size-5" })])) : h("", !0)], 2)) : h("", !0),
|
|
5331
5351
|
Ae.value ? (j(), _("input", {
|
|
5332
5352
|
key: 1,
|
|
5333
5353
|
ref_key: "fileInput",
|
|
@@ -5347,7 +5367,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5347
5367
|
"data-test": "messaging-recording-state",
|
|
5348
5368
|
class: T(["flex min-w-0 items-center gap-2 py-1", K.value ? "text-theme-700" : "text-white/80"])
|
|
5349
5369
|
}, [
|
|
5350
|
-
o[
|
|
5370
|
+
o[30] || (o[30] = v("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
|
|
5351
5371
|
v("span", na, I(Ve.value), 1),
|
|
5352
5372
|
v("span", { class: T(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, I(He.value), 3)
|
|
5353
5373
|
], 2)) : ce((j(), _("textarea", {
|
|
@@ -5383,7 +5403,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5383
5403
|
title: Ae.value ? "Attach file" : "File attachments unavailable",
|
|
5384
5404
|
onClick: o[7] || (o[7] = (e) => Ae.value && triggerFileInput())
|
|
5385
5405
|
}, [De.value ? (j(), _("i", aa)) : (j(), _("i", oa)), v("span", sa, I(Ae.value ? "Attach file" : "File attachments unavailable"), 1)], 10, ia),
|
|
5386
|
-
o[
|
|
5406
|
+
o[35] || (o[35] = v("div", { class: "flex-1" }, null, -1)),
|
|
5387
5407
|
v("div", ca, [(Re.value || Be.value) && !We.value ? (j(), _("button", {
|
|
5388
5408
|
key: 0,
|
|
5389
5409
|
"data-test": "messaging-record-audio-btn",
|
|
@@ -5399,24 +5419,34 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5399
5419
|
o[15] || (o[15] = ue(de((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
|
|
5400
5420
|
],
|
|
5401
5421
|
onKeyup: [o[12] || (o[12] = ue(de((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), o[14] || (o[14] = ue(de((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
|
|
5402
|
-
}, [v("i", { class: T([Be.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", ua, I(Ue.value), 1)], 42, la)) : h("", !0), We.value ? (j(), _("button", {
|
|
5422
|
+
}, [v("i", { class: T([Be.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", ua, I(Ue.value), 1)], 42, la)) : h("", !0), We.value && !Ze.value ? (j(), _("button", {
|
|
5403
5423
|
key: 1,
|
|
5404
5424
|
"data-test": "messaging-voice-end-btn",
|
|
5405
|
-
class: "flex size-11 cursor-pointer items-center justify-center rounded-full bg-
|
|
5425
|
+
class: T(["flex size-11 cursor-pointer items-center justify-center rounded-full transition-colors duration-150", K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100"]),
|
|
5406
5426
|
"aria-label": "End voice conversation",
|
|
5407
5427
|
title: "End voice conversation",
|
|
5408
5428
|
onClick: o[16] || (o[16] = (e) => endVoiceConversation())
|
|
5409
|
-
}, [...o[
|
|
5429
|
+
}, [...o[31] || (o[31] = [v("i", {
|
|
5410
5430
|
class: "i-tabler-x size-[18px]",
|
|
5411
5431
|
"aria-hidden": "true"
|
|
5412
|
-
}, null, -1), v("span", { class: "sr-only" }, "End voice conversation", -1)])])) :
|
|
5432
|
+
}, null, -1), v("span", { class: "sr-only" }, "End voice conversation", -1)])], 2)) : Ze.value ? (j(), _("button", {
|
|
5413
5433
|
key: 2,
|
|
5434
|
+
"data-test": "messaging-voice-send-btn",
|
|
5435
|
+
class: T(["flex size-11 cursor-pointer items-center justify-center rounded-full transition-colors duration-150", K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100"]),
|
|
5436
|
+
"aria-label": "Send to the call",
|
|
5437
|
+
title: "Send to the call",
|
|
5438
|
+
onClick: o[17] || (o[17] = (e) => sendVoiceUserMessage())
|
|
5439
|
+
}, [...o[32] || (o[32] = [v("i", {
|
|
5440
|
+
class: "i-tabler-arrow-up size-[17px]",
|
|
5441
|
+
"aria-hidden": "true"
|
|
5442
|
+
}, null, -1), v("span", { class: "sr-only" }, "Send to the call", -1)])], 2)) : qe.value ? (j(), _("button", {
|
|
5443
|
+
key: 3,
|
|
5414
5444
|
"data-test": "messaging-voice-start-btn",
|
|
5415
5445
|
class: T(["flex size-11 items-center justify-center rounded-full transition-colors duration-150", [K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", Ye.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
|
|
5416
5446
|
disabled: Ye.value,
|
|
5417
5447
|
"aria-label": Xe.value,
|
|
5418
5448
|
title: Xe.value,
|
|
5419
|
-
onClick: o[
|
|
5449
|
+
onClick: o[18] || (o[18] = (e) => startVoiceConversation())
|
|
5420
5450
|
}, [v("span", fa, [(j(), _(f, null, P([
|
|
5421
5451
|
7,
|
|
5422
5452
|
13,
|
|
@@ -5427,14 +5457,14 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5427
5457
|
key: e,
|
|
5428
5458
|
class: "w-[2px] rounded-full bg-current",
|
|
5429
5459
|
style: k({ height: `${e}px` })
|
|
5430
|
-
}, null, 4)), 64))]), o[
|
|
5460
|
+
}, null, 4)), 64))]), o[33] || (o[33] = v("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, da)) : Be.value ? h("", !0) : (j(), _(f, { key: 4 }, [Fe.value ? (j(), _("button", {
|
|
5431
5461
|
key: 0,
|
|
5432
5462
|
"data-test": "messaging-secondary-stop-btn",
|
|
5433
5463
|
class: T(["mr-2 flex size-11 cursor-pointer items-center justify-center rounded-full transition-colors duration-150", K.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
|
|
5434
5464
|
"aria-label": "Stop work",
|
|
5435
5465
|
title: "Stop work",
|
|
5436
|
-
onClick: o[
|
|
5437
|
-
}, [...o[
|
|
5466
|
+
onClick: o[19] || (o[19] = (t) => e.chatController?.stopChatTurn())
|
|
5467
|
+
}, [...o[34] || (o[34] = [v("i", {
|
|
5438
5468
|
class: "i-tabler-player-stop-filled size-3.5",
|
|
5439
5469
|
"aria-hidden": "true"
|
|
5440
5470
|
}, null, -1), v("span", { class: "sr-only" }, "Stop work", -1)])], 2)) : h("", !0), v("button", {
|
|
@@ -5444,7 +5474,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5444
5474
|
disabled: !Ne.value,
|
|
5445
5475
|
"aria-label": Le.value,
|
|
5446
5476
|
title: Le.value,
|
|
5447
|
-
onClick: o[
|
|
5477
|
+
onClick: o[20] || (o[20] = (e) => handleComposerAction())
|
|
5448
5478
|
}, [Me.value === "stop" ? (j(), _("i", ma)) : (j(), _("i", ha)), v("span", ga, I(Le.value), 1)], 10, pa)], 64))])
|
|
5449
5479
|
])], 10, ea),
|
|
5450
5480
|
K.value && e.centered && e.scope === "private" ? (j(), _("div", _a, I(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : h("", !0),
|
|
@@ -5461,7 +5491,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5461
5491
|
"data-test": "messaging-suggested-prompts-more",
|
|
5462
5492
|
"aria-expanded": A.value,
|
|
5463
5493
|
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",
|
|
5464
|
-
onClick: o[
|
|
5494
|
+
onClick: o[21] || (o[21] = (e) => A.value = !A.value)
|
|
5465
5495
|
}, [b(I(A.value ? "See less" : "See more") + " ", 1), v("i", { class: T(["i-tabler-chevron-down size-4 transition-transform", A.value ? "rotate-180" : ""]) }, null, 2)], 8, xa)) : h("", !0)])])) : h("", !0)
|
|
5466
5496
|
], 2)
|
|
5467
5497
|
], 2));
|