@8wave/ai-elements 0.126.0-beta.40 → 0.126.0-beta.41
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-DZEyfr8D.js → Agent-DJ6TBi6l.js} +143 -138
- package/dist/_chunks/Agent-DJ6TBi6l.js.map +1 -0
- package/dist/_chunks/{PkFilePreview-BHqmp1EW.js → PkFilePreview-BrWWeK4E.js} +3 -3
- package/dist/_chunks/{PkFilePreview-BHqmp1EW.js.map → PkFilePreview-BrWWeK4E.js.map} +1 -1
- package/dist/_chunks/{PkFilePreviewDialog-BHAgVlKs.js → PkFilePreviewDialog-BRZH_LxY.js} +2 -2
- package/dist/_chunks/{PkFilePreviewDialog-BHAgVlKs.js.map → PkFilePreviewDialog-BRZH_LxY.js.map} +1 -1
- package/dist/_chunks/{PkImageEditorDialog-BDwL39Du.js → PkImageEditorDialog-D21ggZkD.js} +6 -5
- package/dist/_chunks/{PkImageEditorDialog-BDwL39Du.js.map → PkImageEditorDialog-D21ggZkD.js.map} +1 -1
- package/dist/_chunks/{PkSelectionActions-DLsZ8-gW.js → PkSelectionActions-BLfFobXb.js} +2 -2
- package/dist/_chunks/{PkSelectionActions-DLsZ8-gW.js.map → PkSelectionActions-BLfFobXb.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-14rJ_FK2.js → PkStreamingMarkdown-Bekhx_vG.js} +300 -213
- package/dist/_chunks/PkStreamingMarkdown-Bekhx_vG.js.map +1 -0
- package/dist/_chunks/{PkToolChatFile-62j1S0Pq.js → PkToolChatFile-BzN4fMaY.js} +3 -3
- package/dist/_chunks/{PkToolChatFile-62j1S0Pq.js.map → PkToolChatFile-BzN4fMaY.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-B9EM_K6O.js → PkToolRequestGeolocation-Dj5OxEMP.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-B9EM_K6O.js.map → PkToolRequestGeolocation-Dj5OxEMP.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-CfjfqCHX.js → PkToolRequestOAuthConnection-Cj_IYnrW.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-CfjfqCHX.js.map → PkToolRequestOAuthConnection-Cj_IYnrW.js.map} +1 -1
- package/dist/_chunks/PkToolShowArtifact-BkGtejtb.js +110 -0
- package/dist/_chunks/PkToolShowArtifact-BkGtejtb.js.map +1 -0
- package/dist/_chunks/{PkToolShowContactForm-BeJ5GR6t.js → PkToolShowContactForm-BXsvfCKR.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-BeJ5GR6t.js.map → PkToolShowContactForm-BXsvfCKR.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-B9VDoS_W.js → PkToolShowForm-DeG_AzO9.js} +4 -4
- package/dist/_chunks/{PkToolShowForm-B9VDoS_W.js.map → PkToolShowForm-DeG_AzO9.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-DFuc5IJ1.js → PkToolShowImageGallery-Dri9KUNg.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-DFuc5IJ1.js.map → PkToolShowImageGallery-Dri9KUNg.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-C2EJKYOV.js → PkToolShowProductList-C-XQdsus.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-C2EJKYOV.js.map → PkToolShowProductList-C-XQdsus.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-BL3DnfcN.js → PkToolShowSources-DMDML2kQ.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-BL3DnfcN.js.map → PkToolShowSources-DMDML2kQ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-DLgtjBJ1.js → PkToolShowSuggestedReply-BYoW-L6k.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-DLgtjBJ1.js.map → PkToolShowSuggestedReply-BYoW-L6k.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DcWXDcOZ.js → PkToolShowVideo-C_1ziurv.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-DcWXDcOZ.js.map → PkToolShowVideo-C_1ziurv.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-CPqMC6qt.js → PkToolShowWebPages-yFdm0n0F.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-CPqMC6qt.js.map → PkToolShowWebPages-yFdm0n0F.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-DMt6O5iK.js → chatImagePolicy-Dqke0kDv.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-DMt6O5iK.js.map → chatImagePolicy-Dqke0kDv.js.map} +1 -1
- package/dist/_chunks/{markdown-nw5sXwU0.js → markdown-Z_eeOlvv.js} +16 -16
- package/dist/_chunks/{markdown-nw5sXwU0.js.map → markdown-Z_eeOlvv.js.map} +1 -1
- package/dist/_chunks/{utils-DE4cAz37.js → utils-C1JaUBI_.js} +2 -2
- package/dist/_chunks/{utils-DE4cAz37.js.map → utils-C1JaUBI_.js.map} +1 -1
- package/dist/ai-elements.es.js +3754 -3573
- 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-CBAd3F7k.js → Agent-DrnYCRFA.js} +2 -2
- package/dist-vue/_chunks/{Agent-CBAd3F7k.js.map → Agent-DrnYCRFA.js.map} +1 -1
- package/dist-vue/_chunks/{Document-B3w5H0R0.js → Document-CA7c3oZE.js} +11 -11
- package/dist-vue/_chunks/{Document-B3w5H0R0.js.map → Document-CA7c3oZE.js.map} +1 -1
- package/dist-vue/_chunks/{Media-0U2B_qCS.js → Media-BIlhY_h6.js} +31 -26
- package/dist-vue/_chunks/Media-BIlhY_h6.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-aCgj2DMu.js → PkChatbot-QjeNY0h6.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-aCgj2DMu.js.map → PkChatbot-QjeNY0h6.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotAuth-C5agN8ht.js → PkChatbotAuth-C8ZjLNFY.js} +8 -8
- package/dist-vue/_chunks/{PkChatbotAuth-C5agN8ht.js.map → PkChatbotAuth-C8ZjLNFY.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-CLfzcH_t.js → PkChatbotEmptyState-D6S0iYe3.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-CLfzcH_t.js.map → PkChatbotEmptyState-D6S0iYe3.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotInput-CunAf5Rq.js +708 -0
- package/dist-vue/_chunks/PkChatbotInput-CunAf5Rq.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotMessages-CG3UZYcP.js → PkChatbotMessages-CzPsgCAN.js} +351 -326
- package/dist-vue/_chunks/PkChatbotMessages-CzPsgCAN.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-fyrbP7yS.js → PkChatbotStepPayload-BQDpTDgn.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-fyrbP7yS.js.map → PkChatbotStepPayload-BQDpTDgn.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-Drhc6X-x.js → PkChatbotStepToolDetail-Dsf9t1B6.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-Drhc6X-x.js.map → PkChatbotStepToolDetail-Dsf9t1B6.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-DZwV7UVr.js → PkChatbotSteps-HACZ1RrB.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-DZwV7UVr.js.map → PkChatbotSteps-HACZ1RrB.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-IU3HJpxG.js → PkChatbotViewChat-BpDCX_72.js} +107 -107
- package/dist-vue/_chunks/PkChatbotViewChat-BpDCX_72.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-4zGrp7Fo.js → PkChatbotViewConversations-B0nUFwuu.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewConversations-4zGrp7Fo.js.map → PkChatbotViewConversations-B0nUFwuu.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-PHdrHZOf.js → PkChatbotViewFiles-gGshDAPk.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-PHdrHZOf.js.map → PkChatbotViewFiles-gGshDAPk.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-BrZ7oiUY.js → PkChatbotViewProfile-BuJtqq8F.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-BrZ7oiUY.js.map → PkChatbotViewProfile-BuJtqq8F.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-WqS-s3vk.js → PkFilePreview-0p50S8Km.js} +4 -4
- package/dist-vue/_chunks/{PkFilePreview-WqS-s3vk.js.map → PkFilePreview-0p50S8Km.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreviewDialog-BIaTAK05.js → PkFilePreviewDialog-B1N4xDEu.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-BIaTAK05.js.map → PkFilePreviewDialog-B1N4xDEu.js.map} +1 -1
- package/dist-vue/_chunks/{PkImageEditorDialog-_-UkV0CO.js → PkImageEditorDialog-B-jW5yE8.js} +6 -5
- package/dist-vue/_chunks/{PkImageEditorDialog-_-UkV0CO.js.map → PkImageEditorDialog-B-jW5yE8.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-ha0V58V9.js → PkStreamingMarkdown-WIueQOg3.js} +530 -445
- package/dist-vue/_chunks/PkStreamingMarkdown-WIueQOg3.js.map +1 -0
- package/dist-vue/_chunks/{PkToolChatFile-OusYITiO.js → PkToolChatFile-W6OJP7HH.js} +3 -3
- package/dist-vue/_chunks/{PkToolChatFile-OusYITiO.js.map → PkToolChatFile-W6OJP7HH.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-CyL_M1Rm.js → PkToolRequestGeolocation-BPZfJfR1.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-CyL_M1Rm.js.map → PkToolRequestGeolocation-BPZfJfR1.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DWkeVLpx.js → PkToolRequestOAuthConnection-BaMZkvU5.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DWkeVLpx.js.map → PkToolRequestOAuthConnection-BaMZkvU5.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowArtifact-CPBFsUrY.js +107 -0
- package/dist-vue/_chunks/PkToolShowArtifact-CPBFsUrY.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowChart-BSnYmoJJ.js → PkToolShowChart-BaUS47YU.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowChart-BSnYmoJJ.js.map → PkToolShowChart-BaUS47YU.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-DFufPNnQ.js → PkToolShowContactForm-6OQ-hjCt.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-DFufPNnQ.js.map → PkToolShowContactForm-6OQ-hjCt.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-BR4fE_be.js → PkToolShowDiagram-D6hPQVoe.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-BR4fE_be.js.map → PkToolShowDiagram-D6hPQVoe.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-yh0YAXcg.js → PkToolShowForm-CAadu_Pq.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-yh0YAXcg.js.map → PkToolShowForm-CAadu_Pq.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-mmUY1Yfg.js → PkToolShowImageGallery-BlTyCF8h.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-mmUY1Yfg.js.map → PkToolShowImageGallery-BlTyCF8h.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-B-ya1TDt.js → PkToolShowProductList-CZFkf9UD.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-B-ya1TDt.js.map → PkToolShowProductList-CZFkf9UD.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-DYkHkVdX.js → PkToolShowSources-Bci0Ab2u.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-DYkHkVdX.js.map → PkToolShowSources-Bci0Ab2u.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-wKgwHTRO.js → PkToolShowSuggestedReply-DCZbwFhR.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-wKgwHTRO.js.map → PkToolShowSuggestedReply-DCZbwFhR.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-CRg2lAY8.js → PkToolShowVideo-BnSYdoTJ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-CRg2lAY8.js.map → PkToolShowVideo-BnSYdoTJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-C_pWag94.js → PkToolShowWebPages-CHrHuFZI.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-C_pWag94.js.map → PkToolShowWebPages-CHrHuFZI.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-DBKfGL6y.js → createChatbotApiClient-_gh3Y1rl.js} +3 -3
- package/dist-vue/_chunks/createChatbotApiClient-_gh3Y1rl.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-Hb5EjISl.js → useChatbotStore-CjFPM9Q5.js} +3 -3
- package/dist-vue/_chunks/{useChatbotStore-Hb5EjISl.js.map → useChatbotStore-CjFPM9Q5.js.map} +1 -1
- package/dist-vue/_chunks/{utils-Df5n2cDc.js → utils-BYvQMZLG.js} +2 -2
- package/dist-vue/_chunks/{utils-Df5n2cDc.js.map → utils-BYvQMZLG.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +40 -8
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +71 -71
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +10 -0
- package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +2 -2
- package/dist-vue/packages/components/src/chat/PkImageEditorDialog.d.ts +5 -0
- package/dist-vue/packages/components/src/chat/PkStreamingMarkdown.d.ts +6 -0
- package/dist-vue/packages/components/src/chat/richCopy.d.ts +33 -0
- package/dist-vue/packages/components/src/chat/screenshot.d.ts +38 -0
- package/dist-vue/packages/models/src/schema/Chat.d.ts +1 -1
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-DZEyfr8D.js.map +0 -1
- package/dist/_chunks/PkStreamingMarkdown-14rJ_FK2.js.map +0 -1
- package/dist/_chunks/PkToolShowArtifact-I_QZS7Pf.js +0 -94
- package/dist/_chunks/PkToolShowArtifact-I_QZS7Pf.js.map +0 -1
- package/dist-vue/_chunks/Media-0U2B_qCS.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-C9l_1I3d.js +0 -584
- package/dist-vue/_chunks/PkChatbotInput-C9l_1I3d.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-CG3UZYcP.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-IU3HJpxG.js.map +0 -1
- package/dist-vue/_chunks/PkStreamingMarkdown-ha0V58V9.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowArtifact-x57Gri2a.js +0 -91
- package/dist-vue/_chunks/PkToolShowArtifact-x57Gri2a.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-DBKfGL6y.js.map +0 -1
|
@@ -1,86 +1,86 @@
|
|
|
1
1
|
import { b as e, g as t, r as n, w as r, x as i } from "./schemas-CwcNxjnD.js";
|
|
2
2
|
import { t as a } from "./VvButtonLocalized-C-vx25u4.js";
|
|
3
|
-
import { A as o, H as s, _ as c, k as l, r as u } from "./Agent-
|
|
4
|
-
import {
|
|
5
|
-
import { A as f, C as p, I as m, L as h, N as g, O as _, P as v, S as y, W as b, _ as x, at as ee, b as te, d as ne, f as re, g as S, i as ie, it as ae, n as oe, r as se, t as C, x as ce, y as le, z as ue } from "./utils-
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { c as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
3
|
+
import { A as o, H as s, _ as c, k as l, r as u } from "./Agent-DrnYCRFA.js";
|
|
4
|
+
import { l as d } from "./Media-BIlhY_h6.js";
|
|
5
|
+
import { A as f, C as p, I as m, L as h, N as g, O as _, P as v, S as y, W as b, _ as x, at as ee, b as te, d as ne, f as re, g as S, i as ie, it as ae, n as oe, r as se, t as C, x as ce, y as le, z as ue } from "./utils-BYvQMZLG.js";
|
|
6
|
+
import { n as de, r as fe, t as pe } from "./PkStreamingMarkdown-WIueQOg3.js";
|
|
7
|
+
import { t as me } from "./PkChatbotError-DFZ5S5jd.js";
|
|
8
|
+
import { t as he } from "./PkChatbotFeedbackForm-DjsLxYjT.js";
|
|
9
|
+
import { c as ge, i as w, l as T, n as _e, o as ve, s as ye, t as be, u as xe } from "./message-DuibQyHy.js";
|
|
10
|
+
import { t as Se } from "./PkChatbotMessageFeedback-DltXugdR.js";
|
|
11
|
+
import { t as Ce } from "./PkChatbotFilePreview-aKJBtw04.js";
|
|
12
|
+
import { t as we } from "./PkChatbotAudioTranscript-DgmuXalb.js";
|
|
13
|
+
import { t as Te } from "./PkRelativeTime-CZF5CYHv.js";
|
|
14
14
|
import "./src-nb8MU1sh.js";
|
|
15
|
-
import { n as
|
|
16
|
-
import { t as
|
|
17
|
-
import { n as
|
|
18
|
-
import { VvAccordion as
|
|
19
|
-
import { Fragment as E, Transition as D, computed as O, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createTextVNode as
|
|
20
|
-
import { useI18n as
|
|
21
|
-
import { useResizeObserver as
|
|
15
|
+
import { n as Ee, r as De, t as Oe } from "./PkChatbotSteps-HACZ1RrB.js";
|
|
16
|
+
import { t as ke } from "./PkChatbotOutlineRail-BI-DMvZi.js";
|
|
17
|
+
import { n as Ae } from "./useLightbox-DrEFS3gx.js";
|
|
18
|
+
import { VvAccordion as je, VvButtonGroup as Me, VvIcon as Ne } from "@volverjs/ui-vue/components";
|
|
19
|
+
import { Fragment as E, Transition as D, computed as O, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createTextVNode as Pe, createVNode as N, defineAsyncComponent as P, defineComponent as F, inject as Fe, mergeProps as Ie, nextTick as I, normalizeClass as L, normalizeStyle as Le, onBeforeUnmount as Re, onMounted as ze, openBlock as R, ref as z, renderList as Be, renderSlot as Ve, resolveDynamicComponent as He, shallowRef as Ue, toDisplayString as B, unref as V, useSlots as We, useTemplateRef as Ge, watch as H, withCtx as U, withModifiers as W } from "vue";
|
|
20
|
+
import { useI18n as Ke } from "vue-i18n";
|
|
21
|
+
import { useResizeObserver as qe } from "@vueuse/core";
|
|
22
22
|
t({
|
|
23
23
|
platform: e(),
|
|
24
24
|
threadId: e()
|
|
25
25
|
});
|
|
26
|
-
var
|
|
26
|
+
var Je = t({
|
|
27
27
|
wakeId: r(),
|
|
28
28
|
dueAt: ee(),
|
|
29
29
|
reason: e(),
|
|
30
30
|
kind: n(["wakeup", "task"]).optional(),
|
|
31
31
|
taskId: r().optional()
|
|
32
32
|
});
|
|
33
|
-
t({ pendingWakeup:
|
|
34
|
-
var
|
|
35
|
-
i([
|
|
36
|
-
var
|
|
33
|
+
t({ pendingWakeup: Je.nullable() });
|
|
34
|
+
var Ye = t({ wakeId: r() });
|
|
35
|
+
i([Ye, ae]);
|
|
36
|
+
var G = (e) => e?.role === "user" && !!e.metadata?.wakeup, Xe = /* @__PURE__ */ new Set([
|
|
37
37
|
"input-streaming",
|
|
38
38
|
"input-available",
|
|
39
39
|
"approval-requested"
|
|
40
|
-
]),
|
|
40
|
+
]), Ze = /* @__PURE__ */ new Set([
|
|
41
41
|
...o,
|
|
42
42
|
...l,
|
|
43
43
|
...c
|
|
44
44
|
]);
|
|
45
45
|
[...l, u.ShowContactForm];
|
|
46
|
-
var
|
|
46
|
+
var K = (e) => e.state, Qe = (e) => e.type.startsWith("tool-") ? e.type.slice(5) : void 0, $e = (e) => e?.role === "assistant" && e.parts.some((e) => {
|
|
47
47
|
if (e.type === "text") return e.text.trim().length > 0;
|
|
48
48
|
if (e.type === "file") return !0;
|
|
49
|
-
let t =
|
|
50
|
-
if (t &&
|
|
51
|
-
let n =
|
|
52
|
-
return n !== void 0 &&
|
|
53
|
-
}),
|
|
49
|
+
let t = K(e);
|
|
50
|
+
if (t && Xe.has(t)) return !0;
|
|
51
|
+
let n = Qe(e);
|
|
52
|
+
return n !== void 0 && Ze.has(n) && t === "output-available";
|
|
53
|
+
}), et = (e) => {
|
|
54
54
|
if (e?.role !== "assistant") return !1;
|
|
55
55
|
let t = !1;
|
|
56
|
-
for (let n of e.parts) (n.type === "tool-scheduleWakeup" || n.type === "tool-reportTaskRun") && (t =
|
|
56
|
+
for (let n of e.parts) (n.type === "tool-scheduleWakeup" || n.type === "tool-reportTaskRun") && (t = K(n) === "output-available" && n.input?.noop === !0);
|
|
57
57
|
return t;
|
|
58
|
-
},
|
|
59
|
-
requestOAuthConnection: P(() => import("./PkToolRequestOAuthConnection-
|
|
58
|
+
}, tt = (e) => e?.role === "assistant" && !$e(e) && et(e), nt = {
|
|
59
|
+
requestOAuthConnection: P(() => import("./PkToolRequestOAuthConnection-BaMZkvU5.js")),
|
|
60
60
|
shareDocument: P(() => import("./PkToolShareDocument-Bkt9JVqk.js").then((e) => e.n)),
|
|
61
|
-
showArtifact: P(() => import("./PkToolShowArtifact-
|
|
61
|
+
showArtifact: P(() => import("./PkToolShowArtifact-CPBFsUrY.js").then((e) => e.n)),
|
|
62
62
|
showCalendarEvent: P(() => import("./PkToolShowCalendarEvent-CAejFLQI.js").then((e) => e.n)),
|
|
63
|
-
showChart: P(() => import("./PkToolShowChart-
|
|
63
|
+
showChart: P(() => import("./PkToolShowChart-BaUS47YU.js")),
|
|
64
64
|
showComparison: P(() => import("./PkToolShowComparison-BEHyRNXE.js").then((e) => e.n)),
|
|
65
|
-
showContactForm: P(() => import("./PkToolShowContactForm-
|
|
66
|
-
showDiagram: P(() => import("./PkToolShowDiagram-
|
|
65
|
+
showContactForm: P(() => import("./PkToolShowContactForm-6OQ-hjCt.js").then((e) => e.n)),
|
|
66
|
+
showDiagram: P(() => import("./PkToolShowDiagram-D6hPQVoe.js")),
|
|
67
67
|
showEmail: P(() => import("./PkToolShowEmail-idhNR5-l.js").then((e) => e.n)),
|
|
68
|
-
showImageGallery: P(() => import("./PkToolShowImageGallery-
|
|
68
|
+
showImageGallery: P(() => import("./PkToolShowImageGallery-BlTyCF8h.js").then((e) => e.n)),
|
|
69
69
|
showLocation: P(() => import("./PkToolShowLocation-CyaKgQUX.js").then((e) => e.n)),
|
|
70
70
|
showMessage: P(() => import("./PkToolShowMessage-B4gztWUk.js").then((e) => e.n)),
|
|
71
|
-
showForm: P(() => import("./PkToolShowForm-
|
|
72
|
-
showMultipleChoice: P(() => import("./PkToolShowForm-
|
|
73
|
-
showProductList: P(() => import("./PkToolShowProductList-
|
|
71
|
+
showForm: P(() => import("./PkToolShowForm-CAadu_Pq.js").then((e) => e.n)),
|
|
72
|
+
showMultipleChoice: P(() => import("./PkToolShowForm-CAadu_Pq.js").then((e) => e.n)),
|
|
73
|
+
showProductList: P(() => import("./PkToolShowProductList-CZFkf9UD.js").then((e) => e.n)),
|
|
74
74
|
showQrCode: P(() => import("./PkToolShowQrCode-96KzD1rX.js").then((e) => e.n)),
|
|
75
|
-
showSources: P(() => import("./PkToolShowSources-
|
|
76
|
-
showSuggestedReply: P(() => import("./PkToolShowSuggestedReply-
|
|
77
|
-
showVideo: P(() => import("./PkToolShowVideo-
|
|
75
|
+
showSources: P(() => import("./PkToolShowSources-Bci0Ab2u.js").then((e) => e.n)),
|
|
76
|
+
showSuggestedReply: P(() => import("./PkToolShowSuggestedReply-DCZbwFhR.js").then((e) => e.n)),
|
|
77
|
+
showVideo: P(() => import("./PkToolShowVideo-BnSYdoTJ.js")),
|
|
78
78
|
showWeather: P(() => import("./PkToolShowWeather-DkWGFxNa.js")),
|
|
79
|
-
showWebPages: P(() => import("./PkToolShowWebPages-
|
|
80
|
-
},
|
|
79
|
+
showWebPages: P(() => import("./PkToolShowWebPages-CHrHuFZI.js").then((e) => e.n))
|
|
80
|
+
}, rt = {
|
|
81
81
|
key: 0,
|
|
82
82
|
class: "text-12 text-word-3 m-0 mb-xs"
|
|
83
|
-
},
|
|
83
|
+
}, q = /* @__PURE__ */ F({
|
|
84
84
|
__name: "PkToolApprovalPreviewMessage",
|
|
85
85
|
props: { input: {} },
|
|
86
86
|
setup(e) {
|
|
@@ -88,12 +88,12 @@ var G = (e) => e.state, Ze = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
|
|
|
88
88
|
let e = t.input;
|
|
89
89
|
return typeof e?.message == "string" ? e.message : "";
|
|
90
90
|
});
|
|
91
|
-
return (e, t) => n.value ? (
|
|
91
|
+
return (e, t) => n.value ? (R(), j("p", rt, B(n.value), 1)) : A("", !0);
|
|
92
92
|
}
|
|
93
|
-
}),
|
|
93
|
+
}), J = { [C]: q }, it = {
|
|
94
94
|
key: 0,
|
|
95
95
|
class: "text-12 text-word-3 m-0 mb-xs"
|
|
96
|
-
},
|
|
96
|
+
}, at = /* @__PURE__ */ F({
|
|
97
97
|
__name: "PkToolApprovalCard",
|
|
98
98
|
props: {
|
|
99
99
|
part: {},
|
|
@@ -102,7 +102,7 @@ var G = (e) => e.state, Ze = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
|
|
|
102
102
|
},
|
|
103
103
|
emits: ["respond"],
|
|
104
104
|
setup(e, { emit: t }) {
|
|
105
|
-
let n = e, r = t, { t: i, te: o } =
|
|
105
|
+
let n = e, r = t, { t: i, te: o } = Ke({ useScope: "global" }), c = O(() => n.part), l = O(() => w(n.part)), u = O(() => l.value === C), d = O(() => u.value ? (c.value.state === "input-available" || s(c.value.output)) && n.callVerdict === void 0 : c.value.state === "approval-requested"), f = O(() => d.value && n.actionable === !0), p = O(() => d.value && n.actionable !== !0), m = O(() => u.value ? c.value.output === "confirmed" || n.callVerdict === !0 : c.value.approval?.approved === !0), h = O(() => u.value ? c.value.output === "cancelled" || n.callVerdict === !1 : c.value.approval?.approved === !1 || c.value.state === "output-denied"), g = O(() => J[l.value]), _ = O(() => g.value ? i("toolApproval.prompt") : i("toolApproval.promptNamed", { tool: b(l.value, {
|
|
106
106
|
t: i,
|
|
107
107
|
te: o
|
|
108
108
|
}) })), v = O(() => {
|
|
@@ -120,37 +120,37 @@ var G = (e) => e.state, Ze = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
|
|
|
120
120
|
};
|
|
121
121
|
}), y = O(() => !!v.value && !g.value);
|
|
122
122
|
return (t, n) => {
|
|
123
|
-
let o = a, s =
|
|
124
|
-
return
|
|
123
|
+
let o = a, s = Me, l = Ne;
|
|
124
|
+
return R(), j("div", { class: L(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !y.value }]) }, [
|
|
125
125
|
N(D, null, {
|
|
126
|
-
default:
|
|
126
|
+
default: U(() => [!u.value && d.value ? (R(), j("p", it, B(_.value), 1)) : A("", !0)]),
|
|
127
127
|
_: 1
|
|
128
128
|
}),
|
|
129
|
-
g.value ? (
|
|
129
|
+
g.value ? (R(), k(He(g.value), {
|
|
130
130
|
key: 0,
|
|
131
131
|
part: e.part,
|
|
132
132
|
input: c.value.input
|
|
133
133
|
}, null, 8, ["part", "input"])) : A("", !0),
|
|
134
134
|
N(D, { mode: "out-in" }, {
|
|
135
|
-
default:
|
|
135
|
+
default: U(() => [v.value ? (R(), j("p", {
|
|
136
136
|
key: 1,
|
|
137
|
-
class:
|
|
137
|
+
class: L(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": g.value }])
|
|
138
138
|
}, [N(l, {
|
|
139
139
|
name: v.value.icon,
|
|
140
140
|
class: "shrink-0"
|
|
141
|
-
}, null, 8, ["name"]),
|
|
142
|
-
default:
|
|
141
|
+
}, null, 8, ["name"]), Pe(" " + B(v.value.message), 1)], 2)) : (R(), k(s, { key: 0 }, {
|
|
142
|
+
default: U(() => [N(o, {
|
|
143
143
|
modifiers: "primary-small",
|
|
144
144
|
disabled: !f.value,
|
|
145
145
|
icon: "ri:check-line",
|
|
146
|
-
label:
|
|
147
|
-
onClick: n[0] ||=
|
|
146
|
+
label: V(i)("action.proceed"),
|
|
147
|
+
onClick: n[0] ||= W((e) => r("respond", !0), ["stop"])
|
|
148
148
|
}, null, 8, ["disabled", "label"]), N(o, {
|
|
149
149
|
modifiers: "action-quiet-small",
|
|
150
150
|
disabled: !f.value,
|
|
151
151
|
icon: "ri:close-line",
|
|
152
|
-
label:
|
|
153
|
-
onClick: n[1] ||=
|
|
152
|
+
label: V(i)("action.cancel"),
|
|
153
|
+
onClick: n[1] ||= W((e) => r("respond", !1), ["stop"])
|
|
154
154
|
}, null, 8, ["disabled", "label"])]),
|
|
155
155
|
_: 1
|
|
156
156
|
}))]),
|
|
@@ -159,16 +159,16 @@ var G = (e) => e.state, Ze = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
|
|
|
159
159
|
], 2);
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
}),
|
|
162
|
+
}), ot = { class: "pk-host-call-confirm-card w-full bg-surface p-sm rounded-xl border border-surface-3" }, st = { class: "text-14 text-word-2 m-0 mb-xs" }, ct = {
|
|
163
163
|
key: 1,
|
|
164
164
|
class: "pk-host-call-confirm-card__details text-14 m-0 mb-xs"
|
|
165
|
-
},
|
|
165
|
+
}, lt = {
|
|
166
166
|
key: 0,
|
|
167
167
|
class: "text-word-3 truncate"
|
|
168
|
-
},
|
|
168
|
+
}, ut = {
|
|
169
169
|
key: 2,
|
|
170
170
|
class: "text-12 text-word-3 m-0 mb-xs"
|
|
171
|
-
},
|
|
171
|
+
}, dt = { class: "pk-host-call-confirm-card__details text-12 m-0" }, Y = { class: "text-word-3" }, ft = { class: "text-word-2 m-0" }, pt = /* @__PURE__ */ F({
|
|
172
172
|
__name: "PkHostCallConfirmCard",
|
|
173
173
|
props: {
|
|
174
174
|
question: {},
|
|
@@ -179,49 +179,49 @@ var G = (e) => e.state, Ze = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
|
|
|
179
179
|
setup(e, { emit: t }) {
|
|
180
180
|
let n = e, r = t, i = O(() => n.details?.some((e) => e.before !== void 0) ?? !1);
|
|
181
181
|
return (t, n) => {
|
|
182
|
-
let o =
|
|
183
|
-
return
|
|
184
|
-
M("p",
|
|
185
|
-
e.details?.length && i.value ? (
|
|
182
|
+
let o = je, s = a, c = Me;
|
|
183
|
+
return R(), j("div", ot, [
|
|
184
|
+
M("p", st, B(e.question), 1),
|
|
185
|
+
e.details?.length && i.value ? (R(), k(De, {
|
|
186
186
|
key: 0,
|
|
187
187
|
changes: e.details,
|
|
188
188
|
class: "mb-xs"
|
|
189
|
-
}, null, 8, ["changes"])) : e.details?.length ? (
|
|
190
|
-
e.unchanged?.length ? (
|
|
189
|
+
}, null, 8, ["changes"])) : e.details?.length ? (R(), j("dl", ct, [(R(!0), j(E, null, Be(e.details, (e, t) => (R(), j(E, { key: t }, [e.label ? (R(), j("dt", lt, B(e.label), 1)) : A("", !0), M("dd", { class: L(["text-word-1 m-0 truncate", { "pk-host-call-confirm-card__alone": !e.label }]) }, B(e.value), 3)], 64))), 128))])) : e.unchanged?.length ? (R(), j("p", ut, B(t.$t("toolApproval.noChanges")), 1)) : A("", !0),
|
|
190
|
+
e.unchanged?.length ? (R(), k(o, {
|
|
191
191
|
key: 3,
|
|
192
192
|
title: t.$t("toolApproval.unchangedFields", e.unchanged.length),
|
|
193
193
|
modifiers: "compact",
|
|
194
194
|
class: "mb-xs"
|
|
195
195
|
}, {
|
|
196
|
-
default:
|
|
196
|
+
default: U(() => [M("dl", dt, [(R(!0), j(E, null, Be(e.unchanged, (e, t) => (R(), j(E, { key: t }, [M("dt", Y, B(e.label), 1), M("dd", ft, B(e.value), 1)], 64))), 128))])]),
|
|
197
197
|
_: 1
|
|
198
198
|
}, 8, ["title"])) : A("", !0),
|
|
199
199
|
N(c, null, {
|
|
200
|
-
default:
|
|
200
|
+
default: U(() => [N(s, {
|
|
201
201
|
modifiers: "primary-small",
|
|
202
202
|
icon: "ri:check-line",
|
|
203
203
|
label: t.$t("action.proceed"),
|
|
204
|
-
onClick: n[0] ||=
|
|
204
|
+
onClick: n[0] ||= W((e) => r("respond", !0), ["stop"])
|
|
205
205
|
}, null, 8, ["label"]), N(s, {
|
|
206
206
|
modifiers: "action-quiet-small",
|
|
207
207
|
icon: "ri:close-line",
|
|
208
208
|
label: t.$t("action.cancel"),
|
|
209
|
-
onClick: n[1] ||=
|
|
209
|
+
onClick: n[1] ||= W((e) => r("respond", !1), ["stop"])
|
|
210
210
|
}, null, 8, ["label"])]),
|
|
211
211
|
_: 1
|
|
212
212
|
})
|
|
213
213
|
]);
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
|
-
}),
|
|
217
|
-
function
|
|
218
|
-
let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l =
|
|
216
|
+
}), mt = 30, ht = 500;
|
|
217
|
+
function gt(e) {
|
|
218
|
+
let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = z(!1), u = z(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, _ = (e = "smooth") => {
|
|
219
219
|
!t.value || l.value ? d = !1 : (d = !0, t.value.scrollTo({
|
|
220
220
|
top: t.value.scrollHeight,
|
|
221
221
|
behavior: e
|
|
222
222
|
}), setTimeout(() => {
|
|
223
223
|
d = !1;
|
|
224
|
-
}, e === "instant" ? 0 :
|
|
224
|
+
}, e === "instant" ? 0 : ht));
|
|
225
225
|
}, v = (e) => {
|
|
226
226
|
e.deltaY < 0 && (l.value = !0);
|
|
227
227
|
}, y = 0, b = (e) => {
|
|
@@ -232,7 +232,7 @@ function mt(e) {
|
|
|
232
232
|
}, ee = () => {
|
|
233
233
|
if (!t.value) return;
|
|
234
234
|
let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
|
|
235
|
-
u.value = n - r - e <
|
|
235
|
+
u.value = n - r - e < mt, d || (e < g && s?.(), e > g && (u.value && (l.value = !1), c?.())), g = e;
|
|
236
236
|
}, te = () => {
|
|
237
237
|
if (d || l.value || !t.value) return;
|
|
238
238
|
let e = t.value, n = e.scrollHeight - e.clientHeight;
|
|
@@ -248,13 +248,13 @@ function mt(e) {
|
|
|
248
248
|
}, re = () => {
|
|
249
249
|
f?.disconnect(), f = null;
|
|
250
250
|
};
|
|
251
|
-
|
|
251
|
+
H(n, (e, t) => {
|
|
252
252
|
e === "streaming" || e === "submitted" ? ne() : (e !== "ready" || t !== "streaming") && re();
|
|
253
|
-
}),
|
|
253
|
+
}), H(r, async () => {
|
|
254
254
|
if (r() && i() !== "assistant") {
|
|
255
255
|
ae(), l.value = !1, d = !0;
|
|
256
256
|
try {
|
|
257
|
-
await
|
|
257
|
+
await I(), await o?.(), await I();
|
|
258
258
|
} finally {
|
|
259
259
|
_();
|
|
260
260
|
}
|
|
@@ -265,7 +265,7 @@ function mt(e) {
|
|
|
265
265
|
}, ae = () => {
|
|
266
266
|
p?.disconnect(), p = null, m?.disconnect(), m = null, S &&= (clearTimeout(S), null);
|
|
267
267
|
};
|
|
268
|
-
return
|
|
268
|
+
return ze(() => {
|
|
269
269
|
if (!t.value) return;
|
|
270
270
|
t.value.addEventListener("wheel", v, { passive: !0 }), t.value.addEventListener("touchstart", b, { passive: !0 }), t.value.addEventListener("touchmove", x, { passive: !0 });
|
|
271
271
|
let e = n() === "submitted" || n() === "streaming";
|
|
@@ -275,7 +275,7 @@ function mt(e) {
|
|
|
275
275
|
}));
|
|
276
276
|
let r = a?.() ?? t.value.firstElementChild;
|
|
277
277
|
r && (h = new ResizeObserver(te), h.observe(r)), e || ie();
|
|
278
|
-
}),
|
|
278
|
+
}), Re(() => {
|
|
279
279
|
t.value?.removeEventListener("wheel", v), t.value?.removeEventListener("touchstart", b), t.value?.removeEventListener("touchmove", x), h?.disconnect(), h = null, re(), ae();
|
|
280
280
|
}), {
|
|
281
281
|
handleScroll: ee,
|
|
@@ -285,14 +285,14 @@ function mt(e) {
|
|
|
285
285
|
};
|
|
286
286
|
}
|
|
287
287
|
// ../../packages/components/src/chat/wakeupFeed.ts
|
|
288
|
-
var
|
|
289
|
-
function
|
|
290
|
-
let n = (e) =>
|
|
288
|
+
var _t = (e) => e?.metadata?.wakeup?.taskId;
|
|
289
|
+
function vt(e, t = () => !1) {
|
|
290
|
+
let n = (e) => tt(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
|
|
291
291
|
for (; a < e.length;) {
|
|
292
292
|
let t = e[a];
|
|
293
|
-
if (
|
|
294
|
-
let o = t.id, s =
|
|
295
|
-
for (;
|
|
293
|
+
if (G(t) && n(e[a + 1])) {
|
|
294
|
+
let o = t.id, s = _t(t), c = 0, l;
|
|
295
|
+
for (; G(e[a]) && _t(e[a]) === s && n(e[a + 1]);) c += 1, l = e[a].metadata?.createdAt ?? l, r.add(e[a].id), r.add(e[a + 1].id), a += 2;
|
|
296
296
|
i.set(o, {
|
|
297
297
|
count: c,
|
|
298
298
|
lastAt: l,
|
|
@@ -307,43 +307,43 @@ function gt(e, t = () => !1) {
|
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
309
|
// ../../packages/components/src/chat/PkChatbotMessages.vue?vue&type=script&setup=true&lang.ts
|
|
310
|
-
var
|
|
310
|
+
var yt = ["aria-busy"], bt = {
|
|
311
311
|
key: 0,
|
|
312
312
|
class: "pk-chatbot-messages__outline"
|
|
313
|
-
},
|
|
313
|
+
}, xt = {
|
|
314
314
|
key: 0,
|
|
315
315
|
class: "pk-chatbot-divider vv-separator"
|
|
316
|
-
},
|
|
316
|
+
}, St = { class: "pk-chatbot-divider__label" }, Ct = ["title"], wt = ["title"], Tt = { class: "pk-chatbot-message__text" }, Et = ["title"], Dt = {
|
|
317
317
|
key: 0,
|
|
318
318
|
class: "pk-chatbot-message__reaction-emoji"
|
|
319
|
-
},
|
|
319
|
+
}, Ot = {
|
|
320
320
|
key: 0,
|
|
321
321
|
class: "flex flex-col items-end gap-8 w-full"
|
|
322
|
-
},
|
|
322
|
+
}, kt = { class: "pk-chatbot-message__host-step" }, At = { class: "pk-chatbot-message__host-call" }, jt = { class: "pk-chatbot-message__host-call-label" }, Mt = {
|
|
323
323
|
key: 0,
|
|
324
324
|
class: "pk-chatbot-message__host-call-outcome"
|
|
325
|
-
},
|
|
325
|
+
}, Nt = {
|
|
326
326
|
key: 0,
|
|
327
327
|
class: "pk-chatbot-message__loading-info"
|
|
328
|
-
},
|
|
328
|
+
}, Pt = { class: "flex gap-8 items-center" }, Ft = { class: "text-12" }, It = ["title"], Lt = { class: "pk-chatbot-message__pointer-label" }, Rt = ["title"], zt = { class: "pk-chatbot-message__pointer-label" }, Bt = { class: "flex gap-8 items-center" }, Vt = {
|
|
329
329
|
key: 0,
|
|
330
330
|
class: "pk-chatbot-message__footer"
|
|
331
|
-
},
|
|
331
|
+
}, Ht = {
|
|
332
332
|
key: 0,
|
|
333
333
|
class: "pk-chatbot-message__hover-meta"
|
|
334
|
-
},
|
|
334
|
+
}, Ut = ["datetime", "title"], Wt = { class: "truncate" }, Gt = {
|
|
335
335
|
key: 0,
|
|
336
336
|
class: "flex items-center gap-4 min-w-0"
|
|
337
|
-
},
|
|
337
|
+
}, Kt = { class: "truncate" }, qt = ["title"], Jt = {
|
|
338
338
|
key: 2,
|
|
339
339
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
340
|
-
},
|
|
340
|
+
}, Yt = { class: "truncate" }, Xt = ["datetime"], Zt = { class: "truncate" }, Qt = {
|
|
341
341
|
key: 4,
|
|
342
342
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
343
|
-
},
|
|
343
|
+
}, $t = { class: "pk-chatbot-message__loading-info" }, en = { class: "flex gap-8 items-center" }, tn = { class: "text-12" }, nn = {
|
|
344
344
|
key: 0,
|
|
345
345
|
class: "pk-chatbot-message pk-chatbot-message--assistant"
|
|
346
|
-
},
|
|
346
|
+
}, rn = ["title", "aria-label"], an = /* @__PURE__ */ F({
|
|
347
347
|
__name: "PkChatbotMessages",
|
|
348
348
|
props: {
|
|
349
349
|
status: {},
|
|
@@ -393,10 +393,10 @@ var _t = ["aria-busy"], vt = {
|
|
|
393
393
|
"host-confirm-respond"
|
|
394
394
|
],
|
|
395
395
|
setup(e, { emit: t }) {
|
|
396
|
-
let n = e, r = t, { t: i, te: o, d: s, n: c } =
|
|
396
|
+
let n = e, r = t, { t: i, te: o, d: s, n: c } = Ke({ useScope: "global" }), l = Fe(se, void 0), u = Fe(oe, void 0), b = (e) => {
|
|
397
397
|
let t = e.toolCallId;
|
|
398
398
|
return typeof t == "string" ? u?.value[t]?.details : void 0;
|
|
399
|
-
}, ee =
|
|
399
|
+
}, ee = We(), ae = (e, t) => {
|
|
400
400
|
if (v(e)) {
|
|
401
401
|
let n = e.toolCallId;
|
|
402
402
|
n && r("confirm-respond", {
|
|
@@ -410,125 +410,135 @@ var _t = ["aria-busy"], vt = {
|
|
|
410
410
|
id: n,
|
|
411
411
|
approved: t
|
|
412
412
|
});
|
|
413
|
-
}, C =
|
|
414
|
-
|
|
415
|
-
let { handleScroll:
|
|
413
|
+
}, C = Ge("scrollEl"), P = Ge("wrapperEl"), F = O(() => ue(n.textColor, n.mainColor));
|
|
414
|
+
Ae(P);
|
|
415
|
+
let { handleScroll: Re, scrollToBottom: Je, userScrolledUp: Ye, isAtBottom: Xe } = gt({
|
|
416
416
|
scrollEl: C,
|
|
417
417
|
status: () => n.status,
|
|
418
418
|
messagesLength: () => n.messages?.length,
|
|
419
419
|
lastMessageRole: () => n.messages?.[n.messages.length - 1]?.role,
|
|
420
420
|
contentEl: () => P.value,
|
|
421
|
-
beforeNewMessageScroll: () =>
|
|
421
|
+
beforeNewMessageScroll: () => ut(),
|
|
422
422
|
onScrollUp: () => r("scroll-up"),
|
|
423
423
|
onScrollDown: () => r("scroll-down")
|
|
424
|
-
}),
|
|
425
|
-
|
|
426
|
-
},
|
|
424
|
+
}), Ze = () => {
|
|
425
|
+
Ye.value = !1, Je();
|
|
426
|
+
}, K = O(() => (n.messages ?? []).filter((e) => e.role === "user" && !G(e)).map((e) => ({
|
|
427
427
|
id: e.id,
|
|
428
428
|
preview: e.parts.find(T)?.text.trim().slice(0, 120) || "…"
|
|
429
|
-
}))),
|
|
429
|
+
}))), Qe = z(), $e = () => C.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], et = () => {
|
|
430
430
|
let e = C.value;
|
|
431
431
|
if (!e || !n.showScrollToBottom) return;
|
|
432
|
-
let t = e.getBoundingClientRect().top + e.clientHeight / 2, r =
|
|
433
|
-
|
|
434
|
-
e.getBoundingClientRect().top <= t && (r =
|
|
435
|
-
}),
|
|
432
|
+
let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = K.value[0]?.id;
|
|
433
|
+
$e().forEach((e, n) => {
|
|
434
|
+
e.getBoundingClientRect().top <= t && (r = K.value[n]?.id);
|
|
435
|
+
}), Qe.value = r;
|
|
436
436
|
};
|
|
437
|
-
|
|
438
|
-
await
|
|
437
|
+
H(K, async () => {
|
|
438
|
+
await I(), et();
|
|
439
439
|
});
|
|
440
|
-
let
|
|
441
|
-
|
|
442
|
-
},
|
|
443
|
-
let t = C.value, n =
|
|
444
|
-
t && r && (
|
|
440
|
+
let tt = () => {
|
|
441
|
+
Re(), et();
|
|
442
|
+
}, rt = (e) => {
|
|
443
|
+
let t = C.value, n = K.value.findIndex((t) => t.id === e), r = $e()[n];
|
|
444
|
+
t && r && (Ye.value = !0, t.scrollTo({
|
|
445
445
|
top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
|
|
446
446
|
behavior: "smooth"
|
|
447
447
|
}));
|
|
448
|
-
},
|
|
449
|
-
|
|
450
|
-
},
|
|
448
|
+
}, q = O(() => n.status === "submitted" || n.status === "streaming" || n.hostWorking === !0), J = z(0), it = z(!1), ot = !1, st = Ue(), ct = () => n.messages?.[n.messages.length - 1]?.role === "user" || q.value, lt = () => {
|
|
449
|
+
ot = !1, it.value = !0, J.value = 0;
|
|
450
|
+
}, ut = async () => {
|
|
451
451
|
if (!n.messages?.length || n.disableHeightAdjustment) return;
|
|
452
|
-
if (!
|
|
453
|
-
|
|
452
|
+
if (!ct()) {
|
|
453
|
+
ot && (await I(), C.value?.scrollHeight, ct() || lt());
|
|
454
454
|
return;
|
|
455
455
|
}
|
|
456
|
-
if (
|
|
457
|
-
let { paddingTop: e, paddingBottom: t } = getComputedStyle(C.value), r = C.value.clientHeight - Number.parseFloat(e) - Number.parseFloat(t), i = P.value && Number.parseFloat(getComputedStyle(P.value).rowGap) || 0, a =
|
|
458
|
-
|
|
459
|
-
let o = r - (
|
|
460
|
-
r > 0 && (
|
|
456
|
+
if (ot = !0, it.value = !1, await I(), !C.value) return;
|
|
457
|
+
let { paddingTop: e, paddingBottom: t } = getComputedStyle(C.value), r = C.value.clientHeight - Number.parseFloat(e) - Number.parseFloat(t), i = P.value && Number.parseFloat(getComputedStyle(P.value).rowGap) || 0, a = $e();
|
|
458
|
+
st.value = a[a.length - 1];
|
|
459
|
+
let o = r - (st.value?.clientHeight ?? 0) - i;
|
|
460
|
+
r > 0 && (J.value = Math.max(o, 0)), await I();
|
|
461
461
|
};
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
}),
|
|
465
|
-
(
|
|
466
|
-
}),
|
|
467
|
-
e ||
|
|
462
|
+
H([() => n.messages?.length, () => n.messages?.[n.messages.length - 1]?.id], () => ut()), qe([C, st], () => {
|
|
463
|
+
ot && ut();
|
|
464
|
+
}), ze(() => {
|
|
465
|
+
(q.value || n.awaitingSpokenAnswer) && ut();
|
|
466
|
+
}), H(q, (e) => {
|
|
467
|
+
e || lt();
|
|
468
468
|
});
|
|
469
|
-
let
|
|
469
|
+
let dt = (e) => n.revisedAnswers?.some((t) => t.messageId === e), Y = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), ft = /* @__PURE__ */ new Set([
|
|
470
470
|
"showContactForm",
|
|
471
471
|
"showForm",
|
|
472
472
|
"showMultipleChoice",
|
|
473
473
|
"showSuggestedReply"
|
|
474
|
-
]),
|
|
474
|
+
]), mt = /* @__PURE__ */ new Set([
|
|
475
475
|
"showChart",
|
|
476
476
|
"showDiagram",
|
|
477
477
|
"showLocation"
|
|
478
|
-
]),
|
|
478
|
+
]), ht = (e) => {
|
|
479
479
|
let t = w(e);
|
|
480
480
|
return {
|
|
481
|
-
...!n.interactive &&
|
|
482
|
-
...
|
|
481
|
+
...!n.interactive && ft.has(t) ? { record: !0 } : {},
|
|
482
|
+
...mt.has(t) ? { isDark: n.isDark } : {}
|
|
483
483
|
};
|
|
484
|
-
},
|
|
485
|
-
let t =
|
|
484
|
+
}, _t = (e, t) => !n.readonlyFeedback && Cn(e, t), an = (e) => n.readonlyFeedback ? Y(e) : void 0, on = (e) => an(e)?.vote, sn = (e) => {
|
|
485
|
+
let t = an(e);
|
|
486
486
|
if (t?.vote) return;
|
|
487
487
|
let n = t?.metadata?.reactionEmoji;
|
|
488
488
|
return typeof n == "string" && /\p{Extended_Pictographic}/u.test(n) ? n : void 0;
|
|
489
|
-
},
|
|
490
|
-
if (
|
|
491
|
-
let t =
|
|
489
|
+
}, cn = (e) => !!(on(e) || sn(e)), ln = (e) => {
|
|
490
|
+
if (sn(e)) return "pk-chatbot-message__reaction--neutral";
|
|
491
|
+
let t = on(e);
|
|
492
492
|
return t === "upvote" ? "pk-chatbot-message__reaction--positive" : t === "downvote" ? "pk-chatbot-message__reaction--negative" : "pk-chatbot-message__reaction--neutral";
|
|
493
|
-
},
|
|
494
|
-
let t =
|
|
493
|
+
}, un = (e) => {
|
|
494
|
+
let t = on(e);
|
|
495
495
|
return i(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
|
|
496
|
-
},
|
|
497
|
-
let t =
|
|
496
|
+
}, dn = (e) => {
|
|
497
|
+
let t = mn(e);
|
|
498
498
|
for (let e = t.length - 1; e >= 0; --e) if (T(t[e])) return e;
|
|
499
499
|
return -1;
|
|
500
|
-
},
|
|
501
|
-
let e =
|
|
500
|
+
}, fn = O(() => n.messages?.[n.messages.length - 1]), X = O(() => {
|
|
501
|
+
let e = fn.value;
|
|
502
502
|
return e ? e.parts[e.parts.length - 1] : null;
|
|
503
|
-
}),
|
|
503
|
+
}), pn = O(() => {
|
|
504
504
|
let e = /* @__PURE__ */ new Map();
|
|
505
505
|
for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, h(ne(m(t.parts))));
|
|
506
506
|
return e;
|
|
507
|
-
}),
|
|
507
|
+
}), mn = (e) => pn.value.get(e.id) ?? e.parts, hn = O(() => n.status === "error"), gn = O(() => n.awaitingSpokenAnswer === !0 && !q.value), _n = O(() => gn.value && fn.value?.role === "user" && !hn.value), vn = (e, t) => t(), yn = O(() => {
|
|
508
508
|
let e = X.value;
|
|
509
509
|
return p(i, e, l?.value);
|
|
510
|
-
}),
|
|
510
|
+
}), bn = O(() => {
|
|
511
511
|
let e = X.value;
|
|
512
512
|
return le(e);
|
|
513
|
-
}),
|
|
513
|
+
}), xn = (e) => n.messages?.findIndex((t) => t.id === e), Z = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, Sn = (e) => Z(e) && n.status === "ready" && !n.hostWorking && !!n.actions?.includes("regenerate"), Cn = (e, t) => (!Z(t) || n.status === "ready" && !n.hostWorking) && !!n.actions?.includes(e), wn = (e, t) => Cn("copy", t) && e.parts.some((e) => T(e) && e.text.trim()), Tn = z();
|
|
514
|
+
async function En(e, t) {
|
|
515
|
+
let n = t.currentTarget?.closest(".pk-chatbot-message")?.querySelectorAll(".pk-chatbot-message__text .wysiwyg");
|
|
516
|
+
await de({
|
|
517
|
+
html: fe(Array.from(n ?? [])),
|
|
518
|
+
text: e.parts.filter(T).map((e) => e.text.trim()).filter(Boolean).join("\n\n")
|
|
519
|
+
}) && (Tn.value = e.id, setTimeout(() => {
|
|
520
|
+
Tn.value === e.id && (Tn.value = void 0);
|
|
521
|
+
}, 2e3));
|
|
522
|
+
}
|
|
523
|
+
let Dn = (e) => {
|
|
514
524
|
let t = e.parts[e.parts.length - 1];
|
|
515
525
|
return T(t);
|
|
516
|
-
},
|
|
517
|
-
if (!x(n) ||
|
|
518
|
-
let i =
|
|
519
|
-
return i && r ===
|
|
520
|
-
},
|
|
526
|
+
}, On = (e) => e.parts.some((e) => ge(e) || xe(e) || !!x(e)), kn = (e) => !!n.showExtendedSteps && Q(e) && On(e), An = (e) => n.hostConfirmation !== void 0 && x(e) !== void 0 && e.toolCallId === n.hostConfirmation.toolCallId, jn = O(() => n.hostConfirmation !== void 0 && !n.messages?.some((e) => e.parts.some(An))), Mn = (e, t) => q.value && Z(e) && x(t)?.state === "input-available", Nn = (e, t, n, r) => {
|
|
527
|
+
if (!x(n) || kn(e)) return !1;
|
|
528
|
+
let i = Mn(t, n);
|
|
529
|
+
return i && r === mn(e).length - 1 ? !1 : i || f(n) || !ve(e);
|
|
530
|
+
}, Pn = (e, t) => {
|
|
521
531
|
let n = x(t);
|
|
522
|
-
return n?.state === "output-error" ? i(n.errorText === "The user refused this call. Do not repeat it unless the user asks." ? "toolApproval.denied" : "messagePart.hostToolFailed") : n?.state === "input-available" && !
|
|
523
|
-
},
|
|
524
|
-
let t =
|
|
532
|
+
return n?.state === "output-error" ? i(n.errorText === "The user refused this call. Do not repeat it unless the user asks." ? "toolApproval.denied" : "messagePart.hostToolFailed") : n?.state === "input-available" && !Mn(e, t) ? i("messagePart.hostToolNoAnswer") : void 0;
|
|
533
|
+
}, Fn = (e) => xe(e) && !g(e) && !!(nt[w(e)] || ee[e.type] || n.showAllMessageParts), In = (e) => e.parts.some((e) => T(e) && !!e.text.trim() || ye(e) || _(e) && !g(e) || Fn(e)), Q = (e) => e.role === "assistant", Ln = (e) => e.role === "user", Rn = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), zn = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), Bn = (e) => {
|
|
534
|
+
let t = Rn(e)?.metadata?.createdAt, n = zn(e)?.metadata?.createdAt;
|
|
525
535
|
if (!t || !n) return;
|
|
526
536
|
let r = new Date(t), i = new Date(n);
|
|
527
537
|
return r.toDateString() === i.toDateString() ? void 0 : i;
|
|
528
|
-
}, $ = O(() => n.showAllMessageParts ?
|
|
538
|
+
}, $ = O(() => n.showAllMessageParts ? vt([]) : vt(n.messages ?? [], In)), Vn = (e) => e ? "ri:calendar-schedule-line" : "ri:alarm-line", Hn = (e) => {
|
|
529
539
|
let t = e.metadata?.wakeup;
|
|
530
540
|
return t?.taskId ? i("label.taskRun", { reason: t.reason }) : i("label.wakeupCheck");
|
|
531
|
-
},
|
|
541
|
+
}, Un = (e) => {
|
|
532
542
|
let t = s(e.lastAt ?? Date.now(), "time");
|
|
533
543
|
return e.taskId ? i("label.taskQuietRun", {
|
|
534
544
|
reason: e.reason,
|
|
@@ -538,83 +548,83 @@ var _t = ["aria-busy"], vt = {
|
|
|
538
548
|
count: e.count,
|
|
539
549
|
time: t
|
|
540
550
|
}, e.count);
|
|
541
|
-
},
|
|
551
|
+
}, Wn = O(() => {
|
|
542
552
|
let e = 0;
|
|
543
553
|
return (n.messages ?? []).map((t) => t.parts.length > 0 ? ++e : void 0);
|
|
544
|
-
}),
|
|
554
|
+
}), Gn = (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), Kn = (e) => {
|
|
545
555
|
let t = new Date(e), n = t.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
|
|
546
556
|
return s(t, n ? "time" : "date-time");
|
|
547
|
-
},
|
|
557
|
+
}, qn = (e) => {
|
|
548
558
|
let { createdAt: t, completedAt: n } = e.metadata ?? {};
|
|
549
559
|
if (t && n) return S(c, n - t);
|
|
550
|
-
},
|
|
551
|
-
return
|
|
552
|
-
if (await
|
|
553
|
-
let e =
|
|
554
|
-
e && (Z(
|
|
560
|
+
}, Jn = Ge("feedbackMessageEl");
|
|
561
|
+
return H(() => n.feedbackMessageId, async () => {
|
|
562
|
+
if (await I(), !n.feedbackMessageId) return;
|
|
563
|
+
let e = Jn.value?.[0]?.$el;
|
|
564
|
+
e && (Z(xn(n.feedbackMessageId)) ? Je() : e.scrollIntoView({
|
|
555
565
|
behavior: "smooth",
|
|
556
566
|
block: "center"
|
|
557
567
|
}));
|
|
558
568
|
}), (t, n) => {
|
|
559
|
-
let u =
|
|
560
|
-
return
|
|
569
|
+
let u = Ne, f = je, m = a, h = Me;
|
|
570
|
+
return R(), j("div", {
|
|
561
571
|
ref_key: "scrollEl",
|
|
562
572
|
ref: C,
|
|
563
|
-
class:
|
|
564
|
-
"pk-chatbot-messages--settling":
|
|
573
|
+
class: L(["pk-chatbot-messages scrollbar-thin", {
|
|
574
|
+
"pk-chatbot-messages--settling": it.value,
|
|
565
575
|
"pk-chatbot-messages--parent-scrolls": e.parentScrolls
|
|
566
576
|
}]),
|
|
567
577
|
role: "log",
|
|
568
578
|
"aria-live": "polite",
|
|
569
579
|
"aria-relevant": "additions text",
|
|
570
|
-
"aria-busy":
|
|
571
|
-
style:
|
|
580
|
+
"aria-busy": q.value,
|
|
581
|
+
style: Le({
|
|
572
582
|
"--chatbot-main-color": e.mainColor,
|
|
573
|
-
"--chatbot-contrast-color":
|
|
583
|
+
"--chatbot-contrast-color": F.value
|
|
574
584
|
}),
|
|
575
|
-
onScroll:
|
|
585
|
+
onScroll: tt
|
|
576
586
|
}, [
|
|
577
|
-
e.showScrollToBottom &&
|
|
578
|
-
items:
|
|
579
|
-
"active-id":
|
|
580
|
-
onSelect:
|
|
587
|
+
e.showScrollToBottom && K.value.length > 1 ? (R(), j("div", bt, [N(ke, {
|
|
588
|
+
items: K.value,
|
|
589
|
+
"active-id": Qe.value,
|
|
590
|
+
onSelect: rt
|
|
581
591
|
}, null, 8, ["items", "active-id"])])) : A("", !0),
|
|
582
592
|
M("div", {
|
|
583
593
|
ref_key: "wrapperEl",
|
|
584
594
|
ref: P,
|
|
585
595
|
class: "pk-chatbot-messages__wrapper"
|
|
586
596
|
}, [
|
|
587
|
-
(
|
|
588
|
-
|
|
589
|
-
$.value.quietRuns.has(a.id) ? (
|
|
597
|
+
(R(!0), j(E, null, Be(e.messages, (a, y) => (R(), j(E, { key: a.id }, [
|
|
598
|
+
Ln(a) && Bn(y) ? (R(), j("div", xt, [M("span", St, B(V(s)(Bn(y), "short")), 1)])) : A("", !0),
|
|
599
|
+
$.value.quietRuns.has(a.id) ? (R(), j("div", {
|
|
590
600
|
key: 1,
|
|
591
601
|
class: "pk-chatbot-wakeup",
|
|
592
602
|
title: $.value.quietRuns.get(a.id).reason
|
|
593
603
|
}, [N(u, {
|
|
594
|
-
name:
|
|
604
|
+
name: Vn($.value.quietRuns.get(a.id).taskId),
|
|
595
605
|
class: "shrink-0"
|
|
596
|
-
}, null, 8, ["name"]), M("span", null,
|
|
606
|
+
}, null, 8, ["name"]), M("span", null, B(Un($.value.quietRuns.get(a.id))), 1)], 8, Ct)) : V(G)(a) && !$.value.hidden.has(a.id) && !e.showAllMessageParts ? (R(), j("div", {
|
|
597
607
|
key: 2,
|
|
598
608
|
class: "pk-chatbot-wakeup",
|
|
599
609
|
title: a.metadata?.wakeup?.reason
|
|
600
610
|
}, [N(u, {
|
|
601
|
-
name:
|
|
611
|
+
name: Vn(a.metadata?.wakeup?.taskId),
|
|
602
612
|
class: "shrink-0"
|
|
603
|
-
}, null, 8, ["name"]), M("span", null, [
|
|
604
|
-
(!
|
|
613
|
+
}, null, 8, ["name"]), M("span", null, [Pe(B(Hn(a)) + " ", 1), a.metadata?.createdAt ? (R(), j(E, { key: 0 }, [Pe(" · " + B(V(s)(a.metadata.createdAt, "time")), 1)], 64)) : A("", !0)])], 8, wt)) : A("", !0),
|
|
614
|
+
(!V(G)(a) || e.showAllMessageParts) && (!$.value.hidden.has(a.id) || q.value && Z(y)) && (a.parts.length || Z(y) && q.value && Q(a)) ? (R(), j("div", {
|
|
605
615
|
key: 3,
|
|
606
|
-
class:
|
|
607
|
-
style:
|
|
616
|
+
class: L(["pk-chatbot-message", [`pk-chatbot-message--${a.role}`, { "pk-chatbot-message--loading": q.value && Z(y) && Q(a) }]]),
|
|
617
|
+
style: Le({ minHeight: Z(y) && Q(a) && !hn.value ? `${J.value}px` : void 0 })
|
|
608
618
|
}, [
|
|
609
619
|
N(D, {
|
|
610
620
|
appear: "",
|
|
611
621
|
name: "pk-chatbot-part"
|
|
612
622
|
}, {
|
|
613
|
-
default:
|
|
623
|
+
default: U(() => [kn(a) ? (R(), k(Oe, {
|
|
614
624
|
key: 0,
|
|
615
625
|
message: a,
|
|
616
|
-
"is-streaming":
|
|
617
|
-
"has-content":
|
|
626
|
+
"is-streaming": q.value && Z(y),
|
|
627
|
+
"has-content": In(a),
|
|
618
628
|
"hide-reasoning": e.hideReasoning,
|
|
619
629
|
"is-dark": e.isDark
|
|
620
630
|
}, null, 8, [
|
|
@@ -626,64 +636,66 @@ var _t = ["aria-busy"], vt = {
|
|
|
626
636
|
])) : A("", !0)]),
|
|
627
637
|
_: 2
|
|
628
638
|
}, 1024),
|
|
629
|
-
(
|
|
639
|
+
(R(!0), j(E, null, Be(mn(a), (s, c) => (R(), j(E, { key: V(re)(s, c) }, [V(T)(s) && s.text.trim() ? (R(), k(D, {
|
|
630
640
|
key: 0,
|
|
631
641
|
appear: "",
|
|
632
642
|
name: "pk-chatbot-part"
|
|
633
643
|
}, {
|
|
634
|
-
default:
|
|
644
|
+
default: U(() => [M("div", Tt, [Ve(t.$slots, "text", Ie({ ref_for: !0 }, {
|
|
635
645
|
message: a,
|
|
636
646
|
part: s,
|
|
637
647
|
index: y,
|
|
638
|
-
isLoading:
|
|
639
|
-
}), () => [Q(a) ? (
|
|
648
|
+
isLoading: q.value
|
|
649
|
+
}), () => [Q(a) ? (R(), k(pe, {
|
|
640
650
|
key: 0,
|
|
641
651
|
class: "wysiwyg",
|
|
642
652
|
markdown: s.text,
|
|
643
653
|
"is-dark": e.isDark,
|
|
644
|
-
loading: Z(y) && e.status === "streaming"
|
|
654
|
+
loading: Z(y) && e.status === "streaming",
|
|
655
|
+
"copy-tables": !!e.actions?.includes("copy")
|
|
645
656
|
}, null, 8, [
|
|
646
657
|
"markdown",
|
|
647
658
|
"is-dark",
|
|
648
|
-
"loading"
|
|
649
|
-
|
|
659
|
+
"loading",
|
|
660
|
+
"copy-tables"
|
|
661
|
+
])) : (R(), j(E, { key: 1 }, [Pe(B(s.text), 1)], 64))]), cn(a.id) && !Y(a.id)?.comment && c === dn(a) ? (R(), j("span", {
|
|
650
662
|
key: 0,
|
|
651
|
-
class:
|
|
652
|
-
title:
|
|
653
|
-
}, [
|
|
663
|
+
class: L(["pk-chatbot-message__reaction", ln(a.id)]),
|
|
664
|
+
title: un(a.id)
|
|
665
|
+
}, [sn(a.id) ? (R(), j("span", Dt, B(sn(a.id)), 1)) : (R(), k(u, {
|
|
654
666
|
key: 1,
|
|
655
|
-
name:
|
|
656
|
-
}, null, 8, ["name"]))], 10,
|
|
667
|
+
name: on(a.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
|
|
668
|
+
}, null, 8, ["name"]))], 10, Et)) : A("", !0)])]),
|
|
657
669
|
_: 2
|
|
658
|
-
}, 1024)) :
|
|
670
|
+
}, 1024)) : V(ye)(s) ? (R(), k(D, {
|
|
659
671
|
key: 1,
|
|
660
672
|
appear: "",
|
|
661
673
|
name: "pk-chatbot-part"
|
|
662
674
|
}, {
|
|
663
|
-
default:
|
|
675
|
+
default: U(() => [V(d)(s.filename, s.mediaType) ? (R(), j("div", Ot, [N(Ce, {
|
|
664
676
|
"media-type": s.mediaType,
|
|
665
677
|
url: s.url,
|
|
666
678
|
filename: s.filename,
|
|
667
|
-
size:
|
|
679
|
+
size: V(be)(s)?.bytesCount
|
|
668
680
|
}, null, 8, [
|
|
669
681
|
"media-type",
|
|
670
682
|
"url",
|
|
671
683
|
"filename",
|
|
672
684
|
"size"
|
|
673
|
-
]), N(
|
|
685
|
+
]), N(we, {
|
|
674
686
|
url: s.url,
|
|
675
|
-
transcript:
|
|
687
|
+
transcript: V(_e)(s),
|
|
676
688
|
pending: e.status === "submitted" && Z(y)
|
|
677
689
|
}, null, 8, [
|
|
678
690
|
"url",
|
|
679
691
|
"transcript",
|
|
680
692
|
"pending"
|
|
681
|
-
])])) : (
|
|
693
|
+
])])) : (R(), k(Ce, {
|
|
682
694
|
key: 1,
|
|
683
695
|
"media-type": s.mediaType,
|
|
684
696
|
url: s.url,
|
|
685
697
|
filename: s.filename,
|
|
686
|
-
size:
|
|
698
|
+
size: V(be)(s)?.bytesCount
|
|
687
699
|
}, null, 8, [
|
|
688
700
|
"media-type",
|
|
689
701
|
"url",
|
|
@@ -691,15 +703,15 @@ var _t = ["aria-busy"], vt = {
|
|
|
691
703
|
"size"
|
|
692
704
|
]))]),
|
|
693
705
|
_: 2
|
|
694
|
-
}, 1024)) :
|
|
706
|
+
}, 1024)) : V(_)(s) && !V(g)(s) ? (R(), k(D, {
|
|
695
707
|
key: 2,
|
|
696
708
|
appear: "",
|
|
697
709
|
name: "pk-chatbot-part"
|
|
698
710
|
}, {
|
|
699
|
-
default:
|
|
711
|
+
default: U(() => [(R(), k(at, {
|
|
700
712
|
key: `approval-${c}`,
|
|
701
713
|
part: s,
|
|
702
|
-
actionable: e.interactive === !0 && (
|
|
714
|
+
actionable: e.interactive === !0 && (V(v)(s) || Z(y)),
|
|
703
715
|
"call-verdict": e.confirmVerdictsOnCall?.get(s.toolCallId ?? ""),
|
|
704
716
|
onRespond: (e) => ae(s, e)
|
|
705
717
|
}, null, 8, [
|
|
@@ -709,13 +721,13 @@ var _t = ["aria-busy"], vt = {
|
|
|
709
721
|
"onRespond"
|
|
710
722
|
]))]),
|
|
711
723
|
_: 2
|
|
712
|
-
}, 1024)) :
|
|
724
|
+
}, 1024)) : An(s) ? (R(), k(D, {
|
|
713
725
|
key: 3,
|
|
714
726
|
appear: "",
|
|
715
727
|
name: "pk-chatbot-part"
|
|
716
728
|
}, {
|
|
717
|
-
default:
|
|
718
|
-
question: e.hostConfirmation?.question ??
|
|
729
|
+
default: U(() => [N(pt, {
|
|
730
|
+
question: e.hostConfirmation?.question ?? V(i)("toolApproval.hostCall", { name: V(p)(V(i), s) }),
|
|
719
731
|
details: e.hostConfirmation?.details,
|
|
720
732
|
unchanged: e.hostConfirmation?.unchanged,
|
|
721
733
|
onRespond: n[0] ||= (e) => r("host-confirm-respond", e)
|
|
@@ -725,108 +737,108 @@ var _t = ["aria-busy"], vt = {
|
|
|
725
737
|
"unchanged"
|
|
726
738
|
])]),
|
|
727
739
|
_: 2
|
|
728
|
-
}, 1024)) :
|
|
740
|
+
}, 1024)) : Nn(a, y, s, c) ? (R(), k(D, {
|
|
729
741
|
key: 4,
|
|
730
742
|
appear: "",
|
|
731
743
|
name: "pk-chatbot-part"
|
|
732
744
|
}, {
|
|
733
|
-
default:
|
|
745
|
+
default: U(() => [M("div", kt, [M("div", At, [
|
|
734
746
|
N(u, {
|
|
735
|
-
name:
|
|
747
|
+
name: Mn(y, s) ? "loading-loop" : V(le)(s) ?? "ri:apps-line",
|
|
736
748
|
class: "shrink-0"
|
|
737
749
|
}, null, 8, ["name"]),
|
|
738
|
-
M("span",
|
|
739
|
-
|
|
740
|
-
]), b(s)?.length ? (
|
|
750
|
+
M("span", jt, B(V(p)(V(i), s, V(l))), 1),
|
|
751
|
+
Pn(y, s) ? (R(), j("span", Mt, " · " + B(Pn(y, s)), 1)) : A("", !0)
|
|
752
|
+
]), b(s)?.length ? (R(), k(f, {
|
|
741
753
|
key: 0,
|
|
742
|
-
title:
|
|
754
|
+
title: V(i)("toolApproval.changesCount", b(s).length),
|
|
743
755
|
modifiers: "compact",
|
|
744
756
|
class: "pk-chatbot-message__host-changes"
|
|
745
757
|
}, {
|
|
746
|
-
default:
|
|
758
|
+
default: U(() => [N(De, { changes: b(s) }, null, 8, ["changes"])]),
|
|
747
759
|
_: 2
|
|
748
760
|
}, 1032, ["title"])) : A("", !0)])]),
|
|
749
761
|
_: 2
|
|
750
|
-
}, 1024)) :
|
|
762
|
+
}, 1024)) : Fn(s) ? (R(), k(D, {
|
|
751
763
|
key: 5,
|
|
752
764
|
appear: "",
|
|
753
765
|
name: "pk-chatbot-part"
|
|
754
766
|
}, {
|
|
755
|
-
default:
|
|
756
|
-
key: `component-${c}-${
|
|
767
|
+
default: U(() => [!V(ee)[s.type] && V(nt)[V(w)(s)] ? (R(), k(He(V(nt)[V(w)(s)]), Ie({
|
|
768
|
+
key: `component-${c}-${V(te)(s)}`,
|
|
757
769
|
part: s
|
|
758
|
-
}, { ref_for: !0 },
|
|
770
|
+
}, { ref_for: !0 }, ht(s)), null, 16, ["part"])) : Ve(t.$slots, s.type, Ie({ ref_for: !0 }, {
|
|
759
771
|
message: a,
|
|
760
772
|
part: s,
|
|
761
773
|
index: y,
|
|
762
|
-
isLoading:
|
|
763
|
-
}), () => [e.showAllMessageParts ? (
|
|
774
|
+
isLoading: q.value
|
|
775
|
+
}), () => [e.showAllMessageParts ? (R(), j("div", Nt, [M("div", Pt, [V(le)(s) ? (R(), k(u, {
|
|
764
776
|
key: 0,
|
|
765
|
-
name:
|
|
777
|
+
name: V(le)(s),
|
|
766
778
|
class: "shrink-0"
|
|
767
|
-
}, null, 8, ["name"])) : A("", !0), M("span",
|
|
768
|
-
t:
|
|
769
|
-
te:
|
|
779
|
+
}, null, 8, ["name"])) : A("", !0), M("span", Ft, B(V(ce)(s, {
|
|
780
|
+
t: V(i),
|
|
781
|
+
te: V(o)
|
|
770
782
|
})), 1)])])) : A("", !0)], void 0, 1)]),
|
|
771
783
|
_: 2
|
|
772
784
|
}, 1024)) : A("", !0), N(D, { mode: "out-in" }, {
|
|
773
|
-
default:
|
|
785
|
+
default: U(() => [c === dn(a) && e.readonlyFeedback && Y(a.id)?.comment ? (R(), k(Se, {
|
|
774
786
|
key: 0,
|
|
775
787
|
feedback: Y(a.id)
|
|
776
788
|
}, null, 8, ["feedback"])) : A("", !0)]),
|
|
777
789
|
_: 2
|
|
778
790
|
}, 1024)], 64))), 128)),
|
|
779
|
-
|
|
791
|
+
Ln(a) && a.metadata?.pagePointer ? (R(), j("div", {
|
|
780
792
|
key: 0,
|
|
781
793
|
class: "pk-chatbot-message__pointer",
|
|
782
|
-
title: a.metadata.pagePointer.kind === "text" ?
|
|
794
|
+
title: a.metadata.pagePointer.kind === "text" ? V(i)("pagePointer.selected") : V(i)("pagePointer.pointed")
|
|
783
795
|
}, [N(u, {
|
|
784
796
|
name: a.metadata.pagePointer.kind === "text" ? "ri:double-quotes-l" : "ri:focus-3-line",
|
|
785
797
|
class: "pk-chatbot-message__pointer-icon"
|
|
786
|
-
}, null, 8, ["name"]), M("span",
|
|
798
|
+
}, null, 8, ["name"]), M("span", Lt, B(a.metadata.pagePointer.kind === "text" ? `«${a.metadata.pagePointer.label}»` : a.metadata.pagePointer.label), 1)], 8, It)) : Ln(a) && a.metadata?.filePointer ? (R(), j("div", {
|
|
787
799
|
key: 1,
|
|
788
800
|
class: "pk-chatbot-message__pointer",
|
|
789
|
-
title:
|
|
801
|
+
title: V(i)("selectionActions.selectedInFile")
|
|
790
802
|
}, [N(u, {
|
|
791
803
|
name: a.metadata.filePointer.format === "docx" ? "ri:file-word-2-line" : "ri:file-excel-2-line",
|
|
792
804
|
class: "pk-chatbot-message__pointer-icon"
|
|
793
|
-
}, null, 8, ["name"]), M("span",
|
|
805
|
+
}, null, 8, ["name"]), M("span", zt, B(a.metadata.filePointer.label), 1)], 8, Rt)) : A("", !0),
|
|
794
806
|
N(D, {
|
|
795
807
|
name: "fade-in",
|
|
796
808
|
mode: "out-in"
|
|
797
809
|
}, {
|
|
798
|
-
default:
|
|
810
|
+
default: U(() => [q.value && Z(y) && !Dn(a) && !e.hostConfirmation && Q(a) && (!kn(a) || In(a)) ? (R(), j("div", {
|
|
799
811
|
key: `loading-info-${a.id}`,
|
|
800
812
|
class: "pk-chatbot-message__loading-info"
|
|
801
|
-
}, [M("div",
|
|
813
|
+
}, [M("div", Bt, [
|
|
802
814
|
N(u, {
|
|
803
815
|
name: "loading-loop",
|
|
804
816
|
class: "shrink-0"
|
|
805
817
|
}),
|
|
806
818
|
N(D, { mode: "out-in" }, {
|
|
807
|
-
default:
|
|
808
|
-
key:
|
|
819
|
+
default: U(() => [bn.value ? (R(), k(u, {
|
|
820
|
+
key: bn.value,
|
|
809
821
|
class: "shrink-0",
|
|
810
|
-
name:
|
|
822
|
+
name: bn.value
|
|
811
823
|
}, null, 8, ["name"])) : A("", !0)]),
|
|
812
824
|
_: 1
|
|
813
825
|
}),
|
|
814
826
|
N(D, { mode: "out-in" }, {
|
|
815
|
-
default:
|
|
816
|
-
key:
|
|
827
|
+
default: U(() => [yn.value ? (R(), j("span", {
|
|
828
|
+
key: yn.value,
|
|
817
829
|
class: "text-12"
|
|
818
|
-
},
|
|
830
|
+
}, B(yn.value), 1)) : A("", !0)]),
|
|
819
831
|
_: 1
|
|
820
832
|
})
|
|
821
833
|
]), N(D, {
|
|
822
834
|
name: "fade-in",
|
|
823
835
|
mode: "out-in"
|
|
824
836
|
}, {
|
|
825
|
-
default:
|
|
837
|
+
default: U(() => [!e.hideReasoning && !kn(a) && X.value && "text" in X.value && X.value.text.trim() ? (R(), k(Ee, {
|
|
826
838
|
key: 0,
|
|
827
839
|
markdown: X.value.text,
|
|
828
840
|
"is-dark": e.isDark,
|
|
829
|
-
"tail-length":
|
|
841
|
+
"tail-length": V(ie),
|
|
830
842
|
"inner-class": "wysiwyg",
|
|
831
843
|
class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
|
|
832
844
|
}, null, 8, [
|
|
@@ -839,31 +851,44 @@ var _t = ["aria-busy"], vt = {
|
|
|
839
851
|
_: 2
|
|
840
852
|
}, 1024),
|
|
841
853
|
N(D, { mode: "out-in" }, {
|
|
842
|
-
default:
|
|
854
|
+
default: U(() => [Gn(a, y) ? (R(), j("div", Vt, [
|
|
843
855
|
N(h, {
|
|
844
856
|
modifiers: "compact",
|
|
845
857
|
class: "mr-auto shrink-0"
|
|
846
858
|
}, {
|
|
847
|
-
default:
|
|
859
|
+
default: U(() => [
|
|
848
860
|
N(D, { mode: "out-in" }, {
|
|
849
|
-
default:
|
|
861
|
+
default: U(() => [Sn(y) ? (R(), k(m, {
|
|
850
862
|
key: 0,
|
|
851
863
|
icon: "ri:reset-right-line",
|
|
852
864
|
modifiers: "action-quiet-small",
|
|
853
|
-
title:
|
|
854
|
-
"aria-label":
|
|
855
|
-
onClick: n[1] ||=
|
|
865
|
+
title: V(i)("action.regenerate"),
|
|
866
|
+
"aria-label": V(i)("action.regenerate"),
|
|
867
|
+
onClick: n[1] ||= W((e) => t.$emit("regenerate"), ["stop"])
|
|
856
868
|
}, null, 8, ["title", "aria-label"])) : A("", !0)]),
|
|
857
869
|
_: 2
|
|
858
870
|
}, 1024),
|
|
871
|
+
wn(a, y) ? (R(), k(m, {
|
|
872
|
+
key: 0,
|
|
873
|
+
icon: Tn.value === a.id ? "ri:check-line" : "ri:file-copy-line",
|
|
874
|
+
modifiers: "action-quiet-small",
|
|
875
|
+
title: V(i)("action.copyAnswer"),
|
|
876
|
+
"aria-label": V(i)("action.copyAnswer"),
|
|
877
|
+
onClick: W((e) => En(a, e), ["stop"])
|
|
878
|
+
}, null, 8, [
|
|
879
|
+
"icon",
|
|
880
|
+
"title",
|
|
881
|
+
"aria-label",
|
|
882
|
+
"onClick"
|
|
883
|
+
])) : A("", !0),
|
|
859
884
|
N(D, { mode: "out-in" }, {
|
|
860
|
-
default:
|
|
885
|
+
default: U(() => [Cn("show-info", y) ? (R(), k(m, {
|
|
861
886
|
key: 0,
|
|
862
887
|
icon: "ri:information-line",
|
|
863
|
-
title:
|
|
864
|
-
"aria-label":
|
|
888
|
+
title: V(i)("action.getMoreInfo"),
|
|
889
|
+
"aria-label": V(i)("action.getMoreInfo"),
|
|
865
890
|
modifiers: "action-quiet-small",
|
|
866
|
-
onClick:
|
|
891
|
+
onClick: W((e) => t.$emit("show-info", a), ["stop"])
|
|
867
892
|
}, null, 8, [
|
|
868
893
|
"title",
|
|
869
894
|
"aria-label",
|
|
@@ -872,14 +897,14 @@ var _t = ["aria-busy"], vt = {
|
|
|
872
897
|
_: 2
|
|
873
898
|
}, 1024),
|
|
874
899
|
N(D, { mode: "out-in" }, {
|
|
875
|
-
default:
|
|
900
|
+
default: U(() => [Cn("revise", y) ? (R(), k(m, {
|
|
876
901
|
key: 0,
|
|
877
|
-
icon:
|
|
878
|
-
title:
|
|
879
|
-
"aria-label":
|
|
902
|
+
icon: dt(a.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
|
|
903
|
+
title: dt(a.id) ? V(i)("action.editRevise") : V(i)("action.createRevise"),
|
|
904
|
+
"aria-label": dt(a.id) ? V(i)("action.editRevise") : V(i)("action.createRevise"),
|
|
880
905
|
modifiers: "action-quiet-small",
|
|
881
|
-
class:
|
|
882
|
-
onClick:
|
|
906
|
+
class: L({ "text-brand-graphic": dt(a.id) }),
|
|
907
|
+
onClick: W((e) => t.$emit("revise", a), ["stop"])
|
|
883
908
|
}, null, 8, [
|
|
884
909
|
"icon",
|
|
885
910
|
"title",
|
|
@@ -890,14 +915,14 @@ var _t = ["aria-busy"], vt = {
|
|
|
890
915
|
_: 2
|
|
891
916
|
}, 1024),
|
|
892
917
|
N(D, { mode: "out-in" }, {
|
|
893
|
-
default:
|
|
918
|
+
default: U(() => [_t("upvote", y) ? (R(), k(m, {
|
|
894
919
|
key: 0,
|
|
895
920
|
icon: Y(a.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
|
|
896
|
-
title:
|
|
897
|
-
"aria-label":
|
|
921
|
+
title: V(i)("action.upvote"),
|
|
922
|
+
"aria-label": V(i)("action.upvote"),
|
|
898
923
|
"aria-pressed": String(Y(a.id)?.vote === "upvote"),
|
|
899
924
|
modifiers: "action-quiet-small",
|
|
900
|
-
onClick:
|
|
925
|
+
onClick: W((e) => t.$emit("upvote", a), ["stop"])
|
|
901
926
|
}, null, 8, [
|
|
902
927
|
"icon",
|
|
903
928
|
"title",
|
|
@@ -908,14 +933,14 @@ var _t = ["aria-busy"], vt = {
|
|
|
908
933
|
_: 2
|
|
909
934
|
}, 1024),
|
|
910
935
|
N(D, { mode: "out-in" }, {
|
|
911
|
-
default:
|
|
936
|
+
default: U(() => [_t("downvote", y) ? (R(), k(m, {
|
|
912
937
|
key: 0,
|
|
913
938
|
icon: Y(a.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
|
|
914
|
-
title:
|
|
915
|
-
"aria-label":
|
|
939
|
+
title: V(i)("action.downvote"),
|
|
940
|
+
"aria-label": V(i)("action.downvote"),
|
|
916
941
|
"aria-pressed": String(Y(a.id)?.vote === "downvote"),
|
|
917
942
|
modifiers: "action-quiet-small",
|
|
918
|
-
onClick:
|
|
943
|
+
onClick: W((e) => t.$emit("downvote", a), ["stop"])
|
|
919
944
|
}, null, 8, [
|
|
920
945
|
"icon",
|
|
921
946
|
"title",
|
|
@@ -926,13 +951,13 @@ var _t = ["aria-busy"], vt = {
|
|
|
926
951
|
_: 2
|
|
927
952
|
}, 1024),
|
|
928
953
|
N(D, { mode: "out-in" }, {
|
|
929
|
-
default:
|
|
954
|
+
default: U(() => [_t("feedback", y) ? (R(), k(m, {
|
|
930
955
|
key: 0,
|
|
931
956
|
icon: Y(a.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
|
|
932
|
-
title:
|
|
933
|
-
"aria-label":
|
|
957
|
+
title: V(i)("action.feedback"),
|
|
958
|
+
"aria-label": V(i)("action.feedback"),
|
|
934
959
|
modifiers: "action-quiet-small",
|
|
935
|
-
onClick:
|
|
960
|
+
onClick: W((e) => t.$emit("feedback", a), ["stop"])
|
|
936
961
|
}, null, 8, [
|
|
937
962
|
"icon",
|
|
938
963
|
"title",
|
|
@@ -944,38 +969,38 @@ var _t = ["aria-busy"], vt = {
|
|
|
944
969
|
]),
|
|
945
970
|
_: 2
|
|
946
971
|
}, 1024),
|
|
947
|
-
!e.showMessageDateTime && a.metadata?.createdAt && a.metadata?.completedAt ? (
|
|
972
|
+
!e.showMessageDateTime && a.metadata?.createdAt && a.metadata?.completedAt ? (R(), j("div", Ht, [M("time", {
|
|
948
973
|
datetime: new Date(a.metadata.createdAt).toISOString(),
|
|
949
|
-
title:
|
|
974
|
+
title: V(s)(new Date(a.metadata.createdAt), "date-time"),
|
|
950
975
|
class: "flex items-center gap-4 min-w-0"
|
|
951
976
|
}, [N(u, {
|
|
952
977
|
name: "ri:time-line",
|
|
953
978
|
class: "shrink-0"
|
|
954
|
-
}), M("span",
|
|
979
|
+
}), M("span", Wt, B(Kn(a.metadata.createdAt)), 1)], 8, Ut), qn(a) ? (R(), j("span", Gt, [N(u, {
|
|
955
980
|
name: "ri:hourglass-line",
|
|
956
981
|
class: "shrink-0"
|
|
957
|
-
}), M("span",
|
|
958
|
-
e.showMessageNumber ? (
|
|
982
|
+
}), M("span", Kt, B(qn(a)), 1)])) : A("", !0)])) : A("", !0),
|
|
983
|
+
e.showMessageNumber ? (R(), j("span", {
|
|
959
984
|
key: 1,
|
|
960
|
-
title:
|
|
985
|
+
title: V(i)("label.messageNumber", { n: Wn.value[y] }),
|
|
961
986
|
class: "text-12 text-word-3 tabular-nums"
|
|
962
|
-
}, " #" +
|
|
963
|
-
e.showMessageTokensCount && a.metadata?.totalTokens ? (
|
|
987
|
+
}, " #" + B(Wn.value[y]), 9, qt)) : A("", !0),
|
|
988
|
+
e.showMessageTokensCount && a.metadata?.totalTokens ? (R(), j("span", Jt, [N(u, {
|
|
964
989
|
name: "ri:ai-generate-2-line",
|
|
965
990
|
class: "shrink-0"
|
|
966
|
-
}), M("span",
|
|
967
|
-
e.showMessageDateTime && a.metadata?.createdAt ? (
|
|
991
|
+
}), M("span", Yt, B(V(c)(a.metadata.totalTokens, "integer")) + " " + B(V(i)("label.tokens")), 1)])) : A("", !0),
|
|
992
|
+
e.showMessageDateTime && a.metadata?.createdAt ? (R(), j("time", {
|
|
968
993
|
key: 3,
|
|
969
994
|
datetime: new Date(a.metadata?.createdAt).toISOString(),
|
|
970
995
|
class: "flex items-center gap-4 text-12 text-word-3"
|
|
971
996
|
}, [N(u, {
|
|
972
997
|
name: "ri:time-line",
|
|
973
998
|
class: "shrink-0"
|
|
974
|
-
}), M("span",
|
|
975
|
-
e.showMessageDateTime && a?.metadata?.completedAt && a?.metadata?.createdAt ? (
|
|
999
|
+
}), M("span", Zt, B(V(s)(new Date(a.metadata?.createdAt), "date-time")), 1)], 8, Xt)) : A("", !0),
|
|
1000
|
+
e.showMessageDateTime && a?.metadata?.completedAt && a?.metadata?.createdAt ? (R(), j("div", Qt, [N(u, {
|
|
976
1001
|
name: "ri:hourglass-line",
|
|
977
1002
|
class: "shrink-0"
|
|
978
|
-
}), N(
|
|
1003
|
+
}), N(Te, {
|
|
979
1004
|
class: "truncate",
|
|
980
1005
|
date: a.metadata?.createdAt,
|
|
981
1006
|
"end-date": a.metadata?.completedAt
|
|
@@ -984,11 +1009,11 @@ var _t = ["aria-busy"], vt = {
|
|
|
984
1009
|
_: 2
|
|
985
1010
|
}, 1024),
|
|
986
1011
|
N(D, { mode: "out-in" }, {
|
|
987
|
-
default:
|
|
1012
|
+
default: U(() => [a.id === e.feedbackMessageId ? (R(), k(he, {
|
|
988
1013
|
key: 0,
|
|
989
1014
|
ref_for: !0,
|
|
990
1015
|
ref_key: "feedbackMessageEl",
|
|
991
|
-
ref:
|
|
1016
|
+
ref: Jn,
|
|
992
1017
|
loading: e.feedbackLoading,
|
|
993
1018
|
submitted: e.feedbackSubmitted,
|
|
994
1019
|
error: e.feedbackError,
|
|
@@ -1006,24 +1031,24 @@ var _t = ["aria-busy"], vt = {
|
|
|
1006
1031
|
N(D, {
|
|
1007
1032
|
appear: "",
|
|
1008
1033
|
name: "pk-chatbot-part",
|
|
1009
|
-
onLeave:
|
|
1034
|
+
onLeave: vn
|
|
1010
1035
|
}, {
|
|
1011
|
-
default:
|
|
1036
|
+
default: U(() => [gn.value ? (R(), j("div", {
|
|
1012
1037
|
key: 0,
|
|
1013
1038
|
class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
|
|
1014
|
-
style:
|
|
1015
|
-
}, [M("div",
|
|
1039
|
+
style: Le({ minHeight: _n.value ? `${J.value}px` : void 0 })
|
|
1040
|
+
}, [M("div", $t, [M("div", en, [N(u, {
|
|
1016
1041
|
name: "loading-loop",
|
|
1017
1042
|
class: "shrink-0"
|
|
1018
|
-
}), M("span",
|
|
1043
|
+
}), M("span", tn, B(V(i)("label.answeringOnTheCall")), 1)])])], 4)) : A("", !0)]),
|
|
1019
1044
|
_: 1
|
|
1020
1045
|
}),
|
|
1021
1046
|
N(D, {
|
|
1022
1047
|
appear: "",
|
|
1023
1048
|
name: "pk-chatbot-part"
|
|
1024
1049
|
}, {
|
|
1025
|
-
default:
|
|
1026
|
-
question: e.hostConfirmation?.question ??
|
|
1050
|
+
default: U(() => [jn.value ? (R(), j("div", nn, [N(pt, {
|
|
1051
|
+
question: e.hostConfirmation?.question ?? V(i)("toolApproval.prompt"),
|
|
1027
1052
|
details: e.hostConfirmation?.details,
|
|
1028
1053
|
unchanged: e.hostConfirmation?.unchanged,
|
|
1029
1054
|
onRespond: n[4] ||= (e) => r("host-confirm-respond", e)
|
|
@@ -1038,7 +1063,7 @@ var _t = ["aria-busy"], vt = {
|
|
|
1038
1063
|
appear: "",
|
|
1039
1064
|
name: "pk-chatbot-part"
|
|
1040
1065
|
}, {
|
|
1041
|
-
default:
|
|
1066
|
+
default: U(() => [hn.value ? (R(), k(me, {
|
|
1042
1067
|
key: 0,
|
|
1043
1068
|
error: e.error,
|
|
1044
1069
|
onRetry: n[5] ||= (e) => t.$emit("auto-retry"),
|
|
@@ -1046,27 +1071,27 @@ var _t = ["aria-busy"], vt = {
|
|
|
1046
1071
|
}, null, 8, ["error"])) : A("", !0)]),
|
|
1047
1072
|
_: 1
|
|
1048
1073
|
}),
|
|
1049
|
-
|
|
1074
|
+
fn.value?.role === "user" && !_n.value || hn.value ? (R(), j("div", {
|
|
1050
1075
|
key: 0,
|
|
1051
1076
|
class: "pk-chatbot-messages__spacer",
|
|
1052
|
-
style:
|
|
1077
|
+
style: Le({ minHeight: `${J.value}px` })
|
|
1053
1078
|
}, null, 4)) : A("", !0)
|
|
1054
1079
|
], 512),
|
|
1055
1080
|
N(D, { name: "pk-chatbot-messages-fab" }, {
|
|
1056
|
-
default:
|
|
1081
|
+
default: U(() => [e.showScrollToBottom && (V(Ye) || !V(Xe)) ? (R(), j("button", {
|
|
1057
1082
|
key: 0,
|
|
1058
1083
|
type: "button",
|
|
1059
1084
|
class: "pk-chatbot-messages__scroll-to-bottom",
|
|
1060
|
-
title:
|
|
1061
|
-
"aria-label":
|
|
1062
|
-
onClick:
|
|
1063
|
-
}, [N(u, { name: "ri:arrow-down-line" })], 8,
|
|
1085
|
+
title: V(i)("action.scrollToBottom"),
|
|
1086
|
+
"aria-label": V(i)("action.scrollToBottom"),
|
|
1087
|
+
onClick: Ze
|
|
1088
|
+
}, [N(u, { name: "ri:arrow-down-line" })], 8, rn)) : A("", !0)]),
|
|
1064
1089
|
_: 1
|
|
1065
1090
|
})
|
|
1066
|
-
], 46,
|
|
1091
|
+
], 46, yt);
|
|
1067
1092
|
};
|
|
1068
1093
|
}
|
|
1069
1094
|
});
|
|
1070
|
-
export {
|
|
1095
|
+
export { an as t };
|
|
1071
1096
|
|
|
1072
|
-
//# sourceMappingURL=PkChatbotMessages-
|
|
1097
|
+
//# sourceMappingURL=PkChatbotMessages-CzPsgCAN.js.map
|