@pagelines/sdk 1.0.821 → 1.0.823
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/AgentProvider.js +130 -130
- package/dist/AgentProvider.js.map +1 -1
- package/dist/AgentWrap.js +1320 -987
- package/dist/AgentWrap.js.map +1 -1
- package/dist/agent/voice/provider.d.ts +2 -0
- package/dist/agent/voice/voice-session-client.d.ts +6 -3
- package/dist/agent.js +27 -288
- package/dist/agent.js.map +1 -1
- package/dist/contract.js +1 -0
- package/dist/contract.js.map +1 -1
- package/dist/provider.js +16448 -30
- package/dist/provider.js.map +1 -1
- package/dist/provider2.js +9568 -7572
- package/dist/provider2.js.map +1 -1
- package/dist/sdk.css +1 -1
- package/dist/widget.js +55 -55
- package/package.json +1 -1
- package/dist/provider3.js +0 -18454
- package/dist/provider3.js.map +0 -1
package/dist/AgentProvider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./rolldown-runtime.js";
|
|
2
2
|
import { SOCIAL_PLATFORMS as e } from "./constants.js";
|
|
3
|
-
import {
|
|
3
|
+
import { _ as t, d as n, f as r, g as i, h as a, l as o, m as s, n as c, p as l, t as u, u as d, y as ee } from "./AgentWrap.js";
|
|
4
4
|
import { getColorSchemeOklch as te } from "@pagelines/core";
|
|
5
5
|
import { Fragment as f, Transition as p, TransitionGroup as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as b, createTextVNode as x, createVNode as S, defineComponent as C, guardReactiveProps as w, mergeProps as T, normalizeClass as E, normalizeProps as D, normalizeStyle as O, onMounted as k, onUnmounted as ne, openBlock as A, ref as j, renderList as M, renderSlot as N, shallowRef as re, toDisplayString as P, unref as F, watch as I, withCtx as L, withKeys as R, withModifiers as z } from "vue";
|
|
6
6
|
//#endregion
|
|
@@ -33,23 +33,23 @@ var B = /* @__PURE__ */ C({
|
|
|
33
33
|
__name: "ElAuthGate",
|
|
34
34
|
props: { sdk: {} },
|
|
35
35
|
setup(e) {
|
|
36
|
-
let
|
|
36
|
+
let t = j({
|
|
37
37
|
email: "",
|
|
38
38
|
code: ""
|
|
39
|
-
}),
|
|
39
|
+
}), i = j("email"), a = j(!1), o = {
|
|
40
40
|
email: {
|
|
41
41
|
title: "Enter Your Email",
|
|
42
42
|
button: {
|
|
43
43
|
label: "Continue",
|
|
44
|
-
disabled: () => !
|
|
44
|
+
disabled: () => !t.value.email || a.value
|
|
45
45
|
},
|
|
46
46
|
action: async () => {
|
|
47
|
-
if (!
|
|
48
|
-
|
|
47
|
+
if (!a.value) {
|
|
48
|
+
a.value = !0;
|
|
49
49
|
try {
|
|
50
|
-
await e.sdk.auth.requestAuthCode({ email:
|
|
50
|
+
await e.sdk.auth.requestAuthCode({ email: t.value.email }) && (i.value = "code");
|
|
51
51
|
} finally {
|
|
52
|
-
|
|
52
|
+
a.value = !1;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -58,41 +58,41 @@ var B = /* @__PURE__ */ C({
|
|
|
58
58
|
title: "Enter Verification Code",
|
|
59
59
|
button: {
|
|
60
60
|
label: "Verify",
|
|
61
|
-
disabled: () =>
|
|
61
|
+
disabled: () => t.value.code.length !== 6 || a.value
|
|
62
62
|
},
|
|
63
63
|
action: async () => {
|
|
64
|
-
if (!
|
|
65
|
-
|
|
64
|
+
if (!a.value) {
|
|
65
|
+
a.value = !0;
|
|
66
66
|
try {
|
|
67
67
|
await e.sdk.auth.loginWithCode({
|
|
68
|
-
email:
|
|
69
|
-
code:
|
|
68
|
+
email: t.value.email,
|
|
69
|
+
code: t.value.code
|
|
70
70
|
});
|
|
71
71
|
} finally {
|
|
72
|
-
|
|
72
|
+
a.value = !1;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
}, s = h(() => o[
|
|
77
|
+
}, s = h(() => o[i.value]);
|
|
78
78
|
return I(() => e.sdk.activeUser.value, (e) => {
|
|
79
|
-
e &&
|
|
80
|
-
}), (
|
|
79
|
+
e && i.value === "code" && console.log("[ElAuthGate] Authentication successful", { email: e.email });
|
|
80
|
+
}), (a, o) => (A(), v("div", {
|
|
81
81
|
"data-test": "auth-form",
|
|
82
|
-
"data-test-mode":
|
|
82
|
+
"data-test-mode": i.value,
|
|
83
83
|
class: "flex flex-col items-center justify-center h-full p-6"
|
|
84
84
|
}, [y("div", H, [
|
|
85
85
|
e.sdk.error.value ? (A(), v("p", U, P(e.sdk.error.value), 1)) : _("", !0),
|
|
86
86
|
y("h3", W, P(s.value.title), 1),
|
|
87
87
|
y("div", G, [S(B, null, {
|
|
88
|
-
default: L(() => [
|
|
89
|
-
modelValue:
|
|
90
|
-
"onUpdate:modelValue": o[0] || (o[0] = (e) =>
|
|
88
|
+
default: L(() => [i.value === "email" ? (A(), v("div", K, [S(n, {
|
|
89
|
+
modelValue: t.value.email,
|
|
90
|
+
"onUpdate:modelValue": o[0] || (o[0] = (e) => t.value.email = e),
|
|
91
91
|
"data-test": "auth-email-input",
|
|
92
92
|
onKeyup: R(s.value.action, ["enter"])
|
|
93
|
-
}, null, 8, ["modelValue", "onKeyup"])])) : (A(), v("div", q, [S(
|
|
94
|
-
modelValue:
|
|
95
|
-
"onUpdate:modelValue": o[1] || (o[1] = (e) =>
|
|
93
|
+
}, null, 8, ["modelValue", "onKeyup"])])) : (A(), v("div", q, [S(d, {
|
|
94
|
+
modelValue: t.value.code,
|
|
95
|
+
"onUpdate:modelValue": o[1] || (o[1] = (e) => t.value.code = e),
|
|
96
96
|
length: 6,
|
|
97
97
|
"focus-first": !0,
|
|
98
98
|
"data-test": "auth-code-input",
|
|
@@ -100,7 +100,7 @@ var B = /* @__PURE__ */ C({
|
|
|
100
100
|
}, null, 8, ["modelValue", "onAutoSubmit"])])), (A(), v("div", {
|
|
101
101
|
key: s.value.button.label,
|
|
102
102
|
class: "space-y-4 w-full"
|
|
103
|
-
}, [S(
|
|
103
|
+
}, [S(r, {
|
|
104
104
|
theme: "primary",
|
|
105
105
|
size: "md",
|
|
106
106
|
class: "w-full",
|
|
@@ -115,10 +115,10 @@ var B = /* @__PURE__ */ C({
|
|
|
115
115
|
"loading",
|
|
116
116
|
"disabled",
|
|
117
117
|
"onClick"
|
|
118
|
-
]),
|
|
118
|
+
]), i.value === "code" ? (A(), v("button", {
|
|
119
119
|
key: 0,
|
|
120
120
|
class: "w-full text-xs text-white/50 hover:text-white/70 transition-colors py-2",
|
|
121
|
-
onClick: o[2] || (o[2] = (e) =>
|
|
121
|
+
onClick: o[2] || (o[2] = (e) => i.value = "email")
|
|
122
122
|
}, " Change Email ")) : _("", !0)]))]),
|
|
123
123
|
_: 1
|
|
124
124
|
})])
|
|
@@ -146,7 +146,7 @@ var B = /* @__PURE__ */ C({
|
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
148
|
setup(t) {
|
|
149
|
-
return (n, r) => (A(), v("div", Y, [S(
|
|
149
|
+
return (n, r) => (A(), v("div", Y, [S(o, {
|
|
150
150
|
agent: t.agent,
|
|
151
151
|
"is-online": t.isOnline
|
|
152
152
|
}, null, 8, ["agent", "is-online"]), y("div", X, [
|
|
@@ -183,15 +183,15 @@ var B = /* @__PURE__ */ C({
|
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
185
|
setup(e) {
|
|
186
|
-
return (t,
|
|
186
|
+
return (t, n) => (A(), v("div", me, [y("div", he, [y("div", ge, [y("img", {
|
|
187
187
|
src: e.agent.avatarUrl.value,
|
|
188
188
|
alt: e.agent.displayName.value,
|
|
189
189
|
class: "w-full h-full object-cover",
|
|
190
|
-
onError:
|
|
191
|
-
}, null, 40, _e)]), y("div", ve, [e.isOnline ? (A(), v(f, { key: 0 }, [
|
|
190
|
+
onError: n[0] || (n[0] = (...e) => F(s) && F(s)(...e))
|
|
191
|
+
}, null, 40, _e)]), y("div", ve, [e.isOnline ? (A(), v(f, { key: 0 }, [n[1] || (n[1] = y("div", {
|
|
192
192
|
class: "size-4 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
|
|
193
193
|
style: { "animation-duration": "3s" }
|
|
194
|
-
}, null, -1)),
|
|
194
|
+
}, null, -1)), n[2] || (n[2] = y("div", { class: "size-4 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (A(), v("div", ye))])]), y("div", be, [y("h1", xe, P(e.agent.displayName.value), 1), y("p", Se, P(e.agent.title.value), 1)])]));
|
|
195
195
|
}
|
|
196
196
|
}), we = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden" }, Te = /* @__PURE__ */ C({
|
|
197
197
|
name: "SelfSidebarClose",
|
|
@@ -335,22 +335,22 @@ var B = /* @__PURE__ */ C({
|
|
|
335
335
|
chatController: {}
|
|
336
336
|
},
|
|
337
337
|
emits: ["update:modelValue"],
|
|
338
|
-
setup(e, { emit:
|
|
339
|
-
let
|
|
340
|
-
get: () =>
|
|
341
|
-
set: (e) =>
|
|
342
|
-
}),
|
|
338
|
+
setup(e, { emit: n }) {
|
|
339
|
+
let r = e, i = n, a = h({
|
|
340
|
+
get: () => r.modelValue,
|
|
341
|
+
set: (e) => i("update:modelValue", e)
|
|
342
|
+
}), o = h(() => r.chatController?.agentMode?.value ?? "self"), s = h(() => t.map((e) => ({
|
|
343
343
|
key: e.mode,
|
|
344
344
|
icon: { src: e.icon },
|
|
345
345
|
label: e.label,
|
|
346
|
-
isActive:
|
|
346
|
+
isActive: o.value === e.mode,
|
|
347
347
|
onClick: () => {
|
|
348
|
-
|
|
348
|
+
r.chatController?.setMode(e.mode);
|
|
349
349
|
}
|
|
350
350
|
})));
|
|
351
351
|
return (e, t) => (A(), g(Z, {
|
|
352
|
-
modelValue:
|
|
353
|
-
"onUpdate:modelValue": t[0] || (t[0] = (e) =>
|
|
352
|
+
modelValue: a.value,
|
|
353
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => a.value = e),
|
|
354
354
|
items: s.value,
|
|
355
355
|
position: "right",
|
|
356
356
|
title: "Mode",
|
|
@@ -495,19 +495,19 @@ var B = /* @__PURE__ */ C({
|
|
|
495
495
|
"turnStarted",
|
|
496
496
|
"turnCompleted"
|
|
497
497
|
],
|
|
498
|
-
setup(
|
|
499
|
-
let
|
|
498
|
+
setup(n, { emit: s }) {
|
|
499
|
+
let u = s, d = re(), p = j(!1), m = j(!1), C = j(), T = j(), R = h(() => d.value?.agentMode?.value ?? "self"), B = h(() => d.value?.textState.value.isConnected ?? !1), V = h(() => n.sdk.activeUser.value !== void 0), H = h(() => t.find((e) => e.mode === R.value));
|
|
500
500
|
function createChatController() {
|
|
501
|
-
|
|
501
|
+
d.value && d.value.destroy();
|
|
502
502
|
try {
|
|
503
|
-
|
|
504
|
-
sdk:
|
|
505
|
-
agent:
|
|
506
|
-
context:
|
|
507
|
-
firstMessage:
|
|
508
|
-
...
|
|
509
|
-
onTurnStarted: () =>
|
|
510
|
-
onTurnCompleted: (e) =>
|
|
503
|
+
d.value = new i({
|
|
504
|
+
sdk: n.sdk,
|
|
505
|
+
agent: n.agent,
|
|
506
|
+
context: n.context,
|
|
507
|
+
firstMessage: n.firstMessage,
|
|
508
|
+
...n.createVoiceClientFn ? { createVoiceClientFn: n.createVoiceClientFn } : {},
|
|
509
|
+
onTurnStarted: () => u("turnStarted"),
|
|
510
|
+
onTurnCompleted: (e) => u("turnCompleted", e)
|
|
511
511
|
});
|
|
512
512
|
} catch (e) {
|
|
513
513
|
throw console.error("AgentChatController creation failed:", e), e;
|
|
@@ -517,7 +517,7 @@ var B = /* @__PURE__ */ C({
|
|
|
517
517
|
createChatController();
|
|
518
518
|
} catch (e) {
|
|
519
519
|
let t = e instanceof Error ? e.message : "Couldn't initialize your assistant";
|
|
520
|
-
C.value = t,
|
|
520
|
+
C.value = t, u("error", t);
|
|
521
521
|
}
|
|
522
522
|
function applyTheme(e) {
|
|
523
523
|
if (!T.value) return;
|
|
@@ -528,19 +528,19 @@ var B = /* @__PURE__ */ C({
|
|
|
528
528
|
}
|
|
529
529
|
k(() => {
|
|
530
530
|
try {
|
|
531
|
-
applyTheme(
|
|
531
|
+
applyTheme(n.theme), n.chatOnly && d.value && d.value.setMode("chat");
|
|
532
532
|
} catch (e) {
|
|
533
533
|
let t = e instanceof Error ? e.message : "Couldn't initialize your assistant";
|
|
534
|
-
C.value = t,
|
|
534
|
+
C.value = t, u("error", t);
|
|
535
535
|
}
|
|
536
536
|
}), ne(() => {
|
|
537
|
-
|
|
538
|
-
}), I(() =>
|
|
537
|
+
d.value && d.value.destroy();
|
|
538
|
+
}), I(() => n.theme, (e) => {
|
|
539
539
|
applyTheme(e);
|
|
540
|
-
}), I(() =>
|
|
541
|
-
t && !e &&
|
|
540
|
+
}), I(() => n.sdk.activeUser.value, (e, t) => {
|
|
541
|
+
t && !e && d.value && d.value.setMode("self");
|
|
542
542
|
});
|
|
543
|
-
let U = h(() => !!(
|
|
543
|
+
let U = h(() => !!(n.agent.cover.value?.src && n.agent.cover.value?.quality === "low") || !!(n.agent.avatar.value?.src && n.agent.avatar.value?.quality === "low")), W = h(() => {
|
|
544
544
|
let e = [U.value ? "backdrop-blur-sm" : ""];
|
|
545
545
|
return U.value && R.value === "self" ? e.push("from-black/80 via-black/60 to-black/80") : R.value === "self" ? e.push("from-black/70 via-black/50 to-black/80") : e.push("from-black/90 via-black/90 to-black/100"), e.join(" ");
|
|
546
546
|
}), G = {
|
|
@@ -549,72 +549,72 @@ var B = /* @__PURE__ */ C({
|
|
|
549
549
|
question: "i-heroicons-question-mark-circle",
|
|
550
550
|
message: "i-heroicons-chat-bubble-left-right",
|
|
551
551
|
sparkles: "i-heroicons-sparkles"
|
|
552
|
-
}, K = h(() =>
|
|
553
|
-
template:
|
|
554
|
-
agent:
|
|
555
|
-
})), q = h(() => G[
|
|
556
|
-
return (
|
|
552
|
+
}, K = h(() => a({
|
|
553
|
+
template: n.buttonText || "Talk to {name}",
|
|
554
|
+
agent: n.agent.toConfig()
|
|
555
|
+
})), q = h(() => G[n.buttonIcon || "phone"] || G.phone);
|
|
556
|
+
return (t, i) => (A(), v("div", {
|
|
557
557
|
ref_key: "rootElement",
|
|
558
558
|
ref: T,
|
|
559
|
-
key: F(
|
|
559
|
+
key: F(l)(n.agent.toConfig()),
|
|
560
560
|
class: "pagelines-sdk @container/agent pagelines-agent w-full h-full overflow-hidden relative",
|
|
561
561
|
"data-test": "agent-chat"
|
|
562
562
|
}, [
|
|
563
|
-
|
|
563
|
+
n.loading ? (A(), v("div", Ie, [S(ee, { class: "text-white size-8" })])) : n.agent && !C.value ? (A(), v("div", {
|
|
564
564
|
key: 1,
|
|
565
|
-
class: E(["absolute inset-0",
|
|
566
|
-
style: O(
|
|
567
|
-
"data-quality":
|
|
568
|
-
}, [
|
|
565
|
+
class: E(["absolute inset-0", n.bare ? "" : "bg-cover bg-center bg-no-repeat"]),
|
|
566
|
+
style: O(n.bare ? void 0 : { backgroundImage: `url(${F(l)(n.agent.toConfig())})` }),
|
|
567
|
+
"data-quality": n.agent.avatar.value?.quality || "none"
|
|
568
|
+
}, [n.bare ? _("", !0) : (A(), v("div", {
|
|
569
569
|
key: 0,
|
|
570
570
|
class: E(["absolute inset-0 bg-gradient-to-br z-0", W.value])
|
|
571
|
-
}, null, 2)), y("div", { class: E(["relative z-10 flex flex-col h-full transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)] will-change-transform",
|
|
571
|
+
}, null, 2)), y("div", { class: E(["relative z-10 flex flex-col h-full transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)] will-change-transform", n.isActive ? "opacity-100 translate-y-0" : "opacity-0 translate-y-2"]) }, [!n.bare || n.hasClose ? (A(), v("div", {
|
|
572
572
|
key: 0,
|
|
573
|
-
class: E(["relative z-30 p-2", !
|
|
574
|
-
}, [
|
|
573
|
+
class: E(["relative z-30 p-2", !n.bare && R.value !== "self" ? "backdrop-blur-lg" : ""])
|
|
574
|
+
}, [n.chatOnly ? (A(), v("div", {
|
|
575
575
|
key: 0,
|
|
576
|
-
class: E(["flex items-center",
|
|
577
|
-
}, [
|
|
578
|
-
src: F(
|
|
579
|
-
alt:
|
|
576
|
+
class: E(["flex items-center", n.bare ? "justify-end" : ""])
|
|
577
|
+
}, [n.bare ? _("", !0) : (A(), v("div", Re, [y("img", {
|
|
578
|
+
src: F(l)(n.agent.toConfig()),
|
|
579
|
+
alt: n.agent.displayName.value,
|
|
580
580
|
class: "size-8 rounded-full object-cover"
|
|
581
|
-
}, null, 8, ze), y("span", Be, P(
|
|
582
|
-
class: E(["flex cursor-pointer items-center rounded-2xl p-3 transition-colors",
|
|
583
|
-
onClick:
|
|
584
|
-
}, [...
|
|
581
|
+
}, null, 8, ze), y("span", Be, P(n.agent.displayName.value), 1)])), n.hasClose ? (A(), v("div", Ve, [y("button", {
|
|
582
|
+
class: E(["flex cursor-pointer items-center rounded-2xl p-3 transition-colors", n.bare ? "text-theme-500 hover:bg-theme-50" : "text-white/70 hover:bg-white/10"]),
|
|
583
|
+
onClick: i[0] || (i[0] = z((e) => u("close", "button"), ["stop"]))
|
|
584
|
+
}, [...i[7] || (i[7] = [y("i", { class: "size-6 i-tabler-x" }, null, -1)])], 2)])) : _("", !0)], 2)) : (A(), v("div", {
|
|
585
585
|
key: 1,
|
|
586
|
-
class: E(["flex items-center",
|
|
586
|
+
class: E(["flex items-center", n.hasClose ? "" : "justify-between"])
|
|
587
587
|
}, [
|
|
588
|
-
y("div", { class: E(
|
|
588
|
+
y("div", { class: E(n.hasClose ? "flex-1 basis-0" : "") }, [y("button", {
|
|
589
589
|
class: "cursor-pointer p-2 flex items-center gap-2 rounded-2xl text-white/70 hover:bg-white/10 transition-all duration-300 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-105 active:scale-95",
|
|
590
|
-
onClick:
|
|
591
|
-
}, [...
|
|
590
|
+
onClick: i[1] || (i[1] = (e) => p.value = !0)
|
|
591
|
+
}, [...i[8] || (i[8] = [y("i", { class: "i-tabler-menu size-7" }, null, -1)])])], 2),
|
|
592
592
|
y("button", {
|
|
593
593
|
class: E(["flex items-center gap-2 px-3.5 py-3 rounded-2xl text-white/90 hover:bg-white/10 transition-all cursor-pointer flex-grow-0", { "bg-white/10": m.value }]),
|
|
594
|
-
onClick:
|
|
594
|
+
onClick: i[2] || (i[2] = (e) => m.value = !0)
|
|
595
595
|
}, [
|
|
596
596
|
y("i", { class: E([H.value?.icon, "size-4 opacity-60"]) }, null, 2),
|
|
597
597
|
y("span", He, P(H.value?.label), 1),
|
|
598
|
-
|
|
598
|
+
i[9] || (i[9] = y("i", { class: "i-tabler-chevron-down size-4" }, null, -1))
|
|
599
599
|
], 2),
|
|
600
|
-
|
|
600
|
+
n.hasClose ? (A(), v("div", Q, [y("button", {
|
|
601
601
|
class: "cursor-pointer flex items-center p-3 rounded-2xl text-white/70 hover:bg-white/10 transition-colors",
|
|
602
|
-
onClick:
|
|
603
|
-
}, [...
|
|
604
|
-
], 2))], 2)) : _("", !0),
|
|
602
|
+
onClick: i[3] || (i[3] = z((e) => u("close", "button"), ["stop"]))
|
|
603
|
+
}, [...i[10] || (i[10] = [y("i", { class: "size-6 i-tabler-x" }, null, -1)])])])) : _("", !0)
|
|
604
|
+
], 2))], 2)) : _("", !0), n.chatOnly ? (A(), v("div", {
|
|
605
605
|
key: 1,
|
|
606
|
-
class: E(["relative z-20 flex min-h-0 w-full flex-1 flex-col",
|
|
607
|
-
}, [y("div", { class: E(["min-h-0 w-full flex-1",
|
|
608
|
-
"chat-controller":
|
|
609
|
-
agent:
|
|
606
|
+
class: E(["relative z-20 flex min-h-0 w-full flex-1 flex-col", n.bare ? "" : "px-4"])
|
|
607
|
+
}, [y("div", { class: E(["min-h-0 w-full flex-1", n.bare ? "" : "mx-auto max-w-md"]) }, [S(c, {
|
|
608
|
+
"chat-controller": d.value,
|
|
609
|
+
agent: n.agent,
|
|
610
610
|
scope: V.value ? "private" : "public",
|
|
611
|
-
"empty-state-message":
|
|
612
|
-
variant:
|
|
613
|
-
"show-header": !
|
|
614
|
-
centered:
|
|
615
|
-
}, b({ _: 2 }, [
|
|
611
|
+
"empty-state-message": n.emptyStateMessage,
|
|
612
|
+
variant: n.bare ? "light" : "dark",
|
|
613
|
+
"show-header": !n.bare,
|
|
614
|
+
centered: n.bare
|
|
615
|
+
}, b({ _: 2 }, [t.$slots["empty-heading"] ? {
|
|
616
616
|
name: "empty-heading",
|
|
617
|
-
fn: L((e) => [N(
|
|
617
|
+
fn: L((e) => [N(t.$slots, "empty-heading", D(w(e)))]),
|
|
618
618
|
key: "0"
|
|
619
619
|
} : void 0]), 1032, [
|
|
620
620
|
"chat-controller",
|
|
@@ -625,60 +625,60 @@ var B = /* @__PURE__ */ C({
|
|
|
625
625
|
"show-header",
|
|
626
626
|
"centered"
|
|
627
627
|
])], 2)], 2)) : (A(), v(f, { key: 2 }, [R.value === "self" ? (A(), v("div", Ue, [
|
|
628
|
-
|
|
628
|
+
i[11] || (i[11] = y("div", { class: "flex-1 basis-0 mb-12" }, null, -1)),
|
|
629
629
|
S(Ce, {
|
|
630
|
-
agent:
|
|
630
|
+
agent: n.agent,
|
|
631
631
|
"is-online": B.value
|
|
632
632
|
}, null, 8, ["agent", "is-online"]),
|
|
633
|
-
y("div", We, [S(
|
|
633
|
+
y("div", We, [S(r, {
|
|
634
634
|
theme: "primary",
|
|
635
635
|
size: "lg",
|
|
636
636
|
class: "w-full",
|
|
637
637
|
icon: q.value,
|
|
638
638
|
"data-test": "voice-button",
|
|
639
|
-
onClick:
|
|
639
|
+
onClick: i[4] || (i[4] = (e) => d.value?.setMode("talk"))
|
|
640
640
|
}, {
|
|
641
641
|
default: L(() => [x(P(K.value), 1)]),
|
|
642
642
|
_: 1
|
|
643
|
-
}, 8, ["icon"]),
|
|
643
|
+
}, 8, ["icon"]), n.agent.accounts.value && n.agent.accounts.value.length > 0 ? (A(), v("div", Ge, [(A(!0), v(f, null, M((n.agent.accounts.value || []).filter((t) => F(e)[t.platform]), (t) => (A(), v("a", {
|
|
644
644
|
key: `${t.platform}-${t.handle}`,
|
|
645
645
|
href: F(e)[t.platform].getUrl(t.handle),
|
|
646
646
|
target: "_blank",
|
|
647
647
|
class: "size-12 rounded-full text-white/60 hover:text-white hover:bg-white/5 border border-white/0 hover:border-white/10 flex items-center justify-center transition-all duration-200 hover:scale-105"
|
|
648
648
|
}, [y("i", { class: E([F(e)[t.platform].icon, "size-5"]) }, null, 2)], 8, Ke))), 128))])) : _("", !0)])
|
|
649
|
-
])) : R.value === "talk" ? (A(), v("div", qe, [
|
|
649
|
+
])) : R.value === "talk" ? (A(), v("div", qe, [n.requireAuth && !V.value ? (A(), g(J, {
|
|
650
650
|
key: 0,
|
|
651
|
-
sdk:
|
|
652
|
-
}, null, 8, ["sdk"])) : (A(), v(f, { key: 1 }, [y("div", null, [y("div", Je, [S(
|
|
653
|
-
agent:
|
|
651
|
+
sdk: n.sdk
|
|
652
|
+
}, null, 8, ["sdk"])) : (A(), v(f, { key: 1 }, [y("div", null, [y("div", Je, [S(o, {
|
|
653
|
+
agent: n.agent,
|
|
654
654
|
"is-online": B.value
|
|
655
|
-
}, null, 8, ["agent", "is-online"])])]), S(
|
|
656
|
-
"chat-controller":
|
|
657
|
-
agent:
|
|
658
|
-
}, null, 8, ["chat-controller", "agent"])], 64))])) : (A(), v("div", Ye, [y("div", Xe, [R.value === "chat" ? (A(), v(f, { key: 0 }, [
|
|
655
|
+
}, null, 8, ["agent", "is-online"])])]), S(c, {
|
|
656
|
+
"chat-controller": d.value,
|
|
657
|
+
agent: n.agent
|
|
658
|
+
}, null, 8, ["chat-controller", "agent"])], 64))])) : (A(), v("div", Ye, [y("div", Xe, [R.value === "chat" ? (A(), v(f, { key: 0 }, [n.requireAuth && !V.value ? (A(), g(J, {
|
|
659
659
|
key: 0,
|
|
660
|
-
sdk:
|
|
661
|
-
}, null, 8, ["sdk"])) : (A(), g(
|
|
660
|
+
sdk: n.sdk
|
|
661
|
+
}, null, 8, ["sdk"])) : (A(), g(c, {
|
|
662
662
|
key: 1,
|
|
663
|
-
"chat-controller":
|
|
664
|
-
agent:
|
|
663
|
+
"chat-controller": d.value,
|
|
664
|
+
agent: n.agent,
|
|
665
665
|
"show-header": ""
|
|
666
666
|
}, null, 8, ["chat-controller", "agent"]))], 64)) : R.value === "info" ? (A(), g(pe, {
|
|
667
667
|
key: 1,
|
|
668
|
-
agent:
|
|
668
|
+
agent: n.agent,
|
|
669
669
|
"is-online": B.value
|
|
670
670
|
}, null, 8, ["agent", "is-online"])) : _("", !0)])]))], 64))], 2)], 14, Le)) : C.value ? (A(), v("div", Ze, [y("div", Qe, [
|
|
671
|
-
|
|
672
|
-
|
|
671
|
+
i[12] || (i[12] = y("div", { class: "flex justify-center" }, [y("div", { class: "rounded-full bg-red-500/20 flex items-center justify-center size-10" }, [y("i", { class: "i-tabler-alert-circle size-6 text-red-400" })])], -1)),
|
|
672
|
+
i[13] || (i[13] = y("h3", { class: "text-lg font-medium" }, " Agent Error ", -1)),
|
|
673
673
|
y("p", $e, P(C.value), 1)
|
|
674
674
|
])])) : (A(), v("div", et, " Couldn't load your assistant. Please try again later. ")),
|
|
675
|
-
|
|
675
|
+
n.chatOnly ? _("", !0) : (A(), g(Fe, {
|
|
676
676
|
key: 4,
|
|
677
677
|
modelValue: p.value,
|
|
678
|
-
"onUpdate:modelValue":
|
|
679
|
-
agent:
|
|
680
|
-
sdk:
|
|
681
|
-
title:
|
|
678
|
+
"onUpdate:modelValue": i[5] || (i[5] = (e) => p.value = e),
|
|
679
|
+
agent: n.agent,
|
|
680
|
+
sdk: n.sdk,
|
|
681
|
+
title: n.agent.displayName.value,
|
|
682
682
|
"data-test": "agent-sidebar"
|
|
683
683
|
}, null, 8, [
|
|
684
684
|
"modelValue",
|
|
@@ -686,11 +686,11 @@ var B = /* @__PURE__ */ C({
|
|
|
686
686
|
"sdk",
|
|
687
687
|
"title"
|
|
688
688
|
])),
|
|
689
|
-
|
|
689
|
+
n.chatOnly ? _("", !0) : (A(), g(Pe, {
|
|
690
690
|
key: 5,
|
|
691
691
|
modelValue: m.value,
|
|
692
|
-
"onUpdate:modelValue":
|
|
693
|
-
"chat-controller":
|
|
692
|
+
"onUpdate:modelValue": i[6] || (i[6] = (e) => m.value = e),
|
|
693
|
+
"chat-controller": d.value,
|
|
694
694
|
"data-test": "agent-mode-sidebar"
|
|
695
695
|
}, null, 8, ["modelValue", "chat-controller"]))
|
|
696
696
|
]));
|