@pagelines/sdk 1.0.790 → 1.0.792
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 +18 -18
- package/dist/AgentWrap.js.map +1 -1
- package/dist/agent/AgentController.d.ts +1 -1
- package/dist/agent/ui/ElAgentChat.vue.d.ts +2 -0
- package/dist/agent/ui/ElCreateAgent.vue.d.ts +2 -2
- package/dist/clients/BillingClient.d.ts +0 -3
- package/dist/contract.js +567 -443
- package/dist/contract.js.map +1 -1
- package/dist/demo/index.d.ts +1 -1
- package/dist/sdkClient.d.ts +0 -3
- package/dist/sdkClient.js +0 -18
- package/dist/sdkClient.js.map +1 -1
- package/dist/widget/composables/useWidgetState.d.ts +3 -3
- package/dist/widget/mode.d.ts +8 -0
- package/dist/widget.js +94 -163
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
- package/dist/agent/ui/ElTrialGate.vue.d.ts +0 -7
package/dist/AgentWrap.js
CHANGED
|
@@ -4839,14 +4839,10 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
4839
4839
|
key: 1,
|
|
4840
4840
|
class: "i-tabler-arrow-up size-[17px]"
|
|
4841
4841
|
}, ga = { class: "sr-only" }, _a = {
|
|
4842
|
-
key: 2,
|
|
4843
|
-
"data-test": "messaging-ai-disclosure",
|
|
4844
|
-
class: "mt-2.5 text-center text-[12px] text-theme-300"
|
|
4845
|
-
}, va = {
|
|
4846
4842
|
key: 3,
|
|
4847
4843
|
"data-test": "messaging-suggested-prompts",
|
|
4848
4844
|
class: "mt-3 w-full sm:mx-auto sm:mt-5 sm:max-w-[720px]"
|
|
4849
|
-
},
|
|
4845
|
+
}, va = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, ya = ["disabled", "onClick"], ba = ["aria-expanded"], xa = /* @__PURE__ */ S({
|
|
4850
4846
|
__name: "ElAgentChat",
|
|
4851
4847
|
props: {
|
|
4852
4848
|
chatController: {},
|
|
@@ -4978,7 +4974,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
4978
4974
|
if (!c.value) return;
|
|
4979
4975
|
let e = B.value, t = e[e.length - 1];
|
|
4980
4976
|
return t?.sender === "agent" || t?.sender === "system" ? t.id : void 0;
|
|
4981
|
-
}), W = p(() => !c.value || H.value || he.value || F.value.length ? !1 : ye.value === void 0), be = p(() => H.value ?? (W.value ? "Thinking…" : void 0)), G = p(() => o.value?.sendBlockedReason), Se = p(() => G.value === "agent_deleted"), Ce = p(() => e.agent.state.value.lifecycle === "starting" ? `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}
|
|
4977
|
+
}), W = p(() => !c.value || H.value || he.value || F.value.length ? !1 : ye.value === void 0), be = p(() => H.value ?? (W.value ? "Thinking…" : void 0)), G = p(() => o.value?.sendBlockedReason), Se = p(() => G.value === "agent_deleted"), Ce = p(() => e.agent.state.value.lifecycle === "starting" ? `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"} · sends when ready` : u.value ? `${e.agent.displayName.value || e.agent.name.value || "Assistant"} is offline` : S.value ? "Connecting..." : G.value === "agent_deleted" ? "This assistant was deleted" : `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}`), we = p(() => e.chatController?.composerState?.value ?? {
|
|
4982
4978
|
text: "",
|
|
4983
4979
|
pendingAttachments: [],
|
|
4984
4980
|
isUploading: !1
|
|
@@ -5365,8 +5361,13 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5365
5361
|
K.value ? e.centered ? "bg-theme-0" : "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"
|
|
5366
5362
|
]])
|
|
5367
5363
|
}, [
|
|
5368
|
-
|
|
5364
|
+
t.$slots["above-composer"] ? (j(), _("div", {
|
|
5369
5365
|
key: 0,
|
|
5366
|
+
"data-test": "messaging-above-composer",
|
|
5367
|
+
class: T(["pb-2.5", e.centered ? "max-w-[720px] mx-auto" : ""])
|
|
5368
|
+
}, [re(t.$slots, "above-composer")], 2)) : h("", !0),
|
|
5369
|
+
Ee.value.length > 0 ? (j(), _("div", {
|
|
5370
|
+
key: 1,
|
|
5370
5371
|
class: T(["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" : ""])
|
|
5371
5372
|
}, [(j(!0), _(f, null, P(Ee.value, (e, t) => (j(), _("div", {
|
|
5372
5373
|
key: t,
|
|
@@ -5384,7 +5385,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5384
5385
|
onClick: (e) => removeAttachment(t)
|
|
5385
5386
|
}, [...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),
|
|
5386
5387
|
Ae.value ? (j(), _("input", {
|
|
5387
|
-
key:
|
|
5388
|
+
key: 2,
|
|
5388
5389
|
ref_key: "fileInput",
|
|
5389
5390
|
ref: a,
|
|
5390
5391
|
type: "file",
|
|
@@ -5512,35 +5513,34 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5512
5513
|
onClick: o[20] || (o[20] = (e) => handleComposerAction())
|
|
5513
5514
|
}, [Me.value === "stop" ? (j(), _("i", ma)) : (j(), _("i", ha)), v("span", ga, I(Le.value), 1)], 10, pa)], 64))])
|
|
5514
5515
|
])], 10, ea),
|
|
5515
|
-
|
|
5516
|
-
!We.value && B.value.length === 0 && e.suggestedPrompts.length > 0 ? (j(), _("div", va, [v("div", ya, [(j(!0), _(f, null, P(e.suggestedPrompts, (e, t) => (j(), _("button", {
|
|
5516
|
+
!We.value && B.value.length === 0 && e.suggestedPrompts.length > 0 ? (j(), _("div", _a, [v("div", va, [(j(!0), _(f, null, P(e.suggestedPrompts, (e, t) => (j(), _("button", {
|
|
5517
5517
|
key: e.id,
|
|
5518
5518
|
type: "button",
|
|
5519
5519
|
disabled: Se.value,
|
|
5520
5520
|
"data-test": "messaging-suggested-prompt",
|
|
5521
5521
|
class: T(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", [Se.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !A.value && t >= 3 ? "max-sm:hidden" : ""]]),
|
|
5522
5522
|
onClick: (t) => sendSuggestedPrompt(e)
|
|
5523
|
-
}, I(e.label), 11,
|
|
5523
|
+
}, I(e.label), 11, ya))), 128)), e.suggestedPrompts.length > 3 ? (j(), _("button", {
|
|
5524
5524
|
key: 0,
|
|
5525
5525
|
type: "button",
|
|
5526
5526
|
"data-test": "messaging-suggested-prompts-more",
|
|
5527
5527
|
"aria-expanded": A.value,
|
|
5528
5528
|
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",
|
|
5529
5529
|
onClick: o[21] || (o[21] = (e) => A.value = !A.value)
|
|
5530
|
-
}, [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,
|
|
5530
|
+
}, [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, ba)) : h("", !0)])])) : h("", !0)
|
|
5531
5531
|
], 2)
|
|
5532
5532
|
], 2));
|
|
5533
5533
|
}
|
|
5534
|
-
}),
|
|
5534
|
+
}), Sa = { class: "agent-wrap" }, Ca = {
|
|
5535
5535
|
key: 0,
|
|
5536
5536
|
class: "flex items-center justify-center h-full"
|
|
5537
|
-
},
|
|
5537
|
+
}, wa = {
|
|
5538
5538
|
key: 2,
|
|
5539
5539
|
class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
|
|
5540
5540
|
role: "status",
|
|
5541
5541
|
"aria-live": "polite",
|
|
5542
5542
|
"data-test": "agent-unavailable"
|
|
5543
|
-
},
|
|
5543
|
+
}, Ta = /* @__PURE__ */ S({
|
|
5544
5544
|
__name: "AgentWrap",
|
|
5545
5545
|
props: {
|
|
5546
5546
|
sdk: {},
|
|
@@ -5636,7 +5636,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5636
5636
|
});
|
|
5637
5637
|
}
|
|
5638
5638
|
}
|
|
5639
|
-
return te(loadAgent), (t, n) => (j(), _("div",
|
|
5639
|
+
return te(loadAgent), (t, n) => (j(), _("div", Sa, [s.value ? (j(), _("div", Ca, [v("div", { class: T(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? re(t.$slots, "default", {
|
|
5640
5640
|
sdk: ae(o),
|
|
5641
5641
|
agent: c.value,
|
|
5642
5642
|
context: e.clientContext ?? e.context,
|
|
@@ -5644,7 +5644,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5644
5644
|
buttonText: e.buttonText,
|
|
5645
5645
|
buttonIcon: e.buttonIcon,
|
|
5646
5646
|
loading: s.value
|
|
5647
|
-
}, void 0, void 0, 1) : u.value ? (j(), _("div",
|
|
5647
|
+
}, void 0, void 0, 1) : u.value ? (j(), _("div", wa, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
|
|
5648
5648
|
type: "button",
|
|
5649
5649
|
class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
|
|
5650
5650
|
"data-test": "agent-unavailable-retry",
|
|
@@ -5653,6 +5653,6 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5653
5653
|
}
|
|
5654
5654
|
});
|
|
5655
5655
|
//#endregion
|
|
5656
|
-
export { Pe as a, we as c, parseButtonTemplate as d, AgentChatController as f, pe as h, ai as i, getAgentAvatarUrl as l, n as m,
|
|
5656
|
+
export { Pe as a, we as c, parseButtonTemplate as d, AgentChatController as f, pe as h, ai as i, getAgentAvatarUrl as l, n as m, xa as n, Oe as o, he as p, yi as r, Ee as s, Ta as t, handleImageError as u };
|
|
5657
5657
|
|
|
5658
5658
|
//# sourceMappingURL=AgentWrap.js.map
|