@8wave/ai-elements 0.119.0-beta.55 → 0.119.0-beta.56
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/ai-elements.es.js +218 -211
- 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/_chunks/{PkChatbot-Ck6RO0Rd.js → PkChatbot-Bgw5K9w1.js} +2 -2
- package/dist-vue/_chunks/{PkChatbot-Ck6RO0Rd.js.map → PkChatbot-Bgw5K9w1.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-Bni4EjEB.js → PkChatbotMessages-B2e1MQ_d.js} +85 -78
- package/dist-vue/_chunks/PkChatbotMessages-B2e1MQ_d.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-B_T3HkON.js → PkChatbotViewChat-DEpMIiic.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewChat-B_T3HkON.js.map → PkChatbotViewChat-DEpMIiic.js.map} +1 -1
- package/dist-vue/index.js +5 -5
- package/dist-vue/index.js.map +1 -1
- package/package.json +1 -1
- package/dist-vue/_chunks/PkChatbotMessages-Bni4EjEB.js.map +0 -1
|
@@ -347,7 +347,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
347
347
|
messagesLength: () => n.messages?.length,
|
|
348
348
|
lastMessageRole: () => n.messages?.[n.messages.length - 1]?.role,
|
|
349
349
|
contentEl: () => F.value,
|
|
350
|
-
beforeNewMessageScroll: () =>
|
|
350
|
+
beforeNewMessageScroll: () => Ot(),
|
|
351
351
|
onScrollUp: () => r("scroll-up"),
|
|
352
352
|
onScrollDown: () => r("scroll-down")
|
|
353
353
|
}), Le = () => {
|
|
@@ -374,72 +374,78 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
374
374
|
top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
|
|
375
375
|
behavior: "smooth"
|
|
376
376
|
}));
|
|
377
|
-
}, q = k(() => n.status === "submitted" || n.status === "streaming"), J = z(0), Ge = z(!1), Ke = !1, Tt = ke(), Et =
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
377
|
+
}, q = k(() => n.status === "submitted" || n.status === "streaming"), J = z(0), Ge = z(!1), Ke = !1, Tt = ke(), Et = () => n.messages?.[n.messages.length - 1]?.role === "user" || q.value, Dt = () => {
|
|
378
|
+
Ke = !1, Ge.value = !0, J.value = 0;
|
|
379
|
+
}, Ot = async () => {
|
|
380
|
+
if (!n.messages?.length || n.disableHeightAdjustment) return;
|
|
381
|
+
if (!Et()) {
|
|
382
|
+
Ke && (await I(), E.value?.scrollHeight, Et() || Dt());
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
if (Ke = !0, Ge.value = !1, await I(), !E.value) return;
|
|
386
|
+
let { paddingTop: e, paddingBottom: t } = getComputedStyle(E.value), r = E.value.clientHeight - Number.parseFloat(e) - Number.parseFloat(t), i = F.value && Number.parseFloat(getComputedStyle(F.value).rowGap) || 0, a = ze();
|
|
387
|
+
Tt.value = a[a.length - 1];
|
|
388
|
+
let o = r - (Tt.value?.clientHeight ?? 0) - i;
|
|
389
|
+
r > 0 && (J.value = Math.max(o, 0)), await I();
|
|
384
390
|
};
|
|
385
|
-
H([() => n.messages?.length, () => n.messages?.[n.messages.length - 1]?.id], () =>
|
|
386
|
-
Ke &&
|
|
391
|
+
H([() => n.messages?.length, () => n.messages?.[n.messages.length - 1]?.id], () => Ot()), Ne([E, Tt], () => {
|
|
392
|
+
Ke && Ot();
|
|
387
393
|
}), Te(() => {
|
|
388
|
-
(q.value || n.awaitingSpokenAnswer) &&
|
|
394
|
+
(q.value || n.awaitingSpokenAnswer) && Ot();
|
|
389
395
|
}), H(q, (e) => {
|
|
390
|
-
e || (
|
|
396
|
+
e || Dt();
|
|
391
397
|
});
|
|
392
|
-
let
|
|
393
|
-
let t =
|
|
398
|
+
let kt = (e) => n.revisedAnswers?.some((t) => t.messageId === e), Y = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), At = /* @__PURE__ */ new Set(["showContactForm"]), jt = (e) => !n.interactive && At.has(p(e)) ? { record: !0 } : {}, Mt = (e, t) => !n.readonlyFeedback && Zt(e, t), Nt = (e) => n.readonlyFeedback ? Y(e) : void 0, Pt = (e) => Nt(e)?.vote, Ft = (e) => {
|
|
399
|
+
let t = Nt(e);
|
|
394
400
|
if (t?.vote) return;
|
|
395
401
|
let n = t?.metadata?.reactionEmoji;
|
|
396
402
|
return typeof n == "string" && /\p{Extended_Pictographic}/u.test(n) ? n : void 0;
|
|
397
|
-
},
|
|
398
|
-
if (
|
|
399
|
-
let t =
|
|
403
|
+
}, It = (e) => !!(Pt(e) || Ft(e)), Lt = (e) => {
|
|
404
|
+
if (Ft(e)) return "pk-chatbot-message__reaction--neutral";
|
|
405
|
+
let t = Pt(e);
|
|
400
406
|
return t === "upvote" ? "pk-chatbot-message__reaction--positive" : t === "downvote" ? "pk-chatbot-message__reaction--negative" : "pk-chatbot-message__reaction--neutral";
|
|
401
|
-
},
|
|
402
|
-
let t =
|
|
407
|
+
}, Rt = (e) => {
|
|
408
|
+
let t = Pt(e);
|
|
403
409
|
return i(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
|
|
404
|
-
},
|
|
405
|
-
let t =
|
|
410
|
+
}, zt = (e) => {
|
|
411
|
+
let t = Ht(e);
|
|
406
412
|
for (let e = t.length - 1; e >= 0; --e) if (f(t[e])) return e;
|
|
407
413
|
return -1;
|
|
408
|
-
},
|
|
409
|
-
let e =
|
|
414
|
+
}, Bt = k(() => n.messages?.[n.messages.length - 1]), X = k(() => {
|
|
415
|
+
let e = Bt.value;
|
|
410
416
|
return e ? e.parts[e.parts.length - 1] : null;
|
|
411
|
-
}),
|
|
417
|
+
}), Vt = k(() => {
|
|
412
418
|
let e = /* @__PURE__ */ new Map();
|
|
413
419
|
for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, x(C(ne(t.parts))));
|
|
414
420
|
return e;
|
|
415
|
-
}),
|
|
421
|
+
}), Ht = (e) => Vt.value.get(e.id) ?? e.parts, Ut = k(() => n.status === "error"), Wt = k(() => n.awaitingSpokenAnswer === !0 && !q.value), Gt = k(() => Wt.value && Bt.value?.role === "user" && !Ut.value), Kt = (e, t) => t(), qt = k(() => {
|
|
416
422
|
let e = X.value;
|
|
417
423
|
return re(i, e);
|
|
418
|
-
}),
|
|
424
|
+
}), Jt = k(() => {
|
|
419
425
|
let e = X.value;
|
|
420
426
|
return T(e);
|
|
421
|
-
}),
|
|
427
|
+
}), Yt = (e) => n.messages?.findIndex((t) => t.id === e), Z = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, Xt = (e) => Z(e) && n.status === "ready" && !!n.actions?.includes("regenerate"), Zt = (e, t) => (!Z(t) || n.status === "ready") && !!n.actions?.includes(e), Qt = (e) => {
|
|
422
428
|
let t = e.parts[e.parts.length - 1];
|
|
423
429
|
return f(t);
|
|
424
|
-
},
|
|
425
|
-
let t =
|
|
430
|
+
}, $t = (e) => e.parts.some((e) => _(e) || m(e)), en = (e) => !!n.showExtendedSteps && Q(e) && $t(e), tn = (e) => m(e) && !S(e) && !!(Ve[p(e)] || l[e.type] || n.showAllMessageParts), nn = (e) => e.parts.some((e) => f(e) && !!e.text.trim() || g(e) || w(e) && !S(e) || tn(e)), Q = (e) => e.role === "assistant", rn = (e) => e.role === "user", an = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), on = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), sn = (e) => {
|
|
431
|
+
let t = an(e)?.metadata?.createdAt, n = on(e)?.metadata?.createdAt;
|
|
426
432
|
if (!t || !n) return;
|
|
427
433
|
let r = new Date(t), i = new Date(n);
|
|
428
434
|
return r.toDateString() === i.toDateString() ? void 0 : i;
|
|
429
|
-
}, $ = k(() => n.showAllMessageParts ? Je([]) : Je(n.messages ?? [],
|
|
435
|
+
}, $ = k(() => n.showAllMessageParts ? Je([]) : Je(n.messages ?? [], nn)), cn = k(() => {
|
|
430
436
|
let e = 0;
|
|
431
437
|
return (n.messages ?? []).map((t) => t.parts.length > 0 ? ++e : void 0);
|
|
432
|
-
}),
|
|
438
|
+
}), ln = (e, t) => t === 0 || e.role !== "assistant" ? !1 : !!(n.actions?.length || n.showMessageNumber || n.showMessageDateTime && e.metadata?.createdAt !== void 0 || e.metadata?.completedAt !== void 0 || n.showMessageTokensCount && e.metadata?.totalTokens !== void 0), un = (e) => {
|
|
433
439
|
let t = new Date(e), n = t.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
434
440
|
return s(t, n ? "time" : "date-time");
|
|
435
|
-
},
|
|
441
|
+
}, dn = (e) => {
|
|
436
442
|
let { createdAt: t, completedAt: n } = e.metadata ?? {};
|
|
437
443
|
if (t && n) return le(c, n - t);
|
|
438
|
-
},
|
|
444
|
+
}, fn = je("feedbackMessageEl");
|
|
439
445
|
return H(() => n.feedbackMessageId, async () => {
|
|
440
446
|
if (await I(), !n.feedbackMessageId) return;
|
|
441
|
-
let e =
|
|
442
|
-
e && (Z(
|
|
447
|
+
let e = fn.value?.[0]?.$el;
|
|
448
|
+
e && (Z(Yt(n.feedbackMessageId)) ? Pe() : e.scrollIntoView({
|
|
443
449
|
behavior: "smooth",
|
|
444
450
|
block: "center"
|
|
445
451
|
}));
|
|
@@ -470,7 +476,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
470
476
|
class: "pk-chatbot-messages__wrapper"
|
|
471
477
|
}, [
|
|
472
478
|
(R(!0), M(D, null, Ee(e.messages, (u, x) => (R(), M(D, { key: u.id }, [
|
|
473
|
-
|
|
479
|
+
rn(u) && sn(x) ? (R(), M("div", Ze, [N("span", Qe, B(V(s)(sn(x), "short")), 1)])) : j("", !0),
|
|
474
480
|
$.value.quietRuns.has(u.id) ? (R(), M("div", $e, [P(r, {
|
|
475
481
|
name: "ri:alarm-line",
|
|
476
482
|
class: "shrink-0"
|
|
@@ -488,17 +494,17 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
488
494
|
(!V(G)(u) || e.showAllMessageParts) && (!$.value.hidden.has(u.id) || q.value && Z(x)) && (u.parts.length || Z(x) && q.value && Q(u)) ? (R(), M("div", {
|
|
489
495
|
key: 3,
|
|
490
496
|
class: L(["pk-chatbot-message", [`pk-chatbot-message--${u.role}`, { "pk-chatbot-message--loading": q.value && Z(x) && Q(u) }]]),
|
|
491
|
-
style: Ce({ minHeight: Z(x) && Q(u) && !
|
|
497
|
+
style: Ce({ minHeight: Z(x) && Q(u) && !Ut.value ? `${J.value}px` : void 0 })
|
|
492
498
|
}, [
|
|
493
499
|
P(O, {
|
|
494
500
|
appear: "",
|
|
495
501
|
name: "pk-chatbot-part"
|
|
496
502
|
}, {
|
|
497
|
-
default: U(() => [
|
|
503
|
+
default: U(() => [en(u) ? (R(), A(ge, {
|
|
498
504
|
key: 0,
|
|
499
505
|
message: u,
|
|
500
506
|
"is-streaming": q.value && Z(x),
|
|
501
|
-
"has-content":
|
|
507
|
+
"has-content": nn(u),
|
|
502
508
|
"is-dark": e.isDark
|
|
503
509
|
}, null, 8, [
|
|
504
510
|
"message",
|
|
@@ -508,7 +514,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
508
514
|
])) : j("", !0)]),
|
|
509
515
|
_: 2
|
|
510
516
|
}, 1024),
|
|
511
|
-
(R(!0), M(D, null, Ee(
|
|
517
|
+
(R(!0), M(D, null, Ee(Ht(u), (n, s) => (R(), M(D, { key: V(se)(n, s) }, [V(f)(n) && n.text.trim() ? (R(), A(O, {
|
|
512
518
|
key: 0,
|
|
513
519
|
appear: "",
|
|
514
520
|
name: "pk-chatbot-part"
|
|
@@ -528,13 +534,13 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
528
534
|
"markdown",
|
|
529
535
|
"is-dark",
|
|
530
536
|
"loading"
|
|
531
|
-
])) : (R(), M(D, { key: 1 }, [be(B(n.text), 1)], 64))]),
|
|
537
|
+
])) : (R(), M(D, { key: 1 }, [be(B(n.text), 1)], 64))]), It(u.id) && !Y(u.id)?.comment && s === zt(u) ? (R(), M("span", {
|
|
532
538
|
key: 0,
|
|
533
|
-
class: L(["pk-chatbot-message__reaction",
|
|
534
|
-
title:
|
|
535
|
-
}, [
|
|
539
|
+
class: L(["pk-chatbot-message__reaction", Lt(u.id)]),
|
|
540
|
+
title: Rt(u.id)
|
|
541
|
+
}, [Ft(u.id) ? (R(), M("span", rt, B(Ft(u.id)), 1)) : (R(), A(r, {
|
|
536
542
|
key: 1,
|
|
537
|
-
name:
|
|
543
|
+
name: Pt(u.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
|
|
538
544
|
}, null, 8, ["name"]))], 10, nt)) : j("", !0)])]),
|
|
539
545
|
_: 2
|
|
540
546
|
}, 1024)) : V(g)(n) ? (R(), A(O, {
|
|
@@ -591,7 +597,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
591
597
|
"onRespond"
|
|
592
598
|
]))]),
|
|
593
599
|
_: 2
|
|
594
|
-
}, 1024)) :
|
|
600
|
+
}, 1024)) : tn(n) ? (R(), A(O, {
|
|
595
601
|
key: 3,
|
|
596
602
|
appear: "",
|
|
597
603
|
name: "pk-chatbot-part"
|
|
@@ -599,7 +605,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
599
605
|
default: U(() => [!V(l)[n.type] && V(Ve)[V(p)(n)] ? (R(), A(Oe(V(Ve)[V(p)(n)]), Se({
|
|
600
606
|
key: `component-${s}-${V(ce)(n)}`,
|
|
601
607
|
part: n
|
|
602
|
-
}, { ref_for: !0 },
|
|
608
|
+
}, { ref_for: !0 }, jt(n)), null, 16, ["part"])) : De(t.$slots, n.type, Se({ ref_for: !0 }, {
|
|
603
609
|
message: u,
|
|
604
610
|
part: n,
|
|
605
611
|
index: x,
|
|
@@ -614,7 +620,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
614
620
|
})), 1)])])) : j("", !0)], void 0, 1)]),
|
|
615
621
|
_: 2
|
|
616
622
|
}, 1024)) : j("", !0), P(O, { mode: "out-in" }, {
|
|
617
|
-
default: U(() => [s ===
|
|
623
|
+
default: U(() => [s === zt(u) && e.readonlyFeedback && Y(u.id)?.comment ? (R(), A(me, {
|
|
618
624
|
key: 0,
|
|
619
625
|
feedback: Y(u.id)
|
|
620
626
|
}, null, 8, ["feedback"])) : j("", !0)]),
|
|
@@ -624,7 +630,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
624
630
|
name: "fade-in",
|
|
625
631
|
mode: "out-in"
|
|
626
632
|
}, {
|
|
627
|
-
default: U(() => [q.value && Z(x) && !
|
|
633
|
+
default: U(() => [q.value && Z(x) && !Qt(u) && Q(u) && (!en(u) || nn(u)) ? (R(), M("div", {
|
|
628
634
|
key: `loading-info-${u.id}`,
|
|
629
635
|
class: "pk-chatbot-message__loading-info"
|
|
630
636
|
}, [N("div", ct, [
|
|
@@ -633,25 +639,25 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
633
639
|
class: "shrink-0"
|
|
634
640
|
}),
|
|
635
641
|
P(O, { mode: "out-in" }, {
|
|
636
|
-
default: U(() => [
|
|
637
|
-
key:
|
|
642
|
+
default: U(() => [Jt.value ? (R(), A(r, {
|
|
643
|
+
key: Jt.value,
|
|
638
644
|
class: "shrink-0",
|
|
639
|
-
name:
|
|
645
|
+
name: Jt.value
|
|
640
646
|
}, null, 8, ["name"])) : j("", !0)]),
|
|
641
647
|
_: 1
|
|
642
648
|
}),
|
|
643
649
|
P(O, { mode: "out-in" }, {
|
|
644
|
-
default: U(() => [
|
|
645
|
-
key:
|
|
650
|
+
default: U(() => [qt.value ? (R(), M("span", {
|
|
651
|
+
key: qt.value,
|
|
646
652
|
class: "text-12"
|
|
647
|
-
}, B(
|
|
653
|
+
}, B(qt.value), 1)) : j("", !0)]),
|
|
648
654
|
_: 1
|
|
649
655
|
})
|
|
650
656
|
]), P(O, {
|
|
651
657
|
name: "fade-in",
|
|
652
658
|
mode: "out-in"
|
|
653
659
|
}, {
|
|
654
|
-
default: U(() => [!
|
|
660
|
+
default: U(() => [!en(u) && X.value && "text" in X.value && X.value.text.trim() ? (R(), A(he, {
|
|
655
661
|
key: 0,
|
|
656
662
|
markdown: X.value.text,
|
|
657
663
|
"is-dark": e.isDark,
|
|
@@ -668,14 +674,14 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
668
674
|
_: 2
|
|
669
675
|
}, 1024),
|
|
670
676
|
P(O, { mode: "out-in" }, {
|
|
671
|
-
default: U(() => [
|
|
677
|
+
default: U(() => [ln(u, x) ? (R(), M("div", lt, [
|
|
672
678
|
P(_, {
|
|
673
679
|
modifiers: "compact",
|
|
674
680
|
class: "mr-auto shrink-0"
|
|
675
681
|
}, {
|
|
676
682
|
default: U(() => [
|
|
677
683
|
P(O, { mode: "out-in" }, {
|
|
678
|
-
default: U(() => [
|
|
684
|
+
default: U(() => [Xt(x) ? (R(), A(m, {
|
|
679
685
|
key: 0,
|
|
680
686
|
icon: "ri:reset-right-line",
|
|
681
687
|
modifiers: "action-quiet-small",
|
|
@@ -686,7 +692,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
686
692
|
_: 2
|
|
687
693
|
}, 1024),
|
|
688
694
|
P(O, { mode: "out-in" }, {
|
|
689
|
-
default: U(() => [
|
|
695
|
+
default: U(() => [Zt("show-info", x) ? (R(), A(m, {
|
|
690
696
|
key: 0,
|
|
691
697
|
icon: "ri:information-line",
|
|
692
698
|
title: V(i)("action.getMoreInfo"),
|
|
@@ -701,13 +707,13 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
701
707
|
_: 2
|
|
702
708
|
}, 1024),
|
|
703
709
|
P(O, { mode: "out-in" }, {
|
|
704
|
-
default: U(() => [
|
|
710
|
+
default: U(() => [Zt("revise", x) ? (R(), A(m, {
|
|
705
711
|
key: 0,
|
|
706
|
-
icon:
|
|
707
|
-
title:
|
|
708
|
-
"aria-label":
|
|
712
|
+
icon: kt(u.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
|
|
713
|
+
title: kt(u.id) ? V(i)("action.editRevise") : V(i)("action.createRevise"),
|
|
714
|
+
"aria-label": kt(u.id) ? V(i)("action.editRevise") : V(i)("action.createRevise"),
|
|
709
715
|
modifiers: "action-quiet-small",
|
|
710
|
-
class: L({ "text-brand-graphic":
|
|
716
|
+
class: L({ "text-brand-graphic": kt(u.id) }),
|
|
711
717
|
onClick: W((e) => t.$emit("revise", u), ["stop"])
|
|
712
718
|
}, null, 8, [
|
|
713
719
|
"icon",
|
|
@@ -719,7 +725,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
719
725
|
_: 2
|
|
720
726
|
}, 1024),
|
|
721
727
|
P(O, { mode: "out-in" }, {
|
|
722
|
-
default: U(() => [
|
|
728
|
+
default: U(() => [Mt("upvote", x) ? (R(), A(m, {
|
|
723
729
|
key: 0,
|
|
724
730
|
icon: Y(u.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
|
|
725
731
|
title: V(i)("action.upvote"),
|
|
@@ -735,7 +741,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
735
741
|
_: 2
|
|
736
742
|
}, 1024),
|
|
737
743
|
P(O, { mode: "out-in" }, {
|
|
738
|
-
default: U(() => [
|
|
744
|
+
default: U(() => [Mt("downvote", x) ? (R(), A(m, {
|
|
739
745
|
key: 0,
|
|
740
746
|
icon: Y(u.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
|
|
741
747
|
title: V(i)("action.downvote"),
|
|
@@ -751,7 +757,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
751
757
|
_: 2
|
|
752
758
|
}, 1024),
|
|
753
759
|
P(O, { mode: "out-in" }, {
|
|
754
|
-
default: U(() => [
|
|
760
|
+
default: U(() => [Mt("feedback", x) ? (R(), A(m, {
|
|
755
761
|
key: 0,
|
|
756
762
|
icon: Y(u.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
|
|
757
763
|
title: V(i)("action.feedback"),
|
|
@@ -776,15 +782,15 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
776
782
|
}, [P(r, {
|
|
777
783
|
name: "ri:time-line",
|
|
778
784
|
class: "shrink-0"
|
|
779
|
-
}), N("span", ft, B(
|
|
785
|
+
}), N("span", ft, B(un(u.metadata.createdAt)), 1)], 8, dt), dn(u) ? (R(), M("span", pt, [P(r, {
|
|
780
786
|
name: "ri:hourglass-line",
|
|
781
787
|
class: "shrink-0"
|
|
782
|
-
}), N("span", mt, B(
|
|
788
|
+
}), N("span", mt, B(dn(u)), 1)])) : j("", !0)])) : j("", !0),
|
|
783
789
|
e.showMessageNumber ? (R(), M("span", {
|
|
784
790
|
key: 1,
|
|
785
|
-
title: V(i)("label.messageNumber", { n:
|
|
791
|
+
title: V(i)("label.messageNumber", { n: cn.value[x] }),
|
|
786
792
|
class: "text-12 text-word-3 tabular-nums"
|
|
787
|
-
}, " #" + B(
|
|
793
|
+
}, " #" + B(cn.value[x]), 9, ht)) : j("", !0),
|
|
788
794
|
e.showMessageTokensCount && u.metadata?.totalTokens ? (R(), M("span", gt, [P(r, {
|
|
789
795
|
name: "ri:ai-generate-2-line",
|
|
790
796
|
class: "shrink-0"
|
|
@@ -813,7 +819,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
813
819
|
key: 0,
|
|
814
820
|
ref_for: !0,
|
|
815
821
|
ref_key: "feedbackMessageEl",
|
|
816
|
-
ref:
|
|
822
|
+
ref: fn,
|
|
817
823
|
loading: e.feedbackLoading,
|
|
818
824
|
submitted: e.feedbackSubmitted,
|
|
819
825
|
error: e.feedbackError,
|
|
@@ -830,12 +836,13 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
830
836
|
], 64))), 128)),
|
|
831
837
|
P(O, {
|
|
832
838
|
appear: "",
|
|
833
|
-
name: "pk-chatbot-part"
|
|
839
|
+
name: "pk-chatbot-part",
|
|
840
|
+
onLeave: Kt
|
|
834
841
|
}, {
|
|
835
|
-
default: U(() => [
|
|
842
|
+
default: U(() => [Wt.value ? (R(), M("div", {
|
|
836
843
|
key: 0,
|
|
837
844
|
class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
|
|
838
|
-
style: Ce({ minHeight:
|
|
845
|
+
style: Ce({ minHeight: Gt.value ? `${J.value}px` : void 0 })
|
|
839
846
|
}, [N("div", xt, [N("div", St, [P(r, {
|
|
840
847
|
name: "loading-loop",
|
|
841
848
|
class: "shrink-0"
|
|
@@ -846,7 +853,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
846
853
|
appear: "",
|
|
847
854
|
name: "pk-chatbot-part"
|
|
848
855
|
}, {
|
|
849
|
-
default: U(() => [
|
|
856
|
+
default: U(() => [Ut.value ? (R(), A(ue, {
|
|
850
857
|
key: 0,
|
|
851
858
|
error: e.error,
|
|
852
859
|
onRetry: n[3] ||= (e) => t.$emit("auto-retry"),
|
|
@@ -854,7 +861,7 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
854
861
|
}, null, 8, ["error"])) : j("", !0)]),
|
|
855
862
|
_: 1
|
|
856
863
|
}),
|
|
857
|
-
|
|
864
|
+
Bt.value?.role === "user" && !Gt.value || Ut.value ? (R(), M("div", {
|
|
858
865
|
key: 0,
|
|
859
866
|
class: "pk-chatbot-messages__spacer",
|
|
860
867
|
style: Ce({ minHeight: `${J.value}px` })
|
|
@@ -878,4 +885,4 @@ var Ye = ["aria-busy"], Xe = {
|
|
|
878
885
|
//#endregion
|
|
879
886
|
export { Tt as t };
|
|
880
887
|
|
|
881
|
-
//# sourceMappingURL=PkChatbotMessages-
|
|
888
|
+
//# sourceMappingURL=PkChatbotMessages-B2e1MQ_d.js.map
|