@8wave/ai-elements 0.117.0-beta.12 → 0.117.0-beta.22
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/{Agent-BxyaZeuL.js → Agent-CFkAjuTy.js} +204 -168
- package/dist/_chunks/Agent-CFkAjuTy.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-B8mvCNou.js → PkStreamingMarkdown-BoVR7gtl.js} +670 -644
- package/dist/_chunks/PkStreamingMarkdown-BoVR7gtl.js.map +1 -0
- package/dist/_chunks/{PkToolEditSpreadsheet-Bp-ES8B0.js → PkToolEditSpreadsheet-BlfsM7Qp.js} +2 -2
- package/dist/_chunks/{PkToolEditSpreadsheet-Bp-ES8B0.js.map → PkToolEditSpreadsheet-BlfsM7Qp.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-DcPMMyJH.js → PkToolRequestGeolocation-DdQ91rpB.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-DcPMMyJH.js.map → PkToolRequestGeolocation-DdQ91rpB.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-Cc2qViGX.js → PkToolRequestOAuthConnection-yuTNMEFj.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-Cc2qViGX.js.map → PkToolRequestOAuthConnection-yuTNMEFj.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-CcwAlOFM.js → PkToolShowArtifact-DaTlDsDo.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-CcwAlOFM.js.map → PkToolShowArtifact-DaTlDsDo.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-DByjGK_F.js → PkToolShowContactForm-Dxh6bEZt.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-DByjGK_F.js.map → PkToolShowContactForm-Dxh6bEZt.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-CGrjJ-9k.js → PkToolShowForm-D1VzwMmq.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-CGrjJ-9k.js.map → PkToolShowForm-D1VzwMmq.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-C3ZaW1jQ.js → PkToolShowImageGallery-Cs8FxK9V.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-C3ZaW1jQ.js.map → PkToolShowImageGallery-Cs8FxK9V.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-BAHoB6mi.js → PkToolShowProductList-B4fxqFaf.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-BAHoB6mi.js.map → PkToolShowProductList-B4fxqFaf.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-BgnumOzQ.js → PkToolShowSources-DNiiBz9b.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-BgnumOzQ.js.map → PkToolShowSources-DNiiBz9b.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-CpixDpsJ.js → PkToolShowSuggestedReply-Bn1w6HdI.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-CpixDpsJ.js.map → PkToolShowSuggestedReply-Bn1w6HdI.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-94-l_bBW.js → PkToolShowVideo-Be5bKhUf.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-94-l_bBW.js.map → PkToolShowVideo-Be5bKhUf.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-q1gLOgDl.js → PkToolShowWebPages-Bs251x0h.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-q1gLOgDl.js.map → PkToolShowWebPages-Bs251x0h.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-D4kQJejM.js → chatImagePolicy-BACuW8x3.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-D4kQJejM.js.map → chatImagePolicy-BACuW8x3.js.map} +1 -1
- package/dist/_chunks/{markdown-DCYDJNwF.js → markdown-Bk1clNA6.js} +13 -13
- package/dist/_chunks/{markdown-DCYDJNwF.js.map → markdown-Bk1clNA6.js.map} +1 -1
- package/dist/ai-elements.es.js +1992 -1880
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAudioTranscript.d.ts +2 -0
- package/dist-vue/PkChatbotAudioTranscript.js +1 -0
- package/dist-vue/PkChatbotAuth.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/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-CSXbmC44.js → Agent-CNJ3b9Je.js} +2 -2
- package/dist-vue/_chunks/{Agent-CSXbmC44.js.map → Agent-CNJ3b9Je.js.map} +1 -1
- package/dist-vue/_chunks/{Document-Ol8nGgij.js → Document-Bp3YJuQQ.js} +11 -11
- package/dist-vue/_chunks/{Document-Ol8nGgij.js.map → Document-Bp3YJuQQ.js.map} +1 -1
- package/dist-vue/_chunks/{Media-Cv7ou2tP.js → Media-C6Xsb1Lm.js} +77 -27
- package/dist-vue/_chunks/Media-C6Xsb1Lm.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-BmpFnkde.js → PkChatbot-BEnC7_hV.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-BmpFnkde.js.map → PkChatbot-BEnC7_hV.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotAudioTranscript-BUxBHanA.js +80 -0
- package/dist-vue/_chunks/PkChatbotAudioTranscript-BUxBHanA.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotAuth-Dolfz0pa.js → PkChatbotAuth-C0qfDOGh.js} +8 -8
- package/dist-vue/_chunks/{PkChatbotAuth-Dolfz0pa.js.map → PkChatbotAuth-C0qfDOGh.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-BaiGfaAD.js → PkChatbotEmptyState-DjmF3dcI.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-BaiGfaAD.js.map → PkChatbotEmptyState-DjmF3dcI.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-BjfW_bML.js → PkChatbotInput-B8hKYdD9.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-BjfW_bML.js.map → PkChatbotInput-B8hKYdD9.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotMessages-DnoohZxu.js +861 -0
- package/dist-vue/_chunks/PkChatbotMessages-DnoohZxu.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-CGAdiGR5.js → PkChatbotStepPayload-BGYwwXaT.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-CGAdiGR5.js.map → PkChatbotStepPayload-BGYwwXaT.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DQsmXnKT.js → PkChatbotStepToolDetail-BH07XycE.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DQsmXnKT.js.map → PkChatbotStepToolDetail-BH07XycE.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-DzajeHKc.js → PkChatbotSteps-qyUOh42z.js} +6 -6
- package/dist-vue/_chunks/{PkChatbotSteps-DzajeHKc.js.map → PkChatbotSteps-qyUOh42z.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-DZbQQNQn.js → PkChatbotViewChat-BM51ovrp.js} +7 -7
- package/dist-vue/_chunks/{PkChatbotViewChat-DZbQQNQn.js.map → PkChatbotViewChat-BM51ovrp.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-BXtTZ3kb.js → PkChatbotViewConversations-ClJLe1bm.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewConversations-BXtTZ3kb.js.map → PkChatbotViewConversations-ClJLe1bm.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles--wM5SVAl.js → PkChatbotViewFiles-Do6tpo9O.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles--wM5SVAl.js.map → PkChatbotViewFiles-Do6tpo9O.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-B8T0AQC8.js → PkChatbotViewProfile-590b78yi.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-B8T0AQC8.js.map → PkChatbotViewProfile-590b78yi.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-D6y6g6vP.js → PkStreamingMarkdown-NWO3WTw9.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-D6y6g6vP.js.map → PkStreamingMarkdown-NWO3WTw9.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-BkjEQag2.js → PkToolEditSpreadsheet-BnMSzlCi.js} +2 -2
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-BkjEQag2.js.map → PkToolEditSpreadsheet-BnMSzlCi.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-BWWUGKHJ.js → PkToolRequestGeolocation-B2UNj6dx.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-BWWUGKHJ.js.map → PkToolRequestGeolocation-B2UNj6dx.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DvvLZ8yi.js → PkToolRequestOAuthConnection-B262JqNh.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DvvLZ8yi.js.map → PkToolRequestOAuthConnection-B262JqNh.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-CP-dG3-Y.js → PkToolShowArtifact-Dr0NHXDG.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CP-dG3-Y.js.map → PkToolShowArtifact-Dr0NHXDG.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BK7B-Qzr.js → PkToolShowContactForm-BDm1w3UK.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-BK7B-Qzr.js.map → PkToolShowContactForm-BDm1w3UK.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-9THUQfbg.js → PkToolShowDiagram-DzE-X06t.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-9THUQfbg.js.map → PkToolShowDiagram-DzE-X06t.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-CjN-_-1j.js → PkToolShowForm-cKgWwvPD.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-CjN-_-1j.js.map → PkToolShowForm-cKgWwvPD.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-8cmWigYT.js → PkToolShowImageGallery-DsAQhyOq.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-8cmWigYT.js.map → PkToolShowImageGallery-DsAQhyOq.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-BxsK6LXl.js → PkToolShowProductList-OwGaM5qj.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-BxsK6LXl.js.map → PkToolShowProductList-OwGaM5qj.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-BfWNsyLw.js → PkToolShowSources-BVOqH-ZV.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-BfWNsyLw.js.map → PkToolShowSources-BVOqH-ZV.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-_bH3Jikn.js → PkToolShowSuggestedReply-CF31zmck.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-_bH3Jikn.js.map → PkToolShowSuggestedReply-CF31zmck.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-2_EdyT_U.js → PkToolShowVideo-BAqSAfdq.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-2_EdyT_U.js.map → PkToolShowVideo-BAqSAfdq.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-B0glenu5.js → PkToolShowWebPages-BeMJqIkW.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-B0glenu5.js.map → PkToolShowWebPages-BeMJqIkW.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-DgtSqixO.js → createChatbotApiClient-DmqgH9Ul.js} +3 -3
- package/dist-vue/_chunks/{createChatbotApiClient-DgtSqixO.js.map → createChatbotApiClient-DmqgH9Ul.js.map} +1 -1
- package/dist-vue/_chunks/message-BOiF6Bt5.js +59 -0
- package/dist-vue/_chunks/message-BOiF6Bt5.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-A33jT5Cp.js → useChatbotStore-CiF_gfIk.js} +656 -653
- package/dist-vue/_chunks/useChatbotStore-CiF_gfIk.js.map +1 -0
- package/dist-vue/_chunks/{utils-ByN6GORv.js → utils-DxuGvgWg.js} +37 -37
- package/dist-vue/_chunks/{utils-ByN6GORv.js.map → utils-DxuGvgWg.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +15 -5
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +4754 -4749
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +52 -40
- package/dist-vue/packages/components/src/chat/PkChatbotAudioTranscript.d.ts +13 -0
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +2 -2
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +1 -1
- package/dist-vue/packages/models/src/schema/Agent.d.ts +4 -4
- package/dist-vue/packages/models/src/schema/Media.d.ts +21 -0
- package/dist-vue/packages/models/src/schema/Tabular.d.ts +1 -1
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-BxyaZeuL.js.map +0 -1
- package/dist/_chunks/PkStreamingMarkdown-B8mvCNou.js.map +0 -1
- package/dist-vue/_chunks/Media-Cv7ou2tP.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-CztL_AMB.js +0 -837
- package/dist-vue/_chunks/PkChatbotMessages-CztL_AMB.js.map +0 -1
- package/dist-vue/_chunks/message-RohfrdWS.js +0 -33
- package/dist-vue/_chunks/message-RohfrdWS.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-A33jT5Cp.js.map +0 -1
|
@@ -1,837 +0,0 @@
|
|
|
1
|
-
import { T as e, k as t, n, v as r, x as i } from "./schemas-COXYARAA.js";
|
|
2
|
-
import { k as a } from "./Agent-CSXbmC44.js";
|
|
3
|
-
import { t as o } from "./PkStreamingMarkdown-D6y6g6vP.js";
|
|
4
|
-
import "./src-DCfvejyT.js";
|
|
5
|
-
import { a as s, c, o as l, r as u, s as d, t as f } from "./message-RohfrdWS.js";
|
|
6
|
-
import { t as p } from "./PkChatbotError-CRGbK09-.js";
|
|
7
|
-
import { t as m } from "./PkRelativeTime--1cIphlA.js";
|
|
8
|
-
import { C as h, S as g, a as ee, b as _, d as v, f as te, i as ne, l as re, m as ie, n as ae, p as oe, t as y, v as b, w as x, x as se } from "./utils-ByN6GORv.js";
|
|
9
|
-
import { t as ce } from "./PkChatbotFilePreview-DIP8KLkS.js";
|
|
10
|
-
import { t as le } from "./PkChatbotFeedbackForm-DrPKjh-0.js";
|
|
11
|
-
import { t as ue } from "./PkChatbotMessageFeedback-BYmrVaCE.js";
|
|
12
|
-
import { n as de, t as fe } from "./PkChatbotSteps-DzajeHKc.js";
|
|
13
|
-
import { t as pe } from "./PkChatbotOutlineRail-np4g6vsz.js";
|
|
14
|
-
import { VvButton as me, VvButtonGroup as he, VvIcon as ge } from "@volverjs/ui-vue/components";
|
|
15
|
-
import { Fragment as S, Transition as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createTextVNode as k, createVNode as A, defineAsyncComponent as j, defineComponent as M, mergeProps as _e, nextTick as N, normalizeClass as P, normalizeStyle as ve, onBeforeUnmount as F, onMounted as ye, openBlock as I, ref as L, renderList as be, renderSlot as xe, resolveDynamicComponent as Se, toDisplayString as R, unref as z, useSlots as Ce, useTemplateRef as we, watch as B, withCtx as V, withModifiers as H } from "vue";
|
|
16
|
-
import { useI18n as Te } from "vue-i18n";
|
|
17
|
-
//#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/iso.js
|
|
18
|
-
function U(e) {
|
|
19
|
-
return t(n, e);
|
|
20
|
-
}
|
|
21
|
-
r({
|
|
22
|
-
platform: i(),
|
|
23
|
-
threadId: i()
|
|
24
|
-
});
|
|
25
|
-
var Ee = r({
|
|
26
|
-
wakeId: e(),
|
|
27
|
-
dueAt: U(),
|
|
28
|
-
reason: i()
|
|
29
|
-
});
|
|
30
|
-
r({ pendingWakeup: Ee.nullable() }), r({ wakeId: e() });
|
|
31
|
-
var W = (e) => e?.role === "user" && !!e.metadata?.wakeup, De = /* @__PURE__ */ new Set([
|
|
32
|
-
"input-streaming",
|
|
33
|
-
"input-available",
|
|
34
|
-
"approval-requested"
|
|
35
|
-
]), Oe = (e) => {
|
|
36
|
-
if (e?.role !== "assistant") return !1;
|
|
37
|
-
let t = !1;
|
|
38
|
-
for (let n of e.parts) {
|
|
39
|
-
if (n.type === "text" && n.text.trim() || n.type === "file") return !1;
|
|
40
|
-
let e = n.state;
|
|
41
|
-
if (e && De.has(e)) return !1;
|
|
42
|
-
n.type === "tool-scheduleWakeup" && (t = e === "output-available" && n.input?.noop === !0);
|
|
43
|
-
}
|
|
44
|
-
return t;
|
|
45
|
-
}, G = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), ke = (e) => e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[-_]+/g, " ") : "", Ae = (e) => e ? G(e).replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase() : "", je = (e) => e ? G(e).replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").toLowerCase() : "", K = (e) => e ? e.charAt(0).toUpperCase() + e.slice(1) : "", Me = {
|
|
46
|
-
requestOAuthConnection: j(() => import("./PkToolRequestOAuthConnection-DvvLZ8yi.js")),
|
|
47
|
-
showArtifact: j(() => import("./PkToolShowArtifact-CP-dG3-Y.js").then((e) => e.n)),
|
|
48
|
-
showCalendarEvent: j(() => import("./PkToolShowCalendarEvent-Dv_rss26.js").then((e) => e.n)),
|
|
49
|
-
showComparison: j(() => import("./PkToolShowComparison-DQs3E6-k.js").then((e) => e.n)),
|
|
50
|
-
showContactForm: j(() => import("./PkToolShowContactForm-BK7B-Qzr.js").then((e) => e.n)),
|
|
51
|
-
showDiagram: j(() => import("./PkToolShowDiagram-9THUQfbg.js")),
|
|
52
|
-
showEmail: j(() => import("./PkToolShowEmail-C591LR5N.js").then((e) => e.n)),
|
|
53
|
-
showImageGallery: j(() => import("./PkToolShowImageGallery-8cmWigYT.js").then((e) => e.n)),
|
|
54
|
-
showLocation: j(() => import("./PkToolShowLocation-Dyz6h_0n.js").then((e) => e.n)),
|
|
55
|
-
showMessage: j(() => import("./PkToolShowMessage-CbXERPHI.js").then((e) => e.n)),
|
|
56
|
-
showForm: j(() => import("./PkToolShowForm-CjN-_-1j.js").then((e) => e.n)),
|
|
57
|
-
showMultipleChoice: j(() => import("./PkToolShowForm-CjN-_-1j.js").then((e) => e.n)),
|
|
58
|
-
showProductList: j(() => import("./PkToolShowProductList-BxsK6LXl.js").then((e) => e.n)),
|
|
59
|
-
showQrCode: j(() => import("./PkToolShowQrCode-DEAvfLFu.js").then((e) => e.n)),
|
|
60
|
-
showSources: j(() => import("./PkToolShowSources-BfWNsyLw.js").then((e) => e.n)),
|
|
61
|
-
showSuggestedReply: j(() => import("./PkToolShowSuggestedReply-_bH3Jikn.js").then((e) => e.n)),
|
|
62
|
-
showVideo: j(() => import("./PkToolShowVideo-2_EdyT_U.js")),
|
|
63
|
-
showWeather: j(() => import("./PkToolShowWeather-BH-FtLpk.js")),
|
|
64
|
-
showWebPages: j(() => import("./PkToolShowWebPages-B0glenu5.js").then((e) => e.n))
|
|
65
|
-
}, Ne = {
|
|
66
|
-
key: 0,
|
|
67
|
-
class: "text-12 text-word-3 m-0 mb-xs"
|
|
68
|
-
}, Pe = /* @__PURE__ */ M({
|
|
69
|
-
__name: "PkToolApprovalPreviewMessage",
|
|
70
|
-
props: { input: {} },
|
|
71
|
-
setup(e) {
|
|
72
|
-
let t = e, n = w(() => {
|
|
73
|
-
let e = t.input;
|
|
74
|
-
return typeof e?.message == "string" ? e.message : "";
|
|
75
|
-
});
|
|
76
|
-
return (e, t) => n.value ? (I(), D("p", Ne, R(n.value), 1)) : E("", !0);
|
|
77
|
-
}
|
|
78
|
-
}), Fe = { [y]: Pe }, Ie = {
|
|
79
|
-
key: 0,
|
|
80
|
-
class: "text-12 text-word-3 m-0 mb-xs"
|
|
81
|
-
}, Le = /* @__PURE__ */ M({
|
|
82
|
-
__name: "PkToolApprovalCard",
|
|
83
|
-
props: {
|
|
84
|
-
part: {},
|
|
85
|
-
actionable: { type: Boolean },
|
|
86
|
-
callVerdict: { type: Boolean }
|
|
87
|
-
},
|
|
88
|
-
emits: ["respond"],
|
|
89
|
-
setup(e, { emit: t }) {
|
|
90
|
-
let n = e, r = t, { t: i } = Te({ useScope: "global" }), o = w(() => n.part), s = w(() => u(n.part)), c = w(() => s.value === y), l = w(() => c.value ? (o.value.state === "input-available" || a(o.value.output)) && n.callVerdict === void 0 : o.value.state === "approval-requested"), d = w(() => l.value && n.actionable === !0), f = w(() => l.value && n.actionable !== !0), p = w(() => c.value ? o.value.output === "confirmed" || n.callVerdict === !0 : o.value.approval?.approved === !0), m = w(() => c.value ? o.value.output === "cancelled" || n.callVerdict === !1 : o.value.approval?.approved === !1 || o.value.state === "output-denied"), h = w(() => Fe[s.value]), g = w(() => {
|
|
91
|
-
if (f.value) return {
|
|
92
|
-
icon: "ri:time-line",
|
|
93
|
-
message: i("toolApproval.expired")
|
|
94
|
-
};
|
|
95
|
-
if (p.value) return {
|
|
96
|
-
icon: "ri:check-line",
|
|
97
|
-
message: i(c.value ? "toolApproval.confirmed" : "toolApproval.approved")
|
|
98
|
-
};
|
|
99
|
-
if (m.value) return {
|
|
100
|
-
icon: "ri:close-line",
|
|
101
|
-
message: i(c.value ? "toolApproval.cancelled" : "toolApproval.denied")
|
|
102
|
-
};
|
|
103
|
-
}), ee = w(() => !!g.value && !h.value);
|
|
104
|
-
return (t, n) => {
|
|
105
|
-
let a = me, s = he, u = ge;
|
|
106
|
-
return I(), D("div", { class: P(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !ee.value }]) }, [
|
|
107
|
-
A(C, null, {
|
|
108
|
-
default: V(() => [!c.value && l.value ? (I(), D("p", Ie, R(z(i)("toolApproval.prompt")), 1)) : E("", !0)]),
|
|
109
|
-
_: 1
|
|
110
|
-
}),
|
|
111
|
-
h.value ? (I(), T(Se(h.value), {
|
|
112
|
-
key: 0,
|
|
113
|
-
part: e.part,
|
|
114
|
-
input: o.value.input
|
|
115
|
-
}, null, 8, ["part", "input"])) : E("", !0),
|
|
116
|
-
A(C, { mode: "out-in" }, {
|
|
117
|
-
default: V(() => [g.value ? (I(), D("p", {
|
|
118
|
-
key: 1,
|
|
119
|
-
class: P(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": h.value }])
|
|
120
|
-
}, [A(u, {
|
|
121
|
-
name: g.value.icon,
|
|
122
|
-
class: "shrink-0"
|
|
123
|
-
}, null, 8, ["name"]), k(" " + R(g.value.message), 1)], 2)) : (I(), T(s, { key: 0 }, {
|
|
124
|
-
default: V(() => [A(a, {
|
|
125
|
-
modifiers: "primary-small",
|
|
126
|
-
disabled: !d.value,
|
|
127
|
-
icon: "ri:check-line",
|
|
128
|
-
label: z(i)("action.proceed"),
|
|
129
|
-
onClick: n[0] ||= H((e) => r("respond", !0), ["stop"])
|
|
130
|
-
}, null, 8, ["disabled", "label"]), A(a, {
|
|
131
|
-
modifiers: "action-quiet-small",
|
|
132
|
-
disabled: !d.value,
|
|
133
|
-
icon: "ri:close-line",
|
|
134
|
-
label: z(i)("action.cancel"),
|
|
135
|
-
onClick: n[1] ||= H((e) => r("respond", !1), ["stop"])
|
|
136
|
-
}, null, 8, ["disabled", "label"])]),
|
|
137
|
-
_: 1
|
|
138
|
-
}))]),
|
|
139
|
-
_: 1
|
|
140
|
-
})
|
|
141
|
-
], 2);
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
}), Re = 30, q = 500;
|
|
145
|
-
function ze(e) {
|
|
146
|
-
let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = L(!1), u = L(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, ee = (e = "smooth") => {
|
|
147
|
-
!t.value || l.value ? d = !1 : (d = !0, t.value.scrollTo({
|
|
148
|
-
top: t.value.scrollHeight,
|
|
149
|
-
behavior: e
|
|
150
|
-
}), setTimeout(() => {
|
|
151
|
-
d = !1;
|
|
152
|
-
}, e === "instant" ? 0 : q));
|
|
153
|
-
}, _ = (e) => {
|
|
154
|
-
e.deltaY < 0 && (l.value = !0);
|
|
155
|
-
}, v = 0, te = (e) => {
|
|
156
|
-
v = e.touches[0]?.clientY ?? 0;
|
|
157
|
-
}, ne = (e) => {
|
|
158
|
-
let t = e.touches[0]?.clientY ?? 0;
|
|
159
|
-
t > v && (l.value = !0), v = t;
|
|
160
|
-
}, re = () => {
|
|
161
|
-
if (!t.value) return;
|
|
162
|
-
let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
|
|
163
|
-
u.value = n - r - e < Re, d || (e < g && s?.(), e > g && (u.value && (l.value = !1), c?.())), g = e;
|
|
164
|
-
}, ie = () => {
|
|
165
|
-
if (d || l.value || !t.value) return;
|
|
166
|
-
let e = t.value, n = e.scrollHeight - e.clientHeight;
|
|
167
|
-
n <= e.scrollTop || (u.value = !0, d = !0, e.scrollTop = n, requestAnimationFrame(() => {
|
|
168
|
-
d = !1;
|
|
169
|
-
}));
|
|
170
|
-
}, ae = () => {
|
|
171
|
-
!f && t.value && (f = new MutationObserver(ie), f.observe(t.value, {
|
|
172
|
-
childList: !0,
|
|
173
|
-
subtree: !0,
|
|
174
|
-
characterData: !0
|
|
175
|
-
}));
|
|
176
|
-
}, oe = () => {
|
|
177
|
-
f?.disconnect(), f = null;
|
|
178
|
-
};
|
|
179
|
-
B(n, (e, t) => {
|
|
180
|
-
e === "streaming" || e === "submitted" ? ae() : (e !== "ready" || t !== "streaming") && oe();
|
|
181
|
-
}), B(r, async () => {
|
|
182
|
-
if (r() && i() !== "assistant") {
|
|
183
|
-
x(), l.value = !1, d = !0;
|
|
184
|
-
try {
|
|
185
|
-
await N(), await o?.(), await N();
|
|
186
|
-
} finally {
|
|
187
|
-
ee();
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
let y = null, b = () => {
|
|
192
|
-
t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, y && clearTimeout(y), y = setTimeout(x, 300)));
|
|
193
|
-
}, x = () => {
|
|
194
|
-
p?.disconnect(), p = null, m?.disconnect(), m = null, y &&= (clearTimeout(y), null);
|
|
195
|
-
};
|
|
196
|
-
return ye(() => {
|
|
197
|
-
if (!t.value) return;
|
|
198
|
-
t.value.addEventListener("wheel", _, { passive: !0 }), t.value.addEventListener("touchstart", te, { passive: !0 }), t.value.addEventListener("touchmove", ne, { passive: !0 });
|
|
199
|
-
let e = n() === "submitted" || n() === "streaming";
|
|
200
|
-
e ? ae() : (p = new ResizeObserver(b), p.observe(t.value), m = new MutationObserver(b), m.observe(t.value, {
|
|
201
|
-
childList: !0,
|
|
202
|
-
subtree: !0
|
|
203
|
-
}));
|
|
204
|
-
let r = a?.() ?? t.value.firstElementChild;
|
|
205
|
-
r && (h = new ResizeObserver(ie), h.observe(r)), e || b();
|
|
206
|
-
}), F(() => {
|
|
207
|
-
t.value?.removeEventListener("wheel", _), t.value?.removeEventListener("touchstart", te), t.value?.removeEventListener("touchmove", ne), h?.disconnect(), h = null, oe(), x();
|
|
208
|
-
}), {
|
|
209
|
-
handleScroll: re,
|
|
210
|
-
scrollToBottom: ee,
|
|
211
|
-
userScrolledUp: l,
|
|
212
|
-
isAtBottom: u
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
//#endregion
|
|
216
|
-
//#region ../../packages/components/src/chat/wakeupFeed.ts
|
|
217
|
-
function Be(e, t = () => !1) {
|
|
218
|
-
let n = (e) => Oe(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
|
|
219
|
-
for (; a < e.length;) {
|
|
220
|
-
let t = e[a];
|
|
221
|
-
if (W(t) && n(e[a + 1])) {
|
|
222
|
-
let o = t.id, s = 0, c;
|
|
223
|
-
for (; W(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;
|
|
224
|
-
i.set(o, {
|
|
225
|
-
count: s,
|
|
226
|
-
lastAt: c
|
|
227
|
-
});
|
|
228
|
-
} else n(t) && r.add(t.id), a += 1;
|
|
229
|
-
}
|
|
230
|
-
return {
|
|
231
|
-
hidden: r,
|
|
232
|
-
quietRuns: i
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
//#endregion
|
|
236
|
-
//#region ../../packages/components/src/chat/PkChatbotMessages.vue?vue&type=script&setup=true&lang.ts
|
|
237
|
-
var Ve = ["aria-busy"], He = {
|
|
238
|
-
key: 0,
|
|
239
|
-
class: "pk-chatbot-messages__outline"
|
|
240
|
-
}, Ue = {
|
|
241
|
-
key: 0,
|
|
242
|
-
class: "pk-chatbot-divider vv-separator"
|
|
243
|
-
}, We = { class: "pk-chatbot-divider__label" }, Ge = {
|
|
244
|
-
key: 1,
|
|
245
|
-
class: "pk-chatbot-wakeup"
|
|
246
|
-
}, Ke = ["title"], qe = { class: "pk-chatbot-message__text" }, Je = ["title"], Ye = {
|
|
247
|
-
key: 0,
|
|
248
|
-
class: "pk-chatbot-message__reaction-emoji"
|
|
249
|
-
}, Xe = {
|
|
250
|
-
key: 0,
|
|
251
|
-
class: "pk-chatbot-message__loading-info"
|
|
252
|
-
}, Ze = { class: "flex gap-8 items-center" }, Qe = { class: "font-mono rounded text-12" }, $e = { class: "flex gap-8 items-center" }, et = {
|
|
253
|
-
key: 0,
|
|
254
|
-
class: "pk-chatbot-message__footer"
|
|
255
|
-
}, tt = {
|
|
256
|
-
key: 0,
|
|
257
|
-
class: "pk-chatbot-message__hover-meta"
|
|
258
|
-
}, nt = ["datetime", "title"], rt = { class: "truncate" }, it = {
|
|
259
|
-
key: 0,
|
|
260
|
-
class: "flex items-center gap-4 min-w-0"
|
|
261
|
-
}, at = { class: "truncate" }, ot = ["title"], st = {
|
|
262
|
-
key: 2,
|
|
263
|
-
class: "flex items-center gap-4 text-12 text-word-3"
|
|
264
|
-
}, ct = { class: "truncate" }, lt = ["datetime"], ut = { class: "truncate" }, dt = {
|
|
265
|
-
key: 4,
|
|
266
|
-
class: "flex items-center gap-4 text-12 text-word-3"
|
|
267
|
-
}, ft = { class: "pk-chatbot-message__loading-info" }, pt = { class: "flex gap-8 items-center" }, mt = { class: "text-12" }, ht = ["title", "aria-label"], gt = /* @__PURE__ */ M({
|
|
268
|
-
__name: "PkChatbotMessages",
|
|
269
|
-
props: {
|
|
270
|
-
status: {},
|
|
271
|
-
messages: {},
|
|
272
|
-
error: {},
|
|
273
|
-
actions: {},
|
|
274
|
-
mainColor: {},
|
|
275
|
-
textColor: {},
|
|
276
|
-
revisedAnswers: {},
|
|
277
|
-
messageFeedbacks: {},
|
|
278
|
-
readonlyFeedback: { type: Boolean },
|
|
279
|
-
disableHeightAdjustment: { type: Boolean },
|
|
280
|
-
showMessageDateTime: { type: Boolean },
|
|
281
|
-
showMessageTokensCount: { type: Boolean },
|
|
282
|
-
showMessageNumber: { type: Boolean },
|
|
283
|
-
showAllMessageParts: { type: Boolean },
|
|
284
|
-
interactive: { type: Boolean },
|
|
285
|
-
showExtendedSteps: { type: Boolean },
|
|
286
|
-
awaitingSpokenAnswer: { type: Boolean },
|
|
287
|
-
confirmVerdictsOnCall: {},
|
|
288
|
-
isDark: { type: Boolean },
|
|
289
|
-
showScrollToBottom: { type: Boolean },
|
|
290
|
-
feedbackMessageId: {},
|
|
291
|
-
feedbackLoading: { type: Boolean },
|
|
292
|
-
feedbackSubmitted: { type: Boolean },
|
|
293
|
-
feedbackError: {}
|
|
294
|
-
},
|
|
295
|
-
emits: [
|
|
296
|
-
"show-info",
|
|
297
|
-
"regenerate",
|
|
298
|
-
"revise",
|
|
299
|
-
"upvote",
|
|
300
|
-
"downvote",
|
|
301
|
-
"feedback",
|
|
302
|
-
"feedback-submit",
|
|
303
|
-
"feedback-close",
|
|
304
|
-
"scroll-up",
|
|
305
|
-
"scroll-down",
|
|
306
|
-
"auto-retry",
|
|
307
|
-
"reset-chat",
|
|
308
|
-
"approval-respond",
|
|
309
|
-
"confirm-respond"
|
|
310
|
-
],
|
|
311
|
-
setup(e, { emit: t }) {
|
|
312
|
-
let n = e, r = t, { t: i, d: a, n: y } = Te({ useScope: "global" }), j = Ce(), M = (e, t) => {
|
|
313
|
-
if (se(e)) {
|
|
314
|
-
let n = e.toolCallId;
|
|
315
|
-
n && r("confirm-respond", {
|
|
316
|
-
toolCallId: n,
|
|
317
|
-
confirmed: t
|
|
318
|
-
});
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
let n = oe(e);
|
|
322
|
-
n && r("approval-respond", {
|
|
323
|
-
id: n,
|
|
324
|
-
approved: t
|
|
325
|
-
});
|
|
326
|
-
}, F = we("scrollEl"), U = we("wrapperEl"), Ee = w(() => x(n.textColor, n.mainColor)), { handleScroll: De, scrollToBottom: Oe, userScrolledUp: G, isAtBottom: ke } = ze({
|
|
327
|
-
scrollEl: F,
|
|
328
|
-
status: () => n.status,
|
|
329
|
-
messagesLength: () => n.messages?.length,
|
|
330
|
-
lastMessageRole: () => n.messages?.[n.messages.length - 1]?.role,
|
|
331
|
-
contentEl: () => U.value,
|
|
332
|
-
beforeNewMessageScroll: () => _t(),
|
|
333
|
-
onScrollUp: () => r("scroll-up"),
|
|
334
|
-
onScrollDown: () => r("scroll-down")
|
|
335
|
-
}), je = () => {
|
|
336
|
-
G.value = !1, Oe();
|
|
337
|
-
}, K = w(() => (n.messages ?? []).filter((e) => e.role === "user" && !W(e)).map((e) => ({
|
|
338
|
-
id: e.id,
|
|
339
|
-
preview: e.parts.find(d)?.text.trim().slice(0, 120) || "…"
|
|
340
|
-
}))), Ne = L(), Pe = () => F.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], Fe = () => {
|
|
341
|
-
let e = F.value;
|
|
342
|
-
if (!e || !n.showScrollToBottom) return;
|
|
343
|
-
let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = K.value[0]?.id;
|
|
344
|
-
Pe().forEach((e, n) => {
|
|
345
|
-
e.getBoundingClientRect().top <= t && (r = K.value[n]?.id);
|
|
346
|
-
}), Ne.value = r;
|
|
347
|
-
};
|
|
348
|
-
B(K, async () => {
|
|
349
|
-
await N(), Fe();
|
|
350
|
-
});
|
|
351
|
-
let Ie = () => {
|
|
352
|
-
De(), Fe();
|
|
353
|
-
}, Re = (e) => {
|
|
354
|
-
let t = F.value, n = K.value.findIndex((t) => t.id === e), r = Pe()[n];
|
|
355
|
-
t && r && (G.value = !0, t.scrollTo({
|
|
356
|
-
top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
|
|
357
|
-
behavior: "smooth"
|
|
358
|
-
}));
|
|
359
|
-
}, q = L(0), gt = L(!1), _t = async () => {
|
|
360
|
-
let e = n.messages;
|
|
361
|
-
if (!e?.length || n.disableHeightAdjustment || e[e.length - 1].role !== "user" && n.status !== "submitted" && n.status !== "streaming" || (gt.value = !1, await N(), !F.value)) return;
|
|
362
|
-
let { paddingTop: t, paddingBottom: r } = getComputedStyle(F.value), i = F.value.clientHeight - Number.parseFloat(t) - Number.parseFloat(r), a = U.value && Number.parseFloat(getComputedStyle(U.value).rowGap) || 0, o = Pe(), s = i - (o[o.length - 1]?.clientHeight ?? 0) - a;
|
|
363
|
-
i > 0 && (q.value = Math.max(s, 0)), await N();
|
|
364
|
-
};
|
|
365
|
-
B(() => [n.messages?.length, n.messages?.[n.messages.length - 1]?.id], () => _t()), ye(() => {
|
|
366
|
-
(n.status === "submitted" || n.status === "streaming" || n.awaitingSpokenAnswer) && _t();
|
|
367
|
-
}), B(() => n.status, (e) => {
|
|
368
|
-
(e === "ready" || e === "error") && (gt.value = !0, q.value = 0);
|
|
369
|
-
});
|
|
370
|
-
let vt = (e) => n.revisedAnswers?.some((t) => t.messageId === e), J = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), yt = (e, t) => !n.readonlyFeedback && Lt(e, t), bt = (e) => n.readonlyFeedback ? J(e) : void 0, xt = (e) => bt(e)?.vote, St = (e) => {
|
|
371
|
-
let t = bt(e);
|
|
372
|
-
if (t?.vote) return;
|
|
373
|
-
let n = t?.metadata?.reactionEmoji;
|
|
374
|
-
return typeof n == "string" && /\p{Extended_Pictographic}/u.test(n) ? n : void 0;
|
|
375
|
-
}, Ct = (e) => !!(xt(e) || St(e)), wt = (e) => {
|
|
376
|
-
if (St(e)) return "pk-chatbot-message__reaction--neutral";
|
|
377
|
-
let t = xt(e);
|
|
378
|
-
return t === "upvote" ? "pk-chatbot-message__reaction--positive" : t === "downvote" ? "pk-chatbot-message__reaction--negative" : "pk-chatbot-message__reaction--neutral";
|
|
379
|
-
}, Tt = (e) => {
|
|
380
|
-
let t = xt(e);
|
|
381
|
-
return i(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
|
|
382
|
-
}, Et = (e) => {
|
|
383
|
-
let t = kt(e);
|
|
384
|
-
for (let e = t.length - 1; e >= 0; --e) if (d(t[e])) return e;
|
|
385
|
-
return -1;
|
|
386
|
-
}, Dt = w(() => n.messages?.[n.messages.length - 1]), Y = w(() => {
|
|
387
|
-
let e = Dt.value;
|
|
388
|
-
return e ? e.parts[e.parts.length - 1] : null;
|
|
389
|
-
}), Ot = w(() => {
|
|
390
|
-
let e = /* @__PURE__ */ new Map();
|
|
391
|
-
for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, h(ne(g(t.parts))));
|
|
392
|
-
return e;
|
|
393
|
-
}), kt = (e) => Ot.value.get(e.id) ?? e.parts, X = w(() => n.status === "submitted" || n.status === "streaming"), At = w(() => n.status === "error"), jt = w(() => n.awaitingSpokenAnswer === !0 && !X.value), Mt = w(() => jt.value && Dt.value?.role === "user" && !At.value), Nt = w(() => {
|
|
394
|
-
let e = Y.value;
|
|
395
|
-
return ie(i, e);
|
|
396
|
-
}), Pt = w(() => {
|
|
397
|
-
let e = Y.value;
|
|
398
|
-
return v(e);
|
|
399
|
-
}), Ft = (e) => n.messages?.findIndex((t) => t.id === e), Z = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, It = (e) => Z(e) && n.status === "ready" && !!n.actions?.includes("regenerate"), Lt = (e, t) => (!Z(t) || n.status === "ready") && !!n.actions?.includes(e), Rt = (e) => {
|
|
400
|
-
let t = e.parts[e.parts.length - 1];
|
|
401
|
-
return d(t);
|
|
402
|
-
}, zt = (e) => e.parts.some((e) => l(e) || c(e)), Bt = (e) => !!n.showExtendedSteps && Q(e) && zt(e), Vt = (e) => c(e) && !_(e) && !!(Me[u(e)] || j[e.type] || n.showAllMessageParts), Ht = (e) => e.parts.some((e) => d(e) && !!e.text.trim() || s(e) || b(e) && !_(e) || Vt(e)), Q = (e) => e.role === "assistant", Ut = (e) => e.role === "user", Wt = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), Gt = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), Kt = (e) => {
|
|
403
|
-
let t = Wt(e)?.metadata?.createdAt, n = Gt(e)?.metadata?.createdAt;
|
|
404
|
-
if (!t || !n) return;
|
|
405
|
-
let r = new Date(t), i = new Date(n);
|
|
406
|
-
return r.toDateString() === i.toDateString() ? void 0 : i;
|
|
407
|
-
}, $ = w(() => n.showAllMessageParts ? Be([]) : Be(n.messages ?? [], Ht)), qt = w(() => {
|
|
408
|
-
let e = 0;
|
|
409
|
-
return (n.messages ?? []).map((t) => t.parts.length > 0 ? ++e : void 0);
|
|
410
|
-
}), Jt = (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), Yt = (e) => {
|
|
411
|
-
let t = new Date(e), n = t.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
412
|
-
return a(t, n ? "time" : "date-time");
|
|
413
|
-
}, Xt = (e) => {
|
|
414
|
-
let { createdAt: t, completedAt: n } = e.metadata ?? {};
|
|
415
|
-
if (t && n) return re(y, n - t);
|
|
416
|
-
}, Zt = we("feedbackMessageEl");
|
|
417
|
-
return B(() => n.feedbackMessageId, async () => {
|
|
418
|
-
if (await N(), !n.feedbackMessageId) return;
|
|
419
|
-
let e = Zt.value?.[0]?.$el;
|
|
420
|
-
e && (Z(Ft(n.feedbackMessageId)) ? Oe() : e.scrollIntoView({
|
|
421
|
-
behavior: "smooth",
|
|
422
|
-
block: "center"
|
|
423
|
-
}));
|
|
424
|
-
}), (t, n) => {
|
|
425
|
-
let r = ge, c = me, l = he;
|
|
426
|
-
return I(), D("div", {
|
|
427
|
-
ref_key: "scrollEl",
|
|
428
|
-
ref: F,
|
|
429
|
-
class: P(["pk-chatbot-messages scrollbar-thin", { "pk-chatbot-messages--settling": gt.value }]),
|
|
430
|
-
role: "log",
|
|
431
|
-
"aria-live": "polite",
|
|
432
|
-
"aria-relevant": "additions text",
|
|
433
|
-
"aria-busy": X.value,
|
|
434
|
-
style: ve({
|
|
435
|
-
"--chatbot-main-color": e.mainColor,
|
|
436
|
-
"--chatbot-contrast-color": Ee.value
|
|
437
|
-
}),
|
|
438
|
-
onScroll: Ie
|
|
439
|
-
}, [
|
|
440
|
-
e.showScrollToBottom && K.value.length > 1 ? (I(), D("div", He, [A(pe, {
|
|
441
|
-
items: K.value,
|
|
442
|
-
"active-id": Ne.value,
|
|
443
|
-
onSelect: Re
|
|
444
|
-
}, null, 8, ["items", "active-id"])])) : E("", !0),
|
|
445
|
-
O("div", {
|
|
446
|
-
ref_key: "wrapperEl",
|
|
447
|
-
ref: U,
|
|
448
|
-
class: "pk-chatbot-messages__wrapper"
|
|
449
|
-
}, [
|
|
450
|
-
(I(!0), D(S, null, be(e.messages, (p, h) => (I(), D(S, { key: p.id }, [
|
|
451
|
-
Ut(p) && Kt(h) ? (I(), D("div", Ue, [O("span", We, R(z(a)(Kt(h), "short")), 1)])) : E("", !0),
|
|
452
|
-
$.value.quietRuns.has(p.id) ? (I(), D("div", Ge, [A(r, {
|
|
453
|
-
name: "ri:alarm-line",
|
|
454
|
-
class: "shrink-0"
|
|
455
|
-
}), O("span", null, R(z(i)("label.wakeupQuietRun", {
|
|
456
|
-
count: $.value.quietRuns.get(p.id).count,
|
|
457
|
-
time: z(a)($.value.quietRuns.get(p.id).lastAt ?? Date.now(), "time")
|
|
458
|
-
}, $.value.quietRuns.get(p.id).count)), 1)])) : z(W)(p) && !$.value.hidden.has(p.id) && !e.showAllMessageParts ? (I(), D("div", {
|
|
459
|
-
key: 2,
|
|
460
|
-
class: "pk-chatbot-wakeup",
|
|
461
|
-
title: p.metadata?.wakeup?.reason
|
|
462
|
-
}, [A(r, {
|
|
463
|
-
name: "ri:alarm-line",
|
|
464
|
-
class: "shrink-0"
|
|
465
|
-
}), O("span", null, [k(R(z(i)("label.wakeupCheck")) + " ", 1), p.metadata?.createdAt ? (I(), D(S, { key: 0 }, [k(" · " + R(z(a)(p.metadata.createdAt, "time")), 1)], 64)) : E("", !0)])], 8, Ke)) : E("", !0),
|
|
466
|
-
(!z(W)(p) || e.showAllMessageParts) && (!$.value.hidden.has(p.id) || X.value && Z(h)) && (p.parts.length || Z(h) && X.value && Q(p)) ? (I(), D("div", {
|
|
467
|
-
key: 3,
|
|
468
|
-
class: P(["pk-chatbot-message", [`pk-chatbot-message--${p.role}`, { "pk-chatbot-message--loading": X.value && Z(h) && Q(p) }]]),
|
|
469
|
-
style: ve({ minHeight: Z(h) && Q(p) && !At.value ? `${q.value}px` : void 0 })
|
|
470
|
-
}, [
|
|
471
|
-
A(C, {
|
|
472
|
-
appear: "",
|
|
473
|
-
name: "pk-chatbot-part"
|
|
474
|
-
}, {
|
|
475
|
-
default: V(() => [Bt(p) ? (I(), T(fe, {
|
|
476
|
-
key: 0,
|
|
477
|
-
message: p,
|
|
478
|
-
"is-streaming": X.value && Z(h),
|
|
479
|
-
"has-content": Ht(p),
|
|
480
|
-
"is-dark": e.isDark
|
|
481
|
-
}, null, 8, [
|
|
482
|
-
"message",
|
|
483
|
-
"is-streaming",
|
|
484
|
-
"has-content",
|
|
485
|
-
"is-dark"
|
|
486
|
-
])) : E("", !0)]),
|
|
487
|
-
_: 2
|
|
488
|
-
}, 1024),
|
|
489
|
-
(I(!0), D(S, null, be(kt(p), (n, i) => (I(), D(S, { key: z(ee)(n, i) }, [z(d)(n) && n.text.trim() ? (I(), T(C, {
|
|
490
|
-
key: 0,
|
|
491
|
-
appear: "",
|
|
492
|
-
name: "pk-chatbot-part"
|
|
493
|
-
}, {
|
|
494
|
-
default: V(() => [O("div", qe, [xe(t.$slots, "text", _e({ ref_for: !0 }, {
|
|
495
|
-
message: p,
|
|
496
|
-
part: n,
|
|
497
|
-
index: h,
|
|
498
|
-
isLoading: X.value
|
|
499
|
-
}), () => [Q(p) ? (I(), T(o, {
|
|
500
|
-
key: 0,
|
|
501
|
-
class: "wysiwyg",
|
|
502
|
-
markdown: n.text,
|
|
503
|
-
"is-dark": e.isDark,
|
|
504
|
-
loading: Z(h) && e.status === "streaming"
|
|
505
|
-
}, null, 8, [
|
|
506
|
-
"markdown",
|
|
507
|
-
"is-dark",
|
|
508
|
-
"loading"
|
|
509
|
-
])) : (I(), D(S, { key: 1 }, [k(R(n.text), 1)], 64))]), Ct(p.id) && !J(p.id)?.comment && i === Et(p) ? (I(), D("span", {
|
|
510
|
-
key: 0,
|
|
511
|
-
class: P(["pk-chatbot-message__reaction", wt(p.id)]),
|
|
512
|
-
title: Tt(p.id)
|
|
513
|
-
}, [St(p.id) ? (I(), D("span", Ye, R(St(p.id)), 1)) : (I(), T(r, {
|
|
514
|
-
key: 1,
|
|
515
|
-
name: xt(p.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
|
|
516
|
-
}, null, 8, ["name"]))], 10, Je)) : E("", !0)])]),
|
|
517
|
-
_: 2
|
|
518
|
-
}, 1024)) : z(s)(n) ? (I(), T(C, {
|
|
519
|
-
key: 1,
|
|
520
|
-
appear: "",
|
|
521
|
-
name: "pk-chatbot-part"
|
|
522
|
-
}, {
|
|
523
|
-
default: V(() => [A(ce, {
|
|
524
|
-
"media-type": n.mediaType,
|
|
525
|
-
url: n.url,
|
|
526
|
-
filename: n.filename,
|
|
527
|
-
size: z(f)(n)?.bytesCount
|
|
528
|
-
}, null, 8, [
|
|
529
|
-
"media-type",
|
|
530
|
-
"url",
|
|
531
|
-
"filename",
|
|
532
|
-
"size"
|
|
533
|
-
])]),
|
|
534
|
-
_: 2
|
|
535
|
-
}, 1024)) : z(b)(n) && !z(_)(n) ? (I(), T(C, {
|
|
536
|
-
key: 2,
|
|
537
|
-
appear: "",
|
|
538
|
-
name: "pk-chatbot-part"
|
|
539
|
-
}, {
|
|
540
|
-
default: V(() => [(I(), T(Le, {
|
|
541
|
-
key: `approval-${i}`,
|
|
542
|
-
part: n,
|
|
543
|
-
actionable: e.interactive === !0 && (z(se)(n) || Z(h)),
|
|
544
|
-
"call-verdict": e.confirmVerdictsOnCall?.get(n.toolCallId ?? ""),
|
|
545
|
-
onRespond: (e) => M(n, e)
|
|
546
|
-
}, null, 8, [
|
|
547
|
-
"part",
|
|
548
|
-
"actionable",
|
|
549
|
-
"call-verdict",
|
|
550
|
-
"onRespond"
|
|
551
|
-
]))]),
|
|
552
|
-
_: 2
|
|
553
|
-
}, 1024)) : Vt(n) ? (I(), T(C, {
|
|
554
|
-
key: 3,
|
|
555
|
-
appear: "",
|
|
556
|
-
name: "pk-chatbot-part"
|
|
557
|
-
}, {
|
|
558
|
-
default: V(() => [!z(j)[n.type] && z(Me)[z(u)(n)] ? (I(), T(Se(z(Me)[z(u)(n)]), {
|
|
559
|
-
key: `component-${i}-${z(te)(n)}`,
|
|
560
|
-
part: n
|
|
561
|
-
}, null, 8, ["part"])) : xe(t.$slots, n.type, _e({ ref_for: !0 }, {
|
|
562
|
-
message: p,
|
|
563
|
-
part: n,
|
|
564
|
-
index: h,
|
|
565
|
-
isLoading: X.value
|
|
566
|
-
}), () => [e.showAllMessageParts ? (I(), D("div", Xe, [O("div", Ze, [z(v)(n) ? (I(), T(r, {
|
|
567
|
-
key: 0,
|
|
568
|
-
name: z(v)(n),
|
|
569
|
-
class: "shrink-0"
|
|
570
|
-
}, null, 8, ["name"])) : E("", !0), O("code", Qe, R(z(Ae)(n.type)), 1)])])) : E("", !0)], void 0, 1)]),
|
|
571
|
-
_: 2
|
|
572
|
-
}, 1024)) : E("", !0), A(C, { mode: "out-in" }, {
|
|
573
|
-
default: V(() => [i === Et(p) && e.readonlyFeedback && J(p.id)?.comment ? (I(), T(ue, {
|
|
574
|
-
key: 0,
|
|
575
|
-
feedback: J(p.id)
|
|
576
|
-
}, null, 8, ["feedback"])) : E("", !0)]),
|
|
577
|
-
_: 2
|
|
578
|
-
}, 1024)], 64))), 128)),
|
|
579
|
-
A(C, {
|
|
580
|
-
name: "fade-in",
|
|
581
|
-
mode: "out-in"
|
|
582
|
-
}, {
|
|
583
|
-
default: V(() => [X.value && Z(h) && !Rt(p) && Q(p) && (!Bt(p) || Ht(p)) ? (I(), D("div", {
|
|
584
|
-
key: `loading-info-${p.id}`,
|
|
585
|
-
class: "pk-chatbot-message__loading-info"
|
|
586
|
-
}, [O("div", $e, [
|
|
587
|
-
A(r, {
|
|
588
|
-
name: "loading-loop",
|
|
589
|
-
class: "shrink-0"
|
|
590
|
-
}),
|
|
591
|
-
A(C, { mode: "out-in" }, {
|
|
592
|
-
default: V(() => [Pt.value ? (I(), T(r, {
|
|
593
|
-
key: Pt.value,
|
|
594
|
-
class: "shrink-0",
|
|
595
|
-
name: Pt.value
|
|
596
|
-
}, null, 8, ["name"])) : E("", !0)]),
|
|
597
|
-
_: 1
|
|
598
|
-
}),
|
|
599
|
-
A(C, { mode: "out-in" }, {
|
|
600
|
-
default: V(() => [Nt.value ? (I(), D("span", {
|
|
601
|
-
key: Nt.value,
|
|
602
|
-
class: "text-12"
|
|
603
|
-
}, R(Nt.value), 1)) : E("", !0)]),
|
|
604
|
-
_: 1
|
|
605
|
-
})
|
|
606
|
-
]), A(C, {
|
|
607
|
-
name: "fade-in",
|
|
608
|
-
mode: "out-in"
|
|
609
|
-
}, {
|
|
610
|
-
default: V(() => [!Bt(p) && Y.value && "text" in Y.value && Y.value.text.trim() ? (I(), T(de, {
|
|
611
|
-
key: 0,
|
|
612
|
-
markdown: Y.value.text,
|
|
613
|
-
"is-dark": e.isDark,
|
|
614
|
-
"tail-length": z(ae),
|
|
615
|
-
"inner-class": "wysiwyg",
|
|
616
|
-
class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
|
|
617
|
-
}, null, 8, [
|
|
618
|
-
"markdown",
|
|
619
|
-
"is-dark",
|
|
620
|
-
"tail-length"
|
|
621
|
-
])) : E("", !0)]),
|
|
622
|
-
_: 2
|
|
623
|
-
}, 1024)])) : E("", !0)]),
|
|
624
|
-
_: 2
|
|
625
|
-
}, 1024),
|
|
626
|
-
A(C, { mode: "out-in" }, {
|
|
627
|
-
default: V(() => [Jt(p, h) ? (I(), D("div", et, [
|
|
628
|
-
A(l, {
|
|
629
|
-
modifiers: "compact",
|
|
630
|
-
class: "mr-auto shrink-0"
|
|
631
|
-
}, {
|
|
632
|
-
default: V(() => [
|
|
633
|
-
A(C, { mode: "out-in" }, {
|
|
634
|
-
default: V(() => [It(h) ? (I(), T(c, {
|
|
635
|
-
key: 0,
|
|
636
|
-
icon: "ri:reset-right-line",
|
|
637
|
-
modifiers: "action-quiet-small",
|
|
638
|
-
title: z(i)("action.regenerate"),
|
|
639
|
-
"aria-label": z(i)("action.regenerate"),
|
|
640
|
-
onClick: n[0] ||= H((e) => t.$emit("regenerate"), ["stop"])
|
|
641
|
-
}, null, 8, ["title", "aria-label"])) : E("", !0)]),
|
|
642
|
-
_: 2
|
|
643
|
-
}, 1024),
|
|
644
|
-
A(C, { mode: "out-in" }, {
|
|
645
|
-
default: V(() => [Lt("show-info", h) ? (I(), T(c, {
|
|
646
|
-
key: 0,
|
|
647
|
-
icon: "ri:information-line",
|
|
648
|
-
title: z(i)("action.getMoreInfo"),
|
|
649
|
-
"aria-label": z(i)("action.getMoreInfo"),
|
|
650
|
-
modifiers: "action-quiet-small",
|
|
651
|
-
onClick: H((e) => t.$emit("show-info", p), ["stop"])
|
|
652
|
-
}, null, 8, [
|
|
653
|
-
"title",
|
|
654
|
-
"aria-label",
|
|
655
|
-
"onClick"
|
|
656
|
-
])) : E("", !0)]),
|
|
657
|
-
_: 2
|
|
658
|
-
}, 1024),
|
|
659
|
-
A(C, { mode: "out-in" }, {
|
|
660
|
-
default: V(() => [Lt("revise", h) ? (I(), T(c, {
|
|
661
|
-
key: 0,
|
|
662
|
-
icon: vt(p.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
|
|
663
|
-
title: vt(p.id) ? z(i)("action.editRevise") : z(i)("action.createRevise"),
|
|
664
|
-
"aria-label": vt(p.id) ? z(i)("action.editRevise") : z(i)("action.createRevise"),
|
|
665
|
-
modifiers: "action-quiet-small",
|
|
666
|
-
class: P({ "text-brand-graphic": vt(p.id) }),
|
|
667
|
-
onClick: H((e) => t.$emit("revise", p), ["stop"])
|
|
668
|
-
}, null, 8, [
|
|
669
|
-
"icon",
|
|
670
|
-
"title",
|
|
671
|
-
"aria-label",
|
|
672
|
-
"class",
|
|
673
|
-
"onClick"
|
|
674
|
-
])) : E("", !0)]),
|
|
675
|
-
_: 2
|
|
676
|
-
}, 1024),
|
|
677
|
-
A(C, { mode: "out-in" }, {
|
|
678
|
-
default: V(() => [yt("upvote", h) ? (I(), T(c, {
|
|
679
|
-
key: 0,
|
|
680
|
-
icon: J(p.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
|
|
681
|
-
title: z(i)("action.upvote"),
|
|
682
|
-
"aria-label": z(i)("action.upvote"),
|
|
683
|
-
modifiers: "action-quiet-small",
|
|
684
|
-
onClick: H((e) => t.$emit("upvote", p), ["stop"])
|
|
685
|
-
}, null, 8, [
|
|
686
|
-
"icon",
|
|
687
|
-
"title",
|
|
688
|
-
"aria-label",
|
|
689
|
-
"onClick"
|
|
690
|
-
])) : E("", !0)]),
|
|
691
|
-
_: 2
|
|
692
|
-
}, 1024),
|
|
693
|
-
A(C, { mode: "out-in" }, {
|
|
694
|
-
default: V(() => [yt("downvote", h) ? (I(), T(c, {
|
|
695
|
-
key: 0,
|
|
696
|
-
icon: J(p.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
|
|
697
|
-
title: z(i)("action.downvote"),
|
|
698
|
-
"aria-label": z(i)("action.downvote"),
|
|
699
|
-
modifiers: "action-quiet-small",
|
|
700
|
-
onClick: H((e) => t.$emit("downvote", p), ["stop"])
|
|
701
|
-
}, null, 8, [
|
|
702
|
-
"icon",
|
|
703
|
-
"title",
|
|
704
|
-
"aria-label",
|
|
705
|
-
"onClick"
|
|
706
|
-
])) : E("", !0)]),
|
|
707
|
-
_: 2
|
|
708
|
-
}, 1024),
|
|
709
|
-
A(C, { mode: "out-in" }, {
|
|
710
|
-
default: V(() => [yt("feedback", h) ? (I(), T(c, {
|
|
711
|
-
key: 0,
|
|
712
|
-
icon: J(p.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
|
|
713
|
-
title: z(i)("action.feedback"),
|
|
714
|
-
"aria-label": z(i)("action.feedback"),
|
|
715
|
-
modifiers: "action-quiet-small",
|
|
716
|
-
onClick: H((e) => t.$emit("feedback", p), ["stop"])
|
|
717
|
-
}, null, 8, [
|
|
718
|
-
"icon",
|
|
719
|
-
"title",
|
|
720
|
-
"aria-label",
|
|
721
|
-
"onClick"
|
|
722
|
-
])) : E("", !0)]),
|
|
723
|
-
_: 2
|
|
724
|
-
}, 1024)
|
|
725
|
-
]),
|
|
726
|
-
_: 2
|
|
727
|
-
}, 1024),
|
|
728
|
-
!e.showMessageDateTime && p.metadata?.createdAt && p.metadata?.completedAt ? (I(), D("div", tt, [O("time", {
|
|
729
|
-
datetime: new Date(p.metadata.createdAt).toISOString(),
|
|
730
|
-
title: z(a)(new Date(p.metadata.createdAt), "date-time"),
|
|
731
|
-
class: "flex items-center gap-4 min-w-0"
|
|
732
|
-
}, [A(r, {
|
|
733
|
-
name: "ri:time-line",
|
|
734
|
-
class: "shrink-0"
|
|
735
|
-
}), O("span", rt, R(Yt(p.metadata.createdAt)), 1)], 8, nt), Xt(p) ? (I(), D("span", it, [A(r, {
|
|
736
|
-
name: "ri:hourglass-line",
|
|
737
|
-
class: "shrink-0"
|
|
738
|
-
}), O("span", at, R(Xt(p)), 1)])) : E("", !0)])) : E("", !0),
|
|
739
|
-
e.showMessageNumber ? (I(), D("span", {
|
|
740
|
-
key: 1,
|
|
741
|
-
title: z(i)("label.messageNumber", { n: qt.value[h] }),
|
|
742
|
-
class: "text-12 text-word-3 tabular-nums"
|
|
743
|
-
}, " #" + R(qt.value[h]), 9, ot)) : E("", !0),
|
|
744
|
-
e.showMessageTokensCount && p.metadata?.totalTokens ? (I(), D("span", st, [A(r, {
|
|
745
|
-
name: "ri:ai-generate-2-line",
|
|
746
|
-
class: "shrink-0"
|
|
747
|
-
}), O("span", ct, R(z(y)(p.metadata.totalTokens, "integer")) + " " + R(z(i)("label.tokens")), 1)])) : E("", !0),
|
|
748
|
-
e.showMessageDateTime && p.metadata?.createdAt ? (I(), D("time", {
|
|
749
|
-
key: 3,
|
|
750
|
-
datetime: new Date(p.metadata?.createdAt).toISOString(),
|
|
751
|
-
class: "flex items-center gap-4 text-12 text-word-3"
|
|
752
|
-
}, [A(r, {
|
|
753
|
-
name: "ri:time-line",
|
|
754
|
-
class: "shrink-0"
|
|
755
|
-
}), O("span", ut, R(z(a)(new Date(p.metadata?.createdAt), "date-time")), 1)], 8, lt)) : E("", !0),
|
|
756
|
-
e.showMessageDateTime && p?.metadata?.completedAt && p?.metadata?.createdAt ? (I(), D("div", dt, [A(r, {
|
|
757
|
-
name: "ri:hourglass-line",
|
|
758
|
-
class: "shrink-0"
|
|
759
|
-
}), A(m, {
|
|
760
|
-
class: "truncate",
|
|
761
|
-
date: p.metadata?.createdAt,
|
|
762
|
-
"end-date": p.metadata?.completedAt
|
|
763
|
-
}, null, 8, ["date", "end-date"])])) : E("", !0)
|
|
764
|
-
])) : E("", !0)]),
|
|
765
|
-
_: 2
|
|
766
|
-
}, 1024),
|
|
767
|
-
A(C, { mode: "out-in" }, {
|
|
768
|
-
default: V(() => [p.id === e.feedbackMessageId ? (I(), T(le, {
|
|
769
|
-
key: 0,
|
|
770
|
-
ref_for: !0,
|
|
771
|
-
ref_key: "feedbackMessageEl",
|
|
772
|
-
ref: Zt,
|
|
773
|
-
loading: e.feedbackLoading,
|
|
774
|
-
submitted: e.feedbackSubmitted,
|
|
775
|
-
error: e.feedbackError,
|
|
776
|
-
onSubmit: n[1] ||= (e) => t.$emit("feedback-submit", e),
|
|
777
|
-
onClose: n[2] ||= (e) => t.$emit("feedback-close")
|
|
778
|
-
}, null, 8, [
|
|
779
|
-
"loading",
|
|
780
|
-
"submitted",
|
|
781
|
-
"error"
|
|
782
|
-
])) : E("", !0)]),
|
|
783
|
-
_: 2
|
|
784
|
-
}, 1024)
|
|
785
|
-
], 6)) : E("", !0)
|
|
786
|
-
], 64))), 128)),
|
|
787
|
-
A(C, {
|
|
788
|
-
appear: "",
|
|
789
|
-
name: "pk-chatbot-part"
|
|
790
|
-
}, {
|
|
791
|
-
default: V(() => [jt.value ? (I(), D("div", {
|
|
792
|
-
key: 0,
|
|
793
|
-
class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
|
|
794
|
-
style: ve({ minHeight: Mt.value ? `${q.value}px` : void 0 })
|
|
795
|
-
}, [O("div", ft, [O("div", pt, [A(r, {
|
|
796
|
-
name: "loading-loop",
|
|
797
|
-
class: "shrink-0"
|
|
798
|
-
}), O("span", mt, R(z(i)("label.answeringOnTheCall")), 1)])])], 4)) : E("", !0)]),
|
|
799
|
-
_: 1
|
|
800
|
-
}),
|
|
801
|
-
A(C, {
|
|
802
|
-
appear: "",
|
|
803
|
-
name: "pk-chatbot-part"
|
|
804
|
-
}, {
|
|
805
|
-
default: V(() => [At.value ? (I(), T(p, {
|
|
806
|
-
key: 0,
|
|
807
|
-
error: e.error,
|
|
808
|
-
onRetry: n[3] ||= (e) => t.$emit("auto-retry"),
|
|
809
|
-
onReset: n[4] ||= (e) => t.$emit("reset-chat")
|
|
810
|
-
}, null, 8, ["error"])) : E("", !0)]),
|
|
811
|
-
_: 1
|
|
812
|
-
}),
|
|
813
|
-
Dt.value?.role === "user" && !Mt.value || At.value ? (I(), D("div", {
|
|
814
|
-
key: 0,
|
|
815
|
-
class: "pk-chatbot-messages__spacer",
|
|
816
|
-
style: ve({ minHeight: `${q.value}px` })
|
|
817
|
-
}, null, 4)) : E("", !0)
|
|
818
|
-
], 512),
|
|
819
|
-
A(C, { name: "pk-chatbot-messages-fab" }, {
|
|
820
|
-
default: V(() => [e.showScrollToBottom && (z(G) || !z(ke)) ? (I(), D("button", {
|
|
821
|
-
key: 0,
|
|
822
|
-
type: "button",
|
|
823
|
-
class: "pk-chatbot-messages__scroll-to-bottom",
|
|
824
|
-
title: z(i)("action.scrollToBottom"),
|
|
825
|
-
"aria-label": z(i)("action.scrollToBottom"),
|
|
826
|
-
onClick: je
|
|
827
|
-
}, [A(r, { name: "ri:arrow-down-line" })], 8, ht)) : E("", !0)]),
|
|
828
|
-
_: 1
|
|
829
|
-
})
|
|
830
|
-
], 46, Ve);
|
|
831
|
-
};
|
|
832
|
-
}
|
|
833
|
-
});
|
|
834
|
-
//#endregion
|
|
835
|
-
export { je as a, Ae as i, K as n, ke as r, gt as t };
|
|
836
|
-
|
|
837
|
-
//# sourceMappingURL=PkChatbotMessages-CztL_AMB.js.map
|