@8wave/ai-elements 0.118.0 → 0.119.0-beta.1
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/{PkStreamingMarkdown--CcBvs19.js → PkStreamingMarkdown-kpEBZA4d.js} +789 -780
- package/dist/_chunks/PkStreamingMarkdown-kpEBZA4d.js.map +1 -0
- package/dist/_chunks/{PkToolShowArtifact-BVGN7hV2.js → PkToolShowArtifact-B8TOTS6A.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-BVGN7hV2.js.map → PkToolShowArtifact-B8TOTS6A.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-Blrwqpl0.js → PkToolShowContactForm-B89p05XM.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-Blrwqpl0.js.map → PkToolShowContactForm-B89p05XM.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-BpGHaN6x.js → PkToolShowForm-DTKQtFij.js} +4 -4
- package/dist/_chunks/{PkToolShowForm-BpGHaN6x.js.map → PkToolShowForm-DTKQtFij.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-8c9RvGV1.js → PkToolShowSources-CbwixpOb.js} +2 -2
- package/dist/_chunks/{PkToolShowSources-8c9RvGV1.js.map → PkToolShowSources-CbwixpOb.js.map} +1 -1
- package/dist/ai-elements.es.js +1888 -1863
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/PkAvatar-BTqu8tn9.js +44 -0
- package/dist-vue/_chunks/PkAvatar-BTqu8tn9.js.map +1 -0
- package/dist-vue/_chunks/PkChatbot-C_OzxC0s.js +276 -0
- package/dist-vue/_chunks/PkChatbot-C_OzxC0s.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-D2dhInfG.js → PkChatbotEmptyState-BEQCnqui.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotEmptyState-D2dhInfG.js.map → PkChatbotEmptyState-BEQCnqui.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-CQdxFbBR.js → PkChatbotInput-KJxWrDIT.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-CQdxFbBR.js.map → PkChatbotInput-KJxWrDIT.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-coscJcpy.js → PkChatbotMessages-Zhuxom46.js} +283 -283
- package/dist-vue/_chunks/{PkChatbotMessages-coscJcpy.js.map → PkChatbotMessages-Zhuxom46.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-DnqFluQZ.js → PkChatbotStepPayload-Da4N5CKa.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-DnqFluQZ.js.map → PkChatbotStepPayload-Da4N5CKa.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-BMslY_BG.js → PkChatbotStepToolDetail-rrtImvq5.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-BMslY_BG.js.map → PkChatbotStepToolDetail-rrtImvq5.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-7FT6Ju6_.js → PkChatbotSteps-LEfOolAc.js} +38 -38
- package/dist-vue/_chunks/{PkChatbotSteps-7FT6Ju6_.js.map → PkChatbotSteps-LEfOolAc.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-Cko-Cw6c.js → PkChatbotViewChat-BJ0YHCvA.js} +7 -7
- package/dist-vue/_chunks/PkChatbotViewChat-BJ0YHCvA.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewProfile-B57VRVaO.js → PkChatbotViewProfile-CyzRxE3D.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-B57VRVaO.js.map → PkChatbotViewProfile-CyzRxE3D.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-BtyWXY2k.js → PkStreamingMarkdown-BWEvuFZm.js} +2 -2
- package/dist-vue/_chunks/{PkStreamingMarkdown-BtyWXY2k.js.map → PkStreamingMarkdown-BWEvuFZm.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-Ritx54_X.js → PkToolShowArtifact-tNEG6-r_.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-Ritx54_X.js.map → PkToolShowArtifact-tNEG6-r_.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-D30IsZGy.js → PkToolShowContactForm-DBC6f9gR.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-D30IsZGy.js.map → PkToolShowContactForm-DBC6f9gR.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-PEozSAqU.js → PkToolShowDiagram-Bbq0ETt1.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-PEozSAqU.js.map → PkToolShowDiagram-Bbq0ETt1.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-ZmdM9J9x.js → PkToolShowForm-BG-8aTHy.js} +5 -5
- package/dist-vue/_chunks/{PkToolShowForm-ZmdM9J9x.js.map → PkToolShowForm-BG-8aTHy.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-Dkjf7Tw_.js → PkToolShowImageGallery-DXn-bxHv.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-Dkjf7Tw_.js.map → PkToolShowImageGallery-DXn-bxHv.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-CsHYM8vl.js → PkToolShowProductList-BZ_fDRCq.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-CsHYM8vl.js.map → PkToolShowProductList-BZ_fDRCq.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-CKZkcPLA.js → PkToolShowSources-CUURb0PG.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSources-CKZkcPLA.js.map → PkToolShowSources-CUURb0PG.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-CKm1fVQs.js → PkToolShowVideo-FNlPjswi.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-CKm1fVQs.js.map → PkToolShowVideo-FNlPjswi.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-DLEC9cuh.js → PkToolShowWebPages-CWV79tsb.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-DLEC9cuh.js.map → PkToolShowWebPages-CWV79tsb.js.map} +1 -1
- package/dist-vue/_chunks/{utils-fxHiCnzf.js → utils-Dk2jFXR_.js} +40 -31
- package/dist-vue/_chunks/utils-Dk2jFXR_.js.map +1 -0
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +1 -4
- package/dist-vue/composables.js +132 -113
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +23 -23
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/packages/components/src/chat/PkAvatar.d.ts +7 -0
- package/dist-vue/packages/components/src/chat/utils.d.ts +10 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/PkStreamingMarkdown--CcBvs19.js.map +0 -1
- package/dist-vue/_chunks/PkAvatar-ZgCsoO-p.js +0 -42
- package/dist-vue/_chunks/PkAvatar-ZgCsoO-p.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-Cm45hwYw.js +0 -275
- package/dist-vue/_chunks/PkChatbot-Cm45hwYw.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-Cko-Cw6c.js.map +0 -1
- package/dist-vue/_chunks/utils-fxHiCnzf.js.map +0 -1
|
@@ -1,94 +1,94 @@
|
|
|
1
1
|
import { A as e, E as t, S as n, n as r, v as i } from "./schemas-Bu1lick6.js";
|
|
2
2
|
import { a } from "./Media-C6RS-s98.js";
|
|
3
3
|
import { S as o, j as s, n as c, x as l } from "./Agent-dGF8mkG9.js";
|
|
4
|
-
import { t as u } from "./PkStreamingMarkdown-
|
|
4
|
+
import { t as u } from "./PkStreamingMarkdown-BWEvuFZm.js";
|
|
5
5
|
import "./src-DCfvejyT.js";
|
|
6
6
|
import { c as d, i as f, l as p, n as m, o as h, s as g, t as _ } from "./message-BOiF6Bt5.js";
|
|
7
7
|
import { t as ee } from "./PkChatbotAudioTranscript-BUxBHanA.js";
|
|
8
8
|
import { t as v } from "./PkChatbotError-CRGbK09-.js";
|
|
9
9
|
import { t as te } from "./PkRelativeTime--1cIphlA.js";
|
|
10
|
-
import { C as y, S as ne,
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { n as
|
|
15
|
-
import { t as
|
|
16
|
-
import { VvButton as
|
|
17
|
-
import { Fragment as
|
|
18
|
-
import { useI18n as
|
|
10
|
+
import { C as y, S as ne, T as re, a as ie, f as b, h as x, m as ae, n as oe, o as se, p as ce, t as S, u as le, w as ue, x as de, y as fe } from "./utils-Dk2jFXR_.js";
|
|
11
|
+
import { t as pe } from "./PkChatbotFilePreview-DIP8KLkS.js";
|
|
12
|
+
import { t as me } from "./PkChatbotFeedbackForm-CMFXjoKR.js";
|
|
13
|
+
import { t as he } from "./PkChatbotMessageFeedback-BYmrVaCE.js";
|
|
14
|
+
import { n as ge, t as _e } from "./PkChatbotSteps-LEfOolAc.js";
|
|
15
|
+
import { t as ve } from "./PkChatbotOutlineRail-np4g6vsz.js";
|
|
16
|
+
import { VvButton as ye, VvButtonGroup as be, VvIcon as xe } from "@volverjs/ui-vue/components";
|
|
17
|
+
import { Fragment as C, Transition as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createTextVNode as Se, createVNode as A, defineAsyncComponent as j, defineComponent as Ce, mergeProps as we, nextTick as M, normalizeClass as N, normalizeStyle as Te, onBeforeUnmount as Ee, onMounted as De, openBlock as P, ref as F, renderList as Oe, renderSlot as ke, resolveDynamicComponent as Ae, toDisplayString as I, unref as L, useSlots as je, useTemplateRef as Me, watch as R, withCtx as z, withModifiers as B } from "vue";
|
|
18
|
+
import { useI18n as Ne } from "vue-i18n";
|
|
19
19
|
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/iso.js
|
|
20
|
-
function
|
|
20
|
+
function Pe(t) {
|
|
21
21
|
return e(r, t);
|
|
22
22
|
}
|
|
23
23
|
i({
|
|
24
24
|
platform: n(),
|
|
25
25
|
threadId: n()
|
|
26
26
|
});
|
|
27
|
-
var
|
|
27
|
+
var Fe = i({
|
|
28
28
|
wakeId: t(),
|
|
29
|
-
dueAt:
|
|
29
|
+
dueAt: Pe(),
|
|
30
30
|
reason: n()
|
|
31
31
|
});
|
|
32
|
-
i({ pendingWakeup:
|
|
33
|
-
var
|
|
32
|
+
i({ pendingWakeup: Fe.nullable() }), i({ wakeId: t() });
|
|
33
|
+
var V = (e) => e?.role === "user" && !!e.metadata?.wakeup, Ie = /* @__PURE__ */ new Set([
|
|
34
34
|
"input-streaming",
|
|
35
35
|
"input-available",
|
|
36
36
|
"approval-requested"
|
|
37
|
-
]),
|
|
37
|
+
]), Le = /* @__PURE__ */ new Set([
|
|
38
38
|
...o,
|
|
39
39
|
...l,
|
|
40
40
|
"editSpreadsheet"
|
|
41
41
|
]);
|
|
42
42
|
[...l, c.ShowContactForm];
|
|
43
|
-
var
|
|
43
|
+
var H = (e) => e.state, Re = (e) => e.type.startsWith("tool-") ? e.type.slice(5) : void 0, ze = (e) => e?.role === "assistant" && e.parts.some((e) => {
|
|
44
44
|
if (e.type === "text") return e.text.trim().length > 0;
|
|
45
45
|
if (e.type === "file") return !0;
|
|
46
|
-
let t =
|
|
47
|
-
if (t &&
|
|
48
|
-
let n =
|
|
49
|
-
return n !== void 0 &&
|
|
50
|
-
}),
|
|
51
|
-
if (e?.role !== "assistant" ||
|
|
46
|
+
let t = H(e);
|
|
47
|
+
if (t && Ie.has(t)) return !0;
|
|
48
|
+
let n = Re(e);
|
|
49
|
+
return n !== void 0 && Le.has(n) && t === "output-available";
|
|
50
|
+
}), Be = (e) => {
|
|
51
|
+
if (e?.role !== "assistant" || ze(e)) return !1;
|
|
52
52
|
let t = !1;
|
|
53
|
-
for (let n of e.parts) n.type === "tool-scheduleWakeup" && (t =
|
|
53
|
+
for (let n of e.parts) n.type === "tool-scheduleWakeup" && (t = H(n) === "output-available" && n.input?.noop === !0);
|
|
54
54
|
return t;
|
|
55
|
-
},
|
|
56
|
-
requestOAuthConnection:
|
|
57
|
-
showArtifact:
|
|
58
|
-
showCalendarEvent:
|
|
59
|
-
showComparison:
|
|
60
|
-
showContactForm:
|
|
61
|
-
showDiagram:
|
|
62
|
-
showEmail:
|
|
63
|
-
showImageGallery:
|
|
64
|
-
showLocation:
|
|
65
|
-
showMessage:
|
|
66
|
-
showForm:
|
|
67
|
-
showMultipleChoice:
|
|
68
|
-
showProductList:
|
|
69
|
-
showQrCode:
|
|
70
|
-
showSources:
|
|
71
|
-
showSuggestedReply:
|
|
72
|
-
showVideo:
|
|
73
|
-
showWeather:
|
|
74
|
-
showWebPages:
|
|
55
|
+
}, Ve = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), He = (e) => e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[-_]+/g, " ") : "", Ue = (e) => e ? Ve(e).replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase() : "", U = (e) => e ? Ve(e).replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").toLowerCase() : "", W = (e) => e ? e.charAt(0).toUpperCase() + e.slice(1) : "", We = {
|
|
56
|
+
requestOAuthConnection: j(() => import("./PkToolRequestOAuthConnection-GfSalEJG.js")),
|
|
57
|
+
showArtifact: j(() => import("./PkToolShowArtifact-tNEG6-r_.js").then((e) => e.n)),
|
|
58
|
+
showCalendarEvent: j(() => import("./PkToolShowCalendarEvent-Dv_rss26.js").then((e) => e.n)),
|
|
59
|
+
showComparison: j(() => import("./PkToolShowComparison-DQs3E6-k.js").then((e) => e.n)),
|
|
60
|
+
showContactForm: j(() => import("./PkToolShowContactForm-DBC6f9gR.js").then((e) => e.n)),
|
|
61
|
+
showDiagram: j(() => import("./PkToolShowDiagram-Bbq0ETt1.js")),
|
|
62
|
+
showEmail: j(() => import("./PkToolShowEmail-C591LR5N.js").then((e) => e.n)),
|
|
63
|
+
showImageGallery: j(() => import("./PkToolShowImageGallery-DXn-bxHv.js").then((e) => e.n)),
|
|
64
|
+
showLocation: j(() => import("./PkToolShowLocation-Dyz6h_0n.js").then((e) => e.n)),
|
|
65
|
+
showMessage: j(() => import("./PkToolShowMessage-CbXERPHI.js").then((e) => e.n)),
|
|
66
|
+
showForm: j(() => import("./PkToolShowForm-BG-8aTHy.js").then((e) => e.n)),
|
|
67
|
+
showMultipleChoice: j(() => import("./PkToolShowForm-BG-8aTHy.js").then((e) => e.n)),
|
|
68
|
+
showProductList: j(() => import("./PkToolShowProductList-BZ_fDRCq.js").then((e) => e.n)),
|
|
69
|
+
showQrCode: j(() => import("./PkToolShowQrCode-DEAvfLFu.js").then((e) => e.n)),
|
|
70
|
+
showSources: j(() => import("./PkToolShowSources-CUURb0PG.js").then((e) => e.n)),
|
|
71
|
+
showSuggestedReply: j(() => import("./PkToolShowSuggestedReply-DjutyiEi.js").then((e) => e.n)),
|
|
72
|
+
showVideo: j(() => import("./PkToolShowVideo-FNlPjswi.js")),
|
|
73
|
+
showWeather: j(() => import("./PkToolShowWeather-BH-FtLpk.js")),
|
|
74
|
+
showWebPages: j(() => import("./PkToolShowWebPages-CWV79tsb.js").then((e) => e.n))
|
|
75
75
|
}, Ge = {
|
|
76
76
|
key: 0,
|
|
77
77
|
class: "text-12 text-word-3 m-0 mb-xs"
|
|
78
|
-
}, G = /* @__PURE__ */
|
|
78
|
+
}, G = /* @__PURE__ */ Ce({
|
|
79
79
|
__name: "PkToolApprovalPreviewMessage",
|
|
80
80
|
props: { input: {} },
|
|
81
81
|
setup(e) {
|
|
82
|
-
let t = e, n =
|
|
82
|
+
let t = e, n = T(() => {
|
|
83
83
|
let e = t.input;
|
|
84
84
|
return typeof e?.message == "string" ? e.message : "";
|
|
85
85
|
});
|
|
86
|
-
return (e, t) => n.value ? (
|
|
86
|
+
return (e, t) => n.value ? (P(), O("p", Ge, I(n.value), 1)) : D("", !0);
|
|
87
87
|
}
|
|
88
|
-
}), K = { [
|
|
88
|
+
}), K = { [S]: G }, Ke = {
|
|
89
89
|
key: 0,
|
|
90
90
|
class: "text-12 text-word-3 m-0 mb-xs"
|
|
91
|
-
}, qe = /* @__PURE__ */
|
|
91
|
+
}, qe = /* @__PURE__ */ Ce({
|
|
92
92
|
__name: "PkToolApprovalCard",
|
|
93
93
|
props: {
|
|
94
94
|
part: {},
|
|
@@ -97,7 +97,7 @@ var U = (e) => e.state, Le = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
|
|
|
97
97
|
},
|
|
98
98
|
emits: ["respond"],
|
|
99
99
|
setup(e, { emit: t }) {
|
|
100
|
-
let n = e, r = t, { t: i } =
|
|
100
|
+
let n = e, r = t, { t: i } = Ne({ useScope: "global" }), a = T(() => n.part), o = T(() => f(n.part)), c = T(() => o.value === S), l = T(() => c.value ? (a.value.state === "input-available" || s(a.value.output)) && n.callVerdict === void 0 : a.value.state === "approval-requested"), u = T(() => l.value && n.actionable === !0), d = T(() => l.value && n.actionable !== !0), p = T(() => c.value ? a.value.output === "confirmed" || n.callVerdict === !0 : a.value.approval?.approved === !0), m = T(() => c.value ? a.value.output === "cancelled" || n.callVerdict === !1 : a.value.approval?.approved === !1 || a.value.state === "output-denied"), h = T(() => K[o.value]), g = T(() => {
|
|
101
101
|
if (d.value) return {
|
|
102
102
|
icon: "ri:time-line",
|
|
103
103
|
message: i("toolApproval.expired")
|
|
@@ -110,39 +110,39 @@ var U = (e) => e.state, Le = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
|
|
|
110
110
|
icon: "ri:close-line",
|
|
111
111
|
message: i(c.value ? "toolApproval.cancelled" : "toolApproval.denied")
|
|
112
112
|
};
|
|
113
|
-
}), _ =
|
|
113
|
+
}), _ = T(() => !!g.value && !h.value);
|
|
114
114
|
return (t, n) => {
|
|
115
|
-
let o =
|
|
116
|
-
return
|
|
117
|
-
|
|
118
|
-
default:
|
|
115
|
+
let o = ye, s = be, d = xe;
|
|
116
|
+
return P(), O("div", { class: N(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !_.value }]) }, [
|
|
117
|
+
A(w, null, {
|
|
118
|
+
default: z(() => [!c.value && l.value ? (P(), O("p", Ke, I(L(i)("toolApproval.prompt")), 1)) : D("", !0)]),
|
|
119
119
|
_: 1
|
|
120
120
|
}),
|
|
121
|
-
h.value ? (
|
|
121
|
+
h.value ? (P(), E(Ae(h.value), {
|
|
122
122
|
key: 0,
|
|
123
123
|
part: e.part,
|
|
124
124
|
input: a.value.input
|
|
125
|
-
}, null, 8, ["part", "input"])) :
|
|
126
|
-
|
|
127
|
-
default:
|
|
125
|
+
}, null, 8, ["part", "input"])) : D("", !0),
|
|
126
|
+
A(w, { mode: "out-in" }, {
|
|
127
|
+
default: z(() => [g.value ? (P(), O("p", {
|
|
128
128
|
key: 1,
|
|
129
|
-
class:
|
|
130
|
-
}, [
|
|
129
|
+
class: N(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": h.value }])
|
|
130
|
+
}, [A(d, {
|
|
131
131
|
name: g.value.icon,
|
|
132
132
|
class: "shrink-0"
|
|
133
|
-
}, null, 8, ["name"]),
|
|
134
|
-
default:
|
|
133
|
+
}, null, 8, ["name"]), Se(" " + I(g.value.message), 1)], 2)) : (P(), E(s, { key: 0 }, {
|
|
134
|
+
default: z(() => [A(o, {
|
|
135
135
|
modifiers: "primary-small",
|
|
136
136
|
disabled: !u.value,
|
|
137
137
|
icon: "ri:check-line",
|
|
138
|
-
label:
|
|
139
|
-
onClick: n[0] ||=
|
|
140
|
-
}, null, 8, ["disabled", "label"]),
|
|
138
|
+
label: L(i)("action.proceed"),
|
|
139
|
+
onClick: n[0] ||= B((e) => r("respond", !0), ["stop"])
|
|
140
|
+
}, null, 8, ["disabled", "label"]), A(o, {
|
|
141
141
|
modifiers: "action-quiet-small",
|
|
142
142
|
disabled: !u.value,
|
|
143
143
|
icon: "ri:close-line",
|
|
144
|
-
label:
|
|
145
|
-
onClick: n[1] ||=
|
|
144
|
+
label: L(i)("action.cancel"),
|
|
145
|
+
onClick: n[1] ||= B((e) => r("respond", !1), ["stop"])
|
|
146
146
|
}, null, 8, ["disabled", "label"])]),
|
|
147
147
|
_: 1
|
|
148
148
|
}))]),
|
|
@@ -153,7 +153,7 @@ var U = (e) => e.state, Le = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
|
|
|
153
153
|
}
|
|
154
154
|
}), Je = 30, q = 500;
|
|
155
155
|
function Ye(e) {
|
|
156
|
-
let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l =
|
|
156
|
+
let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = F(!1), u = F(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, _ = (e = "smooth") => {
|
|
157
157
|
!t.value || l.value ? d = !1 : (d = !0, t.value.scrollTo({
|
|
158
158
|
top: t.value.scrollHeight,
|
|
159
159
|
behavior: e
|
|
@@ -177,44 +177,44 @@ function Ye(e) {
|
|
|
177
177
|
n <= e.scrollTop || (u.value = !0, d = !0, e.scrollTop = n, requestAnimationFrame(() => {
|
|
178
178
|
d = !1;
|
|
179
179
|
}));
|
|
180
|
-
},
|
|
180
|
+
}, ie = () => {
|
|
181
181
|
!f && t.value && (f = new MutationObserver(re), f.observe(t.value, {
|
|
182
182
|
childList: !0,
|
|
183
183
|
subtree: !0,
|
|
184
184
|
characterData: !0
|
|
185
185
|
}));
|
|
186
|
-
},
|
|
186
|
+
}, b = () => {
|
|
187
187
|
f?.disconnect(), f = null;
|
|
188
188
|
};
|
|
189
|
-
|
|
190
|
-
e === "streaming" || e === "submitted" ?
|
|
191
|
-
}),
|
|
189
|
+
R(n, (e, t) => {
|
|
190
|
+
e === "streaming" || e === "submitted" ? ie() : (e !== "ready" || t !== "streaming") && b();
|
|
191
|
+
}), R(r, async () => {
|
|
192
192
|
if (r() && i() !== "assistant") {
|
|
193
|
-
|
|
193
|
+
oe(), l.value = !1, d = !0;
|
|
194
194
|
try {
|
|
195
|
-
await
|
|
195
|
+
await M(), await o?.(), await M();
|
|
196
196
|
} finally {
|
|
197
197
|
_();
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
});
|
|
201
|
-
let
|
|
202
|
-
t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight,
|
|
203
|
-
},
|
|
204
|
-
p?.disconnect(), p = null, m?.disconnect(), m = null,
|
|
201
|
+
let x = null, ae = () => {
|
|
202
|
+
t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, x && clearTimeout(x), x = setTimeout(oe, 300)));
|
|
203
|
+
}, oe = () => {
|
|
204
|
+
p?.disconnect(), p = null, m?.disconnect(), m = null, x &&= (clearTimeout(x), null);
|
|
205
205
|
};
|
|
206
|
-
return
|
|
206
|
+
return De(() => {
|
|
207
207
|
if (!t.value) return;
|
|
208
208
|
t.value.addEventListener("wheel", ee, { passive: !0 }), t.value.addEventListener("touchstart", te, { passive: !0 }), t.value.addEventListener("touchmove", y, { passive: !0 });
|
|
209
209
|
let e = n() === "submitted" || n() === "streaming";
|
|
210
|
-
e ?
|
|
210
|
+
e ? ie() : (p = new ResizeObserver(ae), p.observe(t.value), m = new MutationObserver(ae), m.observe(t.value, {
|
|
211
211
|
childList: !0,
|
|
212
212
|
subtree: !0
|
|
213
213
|
}));
|
|
214
214
|
let r = a?.() ?? t.value.firstElementChild;
|
|
215
|
-
r && (h = new ResizeObserver(re), h.observe(r)), e ||
|
|
216
|
-
}),
|
|
217
|
-
t.value?.removeEventListener("wheel", ee), t.value?.removeEventListener("touchstart", te), t.value?.removeEventListener("touchmove", y), h?.disconnect(), h = null,
|
|
215
|
+
r && (h = new ResizeObserver(re), h.observe(r)), e || ae();
|
|
216
|
+
}), Ee(() => {
|
|
217
|
+
t.value?.removeEventListener("wheel", ee), t.value?.removeEventListener("touchstart", te), t.value?.removeEventListener("touchmove", y), h?.disconnect(), h = null, b(), oe();
|
|
218
218
|
}), {
|
|
219
219
|
handleScroll: ne,
|
|
220
220
|
scrollToBottom: _,
|
|
@@ -225,12 +225,12 @@ function Ye(e) {
|
|
|
225
225
|
//#endregion
|
|
226
226
|
//#region ../../packages/components/src/chat/wakeupFeed.ts
|
|
227
227
|
function Xe(e, t = () => !1) {
|
|
228
|
-
let n = (e) =>
|
|
228
|
+
let n = (e) => Be(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
|
|
229
229
|
for (; a < e.length;) {
|
|
230
230
|
let t = e[a];
|
|
231
|
-
if (
|
|
231
|
+
if (V(t) && n(e[a + 1])) {
|
|
232
232
|
let o = t.id, s = 0, c;
|
|
233
|
-
for (;
|
|
233
|
+
for (; V(e[a]) && n(e[a + 1]);) s += 1, c = e[a].metadata?.createdAt ?? c, r.add(e[a].id), r.add(e[a + 1].id), a += 2;
|
|
234
234
|
i.set(o, {
|
|
235
235
|
count: s,
|
|
236
236
|
lastAt: c
|
|
@@ -277,7 +277,7 @@ var Ze = ["aria-busy"], Qe = {
|
|
|
277
277
|
}, yt = { class: "truncate" }, bt = ["datetime"], xt = { class: "truncate" }, St = {
|
|
278
278
|
key: 4,
|
|
279
279
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
280
|
-
}, Ct = { class: "pk-chatbot-message__loading-info" }, wt = { class: "flex gap-8 items-center" }, Tt = { class: "text-12" }, Et = ["title", "aria-label"], J = /* @__PURE__ */
|
|
280
|
+
}, Ct = { class: "pk-chatbot-message__loading-info" }, wt = { class: "flex gap-8 items-center" }, Tt = { class: "text-12" }, Et = ["title", "aria-label"], J = /* @__PURE__ */ Ce({
|
|
281
281
|
__name: "PkChatbotMessages",
|
|
282
282
|
props: {
|
|
283
283
|
status: {},
|
|
@@ -322,8 +322,8 @@ var Ze = ["aria-busy"], Qe = {
|
|
|
322
322
|
"confirm-respond"
|
|
323
323
|
],
|
|
324
324
|
setup(e, { emit: t }) {
|
|
325
|
-
let n = e, r = t, { t: i, d: o, n: s } =
|
|
326
|
-
if (
|
|
325
|
+
let n = e, r = t, { t: i, d: o, n: s } = Ne({ useScope: "global" }), c = je(), l = (e, t) => {
|
|
326
|
+
if (ne(e)) {
|
|
327
327
|
let n = e.toolCallId;
|
|
328
328
|
n && r("confirm-respond", {
|
|
329
329
|
toolCallId: n,
|
|
@@ -331,54 +331,54 @@ var Ze = ["aria-busy"], Qe = {
|
|
|
331
331
|
});
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
|
-
let n =
|
|
334
|
+
let n = ae(e);
|
|
335
335
|
n && r("approval-respond", {
|
|
336
336
|
id: n,
|
|
337
337
|
approved: t
|
|
338
338
|
});
|
|
339
|
-
},
|
|
340
|
-
scrollEl:
|
|
339
|
+
}, S = Me("scrollEl"), j = Me("wrapperEl"), Ce = T(() => re(n.textColor, n.mainColor)), { handleScroll: Ee, scrollToBottom: Pe, userScrolledUp: Fe, isAtBottom: Ie } = Ye({
|
|
340
|
+
scrollEl: S,
|
|
341
341
|
status: () => n.status,
|
|
342
342
|
messagesLength: () => n.messages?.length,
|
|
343
343
|
lastMessageRole: () => n.messages?.[n.messages.length - 1]?.role,
|
|
344
|
-
contentEl: () =>
|
|
344
|
+
contentEl: () => j.value,
|
|
345
345
|
beforeNewMessageScroll: () => Ge(),
|
|
346
346
|
onScrollUp: () => r("scroll-up"),
|
|
347
347
|
onScrollDown: () => r("scroll-down")
|
|
348
|
-
}),
|
|
349
|
-
|
|
350
|
-
},
|
|
348
|
+
}), Le = () => {
|
|
349
|
+
Fe.value = !1, Pe();
|
|
350
|
+
}, H = T(() => (n.messages ?? []).filter((e) => e.role === "user" && !V(e)).map((e) => ({
|
|
351
351
|
id: e.id,
|
|
352
352
|
preview: e.parts.find(d)?.text.trim().slice(0, 120) || "…"
|
|
353
|
-
}))),
|
|
354
|
-
let e =
|
|
353
|
+
}))), Re = F(), ze = () => S.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], Be = () => {
|
|
354
|
+
let e = S.value;
|
|
355
355
|
if (!e || !n.showScrollToBottom) return;
|
|
356
|
-
let t = e.getBoundingClientRect().top + e.clientHeight / 2, r =
|
|
357
|
-
|
|
358
|
-
e.getBoundingClientRect().top <= t && (r =
|
|
359
|
-
}),
|
|
356
|
+
let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = H.value[0]?.id;
|
|
357
|
+
ze().forEach((e, n) => {
|
|
358
|
+
e.getBoundingClientRect().top <= t && (r = H.value[n]?.id);
|
|
359
|
+
}), Re.value = r;
|
|
360
360
|
};
|
|
361
|
-
|
|
362
|
-
await
|
|
361
|
+
R(H, async () => {
|
|
362
|
+
await M(), Be();
|
|
363
363
|
});
|
|
364
|
-
let
|
|
365
|
-
|
|
366
|
-
},
|
|
367
|
-
let t =
|
|
368
|
-
t && r && (
|
|
364
|
+
let Ve = () => {
|
|
365
|
+
Ee(), Be();
|
|
366
|
+
}, He = (e) => {
|
|
367
|
+
let t = S.value, n = H.value.findIndex((t) => t.id === e), r = ze()[n];
|
|
368
|
+
t && r && (Fe.value = !0, t.scrollTo({
|
|
369
369
|
top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
|
|
370
370
|
behavior: "smooth"
|
|
371
371
|
}));
|
|
372
|
-
},
|
|
372
|
+
}, U = F(0), W = F(!1), Ge = async () => {
|
|
373
373
|
let e = n.messages;
|
|
374
|
-
if (!e?.length || n.disableHeightAdjustment || e[e.length - 1].role !== "user" && n.status !== "submitted" && n.status !== "streaming" || (
|
|
375
|
-
let { paddingTop: t, paddingBottom: r } = getComputedStyle(
|
|
376
|
-
i > 0 && (
|
|
374
|
+
if (!e?.length || n.disableHeightAdjustment || e[e.length - 1].role !== "user" && n.status !== "submitted" && n.status !== "streaming" || (W.value = !1, await M(), !S.value)) return;
|
|
375
|
+
let { paddingTop: t, paddingBottom: r } = getComputedStyle(S.value), i = S.value.clientHeight - Number.parseFloat(t) - Number.parseFloat(r), a = j.value && Number.parseFloat(getComputedStyle(j.value).rowGap) || 0, o = ze(), s = i - (o[o.length - 1]?.clientHeight ?? 0) - a;
|
|
376
|
+
i > 0 && (U.value = Math.max(s, 0)), await M();
|
|
377
377
|
};
|
|
378
|
-
|
|
378
|
+
R(() => [n.messages?.length, n.messages?.[n.messages.length - 1]?.id], () => Ge()), De(() => {
|
|
379
379
|
(n.status === "submitted" || n.status === "streaming" || n.awaitingSpokenAnswer) && Ge();
|
|
380
|
-
}),
|
|
381
|
-
(e === "ready" || e === "error") && (
|
|
380
|
+
}), R(() => n.status, (e) => {
|
|
381
|
+
(e === "ready" || e === "error") && (W.value = !0, U.value = 0);
|
|
382
382
|
});
|
|
383
383
|
let G = (e) => n.revisedAnswers?.some((t) => t.messageId === e), K = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), Ke = (e, t) => !n.readonlyFeedback && Vt(e, t), Je = (e) => n.readonlyFeedback ? K(e) : void 0, q = (e) => Je(e)?.vote, J = (e) => {
|
|
384
384
|
let t = Je(e);
|
|
@@ -396,28 +396,28 @@ var Ze = ["aria-busy"], Qe = {
|
|
|
396
396
|
let t = Nt(e);
|
|
397
397
|
for (let e = t.length - 1; e >= 0; --e) if (d(t[e])) return e;
|
|
398
398
|
return -1;
|
|
399
|
-
}, jt =
|
|
399
|
+
}, jt = T(() => n.messages?.[n.messages.length - 1]), Y = T(() => {
|
|
400
400
|
let e = jt.value;
|
|
401
401
|
return e ? e.parts[e.parts.length - 1] : null;
|
|
402
|
-
}), Mt =
|
|
402
|
+
}), Mt = T(() => {
|
|
403
403
|
let e = /* @__PURE__ */ new Map();
|
|
404
|
-
for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id,
|
|
404
|
+
for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, ue(ie(y(t.parts))));
|
|
405
405
|
return e;
|
|
406
|
-
}), Nt = (e) => Mt.value.get(e.id) ?? e.parts, X =
|
|
406
|
+
}), Nt = (e) => Mt.value.get(e.id) ?? e.parts, X = T(() => n.status === "submitted" || n.status === "streaming"), Pt = T(() => n.status === "error"), Ft = T(() => n.awaitingSpokenAnswer === !0 && !X.value), It = T(() => Ft.value && jt.value?.role === "user" && !Pt.value), Lt = T(() => {
|
|
407
407
|
let e = Y.value;
|
|
408
|
-
return
|
|
409
|
-
}), Rt =
|
|
408
|
+
return x(i, e);
|
|
409
|
+
}), Rt = T(() => {
|
|
410
410
|
let e = Y.value;
|
|
411
|
-
return
|
|
411
|
+
return b(e);
|
|
412
412
|
}), zt = (e) => n.messages?.findIndex((t) => t.id === e), Z = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, Bt = (e) => Z(e) && n.status === "ready" && !!n.actions?.includes("regenerate"), Vt = (e, t) => (!Z(t) || n.status === "ready") && !!n.actions?.includes(e), Ht = (e) => {
|
|
413
413
|
let t = e.parts[e.parts.length - 1];
|
|
414
414
|
return d(t);
|
|
415
|
-
}, Ut = (e) => e.parts.some((e) => g(e) || p(e)), Wt = (e) => !!n.showExtendedSteps && Q(e) && Ut(e), Gt = (e) => p(e) && !
|
|
415
|
+
}, Ut = (e) => e.parts.some((e) => g(e) || p(e)), Wt = (e) => !!n.showExtendedSteps && Q(e) && Ut(e), Gt = (e) => p(e) && !de(e) && !!(We[f(e)] || c[e.type] || n.showAllMessageParts), Kt = (e) => e.parts.some((e) => d(e) && !!e.text.trim() || h(e) || fe(e) && !de(e) || Gt(e)), Q = (e) => e.role === "assistant", qt = (e) => e.role === "user", Jt = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), Yt = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), Xt = (e) => {
|
|
416
416
|
let t = Jt(e)?.metadata?.createdAt, n = Yt(e)?.metadata?.createdAt;
|
|
417
417
|
if (!t || !n) return;
|
|
418
418
|
let r = new Date(t), i = new Date(n);
|
|
419
419
|
return r.toDateString() === i.toDateString() ? void 0 : i;
|
|
420
|
-
}, $ =
|
|
420
|
+
}, $ = T(() => n.showAllMessageParts ? Xe([]) : Xe(n.messages ?? [], Kt)), Zt = T(() => {
|
|
421
421
|
let e = 0;
|
|
422
422
|
return (n.messages ?? []).map((t) => t.parts.length > 0 ? ++e : void 0);
|
|
423
423
|
}), Qt = (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), $t = (e) => {
|
|
@@ -425,67 +425,67 @@ var Ze = ["aria-busy"], Qe = {
|
|
|
425
425
|
return o(t, n ? "time" : "date-time");
|
|
426
426
|
}, en = (e) => {
|
|
427
427
|
let { createdAt: t, completedAt: n } = e.metadata ?? {};
|
|
428
|
-
if (t && n) return
|
|
429
|
-
}, tn =
|
|
430
|
-
return
|
|
431
|
-
if (await
|
|
428
|
+
if (t && n) return le(s, n - t);
|
|
429
|
+
}, tn = Me("feedbackMessageEl");
|
|
430
|
+
return R(() => n.feedbackMessageId, async () => {
|
|
431
|
+
if (await M(), !n.feedbackMessageId) return;
|
|
432
432
|
let e = tn.value?.[0]?.$el;
|
|
433
|
-
e && (Z(zt(n.feedbackMessageId)) ?
|
|
433
|
+
e && (Z(zt(n.feedbackMessageId)) ? Pe() : e.scrollIntoView({
|
|
434
434
|
behavior: "smooth",
|
|
435
435
|
block: "center"
|
|
436
436
|
}));
|
|
437
437
|
}), (t, n) => {
|
|
438
|
-
let r =
|
|
439
|
-
return
|
|
438
|
+
let r = xe, p = ye, g = be;
|
|
439
|
+
return P(), O("div", {
|
|
440
440
|
ref_key: "scrollEl",
|
|
441
|
-
ref:
|
|
442
|
-
class:
|
|
441
|
+
ref: S,
|
|
442
|
+
class: N(["pk-chatbot-messages scrollbar-thin", { "pk-chatbot-messages--settling": W.value }]),
|
|
443
443
|
role: "log",
|
|
444
444
|
"aria-live": "polite",
|
|
445
445
|
"aria-relevant": "additions text",
|
|
446
446
|
"aria-busy": X.value,
|
|
447
|
-
style:
|
|
447
|
+
style: Te({
|
|
448
448
|
"--chatbot-main-color": e.mainColor,
|
|
449
|
-
"--chatbot-contrast-color":
|
|
449
|
+
"--chatbot-contrast-color": Ce.value
|
|
450
450
|
}),
|
|
451
|
-
onScroll:
|
|
451
|
+
onScroll: Ve
|
|
452
452
|
}, [
|
|
453
|
-
e.showScrollToBottom &&
|
|
454
|
-
items:
|
|
455
|
-
"active-id":
|
|
456
|
-
onSelect:
|
|
457
|
-
}, null, 8, ["items", "active-id"])])) :
|
|
458
|
-
|
|
453
|
+
e.showScrollToBottom && H.value.length > 1 ? (P(), O("div", Qe, [A(ve, {
|
|
454
|
+
items: H.value,
|
|
455
|
+
"active-id": Re.value,
|
|
456
|
+
onSelect: He
|
|
457
|
+
}, null, 8, ["items", "active-id"])])) : D("", !0),
|
|
458
|
+
k("div", {
|
|
459
459
|
ref_key: "wrapperEl",
|
|
460
|
-
ref:
|
|
460
|
+
ref: j,
|
|
461
461
|
class: "pk-chatbot-messages__wrapper"
|
|
462
462
|
}, [
|
|
463
|
-
(
|
|
464
|
-
qt(v) && Xt(y) ? (
|
|
465
|
-
$.value.quietRuns.has(v.id) ? (
|
|
463
|
+
(P(!0), O(C, null, Oe(e.messages, (v, y) => (P(), O(C, { key: v.id }, [
|
|
464
|
+
qt(v) && Xt(y) ? (P(), O("div", $e, [k("span", et, I(L(o)(Xt(y), "short")), 1)])) : D("", !0),
|
|
465
|
+
$.value.quietRuns.has(v.id) ? (P(), O("div", tt, [A(r, {
|
|
466
466
|
name: "ri:alarm-line",
|
|
467
467
|
class: "shrink-0"
|
|
468
|
-
}),
|
|
468
|
+
}), k("span", null, I(L(i)("label.wakeupQuietRun", {
|
|
469
469
|
count: $.value.quietRuns.get(v.id).count,
|
|
470
|
-
time:
|
|
471
|
-
}, $.value.quietRuns.get(v.id).count)), 1)])) :
|
|
470
|
+
time: L(o)($.value.quietRuns.get(v.id).lastAt ?? Date.now(), "time")
|
|
471
|
+
}, $.value.quietRuns.get(v.id).count)), 1)])) : L(V)(v) && !$.value.hidden.has(v.id) && !e.showAllMessageParts ? (P(), O("div", {
|
|
472
472
|
key: 2,
|
|
473
473
|
class: "pk-chatbot-wakeup",
|
|
474
474
|
title: v.metadata?.wakeup?.reason
|
|
475
|
-
}, [
|
|
475
|
+
}, [A(r, {
|
|
476
476
|
name: "ri:alarm-line",
|
|
477
477
|
class: "shrink-0"
|
|
478
|
-
}),
|
|
479
|
-
(!
|
|
478
|
+
}), k("span", null, [Se(I(L(i)("label.wakeupCheck")) + " ", 1), v.metadata?.createdAt ? (P(), O(C, { key: 0 }, [Se(" · " + I(L(o)(v.metadata.createdAt, "time")), 1)], 64)) : D("", !0)])], 8, nt)) : D("", !0),
|
|
479
|
+
(!L(V)(v) || e.showAllMessageParts) && (!$.value.hidden.has(v.id) || X.value && Z(y)) && (v.parts.length || Z(y) && X.value && Q(v)) ? (P(), O("div", {
|
|
480
480
|
key: 3,
|
|
481
|
-
class:
|
|
482
|
-
style:
|
|
481
|
+
class: N(["pk-chatbot-message", [`pk-chatbot-message--${v.role}`, { "pk-chatbot-message--loading": X.value && Z(y) && Q(v) }]]),
|
|
482
|
+
style: Te({ minHeight: Z(y) && Q(v) && !Pt.value ? `${U.value}px` : void 0 })
|
|
483
483
|
}, [
|
|
484
|
-
|
|
484
|
+
A(w, {
|
|
485
485
|
appear: "",
|
|
486
486
|
name: "pk-chatbot-part"
|
|
487
487
|
}, {
|
|
488
|
-
default:
|
|
488
|
+
default: z(() => [Wt(v) ? (P(), E(_e, {
|
|
489
489
|
key: 0,
|
|
490
490
|
message: v,
|
|
491
491
|
"is-streaming": X.value && Z(y),
|
|
@@ -496,20 +496,20 @@ var Ze = ["aria-busy"], Qe = {
|
|
|
496
496
|
"is-streaming",
|
|
497
497
|
"has-content",
|
|
498
498
|
"is-dark"
|
|
499
|
-
])) :
|
|
499
|
+
])) : D("", !0)]),
|
|
500
500
|
_: 2
|
|
501
501
|
}, 1024),
|
|
502
|
-
(
|
|
502
|
+
(P(!0), O(C, null, Oe(Nt(v), (n, i) => (P(), O(C, { key: L(se)(n, i) }, [L(d)(n) && n.text.trim() ? (P(), E(w, {
|
|
503
503
|
key: 0,
|
|
504
504
|
appear: "",
|
|
505
505
|
name: "pk-chatbot-part"
|
|
506
506
|
}, {
|
|
507
|
-
default:
|
|
507
|
+
default: z(() => [k("div", rt, [ke(t.$slots, "text", we({ ref_for: !0 }, {
|
|
508
508
|
message: v,
|
|
509
509
|
part: n,
|
|
510
510
|
index: y,
|
|
511
511
|
isLoading: X.value
|
|
512
|
-
}), () => [Q(v) ? (
|
|
512
|
+
}), () => [Q(v) ? (P(), E(u, {
|
|
513
513
|
key: 0,
|
|
514
514
|
class: "wysiwyg",
|
|
515
515
|
markdown: n.text,
|
|
@@ -519,44 +519,44 @@ var Ze = ["aria-busy"], Qe = {
|
|
|
519
519
|
"markdown",
|
|
520
520
|
"is-dark",
|
|
521
521
|
"loading"
|
|
522
|
-
])) : (
|
|
522
|
+
])) : (P(), O(C, { key: 1 }, [Se(I(n.text), 1)], 64))]), Dt(v.id) && !K(v.id)?.comment && i === At(v) ? (P(), O("span", {
|
|
523
523
|
key: 0,
|
|
524
|
-
class:
|
|
524
|
+
class: N(["pk-chatbot-message__reaction", Ot(v.id)]),
|
|
525
525
|
title: kt(v.id)
|
|
526
|
-
}, [J(v.id) ? (
|
|
526
|
+
}, [J(v.id) ? (P(), O("span", at, I(J(v.id)), 1)) : (P(), E(r, {
|
|
527
527
|
key: 1,
|
|
528
528
|
name: q(v.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
|
|
529
|
-
}, null, 8, ["name"]))], 10, it)) :
|
|
529
|
+
}, null, 8, ["name"]))], 10, it)) : D("", !0)])]),
|
|
530
530
|
_: 2
|
|
531
|
-
}, 1024)) :
|
|
531
|
+
}, 1024)) : L(h)(n) ? (P(), E(w, {
|
|
532
532
|
key: 1,
|
|
533
533
|
appear: "",
|
|
534
534
|
name: "pk-chatbot-part"
|
|
535
535
|
}, {
|
|
536
|
-
default:
|
|
536
|
+
default: z(() => [L(a)(n.filename, n.mediaType) ? (P(), O("div", ot, [A(pe, {
|
|
537
537
|
"media-type": n.mediaType,
|
|
538
538
|
url: n.url,
|
|
539
539
|
filename: n.filename,
|
|
540
|
-
size:
|
|
540
|
+
size: L(_)(n)?.bytesCount
|
|
541
541
|
}, null, 8, [
|
|
542
542
|
"media-type",
|
|
543
543
|
"url",
|
|
544
544
|
"filename",
|
|
545
545
|
"size"
|
|
546
|
-
]),
|
|
546
|
+
]), A(ee, {
|
|
547
547
|
url: n.url,
|
|
548
|
-
transcript:
|
|
548
|
+
transcript: L(m)(n),
|
|
549
549
|
pending: e.status === "submitted" && Z(y)
|
|
550
550
|
}, null, 8, [
|
|
551
551
|
"url",
|
|
552
552
|
"transcript",
|
|
553
553
|
"pending"
|
|
554
|
-
])])) : (
|
|
554
|
+
])])) : (P(), E(pe, {
|
|
555
555
|
key: 1,
|
|
556
556
|
"media-type": n.mediaType,
|
|
557
557
|
url: n.url,
|
|
558
558
|
filename: n.filename,
|
|
559
|
-
size:
|
|
559
|
+
size: L(_)(n)?.bytesCount
|
|
560
560
|
}, null, 8, [
|
|
561
561
|
"media-type",
|
|
562
562
|
"url",
|
|
@@ -564,15 +564,15 @@ var Ze = ["aria-busy"], Qe = {
|
|
|
564
564
|
"size"
|
|
565
565
|
]))]),
|
|
566
566
|
_: 2
|
|
567
|
-
}, 1024)) :
|
|
567
|
+
}, 1024)) : L(fe)(n) && !L(de)(n) ? (P(), E(w, {
|
|
568
568
|
key: 2,
|
|
569
569
|
appear: "",
|
|
570
570
|
name: "pk-chatbot-part"
|
|
571
571
|
}, {
|
|
572
|
-
default:
|
|
572
|
+
default: z(() => [(P(), E(qe, {
|
|
573
573
|
key: `approval-${i}`,
|
|
574
574
|
part: n,
|
|
575
|
-
actionable: e.interactive === !0 && (
|
|
575
|
+
actionable: e.interactive === !0 && (L(ne)(n) || Z(y)),
|
|
576
576
|
"call-verdict": e.confirmVerdictsOnCall?.get(n.toolCallId ?? ""),
|
|
577
577
|
onRespond: (e) => l(n, e)
|
|
578
578
|
}, null, 8, [
|
|
@@ -582,222 +582,222 @@ var Ze = ["aria-busy"], Qe = {
|
|
|
582
582
|
"onRespond"
|
|
583
583
|
]))]),
|
|
584
584
|
_: 2
|
|
585
|
-
}, 1024)) : Gt(n) ? (
|
|
585
|
+
}, 1024)) : Gt(n) ? (P(), E(w, {
|
|
586
586
|
key: 3,
|
|
587
587
|
appear: "",
|
|
588
588
|
name: "pk-chatbot-part"
|
|
589
589
|
}, {
|
|
590
|
-
default:
|
|
591
|
-
key: `component-${i}-${
|
|
590
|
+
default: z(() => [!L(c)[n.type] && L(We)[L(f)(n)] ? (P(), E(Ae(L(We)[L(f)(n)]), {
|
|
591
|
+
key: `component-${i}-${L(ce)(n)}`,
|
|
592
592
|
part: n
|
|
593
|
-
}, null, 8, ["part"])) :
|
|
593
|
+
}, null, 8, ["part"])) : ke(t.$slots, n.type, we({ ref_for: !0 }, {
|
|
594
594
|
message: v,
|
|
595
595
|
part: n,
|
|
596
596
|
index: y,
|
|
597
597
|
isLoading: X.value
|
|
598
|
-
}), () => [e.showAllMessageParts ? (
|
|
598
|
+
}), () => [e.showAllMessageParts ? (P(), O("div", st, [k("div", ct, [L(b)(n) ? (P(), E(r, {
|
|
599
599
|
key: 0,
|
|
600
|
-
name:
|
|
600
|
+
name: L(b)(n),
|
|
601
601
|
class: "shrink-0"
|
|
602
|
-
}, null, 8, ["name"])) :
|
|
602
|
+
}, null, 8, ["name"])) : D("", !0), k("code", lt, I(L(Ue)(n.type)), 1)])])) : D("", !0)], void 0, 1)]),
|
|
603
603
|
_: 2
|
|
604
|
-
}, 1024)) :
|
|
605
|
-
default:
|
|
604
|
+
}, 1024)) : D("", !0), A(w, { mode: "out-in" }, {
|
|
605
|
+
default: z(() => [i === At(v) && e.readonlyFeedback && K(v.id)?.comment ? (P(), E(he, {
|
|
606
606
|
key: 0,
|
|
607
607
|
feedback: K(v.id)
|
|
608
|
-
}, null, 8, ["feedback"])) :
|
|
608
|
+
}, null, 8, ["feedback"])) : D("", !0)]),
|
|
609
609
|
_: 2
|
|
610
610
|
}, 1024)], 64))), 128)),
|
|
611
|
-
|
|
611
|
+
A(w, {
|
|
612
612
|
name: "fade-in",
|
|
613
613
|
mode: "out-in"
|
|
614
614
|
}, {
|
|
615
|
-
default:
|
|
615
|
+
default: z(() => [X.value && Z(y) && !Ht(v) && Q(v) && (!Wt(v) || Kt(v)) ? (P(), O("div", {
|
|
616
616
|
key: `loading-info-${v.id}`,
|
|
617
617
|
class: "pk-chatbot-message__loading-info"
|
|
618
|
-
}, [
|
|
619
|
-
|
|
618
|
+
}, [k("div", ut, [
|
|
619
|
+
A(r, {
|
|
620
620
|
name: "loading-loop",
|
|
621
621
|
class: "shrink-0"
|
|
622
622
|
}),
|
|
623
|
-
|
|
624
|
-
default:
|
|
623
|
+
A(w, { mode: "out-in" }, {
|
|
624
|
+
default: z(() => [Rt.value ? (P(), E(r, {
|
|
625
625
|
key: Rt.value,
|
|
626
626
|
class: "shrink-0",
|
|
627
627
|
name: Rt.value
|
|
628
|
-
}, null, 8, ["name"])) :
|
|
628
|
+
}, null, 8, ["name"])) : D("", !0)]),
|
|
629
629
|
_: 1
|
|
630
630
|
}),
|
|
631
|
-
|
|
632
|
-
default:
|
|
631
|
+
A(w, { mode: "out-in" }, {
|
|
632
|
+
default: z(() => [Lt.value ? (P(), O("span", {
|
|
633
633
|
key: Lt.value,
|
|
634
634
|
class: "text-12"
|
|
635
|
-
},
|
|
635
|
+
}, I(Lt.value), 1)) : D("", !0)]),
|
|
636
636
|
_: 1
|
|
637
637
|
})
|
|
638
|
-
]),
|
|
638
|
+
]), A(w, {
|
|
639
639
|
name: "fade-in",
|
|
640
640
|
mode: "out-in"
|
|
641
641
|
}, {
|
|
642
|
-
default:
|
|
642
|
+
default: z(() => [!Wt(v) && Y.value && "text" in Y.value && Y.value.text.trim() ? (P(), E(ge, {
|
|
643
643
|
key: 0,
|
|
644
644
|
markdown: Y.value.text,
|
|
645
645
|
"is-dark": e.isDark,
|
|
646
|
-
"tail-length":
|
|
646
|
+
"tail-length": L(oe),
|
|
647
647
|
"inner-class": "wysiwyg",
|
|
648
648
|
class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
|
|
649
649
|
}, null, 8, [
|
|
650
650
|
"markdown",
|
|
651
651
|
"is-dark",
|
|
652
652
|
"tail-length"
|
|
653
|
-
])) :
|
|
653
|
+
])) : D("", !0)]),
|
|
654
654
|
_: 2
|
|
655
|
-
}, 1024)])) :
|
|
655
|
+
}, 1024)])) : D("", !0)]),
|
|
656
656
|
_: 2
|
|
657
657
|
}, 1024),
|
|
658
|
-
|
|
659
|
-
default:
|
|
660
|
-
|
|
658
|
+
A(w, { mode: "out-in" }, {
|
|
659
|
+
default: z(() => [Qt(v, y) ? (P(), O("div", dt, [
|
|
660
|
+
A(g, {
|
|
661
661
|
modifiers: "compact",
|
|
662
662
|
class: "mr-auto shrink-0"
|
|
663
663
|
}, {
|
|
664
|
-
default:
|
|
665
|
-
|
|
666
|
-
default:
|
|
664
|
+
default: z(() => [
|
|
665
|
+
A(w, { mode: "out-in" }, {
|
|
666
|
+
default: z(() => [Bt(y) ? (P(), E(p, {
|
|
667
667
|
key: 0,
|
|
668
668
|
icon: "ri:reset-right-line",
|
|
669
669
|
modifiers: "action-quiet-small",
|
|
670
|
-
title:
|
|
671
|
-
"aria-label":
|
|
672
|
-
onClick: n[0] ||=
|
|
673
|
-
}, null, 8, ["title", "aria-label"])) :
|
|
670
|
+
title: L(i)("action.regenerate"),
|
|
671
|
+
"aria-label": L(i)("action.regenerate"),
|
|
672
|
+
onClick: n[0] ||= B((e) => t.$emit("regenerate"), ["stop"])
|
|
673
|
+
}, null, 8, ["title", "aria-label"])) : D("", !0)]),
|
|
674
674
|
_: 2
|
|
675
675
|
}, 1024),
|
|
676
|
-
|
|
677
|
-
default:
|
|
676
|
+
A(w, { mode: "out-in" }, {
|
|
677
|
+
default: z(() => [Vt("show-info", y) ? (P(), E(p, {
|
|
678
678
|
key: 0,
|
|
679
679
|
icon: "ri:information-line",
|
|
680
|
-
title:
|
|
681
|
-
"aria-label":
|
|
680
|
+
title: L(i)("action.getMoreInfo"),
|
|
681
|
+
"aria-label": L(i)("action.getMoreInfo"),
|
|
682
682
|
modifiers: "action-quiet-small",
|
|
683
|
-
onClick:
|
|
683
|
+
onClick: B((e) => t.$emit("show-info", v), ["stop"])
|
|
684
684
|
}, null, 8, [
|
|
685
685
|
"title",
|
|
686
686
|
"aria-label",
|
|
687
687
|
"onClick"
|
|
688
|
-
])) :
|
|
688
|
+
])) : D("", !0)]),
|
|
689
689
|
_: 2
|
|
690
690
|
}, 1024),
|
|
691
|
-
|
|
692
|
-
default:
|
|
691
|
+
A(w, { mode: "out-in" }, {
|
|
692
|
+
default: z(() => [Vt("revise", y) ? (P(), E(p, {
|
|
693
693
|
key: 0,
|
|
694
694
|
icon: G(v.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
|
|
695
|
-
title: G(v.id) ?
|
|
696
|
-
"aria-label": G(v.id) ?
|
|
695
|
+
title: G(v.id) ? L(i)("action.editRevise") : L(i)("action.createRevise"),
|
|
696
|
+
"aria-label": G(v.id) ? L(i)("action.editRevise") : L(i)("action.createRevise"),
|
|
697
697
|
modifiers: "action-quiet-small",
|
|
698
|
-
class:
|
|
699
|
-
onClick:
|
|
698
|
+
class: N({ "text-brand-graphic": G(v.id) }),
|
|
699
|
+
onClick: B((e) => t.$emit("revise", v), ["stop"])
|
|
700
700
|
}, null, 8, [
|
|
701
701
|
"icon",
|
|
702
702
|
"title",
|
|
703
703
|
"aria-label",
|
|
704
704
|
"class",
|
|
705
705
|
"onClick"
|
|
706
|
-
])) :
|
|
706
|
+
])) : D("", !0)]),
|
|
707
707
|
_: 2
|
|
708
708
|
}, 1024),
|
|
709
|
-
|
|
710
|
-
default:
|
|
709
|
+
A(w, { mode: "out-in" }, {
|
|
710
|
+
default: z(() => [Ke("upvote", y) ? (P(), E(p, {
|
|
711
711
|
key: 0,
|
|
712
712
|
icon: K(v.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
|
|
713
|
-
title:
|
|
714
|
-
"aria-label":
|
|
713
|
+
title: L(i)("action.upvote"),
|
|
714
|
+
"aria-label": L(i)("action.upvote"),
|
|
715
715
|
modifiers: "action-quiet-small",
|
|
716
|
-
onClick:
|
|
716
|
+
onClick: B((e) => t.$emit("upvote", v), ["stop"])
|
|
717
717
|
}, null, 8, [
|
|
718
718
|
"icon",
|
|
719
719
|
"title",
|
|
720
720
|
"aria-label",
|
|
721
721
|
"onClick"
|
|
722
|
-
])) :
|
|
722
|
+
])) : D("", !0)]),
|
|
723
723
|
_: 2
|
|
724
724
|
}, 1024),
|
|
725
|
-
|
|
726
|
-
default:
|
|
725
|
+
A(w, { mode: "out-in" }, {
|
|
726
|
+
default: z(() => [Ke("downvote", y) ? (P(), E(p, {
|
|
727
727
|
key: 0,
|
|
728
728
|
icon: K(v.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
|
|
729
|
-
title:
|
|
730
|
-
"aria-label":
|
|
729
|
+
title: L(i)("action.downvote"),
|
|
730
|
+
"aria-label": L(i)("action.downvote"),
|
|
731
731
|
modifiers: "action-quiet-small",
|
|
732
|
-
onClick:
|
|
732
|
+
onClick: B((e) => t.$emit("downvote", v), ["stop"])
|
|
733
733
|
}, null, 8, [
|
|
734
734
|
"icon",
|
|
735
735
|
"title",
|
|
736
736
|
"aria-label",
|
|
737
737
|
"onClick"
|
|
738
|
-
])) :
|
|
738
|
+
])) : D("", !0)]),
|
|
739
739
|
_: 2
|
|
740
740
|
}, 1024),
|
|
741
|
-
|
|
742
|
-
default:
|
|
741
|
+
A(w, { mode: "out-in" }, {
|
|
742
|
+
default: z(() => [Ke("feedback", y) ? (P(), E(p, {
|
|
743
743
|
key: 0,
|
|
744
744
|
icon: K(v.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
|
|
745
|
-
title:
|
|
746
|
-
"aria-label":
|
|
745
|
+
title: L(i)("action.feedback"),
|
|
746
|
+
"aria-label": L(i)("action.feedback"),
|
|
747
747
|
modifiers: "action-quiet-small",
|
|
748
|
-
onClick:
|
|
748
|
+
onClick: B((e) => t.$emit("feedback", v), ["stop"])
|
|
749
749
|
}, null, 8, [
|
|
750
750
|
"icon",
|
|
751
751
|
"title",
|
|
752
752
|
"aria-label",
|
|
753
753
|
"onClick"
|
|
754
|
-
])) :
|
|
754
|
+
])) : D("", !0)]),
|
|
755
755
|
_: 2
|
|
756
756
|
}, 1024)
|
|
757
757
|
]),
|
|
758
758
|
_: 2
|
|
759
759
|
}, 1024),
|
|
760
|
-
!e.showMessageDateTime && v.metadata?.createdAt && v.metadata?.completedAt ? (
|
|
760
|
+
!e.showMessageDateTime && v.metadata?.createdAt && v.metadata?.completedAt ? (P(), O("div", ft, [k("time", {
|
|
761
761
|
datetime: new Date(v.metadata.createdAt).toISOString(),
|
|
762
|
-
title:
|
|
762
|
+
title: L(o)(new Date(v.metadata.createdAt), "date-time"),
|
|
763
763
|
class: "flex items-center gap-4 min-w-0"
|
|
764
|
-
}, [
|
|
764
|
+
}, [A(r, {
|
|
765
765
|
name: "ri:time-line",
|
|
766
766
|
class: "shrink-0"
|
|
767
|
-
}),
|
|
767
|
+
}), k("span", mt, I($t(v.metadata.createdAt)), 1)], 8, pt), en(v) ? (P(), O("span", ht, [A(r, {
|
|
768
768
|
name: "ri:hourglass-line",
|
|
769
769
|
class: "shrink-0"
|
|
770
|
-
}),
|
|
771
|
-
e.showMessageNumber ? (
|
|
770
|
+
}), k("span", gt, I(en(v)), 1)])) : D("", !0)])) : D("", !0),
|
|
771
|
+
e.showMessageNumber ? (P(), O("span", {
|
|
772
772
|
key: 1,
|
|
773
|
-
title:
|
|
773
|
+
title: L(i)("label.messageNumber", { n: Zt.value[y] }),
|
|
774
774
|
class: "text-12 text-word-3 tabular-nums"
|
|
775
|
-
}, " #" +
|
|
776
|
-
e.showMessageTokensCount && v.metadata?.totalTokens ? (
|
|
775
|
+
}, " #" + I(Zt.value[y]), 9, _t)) : D("", !0),
|
|
776
|
+
e.showMessageTokensCount && v.metadata?.totalTokens ? (P(), O("span", vt, [A(r, {
|
|
777
777
|
name: "ri:ai-generate-2-line",
|
|
778
778
|
class: "shrink-0"
|
|
779
|
-
}),
|
|
780
|
-
e.showMessageDateTime && v.metadata?.createdAt ? (
|
|
779
|
+
}), k("span", yt, I(L(s)(v.metadata.totalTokens, "integer")) + " " + I(L(i)("label.tokens")), 1)])) : D("", !0),
|
|
780
|
+
e.showMessageDateTime && v.metadata?.createdAt ? (P(), O("time", {
|
|
781
781
|
key: 3,
|
|
782
782
|
datetime: new Date(v.metadata?.createdAt).toISOString(),
|
|
783
783
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
784
|
-
}, [
|
|
784
|
+
}, [A(r, {
|
|
785
785
|
name: "ri:time-line",
|
|
786
786
|
class: "shrink-0"
|
|
787
|
-
}),
|
|
788
|
-
e.showMessageDateTime && v?.metadata?.completedAt && v?.metadata?.createdAt ? (
|
|
787
|
+
}), k("span", xt, I(L(o)(new Date(v.metadata?.createdAt), "date-time")), 1)], 8, bt)) : D("", !0),
|
|
788
|
+
e.showMessageDateTime && v?.metadata?.completedAt && v?.metadata?.createdAt ? (P(), O("div", St, [A(r, {
|
|
789
789
|
name: "ri:hourglass-line",
|
|
790
790
|
class: "shrink-0"
|
|
791
|
-
}),
|
|
791
|
+
}), A(te, {
|
|
792
792
|
class: "truncate",
|
|
793
793
|
date: v.metadata?.createdAt,
|
|
794
794
|
"end-date": v.metadata?.completedAt
|
|
795
|
-
}, null, 8, ["date", "end-date"])])) :
|
|
796
|
-
])) :
|
|
795
|
+
}, null, 8, ["date", "end-date"])])) : D("", !0)
|
|
796
|
+
])) : D("", !0)]),
|
|
797
797
|
_: 2
|
|
798
798
|
}, 1024),
|
|
799
|
-
|
|
800
|
-
default:
|
|
799
|
+
A(w, { mode: "out-in" }, {
|
|
800
|
+
default: z(() => [v.id === e.feedbackMessageId ? (P(), E(me, {
|
|
801
801
|
key: 0,
|
|
802
802
|
ref_for: !0,
|
|
803
803
|
ref_key: "feedbackMessageEl",
|
|
@@ -811,52 +811,52 @@ var Ze = ["aria-busy"], Qe = {
|
|
|
811
811
|
"loading",
|
|
812
812
|
"submitted",
|
|
813
813
|
"error"
|
|
814
|
-
])) :
|
|
814
|
+
])) : D("", !0)]),
|
|
815
815
|
_: 2
|
|
816
816
|
}, 1024)
|
|
817
|
-
], 6)) :
|
|
817
|
+
], 6)) : D("", !0)
|
|
818
818
|
], 64))), 128)),
|
|
819
|
-
|
|
819
|
+
A(w, {
|
|
820
820
|
appear: "",
|
|
821
821
|
name: "pk-chatbot-part"
|
|
822
822
|
}, {
|
|
823
|
-
default:
|
|
823
|
+
default: z(() => [Ft.value ? (P(), O("div", {
|
|
824
824
|
key: 0,
|
|
825
825
|
class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
|
|
826
|
-
style:
|
|
827
|
-
}, [
|
|
826
|
+
style: Te({ minHeight: It.value ? `${U.value}px` : void 0 })
|
|
827
|
+
}, [k("div", Ct, [k("div", wt, [A(r, {
|
|
828
828
|
name: "loading-loop",
|
|
829
829
|
class: "shrink-0"
|
|
830
|
-
}),
|
|
830
|
+
}), k("span", Tt, I(L(i)("label.answeringOnTheCall")), 1)])])], 4)) : D("", !0)]),
|
|
831
831
|
_: 1
|
|
832
832
|
}),
|
|
833
|
-
|
|
833
|
+
A(w, {
|
|
834
834
|
appear: "",
|
|
835
835
|
name: "pk-chatbot-part"
|
|
836
836
|
}, {
|
|
837
|
-
default:
|
|
837
|
+
default: z(() => [Pt.value ? (P(), E(v, {
|
|
838
838
|
key: 0,
|
|
839
839
|
error: e.error,
|
|
840
840
|
onRetry: n[3] ||= (e) => t.$emit("auto-retry"),
|
|
841
841
|
onReset: n[4] ||= (e) => t.$emit("reset-chat")
|
|
842
|
-
}, null, 8, ["error"])) :
|
|
842
|
+
}, null, 8, ["error"])) : D("", !0)]),
|
|
843
843
|
_: 1
|
|
844
844
|
}),
|
|
845
|
-
jt.value?.role === "user" && !It.value || Pt.value ? (
|
|
845
|
+
jt.value?.role === "user" && !It.value || Pt.value ? (P(), O("div", {
|
|
846
846
|
key: 0,
|
|
847
847
|
class: "pk-chatbot-messages__spacer",
|
|
848
|
-
style:
|
|
849
|
-
}, null, 4)) :
|
|
848
|
+
style: Te({ minHeight: `${U.value}px` })
|
|
849
|
+
}, null, 4)) : D("", !0)
|
|
850
850
|
], 512),
|
|
851
|
-
|
|
852
|
-
default:
|
|
851
|
+
A(w, { name: "pk-chatbot-messages-fab" }, {
|
|
852
|
+
default: z(() => [e.showScrollToBottom && (L(Fe) || !L(Ie)) ? (P(), O("button", {
|
|
853
853
|
key: 0,
|
|
854
854
|
type: "button",
|
|
855
855
|
class: "pk-chatbot-messages__scroll-to-bottom",
|
|
856
|
-
title:
|
|
857
|
-
"aria-label":
|
|
858
|
-
onClick:
|
|
859
|
-
}, [
|
|
856
|
+
title: L(i)("action.scrollToBottom"),
|
|
857
|
+
"aria-label": L(i)("action.scrollToBottom"),
|
|
858
|
+
onClick: Le
|
|
859
|
+
}, [A(r, { name: "ri:arrow-down-line" })], 8, Et)) : D("", !0)]),
|
|
860
860
|
_: 1
|
|
861
861
|
})
|
|
862
862
|
], 46, Ze);
|
|
@@ -864,6 +864,6 @@ var Ze = ["aria-busy"], Qe = {
|
|
|
864
864
|
}
|
|
865
865
|
});
|
|
866
866
|
//#endregion
|
|
867
|
-
export {
|
|
867
|
+
export { U as a, Ue as i, W as n, He as r, J as t };
|
|
868
868
|
|
|
869
|
-
//# sourceMappingURL=PkChatbotMessages-
|
|
869
|
+
//# sourceMappingURL=PkChatbotMessages-Zhuxom46.js.map
|