@8wave/ai-elements 0.114.0-beta.30 → 0.114.0-beta.8
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-DTLrWpzX.js +460 -0
- package/dist/_chunks/Agent-DTLrWpzX.js.map +1 -0
- package/dist/_chunks/Media-Cft7Pwrh.js +108 -0
- package/dist/_chunks/Media-Cft7Pwrh.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-ZD0SROu1.js → PkStreamingMarkdown-C1sANAr5.js} +672 -688
- package/dist/_chunks/PkStreamingMarkdown-C1sANAr5.js.map +1 -0
- package/dist/_chunks/{PkToolRequestGeolocation-OF1PWhMw.js → PkToolRequestGeolocation-BbxYKt-9.js} +2 -2
- package/{dist-vue/_chunks/PkToolRequestGeolocation-BOVbaCzQ.js.map → dist/_chunks/PkToolRequestGeolocation-BbxYKt-9.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-ChGMAKV7.js → PkToolRequestOAuthConnection-CTp2w60F.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-ChGMAKV7.js.map → PkToolRequestOAuthConnection-CTp2w60F.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-LEfO5zfg.js → PkToolShowArtifact-BfTjxGOT.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-LEfO5zfg.js.map → PkToolShowArtifact-BfTjxGOT.js.map} +1 -1
- package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js +60 -0
- package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js.map +1 -0
- package/dist/_chunks/{PkToolShowContactForm-BO3JQfts.js → PkToolShowContactForm-PFpY9dIp.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-BO3JQfts.js.map → PkToolShowContactForm-PFpY9dIp.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-KW8MOL-j.js → PkToolShowForm-CMtSN0oX.js} +5 -5
- package/dist/_chunks/{PkToolShowForm-KW8MOL-j.js.map → PkToolShowForm-CMtSN0oX.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-Bfx-Th_j.js → PkToolShowSources-C6cu66Ts.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-Bfx-Th_j.js.map → PkToolShowSources-C6cu66Ts.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-Dl4x_nEJ.js → PkToolShowSuggestedReply-CFO8wV1b.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-Dl4x_nEJ.js.map → PkToolShowSuggestedReply-CFO8wV1b.js.map} +1 -1
- package/dist/_chunks/{markdown-BL7WANiX.js → markdown-BRD-hDrH.js} +12 -19
- package/dist/_chunks/markdown-BRD-hDrH.js.map +1 -0
- package/dist/ai-elements.es.js +2745 -3024
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- 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-tbKw8Mdt.js → Agent-BNlmK-uJ.js} +2 -2
- package/dist-vue/_chunks/{Agent-tbKw8Mdt.js.map → Agent-BNlmK-uJ.js.map} +1 -1
- package/dist-vue/_chunks/{Document-nCWwJC2h.js → Document-2X01-F4Z.js} +11 -18
- package/dist-vue/_chunks/Document-2X01-F4Z.js.map +1 -0
- package/dist-vue/_chunks/Media-_HfFLHGD.js.map +1 -1
- package/dist-vue/_chunks/{PkChatbot-CXQzBuxy.js → PkChatbot-HRayDr2d.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-CXQzBuxy.js.map → PkChatbot-HRayDr2d.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js +349 -0
- package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-9mWiPd4B.js → PkChatbotEmptyState-CPOcfoRC.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-9mWiPd4B.js.map → PkChatbotEmptyState-CPOcfoRC.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-BzaCyeFp.js → PkChatbotInput-pLJQIu7v.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-BzaCyeFp.js.map → PkChatbotInput-pLJQIu7v.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-KH5RE8Dk.js → PkChatbotMessages-GZStJbx_.js} +256 -258
- package/dist-vue/_chunks/PkChatbotMessages-GZStJbx_.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-C36nXLW7.js → PkChatbotStepPayload-DU0W-eUp.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-C36nXLW7.js.map → PkChatbotStepPayload-DU0W-eUp.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-CBX-AQXv.js → PkChatbotStepToolDetail-etlBryOg.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-CBX-AQXv.js.map → PkChatbotStepToolDetail-etlBryOg.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js +190 -0
- package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-D5sfTMCW.js → PkChatbotViewChat-DIfBWFoG.js} +7 -7
- package/dist-vue/_chunks/{PkChatbotViewChat-D5sfTMCW.js.map → PkChatbotViewChat-DIfBWFoG.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-CHpN4vhm.js → PkChatbotViewConversations-BCdolW0R.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-CHpN4vhm.js.map → PkChatbotViewConversations-BCdolW0R.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-Bk9-K6Hw.js → PkChatbotViewFiles-Cudao8ew.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-Bk9-K6Hw.js.map → PkChatbotViewFiles-Cudao8ew.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-CosaHA-g.js → PkChatbotViewProfile-DDsKOkcC.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-CosaHA-g.js.map → PkChatbotViewProfile-DDsKOkcC.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-BN7waklD.js → PkStreamingMarkdown-BloMJaIW.js} +205 -214
- package/dist-vue/_chunks/{PkStreamingMarkdown-BN7waklD.js.map → PkStreamingMarkdown-BloMJaIW.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-BOVbaCzQ.js → PkToolRequestGeolocation-9vfYNaQo.js} +2 -2
- package/{dist/_chunks/PkToolRequestGeolocation-OF1PWhMw.js.map → dist-vue/_chunks/PkToolRequestGeolocation-9vfYNaQo.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DMvCGPuX.js → PkToolRequestOAuthConnection-BorR5NmZ.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DMvCGPuX.js.map → PkToolRequestOAuthConnection-BorR5NmZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-DrE_mK1z.js → PkToolShowArtifact-BuMY7GNj.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-DrE_mK1z.js.map → PkToolShowArtifact-BuMY7GNj.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js +61 -0
- package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowContactForm-BBTbrgt4.js → PkToolShowContactForm-0OQRqT8m.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-BBTbrgt4.js.map → PkToolShowContactForm-0OQRqT8m.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-CztnTdq2.js → PkToolShowDiagram-BGL27iHG.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-CztnTdq2.js.map → PkToolShowDiagram-BGL27iHG.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowEmail-C30K5kJA.js → PkToolShowEmail-BJJpS69F.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowEmail-C30K5kJA.js.map → PkToolShowEmail-BJJpS69F.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-C9N_SSm8.js → PkToolShowForm-DDcPpOZ8.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-C9N_SSm8.js.map → PkToolShowForm-DDcPpOZ8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowMessage-DvkCRERv.js → PkToolShowMessage-BFGynf3p.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowMessage-DvkCRERv.js.map → PkToolShowMessage-BFGynf3p.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-cfjg3CmV.js → PkToolShowProductList-6t1Ir5CW.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-cfjg3CmV.js.map → PkToolShowProductList-6t1Ir5CW.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-CyR2GTiE.js → PkToolShowSources-cOF0ZxOj.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowSources-CyR2GTiE.js.map → PkToolShowSources-cOF0ZxOj.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-qAWdCUhr.js → PkToolShowSuggestedReply-DA4NEjHB.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-qAWdCUhr.js.map → PkToolShowSuggestedReply-DA4NEjHB.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-CkQ2NhRj.js → PkToolShowWebPages-OgaT1vYJ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-CkQ2NhRj.js.map → PkToolShowWebPages-OgaT1vYJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkUrl-BsD4Vby6.js → PkUrl-Cd69XP5z.js} +2 -2
- package/dist-vue/_chunks/{PkUrl-BsD4Vby6.js.map → PkUrl-Cd69XP5z.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-BlWs282E.js → createChatbotApiClient-CaVLm5W9.js} +168 -137
- package/dist-vue/_chunks/createChatbotApiClient-CaVLm5W9.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-CMo47fnS.js → useChatbotStore-BwrBZJCq.js} +3 -3
- package/dist-vue/_chunks/{useChatbotStore-CMo47fnS.js.map → useChatbotStore-BwrBZJCq.js.map} +1 -1
- package/dist-vue/_chunks/utils-h4C7rRcu.js +177 -0
- package/dist-vue/_chunks/utils-h4C7rRcu.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +4 -4
- package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +5 -53
- package/dist-vue/apps/web-component/src/composables/useChatbotAuthForm.d.ts +0 -14
- package/dist-vue/composables.js +37 -372
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +3233 -3357
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +0 -42
- package/dist-vue/packages/ability/src/index.d.ts +14 -10
- package/dist-vue/packages/components/src/chat/PkChatbotAuth.d.ts +0 -19
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +4 -8
- package/dist-vue/packages/components/src/chat/PkChatbotSteps.d.ts +0 -1
- package/dist-vue/packages/components/src/chat/utils.d.ts +0 -9
- package/dist-vue/packages/components/src/index.d.ts +1 -2
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +0 -60
- package/dist-vue/packages/models/src/schema/Chat.d.ts +0 -42
- package/dist-vue/packages/models/src/schema/Document.d.ts +0 -17
- package/dist-vue/packages/models/src/schema/DocumentFolder.d.ts +0 -10
- package/dist-vue/packages/models/src/schema/DocumentSyncSource.d.ts +1 -71
- package/dist-vue/packages/models/src/schema/Media.d.ts +1 -0
- package/dist-vue/packages/models/src/schema/Member.d.ts +0 -3
- package/dist-vue/packages/models/src/schema/Notification.d.ts +0 -6
- package/dist-vue/packages/models/src/schema/Organization.d.ts +0 -1
- package/dist-vue/packages/models/src/schema/User.d.ts +0 -1
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-DK76k05_.js +0 -566
- package/dist/_chunks/Agent-DK76k05_.js.map +0 -1
- package/dist/_chunks/PkStreamingMarkdown-ZD0SROu1.js.map +0 -1
- package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js +0 -72
- package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js.map +0 -1
- package/dist/_chunks/markdown-BL7WANiX.js.map +0 -1
- package/dist-vue/_chunks/Document-nCWwJC2h.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js +0 -421
- package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-KH5RE8Dk.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotSteps-356rnZG5.js +0 -191
- package/dist-vue/_chunks/PkChatbotSteps-356rnZG5.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js +0 -72
- package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-BlWs282E.js.map +0 -1
- package/dist-vue/_chunks/utils--8iNpBr_.js +0 -184
- package/dist-vue/_chunks/utils--8iNpBr_.js.map +0 -1
- package/dist-vue/packages/auth/src/additional-fields.d.ts +0 -48
- package/dist-vue/packages/auth/src/passkey-policy-client-plugin.d.ts +0 -31
- package/dist-vue/packages/auth/src/passkey-policy-plugin.d.ts +0 -22
- package/dist-vue/packages/auth/src/two-factor-policy-client-plugin.d.ts +0 -60
- package/dist-vue/packages/auth/src/two-factor-policy-plugin.d.ts +0 -65
- package/dist-vue/packages/components/src/PkQrCode.d.ts +0 -14
- package/dist-vue/packages/components/src/chat/PkTurnEvaluation.d.ts +0 -8
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./PkStreamingMarkdown-
|
|
1
|
+
import { k as e } from "./Agent-BNlmK-uJ.js";
|
|
2
|
+
import { t } from "./PkStreamingMarkdown-BloMJaIW.js";
|
|
3
3
|
import "./src-DT8FLE4_.js";
|
|
4
4
|
import { a as n, c as r, o as i, r as a, s as o, t as s } from "./message-RohfrdWS.js";
|
|
5
5
|
import { t as c } from "./PkChatbotError-CuX9C_b9.js";
|
|
6
6
|
import { t as l } from "./PkRelativeTime--1cIphlA.js";
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { n as
|
|
12
|
-
import { t as
|
|
13
|
-
import { VvButton as
|
|
14
|
-
import { Fragment as C, Transition as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createTextVNode as
|
|
15
|
-
import { useI18n as
|
|
7
|
+
import { b as u, d, f, g as p, l as m, n as h, s as g, t as _, u as ee, v, x as te, y } from "./utils-h4C7rRcu.js";
|
|
8
|
+
import { t as ne } from "./PkChatbotFilePreview-CwiVQDF2.js";
|
|
9
|
+
import { t as re } from "./PkChatbotFeedbackForm-4XWLHOkB.js";
|
|
10
|
+
import { t as ie } from "./PkChatbotMessageFeedback-BYmrVaCE.js";
|
|
11
|
+
import { n as ae, t as b } from "./PkChatbotSteps-Cl4pVtPJ.js";
|
|
12
|
+
import { t as x } from "./PkChatbotOutlineRail-np4g6vsz.js";
|
|
13
|
+
import { VvButton as S, VvButtonGroup as oe, VvIcon as se } from "@volverjs/ui-vue/components";
|
|
14
|
+
import { Fragment as C, Transition as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createTextVNode as ce, createVNode as A, defineAsyncComponent as j, defineComponent as M, mergeProps as le, nextTick as N, normalizeClass as P, normalizeStyle as F, onBeforeUnmount as I, onMounted as ue, openBlock as L, ref as R, renderList as de, renderSlot as fe, resolveDynamicComponent as pe, toDisplayString as z, unref as B, useSlots as me, useTemplateRef as he, watch as V, withCtx as H, withModifiers as U } from "vue";
|
|
15
|
+
import { useI18n as ge } from "vue-i18n";
|
|
16
16
|
//#region ../../packages/utils/src/text.ts
|
|
17
|
-
var
|
|
18
|
-
requestOAuthConnection: j(() => import("./PkToolRequestOAuthConnection-
|
|
19
|
-
showArtifact: j(() => import("./PkToolShowArtifact-
|
|
17
|
+
var W = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), _e = (e) => e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[-_]+/g, " ") : "", ve = (e) => e ? W(e).replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase() : "", ye = (e) => e ? W(e).replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").toLowerCase() : "", be = (e) => e ? e.charAt(0).toUpperCase() + e.slice(1) : "", xe = {
|
|
18
|
+
requestOAuthConnection: j(() => import("./PkToolRequestOAuthConnection-BorR5NmZ.js")),
|
|
19
|
+
showArtifact: j(() => import("./PkToolShowArtifact-BuMY7GNj.js").then((e) => e.n)),
|
|
20
20
|
showCalendarEvent: j(() => import("./PkToolShowCalendarEvent-BsBdsbV0.js").then((e) => e.n)),
|
|
21
|
-
showComparison: j(() => import("./PkToolShowComparison-
|
|
22
|
-
showContactForm: j(() => import("./PkToolShowContactForm-
|
|
23
|
-
showDiagram: j(() => import("./PkToolShowDiagram-
|
|
24
|
-
showEmail: j(() => import("./PkToolShowEmail-
|
|
21
|
+
showComparison: j(() => import("./PkToolShowComparison-BLn4pkno.js").then((e) => e.n)),
|
|
22
|
+
showContactForm: j(() => import("./PkToolShowContactForm-0OQRqT8m.js").then((e) => e.n)),
|
|
23
|
+
showDiagram: j(() => import("./PkToolShowDiagram-BGL27iHG.js")),
|
|
24
|
+
showEmail: j(() => import("./PkToolShowEmail-BJJpS69F.js").then((e) => e.n)),
|
|
25
25
|
showImageGallery: j(() => import("./PkToolShowImageGallery-DudQzBx4.js").then((e) => e.n)),
|
|
26
26
|
showLocation: j(() => import("./PkToolShowLocation-Bv6sLN5P.js").then((e) => e.n)),
|
|
27
|
-
showMessage: j(() => import("./PkToolShowMessage-
|
|
28
|
-
showForm: j(() => import("./PkToolShowForm-
|
|
29
|
-
showMultipleChoice: j(() => import("./PkToolShowForm-
|
|
30
|
-
showProductList: j(() => import("./PkToolShowProductList-
|
|
27
|
+
showMessage: j(() => import("./PkToolShowMessage-BFGynf3p.js").then((e) => e.n)),
|
|
28
|
+
showForm: j(() => import("./PkToolShowForm-DDcPpOZ8.js").then((e) => e.n)),
|
|
29
|
+
showMultipleChoice: j(() => import("./PkToolShowForm-DDcPpOZ8.js").then((e) => e.n)),
|
|
30
|
+
showProductList: j(() => import("./PkToolShowProductList-6t1Ir5CW.js").then((e) => e.n)),
|
|
31
31
|
showQrCode: j(() => import("./PkToolShowQrCode-DEAvfLFu.js").then((e) => e.n)),
|
|
32
|
-
showSources: j(() => import("./PkToolShowSources-
|
|
33
|
-
showSuggestedReply: j(() => import("./PkToolShowSuggestedReply-
|
|
32
|
+
showSources: j(() => import("./PkToolShowSources-cOF0ZxOj.js").then((e) => e.n)),
|
|
33
|
+
showSuggestedReply: j(() => import("./PkToolShowSuggestedReply-DA4NEjHB.js").then((e) => e.n)),
|
|
34
34
|
showVideo: j(() => import("./PkToolShowVideo-BZOTu2Qe.js")),
|
|
35
35
|
showWeather: j(() => import("./PkToolShowWeather-Bzqalzh8.js")),
|
|
36
|
-
showWebPages: j(() => import("./PkToolShowWebPages-
|
|
37
|
-
},
|
|
36
|
+
showWebPages: j(() => import("./PkToolShowWebPages-OgaT1vYJ.js").then((e) => e.n))
|
|
37
|
+
}, G = {
|
|
38
38
|
key: 0,
|
|
39
39
|
class: "text-12 text-word-3 m-0 mb-xs"
|
|
40
|
-
},
|
|
40
|
+
}, K = /* @__PURE__ */ M({
|
|
41
41
|
__name: "PkToolApprovalPreviewMessage",
|
|
42
42
|
props: { input: {} },
|
|
43
43
|
setup(e) {
|
|
@@ -45,12 +45,12 @@ var U = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), ye = (e) => e
|
|
|
45
45
|
let e = t.input;
|
|
46
46
|
return typeof e?.message == "string" ? e.message : "";
|
|
47
47
|
});
|
|
48
|
-
return (e, t) => n.value ? (
|
|
48
|
+
return (e, t) => n.value ? (L(), O("p", G, z(n.value), 1)) : D("", !0);
|
|
49
49
|
}
|
|
50
|
-
}),
|
|
50
|
+
}), Se = { [_]: K }, Ce = {
|
|
51
51
|
key: 0,
|
|
52
52
|
class: "text-12 text-word-3 m-0 mb-xs"
|
|
53
|
-
},
|
|
53
|
+
}, we = /* @__PURE__ */ M({
|
|
54
54
|
__name: "PkToolApprovalCard",
|
|
55
55
|
props: {
|
|
56
56
|
part: {},
|
|
@@ -59,7 +59,7 @@ var U = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), ye = (e) => e
|
|
|
59
59
|
},
|
|
60
60
|
emits: ["respond"],
|
|
61
61
|
setup(t, { emit: n }) {
|
|
62
|
-
let r = t, i = n, { t: o } =
|
|
62
|
+
let r = t, i = n, { t: o } = ge({ useScope: "global" }), s = T(() => r.part), c = T(() => a(r.part)), l = T(() => c.value === _), u = T(() => l.value ? (s.value.state === "input-available" || e(s.value.output)) && r.callVerdict === void 0 : s.value.state === "approval-requested"), d = T(() => u.value && r.actionable === !0), f = T(() => u.value && r.actionable !== !0), p = T(() => l.value ? s.value.output === "confirmed" || r.callVerdict === !0 : s.value.approval?.approved === !0), m = T(() => l.value ? s.value.output === "cancelled" || r.callVerdict === !1 : s.value.approval?.approved === !1 || s.value.state === "output-denied"), h = T(() => Se[c.value]), g = T(() => {
|
|
63
63
|
if (f.value) return {
|
|
64
64
|
icon: "ri:time-line",
|
|
65
65
|
message: o("toolApproval.expired")
|
|
@@ -74,37 +74,37 @@ var U = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), ye = (e) => e
|
|
|
74
74
|
};
|
|
75
75
|
}), ee = T(() => !!g.value && !h.value);
|
|
76
76
|
return (e, n) => {
|
|
77
|
-
let r =
|
|
78
|
-
return
|
|
77
|
+
let r = S, a = oe, c = se;
|
|
78
|
+
return L(), O("div", { class: P(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !ee.value }]) }, [
|
|
79
79
|
A(w, null, {
|
|
80
|
-
default:
|
|
80
|
+
default: H(() => [!l.value && u.value ? (L(), O("p", Ce, z(B(o)("toolApproval.prompt")), 1)) : D("", !0)]),
|
|
81
81
|
_: 1
|
|
82
82
|
}),
|
|
83
|
-
h.value ? (
|
|
83
|
+
h.value ? (L(), E(pe(h.value), {
|
|
84
84
|
key: 0,
|
|
85
85
|
part: t.part,
|
|
86
86
|
input: s.value.input
|
|
87
87
|
}, null, 8, ["part", "input"])) : D("", !0),
|
|
88
88
|
A(w, { mode: "out-in" }, {
|
|
89
|
-
default:
|
|
89
|
+
default: H(() => [g.value ? (L(), O("p", {
|
|
90
90
|
key: 1,
|
|
91
91
|
class: P(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": h.value }])
|
|
92
92
|
}, [A(c, {
|
|
93
93
|
name: g.value.icon,
|
|
94
94
|
class: "shrink-0"
|
|
95
|
-
}, null, 8, ["name"]),
|
|
96
|
-
default:
|
|
95
|
+
}, null, 8, ["name"]), ce(" " + z(g.value.message), 1)], 2)) : (L(), E(a, { key: 0 }, {
|
|
96
|
+
default: H(() => [A(r, {
|
|
97
97
|
modifiers: "primary-small",
|
|
98
98
|
disabled: !d.value,
|
|
99
99
|
icon: "ri:check-line",
|
|
100
|
-
label:
|
|
101
|
-
onClick: n[0] ||=
|
|
100
|
+
label: B(o)("action.proceed"),
|
|
101
|
+
onClick: n[0] ||= U((e) => i("respond", !0), ["stop"])
|
|
102
102
|
}, null, 8, ["disabled", "label"]), A(r, {
|
|
103
103
|
modifiers: "action-quiet-small",
|
|
104
104
|
disabled: !d.value,
|
|
105
105
|
icon: "ri:close-line",
|
|
106
|
-
label:
|
|
107
|
-
onClick: n[1] ||=
|
|
106
|
+
label: B(o)("action.cancel"),
|
|
107
|
+
onClick: n[1] ||= U((e) => i("respond", !1), ["stop"])
|
|
108
108
|
}, null, 8, ["disabled", "label"])]),
|
|
109
109
|
_: 1
|
|
110
110
|
}))]),
|
|
@@ -113,9 +113,9 @@ var U = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), ye = (e) => e
|
|
|
113
113
|
], 2);
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
-
}),
|
|
117
|
-
function
|
|
118
|
-
let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l =
|
|
116
|
+
}), Te = 30, Ee = 500;
|
|
117
|
+
function De(e) {
|
|
118
|
+
let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = R(!1), u = R(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, _ = (e = "smooth") => {
|
|
119
119
|
if (!t.value || l.value) {
|
|
120
120
|
d = !1;
|
|
121
121
|
return;
|
|
@@ -125,18 +125,18 @@ function Oe(e) {
|
|
|
125
125
|
behavior: e
|
|
126
126
|
}), setTimeout(() => {
|
|
127
127
|
d = !1;
|
|
128
|
-
}, e === "instant" ? 0 :
|
|
129
|
-
},
|
|
128
|
+
}, e === "instant" ? 0 : Ee);
|
|
129
|
+
}, ee = (e) => {
|
|
130
130
|
e.deltaY < 0 && (l.value = !0);
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
},
|
|
131
|
+
}, v = 0, te = (e) => {
|
|
132
|
+
v = e.touches[0]?.clientY ?? 0;
|
|
133
|
+
}, y = (e) => {
|
|
134
134
|
let t = e.touches[0]?.clientY ?? 0;
|
|
135
|
-
t >
|
|
136
|
-
},
|
|
135
|
+
t > v && (l.value = !0), v = t;
|
|
136
|
+
}, ne = () => {
|
|
137
137
|
if (!t.value) return;
|
|
138
138
|
let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
|
|
139
|
-
if (u.value = n - r - e <
|
|
139
|
+
if (u.value = n - r - e < Te, d) {
|
|
140
140
|
g = e;
|
|
141
141
|
return;
|
|
142
142
|
}
|
|
@@ -156,19 +156,19 @@ function Oe(e) {
|
|
|
156
156
|
}, ae = () => {
|
|
157
157
|
f?.disconnect(), f = null;
|
|
158
158
|
};
|
|
159
|
-
|
|
159
|
+
V(n, (e, t) => {
|
|
160
160
|
if (e === "streaming" || e === "submitted") {
|
|
161
161
|
ie();
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
164
|
(e !== "ready" || t !== "streaming") && ae();
|
|
165
|
-
}),
|
|
165
|
+
}), V(r, async () => {
|
|
166
166
|
if (r() && i() !== "assistant") {
|
|
167
167
|
S(), l.value = !1, d = !0;
|
|
168
168
|
try {
|
|
169
169
|
await N(), await o?.(), await N();
|
|
170
170
|
} finally {
|
|
171
|
-
|
|
171
|
+
_();
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
});
|
|
@@ -177,9 +177,9 @@ function Oe(e) {
|
|
|
177
177
|
}, S = () => {
|
|
178
178
|
p?.disconnect(), p = null, m?.disconnect(), m = null, b &&= (clearTimeout(b), null);
|
|
179
179
|
};
|
|
180
|
-
return
|
|
180
|
+
return ue(() => {
|
|
181
181
|
if (!t.value) return;
|
|
182
|
-
t.value.addEventListener("wheel",
|
|
182
|
+
t.value.addEventListener("wheel", ee, { passive: !0 }), t.value.addEventListener("touchstart", te, { passive: !0 }), t.value.addEventListener("touchmove", y, { passive: !0 });
|
|
183
183
|
let e = n() === "submitted" || n() === "streaming";
|
|
184
184
|
e ? ie() : (p = new ResizeObserver(x), p.observe(t.value), m = new MutationObserver(x), m.observe(t.value, {
|
|
185
185
|
childList: !0,
|
|
@@ -187,45 +187,45 @@ function Oe(e) {
|
|
|
187
187
|
}));
|
|
188
188
|
let r = a?.() ?? t.value.firstElementChild;
|
|
189
189
|
r && (h = new ResizeObserver(re), h.observe(r)), e || x();
|
|
190
|
-
}),
|
|
191
|
-
t.value?.removeEventListener("wheel",
|
|
190
|
+
}), I(() => {
|
|
191
|
+
t.value?.removeEventListener("wheel", ee), t.value?.removeEventListener("touchstart", te), t.value?.removeEventListener("touchmove", y), h?.disconnect(), h = null, ae(), S();
|
|
192
192
|
}), {
|
|
193
|
-
handleScroll:
|
|
194
|
-
scrollToBottom:
|
|
193
|
+
handleScroll: ne,
|
|
194
|
+
scrollToBottom: _,
|
|
195
195
|
userScrolledUp: l,
|
|
196
196
|
isAtBottom: u
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
199
|
//#endregion
|
|
200
200
|
//#region ../../packages/components/src/chat/PkChatbotMessages.vue?vue&type=script&setup=true&lang.ts
|
|
201
|
-
var
|
|
201
|
+
var Oe = ["aria-busy"], ke = {
|
|
202
202
|
key: 0,
|
|
203
203
|
class: "pk-chatbot-messages__outline"
|
|
204
|
-
},
|
|
204
|
+
}, Ae = {
|
|
205
205
|
key: 0,
|
|
206
206
|
class: "pk-chatbot-divider"
|
|
207
|
-
},
|
|
207
|
+
}, je = { class: "pk-chatbot-divider__label" }, Me = { class: "pk-chatbot-message__text" }, Ne = ["title"], Pe = {
|
|
208
208
|
key: 0,
|
|
209
209
|
class: "pk-chatbot-message__reaction-emoji"
|
|
210
|
-
},
|
|
210
|
+
}, Fe = {
|
|
211
211
|
key: 0,
|
|
212
212
|
class: "pk-chatbot-message__loading-info"
|
|
213
|
-
},
|
|
213
|
+
}, Ie = { class: "flex gap-8 items-center" }, Le = { class: "font-mono rounded text-12" }, Re = { class: "flex gap-8 items-center" }, ze = {
|
|
214
214
|
key: 0,
|
|
215
215
|
class: "pk-chatbot-message__footer"
|
|
216
|
-
},
|
|
216
|
+
}, Be = {
|
|
217
217
|
key: 0,
|
|
218
218
|
class: "pk-chatbot-message__hover-meta"
|
|
219
|
-
},
|
|
219
|
+
}, Ve = ["datetime", "title"], He = { class: "truncate" }, Ue = {
|
|
220
220
|
key: 0,
|
|
221
221
|
class: "flex items-center gap-4 min-w-0"
|
|
222
|
-
},
|
|
222
|
+
}, We = { class: "truncate" }, Ge = {
|
|
223
223
|
key: 1,
|
|
224
224
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
225
|
-
},
|
|
225
|
+
}, Ke = { class: "truncate" }, qe = ["datetime"], Je = { class: "truncate" }, Ye = {
|
|
226
226
|
key: 3,
|
|
227
227
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
228
|
-
},
|
|
228
|
+
}, Xe = { class: "pk-chatbot-message__loading-info" }, Ze = { class: "flex gap-8 items-center" }, Qe = { class: "text-12" }, $e = ["title", "aria-label"], et = /* @__PURE__ */ M({
|
|
229
229
|
__name: "PkChatbotMessages",
|
|
230
230
|
props: {
|
|
231
231
|
status: {},
|
|
@@ -269,8 +269,8 @@ var ke = ["aria-busy"], Ae = {
|
|
|
269
269
|
"confirm-respond"
|
|
270
270
|
],
|
|
271
271
|
setup(e, { emit: _ }) {
|
|
272
|
-
let j = e, M = _, { t:
|
|
273
|
-
if (
|
|
272
|
+
let j = e, M = _, { t: I, d: W, n: _e } = ge({ useScope: "global" }), ye = me(), be = (e, t) => {
|
|
273
|
+
if (y(e)) {
|
|
274
274
|
let n = e.toolCallId;
|
|
275
275
|
n && M("confirm-respond", {
|
|
276
276
|
toolCallId: n,
|
|
@@ -278,105 +278,105 @@ var ke = ["aria-busy"], Ae = {
|
|
|
278
278
|
});
|
|
279
279
|
return;
|
|
280
280
|
}
|
|
281
|
-
let n =
|
|
281
|
+
let n = d(e);
|
|
282
282
|
n && M("approval-respond", {
|
|
283
283
|
id: n,
|
|
284
284
|
approved: t
|
|
285
285
|
});
|
|
286
|
-
},
|
|
287
|
-
scrollEl:
|
|
286
|
+
}, G = he("scrollEl"), K = he("wrapperEl"), Se = T(() => te(j.textColor, j.mainColor)), { handleScroll: Ce, scrollToBottom: Te, userScrolledUp: Ee, isAtBottom: et } = De({
|
|
287
|
+
scrollEl: G,
|
|
288
288
|
status: () => j.status,
|
|
289
289
|
messagesLength: () => j.messages?.length,
|
|
290
290
|
lastMessageRole: () => j.messages?.[j.messages.length - 1]?.role,
|
|
291
|
-
contentEl: () =>
|
|
292
|
-
beforeNewMessageScroll: () =>
|
|
291
|
+
contentEl: () => K.value,
|
|
292
|
+
beforeNewMessageScroll: () => ct(),
|
|
293
293
|
onScrollUp: () => M("scroll-up"),
|
|
294
294
|
onScrollDown: () => M("scroll-down")
|
|
295
|
-
}),
|
|
296
|
-
|
|
295
|
+
}), tt = () => {
|
|
296
|
+
Ee.value = !1, Te();
|
|
297
297
|
}, q = T(() => (j.messages ?? []).filter((e) => e.role === "user").map((e) => ({
|
|
298
298
|
id: e.id,
|
|
299
299
|
preview: e.parts.find(o)?.text.trim().slice(0, 120) || "…"
|
|
300
|
-
}))),
|
|
301
|
-
let e =
|
|
300
|
+
}))), nt = R(), rt = () => G.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], it = () => {
|
|
301
|
+
let e = G.value;
|
|
302
302
|
if (!e || !j.showScrollToBottom) return;
|
|
303
303
|
let t = e.getBoundingClientRect().top + e.clientHeight / 2, n = q.value[0]?.id;
|
|
304
|
-
|
|
304
|
+
rt().forEach((e, r) => {
|
|
305
305
|
e.getBoundingClientRect().top <= t && (n = q.value[r]?.id);
|
|
306
|
-
}),
|
|
306
|
+
}), nt.value = n;
|
|
307
307
|
};
|
|
308
|
-
|
|
309
|
-
await N(),
|
|
308
|
+
V(q, async () => {
|
|
309
|
+
await N(), it();
|
|
310
310
|
});
|
|
311
|
-
let
|
|
312
|
-
|
|
313
|
-
},
|
|
314
|
-
let t =
|
|
315
|
-
t && r && (
|
|
311
|
+
let at = () => {
|
|
312
|
+
Ce(), it();
|
|
313
|
+
}, ot = (e) => {
|
|
314
|
+
let t = G.value, n = q.value.findIndex((t) => t.id === e), r = rt()[n];
|
|
315
|
+
t && r && (Ee.value = !0, t.scrollTo({
|
|
316
316
|
top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
|
|
317
317
|
behavior: "smooth"
|
|
318
318
|
}));
|
|
319
|
-
}, J =
|
|
319
|
+
}, J = R(0), st = R(!1), ct = async () => {
|
|
320
320
|
let e = j.messages;
|
|
321
|
-
if (!e?.length || j.disableHeightAdjustment || e[e.length - 1].role !== "user" && j.status !== "submitted" && j.status !== "streaming" || (
|
|
322
|
-
let { paddingTop: t, paddingBottom: n } = getComputedStyle(
|
|
321
|
+
if (!e?.length || j.disableHeightAdjustment || e[e.length - 1].role !== "user" && j.status !== "submitted" && j.status !== "streaming" || (st.value = !1, await N(), !G.value)) return;
|
|
322
|
+
let { paddingTop: t, paddingBottom: n } = getComputedStyle(G.value), r = G.value.clientHeight - Number.parseFloat(t) - Number.parseFloat(n), i = K.value && Number.parseFloat(getComputedStyle(K.value).rowGap) || 0, a = rt(), o = r - (a[a.length - 1]?.clientHeight ?? 0) - i;
|
|
323
323
|
r > 0 && (J.value = Math.max(o, 0)), await N();
|
|
324
324
|
};
|
|
325
|
-
|
|
326
|
-
(j.status === "submitted" || j.status === "streaming" || j.awaitingSpokenAnswer) &&
|
|
327
|
-
}),
|
|
328
|
-
(e === "ready" || e === "error") && (
|
|
325
|
+
V(() => [j.messages?.length, j.messages?.[j.messages.length - 1]?.id], () => ct()), ue(() => {
|
|
326
|
+
(j.status === "submitted" || j.status === "streaming" || j.awaitingSpokenAnswer) && ct();
|
|
327
|
+
}), V(() => j.status, (e) => {
|
|
328
|
+
(e === "ready" || e === "error") && (st.value = !0, J.value = 0);
|
|
329
329
|
});
|
|
330
|
-
let
|
|
331
|
-
let t =
|
|
330
|
+
let lt = (e) => j.revisedAnswers?.some((t) => t.messageId === e), Y = (e) => j.messageFeedbacks?.find((t) => t.messageId === e), ut = (e, t) => !j.readonlyFeedback && Ot(e, t), dt = (e) => j.readonlyFeedback ? Y(e) : void 0, ft = (e) => dt(e)?.vote, pt = (e) => {
|
|
331
|
+
let t = dt(e);
|
|
332
332
|
if (t?.vote) return;
|
|
333
333
|
let n = t?.metadata?.reactionEmoji;
|
|
334
334
|
return typeof n == "string" && /\p{Extended_Pictographic}/u.test(n) ? n : void 0;
|
|
335
|
-
},
|
|
336
|
-
if (
|
|
337
|
-
let t =
|
|
335
|
+
}, mt = (e) => !!(ft(e) || pt(e)), ht = (e) => {
|
|
336
|
+
if (pt(e)) return "pk-chatbot-message__reaction--neutral";
|
|
337
|
+
let t = ft(e);
|
|
338
338
|
return t === "upvote" ? "pk-chatbot-message__reaction--positive" : t === "downvote" ? "pk-chatbot-message__reaction--negative" : "pk-chatbot-message__reaction--neutral";
|
|
339
|
+
}, gt = (e) => {
|
|
340
|
+
let t = ft(e);
|
|
341
|
+
return I(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
|
|
339
342
|
}, _t = (e) => {
|
|
340
|
-
let t =
|
|
341
|
-
return F(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
|
|
342
|
-
}, vt = (e) => {
|
|
343
|
-
let t = xt(e);
|
|
343
|
+
let t = bt(e);
|
|
344
344
|
for (let e = t.length - 1; e >= 0; --e) if (o(t[e])) return e;
|
|
345
345
|
return -1;
|
|
346
|
-
},
|
|
347
|
-
let e =
|
|
346
|
+
}, vt = T(() => j.messages?.[j.messages.length - 1]), X = T(() => {
|
|
347
|
+
let e = vt.value;
|
|
348
348
|
return e ? e.parts[e.parts.length - 1] : null;
|
|
349
|
-
}),
|
|
349
|
+
}), yt = T(() => {
|
|
350
350
|
let e = /* @__PURE__ */ new Map();
|
|
351
|
-
for (let t of j.messages ?? []) t.role === "assistant" && e.set(t.id,
|
|
351
|
+
for (let t of j.messages ?? []) t.role === "assistant" && e.set(t.id, u(t.parts));
|
|
352
352
|
return e;
|
|
353
|
-
}),
|
|
353
|
+
}), bt = (e) => yt.value.get(e.id) ?? e.parts, Z = T(() => j.status === "submitted" || j.status === "streaming"), xt = T(() => j.status === "error"), St = T(() => j.awaitingSpokenAnswer === !0 && !Z.value), Ct = T(() => St.value && vt.value?.role === "user" && !xt.value), wt = T(() => {
|
|
354
354
|
let e = X.value;
|
|
355
|
-
return
|
|
356
|
-
}),
|
|
355
|
+
return f(I, e);
|
|
356
|
+
}), Tt = T(() => {
|
|
357
357
|
let e = X.value;
|
|
358
|
-
return
|
|
359
|
-
}),
|
|
358
|
+
return m(e);
|
|
359
|
+
}), Et = (e) => j.messages?.findIndex((t) => t.id === e), Q = (e) => e === void 0 || !j.messages ? !1 : e === j.messages.length - 1, Dt = (e) => Q(e) && j.status === "ready" && !!j.actions?.includes("regenerate"), Ot = (e, t) => (!Q(t) || j.status === "ready") && !!j.actions?.includes(e), kt = (e) => {
|
|
360
360
|
let t = e.parts[e.parts.length - 1];
|
|
361
361
|
return o(t);
|
|
362
|
-
},
|
|
363
|
-
let t =
|
|
362
|
+
}, At = (e) => e.parts.some((e) => i(e) || r(e)), jt = (e) => !!j.showExtendedSteps && $(e) && At(e), $ = (e) => e.role === "assistant", Mt = (e) => e.role === "user", Nt = (e) => j.messages?.slice(0, e).reverse().find((e) => $(e)), Pt = (e) => j.messages?.slice(e + 1).find((e) => $(e)), Ft = (e) => {
|
|
363
|
+
let t = Nt(e)?.metadata?.createdAt, n = Pt(e)?.metadata?.createdAt;
|
|
364
364
|
if (!t || !n) return;
|
|
365
365
|
let r = new Date(t), i = new Date(n);
|
|
366
366
|
return r.toDateString() === i.toDateString() ? void 0 : i;
|
|
367
|
-
},
|
|
367
|
+
}, It = (e, t) => t === 0 || e.role !== "assistant" ? !1 : !!(j.actions?.length || j.showMessageDateTime && e.metadata?.createdAt !== void 0 || e.metadata?.completedAt !== void 0 || j.showMessageTokensCount && e.metadata?.totalTokens !== void 0), Lt = (e) => {
|
|
368
368
|
let t = new Date(e), n = t.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
369
|
-
return
|
|
370
|
-
},
|
|
369
|
+
return W(t, n ? "time" : "date-time");
|
|
370
|
+
}, Rt = (e) => {
|
|
371
371
|
let { createdAt: t, completedAt: n } = e.metadata ?? {};
|
|
372
|
-
if (t && n) return
|
|
373
|
-
},
|
|
374
|
-
return
|
|
372
|
+
if (t && n) return g(_e, n - t);
|
|
373
|
+
}, zt = he("feedbackMessageEl");
|
|
374
|
+
return V(() => j.feedbackMessageId, async () => {
|
|
375
375
|
if (await N(), !j.feedbackMessageId) return;
|
|
376
|
-
let e =
|
|
376
|
+
let e = zt.value?.[0]?.$el;
|
|
377
377
|
if (e) {
|
|
378
|
-
if (Q(
|
|
379
|
-
|
|
378
|
+
if (Q(Et(j.feedbackMessageId))) {
|
|
379
|
+
Te();
|
|
380
380
|
return;
|
|
381
381
|
}
|
|
382
382
|
e.scrollIntoView({
|
|
@@ -384,94 +384,92 @@ var ke = ["aria-busy"], Ae = {
|
|
|
384
384
|
block: "center"
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
}), (
|
|
388
|
-
let
|
|
389
|
-
return
|
|
387
|
+
}), (i, u) => {
|
|
388
|
+
let d = se, f = S, g = oe;
|
|
389
|
+
return L(), O("div", {
|
|
390
390
|
ref_key: "scrollEl",
|
|
391
|
-
ref:
|
|
392
|
-
class: P(["pk-chatbot-messages", { "pk-chatbot-messages--settling":
|
|
391
|
+
ref: G,
|
|
392
|
+
class: P(["pk-chatbot-messages", { "pk-chatbot-messages--settling": st.value }]),
|
|
393
393
|
role: "log",
|
|
394
394
|
"aria-live": "polite",
|
|
395
395
|
"aria-relevant": "additions text",
|
|
396
396
|
"aria-busy": Z.value,
|
|
397
|
-
style:
|
|
397
|
+
style: F({
|
|
398
398
|
"--chatbot-main-color": e.mainColor,
|
|
399
|
-
"--chatbot-contrast-color":
|
|
399
|
+
"--chatbot-contrast-color": Se.value
|
|
400
400
|
}),
|
|
401
|
-
onScroll:
|
|
401
|
+
onScroll: at
|
|
402
402
|
}, [
|
|
403
|
-
e.showScrollToBottom && q.value.length > 1 ? (
|
|
403
|
+
e.showScrollToBottom && q.value.length > 1 ? (L(), O("div", ke, [A(x, {
|
|
404
404
|
items: q.value,
|
|
405
|
-
"active-id":
|
|
406
|
-
onSelect:
|
|
405
|
+
"active-id": nt.value,
|
|
406
|
+
onSelect: ot
|
|
407
407
|
}, null, 8, ["items", "active-id"])])) : D("", !0),
|
|
408
408
|
k("div", {
|
|
409
409
|
ref_key: "wrapperEl",
|
|
410
|
-
ref:
|
|
410
|
+
ref: K,
|
|
411
411
|
class: "pk-chatbot-messages__wrapper"
|
|
412
412
|
}, [
|
|
413
|
-
(
|
|
413
|
+
(L(!0), O(C, null, de(e.messages, (c, _) => (L(), O(C, { key: c.id }, [Mt(c) && Ft(_) ? (L(), O("div", Ae, [k("span", je, z(B(W)(Ft(_), "short")), 1)])) : D("", !0), c.parts.length || Q(_) && Z.value && $(c) ? (L(), O("div", {
|
|
414
414
|
key: 1,
|
|
415
|
-
class: P(["pk-chatbot-message", [`pk-chatbot-message--${c.role}`, { "pk-chatbot-message--loading": Z.value && Q(
|
|
416
|
-
style:
|
|
415
|
+
class: P(["pk-chatbot-message", [`pk-chatbot-message--${c.role}`, { "pk-chatbot-message--loading": Z.value && Q(_) && $(c) }]]),
|
|
416
|
+
style: F({ minHeight: Q(_) && $(c) && !xt.value ? `${J.value}px` : void 0 })
|
|
417
417
|
}, [
|
|
418
418
|
A(w, {
|
|
419
419
|
appear: "",
|
|
420
420
|
name: "pk-chatbot-part"
|
|
421
421
|
}, {
|
|
422
|
-
default:
|
|
422
|
+
default: H(() => [jt(c) ? (L(), E(b, {
|
|
423
423
|
key: 0,
|
|
424
424
|
message: c,
|
|
425
|
-
"is-streaming": Z.value && Q(
|
|
426
|
-
"has-content": Pt(c),
|
|
425
|
+
"is-streaming": Z.value && Q(_),
|
|
427
426
|
"is-dark": e.isDark
|
|
428
427
|
}, null, 8, [
|
|
429
428
|
"message",
|
|
430
429
|
"is-streaming",
|
|
431
|
-
"has-content",
|
|
432
430
|
"is-dark"
|
|
433
431
|
])) : D("", !0)]),
|
|
434
432
|
_: 2
|
|
435
433
|
}, 1024),
|
|
436
|
-
(
|
|
434
|
+
(L(!0), O(C, null, de(bt(c), (l, u) => (L(), O(C, { key: u }, [B(o)(l) && l.text.trim() ? (L(), E(w, {
|
|
437
435
|
key: 0,
|
|
438
436
|
appear: "",
|
|
439
437
|
name: "pk-chatbot-part"
|
|
440
438
|
}, {
|
|
441
|
-
default:
|
|
439
|
+
default: H(() => [k("div", Me, [fe(i.$slots, "text", le({ ref_for: !0 }, {
|
|
442
440
|
message: c,
|
|
443
|
-
part:
|
|
444
|
-
index:
|
|
441
|
+
part: l,
|
|
442
|
+
index: _,
|
|
445
443
|
isLoading: Z.value
|
|
446
|
-
}), () => [$(c) ? (
|
|
444
|
+
}), () => [$(c) ? (L(), E(t, {
|
|
447
445
|
key: 0,
|
|
448
446
|
class: "wysiwyg",
|
|
449
|
-
markdown:
|
|
447
|
+
markdown: l.text,
|
|
450
448
|
"is-dark": e.isDark,
|
|
451
|
-
loading: Q(
|
|
449
|
+
loading: Q(_) && e.status === "streaming"
|
|
452
450
|
}, null, 8, [
|
|
453
451
|
"markdown",
|
|
454
452
|
"is-dark",
|
|
455
453
|
"loading"
|
|
456
|
-
])) : (
|
|
454
|
+
])) : (L(), O(C, { key: 1 }, [ce(z(l.text), 1)], 64))]), mt(c.id) && !Y(c.id)?.comment && u === _t(c) ? (L(), O("span", {
|
|
457
455
|
key: 0,
|
|
458
|
-
class: P(["pk-chatbot-message__reaction",
|
|
459
|
-
title:
|
|
460
|
-
}, [
|
|
456
|
+
class: P(["pk-chatbot-message__reaction", ht(c.id)]),
|
|
457
|
+
title: gt(c.id)
|
|
458
|
+
}, [pt(c.id) ? (L(), O("span", Pe, z(pt(c.id)), 1)) : (L(), E(d, {
|
|
461
459
|
key: 1,
|
|
462
|
-
name:
|
|
463
|
-
}, null, 8, ["name"]))], 10,
|
|
460
|
+
name: ft(c.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
|
|
461
|
+
}, null, 8, ["name"]))], 10, Ne)) : D("", !0)])]),
|
|
464
462
|
_: 2
|
|
465
|
-
}, 1024)) :
|
|
463
|
+
}, 1024)) : B(n)(l) ? (L(), E(w, {
|
|
466
464
|
key: 1,
|
|
467
465
|
appear: "",
|
|
468
466
|
name: "pk-chatbot-part"
|
|
469
467
|
}, {
|
|
470
|
-
default:
|
|
471
|
-
"media-type":
|
|
472
|
-
url:
|
|
473
|
-
filename:
|
|
474
|
-
size:
|
|
468
|
+
default: H(() => [A(ne, {
|
|
469
|
+
"media-type": l.mediaType,
|
|
470
|
+
url: l.url,
|
|
471
|
+
filename: l.filename,
|
|
472
|
+
size: B(s)(l)?.bytesCount
|
|
475
473
|
}, null, 8, [
|
|
476
474
|
"media-type",
|
|
477
475
|
"url",
|
|
@@ -479,17 +477,17 @@ var ke = ["aria-busy"], Ae = {
|
|
|
479
477
|
"size"
|
|
480
478
|
])]),
|
|
481
479
|
_: 2
|
|
482
|
-
}, 1024)) :
|
|
480
|
+
}, 1024)) : B(p)(l) && !B(v)(l) ? (L(), E(w, {
|
|
483
481
|
key: 2,
|
|
484
482
|
appear: "",
|
|
485
483
|
name: "pk-chatbot-part"
|
|
486
484
|
}, {
|
|
487
|
-
default:
|
|
488
|
-
key: `approval-${
|
|
489
|
-
part:
|
|
490
|
-
actionable: e.interactive === !0 && (
|
|
491
|
-
"call-verdict": e.confirmVerdictsOnCall?.get(
|
|
492
|
-
onRespond: (e) =>
|
|
485
|
+
default: H(() => [(L(), E(we, {
|
|
486
|
+
key: `approval-${u}`,
|
|
487
|
+
part: l,
|
|
488
|
+
actionable: e.interactive === !0 && (B(y)(l) || Q(_)),
|
|
489
|
+
"call-verdict": e.confirmVerdictsOnCall?.get(l.toolCallId ?? ""),
|
|
490
|
+
onRespond: (e) => be(l, e)
|
|
493
491
|
}, null, 8, [
|
|
494
492
|
"part",
|
|
495
493
|
"actionable",
|
|
@@ -497,27 +495,27 @@ var ke = ["aria-busy"], Ae = {
|
|
|
497
495
|
"onRespond"
|
|
498
496
|
]))]),
|
|
499
497
|
_: 2
|
|
500
|
-
}, 1024)) :
|
|
498
|
+
}, 1024)) : B(r)(l) && !B(v)(l) && (B(xe)[B(a)(l)] || B(ye)[l.type] || e.showAllMessageParts) ? (L(), E(w, {
|
|
501
499
|
key: 3,
|
|
502
500
|
appear: "",
|
|
503
501
|
name: "pk-chatbot-part"
|
|
504
502
|
}, {
|
|
505
|
-
default:
|
|
506
|
-
key: `component-${
|
|
507
|
-
part:
|
|
508
|
-
}, null, 8, ["part"])) :
|
|
503
|
+
default: H(() => [!B(ye)[l.type] && B(xe)[B(a)(l)] ? (L(), E(pe(B(xe)[B(a)(l)]), {
|
|
504
|
+
key: `component-${u}-${B(ee)(l)}`,
|
|
505
|
+
part: l
|
|
506
|
+
}, null, 8, ["part"])) : fe(i.$slots, l.type, le({ ref_for: !0 }, {
|
|
509
507
|
message: c,
|
|
510
|
-
part:
|
|
511
|
-
index:
|
|
508
|
+
part: l,
|
|
509
|
+
index: _,
|
|
512
510
|
isLoading: Z.value
|
|
513
|
-
}), () => [e.showAllMessageParts ? (
|
|
511
|
+
}), () => [e.showAllMessageParts ? (L(), O("div", Fe, [k("div", Ie, [B(m)(l) ? (L(), E(d, {
|
|
514
512
|
key: 0,
|
|
515
|
-
name:
|
|
513
|
+
name: B(m)(l),
|
|
516
514
|
class: "shrink-0"
|
|
517
|
-
}, null, 8, ["name"])) : D("", !0), k("code",
|
|
515
|
+
}, null, 8, ["name"])) : D("", !0), k("code", Le, z(B(ve)(l.type)), 1)])])) : D("", !0)], void 0, 1)]),
|
|
518
516
|
_: 2
|
|
519
517
|
}, 1024)) : D("", !0), A(w, { mode: "out-in" }, {
|
|
520
|
-
default:
|
|
518
|
+
default: H(() => [u === _t(c) && e.readonlyFeedback && Y(c.id)?.comment ? (L(), E(ie, {
|
|
521
519
|
key: 0,
|
|
522
520
|
feedback: Y(c.id)
|
|
523
521
|
}, null, 8, ["feedback"])) : D("", !0)]),
|
|
@@ -527,38 +525,38 @@ var ke = ["aria-busy"], Ae = {
|
|
|
527
525
|
name: "fade-in",
|
|
528
526
|
mode: "out-in"
|
|
529
527
|
}, {
|
|
530
|
-
default:
|
|
528
|
+
default: H(() => [Z.value && Q(_) && !kt(c) && $(c) && !jt(c) ? (L(), O("div", {
|
|
531
529
|
key: `loading-info-${c.id}`,
|
|
532
530
|
class: "pk-chatbot-message__loading-info"
|
|
533
|
-
}, [k("div",
|
|
534
|
-
A(
|
|
531
|
+
}, [k("div", Re, [
|
|
532
|
+
A(d, {
|
|
535
533
|
name: "loading-loop",
|
|
536
534
|
class: "shrink-0"
|
|
537
535
|
}),
|
|
538
536
|
A(w, { mode: "out-in" }, {
|
|
539
|
-
default:
|
|
540
|
-
key:
|
|
537
|
+
default: H(() => [Tt.value ? (L(), E(d, {
|
|
538
|
+
key: Tt.value,
|
|
541
539
|
class: "shrink-0",
|
|
542
|
-
name:
|
|
540
|
+
name: Tt.value
|
|
543
541
|
}, null, 8, ["name"])) : D("", !0)]),
|
|
544
542
|
_: 1
|
|
545
543
|
}),
|
|
546
544
|
A(w, { mode: "out-in" }, {
|
|
547
|
-
default:
|
|
548
|
-
key:
|
|
545
|
+
default: H(() => [wt.value ? (L(), O("span", {
|
|
546
|
+
key: wt.value,
|
|
549
547
|
class: "text-12"
|
|
550
|
-
},
|
|
548
|
+
}, z(wt.value), 1)) : D("", !0)]),
|
|
551
549
|
_: 1
|
|
552
550
|
})
|
|
553
551
|
]), A(w, {
|
|
554
552
|
name: "fade-in",
|
|
555
553
|
mode: "out-in"
|
|
556
554
|
}, {
|
|
557
|
-
default:
|
|
555
|
+
default: H(() => [X.value && "text" in X.value && X.value.text.trim() ? (L(), E(ae, {
|
|
558
556
|
key: 0,
|
|
559
557
|
markdown: X.value.text,
|
|
560
558
|
"is-dark": e.isDark,
|
|
561
|
-
"tail-length":
|
|
559
|
+
"tail-length": B(h),
|
|
562
560
|
"inner-class": "wysiwyg",
|
|
563
561
|
class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
|
|
564
562
|
}, null, 8, [
|
|
@@ -566,36 +564,36 @@ var ke = ["aria-busy"], Ae = {
|
|
|
566
564
|
"is-dark",
|
|
567
565
|
"tail-length"
|
|
568
566
|
])) : D("", !0)]),
|
|
569
|
-
_:
|
|
570
|
-
}
|
|
567
|
+
_: 1
|
|
568
|
+
})])) : D("", !0)]),
|
|
571
569
|
_: 2
|
|
572
570
|
}, 1024),
|
|
573
571
|
A(w, { mode: "out-in" }, {
|
|
574
|
-
default:
|
|
575
|
-
A(
|
|
572
|
+
default: H(() => [It(c, _) ? (L(), O("div", ze, [
|
|
573
|
+
A(g, {
|
|
576
574
|
modifiers: "compact",
|
|
577
575
|
class: "mr-auto shrink-0"
|
|
578
576
|
}, {
|
|
579
|
-
default:
|
|
577
|
+
default: H(() => [
|
|
580
578
|
A(w, { mode: "out-in" }, {
|
|
581
|
-
default:
|
|
579
|
+
default: H(() => [Dt(_) ? (L(), E(f, {
|
|
582
580
|
key: 0,
|
|
583
581
|
icon: "ri:reset-right-line",
|
|
584
582
|
modifiers: "action-quiet-small",
|
|
585
|
-
title:
|
|
586
|
-
"aria-label":
|
|
587
|
-
onClick:
|
|
583
|
+
title: B(I)("action.regenerate"),
|
|
584
|
+
"aria-label": B(I)("action.regenerate"),
|
|
585
|
+
onClick: u[0] ||= U((e) => i.$emit("regenerate"), ["stop"])
|
|
588
586
|
}, null, 8, ["title", "aria-label"])) : D("", !0)]),
|
|
589
587
|
_: 2
|
|
590
588
|
}, 1024),
|
|
591
589
|
A(w, { mode: "out-in" }, {
|
|
592
|
-
default:
|
|
590
|
+
default: H(() => [Ot("show-info", _) ? (L(), E(f, {
|
|
593
591
|
key: 0,
|
|
594
592
|
icon: "ri:information-line",
|
|
595
|
-
title:
|
|
596
|
-
"aria-label":
|
|
593
|
+
title: B(I)("action.getMoreInfo"),
|
|
594
|
+
"aria-label": B(I)("action.getMoreInfo"),
|
|
597
595
|
modifiers: "action-quiet-small",
|
|
598
|
-
onClick:
|
|
596
|
+
onClick: U((e) => i.$emit("show-info", c), ["stop"])
|
|
599
597
|
}, null, 8, [
|
|
600
598
|
"title",
|
|
601
599
|
"aria-label",
|
|
@@ -604,14 +602,14 @@ var ke = ["aria-busy"], Ae = {
|
|
|
604
602
|
_: 2
|
|
605
603
|
}, 1024),
|
|
606
604
|
A(w, { mode: "out-in" }, {
|
|
607
|
-
default:
|
|
605
|
+
default: H(() => [Ot("revise", _) ? (L(), E(f, {
|
|
608
606
|
key: 0,
|
|
609
|
-
icon:
|
|
610
|
-
title:
|
|
611
|
-
"aria-label":
|
|
607
|
+
icon: lt(c.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
|
|
608
|
+
title: lt(c.id) ? B(I)("action.editRevise") : B(I)("action.createRevise"),
|
|
609
|
+
"aria-label": lt(c.id) ? B(I)("action.editRevise") : B(I)("action.createRevise"),
|
|
612
610
|
modifiers: "action-quiet-small",
|
|
613
|
-
class: P({ "text-brand":
|
|
614
|
-
onClick:
|
|
611
|
+
class: P({ "text-brand": lt(c.id) }),
|
|
612
|
+
onClick: U((e) => i.$emit("revise", c), ["stop"])
|
|
615
613
|
}, null, 8, [
|
|
616
614
|
"icon",
|
|
617
615
|
"title",
|
|
@@ -622,13 +620,13 @@ var ke = ["aria-busy"], Ae = {
|
|
|
622
620
|
_: 2
|
|
623
621
|
}, 1024),
|
|
624
622
|
A(w, { mode: "out-in" }, {
|
|
625
|
-
default:
|
|
623
|
+
default: H(() => [ut("upvote", _) ? (L(), E(f, {
|
|
626
624
|
key: 0,
|
|
627
625
|
icon: Y(c.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
|
|
628
|
-
title:
|
|
629
|
-
"aria-label":
|
|
626
|
+
title: B(I)("action.upvote"),
|
|
627
|
+
"aria-label": B(I)("action.upvote"),
|
|
630
628
|
modifiers: "action-quiet-small",
|
|
631
|
-
onClick:
|
|
629
|
+
onClick: U((e) => i.$emit("upvote", c), ["stop"])
|
|
632
630
|
}, null, 8, [
|
|
633
631
|
"icon",
|
|
634
632
|
"title",
|
|
@@ -638,13 +636,13 @@ var ke = ["aria-busy"], Ae = {
|
|
|
638
636
|
_: 2
|
|
639
637
|
}, 1024),
|
|
640
638
|
A(w, { mode: "out-in" }, {
|
|
641
|
-
default:
|
|
639
|
+
default: H(() => [ut("downvote", _) ? (L(), E(f, {
|
|
642
640
|
key: 0,
|
|
643
641
|
icon: Y(c.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
|
|
644
|
-
title:
|
|
645
|
-
"aria-label":
|
|
642
|
+
title: B(I)("action.downvote"),
|
|
643
|
+
"aria-label": B(I)("action.downvote"),
|
|
646
644
|
modifiers: "action-quiet-small",
|
|
647
|
-
onClick:
|
|
645
|
+
onClick: U((e) => i.$emit("downvote", c), ["stop"])
|
|
648
646
|
}, null, 8, [
|
|
649
647
|
"icon",
|
|
650
648
|
"title",
|
|
@@ -654,13 +652,13 @@ var ke = ["aria-busy"], Ae = {
|
|
|
654
652
|
_: 2
|
|
655
653
|
}, 1024),
|
|
656
654
|
A(w, { mode: "out-in" }, {
|
|
657
|
-
default:
|
|
655
|
+
default: H(() => [ut("feedback", _) ? (L(), E(f, {
|
|
658
656
|
key: 0,
|
|
659
657
|
icon: Y(c.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
|
|
660
|
-
title:
|
|
661
|
-
"aria-label":
|
|
658
|
+
title: B(I)("action.feedback"),
|
|
659
|
+
"aria-label": B(I)("action.feedback"),
|
|
662
660
|
modifiers: "action-quiet-small",
|
|
663
|
-
onClick:
|
|
661
|
+
onClick: U((e) => i.$emit("feedback", c), ["stop"])
|
|
664
662
|
}, null, 8, [
|
|
665
663
|
"icon",
|
|
666
664
|
"title",
|
|
@@ -672,30 +670,30 @@ var ke = ["aria-busy"], Ae = {
|
|
|
672
670
|
]),
|
|
673
671
|
_: 2
|
|
674
672
|
}, 1024),
|
|
675
|
-
!e.showMessageDateTime && c.metadata?.createdAt && c.metadata?.completedAt ? (
|
|
673
|
+
!e.showMessageDateTime && c.metadata?.createdAt && c.metadata?.completedAt ? (L(), O("div", Be, [k("time", {
|
|
676
674
|
datetime: new Date(c.metadata.createdAt).toISOString(),
|
|
677
|
-
title:
|
|
675
|
+
title: B(W)(new Date(c.metadata.createdAt), "date-time"),
|
|
678
676
|
class: "flex items-center gap-4 min-w-0"
|
|
679
|
-
}, [A(
|
|
677
|
+
}, [A(d, {
|
|
680
678
|
name: "ri:time-line",
|
|
681
679
|
class: "shrink-0"
|
|
682
|
-
}), k("span",
|
|
680
|
+
}), k("span", He, z(Lt(c.metadata.createdAt)), 1)], 8, Ve), Rt(c) ? (L(), O("span", Ue, [A(d, {
|
|
683
681
|
name: "ri:hourglass-line",
|
|
684
682
|
class: "shrink-0"
|
|
685
|
-
}), k("span",
|
|
686
|
-
e.showMessageTokensCount && c.metadata?.totalTokens ? (
|
|
683
|
+
}), k("span", We, z(Rt(c)), 1)])) : D("", !0)])) : D("", !0),
|
|
684
|
+
e.showMessageTokensCount && c.metadata?.totalTokens ? (L(), O("span", Ge, [A(d, {
|
|
687
685
|
name: "ri:ai-generate-2-line",
|
|
688
686
|
class: "shrink-0"
|
|
689
|
-
}), k("span",
|
|
690
|
-
e.showMessageDateTime && c.metadata?.createdAt ? (
|
|
687
|
+
}), k("span", Ke, z(B(_e)(c.metadata.totalTokens, "integer")) + " " + z(B(I)("label.tokens")), 1)])) : D("", !0),
|
|
688
|
+
e.showMessageDateTime && c.metadata?.createdAt ? (L(), O("time", {
|
|
691
689
|
key: 2,
|
|
692
690
|
datetime: new Date(c.metadata?.createdAt).toISOString(),
|
|
693
691
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
694
|
-
}, [A(
|
|
692
|
+
}, [A(d, {
|
|
695
693
|
name: "ri:time-line",
|
|
696
694
|
class: "shrink-0"
|
|
697
|
-
}), k("span",
|
|
698
|
-
e.showMessageDateTime && c?.metadata?.completedAt && c?.metadata?.createdAt ? (
|
|
695
|
+
}), k("span", Je, z(B(W)(new Date(c.metadata?.createdAt), "date-time")), 1)], 8, qe)) : D("", !0),
|
|
696
|
+
e.showMessageDateTime && c?.metadata?.completedAt && c?.metadata?.createdAt ? (L(), O("div", Ye, [A(d, {
|
|
699
697
|
name: "ri:hourglass-line",
|
|
700
698
|
class: "shrink-0"
|
|
701
699
|
}), A(l, {
|
|
@@ -707,16 +705,16 @@ var ke = ["aria-busy"], Ae = {
|
|
|
707
705
|
_: 2
|
|
708
706
|
}, 1024),
|
|
709
707
|
A(w, { mode: "out-in" }, {
|
|
710
|
-
default:
|
|
708
|
+
default: H(() => [c.id === e.feedbackMessageId ? (L(), E(re, {
|
|
711
709
|
key: 0,
|
|
712
710
|
ref_for: !0,
|
|
713
711
|
ref_key: "feedbackMessageEl",
|
|
714
|
-
ref:
|
|
712
|
+
ref: zt,
|
|
715
713
|
loading: e.feedbackLoading,
|
|
716
714
|
submitted: e.feedbackSubmitted,
|
|
717
715
|
error: e.feedbackError,
|
|
718
|
-
onSubmit:
|
|
719
|
-
onClose:
|
|
716
|
+
onSubmit: u[1] ||= (e) => i.$emit("feedback-submit", e),
|
|
717
|
+
onClose: u[2] ||= (e) => i.$emit("feedback-close")
|
|
720
718
|
}, null, 8, [
|
|
721
719
|
"loading",
|
|
722
720
|
"submitted",
|
|
@@ -729,50 +727,50 @@ var ke = ["aria-busy"], Ae = {
|
|
|
729
727
|
appear: "",
|
|
730
728
|
name: "pk-chatbot-part"
|
|
731
729
|
}, {
|
|
732
|
-
default:
|
|
730
|
+
default: H(() => [St.value ? (L(), O("div", {
|
|
733
731
|
key: 0,
|
|
734
732
|
class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
|
|
735
|
-
style:
|
|
736
|
-
}, [k("div",
|
|
733
|
+
style: F({ minHeight: Ct.value ? `${J.value}px` : void 0 })
|
|
734
|
+
}, [k("div", Xe, [k("div", Ze, [A(d, {
|
|
737
735
|
name: "loading-loop",
|
|
738
736
|
class: "shrink-0"
|
|
739
|
-
}), k("span",
|
|
737
|
+
}), k("span", Qe, z(B(I)("label.answeringOnTheCall")), 1)])])], 4)) : D("", !0)]),
|
|
740
738
|
_: 1
|
|
741
739
|
}),
|
|
742
740
|
A(w, {
|
|
743
741
|
appear: "",
|
|
744
742
|
name: "pk-chatbot-part"
|
|
745
743
|
}, {
|
|
746
|
-
default:
|
|
744
|
+
default: H(() => [xt.value ? (L(), E(c, {
|
|
747
745
|
key: 0,
|
|
748
746
|
error: e.error,
|
|
749
|
-
onRetry:
|
|
750
|
-
onReset:
|
|
747
|
+
onRetry: u[3] ||= (e) => i.$emit("auto-retry"),
|
|
748
|
+
onReset: u[4] ||= (e) => i.$emit("reset-chat")
|
|
751
749
|
}, null, 8, ["error"])) : D("", !0)]),
|
|
752
750
|
_: 1
|
|
753
751
|
}),
|
|
754
|
-
|
|
752
|
+
vt.value?.role === "user" && !Ct.value || xt.value ? (L(), O("div", {
|
|
755
753
|
key: 0,
|
|
756
754
|
class: "pk-chatbot-messages__spacer",
|
|
757
|
-
style:
|
|
755
|
+
style: F({ minHeight: `${J.value}px` })
|
|
758
756
|
}, null, 4)) : D("", !0)
|
|
759
757
|
], 512),
|
|
760
758
|
A(w, { name: "pk-chatbot-messages-fab" }, {
|
|
761
|
-
default:
|
|
759
|
+
default: H(() => [e.showScrollToBottom && (B(Ee) || !B(et)) ? (L(), O("button", {
|
|
762
760
|
key: 0,
|
|
763
761
|
type: "button",
|
|
764
762
|
class: "pk-chatbot-messages__scroll-to-bottom",
|
|
765
|
-
title:
|
|
766
|
-
"aria-label":
|
|
767
|
-
onClick:
|
|
768
|
-
}, [A(
|
|
763
|
+
title: B(I)("action.scrollToBottom"),
|
|
764
|
+
"aria-label": B(I)("action.scrollToBottom"),
|
|
765
|
+
onClick: tt
|
|
766
|
+
}, [A(d, { name: "ri:arrow-down-line" })], 8, $e)) : D("", !0)]),
|
|
769
767
|
_: 1
|
|
770
768
|
})
|
|
771
|
-
], 46,
|
|
769
|
+
], 46, Oe);
|
|
772
770
|
};
|
|
773
771
|
}
|
|
774
772
|
});
|
|
775
773
|
//#endregion
|
|
776
|
-
export {
|
|
774
|
+
export { ye as a, ve as i, be as n, _e as r, et as t };
|
|
777
775
|
|
|
778
|
-
//# sourceMappingURL=PkChatbotMessages-
|
|
776
|
+
//# sourceMappingURL=PkChatbotMessages-GZStJbx_.js.map
|