@8wave/ai-elements 0.121.0-beta.57 → 0.121.0-beta.59
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/README.md +16 -1
- package/dist/_chunks/Agent-FDL4Wq0B.js.map +1 -1
- package/dist/ai-elements.es.js +3039 -2713
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/Agent-CZUFbLo7.js.map +1 -1
- package/dist-vue/_chunks/PkAvatar-DwtZWSW4.js +38 -0
- package/dist-vue/_chunks/PkAvatar-DwtZWSW4.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-BjD_4yaD.js → PkChatbot-DtyJG8HB.js} +7 -8
- package/dist-vue/_chunks/PkChatbot-DtyJG8HB.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-CMNmmQdu.js → PkChatbotEmptyState-CivaIYxu.js} +2 -3
- package/dist-vue/_chunks/PkChatbotEmptyState-CivaIYxu.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotInput-CdpjDIzr.js → PkChatbotInput-mBl1PWIU.js} +88 -88
- package/dist-vue/_chunks/PkChatbotInput-mBl1PWIU.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-BqFY0Evp.js → PkChatbotViewChat-ZOpF5REL.js} +248 -243
- package/dist-vue/_chunks/PkChatbotViewChat-ZOpF5REL.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-DF_c4X6k.js → PkChatbotViewConversations-THKK5wGp.js} +52 -34
- package/dist-vue/_chunks/PkChatbotViewConversations-THKK5wGp.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewFiles-B76IwGGP.js → PkChatbotViewFiles-BOGd3r0o.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-B76IwGGP.js.map → PkChatbotViewFiles-BOGd3r0o.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-Bt0eH8fO.js → PkChatbotViewProfile-XtL9RfC7.js} +3 -4
- package/dist-vue/_chunks/PkChatbotViewProfile-XtL9RfC7.js.map +1 -0
- package/dist-vue/_chunks/{createChatbotApiClient-BYGLKd_e.js → createChatbotApiClient-Bt387Z64.js} +6 -5
- package/dist-vue/_chunks/createChatbotApiClient-Bt387Z64.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-O0u7mVit.js → useChatbotStore-pnj_3y4N.js} +718 -687
- package/dist-vue/_chunks/useChatbotStore-pnj_3y4N.js.map +1 -0
- package/dist-vue/_chunks/useDialogConfirm-fn7iV-iE.js +86 -0
- package/dist-vue/_chunks/useDialogConfirm-fn7iV-iE.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +4 -4
- package/dist-vue/apps/web-component/src/composables/usePagePresence.d.ts +17 -0
- package/dist-vue/apps/web-component/src/composables/usePageTools.d.ts +4 -3
- package/dist-vue/apps/web-component/src/pageTools/index.d.ts +11 -1
- package/dist-vue/composables.js +14 -6
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +4252 -4009
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +24 -14
- package/dist-vue/packages/components/src/chat/PkAgentPresence.d.ts +34 -0
- package/dist-vue/packages/components/src/chat/PkAvatar.d.ts +6 -7
- package/dist-vue/packages/components/src/chat/PkChatSearchDialog.d.ts +19 -0
- package/dist-vue/packages/components/src/chat/{PkAgentSelectorInline.d.ts → PkChatShortcutsDialog.d.ts} +8 -5
- package/dist-vue/packages/components/src/chat/PkChatSidebar.d.ts +7 -8
- package/dist-vue/packages/components/src/chat/PkChatSidebarConversationItem.d.ts +2 -2
- package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +4 -1
- package/dist-vue/packages/components/src/chat/PkWorkingAurora.d.ts +25 -0
- package/dist-vue/packages/components/src/chat/index.d.ts +1 -2
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +11 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +21 -3
- package/dist-vue/packages/composable/src/chatbot/useConversationActions.d.ts +54 -1
- package/dist-vue/packages/models/src/schema/Chat.d.ts +1 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist-vue/_chunks/PkAvatar-uVRs_DD9.js +0 -43
- package/dist-vue/_chunks/PkAvatar-uVRs_DD9.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-BjD_4yaD.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotEmptyState-CMNmmQdu.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-CdpjDIzr.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-BqFY0Evp.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-DF_c4X6k.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewProfile-Bt0eH8fO.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-BYGLKd_e.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-O0u7mVit.js.map +0 -1
- package/dist-vue/_chunks/useDialogConfirm-CyD9VTKg.js +0 -84
- package/dist-vue/_chunks/useDialogConfirm-CyD9VTKg.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { t as e } from "./PkChatbotMessages-ozG-o8mm.js";
|
|
2
2
|
import { o as t } from "./Media-DylqhvaF.js";
|
|
3
|
-
import { a as n, n as r, t as i } from "./useChatbotStore-
|
|
3
|
+
import { a as n, n as r, t as i } from "./useChatbotStore-pnj_3y4N.js";
|
|
4
4
|
import { n as a } from "./src-B-ZKEhTU.js";
|
|
5
5
|
import { c as o, h as s, n as c } from "./utils-CqPytB2D.js";
|
|
6
6
|
import { t as l } from "./useLocalizedString-Dmn92nix.js";
|
|
7
|
-
import { t as u } from "./PkAvatar-
|
|
8
|
-
import { n as d, t as f } from "./PkChatbotInput-
|
|
7
|
+
import { t as u } from "./PkAvatar-DwtZWSW4.js";
|
|
8
|
+
import { n as d, t as f } from "./PkChatbotInput-mBl1PWIU.js";
|
|
9
9
|
import { t as p } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
|
|
10
|
-
import { t as ee } from "./PkChatbotEmptyState-
|
|
10
|
+
import { t as ee } from "./PkChatbotEmptyState-CivaIYxu.js";
|
|
11
11
|
import { t as m } from "./PkChatbotWakeupBar-DEP-d-Fp.js";
|
|
12
12
|
import { VvIcon as h } from "@volverjs/ui-vue/components";
|
|
13
|
-
import { Fragment as g, Transition as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as te, createTextVNode as ne, createVNode as C, defineAsyncComponent as w, defineComponent as T, isRef as re, nextTick as ie, normalizeClass as E, onBeforeUnmount as
|
|
13
|
+
import { Fragment as g, Transition as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as te, createTextVNode as ne, createVNode as C, defineAsyncComponent as w, defineComponent as T, isRef as re, nextTick as ie, normalizeClass as E, onBeforeUnmount as ae, onMounted as oe, onScopeDispose as se, onUnmounted as ce, openBlock as D, provide as le, ref as O, renderList as ue, shallowRef as k, toDisplayString as A, toValue as de, unref as j, useTemplateRef as M, watch as N, withCtx as P } from "vue";
|
|
14
14
|
import { useI18n as fe } from "vue-i18n";
|
|
15
15
|
import { useDropZone as pe } from "@vueuse/core";
|
|
16
16
|
import { storeToRefs as me } from "pinia";
|
|
17
17
|
// ../../packages/composable/src/chatbot/useGreeting.ts
|
|
18
18
|
function he(e, t) {
|
|
19
19
|
let { locale: n, t: r, te: i } = fe({ useScope: "global" });
|
|
20
|
-
return v(() => F(
|
|
20
|
+
return v(() => F(de(e)?.greeting?.[0]?.[n.value] ?? "", de(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
|
|
21
21
|
}
|
|
22
22
|
function F(e, t) {
|
|
23
23
|
return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
|
|
@@ -33,7 +33,7 @@ var ge = {
|
|
|
33
33
|
__name: "PkAuroraCanvas",
|
|
34
34
|
props: { sourceSelector: {} },
|
|
35
35
|
setup(e) {
|
|
36
|
-
let t = e, n =
|
|
36
|
+
let t = e, n = M("canvasEl"), r = O(!1), i = null, a = 0, o = null, s = null, c = null, l = null, u = null, d = null, f = performance.now(), p = (e, t) => {
|
|
37
37
|
if (!i) return null;
|
|
38
38
|
let n = i.createShader(e);
|
|
39
39
|
return !n || (i.shaderSource(n, t), i.compileShader(n), !i.getShaderParameter(n, i.COMPILE_STATUS)) ? null : n;
|
|
@@ -62,7 +62,7 @@ var ge = {
|
|
|
62
62
|
}, _ = () => {
|
|
63
63
|
g(), a = requestAnimationFrame(_);
|
|
64
64
|
};
|
|
65
|
-
return
|
|
65
|
+
return oe(() => {
|
|
66
66
|
let e = n.value;
|
|
67
67
|
i = e?.getContext("webgl", { alpha: !0 }) ?? null;
|
|
68
68
|
let t = ee();
|
|
@@ -89,14 +89,14 @@ var ge = {
|
|
|
89
89
|
]), i.STATIC_DRAW);
|
|
90
90
|
let b = i.getAttribLocation(v, "a_position");
|
|
91
91
|
i.enableVertexAttribArray(b), i.vertexAttribPointer(b, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(v, "u_time"), c = i.getUniformLocation(v, "u_resolution"), l = i.getUniformLocation(v, "u_center"), u = i.getUniformLocation(v, "u_half"), d = i.getUniformLocation(v, "u_spread"), i.uniform3f(i.getUniformLocation(v, "u_color"), ...t), o = new ResizeObserver(m), o.observe(e), m(), ie(m), h() ? g(10) : _();
|
|
92
|
-
}),
|
|
92
|
+
}), ae(() => {
|
|
93
93
|
cancelAnimationFrame(a), o?.disconnect();
|
|
94
|
-
}),
|
|
94
|
+
}), ce(() => {
|
|
95
95
|
let e = i;
|
|
96
96
|
i = null, setTimeout(() => {
|
|
97
97
|
e?.getExtension("WEBGL_lose_context")?.loseContext();
|
|
98
98
|
}, 150);
|
|
99
|
-
}), (e, t) => (
|
|
99
|
+
}), (e, t) => (D(), x("div", ge, [r.value ? (D(), x("div", I)) : (D(), x("canvas", {
|
|
100
100
|
key: 0,
|
|
101
101
|
ref_key: "canvasEl",
|
|
102
102
|
ref: n,
|
|
@@ -115,7 +115,7 @@ var ge = {
|
|
|
115
115
|
bars: { default: 5 }
|
|
116
116
|
},
|
|
117
117
|
setup(e) {
|
|
118
|
-
let t = e, n =
|
|
118
|
+
let t = e, n = M("barsEl"), r = Array.from({ length: t.bars }, () => R), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
|
|
119
119
|
let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
|
|
120
120
|
if (!n?.length) {
|
|
121
121
|
let t = Date.now() / 260;
|
|
@@ -143,14 +143,14 @@ var ge = {
|
|
|
143
143
|
};
|
|
144
144
|
return N(() => t.state, async (e) => {
|
|
145
145
|
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => R * 1.6), await ie(), s()) : i === void 0 && (i = requestAnimationFrame(c));
|
|
146
|
-
}, { immediate: !0 }),
|
|
146
|
+
}, { immediate: !0 }), ae(l), (t, r) => (D(), x("div", {
|
|
147
147
|
class: E(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
|
|
148
148
|
"aria-hidden": "true"
|
|
149
149
|
}, [S("div", {
|
|
150
150
|
ref_key: "barsEl",
|
|
151
151
|
ref: n,
|
|
152
152
|
class: "pk-voice-orb__bars"
|
|
153
|
-
}, [(
|
|
153
|
+
}, [(D(!0), x(g, null, ue(e.bars, (e) => (D(), x("span", {
|
|
154
154
|
key: e,
|
|
155
155
|
class: "pk-voice-orb__bar"
|
|
156
156
|
}))), 128))], 512)], 2));
|
|
@@ -194,8 +194,8 @@ var ge = {
|
|
|
194
194
|
});
|
|
195
195
|
return (t, n) => {
|
|
196
196
|
let u = h;
|
|
197
|
-
return
|
|
198
|
-
e.error ? (
|
|
197
|
+
return D(), x("div", { class: E(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
|
|
198
|
+
e.error ? (D(), x("span", xe, [C(u, { name: "ri:error-warning-line" })])) : (D(), y(be, {
|
|
199
199
|
key: 1,
|
|
200
200
|
state: e.state,
|
|
201
201
|
sample: e.sample,
|
|
@@ -205,37 +205,37 @@ var ge = {
|
|
|
205
205
|
"sample",
|
|
206
206
|
"spectrum"
|
|
207
207
|
])),
|
|
208
|
-
S("div", z, [S("span", { class: E(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (
|
|
208
|
+
S("div", z, [S("span", { class: E(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (D(), x("span", B)) : b("", !0), ne(" " + A(a.value), 1)], 2), e.error ? (D(), x("p", {
|
|
209
209
|
key: 0,
|
|
210
210
|
class: "pk-voice-session__detail",
|
|
211
211
|
title: e.rawError ?? e.error
|
|
212
|
-
},
|
|
213
|
-
o.value ? (
|
|
212
|
+
}, A(e.error), 9, Se)) : b("", !0)]),
|
|
213
|
+
o.value ? (D(), x("span", {
|
|
214
214
|
key: 2,
|
|
215
215
|
class: E(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
|
|
216
|
-
title:
|
|
216
|
+
title: j(i)("hint.voiceRemaining"),
|
|
217
217
|
"aria-hidden": "true"
|
|
218
|
-
},
|
|
219
|
-
S("div", we, [e.error ? (
|
|
218
|
+
}, A(o.value), 11, Ce)) : b("", !0),
|
|
219
|
+
S("div", we, [e.error ? (D(), x(g, { key: 0 }, [C(d, {
|
|
220
220
|
icon: "ri:refresh-line",
|
|
221
|
-
label:
|
|
221
|
+
label: j(i)("action.retry"),
|
|
222
222
|
onClick: n[0] ||= (e) => r("retry")
|
|
223
|
-
}, null, 8, ["label"]), e.live ? (
|
|
223
|
+
}, null, 8, ["label"]), e.live ? (D(), y(d, {
|
|
224
224
|
key: 0,
|
|
225
225
|
icon: "ri:stop-circle-line",
|
|
226
226
|
modifiers: "danger",
|
|
227
|
-
title:
|
|
228
|
-
"aria-label":
|
|
227
|
+
title: j(i)("action.hangUp"),
|
|
228
|
+
"aria-label": j(i)("action.hangUp"),
|
|
229
229
|
onClick: n[1] ||= (e) => r("hang-up")
|
|
230
|
-
}, null, 8, ["title", "aria-label"])) : (
|
|
230
|
+
}, null, 8, ["title", "aria-label"])) : (D(), y(d, {
|
|
231
231
|
key: 1,
|
|
232
232
|
icon: "ri:close-line",
|
|
233
|
-
label:
|
|
233
|
+
label: j(i)("action.close"),
|
|
234
234
|
onClick: n[2] ||= (e) => r("dismiss")
|
|
235
|
-
}, null, 8, ["label"]))], 64)) : (
|
|
235
|
+
}, null, 8, ["label"]))], 64)) : (D(), x(g, { key: 1 }, [C(d, {
|
|
236
236
|
icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
|
|
237
|
-
title: e.muted ?
|
|
238
|
-
"aria-label": e.muted ?
|
|
237
|
+
title: e.muted ? j(i)("action.unmute") : j(i)("action.mute"),
|
|
238
|
+
"aria-label": e.muted ? j(i)("action.unmute") : j(i)("action.mute"),
|
|
239
239
|
"aria-pressed": e.muted,
|
|
240
240
|
onClick: n[3] ||= (e) => r("toggle-mute")
|
|
241
241
|
}, null, 8, [
|
|
@@ -246,15 +246,15 @@ var ge = {
|
|
|
246
246
|
]), C(d, {
|
|
247
247
|
icon: "ri:stop-circle-line",
|
|
248
248
|
modifiers: "danger",
|
|
249
|
-
title:
|
|
250
|
-
"aria-label":
|
|
249
|
+
title: j(i)("action.hangUp"),
|
|
250
|
+
"aria-label": j(i)("action.hangUp"),
|
|
251
251
|
onClick: n[4] ||= (e) => r("hang-up")
|
|
252
252
|
}, null, 8, ["title", "aria-label"])], 64))])
|
|
253
253
|
], 2);
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
256
|
}), Ee = (e) => {
|
|
257
|
-
let t =
|
|
257
|
+
let t = k(), n = O("disconnected"), r = O("listening"), i = O(), o = O([]), s = O(), c = O(), l, u, d = 0, f = !1, p = () => {
|
|
258
258
|
u &&= (clearInterval(u), void 0), s.value = void 0;
|
|
259
259
|
}, ee = (e) => {
|
|
260
260
|
let t = Date.now() + e * 1e3, n = () => {
|
|
@@ -356,7 +356,7 @@ var ge = {
|
|
|
356
356
|
let r = t.value;
|
|
357
357
|
t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
|
|
358
358
|
};
|
|
359
|
-
return typeof window < "u" && window.addEventListener("pagehide", te),
|
|
359
|
+
return typeof window < "u" && window.addEventListener("pagehide", te), se(() => {
|
|
360
360
|
f = !0, typeof window < "u" && window.removeEventListener("pagehide", te), h();
|
|
361
361
|
}), {
|
|
362
362
|
status: n,
|
|
@@ -383,7 +383,7 @@ var ge = {
|
|
|
383
383
|
1e4
|
|
384
384
|
], ke = 12e4, Ae = 3e4;
|
|
385
385
|
function je(e) {
|
|
386
|
-
let t =
|
|
386
|
+
let t = O(null), n = O(!1), r, i = !1, a = () => {
|
|
387
387
|
clearTimeout(r), r = void 0;
|
|
388
388
|
}, o = (e, t) => {
|
|
389
389
|
a(), i || (r = setTimeout(() => void t(), e));
|
|
@@ -444,7 +444,7 @@ function je(e) {
|
|
|
444
444
|
let y = () => _();
|
|
445
445
|
return document.addEventListener("visibilitychange", y), N(() => t.value?.wakeId, (e) => {
|
|
446
446
|
clearInterval(g), g = void 0, e && !i && (_(), g = setInterval(_, Ae));
|
|
447
|
-
}),
|
|
447
|
+
}), ae(() => {
|
|
448
448
|
i = !0, a(), clearInterval(g), document.removeEventListener("visibilitychange", y);
|
|
449
449
|
}), {
|
|
450
450
|
pendingWakeup: t,
|
|
@@ -476,121 +476,125 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
476
476
|
},
|
|
477
477
|
emits: ["show-info", "revise"],
|
|
478
478
|
setup(a, { emit: d }) {
|
|
479
|
-
let g = w(() => import("./PkToolShowForm-CblYA_3B.js").then((e) => e.n)), ne = w(() => import("./PkToolShowContactForm-B3uOHhnG.js").then((e) => e.n)), T = w(() => import("./PkToolShowSuggestedReply-CQgkPMgE.js").then((e) => e.n)), ie = w(() => import("./PkToolShowSources-Ci8ssht-.js").then((e) => e.n)),
|
|
480
|
-
|
|
481
|
-
let
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
})
|
|
479
|
+
let g = w(() => import("./PkToolShowForm-CblYA_3B.js").then((e) => e.n)), ne = w(() => import("./PkToolShowContactForm-B3uOHhnG.js").then((e) => e.n)), T = w(() => import("./PkToolShowSuggestedReply-CQgkPMgE.js").then((e) => e.n)), ie = w(() => import("./PkToolShowSources-Ci8ssht-.js").then((e) => e.n)), oe = w(() => import("./PkToolRequestGeolocation-DXHDyI5N.js")), se = w(() => import("./PkToolRequestOAuthConnection-D5hBaUNG.js")), ce = w(() => import("./PkToolShowLocation-Cq0IXye1.js").then((e) => e.n)), ue = w(() => import("./PkToolShowDiagram-CHLApsxe.js")), k = w(() => import("./PkToolChatFile-CVRYORvL.js")), de = w(() => import("./PkToolShareDocument-CRghPfep.js").then((e) => e.n)), F = a, ge = d, I = r(F.agentId), { agentInterface: L, agentFileUpload: _e, agentType: R, agentVoice: ye, actions: be, revisedAnswers: xe, messages: z, chat: B, messageFeedbacks: Se, feedbackDialogMessage: Ce, isFeedbackSubmitting: we, isFeedbackSubmitted: De, feedbackSubmitError: Oe, isLeadSubmitted: ke, isLoadingSubmitLead: Ae, submitLeadError: Ve, input: He, inputMessagePlaceholder: Ue, isConversationBlocked: We, baseUrl: Ge, pendingAttachments: Ke, isAttachmentLimitReached: qe, fileLimitError: Je, apiClient: V, isDark: Ye, hostToolsPending: Xe, pageNoticeLevel: Ze, hostConfirmation: Qe, agentPageAccess: $e, hostStepTitles: et, canQueue: tt, queuedMessages: nt, backgroundAnswers: rt, inputFocusRequest: it } = me(I);
|
|
480
|
+
le(c, et);
|
|
481
|
+
let at = M("inputEl");
|
|
482
|
+
N(it, () => {
|
|
483
|
+
at.value?.focus();
|
|
484
|
+
});
|
|
485
|
+
let H = v(() => R.value === "reasoning" ? void 0 : _e.value), U = (e) => V.value.getMediaDownloadUrl(F.agentId, I.localChatId, e), { handleSubmit: ot, stopGeneration: st, regenerate: ct, onUpvote: lt, onDownvote: ut, onFeedback: dt, onFeedbackSubmit: ft, onLeadSubmit: pt, startNewChat: mt, addToolOutput: W, addToolApprovalResponse: ht, handleFileSelect: gt, clearFileLimitError: _t, refreshMessages: vt, appendMessage: yt, closePageNotice: bt, respondHostConfirmation: xt, editQueuedMessage: St, removeQueuedMessage: Ct, openBackgroundAnswer: wt, dismissBackgroundAnswer: Tt } = I, { t: G } = fe({ useScope: "global" }), Et = v(() => Xe.value > 0), Dt = v(() => Et.value && B.value.status === "ready" ? "streaming" : B.value.status), Ot = l(() => $e.value?.notice), kt = v(() => Ze.value ? Ot.value || G(`message.pageAccessNotice.${Ze.value}`) : void 0), At = v(() => {
|
|
486
|
+
let e = Je.value;
|
|
487
|
+
if (e) return e.reason === "per-chat" ? G("message.fileLimitPerChat", { max: e.max }) : G("message.fileLimitPerMessage", { max: e.max });
|
|
488
|
+
}), jt = v(() => rt.value.map(({ chatId: e, title: t }) => ({
|
|
485
489
|
id: e,
|
|
486
|
-
text: t ?
|
|
487
|
-
}))),
|
|
488
|
-
let t = await
|
|
490
|
+
text: t ? G("message.backgroundAnswerReady", { title: t }) : G("message.backgroundAnswerReadyUntitled")
|
|
491
|
+
}))), Mt = l(() => L.value?.dismissableNotice), Nt = v(() => z.value.some((e) => e.role === "user")), Pt = v(() => F.modifier === "fullscreen" && !Nt.value), Ft = he(L, () => F.userName), It = M("chatViewEl"), Lt = async (e) => (await V.value.expandSourceContext(F.agentId, e.documentId, e.chunkIndex)).content, Rt = async (e) => {
|
|
492
|
+
let t = await V.value.downloadSourceDocument(F.agentId, e);
|
|
489
493
|
window.open(t.downloadUrl, "_blank");
|
|
490
|
-
}, { isOverDropZone:
|
|
491
|
-
dataTypes: (e) => t(e,
|
|
494
|
+
}, { isOverDropZone: zt } = pe(It, {
|
|
495
|
+
dataTypes: (e) => t(e, H.value?.allowedMimeTypes ?? []),
|
|
492
496
|
onDrop: (e) => {
|
|
493
|
-
if (
|
|
497
|
+
if (H.value?.enabled && e) for (let t of e) gt(t);
|
|
494
498
|
}
|
|
495
|
-
}),
|
|
499
|
+
}), K = O(!1), q = !1, J = O(!1), Bt = [
|
|
496
500
|
3e3,
|
|
497
501
|
5e3,
|
|
498
502
|
1e4
|
|
499
|
-
],
|
|
500
|
-
function
|
|
501
|
-
clearTimeout(
|
|
503
|
+
], Y, X, Vt = !1, Ht = 0, Ut = !1;
|
|
504
|
+
function Wt() {
|
|
505
|
+
clearTimeout(Y), Y = void 0, X = void 0, Vt = !1, Ht = 0, J.value = !1;
|
|
502
506
|
}
|
|
503
|
-
function
|
|
504
|
-
|
|
505
|
-
|
|
507
|
+
function Gt(e) {
|
|
508
|
+
q || (clearTimeout(Y), Y = setTimeout(() => {
|
|
509
|
+
Kt();
|
|
506
510
|
}, e));
|
|
507
511
|
}
|
|
508
|
-
async function
|
|
509
|
-
if (
|
|
510
|
-
|
|
512
|
+
async function Kt() {
|
|
513
|
+
if (q || Ut) return;
|
|
514
|
+
Ut = !0;
|
|
511
515
|
let e;
|
|
512
516
|
try {
|
|
513
|
-
e = await
|
|
517
|
+
e = await vt();
|
|
514
518
|
} finally {
|
|
515
|
-
|
|
519
|
+
Ut = !1;
|
|
516
520
|
}
|
|
517
|
-
if (
|
|
518
|
-
if (e === "caught-up" && (
|
|
519
|
-
X = void 0,
|
|
521
|
+
if (q) return;
|
|
522
|
+
if (e === "caught-up" && (J.value = !1, vn()), Z.isActive.value) {
|
|
523
|
+
X = void 0, Vt = !1, Ht = 0, Gt(Le);
|
|
520
524
|
return;
|
|
521
525
|
}
|
|
522
|
-
X === void 0 && (X = Date.now(),
|
|
526
|
+
X === void 0 && (X = Date.now(), Vt = !!Z.error.value);
|
|
523
527
|
let t = Date.now() - X;
|
|
524
|
-
if (e === "caught-up" && t >= (
|
|
525
|
-
|
|
528
|
+
if (e === "caught-up" && t >= (Vt ? ze : Re) || t >= Be) {
|
|
529
|
+
Wt(), yn();
|
|
526
530
|
return;
|
|
527
531
|
}
|
|
528
|
-
let n =
|
|
529
|
-
|
|
532
|
+
let n = Bt[Math.min(Ht, Bt.length - 1)];
|
|
533
|
+
Ht += 1, Gt(n);
|
|
530
534
|
}
|
|
531
|
-
let
|
|
532
|
-
|
|
535
|
+
let qt = (e = 1200) => {
|
|
536
|
+
Gt(e);
|
|
533
537
|
}, Z = Ee({
|
|
534
538
|
fetchGrant: async () => {
|
|
535
|
-
let e = await
|
|
539
|
+
let e = await V.value.createVoiceSession(F.agentId, I.localChatId, {
|
|
536
540
|
deviceContext: I.buildDeviceContext(),
|
|
537
541
|
externalContext: I.externalContext
|
|
538
542
|
});
|
|
539
543
|
return e.chatId !== I.localChatId && (I.localChatId = e.chatId), e;
|
|
540
544
|
},
|
|
541
|
-
closeGrant: (e) =>
|
|
545
|
+
closeGrant: (e) => V.value.closeVoiceSession(F.agentId, e),
|
|
542
546
|
onTranscript: (e) => {
|
|
543
|
-
e.role === "user" ? (
|
|
547
|
+
e.role === "user" ? (J.value = !0, _n(), yt({
|
|
544
548
|
id: `${i}user-${n()}`,
|
|
545
549
|
role: "user",
|
|
546
550
|
parts: [{
|
|
547
551
|
type: "text",
|
|
548
552
|
text: e.text
|
|
549
553
|
}]
|
|
550
|
-
})) :
|
|
554
|
+
})) : J.value = !1;
|
|
551
555
|
},
|
|
552
556
|
onTurnEnd: () => {
|
|
553
|
-
|
|
557
|
+
qt();
|
|
554
558
|
}
|
|
555
559
|
});
|
|
556
560
|
N(() => Z.error.value, (e) => {
|
|
557
|
-
e && (
|
|
561
|
+
e && (J.value = !1);
|
|
558
562
|
});
|
|
559
|
-
let
|
|
563
|
+
let Jt = v(() => ye.value?.enabled === !0), Yt = v(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), Xt = v(() => {
|
|
560
564
|
let e = Z.error.value;
|
|
561
|
-
if (e) return /took too long/i.test(e) ?
|
|
562
|
-
}),
|
|
563
|
-
|
|
564
|
-
}, $t = async () => {
|
|
565
|
-
Y.value = !1, await Z.stop(), !J && Gt(0);
|
|
566
|
-
}, en = () => {
|
|
567
|
-
Z.dismissError();
|
|
565
|
+
if (e) return /took too long/i.test(e) ? G("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? G("message.voiceNoAnswer") : G("message.voiceInterrupted");
|
|
566
|
+
}), Zt = v(() => Z.isSpeaking.value ? "output" : "input"), Qt = () => Z.readLevel(Zt.value), $t = () => Z.readSpectrum(Zt.value), en = async () => {
|
|
567
|
+
K.value = !1, await Z.start(), Z.isActive.value && (Wt(), Gt(Le));
|
|
568
568
|
}, tn = async () => {
|
|
569
|
-
|
|
570
|
-
},
|
|
571
|
-
|
|
569
|
+
J.value = !1, await Z.stop(), !q && qt(0);
|
|
570
|
+
}, nn = () => {
|
|
571
|
+
Z.dismissError();
|
|
572
|
+
}, rn = async () => {
|
|
573
|
+
Z.dismissError(), await Z.stop(), await en();
|
|
574
|
+
}, Q = (e) => e?.toolCallId ?? "", an = O(/* @__PURE__ */ new Set()), on = (e) => an.value.has(Q(e)), sn = O(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (an.value = new Set(an.value).add(Q(e)), qt()), !0) : !1, cn = (e, t, n) => {
|
|
575
|
+
$(t, o(t, n)) || W({
|
|
572
576
|
tool: e,
|
|
573
577
|
toolCallId: Q(t),
|
|
574
578
|
output: n
|
|
575
579
|
});
|
|
576
|
-
},
|
|
577
|
-
let t = e.confirmed ?
|
|
578
|
-
$({ toolCallId: e.toolCallId }, t) ?
|
|
580
|
+
}, ln = (e) => {
|
|
581
|
+
let t = e.confirmed ? G("message.voiceConfirmed") : G("message.voiceCancelled");
|
|
582
|
+
$({ toolCallId: e.toolCallId }, t) ? an.value.has(e.toolCallId) && (sn.value = new Map(sn.value).set(e.toolCallId, e.confirmed)) : W({
|
|
579
583
|
tool: "requestConfirm",
|
|
580
584
|
toolCallId: e.toolCallId,
|
|
581
585
|
output: e.confirmed ? "confirmed" : "cancelled"
|
|
582
586
|
});
|
|
583
|
-
},
|
|
584
|
-
$(e, t) || (
|
|
585
|
-
},
|
|
586
|
-
let n = t.error ?
|
|
587
|
-
$(e, n) ||
|
|
587
|
+
}, un = (e, t) => {
|
|
588
|
+
$(e, t) || (He.value = t, ot());
|
|
589
|
+
}, dn = (e, t) => {
|
|
590
|
+
let n = t.error ? G("message.voiceLocationRefused") : G("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
|
|
591
|
+
$(e, n) || W({
|
|
588
592
|
tool: "requestGeolocation",
|
|
589
593
|
toolCallId: Q(e),
|
|
590
594
|
output: t
|
|
591
595
|
});
|
|
592
|
-
},
|
|
593
|
-
$(e,
|
|
596
|
+
}, fn = (e, t) => {
|
|
597
|
+
$(e, G("message.voiceConnectionDone")) || W({
|
|
594
598
|
tool: "requestOAuthConnection",
|
|
595
599
|
toolCallId: Q(e),
|
|
596
600
|
output: {
|
|
@@ -598,88 +602,88 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
598
602
|
mcpServerId: t
|
|
599
603
|
}
|
|
600
604
|
});
|
|
601
|
-
},
|
|
602
|
-
|
|
605
|
+
}, pn = () => {
|
|
606
|
+
K.value = !K.value, Z.setMuted(K.value);
|
|
603
607
|
};
|
|
604
|
-
|
|
605
|
-
|
|
608
|
+
ae(() => {
|
|
609
|
+
q = !0, Wt();
|
|
606
610
|
});
|
|
607
|
-
let { pendingWakeup:
|
|
611
|
+
let { pendingWakeup: mn, isStopping: hn, stop: gn, spokenTurnStarted: _n, spokenTurnsWritten: vn, forgetSpokenTurns: yn } = je({
|
|
608
612
|
agentId: () => F.agentId,
|
|
609
613
|
chatId: () => I.localChatId,
|
|
610
|
-
apiClient: () =>
|
|
614
|
+
apiClient: () => V.value,
|
|
611
615
|
messages: () => z.value,
|
|
612
|
-
refreshMessages:
|
|
616
|
+
refreshMessages: vt,
|
|
613
617
|
status: () => B.value.status
|
|
614
618
|
});
|
|
615
619
|
return (t, n) => {
|
|
616
620
|
let r = h;
|
|
617
|
-
return
|
|
621
|
+
return D(), x("div", {
|
|
618
622
|
ref_key: "chatViewEl",
|
|
619
|
-
ref:
|
|
623
|
+
ref: It,
|
|
620
624
|
class: E(["pk-chatbot-view-chat", {
|
|
621
|
-
"pk-chatbot-view-chat--dragover":
|
|
622
|
-
"pk-chatbot-view-chat--empty":
|
|
625
|
+
"pk-chatbot-view-chat--dragover": j(zt) && H.value?.enabled,
|
|
626
|
+
"pk-chatbot-view-chat--empty": Pt.value
|
|
623
627
|
}])
|
|
624
628
|
}, [
|
|
625
629
|
C(_, {
|
|
626
630
|
name: "pk-chatbot-view-chat-fade",
|
|
627
631
|
mode: "out-in"
|
|
628
632
|
}, {
|
|
629
|
-
default: P(() => [
|
|
633
|
+
default: P(() => [Pt.value ? (D(), y(ee, {
|
|
630
634
|
key: 0,
|
|
631
|
-
greeting:
|
|
632
|
-
logo:
|
|
633
|
-
name:
|
|
635
|
+
greeting: j(Ft),
|
|
636
|
+
logo: j(L)?.logo,
|
|
637
|
+
name: j(I).name
|
|
634
638
|
}, null, 8, [
|
|
635
639
|
"greeting",
|
|
636
640
|
"logo",
|
|
637
641
|
"name"
|
|
638
|
-
])) : (
|
|
642
|
+
])) : (D(), y(e, {
|
|
639
643
|
key: 1,
|
|
640
644
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
641
645
|
interactive: "",
|
|
642
|
-
messages:
|
|
643
|
-
"confirm-verdicts-on-call":
|
|
644
|
-
status:
|
|
645
|
-
error:
|
|
646
|
-
"main-color":
|
|
647
|
-
"text-color":
|
|
648
|
-
"revised-answers":
|
|
649
|
-
actions:
|
|
650
|
-
"message-feedbacks":
|
|
651
|
-
"feedback-message-id":
|
|
652
|
-
"feedback-loading":
|
|
653
|
-
"feedback-submitted":
|
|
654
|
-
"feedback-error":
|
|
655
|
-
"show-extended-steps":
|
|
656
|
-
"awaiting-spoken-answer":
|
|
657
|
-
"host-working":
|
|
658
|
-
"host-confirmation":
|
|
659
|
-
"is-dark":
|
|
646
|
+
messages: j(z),
|
|
647
|
+
"confirm-verdicts-on-call": sn.value,
|
|
648
|
+
status: j(B).status,
|
|
649
|
+
error: j(B).error,
|
|
650
|
+
"main-color": j(L)?.mainColor,
|
|
651
|
+
"text-color": j(L)?.textColor,
|
|
652
|
+
"revised-answers": j(xe),
|
|
653
|
+
actions: j(be),
|
|
654
|
+
"message-feedbacks": j(Se),
|
|
655
|
+
"feedback-message-id": j(Ce)?.id,
|
|
656
|
+
"feedback-loading": j(we),
|
|
657
|
+
"feedback-submitted": j(De),
|
|
658
|
+
"feedback-error": j(Oe),
|
|
659
|
+
"show-extended-steps": j(L)?.showExtendedSteps,
|
|
660
|
+
"awaiting-spoken-answer": J.value,
|
|
661
|
+
"host-working": Et.value,
|
|
662
|
+
"host-confirmation": j(Qe),
|
|
663
|
+
"is-dark": j(Ye),
|
|
660
664
|
"show-scroll-to-bottom": a.modifier === "fullscreen",
|
|
661
|
-
onFeedbackSubmit: n[0] ||= (e) =>
|
|
665
|
+
onFeedbackSubmit: n[0] ||= (e) => j(ft)(e),
|
|
662
666
|
onFeedbackClose: n[1] ||= (e) => Ce.value = void 0,
|
|
663
|
-
onRegenerate:
|
|
664
|
-
onAutoRetry:
|
|
665
|
-
onResetChat:
|
|
667
|
+
onRegenerate: j(ct),
|
|
668
|
+
onAutoRetry: j(ct),
|
|
669
|
+
onResetChat: j(mt),
|
|
666
670
|
onShowInfo: n[2] ||= (e) => ge("show-info", e),
|
|
667
671
|
onRevise: n[3] ||= (e) => ge("revise", e),
|
|
668
|
-
onUpvote:
|
|
669
|
-
onDownvote:
|
|
670
|
-
onFeedback:
|
|
671
|
-
onApprovalRespond:
|
|
672
|
-
onConfirmRespond:
|
|
673
|
-
onHostConfirmRespond:
|
|
672
|
+
onUpvote: j(lt),
|
|
673
|
+
onDownvote: j(ut),
|
|
674
|
+
onFeedback: j(dt),
|
|
675
|
+
onApprovalRespond: j(ht),
|
|
676
|
+
onConfirmRespond: ln,
|
|
677
|
+
onHostConfirmRespond: j(xt)
|
|
674
678
|
}, {
|
|
675
|
-
"tool-showContactForm": P(({ part: e }) => [C(
|
|
679
|
+
"tool-showContactForm": P(({ part: e }) => [C(j(ne), {
|
|
676
680
|
part: e,
|
|
677
|
-
readonly: !
|
|
678
|
-
submitted:
|
|
679
|
-
loading:
|
|
680
|
-
error:
|
|
681
|
-
"privacy-policy-notice":
|
|
682
|
-
onSubmit:
|
|
681
|
+
readonly: !j(Ge),
|
|
682
|
+
submitted: j(ke),
|
|
683
|
+
loading: j(Ae),
|
|
684
|
+
error: j(Ve),
|
|
685
|
+
"privacy-policy-notice": j(L)?.privacyPolicyNotice,
|
|
686
|
+
onSubmit: j(pt)
|
|
683
687
|
}, null, 8, [
|
|
684
688
|
"part",
|
|
685
689
|
"readonly",
|
|
@@ -689,20 +693,20 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
689
693
|
"privacy-policy-notice",
|
|
690
694
|
"onSubmit"
|
|
691
695
|
])]),
|
|
692
|
-
"tool-showSuggestedReply": P(({ part: e }) => [C(
|
|
696
|
+
"tool-showSuggestedReply": P(({ part: e }) => [C(j(T), {
|
|
693
697
|
part: e,
|
|
694
|
-
onSelect: (t) =>
|
|
698
|
+
onSelect: (t) => un(e, t)
|
|
695
699
|
}, null, 8, ["part", "onSelect"])]),
|
|
696
|
-
"tool-showSources": P(({ part: e }) => [C(
|
|
700
|
+
"tool-showSources": P(({ part: e }) => [C(j(ie), {
|
|
697
701
|
part: e,
|
|
698
|
-
"on-expand-context":
|
|
699
|
-
"on-download":
|
|
702
|
+
"on-expand-context": Lt,
|
|
703
|
+
"on-download": Rt
|
|
700
704
|
}, null, 8, ["part"])]),
|
|
701
705
|
"tool-showForm": P(({ part: e }) => [C(_, { mode: "out-in" }, {
|
|
702
|
-
default: P(() => [C(
|
|
706
|
+
default: P(() => [C(j(g), {
|
|
703
707
|
part: e,
|
|
704
|
-
answered:
|
|
705
|
-
onSelect: (t) =>
|
|
708
|
+
answered: on(e),
|
|
709
|
+
onSelect: (t) => cn("showForm", e, t)
|
|
706
710
|
}, null, 8, [
|
|
707
711
|
"part",
|
|
708
712
|
"answered",
|
|
@@ -711,11 +715,11 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
711
715
|
_: 2
|
|
712
716
|
}, 1024)]),
|
|
713
717
|
"tool-showMultipleChoice": P(({ part: e }) => [C(_, { mode: "out-in" }, {
|
|
714
|
-
default: P(() => [C(
|
|
718
|
+
default: P(() => [C(j(g), {
|
|
715
719
|
part: e,
|
|
716
720
|
"allow-custom-answer": "",
|
|
717
|
-
answered:
|
|
718
|
-
onSelect: (t) =>
|
|
721
|
+
answered: on(e),
|
|
722
|
+
onSelect: (t) => cn("showMultipleChoice", e, t)
|
|
719
723
|
}, null, 8, [
|
|
720
724
|
"part",
|
|
721
725
|
"answered",
|
|
@@ -723,12 +727,12 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
723
727
|
])]),
|
|
724
728
|
_: 2
|
|
725
729
|
}, 1024)]),
|
|
726
|
-
"tool-requestOAuthConnection": P(({ part: e }) => [C(
|
|
730
|
+
"tool-requestOAuthConnection": P(({ part: e }) => [C(j(se), {
|
|
727
731
|
part: e,
|
|
728
|
-
"backend-url":
|
|
729
|
-
"resolve-connection": (e) =>
|
|
730
|
-
"check-connection": (e) =>
|
|
731
|
-
onConnected: (t) =>
|
|
732
|
+
"backend-url": j(Ge),
|
|
733
|
+
"resolve-connection": (e) => j(V).getOAuthAuthorizeUrl(F.agentId, e),
|
|
734
|
+
"check-connection": (e) => j(V).getOAuthConnectionStatus(F.agentId, e),
|
|
735
|
+
onConnected: (t) => fn(e, t)
|
|
732
736
|
}, null, 8, [
|
|
733
737
|
"part",
|
|
734
738
|
"backend-url",
|
|
@@ -736,66 +740,66 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
736
740
|
"check-connection",
|
|
737
741
|
"onConnected"
|
|
738
742
|
])]),
|
|
739
|
-
"tool-requestGeolocation": P(({ part: e }) => [C(
|
|
743
|
+
"tool-requestGeolocation": P(({ part: e }) => [C(j(oe), {
|
|
740
744
|
part: e,
|
|
741
|
-
"call-live":
|
|
742
|
-
"reverse-geocode": (e, t) =>
|
|
743
|
-
onResult: (t) =>
|
|
745
|
+
"call-live": j(Z).isActive.value,
|
|
746
|
+
"reverse-geocode": (e, t) => j(V).reverseGeocode(e, t),
|
|
747
|
+
onResult: (t) => dn(e, t)
|
|
744
748
|
}, null, 8, [
|
|
745
749
|
"part",
|
|
746
750
|
"call-live",
|
|
747
751
|
"reverse-geocode",
|
|
748
752
|
"onResult"
|
|
749
753
|
])]),
|
|
750
|
-
"tool-showLocation": P(({ part: e }) => [C(
|
|
754
|
+
"tool-showLocation": P(({ part: e }) => [C(j(ce), {
|
|
751
755
|
part: e,
|
|
752
|
-
"is-dark":
|
|
753
|
-
"main-color":
|
|
754
|
-
"forward-geocode": (e, t) =>
|
|
756
|
+
"is-dark": j(Ye),
|
|
757
|
+
"main-color": j(L)?.mainColor,
|
|
758
|
+
"forward-geocode": (e, t) => j(V).forwardGeocode(e, t)
|
|
755
759
|
}, null, 8, [
|
|
756
760
|
"part",
|
|
757
761
|
"is-dark",
|
|
758
762
|
"main-color",
|
|
759
763
|
"forward-geocode"
|
|
760
764
|
])]),
|
|
761
|
-
"tool-showDiagram": P(({ part: e }) => [C(
|
|
765
|
+
"tool-showDiagram": P(({ part: e }) => [C(j(ue), {
|
|
762
766
|
part: e,
|
|
763
|
-
"is-dark":
|
|
767
|
+
"is-dark": j(Ye)
|
|
764
768
|
}, null, 8, ["part", "is-dark"])]),
|
|
765
|
-
"tool-editSpreadsheet": P(({ part: e }) => [(
|
|
766
|
-
key:
|
|
769
|
+
"tool-editSpreadsheet": P(({ part: e }) => [(D(), y(j(k), {
|
|
770
|
+
key: j(s)(e),
|
|
767
771
|
part: e,
|
|
768
|
-
"file-url":
|
|
772
|
+
"file-url": U
|
|
769
773
|
}, null, 8, ["part"]))]),
|
|
770
|
-
"tool-editWordDocument": P(({ part: e }) => [(
|
|
771
|
-
key:
|
|
774
|
+
"tool-editWordDocument": P(({ part: e }) => [(D(), y(j(k), {
|
|
775
|
+
key: j(s)(e),
|
|
772
776
|
part: e,
|
|
773
|
-
"file-url":
|
|
777
|
+
"file-url": U
|
|
774
778
|
}, null, 8, ["part"]))]),
|
|
775
|
-
"tool-createSpreadsheet": P(({ part: e }) => [(
|
|
776
|
-
key:
|
|
779
|
+
"tool-createSpreadsheet": P(({ part: e }) => [(D(), y(j(k), {
|
|
780
|
+
key: j(s)(e),
|
|
777
781
|
part: e,
|
|
778
|
-
"file-url":
|
|
782
|
+
"file-url": U
|
|
779
783
|
}, null, 8, ["part"]))]),
|
|
780
|
-
"tool-createWordDocument": P(({ part: e }) => [(
|
|
781
|
-
key:
|
|
784
|
+
"tool-createWordDocument": P(({ part: e }) => [(D(), y(j(k), {
|
|
785
|
+
key: j(s)(e),
|
|
782
786
|
part: e,
|
|
783
|
-
"file-url":
|
|
787
|
+
"file-url": U
|
|
784
788
|
}, null, 8, ["part"]))]),
|
|
785
|
-
"tool-shareDocument": P(({ part: e }) => [(
|
|
786
|
-
key:
|
|
789
|
+
"tool-shareDocument": P(({ part: e }) => [(D(), y(j(de), {
|
|
790
|
+
key: j(s)(e),
|
|
787
791
|
part: e,
|
|
788
|
-
"on-download":
|
|
792
|
+
"on-download": Rt
|
|
789
793
|
}, null, 8, ["part"]))]),
|
|
790
794
|
_: 1
|
|
791
795
|
}, 8, /* @__PURE__ */ "messages.confirm-verdicts-on-call.status.error.main-color.text-color.revised-answers.actions.message-feedbacks.feedback-message-id.feedback-loading.feedback-submitted.feedback-error.show-extended-steps.awaiting-spoken-answer.host-working.host-confirmation.is-dark.show-scroll-to-bottom.onRegenerate.onAutoRetry.onResetChat.onUpvote.onDownvote.onFeedback.onApprovalRespond.onHostConfirmRespond".split(".")))]),
|
|
792
796
|
_: 1
|
|
793
797
|
}),
|
|
794
|
-
|
|
798
|
+
j(nt).length ? (D(), y(p, {
|
|
795
799
|
key: 0,
|
|
796
|
-
messages:
|
|
797
|
-
onEdit:
|
|
798
|
-
onRemove:
|
|
800
|
+
messages: j(nt),
|
|
801
|
+
onEdit: j(St),
|
|
802
|
+
onRemove: j(Ct)
|
|
799
803
|
}, null, 8, [
|
|
800
804
|
"messages",
|
|
801
805
|
"onEdit",
|
|
@@ -803,56 +807,57 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
803
807
|
])) : b("", !0),
|
|
804
808
|
S("div", Me, [
|
|
805
809
|
C(_, { name: "pk-chatbot-view-chat-fade" }, {
|
|
806
|
-
default: P(() => [
|
|
810
|
+
default: P(() => [Pt.value ? (D(), y(ve, {
|
|
807
811
|
key: 0,
|
|
808
812
|
class: "pk-chatbot-view-chat__aurora",
|
|
809
813
|
"source-selector": ".pk-chatbot-input__form"
|
|
810
814
|
})) : b("", !0)]),
|
|
811
815
|
_: 1
|
|
812
816
|
}),
|
|
813
|
-
|
|
817
|
+
j(mn) && !j(We) ? (D(), y(m, {
|
|
814
818
|
key: 0,
|
|
815
|
-
pending:
|
|
816
|
-
stopping:
|
|
817
|
-
onStop:
|
|
819
|
+
pending: j(mn),
|
|
820
|
+
stopping: j(hn),
|
|
821
|
+
onStop: j(gn)
|
|
818
822
|
}, null, 8, [
|
|
819
823
|
"pending",
|
|
820
824
|
"stopping",
|
|
821
825
|
"onStop"
|
|
822
826
|
])) : b("", !0),
|
|
823
|
-
|
|
827
|
+
j(We) ? (D(), x("div", Ne, A(j(G)("message.chatErrorConversationBlocked")), 1)) : Yt.value === "idle" ? (D(), y(f, {
|
|
824
828
|
key: 3,
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
"onUpdate:
|
|
829
|
-
|
|
830
|
-
"
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
"
|
|
834
|
-
|
|
835
|
-
"
|
|
836
|
-
"
|
|
837
|
-
"
|
|
838
|
-
"
|
|
839
|
-
"
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
829
|
+
ref_key: "inputEl",
|
|
830
|
+
ref: at,
|
|
831
|
+
modelValue: j(He),
|
|
832
|
+
"onUpdate:modelValue": n[4] ||= (e) => re(He) ? He.value = e : null,
|
|
833
|
+
"pending-attachments": j(Ke),
|
|
834
|
+
"onUpdate:pendingAttachments": n[5] ||= (e) => re(Ke) ? Ke.value = e : null,
|
|
835
|
+
placeholder: j(Ue),
|
|
836
|
+
"dismissable-notice": j(Mt) && j(B).messages.length <= 1 ? j(Mt) : void 0,
|
|
837
|
+
"page-notice": kt.value,
|
|
838
|
+
status: Dt.value,
|
|
839
|
+
"max-message-length": j(L)?.maxMessageLength,
|
|
840
|
+
"file-upload": H.value,
|
|
841
|
+
"attachment-limit-reached": j(qe),
|
|
842
|
+
"attachment-notice": At.value,
|
|
843
|
+
"voice-enabled": Jt.value,
|
|
844
|
+
"queue-enabled": j(tt),
|
|
845
|
+
"answer-notices": jt.value,
|
|
846
|
+
onStopGeneration: j(st),
|
|
847
|
+
onSubmit: j(ot),
|
|
848
|
+
onFileSelect: j(gt),
|
|
849
|
+
onDismissAttachmentNotice: j(_t),
|
|
850
|
+
onDismissPageNotice: j(bt),
|
|
851
|
+
onOpenAnswerNotice: j(wt),
|
|
852
|
+
onDismissAnswerNotice: j(Tt),
|
|
853
|
+
onVoiceStart: en
|
|
848
854
|
}, te({ _: 2 }, [a.modifier === "fullscreen" ? {
|
|
849
855
|
name: "prepend",
|
|
850
856
|
fn: P(() => [S("span", Pe, [C(u, {
|
|
851
|
-
modifiers: "surface",
|
|
852
857
|
class: "pk-chatbot-view-chat__agent-chip-avatar",
|
|
853
|
-
"img-src":
|
|
854
|
-
name:
|
|
855
|
-
}, null, 8, ["img-src", "name"]),
|
|
858
|
+
"img-src": j(L)?.logo,
|
|
859
|
+
name: j(I).name
|
|
860
|
+
}, null, 8, ["img-src", "name"]), j(I).name ? (D(), x("strong", Fe, A(j(I).name), 1)) : b("", !0)])]),
|
|
856
861
|
key: "0"
|
|
857
862
|
} : void 0]), 1032, [
|
|
858
863
|
"modelValue",
|
|
@@ -875,21 +880,21 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
875
880
|
"onDismissPageNotice",
|
|
876
881
|
"onOpenAnswerNotice",
|
|
877
882
|
"onDismissAnswerNotice"
|
|
878
|
-
])) : (
|
|
883
|
+
])) : (D(), y(Te, {
|
|
879
884
|
key: 2,
|
|
880
|
-
state:
|
|
881
|
-
sample:
|
|
882
|
-
spectrum:
|
|
883
|
-
"remaining-seconds":
|
|
884
|
-
muted:
|
|
885
|
-
error:
|
|
886
|
-
"raw-error":
|
|
887
|
-
live:
|
|
885
|
+
state: Yt.value,
|
|
886
|
+
sample: Qt,
|
|
887
|
+
spectrum: $t,
|
|
888
|
+
"remaining-seconds": j(Z).remainingSeconds.value,
|
|
889
|
+
muted: K.value,
|
|
890
|
+
error: Xt.value,
|
|
891
|
+
"raw-error": j(Z).error.value,
|
|
892
|
+
live: j(Z).isActive.value,
|
|
888
893
|
class: "pk-chatbot-view-chat__voice",
|
|
889
|
-
onToggleMute:
|
|
890
|
-
onHangUp:
|
|
891
|
-
onRetry:
|
|
892
|
-
onDismiss:
|
|
894
|
+
onToggleMute: pn,
|
|
895
|
+
onHangUp: tn,
|
|
896
|
+
onRetry: rn,
|
|
897
|
+
onDismiss: nn
|
|
893
898
|
}, null, 8, [
|
|
894
899
|
"state",
|
|
895
900
|
"remaining-seconds",
|
|
@@ -900,10 +905,10 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
900
905
|
]))
|
|
901
906
|
]),
|
|
902
907
|
C(_, null, {
|
|
903
|
-
default: P(() => [
|
|
908
|
+
default: P(() => [j(zt) && H.value?.enabled ? (D(), x("div", Ie, [C(r, {
|
|
904
909
|
name: "ri:upload-cloud-2-line",
|
|
905
910
|
class: "pk-chatbot-view-chat__drop-overlay-icon"
|
|
906
|
-
}), S("span", null, j(
|
|
911
|
+
}), S("span", null, A(j(G)("action.dropFile")), 1)])) : b("", !0)]),
|
|
907
912
|
_: 1
|
|
908
913
|
})
|
|
909
914
|
], 2);
|
|
@@ -912,4 +917,4 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
912
917
|
});
|
|
913
918
|
export { ve as i, Te as n, be as r, Ve as t };
|
|
914
919
|
|
|
915
|
-
//# sourceMappingURL=PkChatbotViewChat-
|
|
920
|
+
//# sourceMappingURL=PkChatbotViewChat-ZOpF5REL.js.map
|