@pagelines/sdk 1.0.734 → 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 +77 -71
- package/dist/AgentWrap.js.map +1 -1
- package/dist/contract.js +249 -211
- package/dist/contract.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,50 +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
|
-
},
|
|
4632
|
-
key: 3,
|
|
4633
|
-
"data-test": "messaging-suggested-prompts",
|
|
4634
|
-
class: "mt-5 w-full sm:mx-auto sm:max-w-[720px]"
|
|
4635
|
-
}, 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({
|
|
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({
|
|
4636
4628
|
__name: "ElAgentChat",
|
|
4637
4629
|
props: {
|
|
4638
4630
|
chatController: {},
|
|
@@ -4790,7 +4782,7 @@ var kr = [
|
|
|
4790
4782
|
e.chatController && (Ne.value === "send" && i.value?.pin(), await e.chatController.handleComposerAction());
|
|
4791
4783
|
}
|
|
4792
4784
|
async function handleKeydown(e) {
|
|
4793
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await sendMessage());
|
|
4785
|
+
e.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await sendMessage());
|
|
4794
4786
|
}
|
|
4795
4787
|
function focusComposer(e) {
|
|
4796
4788
|
Re.value || we.value || e.target instanceof Element && e.target.closest("button, a, textarea") || a.value?.focus();
|
|
@@ -4842,7 +4834,10 @@ var kr = [
|
|
|
4842
4834
|
...o ? {} : { year: "numeric" }
|
|
4843
4835
|
})}, ${a}`;
|
|
4844
4836
|
}
|
|
4845
|
-
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
|
+
}, [
|
|
4846
4841
|
e.showHeader && !K.value ? (T(), _("div", li, [b(Pe, {
|
|
4847
4842
|
agent: e.agent,
|
|
4848
4843
|
"is-online": c.value
|
|
@@ -4868,7 +4863,11 @@ var kr = [
|
|
|
4868
4863
|
class: S(z.value.length === 0 ? "flex-none" : "flex-1")
|
|
4869
4864
|
}, {
|
|
4870
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" : ""]) }, [
|
|
4871
|
-
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", {
|
|
4872
4871
|
agent: e.agent,
|
|
4873
4872
|
isLight: K.value
|
|
4874
4873
|
}, () => [b(ze, {
|
|
@@ -4878,9 +4877,9 @@ var kr = [
|
|
|
4878
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", {
|
|
4879
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"]),
|
|
4880
4879
|
title: n.value.tooltip
|
|
4881
|
-
}, [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),
|
|
4882
4881
|
(T(!0), _(f, null, A(z.value, (e, t) => (T(), _(f, { key: e.id }, [
|
|
4883
|
-
shouldShowTimeDivider(z.value, t) ? (T(), _("div",
|
|
4882
|
+
shouldShowTimeDivider(z.value, t) ? (T(), _("div", gi, [
|
|
4884
4883
|
v("div", { class: S(["flex-1 h-px", Ue.value]) }, null, 2),
|
|
4885
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),
|
|
4886
4885
|
v("div", { class: S(["flex-1 h-px", Ue.value]) }, null, 2)
|
|
@@ -4893,7 +4892,7 @@ var kr = [
|
|
|
4893
4892
|
}, [b(qe, {
|
|
4894
4893
|
model: messageWorkJournal(e),
|
|
4895
4894
|
"is-light": K.value
|
|
4896
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
4895
|
+
}, null, 8, ["model", "is-light"])], 8, _i)) : h("", !0),
|
|
4897
4896
|
isSystemExplainerMessage(e) ? (T(), _("div", {
|
|
4898
4897
|
key: 2,
|
|
4899
4898
|
"data-test": "messaging-system-msg",
|
|
@@ -4908,7 +4907,7 @@ var kr = [
|
|
|
4908
4907
|
"data-issue-action-url": e.issue?.actionUrl,
|
|
4909
4908
|
"data-streaming": e.id === U.value ? "true" : void 0,
|
|
4910
4909
|
class: "flex gap-2 items-end justify-start mb-4"
|
|
4911
|
-
}, [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, {
|
|
4912
4911
|
key: 0,
|
|
4913
4912
|
text: e.text,
|
|
4914
4913
|
inverted: !K.value,
|
|
@@ -4929,7 +4928,7 @@ var kr = [
|
|
|
4929
4928
|
"data-test": "messaging-system-msg-action",
|
|
4930
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"]),
|
|
4931
4930
|
onClick: s[1] || (s[1] = R(() => {}, ["stop"]))
|
|
4932
|
-
}, [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", {
|
|
4933
4932
|
key: 3,
|
|
4934
4933
|
"data-test": "messaging-system-status-msg",
|
|
4935
4934
|
"data-message-id": e.id,
|
|
@@ -4945,7 +4944,7 @@ var kr = [
|
|
|
4945
4944
|
text: e.text,
|
|
4946
4945
|
inverted: !K.value,
|
|
4947
4946
|
onClick: s[2] || (s[2] = R(() => {}, ["stop"]))
|
|
4948
|
-
}, null, 8, ["text", "inverted"])], 10,
|
|
4947
|
+
}, null, 8, ["text", "inverted"])], 10, xi)) : (T(), _("div", {
|
|
4949
4948
|
key: 4,
|
|
4950
4949
|
"data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
|
|
4951
4950
|
"data-message-id": e.id,
|
|
@@ -4972,14 +4971,14 @@ var kr = [
|
|
|
4972
4971
|
"data-test": "messaging-attachment",
|
|
4973
4972
|
"data-attachment-placement": "block",
|
|
4974
4973
|
class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
|
|
4975
|
-
}, null, 8,
|
|
4974
|
+
}, null, 8, Ci)) : e.type === "audio" ? (T(), _("audio", {
|
|
4976
4975
|
key: 1,
|
|
4977
4976
|
src: e.src,
|
|
4978
4977
|
controls: "",
|
|
4979
4978
|
"data-test": "messaging-attachment",
|
|
4980
4979
|
"data-attachment-placement": "block",
|
|
4981
4980
|
class: "max-w-full"
|
|
4982
|
-
}, null, 8,
|
|
4981
|
+
}, null, 8, wi)) : (T(), _("a", {
|
|
4983
4982
|
key: 2,
|
|
4984
4983
|
href: e.src,
|
|
4985
4984
|
target: "_blank",
|
|
@@ -4987,11 +4986,11 @@ var kr = [
|
|
|
4987
4986
|
"data-test": "messaging-attachment",
|
|
4988
4987
|
"data-attachment-placement": "block",
|
|
4989
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"])
|
|
4990
|
-
}, [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", {
|
|
4991
4990
|
key: 1,
|
|
4992
4991
|
"data-test": "messaging-message-content",
|
|
4993
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")
|
|
4994
|
-
}, [(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, {
|
|
4995
4994
|
text: t.text,
|
|
4996
4995
|
inverted: e.sender === "user" || !K.value,
|
|
4997
4996
|
streaming: e.id === U.value,
|
|
@@ -5008,14 +5007,14 @@ var kr = [
|
|
|
5008
5007
|
"data-test": "messaging-attachment",
|
|
5009
5008
|
"data-attachment-placement": t.placement,
|
|
5010
5009
|
class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
|
|
5011
|
-
}, null, 8,
|
|
5010
|
+
}, null, 8, Di)) : t.kind === "attachment" && t.attachment.type === "audio" ? (T(), _("audio", {
|
|
5012
5011
|
key: 2,
|
|
5013
5012
|
src: t.attachment.src,
|
|
5014
5013
|
controls: "",
|
|
5015
5014
|
"data-test": "messaging-attachment",
|
|
5016
5015
|
"data-attachment-placement": t.placement,
|
|
5017
5016
|
class: "my-2 max-w-full"
|
|
5018
|
-
}, null, 8,
|
|
5017
|
+
}, null, 8, Oi)) : t.kind === "attachment" ? (T(), _("a", {
|
|
5019
5018
|
key: 3,
|
|
5020
5019
|
href: t.attachment.src,
|
|
5021
5020
|
target: "_blank",
|
|
@@ -5023,7 +5022,7 @@ var kr = [
|
|
|
5023
5022
|
"data-test": "messaging-attachment",
|
|
5024
5023
|
"data-attachment-placement": t.placement,
|
|
5025
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"])
|
|
5026
|
-
}, [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)),
|
|
5027
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", {
|
|
5028
5027
|
key: 0,
|
|
5029
5028
|
"data-test": "messaging-tool-activity",
|
|
@@ -5032,7 +5031,7 @@ var kr = [
|
|
|
5032
5031
|
}, [b(qe, {
|
|
5033
5032
|
model: e.journal,
|
|
5034
5033
|
"is-light": K.value
|
|
5035
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
5034
|
+
}, null, 8, ["model", "is-light"])], 8, Ai)) : e.kind === "text" && e.content ? (T(), _("div", {
|
|
5036
5035
|
key: 1,
|
|
5037
5036
|
"data-test": "messaging-live-text-block",
|
|
5038
5037
|
class: S(["mb-4 @sm/chat:pr-[1em] @lg/chat:pr-[2em]", K.value ? "text-theme-800" : "text-white/95"])
|
|
@@ -5046,7 +5045,7 @@ var kr = [
|
|
|
5046
5045
|
"text",
|
|
5047
5046
|
"inverted",
|
|
5048
5047
|
"streaming"
|
|
5049
|
-
])], 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", {
|
|
5050
5049
|
key: 1,
|
|
5051
5050
|
"data-test": "messaging-tool-activity",
|
|
5052
5051
|
"data-journal-outcome": B.value.outcome,
|
|
@@ -5054,7 +5053,7 @@ var kr = [
|
|
|
5054
5053
|
}, [b(qe, {
|
|
5055
5054
|
model: B.value,
|
|
5056
5055
|
"is-light": K.value
|
|
5057
|
-
}, null, 8, ["model", "is-light"])], 8,
|
|
5056
|
+
}, null, 8, ["model", "is-light"])], 8, Mi)) : h("", !0)], 64)) : h("", !0)
|
|
5058
5057
|
], 64))), 128)),
|
|
5059
5058
|
W.value ? (T(), _("div", {
|
|
5060
5059
|
key: 1,
|
|
@@ -5063,12 +5062,12 @@ var kr = [
|
|
|
5063
5062
|
role: "status",
|
|
5064
5063
|
"aria-live": "polite",
|
|
5065
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"])
|
|
5066
|
-
}, [v("span",
|
|
5065
|
+
}, [v("span", Pi, [(T(), _(f, null, A(3, (e) => v("span", {
|
|
5067
5066
|
key: e,
|
|
5068
5067
|
"data-test": "messaging-thinking-dot",
|
|
5069
5068
|
class: "chat-working-dot size-1.5 rounded-full bg-current",
|
|
5070
5069
|
style: C({ animationDelay: `${(e - 1) * .18}s` })
|
|
5071
|
-
}, null, 4)), 64))]), v("span",
|
|
5070
|
+
}, null, 4)), 64))]), v("span", Fi, F(W.value), 1)], 10, Ni)) : h("", !0),
|
|
5072
5071
|
be.value ? (T(), _("div", {
|
|
5073
5072
|
key: 2,
|
|
5074
5073
|
"data-test": "messaging-transient-issue",
|
|
@@ -5085,16 +5084,19 @@ var kr = [
|
|
|
5085
5084
|
href: be.value.actionUrl,
|
|
5086
5085
|
class: "shrink-0 underline underline-offset-2",
|
|
5087
5086
|
onClick: s[5] || (s[5] = R(() => {}, ["stop"]))
|
|
5088
|
-
}, F(be.value.actionLabel), 9,
|
|
5089
|
-
], 10,
|
|
5087
|
+
}, F(be.value.actionLabel), 9, Li)) : h("", !0)
|
|
5088
|
+
], 10, Ii)) : h("", !0)
|
|
5090
5089
|
], 2)]),
|
|
5091
5090
|
_: 3
|
|
5092
5091
|
}, 8, ["class"]),
|
|
5093
|
-
v("div", {
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5092
|
+
v("div", {
|
|
5093
|
+
"data-test": "messaging-composer-footer",
|
|
5094
|
+
class: S(["left-0 right-0 z-30 px-5 pb-[max(env(safe-area-inset-bottom),1rem)]", [
|
|
5095
|
+
z.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
|
|
5096
|
+
e.centered && z.value.length > 0 ? "pt-0" : "pt-3",
|
|
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"
|
|
5098
|
+
]])
|
|
5099
|
+
}, [
|
|
5098
5100
|
Oe.value.length > 0 ? (T(), _("div", {
|
|
5099
5101
|
key: 0,
|
|
5100
5102
|
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" : ""])
|
|
@@ -5106,13 +5108,13 @@ var kr = [
|
|
|
5106
5108
|
src: e.src,
|
|
5107
5109
|
alt: e.filename,
|
|
5108
5110
|
class: S(["size-14 rounded-xl object-cover border", K.value ? "border-black/10" : "border-white/20"])
|
|
5109
|
-
}, null, 10,
|
|
5111
|
+
}, null, 10, Ri)) : (T(), _("div", {
|
|
5110
5112
|
key: 1,
|
|
5111
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"])
|
|
5112
|
-
}, [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", {
|
|
5113
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",
|
|
5114
5116
|
onClick: (e) => removeAttachment(t)
|
|
5115
|
-
}, [...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),
|
|
5116
5118
|
je.value ? (T(), _("input", {
|
|
5117
5119
|
key: 1,
|
|
5118
5120
|
ref_key: "fileInput",
|
|
@@ -5133,7 +5135,7 @@ var kr = [
|
|
|
5133
5135
|
class: S(["flex min-w-0 items-center gap-2 py-1", K.value ? "text-theme-700" : "text-white/80"])
|
|
5134
5136
|
}, [
|
|
5135
5137
|
s[28] || (s[28] = v("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
|
|
5136
|
-
v("span",
|
|
5138
|
+
v("span", Wi, F(Be.value), 1),
|
|
5137
5139
|
v("span", { class: S(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, F(Ve.value), 3)
|
|
5138
5140
|
], 2)) : de((T(), _("textarea", {
|
|
5139
5141
|
key: 0,
|
|
@@ -5158,7 +5160,7 @@ var kr = [
|
|
|
5158
5160
|
onKeydown: handleKeydown,
|
|
5159
5161
|
onFocus: s[7] || (s[7] = (e) => r.value = !0),
|
|
5160
5162
|
onBlur: s[8] || (s[8] = (e) => r.value = !1)
|
|
5161
|
-
}, null, 42,
|
|
5163
|
+
}, null, 42, Ui)), [[ce, De.value]]), v("div", Gi, [
|
|
5162
5164
|
v("button", {
|
|
5163
5165
|
class: S(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70", [
|
|
5164
5166
|
je.value ? "cursor-pointer" : "cursor-default",
|
|
@@ -5169,9 +5171,9 @@ var kr = [
|
|
|
5169
5171
|
"aria-label": je.value ? "Attach file" : "File attachments unavailable",
|
|
5170
5172
|
title: je.value ? "Attach file" : "File attachments unavailable",
|
|
5171
5173
|
onClick: s[9] || (s[9] = (e) => je.value && triggerFileInput())
|
|
5172
|
-
}, [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),
|
|
5173
5175
|
s[29] || (s[29] = v("div", { class: "flex-1" }, null, -1)),
|
|
5174
|
-
v("div",
|
|
5176
|
+
v("div", Xi, [Le.value || Re.value ? (T(), _("button", {
|
|
5175
5177
|
key: 0,
|
|
5176
5178
|
"data-test": "messaging-record-audio-btn",
|
|
5177
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"]),
|
|
@@ -5186,7 +5188,7 @@ var kr = [
|
|
|
5186
5188
|
s[17] || (s[17] = pe(R((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
|
|
5187
5189
|
],
|
|
5188
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"]))]
|
|
5189
|
-
}, [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", {
|
|
5190
5192
|
key: 1,
|
|
5191
5193
|
"data-test": "messaging-send-btn",
|
|
5192
5194
|
"data-composer-action": Ne.value,
|
|
@@ -5195,41 +5197,45 @@ var kr = [
|
|
|
5195
5197
|
"aria-label": Ie.value,
|
|
5196
5198
|
title: Ie.value,
|
|
5197
5199
|
onClick: s[18] || (s[18] = (e) => handleComposerAction())
|
|
5198
|
-
}, [Ne.value === "stop" ? (T(), _("i",
|
|
5199
|
-
])], 10,
|
|
5200
|
+
}, [Ne.value === "stop" ? (T(), _("i", ea)) : (T(), _("i", ta)), v("span", na, F(Ie.value), 1)], 10, $i))])
|
|
5201
|
+
])], 10, Hi),
|
|
5200
5202
|
K.value && e.centered && e.scope === "private" ? (T(), _("div", {
|
|
5201
5203
|
key: 2,
|
|
5202
5204
|
"data-test": "messaging-ai-disclosure",
|
|
5203
5205
|
class: S(["mt-2.5 text-center text-[12px] text-theme-300", r.value ? "max-sm:hidden" : ""])
|
|
5204
5206
|
}, F(e.agent.displayName.value) + " is AI and can make mistakes. ", 3)) : h("", !0),
|
|
5205
|
-
z.value.length === 0 && e.suggestedPrompts.length > 0 ? (T(), _("div",
|
|
5207
|
+
z.value.length === 0 && e.suggestedPrompts.length > 0 ? (T(), _("div", {
|
|
5208
|
+
key: 3,
|
|
5209
|
+
"data-test": "messaging-suggested-prompts",
|
|
5210
|
+
class: S(["mt-5 w-full sm:mx-auto sm:max-w-[720px]", r.value ? "max-sm:hidden" : ""])
|
|
5211
|
+
}, [v("div", ra, [(T(!0), _(f, null, A(e.suggestedPrompts, (e, t) => (T(), _("button", {
|
|
5206
5212
|
key: e.id,
|
|
5207
5213
|
type: "button",
|
|
5208
5214
|
disabled: we.value,
|
|
5209
5215
|
"data-test": "messaging-suggested-prompt",
|
|
5210
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" : ""]]),
|
|
5211
5217
|
onClick: (t) => sendSuggestedPrompt(e)
|
|
5212
|
-
}, F(e.label), 11,
|
|
5218
|
+
}, F(e.label), 11, ia))), 128)), e.suggestedPrompts.length > 3 ? (T(), _("button", {
|
|
5213
5219
|
key: 0,
|
|
5214
5220
|
type: "button",
|
|
5215
5221
|
"data-test": "messaging-suggested-prompts-more",
|
|
5216
5222
|
"aria-expanded": j.value,
|
|
5217
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",
|
|
5218
5224
|
onClick: s[19] || (s[19] = (e) => j.value = !j.value)
|
|
5219
|
-
}, [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)
|
|
5220
5226
|
], 2)
|
|
5221
5227
|
], 2));
|
|
5222
5228
|
}
|
|
5223
|
-
}),
|
|
5229
|
+
}), sa = { class: "agent-wrap" }, ca = {
|
|
5224
5230
|
key: 0,
|
|
5225
5231
|
class: "flex items-center justify-center h-full"
|
|
5226
|
-
},
|
|
5232
|
+
}, la = {
|
|
5227
5233
|
key: 2,
|
|
5228
5234
|
class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
|
|
5229
5235
|
role: "status",
|
|
5230
5236
|
"aria-live": "polite",
|
|
5231
5237
|
"data-test": "agent-unavailable"
|
|
5232
|
-
},
|
|
5238
|
+
}, ua = /* @__PURE__ */ x({
|
|
5233
5239
|
__name: "AgentWrap",
|
|
5234
5240
|
props: {
|
|
5235
5241
|
sdk: {},
|
|
@@ -5325,7 +5331,7 @@ var kr = [
|
|
|
5325
5331
|
});
|
|
5326
5332
|
}
|
|
5327
5333
|
}
|
|
5328
|
-
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", {
|
|
5329
5335
|
sdk: se(o),
|
|
5330
5336
|
agent: c.value,
|
|
5331
5337
|
context: e.clientContext ?? e.context,
|
|
@@ -5333,7 +5339,7 @@ var kr = [
|
|
|
5333
5339
|
buttonText: e.buttonText,
|
|
5334
5340
|
buttonIcon: e.buttonIcon,
|
|
5335
5341
|
loading: s.value
|
|
5336
|
-
}, 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", {
|
|
5337
5343
|
type: "button",
|
|
5338
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",
|
|
5339
5345
|
"data-test": "agent-unavailable-retry",
|
|
@@ -5342,6 +5348,6 @@ var kr = [
|
|
|
5342
5348
|
}
|
|
5343
5349
|
});
|
|
5344
5350
|
//#endregion
|
|
5345
|
-
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 };
|
|
5346
5352
|
|
|
5347
5353
|
//# sourceMappingURL=AgentWrap.js.map
|