@8wave/ai-elements 0.125.0-beta.18 → 0.125.0-beta.19
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/{PkFilePreview-BIFkMsAC.js → PkFilePreview-BzNLupQS.js} +318 -315
- package/dist/_chunks/PkFilePreview-BzNLupQS.js.map +1 -0
- package/dist/_chunks/{PkFilePreviewDialog-NLk4gZMd.js → PkFilePreviewDialog-BfZFgdOi.js} +2 -2
- package/dist/_chunks/{PkFilePreviewDialog-NLk4gZMd.js.map → PkFilePreviewDialog-BfZFgdOi.js.map} +1 -1
- package/dist/ai-elements.es.js +205 -202
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{PkChatbot-DCGQnndK.js → PkChatbot-BVZgvanv.js} +6 -6
- package/dist-vue/_chunks/{PkChatbot-DCGQnndK.js.map → PkChatbot-BVZgvanv.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-CHvtUHuO.js → PkChatbotViewChat-C1uzFQCJ.js} +338 -335
- package/dist-vue/_chunks/PkChatbotViewChat-C1uzFQCJ.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-7JU_5-F2.js → PkChatbotViewConversations-DjhiHp8-.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-7JU_5-F2.js.map → PkChatbotViewConversations-DjhiHp8-.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-D53wtRPS.js → PkChatbotViewFiles-CtOhnFCc.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewFiles-D53wtRPS.js.map → PkChatbotViewFiles-CtOhnFCc.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-BRlLIofM.js → PkChatbotViewProfile-NfTamy9j.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-BRlLIofM.js.map → PkChatbotViewProfile-NfTamy9j.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-DLo9nI2g.js → PkFilePreview-C2VOU99H.js} +469 -466
- package/dist-vue/_chunks/PkFilePreview-C2VOU99H.js.map +1 -0
- package/dist-vue/_chunks/{PkFilePreviewDialog-CgDJQgIJ.js → PkFilePreviewDialog-C6QQMntW.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-CgDJQgIJ.js.map → PkFilePreviewDialog-C6QQMntW.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-Bj00X4yT.js → useChatbotStore-BZ1n3Hyx.js} +654 -654
- package/dist-vue/_chunks/useChatbotStore-BZ1n3Hyx.js.map +1 -0
- package/dist-vue/composables.js +1 -1
- package/dist-vue/index.js +6 -6
- package/package.json +1 -1
- package/dist/_chunks/PkFilePreview-BIFkMsAC.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-CHvtUHuO.js.map +0 -1
- package/dist-vue/_chunks/PkFilePreview-DLo9nI2g.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-Bj00X4yT.js.map +0 -1
package/dist/ai-elements.es.js
CHANGED
|
@@ -11121,7 +11121,7 @@ function ep(e) {
|
|
|
11121
11121
|
Ye.value.includes(e) || (Ye.value = [...Ye.value, e]), Qe.set(e, Date.now()), n ? et.add(e) : et.delete(e), t && (Ze.value = {
|
|
11122
11122
|
...Ze.value,
|
|
11123
11123
|
[e]: t
|
|
11124
|
-
}),
|
|
11124
|
+
}), Nn || In();
|
|
11125
11125
|
}
|
|
11126
11126
|
function rt(e) {
|
|
11127
11127
|
Ze.value = Object.fromEntries(Object.entries(Ze.value).filter(([t]) => t !== e));
|
|
@@ -11181,15 +11181,15 @@ function ep(e) {
|
|
|
11181
11181
|
},
|
|
11182
11182
|
onFinish: () => {
|
|
11183
11183
|
let e = F.value;
|
|
11184
|
-
!fe.value && !ft.value.some((t) => t.id === e) &&
|
|
11184
|
+
!fe.value && !ft.value.some((t) => t.id === e) && Jt(o.value);
|
|
11185
11185
|
}
|
|
11186
11186
|
})), Z = B(() => De(at)), ot = () => Z.value.messages[Z.value.messages.length - 1];
|
|
11187
11187
|
j(F, (e, t) => {
|
|
11188
|
-
if (t && !fe.value && (
|
|
11188
|
+
if (t && !fe.value && (on() || We?.chatId === t)) {
|
|
11189
11189
|
let e = Z.value.messages.filter((e) => e.role === "user"), n = e[e.length - 1];
|
|
11190
11190
|
nt(t, n ? Kt(n) ?? "" : "", Z.value.status === "streaming" || We?.chatId === t);
|
|
11191
11191
|
}
|
|
11192
|
-
it(e), Ke = void 0, clearTimeout(
|
|
11192
|
+
it(e), Ke = void 0, clearTimeout(kn), On.value = !1, Z.value.stop();
|
|
11193
11193
|
}, { flush: "sync" });
|
|
11194
11194
|
let st = B(() => {
|
|
11195
11195
|
let e = u.value?.initialMessage;
|
|
@@ -11224,29 +11224,29 @@ function ep(e) {
|
|
|
11224
11224
|
}), dt = B(() => {
|
|
11225
11225
|
let e = u.value?.messagePlaceholder;
|
|
11226
11226
|
return e?.[r.value] ? e[r.value] : n("placeholder.askAnything") ? t("placeholder.askAnything") : "";
|
|
11227
|
-
}), ft = z([]), ht = z(!1), gt = z(1), _t = z(!1), vt = z(!1), yt, bt = z([]), xt = z(!1), St = z("chat"), Ct = z(0), wt = z([]), Tt = z(), Et = z(!1), Ot = z(!1), kt = z(), At = z(!1), jt = z(!1), Mt = z(), Nt = z(""), Pt = z([]), Ft = z(""), It =
|
|
11228
|
-
function
|
|
11229
|
-
let n = Object.fromEntries(Object.entries(
|
|
11230
|
-
|
|
11227
|
+
}), ft = z([]), ht = z(!1), gt = z(1), _t = z(!1), vt = z(!1), yt, bt = z([]), xt = z(!1), St = z("chat"), Ct = z(0), wt = z([]), Tt = z(), Et = z(!1), Ot = z(!1), kt = z(), At = z(!1), jt = z(!1), Mt = z(), Nt = z(""), Pt = z([]), Ft = z(""), It = z(!0), Lt = Ie(), Rt = z(0), zt = Bn(B(() => `${o.value}-queue`), {}), Bt = B(() => zt.value[F.value] ?? []), Vt = B(() => !fe.value);
|
|
11228
|
+
function Ht(e, t) {
|
|
11229
|
+
let n = Object.fromEntries(Object.entries(zt.value).filter(([t]) => t !== e));
|
|
11230
|
+
zt.value = t.length > 0 ? {
|
|
11231
11231
|
...n,
|
|
11232
11232
|
[e]: t
|
|
11233
11233
|
} : n;
|
|
11234
11234
|
}
|
|
11235
|
-
function Ht(e) {
|
|
11236
|
-
let t = (Rt.value[e] ?? []).join(Xf);
|
|
11237
|
-
return Vt(e, []), t;
|
|
11238
|
-
}
|
|
11239
11235
|
function Ut(e) {
|
|
11240
|
-
|
|
11236
|
+
let t = (zt.value[e] ?? []).join(Xf);
|
|
11237
|
+
return Ht(e, []), t;
|
|
11241
11238
|
}
|
|
11242
11239
|
function Wt(e) {
|
|
11243
|
-
|
|
11240
|
+
e && (Nt.value = Nt.value ? `${Nt.value}${Xf}${e}` : e);
|
|
11244
11241
|
}
|
|
11245
11242
|
function Gt(e) {
|
|
11246
|
-
|
|
11247
|
-
Wt(e), Ut(t ?? "");
|
|
11243
|
+
Ht(F.value, Bt.value.filter((t, n) => n !== e));
|
|
11248
11244
|
}
|
|
11249
|
-
|
|
11245
|
+
function qt(e) {
|
|
11246
|
+
let t = Bt.value[e];
|
|
11247
|
+
Gt(e), Wt(t ?? "");
|
|
11248
|
+
}
|
|
11249
|
+
async function Jt(e) {
|
|
11250
11250
|
if (fe.value) ft.value = [];
|
|
11251
11251
|
else {
|
|
11252
11252
|
ht.value = !0;
|
|
@@ -11272,10 +11272,10 @@ function ep(e) {
|
|
|
11272
11272
|
} finally {
|
|
11273
11273
|
ht.value = !1;
|
|
11274
11274
|
}
|
|
11275
|
-
|
|
11275
|
+
Ln([.../* @__PURE__ */ new Set([...jn(), ...ft.value.map((e) => e.id)])]);
|
|
11276
11276
|
}
|
|
11277
11277
|
}
|
|
11278
|
-
async function
|
|
11278
|
+
async function Yt() {
|
|
11279
11279
|
if (!_t.value || vt.value || fe.value) return;
|
|
11280
11280
|
vt.value = !0;
|
|
11281
11281
|
let e = yt;
|
|
@@ -11288,10 +11288,10 @@ function ep(e) {
|
|
|
11288
11288
|
vt.value = !1;
|
|
11289
11289
|
}
|
|
11290
11290
|
}
|
|
11291
|
-
async function
|
|
11291
|
+
async function Xt(e) {
|
|
11292
11292
|
return fe.value ? [] : Ee.value.getConversations(o.value, l.value, { search: e });
|
|
11293
11293
|
}
|
|
11294
|
-
async function
|
|
11294
|
+
async function Zt() {
|
|
11295
11295
|
let e = F.value;
|
|
11296
11296
|
if (!e) bt.value = [];
|
|
11297
11297
|
else {
|
|
@@ -11305,33 +11305,33 @@ function ep(e) {
|
|
|
11305
11305
|
}
|
|
11306
11306
|
}
|
|
11307
11307
|
}
|
|
11308
|
-
function
|
|
11308
|
+
function Qt(e, t = !1) {
|
|
11309
11309
|
return Ee.value.getChatFileDownloadUrl(e, t);
|
|
11310
11310
|
}
|
|
11311
|
-
function
|
|
11311
|
+
function $t(e) {
|
|
11312
11312
|
return Ee.value.getChatFilePreviewUrl(e);
|
|
11313
11313
|
}
|
|
11314
|
-
async function
|
|
11314
|
+
async function en(e) {
|
|
11315
11315
|
await Ee.value.deleteChatFile(e);
|
|
11316
11316
|
let t = bt.value.find((t) => t.documentId === e), n = t?.kind === "spreadsheet" ? t.sourceAttachmentId ?? t.documentId : void 0;
|
|
11317
11317
|
bt.value = bt.value.filter((t) => t.documentId !== e && (!n || t.documentId !== n && t.sourceAttachmentId !== n));
|
|
11318
11318
|
}
|
|
11319
|
-
async function
|
|
11319
|
+
async function tn(e, t) {
|
|
11320
11320
|
if (!fe.value) try {
|
|
11321
11321
|
let n = await Ee.value.getChat(e, t);
|
|
11322
11322
|
if (t !== F.value || Z.value.status !== "ready" || Z.value.messages.length > 0) return;
|
|
11323
|
-
n && (Z.value.messages = n.messages, we.value = n.blocked ?? !1,
|
|
11323
|
+
n && (Z.value.messages = n.messages, we.value = n.blocked ?? !1, nn(e, t, n.turnInProgress === !0));
|
|
11324
11324
|
} catch {}
|
|
11325
11325
|
}
|
|
11326
|
-
async function
|
|
11327
|
-
n && (await
|
|
11326
|
+
async function nn(e, t, n) {
|
|
11327
|
+
n && (await rn(t), t !== F.value || on()) || (await an(e, t), t === F.value && await dn());
|
|
11328
11328
|
}
|
|
11329
|
-
async function
|
|
11329
|
+
async function rn(e) {
|
|
11330
11330
|
let t = { chatId: e };
|
|
11331
11331
|
We = t, Ge.value = e;
|
|
11332
11332
|
let n = () => We === t && e === F.value, r = Date.now() + Hf;
|
|
11333
11333
|
try {
|
|
11334
|
-
for (; n() && !
|
|
11334
|
+
for (; n() && !on() && Date.now() < r;) {
|
|
11335
11335
|
Ue = !0;
|
|
11336
11336
|
try {
|
|
11337
11337
|
await Z.value.resumeStream();
|
|
@@ -11341,7 +11341,7 @@ function ep(e) {
|
|
|
11341
11341
|
if (!n()) return;
|
|
11342
11342
|
Z.value.clearError();
|
|
11343
11343
|
let t = await Ee.value.getChat(o.value, e).catch(() => null);
|
|
11344
|
-
if (!t || !n() ||
|
|
11344
|
+
if (!t || !n() || on()) return;
|
|
11345
11345
|
if (!t.turnInProgress) {
|
|
11346
11346
|
Z.value.messages = t.messages;
|
|
11347
11347
|
return;
|
|
@@ -11352,7 +11352,7 @@ function ep(e) {
|
|
|
11352
11352
|
We === t && (We = void 0, Ge.value = void 0);
|
|
11353
11353
|
}
|
|
11354
11354
|
}
|
|
11355
|
-
async function
|
|
11355
|
+
async function an(e, t) {
|
|
11356
11356
|
let n;
|
|
11357
11357
|
try {
|
|
11358
11358
|
n = Number(sessionStorage.getItem(Bc)), sessionStorage.removeItem(Bc);
|
|
@@ -11385,75 +11385,75 @@ function ep(e) {
|
|
|
11385
11385
|
}
|
|
11386
11386
|
}
|
|
11387
11387
|
}
|
|
11388
|
-
let
|
|
11388
|
+
let on = () => {
|
|
11389
11389
|
let e = Z.value.status;
|
|
11390
11390
|
return e === "submitted" || e === "streaming";
|
|
11391
|
-
},
|
|
11391
|
+
}, sn = () => on() || We?.chatId === F.value || w.value > 0, ln = () => {
|
|
11392
11392
|
let e = ot();
|
|
11393
11393
|
return Ae.value !== void 0 || Lf(e) || Qf(e);
|
|
11394
|
-
},
|
|
11395
|
-
async function
|
|
11394
|
+
}, un = /* @__PURE__ */ new Set();
|
|
11395
|
+
async function dn() {
|
|
11396
11396
|
let e = F.value;
|
|
11397
|
-
if (!(
|
|
11398
|
-
if (
|
|
11397
|
+
if (!(un.has(e) || Bt.value.length === 0 || sn() || Ce.value)) {
|
|
11398
|
+
if (ln()) Wt(Ut(e));
|
|
11399
11399
|
else {
|
|
11400
|
-
|
|
11400
|
+
un.add(e);
|
|
11401
11401
|
try {
|
|
11402
11402
|
let t = Date.now() + qf;
|
|
11403
11403
|
for (; Date.now() < t && (await Promise.race([Ee.value.getRunningTurns(o.value, [e]).catch(() => []), new Promise((t) => setTimeout(() => t([e]), Yf))])).includes(e);) await new Promise((e) => setTimeout(e, Jf));
|
|
11404
|
-
if (e !== F.value ||
|
|
11405
|
-
let n =
|
|
11406
|
-
n &&
|
|
11404
|
+
if (e !== F.value || sn()) return;
|
|
11405
|
+
let n = Ut(e);
|
|
11406
|
+
n && Cn(n);
|
|
11407
11407
|
} finally {
|
|
11408
|
-
|
|
11408
|
+
un.delete(e);
|
|
11409
11409
|
}
|
|
11410
11410
|
}
|
|
11411
11411
|
}
|
|
11412
11412
|
}
|
|
11413
|
-
let
|
|
11414
|
-
async function
|
|
11415
|
-
if (fe.value ||
|
|
11416
|
-
let e = F.value, t =
|
|
11413
|
+
let fn = 0, pn = 0;
|
|
11414
|
+
async function mn() {
|
|
11415
|
+
if (fe.value || on()) return "indeterminate";
|
|
11416
|
+
let e = F.value, t = fn += 1;
|
|
11417
11417
|
try {
|
|
11418
11418
|
let n = await Ee.value.getChat(o.value, e);
|
|
11419
|
-
if (!n || e !== F.value ||
|
|
11420
|
-
|
|
11419
|
+
if (!n || e !== F.value || on() || t <= pn) return "indeterminate";
|
|
11420
|
+
pn = t;
|
|
11421
11421
|
let r = n.messages, i = Vf(r, Z.value.messages);
|
|
11422
11422
|
return Z.value.messages = [...r, ...i], we.value = n.blocked ?? !1, i.length > 0 ? "pending" : "caught-up";
|
|
11423
11423
|
} catch {}
|
|
11424
11424
|
return "indeterminate";
|
|
11425
11425
|
}
|
|
11426
|
-
function
|
|
11426
|
+
function hn(e) {
|
|
11427
11427
|
Z.value.messages = [...Z.value.messages, e];
|
|
11428
11428
|
}
|
|
11429
|
-
async function
|
|
11429
|
+
async function gn(e) {
|
|
11430
11430
|
try {
|
|
11431
11431
|
wt.value = await Ee.value.getMessageFeedbacks(e);
|
|
11432
11432
|
} catch {
|
|
11433
11433
|
wt.value = [];
|
|
11434
11434
|
}
|
|
11435
11435
|
}
|
|
11436
|
-
function
|
|
11436
|
+
function _n(e) {
|
|
11437
11437
|
let t = wt.value.findIndex((t) => t.messageId === e.messageId);
|
|
11438
11438
|
t >= 0 ? wt.value[t] = e : wt.value.push(e);
|
|
11439
11439
|
}
|
|
11440
|
-
function
|
|
11440
|
+
function vn(e) {
|
|
11441
11441
|
let t = ut.value, n = t.findIndex((t) => t.id === e.id), r = Kt(e) ?? "", i = t.slice(0, n).reverse().find((e) => e.role === "user");
|
|
11442
11442
|
return {
|
|
11443
11443
|
userQuestion: Kt(i ?? e) ?? "",
|
|
11444
11444
|
assistantMessage: r
|
|
11445
11445
|
};
|
|
11446
11446
|
}
|
|
11447
|
-
async function
|
|
11447
|
+
async function yn(e, t) {
|
|
11448
11448
|
await Promise.all([
|
|
11449
|
-
|
|
11450
|
-
|
|
11451
|
-
|
|
11449
|
+
tn(e, t),
|
|
11450
|
+
Jt(e),
|
|
11451
|
+
gn(t)
|
|
11452
11452
|
]), Oe.value || ai((e, t) => Ee.value.reverseGeocode(e, t, r.value)).then((e) => {
|
|
11453
11453
|
e && (Oe.value = e);
|
|
11454
11454
|
});
|
|
11455
11455
|
}
|
|
11456
|
-
async function
|
|
11456
|
+
async function bn() {
|
|
11457
11457
|
let e = Nt.value.trim(), t = Pt.value.filter((e) => e.state === "done" && e.mediaSource !== void 0).map((e) => ({
|
|
11458
11458
|
type: "file",
|
|
11459
11459
|
mediaType: e.mediaSource.mimeType,
|
|
@@ -11461,14 +11461,14 @@ function ep(e) {
|
|
|
11461
11461
|
filename: e.mediaSource.name,
|
|
11462
11462
|
providerMetadata: { "8bot": { media: e.mediaSource } }
|
|
11463
11463
|
})), n = xe.value ? ie.value : void 0;
|
|
11464
|
-
!fe.value &&
|
|
11464
|
+
!fe.value && sn() ? e && t.length === 0 && !n && (Ht(F.value, [...Bt.value, e]), Nt.value = "") : (fe.value && ut.value.length > 0 && await Wn(), Cn(e, t, n && { pagePointer: n }), Nt.value = "", ie.value = void 0, Un());
|
|
11465
11465
|
}
|
|
11466
|
-
function
|
|
11466
|
+
function xn(e, t) {
|
|
11467
11467
|
let n = e.trim();
|
|
11468
|
-
return !n || we.value ||
|
|
11468
|
+
return !n || we.value || sn() || Z.value.status !== "ready" ? !1 : (Cn(n, [], t, { toInput: !1 }), !0);
|
|
11469
11469
|
}
|
|
11470
|
-
function
|
|
11471
|
-
Be(), Ft.value =
|
|
11470
|
+
function Cn(e, t = [], n, { toInput: r = !0 } = {}) {
|
|
11471
|
+
Be(), Ft.value = e, It.value = r, Lt.value = r && n && "pagePointer" in n ? n.pagePointer : void 0, Rt.value = Z.value.messages.length;
|
|
11472
11472
|
let i = Z.value.sendMessage;
|
|
11473
11473
|
i({
|
|
11474
11474
|
text: e,
|
|
@@ -11476,7 +11476,7 @@ function ep(e) {
|
|
|
11476
11476
|
...n && { metadata: n }
|
|
11477
11477
|
});
|
|
11478
11478
|
}
|
|
11479
|
-
function
|
|
11479
|
+
function wn(e) {
|
|
11480
11480
|
let t = e.trim();
|
|
11481
11481
|
if (!t) return;
|
|
11482
11482
|
if (Z.value.status !== "ready") {
|
|
@@ -11486,25 +11486,25 @@ function ep(e) {
|
|
|
11486
11486
|
let n = Z.value.sendMessage;
|
|
11487
11487
|
Be(), n({ text: t });
|
|
11488
11488
|
}
|
|
11489
|
-
async function
|
|
11490
|
-
let e = Z.value.messages.slice(
|
|
11489
|
+
async function Tn() {
|
|
11490
|
+
let e = Z.value.messages.slice(Rt.value).some((e) => e.parts.some($e)), t = Ft.value, n = It.value, r = Lt.value, i = t.length > 0 && !e, a = F.value, s = Rt.value, c = We?.chatId === a, l = Ke, u = Ut(a), d = (e = "") => {
|
|
11491
11491
|
Nt.value = [
|
|
11492
11492
|
e,
|
|
11493
|
-
|
|
11493
|
+
u,
|
|
11494
11494
|
Nt.value
|
|
11495
11495
|
].filter(Boolean).join(Xf);
|
|
11496
|
-
},
|
|
11496
|
+
}, f = () => a === F.value && !on() && Rt.value === s ? !1 : (u && Ht(a, [u, ...zt.value[a] ?? []]), !0);
|
|
11497
11497
|
We = void 0, Ge.value = void 0, Be(), await Z.value.stop();
|
|
11498
|
-
let
|
|
11499
|
-
if (!
|
|
11500
|
-
if (
|
|
11501
|
-
if (await
|
|
11502
|
-
if (
|
|
11503
|
-
Ft.value = "",
|
|
11498
|
+
let p = fe.value || e && !c || await Ee.value.stopChatTurn(o.value, a, l).catch(() => !0);
|
|
11499
|
+
if (!f()) {
|
|
11500
|
+
if (c || !p) {
|
|
11501
|
+
if (await mn(), f()) return;
|
|
11502
|
+
if (c || Z.value.messages.length > Rt.value) {
|
|
11503
|
+
Ft.value = "", d();
|
|
11504
11504
|
return;
|
|
11505
11505
|
}
|
|
11506
11506
|
}
|
|
11507
|
-
|
|
11507
|
+
i ? (d(n ? t : ""), ie.value ??= r, Z.value.messages = Z.value.messages.slice(0, Rt.value), Ft.value = "") : d();
|
|
11508
11508
|
}
|
|
11509
11509
|
}
|
|
11510
11510
|
j(() => Z.value.messages, (e) => {
|
|
@@ -11513,92 +11513,92 @@ function ep(e) {
|
|
|
11513
11513
|
}), j(() => Z.value.status, (e) => {
|
|
11514
11514
|
e === "submitted" && (le.value++, Ke = void 0);
|
|
11515
11515
|
});
|
|
11516
|
-
let
|
|
11516
|
+
let En;
|
|
11517
11517
|
j(() => [
|
|
11518
11518
|
Z.value.status,
|
|
11519
11519
|
w.value,
|
|
11520
11520
|
te.value
|
|
11521
11521
|
], ([e, t, n]) => {
|
|
11522
|
-
clearTimeout(
|
|
11522
|
+
clearTimeout(En), e === "ready" && t === 0 && n === 0 && (En = setTimeout(() => {
|
|
11523
11523
|
ce.value = !1;
|
|
11524
11524
|
}, 1500));
|
|
11525
11525
|
});
|
|
11526
|
-
let
|
|
11527
|
-
j(() => !Ae.value && !Lf(ot()) && (
|
|
11528
|
-
clearTimeout(
|
|
11529
|
-
|
|
11526
|
+
let On = z(!1), kn;
|
|
11527
|
+
j(() => !Ae.value && !Lf(ot()) && (on() || w.value > 0), (e) => {
|
|
11528
|
+
clearTimeout(kn), e ? On.value = !0 : kn = setTimeout(() => {
|
|
11529
|
+
On.value = !1;
|
|
11530
11530
|
}, 400);
|
|
11531
11531
|
}, { immediate: !0 });
|
|
11532
|
-
let
|
|
11532
|
+
let An = B(() => {
|
|
11533
11533
|
let e = Je.value.filter((e) => e !== F.value);
|
|
11534
|
-
return
|
|
11535
|
-
}),
|
|
11536
|
-
function
|
|
11537
|
-
clearTimeout(
|
|
11538
|
-
|
|
11534
|
+
return On.value || Ge.value === F.value ? [...e, F.value] : e;
|
|
11535
|
+
}), jn = () => [.../* @__PURE__ */ new Set([...Je.value, ...Ye.value])], Mn = Sn(), Nn, Pn = 0, Fn = 0;
|
|
11536
|
+
function In() {
|
|
11537
|
+
clearTimeout(Nn), Nn = void 0, jn().length !== 0 && Mn.value === "visible" && (Nn = setTimeout(() => {
|
|
11538
|
+
Nn = void 0, Ln(jn());
|
|
11539
11539
|
}, Wf));
|
|
11540
11540
|
}
|
|
11541
|
-
async function
|
|
11541
|
+
async function Ln(e) {
|
|
11542
11542
|
let t = e.slice(0, Gf);
|
|
11543
11543
|
if (fe.value || t.length === 0) {
|
|
11544
|
-
|
|
11544
|
+
In();
|
|
11545
11545
|
return;
|
|
11546
11546
|
}
|
|
11547
|
-
let n =
|
|
11547
|
+
let n = Pn += 1, r;
|
|
11548
11548
|
try {
|
|
11549
11549
|
r = await Ee.value.getRunningTurns(o.value, t);
|
|
11550
11550
|
} catch {
|
|
11551
|
-
|
|
11551
|
+
In();
|
|
11552
11552
|
return;
|
|
11553
11553
|
}
|
|
11554
|
-
if (n <=
|
|
11555
|
-
|
|
11554
|
+
if (n <= Fn) return;
|
|
11555
|
+
Fn = n;
|
|
11556
11556
|
for (let e of r) et.add(e);
|
|
11557
|
-
let i = new Set(t), a =
|
|
11557
|
+
let i = new Set(t), a = jn().filter((e) => i.has(e) && !r.includes(e)), s = (e) => Ye.value.includes(e) && !et.has(e), c = a.filter((e) => s(e) && Date.now() - (Qe.get(e) ?? 0) > Kf), l = a.filter((e) => !s(e));
|
|
11558
11558
|
Je.value = [...Je.value.filter((e) => !i.has(e)), ...r];
|
|
11559
11559
|
let u = l.filter((e) => Ye.value.includes(e));
|
|
11560
|
-
(u.length > 0 || c.length > 0) && (Ye.value = Ye.value.filter((e) => !u.includes(e) && !c.includes(e)), Xe.value = [...Xe.value, ...u.filter((e) => e !== F.value && !Xe.value.includes(e))]), l.length > 0 &&
|
|
11560
|
+
(u.length > 0 || c.length > 0) && (Ye.value = Ye.value.filter((e) => !u.includes(e) && !c.includes(e)), Xe.value = [...Xe.value, ...u.filter((e) => e !== F.value && !Xe.value.includes(e))]), l.length > 0 && Jt(o.value), In();
|
|
11561
11561
|
}
|
|
11562
|
-
j(
|
|
11563
|
-
e === "visible" ?
|
|
11564
|
-
}), je(() => clearTimeout(
|
|
11565
|
-
let
|
|
11562
|
+
j(Mn, (e) => {
|
|
11563
|
+
e === "visible" ? Ln(jn()) : (clearTimeout(Nn), Nn = void 0);
|
|
11564
|
+
}), je(() => clearTimeout(Nn));
|
|
11565
|
+
let Rn = B(() => Xe.value.map((e) => ({
|
|
11566
11566
|
chatId: e,
|
|
11567
11567
|
title: ft.value.find((t) => t.id === e)?.title || Ze.value[e] || void 0
|
|
11568
11568
|
})));
|
|
11569
|
-
function Rn(e) {
|
|
11570
|
-
it(e), F.value = e, dr("chat");
|
|
11571
|
-
}
|
|
11572
11569
|
function zn(e) {
|
|
11570
|
+
it(e), F.value = e, fr("chat");
|
|
11571
|
+
}
|
|
11572
|
+
function Vn(e) {
|
|
11573
11573
|
Xe.value = Xe.value.filter((t) => t !== e), rt(e);
|
|
11574
11574
|
}
|
|
11575
11575
|
j(() => [Z.value.status, Z.value.id], ([e, t], [n, r]) => {
|
|
11576
11576
|
if (t === r) {
|
|
11577
|
-
if (e === "error") We?.chatId !== F.value && Ut(
|
|
11577
|
+
if (e === "error") We?.chatId !== F.value && Wt(Ut(F.value));
|
|
11578
11578
|
else if (e === "ready" && (n === "streaming" || n === "submitted")) {
|
|
11579
|
-
if (
|
|
11580
|
-
Ut(
|
|
11579
|
+
if (ln()) {
|
|
11580
|
+
Wt(Ut(F.value));
|
|
11581
11581
|
return;
|
|
11582
11582
|
}
|
|
11583
|
-
|
|
11583
|
+
dn();
|
|
11584
11584
|
}
|
|
11585
11585
|
}
|
|
11586
11586
|
}), j(w, (e) => {
|
|
11587
|
-
e === 0 && Z.value.status === "ready" &&
|
|
11587
|
+
e === 0 && Z.value.status === "ready" && dn();
|
|
11588
11588
|
}), j(() => Z.value.status, (e) => {
|
|
11589
11589
|
e === "ready" && Ft.value.length > 0 && (Ft.value = "");
|
|
11590
11590
|
});
|
|
11591
|
-
function
|
|
11591
|
+
function Un(e = !1) {
|
|
11592
11592
|
for (let t of Pt.value) (e || t.state !== "done") && URL.revokeObjectURL(t.localUrl);
|
|
11593
|
-
Pt.value = [],
|
|
11593
|
+
Pt.value = [], $n.value = null;
|
|
11594
11594
|
}
|
|
11595
|
-
async function
|
|
11596
|
-
return Ft.value = "", oe.value = {}, se.value = {}, F.value = Fl(), await k(), Z.value.clearError(), Ce.value = void 0, we.value = !1,
|
|
11595
|
+
async function Wn() {
|
|
11596
|
+
return Ft.value = "", oe.value = {}, se.value = {}, F.value = Fl(), await k(), Z.value.clearError(), Ce.value = void 0, we.value = !1, Un(!0), fr("chat"), F.value;
|
|
11597
11597
|
}
|
|
11598
|
-
async function
|
|
11599
|
-
Z.value.status !== "ready" && (Ft.value = "", await
|
|
11598
|
+
async function Gn(e) {
|
|
11599
|
+
Z.value.status !== "ready" && (Ft.value = "", await Tn()), Be(), await Z.value.regenerate(e);
|
|
11600
11600
|
}
|
|
11601
|
-
function
|
|
11601
|
+
function Kn(e) {
|
|
11602
11602
|
if (e.tool === "requestGeolocation") {
|
|
11603
11603
|
let t = e.output;
|
|
11604
11604
|
"latitude" in t && (Oe.value = {
|
|
@@ -11610,23 +11610,23 @@ function ep(e) {
|
|
|
11610
11610
|
}
|
|
11611
11611
|
Z.value.addToolOutput(e);
|
|
11612
11612
|
}
|
|
11613
|
-
function
|
|
11613
|
+
function qn(e) {
|
|
11614
11614
|
Z.value.addToolApprovalResponse(e);
|
|
11615
11615
|
}
|
|
11616
|
-
let
|
|
11617
|
-
|
|
11616
|
+
let Jn = B(() => Z.value.messages.reduce((e, t) => e + t.parts.filter((e) => e.type === "file").length, 0)), Yn = B(() => _.value?.maxFilesPerMessage ?? 5), Xn = B(() => _.value?.maxFilesPerChat ?? 20), Zn = B(() => Math.max(0, Math.min(Yn.value - Pt.value.length, Xn.value - Jn.value - Pt.value.length))), Qn = B(() => Zn.value <= 0), $n = z(null), er = () => {
|
|
11617
|
+
$n.value = null;
|
|
11618
11618
|
};
|
|
11619
|
-
j(
|
|
11620
|
-
e || (
|
|
11619
|
+
j(Qn, (e) => {
|
|
11620
|
+
e || ($n.value = null);
|
|
11621
11621
|
});
|
|
11622
|
-
async function
|
|
11623
|
-
if (
|
|
11624
|
-
|
|
11622
|
+
async function tr(e) {
|
|
11623
|
+
if (Qn.value) {
|
|
11624
|
+
$n.value = Xn.value - Jn.value - Pt.value.length <= Yn.value - Pt.value.length ? {
|
|
11625
11625
|
reason: "per-chat",
|
|
11626
|
-
max:
|
|
11626
|
+
max: Xn.value
|
|
11627
11627
|
} : {
|
|
11628
11628
|
reason: "per-message",
|
|
11629
|
-
max:
|
|
11629
|
+
max: Yn.value
|
|
11630
11630
|
};
|
|
11631
11631
|
return;
|
|
11632
11632
|
}
|
|
@@ -11640,7 +11640,7 @@ function ep(e) {
|
|
|
11640
11640
|
try {
|
|
11641
11641
|
let n = await Ee.value.uploadMedia(o.value, F.value, e);
|
|
11642
11642
|
if (!Pt.value.some((e) => e.id === t)) {
|
|
11643
|
-
await
|
|
11643
|
+
await rr(n);
|
|
11644
11644
|
return;
|
|
11645
11645
|
}
|
|
11646
11646
|
Pt.value = Pt.value.map((e) => e.id === t ? {
|
|
@@ -11657,17 +11657,17 @@ function ep(e) {
|
|
|
11657
11657
|
} : e);
|
|
11658
11658
|
}
|
|
11659
11659
|
}
|
|
11660
|
-
async function tr(e) {
|
|
11661
|
-
e.mediaSource && await nr(e.mediaSource);
|
|
11662
|
-
}
|
|
11663
11660
|
async function nr(e) {
|
|
11661
|
+
e.mediaSource && await rr(e.mediaSource);
|
|
11662
|
+
}
|
|
11663
|
+
async function rr(e) {
|
|
11664
11664
|
try {
|
|
11665
11665
|
await Ee.value.discardMedia(e);
|
|
11666
11666
|
} catch {}
|
|
11667
11667
|
}
|
|
11668
|
-
async function
|
|
11669
|
-
let { userQuestion: n, assistantMessage: r } =
|
|
11670
|
-
|
|
11668
|
+
async function ir(e, t) {
|
|
11669
|
+
let { userQuestion: n, assistantMessage: r } = vn(e);
|
|
11670
|
+
_n(await Ee.value.submitMessageFeedback({
|
|
11671
11671
|
messageId: e.id,
|
|
11672
11672
|
chatId: F.value,
|
|
11673
11673
|
agentId: o.value,
|
|
@@ -11676,34 +11676,34 @@ function ep(e) {
|
|
|
11676
11676
|
assistantMessage: r
|
|
11677
11677
|
}));
|
|
11678
11678
|
}
|
|
11679
|
-
async function ir(e) {
|
|
11680
|
-
await rr(e, "upvote");
|
|
11681
|
-
}
|
|
11682
11679
|
async function ar(e) {
|
|
11683
|
-
await
|
|
11680
|
+
await ir(e, "upvote");
|
|
11681
|
+
}
|
|
11682
|
+
async function or(e) {
|
|
11683
|
+
await ir(e, "downvote");
|
|
11684
11684
|
}
|
|
11685
|
-
function
|
|
11685
|
+
function sr(e) {
|
|
11686
11686
|
Ot.value = !1, kt.value = void 0, Tt.value = e;
|
|
11687
11687
|
}
|
|
11688
|
-
async function
|
|
11688
|
+
async function cr(e) {
|
|
11689
11689
|
if (Tt.value) try {
|
|
11690
11690
|
Et.value = !0, Ot.value = !1, kt.value = void 0;
|
|
11691
|
-
let { userQuestion: t, assistantMessage: n } =
|
|
11692
|
-
|
|
11691
|
+
let { userQuestion: t, assistantMessage: n } = vn(Tt.value);
|
|
11692
|
+
_n(await Ee.value.submitMessageFeedback({
|
|
11693
11693
|
messageId: Tt.value.id,
|
|
11694
11694
|
chatId: F.value,
|
|
11695
11695
|
agentId: o.value,
|
|
11696
11696
|
userQuestion: t,
|
|
11697
11697
|
assistantMessage: n,
|
|
11698
11698
|
comment: e
|
|
11699
|
-
})), Ot.value = !0, await
|
|
11699
|
+
})), Ot.value = !0, await gn(F.value);
|
|
11700
11700
|
} catch {
|
|
11701
11701
|
kt.value = n("message.feedbackSubmitError") ? t("message.feedbackSubmitError") : "Failed to submit feedback";
|
|
11702
11702
|
} finally {
|
|
11703
11703
|
Et.value = !1;
|
|
11704
11704
|
}
|
|
11705
11705
|
}
|
|
11706
|
-
async function
|
|
11706
|
+
async function lr(e) {
|
|
11707
11707
|
try {
|
|
11708
11708
|
jt.value = !0, At.value = !1, Mt.value = void 0, await Ee.value.submitLead({
|
|
11709
11709
|
agentId: o.value,
|
|
@@ -11716,33 +11716,33 @@ function ep(e) {
|
|
|
11716
11716
|
jt.value = !1;
|
|
11717
11717
|
}
|
|
11718
11718
|
}
|
|
11719
|
-
async function
|
|
11719
|
+
async function ur(e, t) {
|
|
11720
11720
|
let n = await Ee.value.updateChatTitle(o.value, e, t);
|
|
11721
11721
|
ft.value = ft.value.map((t) => t.id === e ? {
|
|
11722
11722
|
...t,
|
|
11723
11723
|
title: n.title
|
|
11724
11724
|
} : t);
|
|
11725
11725
|
}
|
|
11726
|
-
async function
|
|
11727
|
-
await Ee.value.deleteChat(o.value, e), ft.value = ft.value.filter((t) => t.id !== e), F.value === e && await
|
|
11726
|
+
async function dr(e) {
|
|
11727
|
+
await Ee.value.deleteChat(o.value, e), ft.value = ft.value.filter((t) => t.id !== e), F.value === e && await Wn();
|
|
11728
11728
|
}
|
|
11729
|
-
function
|
|
11729
|
+
function fr(e) {
|
|
11730
11730
|
St.value = e;
|
|
11731
11731
|
}
|
|
11732
|
-
function
|
|
11733
|
-
|
|
11732
|
+
function pr() {
|
|
11733
|
+
fr("chat"), Ct.value++;
|
|
11734
11734
|
}
|
|
11735
|
-
let
|
|
11736
|
-
function
|
|
11735
|
+
let mr;
|
|
11736
|
+
function hr(e) {
|
|
11737
11737
|
let t = () => Ee.value.getChat(o.value, e).then((e) => e !== null);
|
|
11738
11738
|
return t().catch(() => t().catch(() => !1));
|
|
11739
11739
|
}
|
|
11740
11740
|
return j(l, async (e) => {
|
|
11741
|
-
if (!e || e ===
|
|
11742
|
-
let t =
|
|
11743
|
-
if (
|
|
11744
|
-
let n = F.value, r = !fe.value && await
|
|
11745
|
-
l.value === e && F.value === n && (r ?
|
|
11741
|
+
if (!e || e === mr) return;
|
|
11742
|
+
let t = mr;
|
|
11743
|
+
if (mr = e, t === void 0) return;
|
|
11744
|
+
let n = F.value, r = !fe.value && await hr(n);
|
|
11745
|
+
l.value === e && F.value === n && (r ? Jt(o.value) : (ft.value = [], wt.value = [], bt.value = [], Je.value = [], Ye.value = [], Xe.value = [], Ze.value = {}, await Wn(), Nt.value = ""));
|
|
11746
11746
|
}), {
|
|
11747
11747
|
apiClient: Ee,
|
|
11748
11748
|
baseUrl: i,
|
|
@@ -11774,7 +11774,7 @@ function ep(e) {
|
|
|
11774
11774
|
hostStepTitles: oe,
|
|
11775
11775
|
hostStepChanges: se,
|
|
11776
11776
|
pageControlActive: ce,
|
|
11777
|
-
isWorking:
|
|
11777
|
+
isWorking: On,
|
|
11778
11778
|
stopHostActions: X,
|
|
11779
11779
|
voicePageTools: Y,
|
|
11780
11780
|
cancelVoicePageCalls: ze,
|
|
@@ -11787,7 +11787,7 @@ function ep(e) {
|
|
|
11787
11787
|
setPageAccessOff: He,
|
|
11788
11788
|
agentConfirmations: E,
|
|
11789
11789
|
agentSelectionActions: ne,
|
|
11790
|
-
sendSelection:
|
|
11790
|
+
sendSelection: xn,
|
|
11791
11791
|
confirmationsAvailable: ve,
|
|
11792
11792
|
confirmationMode: ye,
|
|
11793
11793
|
setConfirmationMode: be,
|
|
@@ -11808,20 +11808,20 @@ function ep(e) {
|
|
|
11808
11808
|
isLoadingChatFiles: xt,
|
|
11809
11809
|
input: Nt,
|
|
11810
11810
|
pendingAttachments: Pt,
|
|
11811
|
-
isAttachmentLimitReached:
|
|
11812
|
-
fileLimitError:
|
|
11811
|
+
isAttachmentLimitReached: Qn,
|
|
11812
|
+
fileLimitError: $n,
|
|
11813
11813
|
localChatId: F,
|
|
11814
11814
|
isConversationBlocked: we,
|
|
11815
11815
|
inputMessagePlaceholder: dt,
|
|
11816
11816
|
chatError: Ce,
|
|
11817
|
-
runningChatIds:
|
|
11818
|
-
backgroundAnswers:
|
|
11819
|
-
openBackgroundAnswer:
|
|
11820
|
-
dismissBackgroundAnswer:
|
|
11821
|
-
canQueue:
|
|
11822
|
-
queuedMessages:
|
|
11823
|
-
removeQueuedMessage:
|
|
11824
|
-
editQueuedMessage:
|
|
11817
|
+
runningChatIds: An,
|
|
11818
|
+
backgroundAnswers: Rn,
|
|
11819
|
+
openBackgroundAnswer: zn,
|
|
11820
|
+
dismissBackgroundAnswer: Vn,
|
|
11821
|
+
canQueue: Vt,
|
|
11822
|
+
queuedMessages: Bt,
|
|
11823
|
+
removeQueuedMessage: Gt,
|
|
11824
|
+
editQueuedMessage: qt,
|
|
11825
11825
|
activeView: St,
|
|
11826
11826
|
inputFocusRequest: Ct,
|
|
11827
11827
|
messageFeedbacks: wt,
|
|
@@ -11833,36 +11833,36 @@ function ep(e) {
|
|
|
11833
11833
|
isLoadingSubmitLead: jt,
|
|
11834
11834
|
submitLeadError: Mt,
|
|
11835
11835
|
buildDeviceContext: ke,
|
|
11836
|
-
initialize:
|
|
11837
|
-
loadConversations:
|
|
11838
|
-
loadMoreConversations:
|
|
11839
|
-
searchConversations:
|
|
11840
|
-
loadChatFiles:
|
|
11841
|
-
refreshMessages:
|
|
11842
|
-
appendMessage:
|
|
11843
|
-
getChatFileUrl:
|
|
11844
|
-
getChatFilePreviewUrl:
|
|
11845
|
-
deleteChatFile:
|
|
11846
|
-
handleSubmit:
|
|
11847
|
-
sendMessage:
|
|
11848
|
-
stopGeneration:
|
|
11849
|
-
startNewChat:
|
|
11850
|
-
regenerate:
|
|
11851
|
-
addToolOutput:
|
|
11852
|
-
addToolApprovalResponse:
|
|
11853
|
-
handleFileSelect:
|
|
11854
|
-
discardPendingAttachment:
|
|
11855
|
-
clearFileLimitError:
|
|
11856
|
-
clearPendingAttachments:
|
|
11857
|
-
onUpvote:
|
|
11858
|
-
onDownvote:
|
|
11859
|
-
onFeedback:
|
|
11860
|
-
onFeedbackSubmit:
|
|
11861
|
-
onLeadSubmit:
|
|
11862
|
-
navigate:
|
|
11863
|
-
focusInput:
|
|
11864
|
-
renameChatTitle:
|
|
11865
|
-
deleteChat:
|
|
11836
|
+
initialize: yn,
|
|
11837
|
+
loadConversations: Jt,
|
|
11838
|
+
loadMoreConversations: Yt,
|
|
11839
|
+
searchConversations: Xt,
|
|
11840
|
+
loadChatFiles: Zt,
|
|
11841
|
+
refreshMessages: mn,
|
|
11842
|
+
appendMessage: hn,
|
|
11843
|
+
getChatFileUrl: Qt,
|
|
11844
|
+
getChatFilePreviewUrl: $t,
|
|
11845
|
+
deleteChatFile: en,
|
|
11846
|
+
handleSubmit: bn,
|
|
11847
|
+
sendMessage: wn,
|
|
11848
|
+
stopGeneration: Tn,
|
|
11849
|
+
startNewChat: Wn,
|
|
11850
|
+
regenerate: Gn,
|
|
11851
|
+
addToolOutput: Kn,
|
|
11852
|
+
addToolApprovalResponse: qn,
|
|
11853
|
+
handleFileSelect: tr,
|
|
11854
|
+
discardPendingAttachment: nr,
|
|
11855
|
+
clearFileLimitError: er,
|
|
11856
|
+
clearPendingAttachments: Un,
|
|
11857
|
+
onUpvote: ar,
|
|
11858
|
+
onDownvote: or,
|
|
11859
|
+
onFeedback: sr,
|
|
11860
|
+
onFeedbackSubmit: cr,
|
|
11861
|
+
onLeadSubmit: lr,
|
|
11862
|
+
navigate: fr,
|
|
11863
|
+
focusInput: pr,
|
|
11864
|
+
renameChatTitle: ur,
|
|
11865
|
+
deleteChat: dr
|
|
11866
11866
|
};
|
|
11867
11867
|
})();
|
|
11868
11868
|
}
|
|
@@ -18339,7 +18339,7 @@ var jS = { class: "pk-chatbot-view-chat__input-stage" }, MS = {
|
|
|
18339
18339
|
"selection-action"
|
|
18340
18340
|
],
|
|
18341
18341
|
setup(e, { emit: t }) {
|
|
18342
|
-
let n = T(() => import("./_chunks/PkToolShowForm-DcPccCEU.js")), r = T(() => import("./_chunks/PkToolShowContactForm-CvQoLumn.js")), i = T(() => import("./_chunks/PkToolShowSuggestedReply-B-s_ERZF.js")), a = T(() => import("./_chunks/PkToolShowSources-BE3Zv_uz.js")), o = T(() => import("./_chunks/PkToolRequestGeolocation-CUXB6Lkw.js")), s = T(() => import("./_chunks/PkToolRequestOAuthConnection-CoK7s1HA.js")), c = T(() => import("./_chunks/PkToolShowLocation-7Uqe4JnF.js")), l = T(() => import("./_chunks/PkToolShowDiagram-COt1Z3q9.js")), u = T(() => import("./_chunks/PkToolChatFile-iE4ZokYD.js")), d = T(() => import("./_chunks/PkToolShareDocument-lTHNZodf.js")), f = T(() => import("./_chunks/PkFilePreview-
|
|
18342
|
+
let n = T(() => import("./_chunks/PkToolShowForm-DcPccCEU.js")), r = T(() => import("./_chunks/PkToolShowContactForm-CvQoLumn.js")), i = T(() => import("./_chunks/PkToolShowSuggestedReply-B-s_ERZF.js")), a = T(() => import("./_chunks/PkToolShowSources-BE3Zv_uz.js")), o = T(() => import("./_chunks/PkToolRequestGeolocation-CUXB6Lkw.js")), s = T(() => import("./_chunks/PkToolRequestOAuthConnection-CoK7s1HA.js")), c = T(() => import("./_chunks/PkToolShowLocation-7Uqe4JnF.js")), l = T(() => import("./_chunks/PkToolShowDiagram-COt1Z3q9.js")), u = T(() => import("./_chunks/PkToolChatFile-iE4ZokYD.js")), d = T(() => import("./_chunks/PkToolShareDocument-lTHNZodf.js")), f = T(() => import("./_chunks/PkFilePreview-BzNLupQS.js").then((e) => e.n)), p = T(() => import("./_chunks/PkFilePreviewDialog-BfZFgdOi.js")), m = e, h = t, g = ep(m.agentId), { agentInterface: _, agentFileUpload: v, agentType: y, agentVoice: b, actions: x, revisedAnswers: S, messages: C, chat: ee, messageFeedbacks: w, feedbackDialogMessage: E, isFeedbackSubmitting: ne, isFeedbackSubmitted: re, feedbackSubmitError: D, isLeadSubmitted: k, isLoadingSubmitLead: ie, submitLeadError: A, input: oe, inputMessagePlaceholder: se, isConversationBlocked: ce, baseUrl: le, pendingAttachments: ue, isAttachmentLimitReached: de, fileLimitError: N, apiClient: fe, isDark: P, hostToolsPending: pe, pageNoticeLevel: F, hostConfirmation: he, agentPageAccess: ge, hostStepTitles: ve, hostStepChanges: ye, confirmationMode: be, canQueue: xe, queuedMessages: L, backgroundAnswers: Se, inputFocusRequest: Ce, pagePointer: we, pagePointerAvailable: V, pagePointing: Te, agentSelectionActions: Ee } = Ar(g);
|
|
18343
18343
|
te(un, ve), te(sn, ye);
|
|
18344
18344
|
let De = me("inputEl");
|
|
18345
18345
|
j(Ce, () => {
|
|
@@ -18402,11 +18402,14 @@ var jS = { class: "pk-chatbot-view-chat__input-stage" }, MS = {
|
|
|
18402
18402
|
filename: e.filename
|
|
18403
18403
|
}), At());
|
|
18404
18404
|
};
|
|
18405
|
-
j(() => g.localChatId, Tt), j(
|
|
18406
|
-
let
|
|
18407
|
-
|
|
18408
|
-
|
|
18409
|
-
|
|
18405
|
+
j(() => g.localChatId, Tt), j(() => {
|
|
18406
|
+
let e = yt.value?.fileId;
|
|
18407
|
+
return e ? {
|
|
18408
|
+
fileId: e,
|
|
18409
|
+
newest: Math.max(0, ...Nt.value)
|
|
18410
|
+
} : void 0;
|
|
18411
|
+
}, (e, t) => {
|
|
18412
|
+
e && t && e.fileId === t.fileId && e.newest > t.newest && yt.value?.version === t.newest && Pt(e.newest);
|
|
18410
18413
|
});
|
|
18411
18414
|
let Lt = B(() => {
|
|
18412
18415
|
let e = ee.value?.status;
|