@8wave/ai-elements 0.126.0-beta.43 → 0.126.0-beta.44
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/_chunks/{markdown-Z_eeOlvv.js → Document-CHcFWo2X.js} +3 -5
- package/dist/_chunks/Document-CHcFWo2X.js.map +1 -0
- package/dist/_chunks/PkToolShowEmail-C8DrPLtf.js +92 -0
- package/dist/_chunks/PkToolShowEmail-C8DrPLtf.js.map +1 -0
- package/dist/_chunks/PkToolShowMessage-4vgFABsU.js +80 -0
- package/dist/_chunks/PkToolShowMessage-4vgFABsU.js.map +1 -0
- package/dist/_chunks/{PkToolShowSources-DMDML2kQ.js → PkToolShowSources-D5gh7FtU.js} +5 -4
- package/dist/_chunks/{PkToolShowSources-DMDML2kQ.js.map → PkToolShowSources-D5gh7FtU.js.map} +1 -1
- package/dist/_chunks/markdown-aNRYL30G.js +7 -0
- package/dist/_chunks/markdown-aNRYL30G.js.map +1 -0
- package/dist/ai-elements.es.js +220 -219
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/_chunks/{PkChatbot-QjeNY0h6.js → PkChatbot-DLO9Xc4K.js} +3 -3
- package/dist-vue/_chunks/{PkChatbot-QjeNY0h6.js.map → PkChatbot-DLO9Xc4K.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-CzPsgCAN.js → PkChatbotMessages-BmKGu2Sh.js} +4 -4
- package/dist-vue/_chunks/PkChatbotMessages-BmKGu2Sh.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-BpDCX_72.js → PkChatbotViewChat-DEb_v4fS.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewChat-BpDCX_72.js.map → PkChatbotViewChat-DEb_v4fS.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-B0nUFwuu.js → PkChatbotViewConversations-BrgBXjpa.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-B0nUFwuu.js.map → PkChatbotViewConversations-BrgBXjpa.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-0p50S8Km.js → PkFilePreview-Cc8PzIcK.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreview-0p50S8Km.js.map → PkFilePreview-Cc8PzIcK.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreviewDialog-B1N4xDEu.js → PkFilePreviewDialog-D4XuwOvp.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-B1N4xDEu.js.map → PkFilePreviewDialog-D4XuwOvp.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowEmail-C_iJsuec.js +92 -0
- package/dist-vue/_chunks/PkToolShowEmail-C_iJsuec.js.map +1 -0
- package/dist-vue/_chunks/PkToolShowMessage-2pxYXo-_.js +80 -0
- package/dist-vue/_chunks/PkToolShowMessage-2pxYXo-_.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSources-Bci0Ab2u.js → PkToolShowSources-B_2niEa3.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSources-Bci0Ab2u.js.map → PkToolShowSources-B_2niEa3.js.map} +1 -1
- package/dist-vue/_chunks/markdown-aNRYL30G.js +7 -0
- package/dist-vue/_chunks/markdown-aNRYL30G.js.map +1 -0
- package/dist-vue/index.js +9 -9
- package/dist-vue/packages/components/src/chat/toolApprovalPreviews.d.ts +3 -1
- package/package.json +1 -1
- package/dist/_chunks/PkToolShowEmail-CQ4uyty9.js +0 -90
- package/dist/_chunks/PkToolShowEmail-CQ4uyty9.js.map +0 -1
- package/dist/_chunks/PkToolShowMessage-9mlI4IQ6.js +0 -78
- package/dist/_chunks/PkToolShowMessage-9mlI4IQ6.js.map +0 -1
- package/dist/_chunks/markdown-Z_eeOlvv.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-CzPsgCAN.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowEmail-idhNR5-l.js +0 -90
- package/dist-vue/_chunks/PkToolShowEmail-idhNR5-l.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowMessage-B4gztWUk.js +0 -78
- package/dist-vue/_chunks/PkToolShowMessage-B4gztWUk.js.map +0 -1
- package/dist-vue/_chunks/markdown-BiG_7-9D.js +0 -7
- package/dist-vue/_chunks/markdown-BiG_7-9D.js.map +0 -1
package/dist/ai-elements.es.js
CHANGED
|
@@ -8,17 +8,18 @@ import { t as bt } from "./_chunks/VvButtonLocalized-D_gumqSJ.js";
|
|
|
8
8
|
import { C as xt, a as St, d as Ct, h as wt, l as Tt, o as Et, s as Dt, v as Ot, y as kt } from "./_chunks/dist-CR8l0inH.js";
|
|
9
9
|
import { A as At, D as jt, E as Mt, I as Nt, L as Pt, M as Ft, N as It, O as Lt, P as Rt, R as zt, S as Bt, T as Vt, W as Ht, _ as Ut, a as Wt, b as Gt, c as Kt, d as qt, g as Jt, h as Yt, i as Xt, j as Zt, k as Qt, l as $t, n as en, o as tn, r as nn, s as rn, u as an, w as on, x as sn, z as cn } from "./_chunks/Agent-DJ6TBi6l.js";
|
|
10
10
|
import { a as ln, i as un, n as dn, t as fn } from "./_chunks/PkSelectionActions-BLfFobXb.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { i as
|
|
14
|
-
import {
|
|
15
|
-
import { t as Sr } from "./_chunks/
|
|
16
|
-
import { t as Cr } from "./_chunks/
|
|
17
|
-
import { t as wr } from "./_chunks/
|
|
18
|
-
import {
|
|
19
|
-
import { t as Or } from "./_chunks/
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
11
|
+
import { n as pn } from "./_chunks/markdown-aNRYL30G.js";
|
|
12
|
+
import { r as mn, t as hn } from "./_chunks/url-validation-CJV9pp4v.js";
|
|
13
|
+
import { c as gn, f as _n, i as vn, m as yn, n as bn, o as xn, p as Sn, r as Cn, s as wn, u as Tn } from "./_chunks/index.es-CEYwDeKz.js";
|
|
14
|
+
import { i as En, n as Dn, r as On, t as kn } from "./_chunks/index.es-DDdkqLT6.js";
|
|
15
|
+
import { $ as An, A as jn, B as Mn, C as Nn, D as Pn, E as Fn, F as In, H as Ln, I as Rn, L as zn, M as Bn, N as Vn, O as Hn, P as Un, Q as Wn, R as Gn, S as Kn, T as qn, V as Jn, Z as Yn, _ as Xn, a as Zn, at as Qn, b as $n, c as er, ct as tr, d as nr, et as rr, f as ir, g as ar, i as or, it as sr, j as cr, k as lr, l as ur, n as dr, nt as fr, ot as pr, p as mr, r as hr, rt as gr, t as _r, tt as vr, u as yr, w as br, x as xr, y as Sr } from "./_chunks/utils-C1JaUBI_.js";
|
|
16
|
+
import { t as Cr } from "./_chunks/useShortUrlResolver-DAVZE_by.js";
|
|
17
|
+
import { t as wr } from "./_chunks/useImageFallback-DSKCe5aP.js";
|
|
18
|
+
import { t as Tr } from "./_chunks/_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
19
|
+
import { n as Er, r as Dr, t as Or } from "./_chunks/PkStreamingMarkdown-Bekhx_vG.js";
|
|
20
|
+
import { t as kr } from "./_chunks/PkChatbotFilePreview-CLUH7cTq.js";
|
|
21
|
+
import { n as Ar, t as jr } from "./_chunks/useLightbox-Co8iz61W.js";
|
|
22
|
+
import { i as Mr, r as Nr, t as Pr } from "./_chunks/Document-CHcFWo2X.js";
|
|
22
23
|
import { t as Fr } from "./_chunks/chatImagePolicy-Dqke0kDv.js";
|
|
23
24
|
// ../../node_modules/.pnpm/pinia@4.1.0_@vue+devtools-api@8.2.1_typescript@6.0.3_vue@3.5.45_typescript@6.0.3_/node_modules/pinia/dist/pinia.js
|
|
24
25
|
V(), U();
|
|
@@ -6002,7 +6003,7 @@ var ua = a({
|
|
|
6002
6003
|
});
|
|
6003
6004
|
a({ pendingWakeup: ua.nullable() });
|
|
6004
6005
|
var da = a({ wakeId: s() });
|
|
6005
|
-
be([da,
|
|
6006
|
+
be([da, tr]);
|
|
6006
6007
|
var fa = (e) => e?.role === "user" && !!e.metadata?.wakeup, pa = /* @__PURE__ */ new Set([
|
|
6007
6008
|
"input-streaming",
|
|
6008
6009
|
"input-available",
|
|
@@ -7635,7 +7636,7 @@ wl.newRole(xl.statements), wl.newRole(Sl.statements), wl.newRole(Cl.statements),
|
|
|
7635
7636
|
// ../../packages/composable/src/chatbot/api/resolveShortUrls.ts
|
|
7636
7637
|
async function Tl(e, t, n = {}) {
|
|
7637
7638
|
try {
|
|
7638
|
-
let r =
|
|
7639
|
+
let r = mn(e), i = await fetch(`${r}/api/r/resolve`, {
|
|
7639
7640
|
method: "POST",
|
|
7640
7641
|
credentials: n.credentials ?? "include",
|
|
7641
7642
|
headers: {
|
|
@@ -7665,7 +7666,7 @@ async function Ol(e) {
|
|
|
7665
7666
|
}
|
|
7666
7667
|
}
|
|
7667
7668
|
function kl(e) {
|
|
7668
|
-
let t = e.basePath ?
|
|
7669
|
+
let t = e.basePath ? hn(e.basePath) : `/api/v1/${Rs.Public}`, n = mn(e.baseUrl), r = `${n}${t}`, i = `${mn(e.baseUrl)}${t.replace(/\/[^/]+$/, `/${Rs.Frontoffice}`)}`, a = (e, n = "") => `${t.replace(/\/[^/]+$/, `/${Rs.Public}`)}/agents/${encodeURIComponent(e)}/chat-projects${n}`, o = (e, t) => ({
|
|
7669
7670
|
method: e,
|
|
7670
7671
|
headers: { "Content-Type": "application/json" },
|
|
7671
7672
|
body: JSON.stringify(t)
|
|
@@ -11756,7 +11757,7 @@ function Qp(e) {
|
|
|
11756
11757
|
"upvote",
|
|
11757
11758
|
"downvote",
|
|
11758
11759
|
"feedback"
|
|
11759
|
-
].includes(e)) : g.value), ge =
|
|
11760
|
+
].includes(e)) : g.value), ge = On(B(() => `${o.value}-chatId`), null);
|
|
11760
11761
|
xe(() => {
|
|
11761
11762
|
ge.value ||= ju();
|
|
11762
11763
|
});
|
|
@@ -11765,7 +11766,7 @@ function Qp(e) {
|
|
|
11765
11766
|
set: (e) => {
|
|
11766
11767
|
ge.value = e;
|
|
11767
11768
|
}
|
|
11768
|
-
}), _e =
|
|
11769
|
+
}), _e = En(B(() => `${o.value}-pageAccessOff`), !1), ve = B(() => _e.value ? [] : re.value ?? []), ye = () => _e.value ? [] : ie.value?.() ?? [], be = B(() => !!(te.value && re.value?.length)), Se = On(B(() => `${o.value}-${l.value ?? "anonymous"}-confirmations`), "manual"), Ce = B(() => T.value?.allowAutomatic === !0), A = B(() => Ce.value && Se.value === "automatic" ? "automatic" : "manual");
|
|
11769
11770
|
function we(e) {
|
|
11770
11771
|
Se.value = e;
|
|
11771
11772
|
}
|
|
@@ -11773,7 +11774,7 @@ function Qp(e) {
|
|
|
11773
11774
|
M(Te, (e) => {
|
|
11774
11775
|
e || (E.value = void 0);
|
|
11775
11776
|
});
|
|
11776
|
-
let Ee =
|
|
11777
|
+
let Ee = On(B(() => `${o.value}-pageNotice`), null), De = B(() => {
|
|
11777
11778
|
let e = te.value?.level;
|
|
11778
11779
|
return e && e !== Zt.Off && ve.value.length && !Rt(Ee.value ?? void 0, e) ? e : void 0;
|
|
11779
11780
|
});
|
|
@@ -11791,7 +11792,7 @@ function Qp(e) {
|
|
|
11791
11792
|
}
|
|
11792
11793
|
function Pe(e) {
|
|
11793
11794
|
if (Ne(e) && !gt.value) {
|
|
11794
|
-
let e = G.value.messages.filter((e) => e.role === "user"), t = e[e.length - 1], n = t ?
|
|
11795
|
+
let e = G.value.messages.filter((e) => e.role === "user"), t = e[e.length - 1], n = t ? An(t) : void 0;
|
|
11795
11796
|
k.value = ju(), Ae.value = void 0, ke(() => {
|
|
11796
11797
|
G.value.clearError(), n && G.value.sendMessage({ text: n });
|
|
11797
11798
|
});
|
|
@@ -12004,7 +12005,7 @@ function Qp(e) {
|
|
|
12004
12005
|
});
|
|
12005
12006
|
},
|
|
12006
12007
|
onData: (e) => {
|
|
12007
|
-
e.type === "data-turnStream" ? V = e.data.streamId : e.type === "data-audioTranscripts" && (G.value.messages =
|
|
12008
|
+
e.type === "data-turnStream" ? V = e.data.streamId : e.type === "data-audioTranscripts" && (G.value.messages = pr(G.value.messages, e.data));
|
|
12008
12009
|
},
|
|
12009
12010
|
onFinish: () => {
|
|
12010
12011
|
let e = k.value;
|
|
@@ -12014,7 +12015,7 @@ function Qp(e) {
|
|
|
12014
12015
|
M(k, (e, t) => {
|
|
12015
12016
|
if (t && !me.value && (_n() || Xe?.chatId === t)) {
|
|
12016
12017
|
let e = G.value.messages.filter((e) => e.role === "user"), n = e[e.length - 1];
|
|
12017
|
-
rt(t, n ?
|
|
12018
|
+
rt(t, n ? An(n) ?? "" : "", G.value.status === "streaming" || Xe?.chatId === t);
|
|
12018
12019
|
}
|
|
12019
12020
|
ot(e), V = void 0, clearTimeout(Bn), zn.value = !1, G.value.stop();
|
|
12020
12021
|
}, { flush: "sync" });
|
|
@@ -12062,7 +12063,7 @@ function Qp(e) {
|
|
|
12062
12063
|
let X = (e) => Y.value?.chatId === e ? Y.value : void 0, pt = B(() => X(k.value)?.authorId), ht = B(() => X(k.value)?.projectId), gt = B(() => pt.value !== void 0 && l.value !== void 0 && pt.value !== l.value), _t = (e) => {
|
|
12063
12064
|
let t = X(e);
|
|
12064
12065
|
return t && t.authorId === void 0 ? t.projectId : void 0;
|
|
12065
|
-
}, vt = () => dt.value ? { projectId: ca } : void 0, bt = z([]), xt = z(!1), Ct = z(1), wt = z(!1), Tt = z(!1), Et, Dt = z([]), kt = z(!1), jt = z("chat"), Mt = z(0), Nt = z([]), Pt = z(), It = z(!1), Lt = z(!1), Bt = z(), Vt = z(!1), Ht = z(!1), Ut = z(), Wt = z(""), Gt = z([]), Kt = z(""), qt = z(!0), Jt = lt(), Yt = z(0), Xt =
|
|
12066
|
+
}, vt = () => dt.value ? { projectId: ca } : void 0, bt = z([]), xt = z(!1), Ct = z(1), wt = z(!1), Tt = z(!1), Et, Dt = z([]), kt = z(!1), jt = z("chat"), Mt = z(0), Nt = z([]), Pt = z(), It = z(!1), Lt = z(!1), Bt = z(), Vt = z(!1), Ht = z(!1), Ut = z(), Wt = z(""), Gt = z([]), Kt = z(""), qt = z(!0), Jt = lt(), Yt = z(0), Xt = En(B(() => `${o.value}-queue`), {}), Qt = B(() => Xt.value[k.value] ?? []), $t = B(() => !me.value);
|
|
12066
12067
|
function en(e, t) {
|
|
12067
12068
|
let n = Object.fromEntries(Object.entries(Xt.value).filter(([t]) => t !== e));
|
|
12068
12069
|
Xt.value = t.length > 0 ? {
|
|
@@ -12267,24 +12268,24 @@ function Qp(e) {
|
|
|
12267
12268
|
} catch {}
|
|
12268
12269
|
return "indeterminate";
|
|
12269
12270
|
}
|
|
12270
|
-
function
|
|
12271
|
+
function Tn(e) {
|
|
12271
12272
|
G.value.messages = [...G.value.messages, e];
|
|
12272
12273
|
}
|
|
12273
|
-
async function
|
|
12274
|
+
async function Dn(e) {
|
|
12274
12275
|
try {
|
|
12275
12276
|
Nt.value = await j.value.getMessageFeedbacks(e);
|
|
12276
12277
|
} catch {
|
|
12277
12278
|
Nt.value = [];
|
|
12278
12279
|
}
|
|
12279
12280
|
}
|
|
12280
|
-
function
|
|
12281
|
+
function kn(e) {
|
|
12281
12282
|
let t = Nt.value.findIndex((t) => t.messageId === e.messageId);
|
|
12282
12283
|
t >= 0 ? Nt.value[t] = e : Nt.value.push(e);
|
|
12283
12284
|
}
|
|
12284
12285
|
function jn(e) {
|
|
12285
|
-
let t = J.value, n = t.findIndex((t) => t.id === e.id), r =
|
|
12286
|
+
let t = J.value, n = t.findIndex((t) => t.id === e.id), r = An(e) ?? "", i = t.slice(0, n).reverse().find((e) => e.role === "user");
|
|
12286
12287
|
return {
|
|
12287
|
-
userQuestion:
|
|
12288
|
+
userQuestion: An(i ?? e) ?? "",
|
|
12288
12289
|
assistantMessage: r
|
|
12289
12290
|
};
|
|
12290
12291
|
}
|
|
@@ -12292,7 +12293,7 @@ function Qp(e) {
|
|
|
12292
12293
|
await Promise.all([
|
|
12293
12294
|
pn(e, t),
|
|
12294
12295
|
on(e),
|
|
12295
|
-
|
|
12296
|
+
Dn(t)
|
|
12296
12297
|
]), Fe.value || Ui((e, t) => j.value.reverseGeocode(e, t, r.value)).then((e) => {
|
|
12297
12298
|
e && (Fe.value = e);
|
|
12298
12299
|
});
|
|
@@ -12491,7 +12492,7 @@ function Qp(e) {
|
|
|
12491
12492
|
let t = hr(e);
|
|
12492
12493
|
Gt.value = [...Gt.value, t], await gr(t);
|
|
12493
12494
|
}
|
|
12494
|
-
async function
|
|
12495
|
+
async function fr(e, t) {
|
|
12495
12496
|
let n = Gt.value.find((t) => t.id === e.id);
|
|
12496
12497
|
if (!n) return;
|
|
12497
12498
|
URL.revokeObjectURL(n.localUrl);
|
|
@@ -12545,7 +12546,7 @@ function Qp(e) {
|
|
|
12545
12546
|
}
|
|
12546
12547
|
async function yr(e, t) {
|
|
12547
12548
|
let { userQuestion: n, assistantMessage: r } = jn(e);
|
|
12548
|
-
|
|
12549
|
+
kn(await j.value.submitMessageFeedback({
|
|
12549
12550
|
messageId: e.id,
|
|
12550
12551
|
chatId: k.value,
|
|
12551
12552
|
agentId: o.value,
|
|
@@ -12567,14 +12568,14 @@ function Qp(e) {
|
|
|
12567
12568
|
if (Pt.value) try {
|
|
12568
12569
|
It.value = !0, Lt.value = !1, Bt.value = void 0;
|
|
12569
12570
|
let { userQuestion: t, assistantMessage: n } = jn(Pt.value);
|
|
12570
|
-
|
|
12571
|
+
kn(await j.value.submitMessageFeedback({
|
|
12571
12572
|
messageId: Pt.value.id,
|
|
12572
12573
|
chatId: k.value,
|
|
12573
12574
|
agentId: o.value,
|
|
12574
12575
|
userQuestion: t,
|
|
12575
12576
|
assistantMessage: n,
|
|
12576
12577
|
comment: e
|
|
12577
|
-
})), Lt.value = !0, await
|
|
12578
|
+
})), Lt.value = !0, await Dn(k.value);
|
|
12578
12579
|
} catch {
|
|
12579
12580
|
Bt.value = n("message.feedbackSubmitError") ? t("message.feedbackSubmitError") : "Failed to submit feedback";
|
|
12580
12581
|
} finally {
|
|
@@ -12726,7 +12727,7 @@ function Qp(e) {
|
|
|
12726
12727
|
searchConversations: cn,
|
|
12727
12728
|
loadChatFiles: ln,
|
|
12728
12729
|
refreshMessages: wn,
|
|
12729
|
-
appendMessage:
|
|
12730
|
+
appendMessage: Tn,
|
|
12730
12731
|
getChatFileUrl: un,
|
|
12731
12732
|
getChatFilePreviewUrl: dn,
|
|
12732
12733
|
deleteChatFile: fn,
|
|
@@ -12739,7 +12740,7 @@ function Qp(e) {
|
|
|
12739
12740
|
addToolApprovalResponse: rr,
|
|
12740
12741
|
handleFileSelect: dr,
|
|
12741
12742
|
discardPendingAttachment: _r,
|
|
12742
|
-
replacePendingAttachment:
|
|
12743
|
+
replacePendingAttachment: fr,
|
|
12743
12744
|
retryPendingAttachment: mr,
|
|
12744
12745
|
clearFileLimitError: ur,
|
|
12745
12746
|
clearPendingAttachments: $n,
|
|
@@ -12766,7 +12767,7 @@ var $p = z(!1), em = z(), tm = z(), nm = z(), rm = z(), im = z(!1), am = z(), om
|
|
|
12766
12767
|
return {
|
|
12767
12768
|
PkGlobalDialog: q({
|
|
12768
12769
|
name: "PkGlobalDialog",
|
|
12769
|
-
render: () => Te(
|
|
12770
|
+
render: () => Te(yn, {
|
|
12770
12771
|
modelValue: $p.value,
|
|
12771
12772
|
title: em.value,
|
|
12772
12773
|
transition: tm.value,
|
|
@@ -12804,7 +12805,7 @@ var cm = () => {
|
|
|
12804
12805
|
class: "text-14 text-word-3 mt-xs mb-sm",
|
|
12805
12806
|
style: "white-space: pre-line"
|
|
12806
12807
|
}, o) : void 0,
|
|
12807
|
-
c ? Te(
|
|
12808
|
+
c ? Te(gn, {
|
|
12808
12809
|
modelValue: h.value,
|
|
12809
12810
|
"onUpdate:modelValue": (e) => {
|
|
12810
12811
|
h.value = e;
|
|
@@ -12817,15 +12818,15 @@ var cm = () => {
|
|
|
12817
12818
|
hintLabel: u ?? t("hint.passphrase", { passphrase: c })
|
|
12818
12819
|
}) : void 0
|
|
12819
12820
|
]),
|
|
12820
|
-
footer: () => Te(
|
|
12821
|
+
footer: () => Te(_n, () => {
|
|
12821
12822
|
let e = [];
|
|
12822
|
-
return s || e.push(Te(
|
|
12823
|
+
return s || e.push(Te(bn, {
|
|
12823
12824
|
label: i ?? t("action.cancel"),
|
|
12824
12825
|
modifiers: "ghost",
|
|
12825
12826
|
onClick: () => {
|
|
12826
12827
|
g.value = !1;
|
|
12827
12828
|
}
|
|
12828
|
-
})), e.push(Te(
|
|
12829
|
+
})), e.push(Te(bn, {
|
|
12829
12830
|
label: r ?? t("action.proceed"),
|
|
12830
12831
|
modifiers: f ? "danger" : void 0,
|
|
12831
12832
|
disabled: c ? c !== h.value : !1,
|
|
@@ -12843,7 +12844,7 @@ var cm = () => {
|
|
|
12843
12844
|
U();
|
|
12844
12845
|
function lm(e) {
|
|
12845
12846
|
let t = z(null), n = z(""), r = (e, r = "") => {
|
|
12846
|
-
t.value = e.id, n.value =
|
|
12847
|
+
t.value = e.id, n.value = pn(e.title) || r;
|
|
12847
12848
|
}, i = async (r) => {
|
|
12848
12849
|
let i = n.value.trim();
|
|
12849
12850
|
if (t.value = null, i && i.length <= 255) try {
|
|
@@ -12905,15 +12906,15 @@ function mm(e) {
|
|
|
12905
12906
|
}
|
|
12906
12907
|
// ../../packages/composable/src/useFileRow.ts
|
|
12907
12908
|
function hm(e) {
|
|
12908
|
-
let { locale: t } = mt({ useScope: "global" }), { canShowImage: n, onImageError: r } =
|
|
12909
|
+
let { locale: t } = mt({ useScope: "global" }), { canShowImage: n, onImageError: r } = wr(), i = (t) => e.preview(t.documentId);
|
|
12909
12910
|
return {
|
|
12910
|
-
showThumb: (e) =>
|
|
12911
|
+
showThumb: (e) => Nr(e.mimeType) && n(i(e)),
|
|
12911
12912
|
thumbUrl: i,
|
|
12912
12913
|
onThumbError: (e) => {
|
|
12913
12914
|
r(i(e));
|
|
12914
12915
|
},
|
|
12915
12916
|
openFile: (t, n = !1) => {
|
|
12916
|
-
let r = !n &&
|
|
12917
|
+
let r = !n && Mr(t.mimeType);
|
|
12917
12918
|
window.open(e.view(t.documentId, r), "_blank", "noopener");
|
|
12918
12919
|
},
|
|
12919
12920
|
formatDate: (e) => new Date(e).toLocaleDateString(t.value, {
|
|
@@ -16082,7 +16083,7 @@ function Oy(e) {
|
|
|
16082
16083
|
}, { immediate: !0 }), M(() => P(e.headers), () => {
|
|
16083
16084
|
o.value && l();
|
|
16084
16085
|
});
|
|
16085
|
-
let u = B(() => t.value?.interface ?? n.value?.interface), d = B(() =>
|
|
16086
|
+
let u = B(() => t.value?.interface ?? n.value?.interface), d = B(() => zn(u.value?.textColor, u.value?.mainColor)), f = B(() => u.value?.mainColor);
|
|
16086
16087
|
return {
|
|
16087
16088
|
agent: t,
|
|
16088
16089
|
branding: n,
|
|
@@ -16101,7 +16102,7 @@ function Oy(e) {
|
|
|
16101
16102
|
let n = P(e.systemTheme);
|
|
16102
16103
|
return n ? ["theme", `theme--${n}`] : ["theme"];
|
|
16103
16104
|
}),
|
|
16104
|
-
themeStyle: B(() =>
|
|
16105
|
+
themeStyle: B(() => er(f.value, d.value))
|
|
16105
16106
|
};
|
|
16106
16107
|
}
|
|
16107
16108
|
// src/composables/useChatbotAuthForm.ts
|
|
@@ -16235,7 +16236,7 @@ function Iy(e) {
|
|
|
16235
16236
|
}
|
|
16236
16237
|
// ../../packages/components/src/chat/PkAvatar.vue?vue&type=script&setup=true&lang.ts
|
|
16237
16238
|
V(), U(), F();
|
|
16238
|
-
var Ly = ["src"], Ry = /*#__PURE__*/
|
|
16239
|
+
var Ly = ["src"], Ry = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
16239
16240
|
__name: "PkAvatar",
|
|
16240
16241
|
props: {
|
|
16241
16242
|
name: {
|
|
@@ -16256,9 +16257,9 @@ var Ly = ["src"], Ry = /*#__PURE__*/ wr(/* @__PURE__ */ q({
|
|
|
16256
16257
|
}
|
|
16257
16258
|
},
|
|
16258
16259
|
setup(e) {
|
|
16259
|
-
let t = e, { canShowImage: n, onImageError: r } =
|
|
16260
|
+
let t = e, { canShowImage: n, onImageError: r } = wr(), i = B(() => n(t.imgSrc)), a = B(() => i.value ? "transparent" : t.modifiers), o = B(() => t.name ? t.name.split(/\s+/).filter((e) => /^[\p{L}\p{N}]/u.test(e)).slice(0, 2).map((e) => e.charAt(0).toUpperCase()).join("") : "");
|
|
16260
16261
|
return (t, n) => {
|
|
16261
|
-
let s =
|
|
16262
|
+
let s = Cn, c = Sn;
|
|
16262
16263
|
return X(), I(c, {
|
|
16263
16264
|
class: "pk-avatar",
|
|
16264
16265
|
"img-src": i.value ? e.imgSrc : void 0,
|
|
@@ -16283,7 +16284,7 @@ V(), F(), U();
|
|
|
16283
16284
|
var zy = {
|
|
16284
16285
|
key: 1,
|
|
16285
16286
|
class: "pk-aurora__fallback"
|
|
16286
|
-
}, By = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", Vy = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec3 u_color2;\nuniform float u_duo;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill. Its height follows the pill's, but each half\n // ends inside the canvas: at most the room to that edge over 1.75, so\n // at the widest breath (1.24) the glow there is about 1% of its peak,\n // under one 8-bit step, and the edge fade below finds nothing to cut.\n // Uncapped, a taller pill (a second line, an attachment) or a short\n // canvas left a quarter of the glow or more at the edge, cut straight.\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5) * u_spread;\n float room = rel.y > 0.0 ? u_resolution.y - u_center.y : u_center.y;\n radii.y = min(radii.y, room / 1.75);\n radii *= breath * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Two tones: left to right the glow passes from the first to the\n // second, along a border a slow noise field keeps bending\n vec2 q = rel / max(radii, vec2(1.0));\n float bands = q.x * 0.9\n + 0.7 * snoise(q * 0.8 + vec2(u_time * 0.07, -u_time * 0.05));\n vec3 color = mix(u_color, u_color2, u_duo * smoothstep(-0.6, 0.6, bands));\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(color * alpha, alpha);\n}", Hy = /*#__PURE__*/
|
|
16287
|
+
}, By = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", Vy = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec3 u_color2;\nuniform float u_duo;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill. Its height follows the pill's, but each half\n // ends inside the canvas: at most the room to that edge over 1.75, so\n // at the widest breath (1.24) the glow there is about 1% of its peak,\n // under one 8-bit step, and the edge fade below finds nothing to cut.\n // Uncapped, a taller pill (a second line, an attachment) or a short\n // canvas left a quarter of the glow or more at the edge, cut straight.\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5) * u_spread;\n float room = rel.y > 0.0 ? u_resolution.y - u_center.y : u_center.y;\n radii.y = min(radii.y, room / 1.75);\n radii *= breath * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Two tones: left to right the glow passes from the first to the\n // second, along a border a slow noise field keeps bending\n vec2 q = rel / max(radii, vec2(1.0));\n float bands = q.x * 0.9\n + 0.7 * snoise(q * 0.8 + vec2(u_time * 0.07, -u_time * 0.05));\n vec3 color = mix(u_color, u_color2, u_duo * smoothstep(-0.6, 0.6, bands));\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(color * alpha, alpha);\n}", Hy = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
16287
16288
|
__name: "PkAuroraCanvas",
|
|
16288
16289
|
props: {
|
|
16289
16290
|
sourceSelector: { type: String },
|
|
@@ -16300,7 +16301,7 @@ var zy = {
|
|
|
16300
16301
|
let n = s.createShader(e);
|
|
16301
16302
|
return !n || (s.shaderSource(n, t), s.compileShader(n), !s.getShaderParameter(n, s.COMPILE_STATUS)) ? null : n;
|
|
16302
16303
|
}, b = (e) => e.map((e) => e / 255), x = () => {
|
|
16303
|
-
n.value && (a.value =
|
|
16304
|
+
n.value && (a.value = Gn(n.value, {
|
|
16304
16305
|
mainColor: t.mainColor,
|
|
16305
16306
|
tones: t.tones,
|
|
16306
16307
|
secondColor: t.secondColor
|
|
@@ -16400,7 +16401,7 @@ var Uy = /* @__PURE__ */ q({
|
|
|
16400
16401
|
}, { immediate: !0 }), je(() => {
|
|
16401
16402
|
b.value && clearTimeout(b.value);
|
|
16402
16403
|
}), (e, t) => {
|
|
16403
|
-
let n = bt, r =
|
|
16404
|
+
let n = bt, r = Tn;
|
|
16404
16405
|
return X(), I(r, {
|
|
16405
16406
|
modifiers: J(g) ? "warning" : "danger",
|
|
16406
16407
|
class: "rounded-lg"
|
|
@@ -16442,11 +16443,11 @@ var Wy = { class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-
|
|
|
16442
16443
|
},
|
|
16443
16444
|
emits: ["submit", "close"],
|
|
16444
16445
|
setup(e, { emit: t }) {
|
|
16445
|
-
let { t: n } = mt({ useScope: "global" }), r = t, i = a({ comment: h().min(1).default("") }), { VvForm: o, VvFormField: s, formData: c } =
|
|
16446
|
+
let { t: n } = mt({ useScope: "global" }), r = t, i = a({ comment: h().min(1).default("") }), { VvForm: o, VvFormField: s, formData: c } = kn(i, { lazyLoad: !0 }), l = (e) => {
|
|
16446
16447
|
r("submit", e.comment);
|
|
16447
16448
|
};
|
|
16448
16449
|
return (t, r) => {
|
|
16449
|
-
let i =
|
|
16450
|
+
let i = Cn, a = bt, u = Tn, d = _n;
|
|
16450
16451
|
return X(), Y("div", Wy, [R("div", Gy, [
|
|
16451
16452
|
N(i, {
|
|
16452
16453
|
name: "ri:feedback-line",
|
|
@@ -16520,7 +16521,7 @@ var tb = { class: "pk-message-feedback__badge" }, nb = {
|
|
|
16520
16521
|
}, rb = {
|
|
16521
16522
|
key: 0,
|
|
16522
16523
|
class: "pk-message-feedback__comment"
|
|
16523
|
-
}, ib = /*#__PURE__*/
|
|
16524
|
+
}, ib = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
16524
16525
|
__name: "PkChatbotMessageFeedback",
|
|
16525
16526
|
props: { feedback: { type: null } },
|
|
16526
16527
|
setup(e) {
|
|
@@ -16543,7 +16544,7 @@ var tb = { class: "pk-message-feedback__badge" }, nb = {
|
|
|
16543
16544
|
}
|
|
16544
16545
|
});
|
|
16545
16546
|
return (t, a) => {
|
|
16546
|
-
let o =
|
|
16547
|
+
let o = Cn;
|
|
16547
16548
|
return X(), Y("div", { class: Oe(["pk-message-feedback", r.value]) }, [R("span", tb, [n.value ? (X(), Y("span", nb, H(n.value), 1)) : (X(), I(o, {
|
|
16548
16549
|
key: 1,
|
|
16549
16550
|
name: i.value
|
|
@@ -16569,7 +16570,7 @@ var ab = { class: "pk-chatbot-audio" }, ob = ["src"], sb = {
|
|
|
16569
16570
|
}, hb = {
|
|
16570
16571
|
key: 2,
|
|
16571
16572
|
class: "pk-chatbot-audio__box"
|
|
16572
|
-
}, gb = { class: "pk-chatbot-audio__header" }, _b = /*#__PURE__*/
|
|
16573
|
+
}, gb = { class: "pk-chatbot-audio__header" }, _b = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
16573
16574
|
__name: "PkChatbotAudioTranscript",
|
|
16574
16575
|
props: {
|
|
16575
16576
|
url: { type: String },
|
|
@@ -16586,7 +16587,7 @@ var ab = { class: "pk-chatbot-audio" }, ob = ["src"], sb = {
|
|
|
16586
16587
|
}
|
|
16587
16588
|
});
|
|
16588
16589
|
return (t, s) => {
|
|
16589
|
-
let c =
|
|
16590
|
+
let c = Cn;
|
|
16590
16591
|
return X(), Y("div", ab, [R("audio", {
|
|
16591
16592
|
class: "pk-chatbot-audio__player",
|
|
16592
16593
|
src: e.url,
|
|
@@ -16679,15 +16680,15 @@ var xb = {
|
|
|
16679
16680
|
showComparison: A(() => import("./_chunks/PkToolShowComparison-DeO7cMeF.js")),
|
|
16680
16681
|
showContactForm: A(() => import("./_chunks/PkToolShowContactForm-BXsvfCKR.js")),
|
|
16681
16682
|
showDiagram: A(() => import("./_chunks/PkToolShowDiagram-j3TTzZ5I.js")),
|
|
16682
|
-
showEmail: A(() => import("./_chunks/PkToolShowEmail-
|
|
16683
|
+
showEmail: A(() => import("./_chunks/PkToolShowEmail-C8DrPLtf.js")),
|
|
16683
16684
|
showImageGallery: A(() => import("./_chunks/PkToolShowImageGallery-Dri9KUNg.js")),
|
|
16684
16685
|
showLocation: A(() => import("./_chunks/PkToolShowLocation-PThC5tCV.js")),
|
|
16685
|
-
showMessage: A(() => import("./_chunks/PkToolShowMessage-
|
|
16686
|
+
showMessage: A(() => import("./_chunks/PkToolShowMessage-4vgFABsU.js")),
|
|
16686
16687
|
showForm: A(() => import("./_chunks/PkToolShowForm-DeG_AzO9.js")),
|
|
16687
16688
|
showMultipleChoice: A(() => import("./_chunks/PkToolShowForm-DeG_AzO9.js")),
|
|
16688
16689
|
showProductList: A(() => import("./_chunks/PkToolShowProductList-C-XQdsus.js")),
|
|
16689
16690
|
showQrCode: A(() => import("./_chunks/PkToolShowQrCode-DQiVo4Vh.js")),
|
|
16690
|
-
showSources: A(() => import("./_chunks/PkToolShowSources-
|
|
16691
|
+
showSources: A(() => import("./_chunks/PkToolShowSources-D5gh7FtU.js")),
|
|
16691
16692
|
showSuggestedReply: A(() => import("./_chunks/PkToolShowSuggestedReply-BYoW-L6k.js")),
|
|
16692
16693
|
showVideo: A(() => import("./_chunks/PkToolShowVideo-C_1ziurv.js")),
|
|
16693
16694
|
showWeather: A(() => import("./_chunks/PkToolShowWeather-DLT47oC6.js")),
|
|
@@ -16708,7 +16709,7 @@ var Sb = {
|
|
|
16708
16709
|
});
|
|
16709
16710
|
return (e, t) => n.value ? (X(), Y("p", Sb, H(n.value), 1)) : K("", !0);
|
|
16710
16711
|
}
|
|
16711
|
-
}), wb = { [
|
|
16712
|
+
}), wb = { [_r]: Cb };
|
|
16712
16713
|
// ../../packages/components/src/chat/PkToolApprovalCard.vue?vue&type=script&setup=true&lang.ts
|
|
16713
16714
|
V(), F(), ot(), U();
|
|
16714
16715
|
var Tb = {
|
|
@@ -16723,7 +16724,7 @@ var Tb = {
|
|
|
16723
16724
|
},
|
|
16724
16725
|
emits: ["respond"],
|
|
16725
16726
|
setup(e, { emit: t }) {
|
|
16726
|
-
let n = e, r = t, { t: i, te: a } = mt({ useScope: "global" }), o = B(() => n.part), s = B(() =>
|
|
16727
|
+
let n = e, r = t, { t: i, te: a } = mt({ useScope: "global" }), o = B(() => n.part), s = B(() => rr(n.part)), c = B(() => s.value === _r), l = B(() => c.value ? (o.value.state === "input-available" || Bt(o.value.output)) && n.callVerdict === void 0 : o.value.state === "approval-requested"), u = B(() => l.value && n.actionable === !0), d = B(() => l.value && n.actionable !== !0), f = B(() => c.value ? o.value.output === "confirmed" || n.callVerdict === !0 : o.value.approval?.approved === !0), p = B(() => c.value ? o.value.output === "cancelled" || n.callVerdict === !1 : o.value.approval?.approved === !1 || o.value.state === "output-denied"), m = B(() => wb[s.value]), h = B(() => m.value ? i("toolApproval.prompt") : i("toolApproval.promptNamed", { tool: Ln(s.value, {
|
|
16727
16728
|
t: i,
|
|
16728
16729
|
te: a
|
|
16729
16730
|
}) })), g = B(() => {
|
|
@@ -16741,7 +16742,7 @@ var Tb = {
|
|
|
16741
16742
|
};
|
|
16742
16743
|
}), _ = B(() => !!g.value && !m.value);
|
|
16743
16744
|
return (t, n) => {
|
|
16744
|
-
let a = bt, s =
|
|
16745
|
+
let a = bt, s = _n, d = Cn;
|
|
16745
16746
|
return X(), Y("div", { class: Oe(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !_.value }]) }, [
|
|
16746
16747
|
N(W, null, {
|
|
16747
16748
|
default: G(() => [!c.value && l.value ? (X(), Y("p", Tb, H(h.value), 1)) : K("", !0)]),
|
|
@@ -16789,7 +16790,7 @@ var Db = { class: "pk-field-changes text-14" }, Ob = { key: 0 }, kb = { scope: "
|
|
|
16789
16790
|
}, Fb = {
|
|
16790
16791
|
key: 0,
|
|
16791
16792
|
class: "pk-field-changes__added"
|
|
16792
|
-
}, Ib = /*#__PURE__*/
|
|
16793
|
+
}, Ib = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
16793
16794
|
__name: "PkFieldChanges",
|
|
16794
16795
|
props: { changes: { type: Array } },
|
|
16795
16796
|
setup(e) {
|
|
@@ -16816,7 +16817,7 @@ var Lb = { class: "pk-host-call-confirm-card w-full bg-surface p-sm rounded-xl b
|
|
|
16816
16817
|
}, Vb = {
|
|
16817
16818
|
key: 2,
|
|
16818
16819
|
class: "text-12 text-word-3 m-0 mb-xs"
|
|
16819
|
-
}, Hb = { class: "pk-host-call-confirm-card__details text-12 m-0" }, Ub = { class: "text-word-3" }, Wb = { class: "text-word-2 m-0" }, Gb = /*#__PURE__*/
|
|
16820
|
+
}, Hb = { class: "pk-host-call-confirm-card__details text-12 m-0" }, Ub = { class: "text-word-3" }, Wb = { class: "text-word-2 m-0" }, Gb = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
16820
16821
|
__name: "PkHostCallConfirmCard",
|
|
16821
16822
|
props: {
|
|
16822
16823
|
question: { type: String },
|
|
@@ -16827,7 +16828,7 @@ var Lb = { class: "pk-host-call-confirm-card w-full bg-surface p-sm rounded-xl b
|
|
|
16827
16828
|
setup(e, { emit: t }) {
|
|
16828
16829
|
let n = e, r = t, i = B(() => n.details?.some((e) => e.before !== void 0) ?? !1);
|
|
16829
16830
|
return (t, n) => {
|
|
16830
|
-
let a =
|
|
16831
|
+
let a = vn, o = bt, s = _n;
|
|
16831
16832
|
return X(), Y("div", Lb, [
|
|
16832
16833
|
R("p", Rb, H(e.question), 1),
|
|
16833
16834
|
e.details?.length && i.value ? (X(), I(Ib, {
|
|
@@ -16885,7 +16886,7 @@ var Kb = 8, qb = /* @__PURE__ */ q({
|
|
|
16885
16886
|
ref: t,
|
|
16886
16887
|
class: "overflow-auto",
|
|
16887
16888
|
onScroll: a
|
|
16888
|
-
}, [N(
|
|
16889
|
+
}, [N(Or, {
|
|
16889
16890
|
ref_key: "contentEl",
|
|
16890
16891
|
ref: n,
|
|
16891
16892
|
markdown: e.markdown,
|
|
@@ -16914,7 +16915,7 @@ var Jb = {
|
|
|
16914
16915
|
}, nx = {
|
|
16915
16916
|
key: 1,
|
|
16916
16917
|
class: "pk-chatbot-step-payload__full"
|
|
16917
|
-
}, rx = 120, ix = /*#__PURE__*/
|
|
16918
|
+
}, rx = 120, ix = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
16918
16919
|
__name: "PkChatbotStepPayload",
|
|
16919
16920
|
props: {
|
|
16920
16921
|
label: { type: String },
|
|
@@ -16945,14 +16946,14 @@ var Jb = {
|
|
|
16945
16946
|
preview: n || "-",
|
|
16946
16947
|
full: a && a.trim() !== n ? a : void 0
|
|
16947
16948
|
};
|
|
16948
|
-
})), s = B(() => o.value ? void 0 :
|
|
16949
|
+
})), s = B(() => o.value ? void 0 : Jn(t.value)), c = B(() => {
|
|
16949
16950
|
let e = o.value;
|
|
16950
16951
|
return e ? Array.isArray(t.value) ? n("messagePart.stepItems", e.length) : e.length === 1 ? `${e[0].key}: ${e[0].preview}` : e.map((e) => e.key).join(" · ") : i(t.value);
|
|
16951
16952
|
}), l = z(!1), u = et(/* @__PURE__ */ new Set()), d = (e) => {
|
|
16952
16953
|
u.has(e) ? u.delete(e) : u.add(e);
|
|
16953
16954
|
};
|
|
16954
16955
|
return (t, n) => {
|
|
16955
|
-
let r =
|
|
16956
|
+
let r = Cn;
|
|
16956
16957
|
return o.value || s.value ? (X(), Y("div", Jb, [R("button", {
|
|
16957
16958
|
type: "button",
|
|
16958
16959
|
class: "pk-chatbot-step-payload__header",
|
|
@@ -17016,7 +17017,7 @@ var ax = { class: "pk-chatbot-step-detail" }, ox = {
|
|
|
17016
17017
|
}, _x = { class: "pk-chatbot-step-detail__passage-header" }, vx = { class: "pk-chatbot-step-detail__hit-heading" }, yx = { class: "pk-chatbot-step-detail__hit-title" }, bx = {
|
|
17017
17018
|
key: 0,
|
|
17018
17019
|
class: "pk-chatbot-step-detail__hit-meta"
|
|
17019
|
-
}, xx = { class: "pk-chatbot-step-detail__passage-content" }, Sx = /*#__PURE__*/
|
|
17020
|
+
}, xx = { class: "pk-chatbot-step-detail__passage-content" }, Sx = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
17020
17021
|
__name: "PkChatbotStepToolDetail",
|
|
17021
17022
|
props: { part: { type: null } },
|
|
17022
17023
|
setup(e) {
|
|
@@ -17161,7 +17162,7 @@ var ax = { class: "pk-chatbot-step-detail" }, ox = {
|
|
|
17161
17162
|
text: t
|
|
17162
17163
|
}] } : {};
|
|
17163
17164
|
}
|
|
17164
|
-
return
|
|
17165
|
+
return Zn.includes(e) ? {
|
|
17165
17166
|
chips: u.value,
|
|
17166
17167
|
rawOutput: s.value
|
|
17167
17168
|
} : {};
|
|
@@ -17172,7 +17173,7 @@ var ax = { class: "pk-chatbot-step-detail" }, ox = {
|
|
|
17172
17173
|
x.has(e) ? x.delete(e) : x.add(e);
|
|
17173
17174
|
};
|
|
17174
17175
|
return (e, t) => {
|
|
17175
|
-
let r =
|
|
17176
|
+
let r = Cn;
|
|
17176
17177
|
return X(), Y("div", ax, [
|
|
17177
17178
|
b.value.chips?.length ? (X(), Y("ul", ox, [(X(!0), Y(L, null, ze(b.value.chips, (e, t) => (X(), Y("li", {
|
|
17178
17179
|
key: `${t}-${e}`,
|
|
@@ -17232,12 +17233,12 @@ var ax = { class: "pk-chatbot-step-detail" }, ox = {
|
|
|
17232
17233
|
R("span", vx, [R("span", yx, H(b.value.passage.title ?? J(n)("messagePart.stepDocument")), 1)]),
|
|
17233
17234
|
b.value.passage.meta ? (X(), Y("span", bx, H(b.value.passage.meta), 1)) : K("", !0)
|
|
17234
17235
|
]), R("div", xx, H(b.value.passage.content), 1)])) : K("", !0),
|
|
17235
|
-
J(
|
|
17236
|
+
J(qn)(b.value.rawInput) ? (X(), I(ix, {
|
|
17236
17237
|
key: 4,
|
|
17237
17238
|
label: J(n)("messagePart.stepInput"),
|
|
17238
17239
|
value: b.value.rawInput
|
|
17239
17240
|
}, null, 8, ["label", "value"])) : K("", !0),
|
|
17240
|
-
J(
|
|
17241
|
+
J(qn)(b.value.rawOutput) ? (X(), I(ix, {
|
|
17241
17242
|
key: 5,
|
|
17242
17243
|
label: J(n)("messagePart.stepOutput"),
|
|
17243
17244
|
value: b.value.rawOutput
|
|
@@ -17266,7 +17267,7 @@ var Cx = {
|
|
|
17266
17267
|
}, Nx = {
|
|
17267
17268
|
key: 3,
|
|
17268
17269
|
class: "pk-chatbot-steps__step-payload pk-chatbot-steps__step-payload--error"
|
|
17269
|
-
}, Px = { class: "pk-chatbot-steps__step-payload-label" }, Fx = /*#__PURE__*/
|
|
17270
|
+
}, Px = { class: "pk-chatbot-steps__step-payload-label" }, Fx = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
17270
17271
|
__name: "PkChatbotSteps",
|
|
17271
17272
|
props: {
|
|
17272
17273
|
message: { type: Object },
|
|
@@ -17276,24 +17277,24 @@ var Cx = {
|
|
|
17276
17277
|
isDark: { type: Boolean }
|
|
17277
17278
|
},
|
|
17278
17279
|
setup(e) {
|
|
17279
|
-
let t = e, { t: n, n: r } = mt({ useScope: "global" }), i = Se(
|
|
17280
|
+
let t = e, { t: n, n: r } = mt({ useScope: "global" }), i = Se(hr, void 0), a = Se(dr, void 0), o = (e) => $n(e) === "output-error" && "errorText" in e && typeof e.errorText == "string" ? e.errorText : void 0, s = B(() => {
|
|
17280
17281
|
let e = t.message.parts, r = t.message.metadata?.partTimings, s = [];
|
|
17281
17282
|
for (let [c, l] of e.entries()) {
|
|
17282
|
-
let u =
|
|
17283
|
+
let u = gr(l), d = Xn(l), f = Qn(l) || !!d;
|
|
17283
17284
|
if (!u && !f) continue;
|
|
17284
|
-
let p = d?.state === "input-available", m = "toolCallId" in l ? l.toolCallId : void 0, h = u && !t.hideReasoning && l.text.trim() ? l.text : void 0, g = o(l), _ =
|
|
17285
|
+
let p = d?.state === "input-available", m = "toolCallId" in l ? l.toolCallId : void 0, h = u && !t.hideReasoning && l.text.trim() ? l.text : void 0, g = o(l), _ = Fn(l), v = f && "input" in l ? l.input : void 0, y = f && "output" in l ? l.output : void 0, b = m ? a?.value[m]?.details : void 0;
|
|
17285
17286
|
s.push({
|
|
17286
17287
|
key: m ?? `${l.type}-${c}`,
|
|
17287
17288
|
part: l,
|
|
17288
|
-
icon:
|
|
17289
|
-
label:
|
|
17290
|
-
summary: p && !t.isStreaming ? n("messagePart.hostToolNoAnswer") :
|
|
17289
|
+
icon: Sr(l),
|
|
17290
|
+
label: Nn(n, l, i?.value),
|
|
17291
|
+
summary: p && !t.isStreaming ? n("messagePart.hostToolNoAnswer") : br(l),
|
|
17291
17292
|
durationMs: m ? r?.[m] : void 0,
|
|
17292
17293
|
isActive: !!t.isStreaming && (d ? p : c === e.length - 1),
|
|
17293
17294
|
text: h,
|
|
17294
17295
|
error: g,
|
|
17295
17296
|
hasRichDetail: _,
|
|
17296
|
-
hasBody: !!(b?.length || h || g || (_ ? v !== void 0 || y !== void 0 :
|
|
17297
|
+
hasBody: !!(b?.length || h || g || (_ ? v !== void 0 || y !== void 0 : qn(v) || qn(y))),
|
|
17297
17298
|
toolInput: v,
|
|
17298
17299
|
toolOutput: y,
|
|
17299
17300
|
changes: b
|
|
@@ -17303,11 +17304,11 @@ var Cx = {
|
|
|
17303
17304
|
}), c = B(() => {
|
|
17304
17305
|
let { createdAt: e, completedAt: n } = t.message.metadata ?? {};
|
|
17305
17306
|
if (e && n) return n - e;
|
|
17306
|
-
}), l = (e) =>
|
|
17307
|
+
}), l = (e) => ar(r, e), u = et(/* @__PURE__ */ new Map()), d = (e) => u.get(e.key) ?? !1, f = (e) => {
|
|
17307
17308
|
u.set(e.key, !d(e));
|
|
17308
17309
|
}, p = z(void 0), m = B(() => p.value ?? (!!t.isStreaming && !t.hasContent));
|
|
17309
17310
|
return (t, r) => {
|
|
17310
|
-
let i =
|
|
17311
|
+
let i = Cn;
|
|
17311
17312
|
return s.value.length ? (X(), Y("div", Cx, [R("button", {
|
|
17312
17313
|
type: "button",
|
|
17313
17314
|
class: "pk-chatbot-steps__header",
|
|
@@ -17368,25 +17369,25 @@ var Cx = {
|
|
|
17368
17369
|
key: 1,
|
|
17369
17370
|
markdown: t.text,
|
|
17370
17371
|
"is-dark": e.isDark,
|
|
17371
|
-
"tail-length": J(
|
|
17372
|
+
"tail-length": J(or),
|
|
17372
17373
|
"inner-class": "wysiwyg",
|
|
17373
17374
|
class: "pk-chatbot-steps__step-content pk-chatbot-steps__step-content--scroll"
|
|
17374
17375
|
}, null, 8, [
|
|
17375
17376
|
"markdown",
|
|
17376
17377
|
"is-dark",
|
|
17377
17378
|
"tail-length"
|
|
17378
|
-
])) : t.text ? (X(), Y("div", Mx, [N(
|
|
17379
|
+
])) : t.text ? (X(), Y("div", Mx, [N(Or, {
|
|
17379
17380
|
markdown: t.text,
|
|
17380
17381
|
"is-dark": e.isDark,
|
|
17381
17382
|
class: "wysiwyg"
|
|
17382
17383
|
}, null, 8, ["markdown", "is-dark"])])) : t.error ? (X(), Y("div", Nx, [R("span", Px, H(J(n)("messagePart.stepError")), 1), R("pre", null, H(t.error), 1)])) : t.hasRichDetail ? (X(), I(Sx, {
|
|
17383
17384
|
key: 4,
|
|
17384
17385
|
part: t.part
|
|
17385
|
-
}, null, 8, ["part"])) : (X(), Y(L, { key: 5 }, [J(
|
|
17386
|
+
}, null, 8, ["part"])) : (X(), Y(L, { key: 5 }, [J(qn)(t.toolInput) ? (X(), I(ix, {
|
|
17386
17387
|
key: 0,
|
|
17387
17388
|
label: J(n)("messagePart.stepInput"),
|
|
17388
17389
|
value: t.toolInput
|
|
17389
|
-
}, null, 8, ["label", "value"])) : K("", !0), J(
|
|
17390
|
+
}, null, 8, ["label", "value"])) : K("", !0), J(qn)(t.toolOutput) ? (X(), I(ix, {
|
|
17390
17391
|
key: 1,
|
|
17391
17392
|
label: J(n)("messagePart.stepOutput"),
|
|
17392
17393
|
value: t.toolOutput
|
|
@@ -17399,7 +17400,7 @@ V(), U(), F();
|
|
|
17399
17400
|
var Ix = ["aria-label"], Lx = {
|
|
17400
17401
|
class: "pk-chatbot-outline__bars",
|
|
17401
17402
|
"aria-hidden": "true"
|
|
17402
|
-
}, Rx = { class: "pk-chatbot-outline__panel" }, zx = ["aria-current", "onClick"], Bx = /*#__PURE__*/
|
|
17403
|
+
}, Rx = { class: "pk-chatbot-outline__panel" }, zx = ["aria-current", "onClick"], Bx = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
17403
17404
|
__name: "PkChatbotOutlineRail",
|
|
17404
17405
|
props: {
|
|
17405
17406
|
items: { type: Array },
|
|
@@ -17556,7 +17557,7 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17556
17557
|
}, ES = { class: "pk-chatbot-message__loading-info" }, DS = { class: "flex gap-8 items-center" }, OS = { class: "text-12" }, kS = {
|
|
17557
17558
|
key: 0,
|
|
17558
17559
|
class: "pk-chatbot-message pk-chatbot-message--assistant"
|
|
17559
|
-
}, AS = ["title", "aria-label"], jS = /*#__PURE__*/
|
|
17560
|
+
}, AS = ["title", "aria-label"], jS = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
17560
17561
|
__name: "PkChatbotMessages",
|
|
17561
17562
|
props: {
|
|
17562
17563
|
status: { type: String },
|
|
@@ -17606,11 +17607,11 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17606
17607
|
"host-confirm-respond"
|
|
17607
17608
|
],
|
|
17608
17609
|
setup(e, { emit: t }) {
|
|
17609
|
-
let n = e, r = t, { t: i, te: a, d: o, n: s } = mt({ useScope: "global" }), c = Se(
|
|
17610
|
+
let n = e, r = t, { t: i, te: a, d: o, n: s } = mt({ useScope: "global" }), c = Se(hr, void 0), l = Se(dr, void 0), u = (e) => {
|
|
17610
17611
|
let t = e.toolCallId;
|
|
17611
17612
|
return typeof t == "string" ? l?.value[t]?.details : void 0;
|
|
17612
17613
|
}, d = He(), f = (e, t) => {
|
|
17613
|
-
if (
|
|
17614
|
+
if (Vn(e)) {
|
|
17614
17615
|
let n = e.toolCallId;
|
|
17615
17616
|
n && r("confirm-respond", {
|
|
17616
17617
|
toolCallId: n,
|
|
@@ -17618,13 +17619,13 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17618
17619
|
});
|
|
17619
17620
|
return;
|
|
17620
17621
|
}
|
|
17621
|
-
let n =
|
|
17622
|
+
let n = Kn(e);
|
|
17622
17623
|
n && r("approval-respond", {
|
|
17623
17624
|
id: n,
|
|
17624
17625
|
approved: t
|
|
17625
17626
|
});
|
|
17626
|
-
}, p = Ve("scrollEl"), m = Ve("wrapperEl"), h = B(() =>
|
|
17627
|
-
|
|
17627
|
+
}, p = Ve("scrollEl"), m = Ve("wrapperEl"), h = B(() => zn(n.textColor, n.mainColor));
|
|
17628
|
+
Ar(m);
|
|
17628
17629
|
let { handleScroll: g, scrollToBottom: _, userScrolledUp: v, isAtBottom: y } = Ux({
|
|
17629
17630
|
scrollEl: p,
|
|
17630
17631
|
status: () => n.status,
|
|
@@ -17638,7 +17639,7 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17638
17639
|
v.value = !1, _();
|
|
17639
17640
|
}, x = B(() => (n.messages ?? []).filter((e) => e.role === "user" && !fa(e)).map((e) => ({
|
|
17640
17641
|
id: e.id,
|
|
17641
|
-
preview: e.parts.find(
|
|
17642
|
+
preview: e.parts.find(sr)?.text.trim().slice(0, 120) || "…"
|
|
17642
17643
|
}))), S = z(), C = () => p.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], ee = () => {
|
|
17643
17644
|
let e = p.value;
|
|
17644
17645
|
if (!e || !n.showScrollToBottom) return;
|
|
@@ -17689,7 +17690,7 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17689
17690
|
"showDiagram",
|
|
17690
17691
|
"showLocation"
|
|
17691
17692
|
]), ue = (e) => {
|
|
17692
|
-
let t =
|
|
17693
|
+
let t = rr(e);
|
|
17693
17694
|
return {
|
|
17694
17695
|
...!n.interactive && O.has(t) ? { record: !0 } : {},
|
|
17695
17696
|
...le.has(t) ? { isDark: n.isDark } : {}
|
|
@@ -17708,42 +17709,42 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17708
17709
|
return i(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
|
|
17709
17710
|
}, _e = (e) => {
|
|
17710
17711
|
let t = xe(e);
|
|
17711
|
-
for (let e = t.length - 1; e >= 0; --e) if (
|
|
17712
|
+
for (let e = t.length - 1; e >= 0; --e) if (sr(t[e])) return e;
|
|
17712
17713
|
return -1;
|
|
17713
17714
|
}, ve = B(() => n.messages?.[n.messages.length - 1]), ye = B(() => {
|
|
17714
17715
|
let e = ve.value;
|
|
17715
17716
|
return e ? e.parts[e.parts.length - 1] : null;
|
|
17716
17717
|
}), be = B(() => {
|
|
17717
17718
|
let e = /* @__PURE__ */ new Map();
|
|
17718
|
-
for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id,
|
|
17719
|
+
for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, Rn(nr(In(t.parts))));
|
|
17719
17720
|
return e;
|
|
17720
17721
|
}), xe = (e) => be.value.get(e.id) ?? e.parts, Ce = B(() => n.status === "error"), A = B(() => n.awaitingSpokenAnswer === !0 && !T.value), we = B(() => A.value && ve.value?.role === "user" && !Ce.value), Te = (e, t) => t(), Ee = B(() => {
|
|
17721
17722
|
let e = ye.value;
|
|
17722
|
-
return
|
|
17723
|
+
return Nn(i, e, c?.value);
|
|
17723
17724
|
}), De = B(() => {
|
|
17724
17725
|
let e = ye.value;
|
|
17725
|
-
return
|
|
17726
|
-
}), je = (e) => n.messages?.findIndex((t) => t.id === e), Me = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, Pe = (e) => Me(e) && n.status === "ready" && !n.hostWorking && !!n.actions?.includes("regenerate"), j = (e, t) => (!Me(t) || n.status === "ready" && !n.hostWorking) && !!n.actions?.includes(e), Le = (e, t) => j("copy", t) && e.parts.some((e) =>
|
|
17726
|
+
return Sr(e);
|
|
17727
|
+
}), je = (e) => n.messages?.findIndex((t) => t.id === e), Me = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, Pe = (e) => Me(e) && n.status === "ready" && !n.hostWorking && !!n.actions?.includes("regenerate"), j = (e, t) => (!Me(t) || n.status === "ready" && !n.hostWorking) && !!n.actions?.includes(e), Le = (e, t) => j("copy", t) && e.parts.some((e) => sr(e) && e.text.trim()), P = z();
|
|
17727
17728
|
async function Re(e, t) {
|
|
17728
17729
|
let n = t.currentTarget?.closest(".pk-chatbot-message")?.querySelectorAll(".pk-chatbot-message__text .wysiwyg");
|
|
17729
|
-
await
|
|
17730
|
-
html:
|
|
17731
|
-
text: e.parts.filter(
|
|
17730
|
+
await Er({
|
|
17731
|
+
html: Dr(Array.from(n ?? [])),
|
|
17732
|
+
text: e.parts.filter(sr).map((e) => e.text.trim()).filter(Boolean).join("\n\n")
|
|
17732
17733
|
}) && (P.value = e.id, setTimeout(() => {
|
|
17733
17734
|
P.value === e.id && (P.value = void 0);
|
|
17734
17735
|
}, 2e3));
|
|
17735
17736
|
}
|
|
17736
17737
|
let F = (e) => {
|
|
17737
17738
|
let t = e.parts[e.parts.length - 1];
|
|
17738
|
-
return
|
|
17739
|
-
}, Ue = (e) => e.parts.some((e) =>
|
|
17740
|
-
if (!
|
|
17739
|
+
return sr(t);
|
|
17740
|
+
}, Ue = (e) => e.parts.some((e) => gr(e) || Qn(e) || !!Xn(e)), We = (e) => !!n.showExtendedSteps && Qe(e) && Ue(e), Ge = (e) => n.hostConfirmation !== void 0 && Xn(e) !== void 0 && e.toolCallId === n.hostConfirmation.toolCallId, Ke = B(() => n.hostConfirmation !== void 0 && !n.messages?.some((e) => e.parts.some(Ge))), Je = (e, t) => T.value && Me(e) && Xn(t)?.state === "input-available", Ye = (e, t, n, r) => {
|
|
17741
|
+
if (!Xn(n) || We(e)) return !1;
|
|
17741
17742
|
let i = Je(t, n);
|
|
17742
|
-
return i && r === xe(e).length - 1 ? !1 : i ||
|
|
17743
|
+
return i && r === xe(e).length - 1 ? !1 : i || jn(n) || !vr(e);
|
|
17743
17744
|
}, Xe = (e, t) => {
|
|
17744
|
-
let n =
|
|
17745
|
+
let n = Xn(t);
|
|
17745
17746
|
return n?.state === "output-error" ? i(n.errorText === "The user refused this call. Do not repeat it unless the user asks." ? "toolApproval.denied" : "messagePart.hostToolFailed") : n?.state === "input-available" && !Je(e, t) ? i("messagePart.hostToolNoAnswer") : void 0;
|
|
17746
|
-
}, Ze = (e) =>
|
|
17747
|
+
}, Ze = (e) => Qn(e) && !Bn(e) && !!(xb[rr(e)] || d[e.type] || n.showAllMessageParts), V = (e) => e.parts.some((e) => sr(e) && !!e.text.trim() || fr(e) || Hn(e) && !Bn(e) || Ze(e)), Qe = (e) => e.role === "assistant", $e = (e) => e.role === "user", et = (e) => n.messages?.slice(0, e).reverse().find((e) => Qe(e)), tt = (e) => n.messages?.slice(e + 1).find((e) => Qe(e)), nt = (e) => {
|
|
17747
17748
|
let t = et(e)?.metadata?.createdAt, n = tt(e)?.metadata?.createdAt;
|
|
17748
17749
|
if (!t || !n) return;
|
|
17749
17750
|
let r = new Date(t), i = new Date(n);
|
|
@@ -17769,7 +17770,7 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17769
17770
|
return o(t, n ? "time" : "date-time");
|
|
17770
17771
|
}, q = (e) => {
|
|
17771
17772
|
let { createdAt: t, completedAt: n } = e.metadata ?? {};
|
|
17772
|
-
if (t && n) return
|
|
17773
|
+
if (t && n) return ar(s, n - t);
|
|
17773
17774
|
}, dt = Ve("feedbackMessageEl");
|
|
17774
17775
|
return M(() => n.feedbackMessageId, async () => {
|
|
17775
17776
|
if (await ke(), !n.feedbackMessageId) return;
|
|
@@ -17779,7 +17780,7 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17779
17780
|
block: "center"
|
|
17780
17781
|
}));
|
|
17781
17782
|
}), (t, n) => {
|
|
17782
|
-
let l =
|
|
17783
|
+
let l = Cn, g = vn, _ = bt, C = _n;
|
|
17783
17784
|
return X(), Y("div", {
|
|
17784
17785
|
ref_key: "scrollEl",
|
|
17785
17786
|
ref: p,
|
|
@@ -17849,7 +17850,7 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17849
17850
|
])) : K("", !0)]),
|
|
17850
17851
|
_: 2
|
|
17851
17852
|
}, 1024),
|
|
17852
|
-
(X(!0), Y(L, null, ze(xe(p), (o, s) => (X(), Y(L, { key: J(
|
|
17853
|
+
(X(!0), Y(L, null, ze(xe(p), (o, s) => (X(), Y(L, { key: J(ir)(o, s) }, [J(sr)(o) && o.text.trim() ? (X(), I(W, {
|
|
17853
17854
|
key: 0,
|
|
17854
17855
|
appear: "",
|
|
17855
17856
|
name: "pk-chatbot-part"
|
|
@@ -17859,7 +17860,7 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17859
17860
|
part: o,
|
|
17860
17861
|
index: m,
|
|
17861
17862
|
isLoading: T.value
|
|
17862
|
-
}), () => [Qe(p) ? (X(), I(
|
|
17863
|
+
}), () => [Qe(p) ? (X(), I(Or, {
|
|
17863
17864
|
key: 0,
|
|
17864
17865
|
class: "wysiwyg",
|
|
17865
17866
|
markdown: o.text,
|
|
@@ -17880,16 +17881,16 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17880
17881
|
name: pe(p.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
|
|
17881
17882
|
}, null, 8, ["name"]))], 10, $x)) : K("", !0)])]),
|
|
17882
17883
|
_: 2
|
|
17883
|
-
}, 1024)) : J(
|
|
17884
|
+
}, 1024)) : J(fr)(o) ? (X(), I(W, {
|
|
17884
17885
|
key: 1,
|
|
17885
17886
|
appear: "",
|
|
17886
17887
|
name: "pk-chatbot-part"
|
|
17887
17888
|
}, {
|
|
17888
|
-
default: G(() => [J(Qt)(o.filename, o.mediaType) ? (X(), Y("div", tS, [N(
|
|
17889
|
+
default: G(() => [J(Qt)(o.filename, o.mediaType) ? (X(), Y("div", tS, [N(kr, {
|
|
17889
17890
|
"media-type": o.mediaType,
|
|
17890
17891
|
url: o.url,
|
|
17891
17892
|
filename: o.filename,
|
|
17892
|
-
size: J(
|
|
17893
|
+
size: J(Yn)(o)?.bytesCount
|
|
17893
17894
|
}, null, 8, [
|
|
17894
17895
|
"media-type",
|
|
17895
17896
|
"url",
|
|
@@ -17897,18 +17898,18 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17897
17898
|
"size"
|
|
17898
17899
|
]), N(_b, {
|
|
17899
17900
|
url: o.url,
|
|
17900
|
-
transcript: J(
|
|
17901
|
+
transcript: J(Wn)(o),
|
|
17901
17902
|
pending: e.status === "submitted" && Me(m)
|
|
17902
17903
|
}, null, 8, [
|
|
17903
17904
|
"url",
|
|
17904
17905
|
"transcript",
|
|
17905
17906
|
"pending"
|
|
17906
|
-
])])) : (X(), I(
|
|
17907
|
+
])])) : (X(), I(kr, {
|
|
17907
17908
|
key: 1,
|
|
17908
17909
|
"media-type": o.mediaType,
|
|
17909
17910
|
url: o.url,
|
|
17910
17911
|
filename: o.filename,
|
|
17911
|
-
size: J(
|
|
17912
|
+
size: J(Yn)(o)?.bytesCount
|
|
17912
17913
|
}, null, 8, [
|
|
17913
17914
|
"media-type",
|
|
17914
17915
|
"url",
|
|
@@ -17916,7 +17917,7 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17916
17917
|
"size"
|
|
17917
17918
|
]))]),
|
|
17918
17919
|
_: 2
|
|
17919
|
-
}, 1024)) : J(
|
|
17920
|
+
}, 1024)) : J(Hn)(o) && !J(Bn)(o) ? (X(), I(W, {
|
|
17920
17921
|
key: 2,
|
|
17921
17922
|
appear: "",
|
|
17922
17923
|
name: "pk-chatbot-part"
|
|
@@ -17924,7 +17925,7 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17924
17925
|
default: G(() => [(X(), I(Eb, {
|
|
17925
17926
|
key: `approval-${s}`,
|
|
17926
17927
|
part: o,
|
|
17927
|
-
actionable: e.interactive === !0 && (J(
|
|
17928
|
+
actionable: e.interactive === !0 && (J(Vn)(o) || Me(m)),
|
|
17928
17929
|
"call-verdict": e.confirmVerdictsOnCall?.get(o.toolCallId ?? ""),
|
|
17929
17930
|
onRespond: (e) => f(o, e)
|
|
17930
17931
|
}, null, 8, [
|
|
@@ -17940,7 +17941,7 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17940
17941
|
name: "pk-chatbot-part"
|
|
17941
17942
|
}, {
|
|
17942
17943
|
default: G(() => [N(Gb, {
|
|
17943
|
-
question: e.hostConfirmation?.question ?? J(i)("toolApproval.hostCall", { name: J(
|
|
17944
|
+
question: e.hostConfirmation?.question ?? J(i)("toolApproval.hostCall", { name: J(Nn)(J(i), o) }),
|
|
17944
17945
|
details: e.hostConfirmation?.details,
|
|
17945
17946
|
unchanged: e.hostConfirmation?.unchanged,
|
|
17946
17947
|
onRespond: n[0] ||= (e) => r("host-confirm-respond", e)
|
|
@@ -17957,10 +17958,10 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17957
17958
|
}, {
|
|
17958
17959
|
default: G(() => [R("div", nS, [R("div", rS, [
|
|
17959
17960
|
N(l, {
|
|
17960
|
-
name: Je(m, o) ? "loading-loop" : J(
|
|
17961
|
+
name: Je(m, o) ? "loading-loop" : J(Sr)(o) ?? "ri:apps-line",
|
|
17961
17962
|
class: "shrink-0"
|
|
17962
17963
|
}, null, 8, ["name"]),
|
|
17963
|
-
R("span", iS, H(J(
|
|
17964
|
+
R("span", iS, H(J(Nn)(J(i), o, J(c))), 1),
|
|
17964
17965
|
Xe(m, o) ? (X(), Y("span", aS, " · " + H(Xe(m, o)), 1)) : K("", !0)
|
|
17965
17966
|
]), u(o)?.length ? (X(), I(g, {
|
|
17966
17967
|
key: 0,
|
|
@@ -17977,19 +17978,19 @@ var Kx = ["aria-busy"], qx = {
|
|
|
17977
17978
|
appear: "",
|
|
17978
17979
|
name: "pk-chatbot-part"
|
|
17979
17980
|
}, {
|
|
17980
|
-
default: G(() => [!J(d)[o.type] && J(xb)[J(
|
|
17981
|
-
key: `component-${s}-${J(
|
|
17981
|
+
default: G(() => [!J(d)[o.type] && J(xb)[J(rr)(o)] ? (X(), I(Be(J(xb)[J(rr)(o)]), Ie({
|
|
17982
|
+
key: `component-${s}-${J($n)(o)}`,
|
|
17982
17983
|
part: o
|
|
17983
17984
|
}, { ref_for: !0 }, ue(o)), null, 16, ["part"])) : Ae(t.$slots, o.type, Ie({ ref_for: !0 }, {
|
|
17984
17985
|
message: p,
|
|
17985
17986
|
part: o,
|
|
17986
17987
|
index: m,
|
|
17987
17988
|
isLoading: T.value
|
|
17988
|
-
}), () => [e.showAllMessageParts ? (X(), Y("div", oS, [R("div", sS, [J(
|
|
17989
|
+
}), () => [e.showAllMessageParts ? (X(), Y("div", oS, [R("div", sS, [J(Sr)(o) ? (X(), I(l, {
|
|
17989
17990
|
key: 0,
|
|
17990
|
-
name: J(
|
|
17991
|
+
name: J(Sr)(o),
|
|
17991
17992
|
class: "shrink-0"
|
|
17992
|
-
}, null, 8, ["name"])) : K("", !0), R("span", cS, H(J(
|
|
17993
|
+
}, null, 8, ["name"])) : K("", !0), R("span", cS, H(J(xr)(o, {
|
|
17993
17994
|
t: J(i),
|
|
17994
17995
|
te: J(a)
|
|
17995
17996
|
})), 1)])])) : K("", !0)], void 0, 1)]),
|
|
@@ -18051,7 +18052,7 @@ var Kx = ["aria-busy"], qx = {
|
|
|
18051
18052
|
key: 0,
|
|
18052
18053
|
markdown: ye.value.text,
|
|
18053
18054
|
"is-dark": e.isDark,
|
|
18054
|
-
"tail-length": J(
|
|
18055
|
+
"tail-length": J(or),
|
|
18055
18056
|
"inner-class": "wysiwyg",
|
|
18056
18057
|
class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
|
|
18057
18058
|
}, null, 8, [
|
|
@@ -18383,7 +18384,7 @@ V(), F();
|
|
|
18383
18384
|
var LS = ["type"], RS = {
|
|
18384
18385
|
key: 0,
|
|
18385
18386
|
class: "pk-chat-button__label"
|
|
18386
|
-
}, zS = /*#__PURE__*/
|
|
18387
|
+
}, zS = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
18387
18388
|
__name: "PkChatButton",
|
|
18388
18389
|
props: {
|
|
18389
18390
|
icon: { type: String },
|
|
@@ -18402,7 +18403,7 @@ var LS = ["type"], RS = {
|
|
|
18402
18403
|
},
|
|
18403
18404
|
setup(e) {
|
|
18404
18405
|
return (t, n) => {
|
|
18405
|
-
let r =
|
|
18406
|
+
let r = Cn;
|
|
18406
18407
|
return X(), Y("button", {
|
|
18407
18408
|
class: Oe(["pk-chat-button", [e.modifiers ? `pk-chat-button--${e.modifiers}` : void 0, { "pk-chat-button--labelled": e.label }]]),
|
|
18408
18409
|
type: e.type
|
|
@@ -18530,7 +18531,7 @@ var QS = { class: "pk-chatbot-input" }, $S = {
|
|
|
18530
18531
|
], dC = {
|
|
18531
18532
|
key: 5,
|
|
18532
18533
|
class: "pk-chatbot-input__suggestion-key"
|
|
18533
|
-
}, fC = ["id"], pC = ["id"], mC = { class: "opacity-60" }, hC = /*#__PURE__*/
|
|
18534
|
+
}, fC = ["id"], pC = ["id"], mC = { class: "opacity-60" }, hC = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
18534
18535
|
__name: "PkChatbotInput",
|
|
18535
18536
|
props: /*@__PURE__*/ Pe({
|
|
18536
18537
|
placeholder: { type: String },
|
|
@@ -18610,7 +18611,7 @@ var QS = { class: "pk-chatbot-input" }, $S = {
|
|
|
18610
18611
|
}, ge = (e) => {
|
|
18611
18612
|
let t = a.value.find((t) => t.id === e);
|
|
18612
18613
|
t && (URL.revokeObjectURL(t.localUrl), a.value = a.value.filter((t) => t.id !== e), o("remove-attachment", t));
|
|
18613
|
-
}, k = z(), _e = B(() => a.value.find((e) => e.id === k.value)), ve = lt(), ye = z(!1), be = B(() => _e.value?.file ?? ve.value), xe = (e) => !!s.editableImages && e.state !== "uploading" &&
|
|
18614
|
+
}, k = z(), _e = B(() => a.value.find((e) => e.id === k.value)), ve = lt(), ye = z(!1), be = B(() => _e.value?.file ?? ve.value), xe = (e) => !!s.editableImages && e.state !== "uploading" && lr(e.file.type), Se = () => {
|
|
18614
18615
|
k.value = void 0, ve.value = void 0, ye.value = !1;
|
|
18615
18616
|
}, Ce = async () => {
|
|
18616
18617
|
fe.value = !1;
|
|
@@ -18670,10 +18671,10 @@ var QS = { class: "pk-chatbot-input" }, $S = {
|
|
|
18670
18671
|
l.value && (l.value.value = "", IS.update(l.value));
|
|
18671
18672
|
}));
|
|
18672
18673
|
}, P = (e) => {
|
|
18673
|
-
e.shiftKey ||
|
|
18674
|
+
e.shiftKey || cr(e) || (e.preventDefault(), Le());
|
|
18674
18675
|
}, Re = (e) => {
|
|
18675
18676
|
let t = ae.value;
|
|
18676
|
-
!t || e.shiftKey || e.altKey || e.ctrlKey || e.metaKey ||
|
|
18677
|
+
!t || e.shiftKey || e.altKey || e.ctrlKey || e.metaKey || cr(e) || (e.preventDefault(), p.value = t, g(), ke(() => {
|
|
18677
18678
|
l.value && (IS.update(l.value), l.value.setSelectionRange(t.length, t.length));
|
|
18678
18679
|
}));
|
|
18679
18680
|
};
|
|
@@ -18695,7 +18696,7 @@ var QS = { class: "pk-chatbot-input" }, $S = {
|
|
|
18695
18696
|
k.value = void 0, ve.value = e, ye.value = !1;
|
|
18696
18697
|
}
|
|
18697
18698
|
}), (t, n) => {
|
|
18698
|
-
let i =
|
|
18699
|
+
let i = Cn, s = bt, m = wn, h = xn;
|
|
18699
18700
|
return X(), Y("div", QS, [
|
|
18700
18701
|
Pe.value.length ? (X(), Y("div", $S, [(X(!0), Y(L, null, ze(Pe.value, (e) => (X(), Y("div", {
|
|
18701
18702
|
key: e.id,
|
|
@@ -18706,7 +18707,7 @@ var QS = { class: "pk-chatbot-input" }, $S = {
|
|
|
18706
18707
|
name: e.icon,
|
|
18707
18708
|
class: "pk-chatbot-input__notice-icon"
|
|
18708
18709
|
}, null, 8, ["name"])) : K("", !0),
|
|
18709
|
-
e.markdown ? (X(), I(
|
|
18710
|
+
e.markdown ? (X(), I(Or, {
|
|
18710
18711
|
key: 1,
|
|
18711
18712
|
markdown: e.markdown,
|
|
18712
18713
|
class: "wysiwyg pk-chatbot-input__notice-text"
|
|
@@ -18764,7 +18765,7 @@ var QS = { class: "pk-chatbot-input" }, $S = {
|
|
|
18764
18765
|
onClick: n[1] ||= (e) => o("remove-pointer")
|
|
18765
18766
|
}, null, 8, ["title"])
|
|
18766
18767
|
])) : K("", !0),
|
|
18767
|
-
a.value.length ? (X(), Y("div", iC, [(X(!0), Y(L, null, ze(a.value, (t) => (X(), I(
|
|
18768
|
+
a.value.length ? (X(), Y("div", iC, [(X(!0), Y(L, null, ze(a.value, (t) => (X(), I(kr, {
|
|
18768
18769
|
key: t.id,
|
|
18769
18770
|
"media-type": t.mediaSource?.mimeType ?? t.file.type,
|
|
18770
18771
|
url: t.localUrl,
|
|
@@ -18963,14 +18964,14 @@ var QS = { class: "pk-chatbot-input" }, $S = {
|
|
|
18963
18964
|
}), [["styles", [".pk-chatbot-input{margin-inline:var(--spacing-sm);margin-bottom:var(--spacing-sm);flex-direction:column;display:flex;position:relative}.pk-chatbot-input__notice{padding:var(--spacing-10) var(--spacing-sm);gap:var(--spacing-10);background-color:var(--color-surface-1);border-top-left-radius:var(--rounded-xl);border-top-right-radius:var(--rounded-xl);transition-property:var(--transition-property-all);transition-duration:var(--duration-300);transition-timing-function:var(--ease-in-out);font-size:var(--text-12);color:var(--color-word-3);flex-direction:column;display:flex;position:relative}.pk-chatbot-input__notice:after{content:\"\";left:0;right:0;bottom:calc(-1 * var(--spacing-12));height:var(--spacing-12);background-color:var(--color-surface-1);z-index:1;display:block;position:absolute}.pk-chatbot-input__notice-item{align-items:flex-start;gap:var(--spacing-sm);display:flex}.pk-chatbot-input__notice-item+.pk-chatbot-input__notice-item{padding-top:var(--spacing-10);border-top:1px solid var(--color-surface-3)}.pk-chatbot-input__notice-icon{width:var(--spacing-18);height:var(--spacing-18);flex-shrink:0}.pk-chatbot-input__notice-text{flex:1;min-width:0}.pk-chatbot-input__notice-action{font-size:inherit;flex-shrink:0}.pk-chatbot-input__form{z-index:1;border-radius:var(--rounded-xl);border:1px solid var(--input-border-color);background-color:var(--color-surface);padding:var(--spacing-14);box-shadow:var(--shadow-lg);font-size:var(--text-16);gap:var(--spacing-xs);transition:var(--input-transition);flex-direction:column;display:flex;position:relative}@media (width>=576px){.pk-chatbot-input__form{font-size:var(--text-14);padding:var(--spacing-10)}}.pk-chatbot-input__form:has(:focus-within){border-color:var(--input-focus-color);box-shadow:var(--shadow-lg), var(--input-focus-ring)}.pk-chatbot-input__fieldset{align-items:center;gap:var(--spacing-xs);flex:1;display:flex}@media (pointer:coarse){.pk-chatbot-input__fieldset{gap:var(--spacing-12)}}.pk-chatbot-input__content{gap:var(--spacing-4);flex-direction:column;flex:1;min-width:0;display:flex;overflow:hidden}.pk-chatbot-input__textarea{resize:none;width:100%;max-height:200px;color:var(--color-word-1);background-color:var(--color-surface);border:none;outline:none;display:block}.pk-chatbot-input__textarea::placeholder{color:var(--color-word-3)}.pk-chatbot-input__suggestion-key{flex-shrink:0;align-self:center;position:relative}.pk-chatbot-input__suggestion-key kbd{padding-inline:var(--spacing-6);padding-block:var(--spacing-2);border:1px solid var(--color-surface-3);border-radius:var(--rounded-md);font-family:var(--font-mono);font-size:var(--text-12);color:var(--color-word-3);background-color:var(--color-surface-1);line-height:1;display:block}.pk-chatbot-input__attachments{gap:var(--spacing-12);padding-bottom:var(--spacing-xs);border-bottom:1px solid var(--color-surface-2);flex-wrap:wrap;display:flex}.pk-chatbot-input__pointer{align-items:center;gap:var(--spacing-6);max-width:100%;padding:var(--spacing-4) var(--spacing-4) var(--spacing-4) var(--spacing-8);border:1px solid var(--color-surface-3);border-radius:var(--rounded-full);margin-bottom:var(--spacing-8);background-color:var(--color-surface-1);color:var(--color-word-2);font-size:var(--text-12);align-self:flex-start;display:flex}.pk-chatbot-input__pointer-icon{width:var(--spacing-14);height:var(--spacing-14);flex-shrink:0}.pk-chatbot-input__mode{align-items:center;gap:var(--spacing-6);padding:var(--spacing-4) var(--spacing-8);border:1px solid var(--color-surface-3);border-radius:var(--rounded-full);margin-bottom:var(--spacing-8);background-color:var(--color-surface-1);color:var(--color-word-2);font:inherit;font-size:var(--text-12);cursor:pointer;align-self:flex-start;display:flex}.pk-chatbot-input__mode:hover{background-color:var(--color-surface-2)}.pk-chatbot-input__mode:focus-visible{outline:2px solid var(--color-brand);outline-offset:2px}.pk-chatbot-input__pointer-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.pk-chatbot-input__counter{background-color:var(--color-surface-1);border:1px solid var(--color-surface-3);border-radius:var(--rounded-md);font-size:var(--text-12);color:var(--color-word-3);padding-inline:var(--spacing-6);padding-block:var(--spacing-4);z-index:1;font-variant-numeric:tabular-nums;line-height:1;font-family:var(--font-mono);font-weight:var(--font-bold)}.pk-chatbot-input__counter--over{color:var(--u-danger-text,var(--color-danger));border-color:var(--color-danger-lighten-5);font-weight:var(--font-bold)}"]]]);
|
|
18964
18965
|
// ../../packages/components/src/chat/PkChatbotQueuedMessages.vue?vue&type=script&setup=true&lang.ts
|
|
18965
18966
|
V(), F();
|
|
18966
|
-
var gC = ["aria-label"], _C = { class: "pk-chatbot-queued__label" }, vC = { class: "pk-chatbot-queued__bubble" }, yC = { class: "pk-chatbot-queued__text" }, bC = /*#__PURE__*/
|
|
18967
|
+
var gC = ["aria-label"], _C = { class: "pk-chatbot-queued__label" }, vC = { class: "pk-chatbot-queued__bubble" }, yC = { class: "pk-chatbot-queued__text" }, bC = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
18967
18968
|
__name: "PkChatbotQueuedMessages",
|
|
18968
18969
|
props: { messages: { type: Array } },
|
|
18969
18970
|
emits: ["edit", "remove"],
|
|
18970
18971
|
setup(e, { emit: t }) {
|
|
18971
18972
|
let n = t;
|
|
18972
18973
|
return (t, r) => {
|
|
18973
|
-
let i = bt, a =
|
|
18974
|
+
let i = bt, a = _n;
|
|
18974
18975
|
return X(), Y("ol", {
|
|
18975
18976
|
class: "pk-chatbot-queued",
|
|
18976
18977
|
"aria-label": t.$t("label.queuedMessages")
|
|
@@ -19008,7 +19009,7 @@ var gC = ["aria-label"], _C = { class: "pk-chatbot-queued__label" }, vC = { clas
|
|
|
19008
19009
|
}), [["styles", [".pk-chatbot-queued{align-items:flex-end;gap:var(--spacing-8);width:100%;max-width:768px;padding:0 var(--spacing-md) var(--spacing-sm);flex-direction:column;margin:0 auto;list-style:none;display:flex}.pk-chatbot-queued__item{align-items:flex-end;gap:var(--spacing-4);flex-direction:column;max-width:85%;display:flex}.pk-chatbot-queued__label{font-size:var(--text-12);color:var(--color-word-3)}.pk-chatbot-queued__bubble{align-items:flex-start;gap:var(--spacing-8);padding:var(--spacing-8) var(--spacing-8) var(--spacing-8) var(--spacing-12);border:1px dashed var(--color-surface-4);border-radius:var(--rounded-xl) var(--rounded-xl) 0 var(--rounded-xl);background-color:var(--color-surface);color:var(--color-word-2);display:flex}.pk-chatbot-queued__text{min-width:0;font-size:var(--text-14);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere;flex:1;margin:0}.pk-chatbot-queued__actions{flex-shrink:0}"]]]);
|
|
19009
19010
|
// ../../packages/components/src/chat/PkChatbotEmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
19010
19011
|
V();
|
|
19011
|
-
var xC = { class: "pk-chatbot-empty-state" }, SC = /*#__PURE__*/
|
|
19012
|
+
var xC = { class: "pk-chatbot-empty-state" }, SC = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
19012
19013
|
__name: "PkChatbotEmptyState",
|
|
19013
19014
|
props: {
|
|
19014
19015
|
greeting: { type: String },
|
|
@@ -19021,7 +19022,7 @@ var xC = { class: "pk-chatbot-empty-state" }, SC = /*#__PURE__*/ wr(/* @__PURE__
|
|
|
19021
19022
|
class: "pk-chatbot-empty-state__avatar",
|
|
19022
19023
|
"img-src": e.logo,
|
|
19023
19024
|
name: e.name
|
|
19024
|
-
}, null, 8, ["img-src", "name"])) : K("", !0), e.greeting ? (X(), I(
|
|
19025
|
+
}, null, 8, ["img-src", "name"])) : K("", !0), e.greeting ? (X(), I(Or, {
|
|
19025
19026
|
key: 1,
|
|
19026
19027
|
markdown: e.greeting,
|
|
19027
19028
|
animation: null,
|
|
@@ -19031,7 +19032,7 @@ var xC = { class: "pk-chatbot-empty-state" }, SC = /*#__PURE__*/ wr(/* @__PURE__
|
|
|
19031
19032
|
}), [["styles", [".pk-chatbot-empty-state{align-items:center;gap:var(--spacing-sm);padding:var(--spacing-md);text-align:center;flex-direction:column;display:flex;position:relative}.pk-chatbot--phone .pk-chatbot-empty-state{padding-inline:var(--spacing-56)}.pk-chatbot-empty-state__avatar{width:var(--spacing-64);height:var(--spacing-64);font-size:var(--text-20)}.pk-chatbot:not(.pk-chatbot--tight) .pk-chatbot-empty-state__avatar{display:none}.pk-chatbot-empty-state__greeting{font-size:var(--text-28);font-weight:var(--font-light);color:var(--color-word-1);text-wrap:balance}.pk-chatbot-empty-state__greeting :first-child{margin-top:0}.pk-chatbot-empty-state__greeting :last-child{margin-bottom:0}.pk-chatbot-empty-state__avatar,.pk-chatbot-empty-state__greeting{animation:pk-chatbot-greeting-enter .6s var(--ease-out) both}@media (prefers-reduced-motion:reduce){.pk-chatbot-empty-state__avatar,.pk-chatbot-empty-state__greeting{animation:none}}@keyframes pk-chatbot-greeting-enter{0%{opacity:0;transform:translateY(var(--spacing-16))}}"]]]);
|
|
19032
19033
|
// ../../packages/components/src/chat/PkVoiceOrb.vue?vue&type=script&setup=true&lang.ts
|
|
19033
19034
|
V(), F();
|
|
19034
|
-
var CC = .18, wC = .35, TC = /*#__PURE__*/
|
|
19035
|
+
var CC = .18, wC = .35, TC = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
19035
19036
|
__name: "PkVoiceOrb",
|
|
19036
19037
|
props: {
|
|
19037
19038
|
sample: { type: Function },
|
|
@@ -19100,7 +19101,7 @@ var EC = {
|
|
|
19100
19101
|
key: 0,
|
|
19101
19102
|
class: "pk-voice-session__live-dot",
|
|
19102
19103
|
"aria-hidden": "true"
|
|
19103
|
-
}, kC = ["title"], AC = ["title"], jC = { class: "pk-voice-session__actions" }, MC = /*#__PURE__*/
|
|
19104
|
+
}, kC = ["title"], AC = ["title"], jC = { class: "pk-voice-session__actions" }, MC = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
19104
19105
|
__name: "PkVoiceSession",
|
|
19105
19106
|
props: {
|
|
19106
19107
|
state: { type: String },
|
|
@@ -19127,7 +19128,7 @@ var EC = {
|
|
|
19127
19128
|
if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
|
|
19128
19129
|
});
|
|
19129
19130
|
return (t, n) => {
|
|
19130
|
-
let u =
|
|
19131
|
+
let u = Cn;
|
|
19131
19132
|
return X(), Y("div", { class: Oe(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
|
|
19132
19133
|
e.error ? (X(), Y("span", EC, [N(u, { name: "ri:error-warning-line" })])) : (X(), I(TC, {
|
|
19133
19134
|
key: 1,
|
|
@@ -19193,7 +19194,7 @@ V(), F(), U();
|
|
|
19193
19194
|
var NC = {
|
|
19194
19195
|
class: "pk-chatbot-wakeup-bar",
|
|
19195
19196
|
role: "status"
|
|
19196
|
-
}, PC = { class: "pk-chatbot-wakeup-bar__text" }, FC = { class: "pk-chatbot-wakeup-bar__reason" }, IC = /*#__PURE__*/
|
|
19197
|
+
}, PC = { class: "pk-chatbot-wakeup-bar__text" }, FC = { class: "pk-chatbot-wakeup-bar__reason" }, IC = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
19197
19198
|
__name: "PkChatbotWakeupBar",
|
|
19198
19199
|
props: {
|
|
19199
19200
|
pending: { type: null },
|
|
@@ -19214,7 +19215,7 @@ var NC = {
|
|
|
19214
19215
|
})) && r("stop");
|
|
19215
19216
|
};
|
|
19216
19217
|
return (t, n) => {
|
|
19217
|
-
let r =
|
|
19218
|
+
let r = Cn, a = bt;
|
|
19218
19219
|
return X(), Y("div", NC, [
|
|
19219
19220
|
N(r, {
|
|
19220
19221
|
name: o.value ? "ri:calendar-schedule-line" : "ri:alarm-line",
|
|
@@ -19513,7 +19514,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19513
19514
|
}, tw = {
|
|
19514
19515
|
key: 0,
|
|
19515
19516
|
class: "pk-chatbot-view-chat__drop-overlay"
|
|
19516
|
-
}, nw = 1e3, rw = 3e3, iw = 6e4, aw = 3e5, ow = 6e5, sw = /*#__PURE__*/
|
|
19517
|
+
}, nw = 1e3, rw = 3e3, iw = 6e4, aw = 3e5, ow = 6e5, sw = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
19517
19518
|
__name: "PkChatbotViewChat",
|
|
19518
19519
|
props: {
|
|
19519
19520
|
agentId: { type: String },
|
|
@@ -19526,8 +19527,8 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19526
19527
|
"selection-action"
|
|
19527
19528
|
],
|
|
19528
19529
|
setup(e, { emit: t }) {
|
|
19529
|
-
let n = A(() => import("./_chunks/PkToolShowForm-DeG_AzO9.js")), r = A(() => import("./_chunks/PkToolShowContactForm-BXsvfCKR.js")), i = A(() => import("./_chunks/PkToolShowSuggestedReply-BYoW-L6k.js")), a = A(() => import("./_chunks/PkToolShowSources-
|
|
19530
|
-
Ce(
|
|
19530
|
+
let n = A(() => import("./_chunks/PkToolShowForm-DeG_AzO9.js")), r = A(() => import("./_chunks/PkToolShowContactForm-BXsvfCKR.js")), i = A(() => import("./_chunks/PkToolShowSuggestedReply-BYoW-L6k.js")), a = A(() => import("./_chunks/PkToolShowSources-D5gh7FtU.js")), o = A(() => import("./_chunks/PkToolRequestGeolocation-Dj5OxEMP.js")), s = A(() => import("./_chunks/PkToolRequestOAuthConnection-Cj_IYnrW.js")), c = A(() => import("./_chunks/PkToolShowLocation-PThC5tCV.js")), l = A(() => import("./_chunks/PkToolShowChart-BalU3bxm.js")), u = A(() => import("./_chunks/PkToolShowDiagram-j3TTzZ5I.js")), d = A(() => import("./_chunks/PkToolChatFile-BzN4fMaY.js")), f = A(() => import("./_chunks/PkToolShareDocument-CYBU4LPO.js")), p = A(() => import("./_chunks/PkFilePreview-BrWWeK4E.js").then((e) => e.n)), m = A(() => import("./_chunks/PkFilePreviewDialog-BRZH_LxY.js")), h = e, g = t, _ = Qp(h.agentId), { isReadOnlyChat: v, chatProjectId: y, agentInterface: b, agentFileUpload: x, agentType: S, agentVoice: C, actions: ee, revisedAnswers: w, messages: te, chat: T, messageFeedbacks: ne, feedbackDialogMessage: re, isFeedbackSubmitting: ie, isFeedbackSubmitted: ae, feedbackSubmitError: E, isLeadSubmitted: D, isLoadingSubmitLead: oe, submitLeadError: se, input: ce, inputMessagePlaceholder: O, isConversationBlocked: le, baseUrl: ue, pendingAttachments: de, isAttachmentLimitReached: fe, fileLimitError: pe, apiClient: me, isDark: he, hostToolsPending: ge, pageNoticeLevel: k, hostConfirmation: _e, agentPageAccess: ve, hostStepTitles: ye, hostStepChanges: be, confirmationMode: xe, canQueue: Se, queuedMessages: we, backgroundAnswers: Te, inputFocusRequest: Ee, pagePointer: De, pagePointerAvailable: ke, pagePointing: Ae, agentSelectionActions: Me } = mi(_);
|
|
19531
|
+
Ce(hr, ye), Ce(dr, be);
|
|
19531
19532
|
let Ne = Ve("inputEl");
|
|
19532
19533
|
M(Ee, () => {
|
|
19533
19534
|
Ne.value?.focus();
|
|
@@ -19541,7 +19542,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19541
19542
|
let e = j.value?.allowedMimeTypes ?? [];
|
|
19542
19543
|
return !!j.value?.enabled && (!e.length || e.some((e) => e.startsWith("image/")));
|
|
19543
19544
|
});
|
|
19544
|
-
|
|
19545
|
+
jr({
|
|
19545
19546
|
available: () => !!Ne.value && Fe.value && !fe.value,
|
|
19546
19547
|
annotate: (e) => Ne.value?.annotateImage(e)
|
|
19547
19548
|
});
|
|
@@ -19558,13 +19559,13 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19558
19559
|
message: r
|
|
19559
19560
|
});
|
|
19560
19561
|
}, { immediate: !0 });
|
|
19561
|
-
let dt = B(() => b.value?.nextMessageSuggestion && q.value?.messageId === lt.value ? q.value?.message : void 0), ft =
|
|
19562
|
+
let dt = B(() => b.value?.nextMessageSuggestion && q.value?.messageId === lt.value ? q.value?.message : void 0), ft = Dn(() => ve.value?.notice), pt = B(() => k.value ? ft.value || at(`message.pageAccessNotice.${k.value}`) : void 0), ht = B(() => {
|
|
19562
19563
|
let e = pe.value;
|
|
19563
19564
|
if (e) return e.reason === "per-chat" ? at("message.fileLimitPerChat", { max: e.max }) : at("message.fileLimitPerMessage", { max: e.max });
|
|
19564
19565
|
}), gt = B(() => Te.value.map(({ chatId: e, title: t }) => ({
|
|
19565
19566
|
id: e,
|
|
19566
19567
|
text: t ? at("message.backgroundAnswerReady", { title: t }) : at("message.backgroundAnswerReadyUntitled")
|
|
19567
|
-
}))), _t =
|
|
19568
|
+
}))), _t = Dn(() => b.value?.dismissableNotice), vt = B(() => te.value.some((e) => e.role === "user")), yt = B(() => h.modifier === "fullscreen" && !vt.value), xt = um(b, () => h.userName), St = Ve("chatViewEl"), Ct = zC(), wt = B(() => !!Ct?.value), Tt = B(() => Ct?.value ?? "body"), Dt = z(0), Ot = z(0);
|
|
19568
19569
|
kt([St, B(() => Ct?.value ?? void 0)], (e) => {
|
|
19569
19570
|
for (let t of e) {
|
|
19570
19571
|
let e = t.borderBoxSize?.[0]?.inlineSize ?? t.contentRect.width;
|
|
@@ -19677,19 +19678,19 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19677
19678
|
}
|
|
19678
19679
|
let xn = (e = 1200) => {
|
|
19679
19680
|
yn(e);
|
|
19680
|
-
},
|
|
19681
|
+
}, Sn, wn = LC({
|
|
19681
19682
|
fetchGrant: async () => {
|
|
19682
|
-
|
|
19683
|
+
Sn = _.voicePageTools();
|
|
19683
19684
|
let e = await me.value.createVoiceSession(h.agentId, _.localChatId, {
|
|
19684
19685
|
deviceContext: _.buildDeviceContext(),
|
|
19685
19686
|
externalContext: _.externalContext,
|
|
19686
|
-
pageTools:
|
|
19687
|
+
pageTools: Sn?.declaration,
|
|
19687
19688
|
..._.confirmationMode === "automatic" && { confirmations: "automatic" }
|
|
19688
19689
|
});
|
|
19689
19690
|
return e.chatId !== _.localChatId && (_.localChatId = e.chatId), e;
|
|
19690
19691
|
},
|
|
19691
19692
|
closeGrant: (e) => me.value.closeVoiceSession(h.agentId, e),
|
|
19692
|
-
clientTools: () =>
|
|
19693
|
+
clientTools: () => Sn?.clientTools,
|
|
19693
19694
|
onTranscript: (e) => {
|
|
19694
19695
|
e.role === "user" ? (dn.value = !0, tr(), Qe({
|
|
19695
19696
|
id: `${Np}user-${ju()}`,
|
|
@@ -19709,7 +19710,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19709
19710
|
}), M(() => wn.error.value, (e) => {
|
|
19710
19711
|
e && (dn.value = !1);
|
|
19711
19712
|
});
|
|
19712
|
-
let Tn = B(() => C.value?.enabled === !0),
|
|
19713
|
+
let Tn = B(() => C.value?.enabled === !0), En = B(() => wn.error.value ? "error" : wn.isConnecting.value ? "connecting" : wn.isSpeaking.value ? "speaking" : wn.isActive.value ? "listening" : "idle"), On = B(() => {
|
|
19713
19714
|
let e = wn.error.value;
|
|
19714
19715
|
if (e) return /took too long/i.test(e) ? at("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? at("message.voiceNoAnswer") : at("message.voiceInterrupted");
|
|
19715
19716
|
}), kn = B(() => wn.isSpeaking.value ? "output" : "input"), An = () => wn.readLevel(kn.value), jn = () => wn.readSpectrum(kn.value), Mn = async () => {
|
|
@@ -19721,7 +19722,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19721
19722
|
}, Fn = async () => {
|
|
19722
19723
|
wn.dismissError(), await wn.stop(), await Mn();
|
|
19723
19724
|
}, In = (e) => e?.toolCallId ?? "", Ln = z(/* @__PURE__ */ new Set()), Rn = (e) => Ln.value.has(In(e)), zn = z(/* @__PURE__ */ new Map()), Bn = (e, t) => wn.isActive.value ? (wn.sendUserMessage(t) && (Ln.value = new Set(Ln.value).add(In(e)), xn()), !0) : !1, Vn = (e, t, n) => {
|
|
19724
|
-
Bn(t,
|
|
19725
|
+
Bn(t, mr(t, n)) || Ke({
|
|
19725
19726
|
tool: e,
|
|
19726
19727
|
toolCallId: In(t),
|
|
19727
19728
|
output: n
|
|
@@ -19748,12 +19749,12 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19748
19749
|
}
|
|
19749
19750
|
};
|
|
19750
19751
|
for (let e of te.value) for (let n of e.parts) {
|
|
19751
|
-
if (
|
|
19752
|
-
t(n.filename,
|
|
19752
|
+
if (fr(n)) {
|
|
19753
|
+
t(n.filename, Yn(n)?.storedFileName);
|
|
19753
19754
|
continue;
|
|
19754
19755
|
}
|
|
19755
19756
|
let { type: e, state: r, output: i } = n;
|
|
19756
|
-
Kt.has(e) && r === "output-available" && i?.filename && t(
|
|
19757
|
+
Kt.has(e) && r === "output-available" && i?.filename && t(yr(i.filename, i.version), i.fileId);
|
|
19757
19758
|
}
|
|
19758
19759
|
return e;
|
|
19759
19760
|
}), Gn = B(() => le.value || v.value ? void 0 : (e) => {
|
|
@@ -19768,7 +19769,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19768
19769
|
toolCallId: In(e),
|
|
19769
19770
|
output: t
|
|
19770
19771
|
});
|
|
19771
|
-
},
|
|
19772
|
+
}, Jn = (e, t) => {
|
|
19772
19773
|
Bn(e, at("message.voiceConnectionDone")) || Ke({
|
|
19773
19774
|
tool: "requestOAuthConnection",
|
|
19774
19775
|
toolCallId: In(e),
|
|
@@ -19783,7 +19784,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19783
19784
|
je(() => {
|
|
19784
19785
|
ln = !0, vn();
|
|
19785
19786
|
});
|
|
19786
|
-
let { pendingWakeup: Zn, isStopping:
|
|
19787
|
+
let { pendingWakeup: Zn, isStopping: Qn, stop: er, spokenTurnStarted: tr, spokenTurnsWritten: nr, forgetSpokenTurns: rr } = KC({
|
|
19787
19788
|
agentId: () => h.agentId,
|
|
19788
19789
|
chatId: () => _.localChatId,
|
|
19789
19790
|
apiClient: () => me.value,
|
|
@@ -19792,7 +19793,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19792
19793
|
status: () => T.value.status
|
|
19793
19794
|
});
|
|
19794
19795
|
return (t, x) => {
|
|
19795
|
-
let S =
|
|
19796
|
+
let S = Cn, C = bt;
|
|
19796
19797
|
return X(), Y("div", {
|
|
19797
19798
|
ref_key: "chatViewEl",
|
|
19798
19799
|
ref: St,
|
|
@@ -19920,7 +19921,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19920
19921
|
"backend-url": J(ue),
|
|
19921
19922
|
"resolve-connection": (e) => J(me).getOAuthAuthorizeUrl(h.agentId, e),
|
|
19922
19923
|
"check-connection": (e) => J(me).getOAuthConnectionStatus(h.agentId, e),
|
|
19923
|
-
onConnected: (t) =>
|
|
19924
|
+
onConnected: (t) => Jn(e, t)
|
|
19924
19925
|
}, null, 8, [
|
|
19925
19926
|
"part",
|
|
19926
19927
|
"backend-url",
|
|
@@ -19959,7 +19960,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19959
19960
|
"is-dark": J(he)
|
|
19960
19961
|
}, null, 8, ["part", "is-dark"])]),
|
|
19961
19962
|
"tool-editSpreadsheet": G(({ part: e }) => [(X(), I(J(d), {
|
|
19962
|
-
key: J(
|
|
19963
|
+
key: J($n)(e),
|
|
19963
19964
|
part: e,
|
|
19964
19965
|
"file-url": Ie,
|
|
19965
19966
|
preview: Ht,
|
|
@@ -19971,7 +19972,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19971
19972
|
"restore"
|
|
19972
19973
|
]))]),
|
|
19973
19974
|
"tool-editWordDocument": G(({ part: e }) => [(X(), I(J(d), {
|
|
19974
|
-
key: J(
|
|
19975
|
+
key: J($n)(e),
|
|
19975
19976
|
part: e,
|
|
19976
19977
|
"file-url": Ie,
|
|
19977
19978
|
preview: Ht,
|
|
@@ -19983,7 +19984,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19983
19984
|
"restore"
|
|
19984
19985
|
]))]),
|
|
19985
19986
|
"tool-createSpreadsheet": G(({ part: e }) => [(X(), I(J(d), {
|
|
19986
|
-
key: J(
|
|
19987
|
+
key: J($n)(e),
|
|
19987
19988
|
part: e,
|
|
19988
19989
|
"file-url": Ie,
|
|
19989
19990
|
preview: Ht,
|
|
@@ -19995,7 +19996,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
19995
19996
|
"restore"
|
|
19996
19997
|
]))]),
|
|
19997
19998
|
"tool-createWordDocument": G(({ part: e }) => [(X(), I(J(d), {
|
|
19998
|
-
key: J(
|
|
19999
|
+
key: J($n)(e),
|
|
19999
20000
|
part: e,
|
|
20000
20001
|
"file-url": Ie,
|
|
20001
20002
|
preview: Ht,
|
|
@@ -20007,7 +20008,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
20007
20008
|
"restore"
|
|
20008
20009
|
]))]),
|
|
20009
20010
|
"tool-shareDocument": G(({ part: e }) => [(X(), I(J(f), {
|
|
20010
|
-
key: J(
|
|
20011
|
+
key: J($n)(e),
|
|
20011
20012
|
part: e,
|
|
20012
20013
|
"on-download": rn
|
|
20013
20014
|
}, null, 8, ["part"]))]),
|
|
@@ -20044,7 +20045,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
20044
20045
|
J(Zn) && !J(le) && !J(v) ? (X(), I(IC, {
|
|
20045
20046
|
key: 0,
|
|
20046
20047
|
pending: J(Zn),
|
|
20047
|
-
stopping: J(
|
|
20048
|
+
stopping: J(Qn),
|
|
20048
20049
|
onStop: J(er)
|
|
20049
20050
|
}, null, 8, [
|
|
20050
20051
|
"pending",
|
|
@@ -20064,7 +20065,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
20064
20065
|
label: J(at)("chatProjects.newChat"),
|
|
20065
20066
|
onClick: x[4] ||= (e) => J(_).startNewChat({ projectId: J(y) })
|
|
20066
20067
|
}, null, 8, ["label"])) : K("", !0)
|
|
20067
|
-
])) :
|
|
20068
|
+
])) : En.value === "idle" ? (X(), I(hC, {
|
|
20068
20069
|
key: 4,
|
|
20069
20070
|
ref_key: "inputEl",
|
|
20070
20071
|
ref: Ne,
|
|
@@ -20115,7 +20116,7 @@ var YC = { class: "pk-chatbot-view-chat__input-stage" }, XC = {
|
|
|
20115
20116
|
key: "0"
|
|
20116
20117
|
} : void 0]), 1032, /* @__PURE__ */ "modelValue.pending-attachments.placeholder.suggestion.dismissable-notice.page-notice.status.max-message-length.file-upload.attachment-limit-reached.attachment-notice.voice-enabled.queue-enabled.answer-notices.pointer-available.pointing.pointer.automatic-confirmations.onStopGeneration.onSubmit.onFileSelect.onRemoveAttachment.onReplaceAttachment.onRetryAttachment.onDismissAttachmentNotice.onDismissPageNotice.onOpenAnswerNotice.onDismissAnswerNotice".split("."))) : (X(), I(MC, {
|
|
20117
20118
|
key: 3,
|
|
20118
|
-
state:
|
|
20119
|
+
state: En.value,
|
|
20119
20120
|
sample: An,
|
|
20120
20121
|
spectrum: jn,
|
|
20121
20122
|
"remaining-seconds": J(wn).remainingSeconds.value,
|
|
@@ -20273,11 +20274,11 @@ var cw = { class: "flex flex-col flex-1 min-h-0 relative" }, lw = {
|
|
|
20273
20274
|
deleteChat: d
|
|
20274
20275
|
}), y = (e) => {
|
|
20275
20276
|
f.value || (o.value = e, c("chat"));
|
|
20276
|
-
}, b = (e) => o.value === e.id, x = (e, t) =>
|
|
20277
|
+
}, b = (e) => o.value === e.id, x = (e, t) => pn(An(e.filter((e) => e.role === t).slice(-1)[0]) || ""), S = (e) => {
|
|
20277
20278
|
m(e, x(e.messages, "assistant"));
|
|
20278
20279
|
};
|
|
20279
20280
|
return (e, t) => {
|
|
20280
|
-
let r =
|
|
20281
|
+
let r = Cn, o = bt, c = gn, u = _n, d = wn, m = xn;
|
|
20281
20282
|
return X(), Y("div", cw, [J(a) && J(i).length === 0 ? (X(), Y("div", lw, [R("div", uw, [(X(), Y(L, null, ze(5, (e) => R("div", {
|
|
20282
20283
|
key: e,
|
|
20283
20284
|
class: "vv-item vv-item--roomy vv-item--plain"
|
|
@@ -20336,7 +20337,7 @@ var cw = { class: "flex flex-col flex-1 min-h-0 relative" }, lw = {
|
|
|
20336
20337
|
"aria-current": b(e) ? "true" : void 0,
|
|
20337
20338
|
onClick: (t) => y(e.id)
|
|
20338
20339
|
}, [R("div", Sw, [R("div", Cw, [
|
|
20339
|
-
R("strong", ww, H(J(
|
|
20340
|
+
R("strong", ww, H(J(pn)(e.title) || x(e.messages, "assistant")), 1),
|
|
20340
20341
|
J(s).includes(e.id) ? (X(), I(r, {
|
|
20341
20342
|
key: 0,
|
|
20342
20343
|
name: "loading-loop",
|
|
@@ -20349,7 +20350,7 @@ var cw = { class: "flex flex-col flex-1 min-h-0 relative" }, lw = {
|
|
|
20349
20350
|
class: "text-word-3 text-smaller shrink-0",
|
|
20350
20351
|
date: e.lastMessageAt
|
|
20351
20352
|
}, null, 8, ["date"])
|
|
20352
|
-
]), R("span", Tw, H(J(
|
|
20353
|
+
]), R("span", Tw, H(J(pn)(J(Un)(e.summary, J(n))) || x(e.messages, "user")), 1)])], 8, xw), R("div", Ew, [N(m, Ie({ ref_for: !0 }, {
|
|
20353
20354
|
placement: "bottom-end",
|
|
20354
20355
|
modifiers: "menu",
|
|
20355
20356
|
flip: !0,
|
|
@@ -20390,7 +20391,7 @@ var kw = { class: "flex flex-col flex-1 min-h-0 relative" }, Aw = {
|
|
|
20390
20391
|
}, Fw = { class: "w-64 h-64 rounded-full bg-surface-1 border border-surface-3 flex items-center justify-center" }, Iw = { class: "text-14 text-word-3 leading-relaxed" }, Lw = {
|
|
20391
20392
|
key: 2,
|
|
20392
20393
|
class: "vv-item-group vv-item-group--fill"
|
|
20393
|
-
}, Rw = { class: "pk-chatbot-files vv-item-group__list overflow-y-auto" }, zw = ["title", "onClick"], Bw = { class: "pk-chatbot-files__icon" }, Vw = ["src", "onError"], Hw = { class: "flex flex-col min-w-0 flex-1" }, Uw = { class: "vv-item__title" }, Ww = { class: "text-12 text-word-3" }, Gw = { class: "vv-item__actions pk-chatbot-files__actions" }, Kw = /*#__PURE__*/
|
|
20394
|
+
}, Rw = { class: "pk-chatbot-files vv-item-group__list overflow-y-auto" }, zw = ["title", "onClick"], Bw = { class: "pk-chatbot-files__icon" }, Vw = ["src", "onError"], Hw = { class: "flex flex-col min-w-0 flex-1" }, Uw = { class: "vv-item__title" }, Ww = { class: "text-12 text-word-3" }, Gw = { class: "vv-item__actions pk-chatbot-files__actions" }, Kw = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
20394
20395
|
__name: "PkChatbotViewFiles",
|
|
20395
20396
|
props: { agentId: { type: String } },
|
|
20396
20397
|
setup(e) {
|
|
@@ -20408,7 +20409,7 @@ var kw = { class: "flex flex-col flex-1 min-h-0 relative" }, Aw = {
|
|
|
20408
20409
|
}
|
|
20409
20410
|
};
|
|
20410
20411
|
return (e, t) => {
|
|
20411
|
-
let r =
|
|
20412
|
+
let r = Cn, i = bt;
|
|
20412
20413
|
return X(), Y("div", kw, [J(o) && J(a).length === 0 ? (X(), Y("div", Aw, [R("div", jw, [(X(), Y(L, null, ze(4, (e) => R("div", {
|
|
20413
20414
|
key: e,
|
|
20414
20415
|
class: "vv-item vv-item--roomy vv-item--plain"
|
|
@@ -20433,7 +20434,7 @@ var kw = { class: "flex flex-col flex-1 min-h-0 relative" }, Aw = {
|
|
|
20433
20434
|
onError: (t) => J(l)(e)
|
|
20434
20435
|
}, null, 40, Vw)) : (X(), I(r, {
|
|
20435
20436
|
key: 1,
|
|
20436
|
-
name: J(
|
|
20437
|
+
name: J(Pr)(e.mimeType)
|
|
20437
20438
|
}, null, 8, ["name"]))]), R("span", Hw, [R("span", Uw, H(e.name || J(n)("userFiles.untitled")), 1), R("span", Ww, H([J(d)(e.createdAt), J(f)(e)].filter(Boolean).join(" · ")), 1)])], 8, zw), R("div", Gw, [N(i, {
|
|
20438
20439
|
modifiers: "action-quiet-small",
|
|
20439
20440
|
icon: "ri:download-line",
|
|
@@ -20484,7 +20485,7 @@ var qw = { class: "flex flex-col flex-1 min-h-0 overflow-y-auto" }, Jw = { class
|
|
|
20484
20485
|
}
|
|
20485
20486
|
}
|
|
20486
20487
|
return (e, t) => {
|
|
20487
|
-
let a =
|
|
20488
|
+
let a = Tn, p = Cn, m = bt;
|
|
20488
20489
|
return X(), Y("div", qw, [
|
|
20489
20490
|
R("div", Jw, [N(Ry, {
|
|
20490
20491
|
class: "w-64 h-64",
|
|
@@ -20539,7 +20540,7 @@ var oT = { class: "pk-chatbot__header-start" }, sT = ["title"], cT = { key: 1 },
|
|
|
20539
20540
|
}, mT = {
|
|
20540
20541
|
key: 7,
|
|
20541
20542
|
class: "pk-chatbot__footer"
|
|
20542
|
-
}, hT = /*#__PURE__*/
|
|
20543
|
+
}, hT = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
20543
20544
|
__name: "PkChatbot",
|
|
20544
20545
|
props: /*@__PURE__*/ Pe({
|
|
20545
20546
|
baseUrl: { type: String },
|
|
@@ -20590,7 +20591,7 @@ var oT = { class: "pk-chatbot__header-start" }, sT = ["title"], cT = { key: 1 },
|
|
|
20590
20591
|
], ["update:chatId"]),
|
|
20591
20592
|
setup(e, { expose: t, emit: n }) {
|
|
20592
20593
|
let r = He(), { t: i } = mt({ useScope: "global" }), a = e, o = n, s = Me(e, "chatId"), c = Qp(a.agentId);
|
|
20593
|
-
|
|
20594
|
+
Cr((e) => c.apiClient.resolveShortUrls(e));
|
|
20594
20595
|
let { messages: l, conversations: u, localChatId: d, activeView: f, chatError: p, isDark: m, pageAccessAvailable: h, pageAccessOff: g, confirmationsAvailable: _, confirmationMode: v } = mi(c), y = Ge(c, "agentId"), { startNewChat: b, stopGeneration: x, regenerate: S, navigate: C, sendMessage: ee, setPageAccessOff: w, setConfirmationMode: te } = c;
|
|
20595
20596
|
Fr(() => a.agentInterface, () => a.baseUrl);
|
|
20596
20597
|
let T = Se(Ty, void 0), ne = B(() => T?.canManageProfile.value ?? !1), re = B(() => !ne.value && (T?.canSignIn?.value ?? !1) && r["view-auth"] !== void 0), { openDialogConfirm: ie } = cm(), ae = B(() => !!T?.eraseConversations && !(T.isExternalAuth?.value ?? !1)), E = B(() => ae.value && f.value === "conversations" && u.value.length > 0), D = z(!1), oe = async () => {
|
|
@@ -20626,7 +20627,7 @@ var oT = { class: "pk-chatbot__header-start" }, sT = ["title"], cT = { key: 1 },
|
|
|
20626
20627
|
o("error", t);
|
|
20627
20628
|
} catch {}
|
|
20628
20629
|
});
|
|
20629
|
-
let se = B(() => a.modifier === "fullscreen"), ce = B(() => a.modifier === "panel"), O = Ve("chatbotEl"), { width: le } = Tt(O), ue = B(() => le.value > 0 && le.value < 576), de = B(() => le.value > 0 && le.value < 640), fe = B(() => le.value >= 848), pe = B(() => a.agentType === "reasoning"), me = B(() => pe.value && !l.value.some((e) => e.role === "user")), he = B(() => !ce.value && a.agentInterface?.useColorsForAgentHeader), ge = B(() => !ce.value || ne.value || re.value || h.value || _.value || a.closable || E.value || !!a.userFilesEnabled && !!d.value), k = B(() => ["theme", `theme--${m.value ? "dark" : "light"}`]), _e = B(() => a.agentInterface?.mainColor), ve = B(() =>
|
|
20630
|
+
let se = B(() => a.modifier === "fullscreen"), ce = B(() => a.modifier === "panel"), O = Ve("chatbotEl"), { width: le } = Tt(O), ue = B(() => le.value > 0 && le.value < 576), de = B(() => le.value > 0 && le.value < 640), fe = B(() => le.value >= 848), pe = B(() => a.agentType === "reasoning"), me = B(() => pe.value && !l.value.some((e) => e.role === "user")), he = B(() => !ce.value && a.agentInterface?.useColorsForAgentHeader), ge = B(() => !ce.value || ne.value || re.value || h.value || _.value || a.closable || E.value || !!a.userFilesEnabled && !!d.value), k = B(() => ["theme", `theme--${m.value ? "dark" : "light"}`]), _e = B(() => a.agentInterface?.mainColor), ve = B(() => zn(a.agentInterface?.textColor, _e.value)), ye = B(() => er(_e.value, ve.value)), be = Dn(() => a.agentInterface?.footerMessage), Ce = B(() => f.value === "conversations" ? i("label.conversations") : f.value === "profile" ? i("label.profile") : f.value === "auth" ? i("label.authentication") : f.value === "files" ? i("userFiles.chatFilesTitle") : a.name), A = B(() => l.value?.[l.value.length - 1]);
|
|
20630
20631
|
return t({
|
|
20631
20632
|
startNewChat: b,
|
|
20632
20633
|
regenerate: S,
|
|
@@ -20643,7 +20644,7 @@ var oT = { class: "pk-chatbot__header-start" }, sT = ["title"], cT = { key: 1 },
|
|
|
20643
20644
|
deep: !0,
|
|
20644
20645
|
immediate: !0
|
|
20645
20646
|
}), (t, n) => {
|
|
20646
|
-
let a = bt, s =
|
|
20647
|
+
let a = bt, s = Cn, c = wn, l = xn, u = _n, p = Tn;
|
|
20647
20648
|
return X(), Y("div", {
|
|
20648
20649
|
ref_key: "chatbotEl",
|
|
20649
20650
|
ref: O,
|
|
@@ -20830,7 +20831,7 @@ var oT = { class: "pk-chatbot__header-start" }, sT = ["title"], cT = { key: 1 },
|
|
|
20830
20831
|
name: e,
|
|
20831
20832
|
fn: G((n) => [Ae(t.$slots, e, Ee(De(n)))])
|
|
20832
20833
|
}))]), 1032, ["agent-id"])),
|
|
20833
|
-
J(be) ? (X(), Y("div", mT, [N(
|
|
20834
|
+
J(be) ? (X(), Y("div", mT, [N(Or, {
|
|
20834
20835
|
markdown: J(be),
|
|
20835
20836
|
class: "wysiwyg"
|
|
20836
20837
|
}, null, 8, ["markdown"])])) : K("", !0)
|
|
@@ -20844,7 +20845,7 @@ var gT = {
|
|
|
20844
20845
|
key: 0,
|
|
20845
20846
|
class: "pk-page-control-bar",
|
|
20846
20847
|
role: "status"
|
|
20847
|
-
}, _T = { class: "pk-page-control-bar__text" }, vT = /*#__PURE__*/
|
|
20848
|
+
}, _T = { class: "pk-page-control-bar__text" }, vT = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
20848
20849
|
__name: "PkPageControlBar",
|
|
20849
20850
|
props: {
|
|
20850
20851
|
active: { type: Boolean },
|
|
@@ -20853,7 +20854,7 @@ var gT = {
|
|
|
20853
20854
|
},
|
|
20854
20855
|
emits: ["stop"],
|
|
20855
20856
|
setup(e, { emit: t }) {
|
|
20856
|
-
let n = e, r = t, { left: i, right: a, top: o, bottom: s, update: c } = Dt(() => n.chat ?? void 0), { width: l } = xt(), u = B(() => !!n.chat &&
|
|
20857
|
+
let n = e, r = t, { left: i, right: a, top: o, bottom: s, update: c } = Dt(() => n.chat ?? void 0), { width: l } = xt(), u = B(() => !!n.chat && ur({
|
|
20857
20858
|
left: i.value,
|
|
20858
20859
|
right: a.value,
|
|
20859
20860
|
top: o.value,
|
|
@@ -20880,7 +20881,7 @@ var yT = { class: "pk-page-pointer" }, bT = {
|
|
|
20880
20881
|
key: 0,
|
|
20881
20882
|
class: "pk-page-pointer__bar",
|
|
20882
20883
|
role: "status"
|
|
20883
|
-
}, xT = { class: "pk-page-pointer__text" }, ST = /*#__PURE__*/
|
|
20884
|
+
}, xT = { class: "pk-page-pointer__text" }, ST = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
20884
20885
|
__name: "PkPagePointer",
|
|
20885
20886
|
props: {
|
|
20886
20887
|
picking: { type: Boolean },
|
|
@@ -20904,7 +20905,7 @@ var yT = { class: "pk-page-pointer" }, bT = {
|
|
|
20904
20905
|
left: i(n.bubble.left)
|
|
20905
20906
|
} : void 0);
|
|
20906
20907
|
return (t, n) => {
|
|
20907
|
-
let i =
|
|
20908
|
+
let i = Cn;
|
|
20908
20909
|
return X(), Y("div", yT, [
|
|
20909
20910
|
e.picking ? (X(), Y("div", {
|
|
20910
20911
|
key: 0,
|
|
@@ -20979,7 +20980,7 @@ var CT = { class: "pk-selection-answer__header" }, wT = { class: "pk-selection-a
|
|
|
20979
20980
|
}, MT = {
|
|
20980
20981
|
key: 3,
|
|
20981
20982
|
class: "pk-selection-answer__note"
|
|
20982
|
-
}, NT = { class: "pk-selection-answer__footer" }, PT = 384, FT = 160, IT = 8, LT = 8, RT = /*#__PURE__*/
|
|
20983
|
+
}, NT = { class: "pk-selection-answer__footer" }, PT = 384, FT = 160, IT = 8, LT = 8, RT = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
20983
20984
|
__name: "PkSelectionAnswerCard",
|
|
20984
20985
|
props: {
|
|
20985
20986
|
quote: { type: String },
|
|
@@ -21005,12 +21006,12 @@ var CT = { class: "pk-selection-answer__header" }, wT = { class: "pk-selection-a
|
|
|
21005
21006
|
"showContactForm",
|
|
21006
21007
|
"requestGeolocation",
|
|
21007
21008
|
"requestOAuthConnection"
|
|
21008
|
-
]), r = e, i = t, a = B(() => r.messages.flatMap((e) => e.parts)), o = (e) =>
|
|
21009
|
-
if (!
|
|
21010
|
-
let t =
|
|
21009
|
+
]), r = e, i = t, a = B(() => r.messages.flatMap((e) => e.parts)), o = (e) => In(e.parts).filter((e) => sr(e) && !!e.text.trim()), s = B(() => r.messages.some((e) => o(e).length > 0)), c = (e) => e.state, l = (e) => !c(e)?.startsWith("output"), u = B(() => r.confirming || a.value.some((e) => c(e) === "approval-requested" || Qn(e) && rr(e) === "requestConfirm" && l(e)) ? "confirm" : a.value.some((e) => {
|
|
21010
|
+
if (!Qn(e)) return !1;
|
|
21011
|
+
let t = rr(e);
|
|
21011
21012
|
return n.has(t) && (t === "showSuggestedReply" || l(e));
|
|
21012
|
-
}) ? "reply" : void 0), d = B(() => !u.value && a.value.some((e) =>
|
|
21013
|
-
let { top: e, left: t, maxHeight: n, maxWidth: i } =
|
|
21013
|
+
}) ? "reply" : void 0), d = B(() => !u.value && a.value.some((e) => fr(e) || Qn(e) && Gt(rr(e)))), f = Ve("cardEl"), { width: p, height: m } = Tt(f, void 0, { box: "border-box" }), h = B(() => {
|
|
21014
|
+
let { top: e, left: t, maxHeight: n, maxWidth: i } = Mn({
|
|
21014
21015
|
...r.anchor,
|
|
21015
21016
|
card: {
|
|
21016
21017
|
width: p.value,
|
|
@@ -21034,7 +21035,7 @@ var CT = { class: "pk-selection-answer__header" }, wT = { class: "pk-selection-a
|
|
|
21034
21035
|
return Ne(() => {
|
|
21035
21036
|
window.addEventListener("keydown", g), r.takeFocus && f.value?.focus();
|
|
21036
21037
|
}), je(() => window.removeEventListener("keydown", g)), (t, n) => {
|
|
21037
|
-
let r = bt, a =
|
|
21038
|
+
let r = bt, a = Cn;
|
|
21038
21039
|
return X(), Y("section", {
|
|
21039
21040
|
ref_key: "cardEl",
|
|
21040
21041
|
ref: f,
|
|
@@ -21063,7 +21064,7 @@ var CT = { class: "pk-selection-answer__header" }, wT = { class: "pk-selection-a
|
|
|
21063
21064
|
"is-streaming",
|
|
21064
21065
|
"has-content",
|
|
21065
21066
|
"is-dark"
|
|
21066
|
-
]), (X(!0), Y(L, null, ze(o(t), (t, r) => (X(), I(
|
|
21067
|
+
]), (X(!0), Y(L, null, ze(o(t), (t, r) => (X(), I(Or, {
|
|
21067
21068
|
key: r,
|
|
21068
21069
|
class: "wysiwyg pk-selection-answer__text",
|
|
21069
21070
|
markdown: t.text,
|
|
@@ -21094,7 +21095,7 @@ var CT = { class: "pk-selection-answer__header" }, wT = { class: "pk-selection-a
|
|
|
21094
21095
|
}), [["styles", [".pk-selection-answer{z-index:2147483647;gap:var(--spacing-8);width:min(26rem, 100vw - var(--spacing-16));max-height:min(24rem, 100dvh - var(--spacing-16));padding:var(--spacing-12);border:1px solid var(--color-surface-3);border-radius:var(--rounded-xl);background-color:var(--color-surface);color:var(--color-word-1);font-family:var(--font-sans);font-size:var(--text-14);box-shadow:var(--shadow-lg);flex-direction:column;display:flex;position:fixed}.pk-selection-answer__header,.pk-selection-answer__quote,.pk-selection-answer__footer{flex-shrink:0}.pk-selection-answer__header{justify-content:space-between;align-items:flex-start;gap:var(--spacing-8);display:flex}.pk-selection-answer__who{flex-direction:column;min-width:0;display:flex}.pk-selection-answer__name{text-overflow:ellipsis;white-space:nowrap;font-weight:var(--font-semibold);overflow:hidden}.pk-selection-answer__notice{color:var(--color-word-3);font-size:var(--text-12)}.pk-selection-answer__quote{padding-left:var(--spacing-8);border-left:var(--spacing-2) solid var(--color-surface-3);color:var(--color-word-2);-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;margin:0;font-style:italic;display:-webkit-box;overflow:hidden}.pk-selection-answer__quote:before{content:open-quote}.pk-selection-answer__quote:after{content:close-quote}.pk-selection-answer__body{gap:var(--spacing-8);overscroll-behavior:contain;flex-direction:column;flex:1;min-height:0;display:flex;overflow-y:auto}.pk-selection-answer__body>*{flex-shrink:0}.pk-selection-answer__status{align-items:center;gap:var(--spacing-6);color:var(--color-word-3);margin:0;display:flex}.pk-selection-answer__note{padding:var(--spacing-8);border-radius:var(--rounded);background-color:var(--color-surface-1);color:var(--color-word-2);margin:0}.pk-selection-answer__footer{justify-content:flex-end;gap:var(--spacing-8);flex-wrap:wrap;display:flex}"]]]);
|
|
21095
21096
|
// ../../packages/components/src/chat/PkHostCallConfirmDialog.vue?vue&type=script&setup=true&lang.ts
|
|
21096
21097
|
V(), ot(), F(), U();
|
|
21097
|
-
var zT = 16, BT = /*#__PURE__*/
|
|
21098
|
+
var zT = 16, BT = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
21098
21099
|
__name: "PkHostCallConfirmDialog",
|
|
21099
21100
|
props: {
|
|
21100
21101
|
question: { type: String },
|
|
@@ -21459,7 +21460,7 @@ var bE = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
21459
21460
|
}, OE = ["src", "alt"], kE = { class: "text-center leading-normal mb-lg" }, AE = {
|
|
21460
21461
|
key: 0,
|
|
21461
21462
|
class: "font-bold text-20 m-0"
|
|
21462
|
-
}, jE = { class: "text-14 text-word-3 text-center leading-normal mb-md" }, ME = { class: "flex justify-center mt-md" }, NE = { class: "mb-md" }, PE = { class: "mb-md" }, FE = { class: "mb-md" }, IE = { class: "vv-separator mt-xs py-xs" }, LE = { class: "pt-lg text-center text-word-3" }, RE = /*#__PURE__*/
|
|
21463
|
+
}, jE = { class: "text-14 text-word-3 text-center leading-normal mb-md" }, ME = { class: "flex justify-center mt-md" }, NE = { class: "mb-md" }, PE = { class: "mb-md" }, FE = { class: "mb-md" }, IE = { class: "vv-separator mt-xs py-xs" }, LE = { class: "pt-lg text-center text-word-3" }, RE = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
21463
21464
|
__name: "PkChatbotAuth",
|
|
21464
21465
|
props: /*@__PURE__*/ Pe({
|
|
21465
21466
|
branding: {
|
|
@@ -21496,7 +21497,7 @@ var bE = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
21496
21497
|
"update:success"
|
|
21497
21498
|
], ["update:errorMessage", "update:success"]),
|
|
21498
21499
|
setup(e, { emit: t }) {
|
|
21499
|
-
let { t: n } = mt({ useScope: "global" }), i = e, { canShowImage: o, onImageError: s } =
|
|
21500
|
+
let { t: n } = mt({ useScope: "global" }), i = e, { canShowImage: o, onImageError: s } = wr(), c = Me(e, "errorMessage"), l = Me(e, "success"), u = t, d = z("sign-in");
|
|
21500
21501
|
M(d, () => {
|
|
21501
21502
|
c.value = void 0, l.value = void 0;
|
|
21502
21503
|
});
|
|
@@ -21507,7 +21508,7 @@ var bE = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
21507
21508
|
email: E(),
|
|
21508
21509
|
password: xa,
|
|
21509
21510
|
rememberMe: r().default(!1)
|
|
21510
|
-
}), g = a({ email: E() }), { VvForm: _, VvFormField: v } =
|
|
21511
|
+
}), g = a({ email: E() }), { VvForm: _, VvFormField: v } = kn(m, { lazyLoad: !0 }), { VvForm: y, VvFormField: b, clear: x } = kn(Ca, { lazyLoad: !0 }), { VvForm: S, VvFormField: C, clear: ee } = kn(g, { lazyLoad: !0 });
|
|
21511
21512
|
M(l, (e) => {
|
|
21512
21513
|
e && (x(), ee());
|
|
21513
21514
|
});
|
|
@@ -21535,7 +21536,7 @@ var bE = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
21535
21536
|
function ie(e) {
|
|
21536
21537
|
u("social", e);
|
|
21537
21538
|
}
|
|
21538
|
-
let ae = B(() => !!i.twoFactorMethods?.length), D = z("totp"), { VvForm: oe, VvFormField: se, clear: ce } =
|
|
21539
|
+
let ae = B(() => !!i.twoFactorMethods?.length), D = z("totp"), { VvForm: oe, VvFormField: se, clear: ce } = kn(a({ code: h().trim().min(6).max(32) }), { lazyLoad: !0 });
|
|
21539
21540
|
M(() => i.twoFactorMethods, (e) => {
|
|
21540
21541
|
e?.length && (D.value = e.includes("totp") ? "totp" : "otp", ce(), D.value === "otp" && u("send-two-factor-code"));
|
|
21541
21542
|
}, { immediate: !0 });
|
|
@@ -21550,7 +21551,7 @@ var bE = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-f
|
|
|
21550
21551
|
});
|
|
21551
21552
|
}
|
|
21552
21553
|
return (t, r) => {
|
|
21553
|
-
let i =
|
|
21554
|
+
let i = Cn, a = bt, m = Tn, h = _n;
|
|
21554
21555
|
return X(), Y("div", bE, [R("div", xE, [N(W, {
|
|
21555
21556
|
name: "pk-flip",
|
|
21556
21557
|
mode: "out-in",
|
|
@@ -21824,10 +21825,10 @@ function VE(e, t) {
|
|
|
21824
21825
|
class: "pk-loader"
|
|
21825
21826
|
}, null, -1)]]);
|
|
21826
21827
|
}
|
|
21827
|
-
var HE = /*#__PURE__*/
|
|
21828
|
+
var HE = /*#__PURE__*/ Tr(BE, [["render", VE], ["styles", [zE]]]);
|
|
21828
21829
|
// ../../packages/components/src/chat/PkWelcomePopup.vue?vue&type=script&setup=true&lang.ts
|
|
21829
21830
|
V(), F(), ot(), U();
|
|
21830
|
-
var UE = { class: "welcome-popup__text" }, WE = ["aria-label"], GE = 100, KE = /*#__PURE__*/
|
|
21831
|
+
var UE = { class: "welcome-popup__text" }, WE = ["aria-label"], GE = 100, KE = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
21831
21832
|
__name: "PkWelcomePopup",
|
|
21832
21833
|
props: {
|
|
21833
21834
|
agentId: { type: String },
|
|
@@ -21843,7 +21844,7 @@ var UE = { class: "welcome-popup__text" }, WE = ["aria-label"], GE = 100, KE = /
|
|
|
21843
21844
|
},
|
|
21844
21845
|
emits: ["open"],
|
|
21845
21846
|
setup(e, { emit: t }) {
|
|
21846
|
-
let n = e, r = t, i =
|
|
21847
|
+
let n = e, r = t, i = Dn(() => n.message, "message.defaultAgentWelcome"), a = On(B(() => `${n.agentId}-welcome-popup-dismissed`), !1), o = z(!1), s = z(!1), c = z([]), l, u;
|
|
21847
21848
|
function d(e) {
|
|
21848
21849
|
c.value = [], s.value = !1;
|
|
21849
21850
|
let t = e.split(/(\s+)/), n = 0;
|
|
@@ -21901,7 +21902,7 @@ var qE = {
|
|
|
21901
21902
|
key: 0,
|
|
21902
21903
|
class: "pk-working-beam",
|
|
21903
21904
|
"aria-hidden": "true"
|
|
21904
|
-
}, JE = /*#__PURE__*/
|
|
21905
|
+
}, JE = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
21905
21906
|
__name: "PkWorkingBeam",
|
|
21906
21907
|
props: { active: { type: Boolean } },
|
|
21907
21908
|
setup(e) {
|
|
@@ -21914,7 +21915,7 @@ var qE = {
|
|
|
21914
21915
|
// ../../packages/components/src/chat/PkWorkingAurora.vue?vue&type=script&setup=true&lang.ts
|
|
21915
21916
|
V(), F(), ot();
|
|
21916
21917
|
// ../../packages/components/src/chat/PkWorkingAurora.vue
|
|
21917
|
-
var YE = /*#__PURE__*/
|
|
21918
|
+
var YE = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
21918
21919
|
__name: "PkWorkingAurora",
|
|
21919
21920
|
props: {
|
|
21920
21921
|
active: { type: Boolean },
|
|
@@ -21951,7 +21952,7 @@ var YE = /*#__PURE__*/ wr(/* @__PURE__ */ q({
|
|
|
21951
21952
|
}), [["styles", [".pk-working-aurora{--pk-working-aurora-source:var(--pk-working-aurora-color,var(--chatbot-main-color,var(--color-brand)));--pk-working-aurora-main:var(--pk-working-aurora-source);--pk-working-aurora-tone-before:var(--pk-working-aurora-main);--pk-working-aurora-tone-after:var(--pk-working-aurora-main);--pk-working-aurora-x:100%;--pk-working-aurora-flip:1;pointer-events:none;transform-origin:var(--pk-working-aurora-x) 100%;position:absolute;inset:0}@supports (color:oklch(from red l c h)){.pk-working-aurora{--pk-working-aurora-main:oklch(from var(--pk-working-aurora-source) clamp(.55, l, .75) c h);--pk-working-aurora-tone-before:oklch(from var(--pk-working-aurora-main) l c calc(h - 50));--pk-working-aurora-tone-after:oklch(from var(--pk-working-aurora-main) l c calc(h + 50))}}.pk-working-aurora--left{--pk-working-aurora-x:0%;--pk-working-aurora-flip:-1}.pk-working-aurora__lights{opacity:.32;-webkit-mask:radial-gradient(ellipse 75% 90% at var(--pk-working-aurora-x) 100%, #000 25%, transparent 75%);mask:radial-gradient(ellipse 75% 90% at var(--pk-working-aurora-x) 100%, #000 25%, transparent 75%);position:absolute;inset:0;overflow:hidden}.pk-working-aurora__lights:before{content:\"\";background:radial-gradient(ellipse 60% 70% at var(--pk-working-aurora-x) 100%, color-mix(in srgb, var(--pk-working-aurora-main) 35%, transparent), transparent);position:absolute;inset:0}.pk-working-aurora__sway{transform-origin:var(--pk-working-aurora-x) 100%;animation:11s ease-in-out infinite alternate pk-working-aurora-sway;position:absolute;inset:0}.pk-working-aurora__light{right:var(--pk-working-aurora-offset);aspect-ratio:1;background:radial-gradient(closest-side, var(--pk-working-aurora-light), transparent);border-radius:50%;width:80vmax;animation:none;position:absolute}.pk-working-aurora__light:first-child{--pk-working-aurora-light:var(--pk-working-aurora-main);--pk-working-aurora-offset:-30vmax;animation-name:pk-working-aurora-drift-1;bottom:-32vmax}.pk-working-aurora__light:nth-child(2){--pk-working-aurora-light:var(--pk-working-aurora-tone-after);--pk-working-aurora-offset:15vw;animation-name:pk-working-aurora-drift-2;animation-duration:9s;bottom:-48vmax}.pk-working-aurora__light:nth-child(3){--pk-working-aurora-light:var(--pk-working-aurora-tone-before);--pk-working-aurora-offset:-48vmax;animation-name:pk-working-aurora-drift-3;animation-duration:8s;bottom:10vh}.pk-working-aurora--left .pk-working-aurora__light{right:auto;left:var(--pk-working-aurora-offset)}.pk-working-aurora__core{opacity:.08;background:radial-gradient(circle 75vmin at var(--pk-working-aurora-x) 100%, color-mix(in srgb, #fff 45%, var(--pk-working-aurora-main)), color-mix(in srgb, var(--pk-working-aurora-main) 70%, transparent) 30%, color-mix(in srgb, var(--pk-working-aurora-tone-after) 30%, transparent) 62%, transparent);animation:2.6s ease-in-out infinite alternate pk-working-aurora-breathe;position:absolute;inset:0}.pk-working-aurora__glint{opacity:0;animation:.9s ease-out pk-working-aurora-glint}@media (prefers-reduced-motion:reduce){.pk-working-aurora__sway,.pk-working-aurora__light,.pk-working-aurora__core{animation:none}.pk-working-aurora__glint{display:none}}.pk-working-aurora-enter-active{animation:1.8s cubic-bezier(.23,1,.32,1) pk-working-aurora-in}.pk-working-aurora-enter-active .pk-working-aurora__core{animation:1.8s ease-out pk-working-aurora-flare}.pk-working-aurora-leave-active{animation:1.4s cubic-bezier(.77,0,.175,1) forwards pk-working-aurora-out}.pk-working-aurora-leave-active .pk-working-aurora__core{animation:1.4s ease-in forwards pk-working-aurora-flare-out}@media (prefers-reduced-motion:reduce){.pk-working-aurora-enter-active,.pk-working-aurora-leave-active{transition:opacity var(--duration-300) ease-out;animation:none}.pk-working-aurora-enter-active .pk-working-aurora__core,.pk-working-aurora-leave-active .pk-working-aurora__core{animation:none}.pk-working-aurora-enter-from,.pk-working-aurora-leave-to{opacity:0}}@keyframes pk-working-aurora-in{0%{opacity:0;scale:.08}20%{opacity:1}}@keyframes pk-working-aurora-out{70%{opacity:1}to{opacity:0;scale:.08}}@keyframes pk-working-aurora-flare{0%{opacity:0}25%{opacity:.6}}@keyframes pk-working-aurora-flare-out{40%{opacity:0}80%{opacity:.4}to{opacity:0}}@keyframes pk-working-aurora-breathe{to{opacity:.24}}@keyframes pk-working-aurora-glint{30%{opacity:.35}}@keyframes pk-working-aurora-sway{0%{rotate:-7deg}to{rotate:7deg}}@keyframes pk-working-aurora-drift-1{to{scale:1.2}}@keyframes pk-working-aurora-drift-2{to{translate:calc(var(--pk-working-aurora-flip) * 18vw) 0;scale:1 1.3}}@keyframes pk-working-aurora-drift-3{to{translate:0 18vh;scale:1.3 1}}"]]]);
|
|
21952
21953
|
// ../../packages/components/src/chat/PkAgentPresence.vue?vue&type=script&setup=true&lang.ts
|
|
21953
21954
|
V(), F(), U();
|
|
21954
|
-
var XE = 13, ZE = 8, QE = 3, $E = 150, eD = /*#__PURE__*/
|
|
21955
|
+
var XE = 13, ZE = 8, QE = 3, $E = 150, eD = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
21955
21956
|
__name: "PkAgentPresence",
|
|
21956
21957
|
props: {
|
|
21957
21958
|
active: { type: Boolean },
|
|
@@ -22171,7 +22172,7 @@ var tD = ["lang"], nD = {
|
|
|
22171
22172
|
}, cD = { class: "floating-chat-widget__close" }, lD = {
|
|
22172
22173
|
key: 0,
|
|
22173
22174
|
class: "floating-chat-widget__chat floating-chat-widget__loading"
|
|
22174
|
-
}, uD = { class: "floating-chat-widget__close" }, dD = 450, fD = /*#__PURE__*/
|
|
22175
|
+
}, uD = { class: "floating-chat-widget__close" }, dD = 450, fD = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
22175
22176
|
inheritAttrs: !1,
|
|
22176
22177
|
__name: "FloatingChatWidget.ce",
|
|
22177
22178
|
props: {
|
|
@@ -22225,7 +22226,7 @@ var tD = ["lang"], nD = {
|
|
|
22225
22226
|
organizationSlug: n.organizationSlug,
|
|
22226
22227
|
agentId: n.agentId
|
|
22227
22228
|
});
|
|
22228
|
-
let { PkGlobalDialog: i } = sm(), { emit: a } = K_(), o = z(), s = z(), c = lt([]), l =
|
|
22229
|
+
let { PkGlobalDialog: i } = sm(), { emit: a } = K_(), o = z(), s = z(), c = lt([]), l = On(B(() => `${n.agentId}-is-open`), !1), u = z(), d = z(), f = () => {
|
|
22229
22230
|
let e = u.value?.getRootNode(), t = l.value && e instanceof ShadowRoot && !!e.activeElement?.closest(".floating-chat-widget__chat");
|
|
22230
22231
|
l.value = !l.value, La(l.value ? "widget_opened" : "widget_closed"), a(l.value ? "opened" : "closed"), l.value || o.value?.stopGeneration(), t && ke(() => {
|
|
22231
22232
|
let t = e.host, n = t.getRootNode().activeElement;
|
|
@@ -22371,7 +22372,7 @@ var tD = ["lang"], nD = {
|
|
|
22371
22372
|
baseUrl: r,
|
|
22372
22373
|
headers: _,
|
|
22373
22374
|
cookieName: n.cookieName
|
|
22374
|
-
}), Je = B(() => n.floatingButtonPosition ?? O.value?.interface.floatingButtonPosition ?? le.value?.interface.floatingButtonPosition ?? "right"), L = B(() => dy(n.layout, O.value?.interface.layout ?? le.value?.interface.layout) === $t.Copilot), Ye = B(() => O.value?.interface.workingGlow !== !1 && D.isWorking), Ze = B(() => Ye.value && D.pageControlActive), V = B(() =>
|
|
22375
|
+
}), Je = B(() => n.floatingButtonPosition ?? O.value?.interface.floatingButtonPosition ?? le.value?.interface.floatingButtonPosition ?? "right"), L = B(() => dy(n.layout, O.value?.interface.layout ?? le.value?.interface.layout) === $t.Copilot), Ye = B(() => O.value?.interface.workingGlow !== !1 && D.isWorking), Ze = B(() => Ye.value && D.pageControlActive), V = B(() => Pn(O.value?.interface.mainColor) ? {
|
|
22375
22376
|
"--pk-working-beam-color": "var(--color-accent)",
|
|
22376
22377
|
"--pk-working-aurora-color": "var(--color-accent)",
|
|
22377
22378
|
"--pk-agent-presence-color": "var(--color-accent)"
|
|
@@ -22791,7 +22792,7 @@ var pD = ["lang"], mD = {
|
|
|
22791
22792
|
}, gD = {
|
|
22792
22793
|
key: 0,
|
|
22793
22794
|
class: "embedded-chat-widget embedded-chat-widget--loading"
|
|
22794
|
-
}, _D = /*#__PURE__*/
|
|
22795
|
+
}, _D = /*#__PURE__*/ Tr(/* @__PURE__ */ q({
|
|
22795
22796
|
inheritAttrs: !1,
|
|
22796
22797
|
__name: "EmbeddedChatWidget.ce",
|
|
22797
22798
|
props: {
|
|
@@ -22941,7 +22942,7 @@ var pD = ["lang"], mD = {
|
|
|
22941
22942
|
w.pagePointerStart = we.start, M(we.picking, (e) => {
|
|
22942
22943
|
w.pagePointing = e;
|
|
22943
22944
|
});
|
|
22944
|
-
let Pe = () => o.value?.$el, j = B(() =>
|
|
22945
|
+
let Pe = () => o.value?.$el, j = B(() => Pn(E.value?.interface.mainColor) ? { "--pk-agent-presence-color": "var(--color-accent)" } : void 0), { authBranding: Ie } = Dy({
|
|
22945
22946
|
agent: E,
|
|
22946
22947
|
branding: D,
|
|
22947
22948
|
authMethods: oe,
|