@pagelines/sdk 1.0.735 → 1.0.736
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 +65 -64
- package/dist/AgentWrap.js.map +1 -1
- package/dist/widget.js +1 -1
- package/package.json +1 -1
package/dist/AgentWrap.js
CHANGED
|
@@ -4554,14 +4554,10 @@ var kr = [
|
|
|
4554
4554
|
}, di = { class: "min-w-0 flex-1" }, fi = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, pi = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, mi = {
|
|
4555
4555
|
key: 0,
|
|
4556
4556
|
class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
|
|
4557
|
-
}, hi = {
|
|
4558
|
-
key: 0,
|
|
4559
|
-
"data-test": "messaging-empty-state",
|
|
4560
|
-
class: "flex flex-col items-center justify-center px-4"
|
|
4561
|
-
}, gi = ["title"], _i = {
|
|
4557
|
+
}, hi = ["title"], gi = {
|
|
4562
4558
|
key: 0,
|
|
4563
4559
|
class: "flex items-center gap-3 py-3 px-2"
|
|
4564
|
-
},
|
|
4560
|
+
}, _i = ["data-journal-outcome"], vi = [
|
|
4565
4561
|
"data-message-id",
|
|
4566
4562
|
"data-message-sender",
|
|
4567
4563
|
"data-conversation-id",
|
|
@@ -4572,7 +4568,7 @@ var kr = [
|
|
|
4572
4568
|
"data-issue-action-label",
|
|
4573
4569
|
"data-issue-action-url",
|
|
4574
4570
|
"data-streaming"
|
|
4575
|
-
],
|
|
4571
|
+
], yi = { class: "max-w-[85%] min-w-0" }, bi = ["href"], xi = [
|
|
4576
4572
|
"data-message-id",
|
|
4577
4573
|
"data-message-sender",
|
|
4578
4574
|
"data-conversation-id",
|
|
@@ -4581,7 +4577,7 @@ var kr = [
|
|
|
4581
4577
|
"data-issue-code",
|
|
4582
4578
|
"data-issue-bucket",
|
|
4583
4579
|
"data-streaming"
|
|
4584
|
-
],
|
|
4580
|
+
], Si = [
|
|
4585
4581
|
"data-test",
|
|
4586
4582
|
"data-message-id",
|
|
4587
4583
|
"data-message-sender",
|
|
@@ -4589,46 +4585,46 @@ var kr = [
|
|
|
4589
4585
|
"data-message-sequence",
|
|
4590
4586
|
"data-system-kind",
|
|
4591
4587
|
"data-streaming"
|
|
4592
|
-
],
|
|
4588
|
+
], Ci = ["src", "alt"], wi = ["src"], Ti = ["href"], Ei = {
|
|
4593
4589
|
key: 0,
|
|
4594
4590
|
"data-test": "messaging-message-text-part"
|
|
4595
|
-
},
|
|
4591
|
+
}, Di = [
|
|
4596
4592
|
"src",
|
|
4597
4593
|
"alt",
|
|
4598
4594
|
"data-attachment-placement"
|
|
4599
|
-
],
|
|
4595
|
+
], Oi = ["src", "data-attachment-placement"], ki = ["href", "data-attachment-placement"], Ai = ["data-journal-outcome"], ji = {
|
|
4600
4596
|
key: 2,
|
|
4601
4597
|
"data-test": "messaging-tool-activity-tail",
|
|
4602
4598
|
"aria-label": "Assistant is still working",
|
|
4603
4599
|
class: "mb-4 grid h-[17px] w-5 place-items-center"
|
|
4604
|
-
},
|
|
4600
|
+
}, Mi = ["data-journal-outcome"], Ni = ["data-test", "data-working-description"], Pi = {
|
|
4605
4601
|
class: "flex items-center gap-[5px]",
|
|
4606
4602
|
"aria-hidden": "true"
|
|
4607
|
-
},
|
|
4603
|
+
}, Fi = { class: "truncate" }, Ii = ["data-issue-code"], Li = ["href"], Ri = ["src", "alt"], zi = { class: "max-w-20 truncate" }, Bi = ["onClick"], Vi = {
|
|
4608
4604
|
key: 0,
|
|
4609
4605
|
class: "shrink-0 flex items-center justify-center size-14"
|
|
4610
|
-
},
|
|
4606
|
+
}, Hi = ["data-composer-action"], Ui = ["placeholder", "disabled"], Wi = { class: "font-mono text-sm tabular-nums" }, Gi = { class: "mt-2.5 flex items-center" }, Ki = [
|
|
4611
4607
|
"disabled",
|
|
4612
4608
|
"aria-label",
|
|
4613
4609
|
"title"
|
|
4614
|
-
],
|
|
4610
|
+
], qi = {
|
|
4615
4611
|
key: 0,
|
|
4616
4612
|
class: "i-svg-spinners-ring-resize size-5"
|
|
4617
|
-
},
|
|
4613
|
+
}, Ji = {
|
|
4618
4614
|
key: 1,
|
|
4619
4615
|
class: "i-tabler-plus size-5"
|
|
4620
|
-
},
|
|
4616
|
+
}, Yi = { class: "sr-only" }, Xi = { class: "flex items-center gap-2" }, Zi = ["aria-label", "title"], Qi = { class: "sr-only" }, $i = [
|
|
4621
4617
|
"data-composer-action",
|
|
4622
4618
|
"disabled",
|
|
4623
4619
|
"aria-label",
|
|
4624
4620
|
"title"
|
|
4625
|
-
],
|
|
4621
|
+
], ea = {
|
|
4626
4622
|
key: 0,
|
|
4627
4623
|
class: "i-tabler-player-stop-filled size-3.5"
|
|
4628
|
-
},
|
|
4624
|
+
}, ta = {
|
|
4629
4625
|
key: 1,
|
|
4630
4626
|
class: "i-tabler-arrow-up size-[17px]"
|
|
4631
|
-
},
|
|
4627
|
+
}, na = { class: "sr-only" }, ra = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, ia = ["disabled", "onClick"], aa = ["aria-expanded"], oa = /* @__PURE__ */ x({
|
|
4632
4628
|
__name: "ElAgentChat",
|
|
4633
4629
|
props: {
|
|
4634
4630
|
chatController: {},
|
|
@@ -4786,7 +4782,7 @@ var kr = [
|
|
|
4786
4782
|
e.chatController && (Ne.value === "send" && i.value?.pin(), await e.chatController.handleComposerAction());
|
|
4787
4783
|
}
|
|
4788
4784
|
async function handleKeydown(e) {
|
|
4789
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await sendMessage());
|
|
4785
|
+
e.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await sendMessage());
|
|
4790
4786
|
}
|
|
4791
4787
|
function focusComposer(e) {
|
|
4792
4788
|
Re.value || we.value || e.target instanceof Element && e.target.closest("button, a, textarea") || a.value?.focus();
|
|
@@ -4838,7 +4834,10 @@ var kr = [
|
|
|
4838
4834
|
...o ? {} : { year: "numeric" }
|
|
4839
4835
|
})}, ${a}`;
|
|
4840
4836
|
}
|
|
4841
|
-
return (t, s) => (T(), _("div", {
|
|
4837
|
+
return (t, s) => (T(), _("div", {
|
|
4838
|
+
"data-test": "messaging-root",
|
|
4839
|
+
class: S(["@container/chat relative flex h-full flex-col", z.value.length === 0 ? ["min-h-0", r.value ? "max-sm:justify-end max-sm:overflow-hidden sm:[justify-content:safe_center] sm:overflow-y-auto" : "[justify-content:safe_center] overflow-y-auto"] : ""])
|
|
4840
|
+
}, [
|
|
4842
4841
|
e.showHeader && !K.value ? (T(), _("div", li, [b(Pe, {
|
|
4843
4842
|
agent: e.agent,
|
|
4844
4843
|
"is-online": c.value
|
|
@@ -4864,7 +4863,11 @@ var kr = [
|
|
|
4864
4863
|
class: S(z.value.length === 0 ? "flex-none" : "flex-1")
|
|
4865
4864
|
}, {
|
|
4866
4865
|
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-5 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" : ""]) }, [
|
|
4867
|
-
z.value.length === 0 && !re.value ? (T(), _("div",
|
|
4866
|
+
z.value.length === 0 && !re.value ? (T(), _("div", {
|
|
4867
|
+
key: 0,
|
|
4868
|
+
"data-test": "messaging-empty-state",
|
|
4869
|
+
class: S(["flex flex-col items-center justify-center px-4", r.value ? "max-sm:hidden" : ""])
|
|
4870
|
+
}, [oe(t.$slots, "empty-heading", {
|
|
4868
4871
|
agent: e.agent,
|
|
4869
4872
|
isLight: K.value
|
|
4870
4873
|
}, () => [b(ze, {
|
|
@@ -4874,9 +4877,9 @@ var kr = [
|
|
|
4874
4877
|
}, 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", {
|
|
4875
4878
|
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"]),
|
|
4876
4879
|
title: n.value.tooltip
|
|
4877
|
-
}, [v("i", { class: S([n.value.icon, "size-3"]) }, null, 2), v("span", null, F(n.value.label), 1)], 10,
|
|
4880
|
+
}, [v("i", { class: S([n.value.icon, "size-3"]) }, null, 2), v("span", null, F(n.value.label), 1)], 10, hi)], 64))], 2)) : h("", !0),
|
|
4878
4881
|
(T(!0), _(f, null, A(z.value, (e, t) => (T(), _(f, { key: e.id }, [
|
|
4879
|
-
shouldShowTimeDivider(z.value, t) ? (T(), _("div",
|
|
4882
|
+
shouldShowTimeDivider(z.value, t) ? (T(), _("div", gi, [
|
|
4880
4883
|
v("div", { class: S(["flex-1 h-px", Ue.value]) }, null, 2),
|
|
4881
4884
|
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),
|
|
4882
4885
|
v("div", { class: S(["flex-1 h-px", Ue.value]) }, null, 2)
|
|
@@ -4889,7 +4892,7 @@ var kr = [
|
|
|
4889
4892
|
}, [b(qe, {
|
|
4890
4893
|
model: messageWorkJournal(e),
|
|
4891
4894
|
"is-light": K.value
|
|
4892
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
4895
|
+
}, null, 8, ["model", "is-light"])], 8, _i)) : h("", !0),
|
|
4893
4896
|
isSystemExplainerMessage(e) ? (T(), _("div", {
|
|
4894
4897
|
key: 2,
|
|
4895
4898
|
"data-test": "messaging-system-msg",
|
|
@@ -4904,7 +4907,7 @@ var kr = [
|
|
|
4904
4907
|
"data-issue-action-url": e.issue?.actionUrl,
|
|
4905
4908
|
"data-streaming": e.id === U.value ? "true" : void 0,
|
|
4906
4909
|
class: "flex gap-2 items-end justify-start mb-4"
|
|
4907
|
-
}, [v("div",
|
|
4910
|
+
}, [v("div", yi, [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, {
|
|
4908
4911
|
key: 0,
|
|
4909
4912
|
text: e.text,
|
|
4910
4913
|
inverted: !K.value,
|
|
@@ -4925,7 +4928,7 @@ var kr = [
|
|
|
4925
4928
|
"data-test": "messaging-system-msg-action",
|
|
4926
4929
|
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"]),
|
|
4927
4930
|
onClick: s[1] || (s[1] = R(() => {}, ["stop"]))
|
|
4928
|
-
}, [te(F(e.issue.actionLabel) + " ", 1), s[21] || (s[21] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10,
|
|
4931
|
+
}, [te(F(e.issue.actionLabel) + " ", 1), s[21] || (s[21] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, bi)) : h("", !0)], 2)])], 8, vi)) : e.sender === "system" ? (T(), _("div", {
|
|
4929
4932
|
key: 3,
|
|
4930
4933
|
"data-test": "messaging-system-status-msg",
|
|
4931
4934
|
"data-message-id": e.id,
|
|
@@ -4941,7 +4944,7 @@ var kr = [
|
|
|
4941
4944
|
text: e.text,
|
|
4942
4945
|
inverted: !K.value,
|
|
4943
4946
|
onClick: s[2] || (s[2] = R(() => {}, ["stop"]))
|
|
4944
|
-
}, null, 8, ["text", "inverted"])], 10,
|
|
4947
|
+
}, null, 8, ["text", "inverted"])], 10, xi)) : (T(), _("div", {
|
|
4945
4948
|
key: 4,
|
|
4946
4949
|
"data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
|
|
4947
4950
|
"data-message-id": e.id,
|
|
@@ -4968,14 +4971,14 @@ var kr = [
|
|
|
4968
4971
|
"data-test": "messaging-attachment",
|
|
4969
4972
|
"data-attachment-placement": "block",
|
|
4970
4973
|
class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
|
|
4971
|
-
}, null, 8,
|
|
4974
|
+
}, null, 8, Ci)) : e.type === "audio" ? (T(), _("audio", {
|
|
4972
4975
|
key: 1,
|
|
4973
4976
|
src: e.src,
|
|
4974
4977
|
controls: "",
|
|
4975
4978
|
"data-test": "messaging-attachment",
|
|
4976
4979
|
"data-attachment-placement": "block",
|
|
4977
4980
|
class: "max-w-full"
|
|
4978
|
-
}, null, 8,
|
|
4981
|
+
}, null, 8, wi)) : (T(), _("a", {
|
|
4979
4982
|
key: 2,
|
|
4980
4983
|
href: e.src,
|
|
4981
4984
|
target: "_blank",
|
|
@@ -4983,11 +4986,11 @@ var kr = [
|
|
|
4983
4986
|
"data-test": "messaging-attachment",
|
|
4984
4987
|
"data-attachment-placement": "block",
|
|
4985
4988
|
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"])
|
|
4986
|
-
}, [s[23] || (s[23] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + F(e.filename), 1)], 10,
|
|
4989
|
+
}, [s[23] || (s[23] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + F(e.filename), 1)], 10, Ti))], 64))), 128))], 2)) : h("", !0), messageRenderParts(e).length ? (T(), _("div", {
|
|
4987
4990
|
key: 1,
|
|
4988
4991
|
"data-test": "messaging-message-content",
|
|
4989
4992
|
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")
|
|
4990
|
-
}, [(T(!0), _(f, null, A(messageRenderParts(e), (t) => (T(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (T(), _("div",
|
|
4993
|
+
}, [(T(!0), _(f, null, A(messageRenderParts(e), (t) => (T(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (T(), _("div", Ei, [b(ai, {
|
|
4991
4994
|
text: t.text,
|
|
4992
4995
|
inverted: e.sender === "user" || !K.value,
|
|
4993
4996
|
streaming: e.id === U.value,
|
|
@@ -5004,14 +5007,14 @@ var kr = [
|
|
|
5004
5007
|
"data-test": "messaging-attachment",
|
|
5005
5008
|
"data-attachment-placement": t.placement,
|
|
5006
5009
|
class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
|
|
5007
|
-
}, null, 8,
|
|
5010
|
+
}, null, 8, Di)) : t.kind === "attachment" && t.attachment.type === "audio" ? (T(), _("audio", {
|
|
5008
5011
|
key: 2,
|
|
5009
5012
|
src: t.attachment.src,
|
|
5010
5013
|
controls: "",
|
|
5011
5014
|
"data-test": "messaging-attachment",
|
|
5012
5015
|
"data-attachment-placement": t.placement,
|
|
5013
5016
|
class: "my-2 max-w-full"
|
|
5014
|
-
}, null, 8,
|
|
5017
|
+
}, null, 8, Oi)) : t.kind === "attachment" ? (T(), _("a", {
|
|
5015
5018
|
key: 3,
|
|
5016
5019
|
href: t.attachment.src,
|
|
5017
5020
|
target: "_blank",
|
|
@@ -5019,7 +5022,7 @@ var kr = [
|
|
|
5019
5022
|
"data-test": "messaging-attachment",
|
|
5020
5023
|
"data-attachment-placement": t.placement,
|
|
5021
5024
|
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"])
|
|
5022
|
-
}, [s[24] || (s[24] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + F(t.attachment.filename), 1)], 10,
|
|
5025
|
+
}, [s[24] || (s[24] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), te(" " + F(t.attachment.filename), 1)], 10, ki)) : h("", !0)], 64))), 128))], 2)) : h("", !0)], 2)], 10, Si)),
|
|
5023
5026
|
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", {
|
|
5024
5027
|
key: 0,
|
|
5025
5028
|
"data-test": "messaging-tool-activity",
|
|
@@ -5028,7 +5031,7 @@ var kr = [
|
|
|
5028
5031
|
}, [b(qe, {
|
|
5029
5032
|
model: e.journal,
|
|
5030
5033
|
"is-light": K.value
|
|
5031
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
5034
|
+
}, null, 8, ["model", "is-light"])], 8, Ai)) : e.kind === "text" && e.content ? (T(), _("div", {
|
|
5032
5035
|
key: 1,
|
|
5033
5036
|
"data-test": "messaging-live-text-block",
|
|
5034
5037
|
class: S(["mb-4 @sm/chat:pr-[1em] @lg/chat:pr-[2em]", K.value ? "text-theme-800" : "text-white/95"])
|
|
@@ -5042,7 +5045,7 @@ var kr = [
|
|
|
5042
5045
|
"text",
|
|
5043
5046
|
"inverted",
|
|
5044
5047
|
"streaming"
|
|
5045
|
-
])], 2)) : (T(), _("div",
|
|
5048
|
+
])], 2)) : (T(), _("div", ji, [b(_e, { class: S(["size-3.5", K.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : B.value ? (T(), _("div", {
|
|
5046
5049
|
key: 1,
|
|
5047
5050
|
"data-test": "messaging-tool-activity",
|
|
5048
5051
|
"data-journal-outcome": B.value.outcome,
|
|
@@ -5050,7 +5053,7 @@ var kr = [
|
|
|
5050
5053
|
}, [b(qe, {
|
|
5051
5054
|
model: B.value,
|
|
5052
5055
|
"is-light": K.value
|
|
5053
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
5056
|
+
}, null, 8, ["model", "is-light"])], 8, Mi)) : h("", !0)], 64)) : h("", !0)
|
|
5054
5057
|
], 64))), 128)),
|
|
5055
5058
|
W.value ? (T(), _("div", {
|
|
5056
5059
|
key: 1,
|
|
@@ -5059,12 +5062,12 @@ var kr = [
|
|
|
5059
5062
|
role: "status",
|
|
5060
5063
|
"aria-live": "polite",
|
|
5061
5064
|
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"])
|
|
5062
|
-
}, [v("span",
|
|
5065
|
+
}, [v("span", Pi, [(T(), _(f, null, A(3, (e) => v("span", {
|
|
5063
5066
|
key: e,
|
|
5064
5067
|
"data-test": "messaging-thinking-dot",
|
|
5065
5068
|
class: "chat-working-dot size-1.5 rounded-full bg-current",
|
|
5066
5069
|
style: C({ animationDelay: `${(e - 1) * .18}s` })
|
|
5067
|
-
}, null, 4)), 64))]), v("span",
|
|
5070
|
+
}, null, 4)), 64))]), v("span", Fi, F(W.value), 1)], 10, Ni)) : h("", !0),
|
|
5068
5071
|
be.value ? (T(), _("div", {
|
|
5069
5072
|
key: 2,
|
|
5070
5073
|
"data-test": "messaging-transient-issue",
|
|
@@ -5081,8 +5084,8 @@ var kr = [
|
|
|
5081
5084
|
href: be.value.actionUrl,
|
|
5082
5085
|
class: "shrink-0 underline underline-offset-2",
|
|
5083
5086
|
onClick: s[5] || (s[5] = R(() => {}, ["stop"]))
|
|
5084
|
-
}, F(be.value.actionLabel), 9,
|
|
5085
|
-
], 10,
|
|
5087
|
+
}, F(be.value.actionLabel), 9, Li)) : h("", !0)
|
|
5088
|
+
], 10, Ii)) : h("", !0)
|
|
5086
5089
|
], 2)]),
|
|
5087
5090
|
_: 3
|
|
5088
5091
|
}, 8, ["class"]),
|
|
@@ -5090,8 +5093,6 @@ var kr = [
|
|
|
5090
5093
|
"data-test": "messaging-composer-footer",
|
|
5091
5094
|
class: S(["left-0 right-0 z-30 px-5 pb-[max(env(safe-area-inset-bottom),1rem)]", [
|
|
5092
5095
|
z.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
|
|
5093
|
-
r.value && e.centered ? "max-sm:absolute max-sm:bottom-0" : "",
|
|
5094
|
-
r.value && z.value.length === 0 ? "max-sm:mt-auto" : "",
|
|
5095
5096
|
e.centered && z.value.length > 0 ? "pt-0" : "pt-3",
|
|
5096
5097
|
K.value ? e.centered ? "bg-theme-25/50" : "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"
|
|
5097
5098
|
]])
|
|
@@ -5107,13 +5108,13 @@ var kr = [
|
|
|
5107
5108
|
src: e.src,
|
|
5108
5109
|
alt: e.filename,
|
|
5109
5110
|
class: S(["size-14 rounded-xl object-cover border", K.value ? "border-black/10" : "border-white/20"])
|
|
5110
|
-
}, null, 10,
|
|
5111
|
+
}, null, 10, Ri)) : (T(), _("div", {
|
|
5111
5112
|
key: 1,
|
|
5112
5113
|
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"])
|
|
5113
|
-
}, [s[26] || (s[26] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span",
|
|
5114
|
+
}, [s[26] || (s[26] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span", zi, F(e.filename), 1)], 2)), v("button", {
|
|
5114
5115
|
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",
|
|
5115
5116
|
onClick: (e) => removeAttachment(t)
|
|
5116
|
-
}, [...s[27] || (s[27] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8,
|
|
5117
|
+
}, [...s[27] || (s[27] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Bi)]))), 128)), ke.value ? (T(), _("div", Vi, [b(_e, { class: "size-5" })])) : h("", !0)], 2)) : h("", !0),
|
|
5117
5118
|
je.value ? (T(), _("input", {
|
|
5118
5119
|
key: 1,
|
|
5119
5120
|
ref_key: "fileInput",
|
|
@@ -5134,7 +5135,7 @@ var kr = [
|
|
|
5134
5135
|
class: S(["flex min-w-0 items-center gap-2 py-1", K.value ? "text-theme-700" : "text-white/80"])
|
|
5135
5136
|
}, [
|
|
5136
5137
|
s[28] || (s[28] = v("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
|
|
5137
|
-
v("span",
|
|
5138
|
+
v("span", Wi, F(Be.value), 1),
|
|
5138
5139
|
v("span", { class: S(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, F(Ve.value), 3)
|
|
5139
5140
|
], 2)) : de((T(), _("textarea", {
|
|
5140
5141
|
key: 0,
|
|
@@ -5159,7 +5160,7 @@ var kr = [
|
|
|
5159
5160
|
onKeydown: handleKeydown,
|
|
5160
5161
|
onFocus: s[7] || (s[7] = (e) => r.value = !0),
|
|
5161
5162
|
onBlur: s[8] || (s[8] = (e) => r.value = !1)
|
|
5162
|
-
}, null, 42,
|
|
5163
|
+
}, null, 42, Ui)), [[ce, De.value]]), v("div", Gi, [
|
|
5163
5164
|
v("button", {
|
|
5164
5165
|
class: S(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70", [
|
|
5165
5166
|
je.value ? "cursor-pointer" : "cursor-default",
|
|
@@ -5170,9 +5171,9 @@ var kr = [
|
|
|
5170
5171
|
"aria-label": je.value ? "Attach file" : "File attachments unavailable",
|
|
5171
5172
|
title: je.value ? "Attach file" : "File attachments unavailable",
|
|
5172
5173
|
onClick: s[9] || (s[9] = (e) => je.value && triggerFileInput())
|
|
5173
|
-
}, [ke.value ? (T(), _("i",
|
|
5174
|
+
}, [ke.value ? (T(), _("i", qi)) : (T(), _("i", Ji)), v("span", Yi, F(je.value ? "Attach file" : "File attachments unavailable"), 1)], 10, Ki),
|
|
5174
5175
|
s[29] || (s[29] = v("div", { class: "flex-1" }, null, -1)),
|
|
5175
|
-
v("div",
|
|
5176
|
+
v("div", Xi, [Le.value || Re.value ? (T(), _("button", {
|
|
5176
5177
|
key: 0,
|
|
5177
5178
|
"data-test": "messaging-record-audio-btn",
|
|
5178
5179
|
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"]),
|
|
@@ -5187,7 +5188,7 @@ var kr = [
|
|
|
5187
5188
|
s[17] || (s[17] = pe(R((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
|
|
5188
5189
|
],
|
|
5189
5190
|
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"]))]
|
|
5190
|
-
}, [v("i", { class: S([Re.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span",
|
|
5191
|
+
}, [v("i", { class: S([Re.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", Qi, F(He.value), 1)], 42, Zi)) : h("", !0), Re.value ? h("", !0) : (T(), _("button", {
|
|
5191
5192
|
key: 1,
|
|
5192
5193
|
"data-test": "messaging-send-btn",
|
|
5193
5194
|
"data-composer-action": Ne.value,
|
|
@@ -5196,8 +5197,8 @@ var kr = [
|
|
|
5196
5197
|
"aria-label": Ie.value,
|
|
5197
5198
|
title: Ie.value,
|
|
5198
5199
|
onClick: s[18] || (s[18] = (e) => handleComposerAction())
|
|
5199
|
-
}, [Ne.value === "stop" ? (T(), _("i",
|
|
5200
|
-
])], 10,
|
|
5200
|
+
}, [Ne.value === "stop" ? (T(), _("i", ea)) : (T(), _("i", ta)), v("span", na, F(Ie.value), 1)], 10, $i))])
|
|
5201
|
+
])], 10, Hi),
|
|
5201
5202
|
K.value && e.centered && e.scope === "private" ? (T(), _("div", {
|
|
5202
5203
|
key: 2,
|
|
5203
5204
|
"data-test": "messaging-ai-disclosure",
|
|
@@ -5207,34 +5208,34 @@ var kr = [
|
|
|
5207
5208
|
key: 3,
|
|
5208
5209
|
"data-test": "messaging-suggested-prompts",
|
|
5209
5210
|
class: S(["mt-5 w-full sm:mx-auto sm:max-w-[720px]", r.value ? "max-sm:hidden" : ""])
|
|
5210
|
-
}, [v("div",
|
|
5211
|
+
}, [v("div", ra, [(T(!0), _(f, null, A(e.suggestedPrompts, (e, t) => (T(), _("button", {
|
|
5211
5212
|
key: e.id,
|
|
5212
5213
|
type: "button",
|
|
5213
5214
|
disabled: we.value,
|
|
5214
5215
|
"data-test": "messaging-suggested-prompt",
|
|
5215
5216
|
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" : ""]]),
|
|
5216
5217
|
onClick: (t) => sendSuggestedPrompt(e)
|
|
5217
|
-
}, F(e.label), 11,
|
|
5218
|
+
}, F(e.label), 11, ia))), 128)), e.suggestedPrompts.length > 3 ? (T(), _("button", {
|
|
5218
5219
|
key: 0,
|
|
5219
5220
|
type: "button",
|
|
5220
5221
|
"data-test": "messaging-suggested-prompts-more",
|
|
5221
5222
|
"aria-expanded": j.value,
|
|
5222
5223
|
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",
|
|
5223
5224
|
onClick: s[19] || (s[19] = (e) => j.value = !j.value)
|
|
5224
|
-
}, [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,
|
|
5225
|
+
}, [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, aa)) : h("", !0)])], 2)) : h("", !0)
|
|
5225
5226
|
], 2)
|
|
5226
5227
|
], 2));
|
|
5227
5228
|
}
|
|
5228
|
-
}),
|
|
5229
|
+
}), sa = { class: "agent-wrap" }, ca = {
|
|
5229
5230
|
key: 0,
|
|
5230
5231
|
class: "flex items-center justify-center h-full"
|
|
5231
|
-
},
|
|
5232
|
+
}, la = {
|
|
5232
5233
|
key: 2,
|
|
5233
5234
|
class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
|
|
5234
5235
|
role: "status",
|
|
5235
5236
|
"aria-live": "polite",
|
|
5236
5237
|
"data-test": "agent-unavailable"
|
|
5237
|
-
},
|
|
5238
|
+
}, ua = /* @__PURE__ */ x({
|
|
5238
5239
|
__name: "AgentWrap",
|
|
5239
5240
|
props: {
|
|
5240
5241
|
sdk: {},
|
|
@@ -5330,7 +5331,7 @@ var kr = [
|
|
|
5330
5331
|
});
|
|
5331
5332
|
}
|
|
5332
5333
|
}
|
|
5333
|
-
return ie(loadAgent), (t, n) => (T(), _("div",
|
|
5334
|
+
return ie(loadAgent), (t, n) => (T(), _("div", sa, [s.value ? (T(), _("div", ca, [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", {
|
|
5334
5335
|
sdk: se(o),
|
|
5335
5336
|
agent: c.value,
|
|
5336
5337
|
context: e.clientContext ?? e.context,
|
|
@@ -5338,7 +5339,7 @@ var kr = [
|
|
|
5338
5339
|
buttonText: e.buttonText,
|
|
5339
5340
|
buttonIcon: e.buttonIcon,
|
|
5340
5341
|
loading: s.value
|
|
5341
|
-
}, void 0, void 0, 1) : u.value ? (T(), _("div",
|
|
5342
|
+
}, void 0, void 0, 1) : u.value ? (T(), _("div", la, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
|
|
5342
5343
|
type: "button",
|
|
5343
5344
|
class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
|
|
5344
5345
|
"data-test": "agent-unavailable-retry",
|
|
@@ -5347,6 +5348,6 @@ var kr = [
|
|
|
5347
5348
|
}
|
|
5348
5349
|
});
|
|
5349
5350
|
//#endregion
|
|
5350
|
-
export { ke as a, getAgentAvatarUrl as c, AgentChatController as d, ve as f, Pe as i, handleImageError as l, _e as m,
|
|
5351
|
+
export { ke as a, getAgentAvatarUrl as c, AgentChatController as d, ve as f, Pe as i, handleImageError as l, _e as m, oa as n, De as o, n as p, ai as r, Te as s, ua as t, parseButtonTemplate as u };
|
|
5351
5352
|
|
|
5352
5353
|
//# sourceMappingURL=AgentWrap.js.map
|