@8wave/ai-elements 0.117.0-beta.34 → 0.118.0-beta.15
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-DDAyL-4q.js → Agent-D8YrsP52.js} +15 -11
- package/dist/_chunks/Agent-D8YrsP52.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-D58uGMVJ.js → PkStreamingMarkdown--CcBvs19.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-D58uGMVJ.js.map → PkStreamingMarkdown--CcBvs19.js.map} +1 -1
- package/dist/_chunks/{PkToolEditSpreadsheet-y3S5O_ld.js → PkToolEditSpreadsheet-5vHzEy4P.js} +2 -2
- package/dist/_chunks/{PkToolEditSpreadsheet-y3S5O_ld.js.map → PkToolEditSpreadsheet-5vHzEy4P.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-DUD4RaA_.js → PkToolRequestGeolocation-Cj8hTfNF.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-DUD4RaA_.js.map → PkToolRequestGeolocation-Cj8hTfNF.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-ryjE17UY.js → PkToolRequestOAuthConnection-BWxR1hV4.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-ryjE17UY.js.map → PkToolRequestOAuthConnection-BWxR1hV4.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-CefFRN9d.js → PkToolShowArtifact-BVGN7hV2.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-CefFRN9d.js.map → PkToolShowArtifact-BVGN7hV2.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-Q58lENmc.js → PkToolShowContactForm-Blrwqpl0.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-Q58lENmc.js.map → PkToolShowContactForm-Blrwqpl0.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-DCluttiO.js → PkToolShowForm-BpGHaN6x.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-DCluttiO.js.map → PkToolShowForm-BpGHaN6x.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-DzU2_qQW.js → PkToolShowImageGallery-CIhIrIcY.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-DzU2_qQW.js.map → PkToolShowImageGallery-CIhIrIcY.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-0P7S5Ywo.js → PkToolShowProductList-BjWKnbyD.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-0P7S5Ywo.js.map → PkToolShowProductList-BjWKnbyD.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-D0IpU1NU.js → PkToolShowSources-8c9RvGV1.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-D0IpU1NU.js.map → PkToolShowSources-8c9RvGV1.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-0RVUEzK_.js → PkToolShowSuggestedReply-0KahUIlw.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-0RVUEzK_.js.map → PkToolShowSuggestedReply-0KahUIlw.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-C5RfIsFU.js → PkToolShowVideo-_V_d-PDr.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-C5RfIsFU.js.map → PkToolShowVideo-_V_d-PDr.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-D-sv52_o.js → PkToolShowWebPages-D55VEPjK.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-D-sv52_o.js.map → PkToolShowWebPages-D55VEPjK.js.map} +1 -1
- package/dist/_chunks/{browser-BJcsjj9S.js → browser-CuMi3Hhg.js} +796 -701
- package/dist/_chunks/browser-CuMi3Hhg.js.map +1 -0
- package/dist/_chunks/{chatImagePolicy-CiUR4uD1.js → chatImagePolicy-DXkhb-N_.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-CiUR4uD1.js.map → chatImagePolicy-DXkhb-N_.js.map} +1 -1
- package/dist/_chunks/{markdown-lpamC2tL.js → markdown-c59ir6tw.js} +4 -3
- package/dist/_chunks/markdown-c59ir6tw.js.map +1 -0
- package/dist/ai-elements.es.js +235 -141
- 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/PkChatbotFeedbackForm.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-CV5O0I7I.js +758 -0
- package/dist-vue/_chunks/{Agent-Bd_4UVe4.js.map → Agent-CV5O0I7I.js.map} +1 -1
- package/dist-vue/_chunks/{Document-BrMThi12.js → Document-eXkZraWr.js} +214 -213
- package/dist-vue/_chunks/Document-eXkZraWr.js.map +1 -0
- package/dist-vue/_chunks/Media-C6RS-s98.js +139 -0
- package/dist-vue/_chunks/Media-C6RS-s98.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-EnNiOHfT.js → PkChatbot-D9lPQjYZ.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-EnNiOHfT.js.map → PkChatbot-D9lPQjYZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotAuth-DaMi8miP.js → PkChatbotAuth-BMLLTSwK.js} +78 -78
- package/dist-vue/_chunks/{PkChatbotAuth-DaMi8miP.js.map → PkChatbotAuth-BMLLTSwK.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-CeLapjG_.js → PkChatbotEmptyState-CNLDbDVS.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-CeLapjG_.js.map → PkChatbotEmptyState-CNLDbDVS.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BBjQEC_J.js → PkChatbotFeedbackForm-CMFXjoKR.js} +4 -4
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BBjQEC_J.js.map → PkChatbotFeedbackForm-CMFXjoKR.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-Chu3tBbe.js → PkChatbotInput-Cf1iqwkL.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-Chu3tBbe.js.map → PkChatbotInput-Cf1iqwkL.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-B2_Tpjk6.js → PkChatbotMessages-BPCZaW9I.js} +29 -29
- package/dist-vue/_chunks/{PkChatbotMessages-B2_Tpjk6.js.map → PkChatbotMessages-BPCZaW9I.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-BMRSMjrw.js → PkChatbotStepPayload-CShP2HwK.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-BMRSMjrw.js.map → PkChatbotStepPayload-CShP2HwK.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DbAFKTSl.js → PkChatbotStepToolDetail-Dhi60cJt.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DbAFKTSl.js.map → PkChatbotStepToolDetail-Dhi60cJt.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-CcXw6JiJ.js → PkChatbotSteps-CW13WtvP.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-CcXw6JiJ.js.map → PkChatbotSteps-CW13WtvP.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-eXFjwNkz.js → PkChatbotViewChat-DyEDdBwU.js} +205 -198
- package/dist-vue/_chunks/PkChatbotViewChat-DyEDdBwU.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-uaKc5XAv.js → PkChatbotViewConversations-VpZ-zYTF.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-uaKc5XAv.js.map → PkChatbotViewConversations-VpZ-zYTF.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-53zY5v4R.js → PkChatbotViewFiles-ByZ8Wy2A.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-53zY5v4R.js.map → PkChatbotViewFiles-ByZ8Wy2A.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-tUMdwSR1.js → PkChatbotViewProfile-BXehkAop.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-tUMdwSR1.js.map → PkChatbotViewProfile-BXehkAop.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-BEya63gY.js → PkStreamingMarkdown-BBu6Z82G.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-BEya63gY.js.map → PkStreamingMarkdown-BBu6Z82G.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-Bl6jujR0.js → PkToolEditSpreadsheet-COhUFZGD.js} +2 -2
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-Bl6jujR0.js.map → PkToolEditSpreadsheet-COhUFZGD.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-Dh2GZF9r.js → PkToolRequestGeolocation-VZ6TUHwA.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-Dh2GZF9r.js.map → PkToolRequestGeolocation-VZ6TUHwA.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CsVjz0dA.js → PkToolRequestOAuthConnection-LMTQMCU3.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CsVjz0dA.js.map → PkToolRequestOAuthConnection-LMTQMCU3.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-DC1baqls.js → PkToolShowArtifact-Ciq5bmlS.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-DC1baqls.js.map → PkToolShowArtifact-Ciq5bmlS.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BXwBUTG-.js → PkToolShowContactForm-BufNZX42.js} +8 -8
- package/dist-vue/_chunks/{PkToolShowContactForm-BXwBUTG-.js.map → PkToolShowContactForm-BufNZX42.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-CHPPJjrY.js → PkToolShowDiagram-daSyNcr9.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-CHPPJjrY.js.map → PkToolShowDiagram-daSyNcr9.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-BiAd1nVG.js → PkToolShowForm-DdyPbM6u.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-BiAd1nVG.js.map → PkToolShowForm-DdyPbM6u.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-BkvHwtdK.js → PkToolShowImageGallery-BTEr7g8b.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-BkvHwtdK.js.map → PkToolShowImageGallery-BTEr7g8b.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-C8ynmJl_.js → PkToolShowProductList-TWwOQW0f.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-C8ynmJl_.js.map → PkToolShowProductList-TWwOQW0f.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-DgjeP2WK.js → PkToolShowSources-CK30aUfr.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-DgjeP2WK.js.map → PkToolShowSources-CK30aUfr.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Cvfzecie.js → PkToolShowSuggestedReply-TNaSN94U.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Cvfzecie.js.map → PkToolShowSuggestedReply-TNaSN94U.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-BMBG6A9a.js → PkToolShowVideo-CY3LSfda.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-BMBG6A9a.js.map → PkToolShowVideo-CY3LSfda.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-B64pZeYb.js → PkToolShowWebPages-Bjyfu3SU.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-B64pZeYb.js.map → PkToolShowWebPages-Bjyfu3SU.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-Dv-9sFRF.js → createChatbotApiClient-C0_uDob8.js} +56 -53
- package/dist-vue/_chunks/{createChatbotApiClient-Dv-9sFRF.js.map → createChatbotApiClient-C0_uDob8.js.map} +1 -1
- package/dist-vue/_chunks/{index.es-DWf6im7k.js → index.es-C1u3kP7i.js} +14 -14
- package/dist-vue/_chunks/{index.es-DWf6im7k.js.map → index.es-C1u3kP7i.js.map} +1 -1
- package/dist-vue/_chunks/{schemas-Bt5eFdV0.js → schemas-Bu1lick6.js} +213 -204
- package/dist-vue/_chunks/schemas-Bu1lick6.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-Dmxnn4xV.js → useChatbotStore-1mq1FznN.js} +22 -22
- package/dist-vue/_chunks/useChatbotStore-1mq1FznN.js.map +1 -0
- package/dist-vue/_chunks/{utils-CGb6Qc_9.js → utils-BFoe95R4.js} +2 -2
- package/dist-vue/_chunks/{utils-CGb6Qc_9.js.map → utils-BFoe95R4.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +87 -3
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +3423 -3406
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/packages/components/src/chat/useWakeupWatch.d.ts +5 -0
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +2 -0
- package/dist-vue/packages/models/src/schema/Document.d.ts +16 -8
- package/dist-vue/packages/models/src/schema/Media.d.ts +18 -0
- package/dist-vue/packages/models/src/schema/Notification.d.ts +94 -0
- package/package.json +1 -1
- package/dist/_chunks/Agent-DDAyL-4q.js.map +0 -1
- package/dist/_chunks/browser-BJcsjj9S.js.map +0 -1
- package/dist/_chunks/markdown-lpamC2tL.js.map +0 -1
- package/dist-vue/_chunks/Agent-Bd_4UVe4.js +0 -758
- package/dist-vue/_chunks/Document-BrMThi12.js.map +0 -1
- package/dist-vue/_chunks/Media-Bzv3zEWR.js +0 -135
- package/dist-vue/_chunks/Media-Bzv3zEWR.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-eXFjwNkz.js.map +0 -1
- package/dist-vue/_chunks/schemas-Bt5eFdV0.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-Dmxnn4xV.js.map +0 -1
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { t as e } from "./PkChatbotMessages-
|
|
2
|
-
import { a as t, n, t as r } from "./useChatbotStore-
|
|
1
|
+
import { t as e } from "./PkChatbotMessages-BPCZaW9I.js";
|
|
2
|
+
import { a as t, n, t as r } from "./useChatbotStore-1mq1FznN.js";
|
|
3
3
|
import { t as i } from "./src-DCfvejyT.js";
|
|
4
4
|
import { t as a } from "./useLocalizedString-PfaKjIQY.js";
|
|
5
|
-
import { f as o, o as s } from "./utils-
|
|
5
|
+
import { f as o, o as s } from "./utils-BFoe95R4.js";
|
|
6
6
|
import { t as c } from "./PkAvatar-ZgCsoO-p.js";
|
|
7
|
-
import { n as l, t as u } from "./PkChatbotInput-
|
|
8
|
-
import { t as d } from "./PkChatbotEmptyState-
|
|
7
|
+
import { n as l, t as u } from "./PkChatbotInput-Cf1iqwkL.js";
|
|
8
|
+
import { t as d } from "./PkChatbotEmptyState-CNLDbDVS.js";
|
|
9
9
|
import { t as f } from "./PkChatbotWakeupBar-jBti21FQ.js";
|
|
10
10
|
import { VvIcon as p } from "@volverjs/ui-vue/components";
|
|
11
|
-
import { Fragment as m, Transition as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createSlots as x, createTextVNode as ee, createVNode as S, defineAsyncComponent as C, defineComponent as w, isRef as te, nextTick as ne, normalizeClass as T, onBeforeUnmount as E, onMounted as re, onScopeDispose as ie, onUnmounted as ae, openBlock as D, ref as O, renderList as oe, shallowRef as se, toDisplayString as k, toValue as A, unref as j, useTemplateRef as ce, watch as
|
|
12
|
-
import { useI18n as
|
|
13
|
-
import { useDropZone as
|
|
14
|
-
import { storeToRefs as
|
|
11
|
+
import { Fragment as m, Transition as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createSlots as x, createTextVNode as ee, createVNode as S, defineAsyncComponent as C, defineComponent as w, isRef as te, nextTick as ne, normalizeClass as T, onBeforeUnmount as E, onMounted as re, onScopeDispose as ie, onUnmounted as ae, openBlock as D, ref as O, renderList as oe, shallowRef as se, toDisplayString as k, toValue as A, unref as j, useTemplateRef as ce, watch as M, withCtx as N } from "vue";
|
|
12
|
+
import { useI18n as le } from "vue-i18n";
|
|
13
|
+
import { useDropZone as ue } from "@vueuse/core";
|
|
14
|
+
import { storeToRefs as de } from "pinia";
|
|
15
15
|
//#region ../../packages/composable/src/chatbot/useGreeting.ts
|
|
16
|
-
function
|
|
17
|
-
let { locale: n, t: r, te: i } =
|
|
16
|
+
function fe(e, t) {
|
|
17
|
+
let { locale: n, t: r, te: i } = le({ useScope: "global" });
|
|
18
18
|
return g(() => {
|
|
19
19
|
let a = A(e);
|
|
20
|
-
return
|
|
20
|
+
return pe(a?.greeting?.[0]?.[n.value] || a?.initialMessage?.[n.value] || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""), A(t));
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function pe(e, t) {
|
|
24
24
|
return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region ../../packages/components/src/chat/PkAuroraCanvas.vue?vue&type=script&setup=true&lang.ts
|
|
28
|
-
var
|
|
28
|
+
var P = {
|
|
29
29
|
class: "pk-aurora",
|
|
30
30
|
"aria-hidden": "true"
|
|
31
|
-
},
|
|
31
|
+
}, F = {
|
|
32
32
|
key: 1,
|
|
33
33
|
class: "pk-aurora__fallback"
|
|
34
|
-
},
|
|
34
|
+
}, I = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", me = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5)\n * u_spread\n * breath\n * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", he = /* @__PURE__ */ w({
|
|
35
35
|
__name: "PkAuroraCanvas",
|
|
36
36
|
props: { sourceSelector: {} },
|
|
37
37
|
setup(e) {
|
|
@@ -72,7 +72,7 @@ var N = {
|
|
|
72
72
|
r.value = !0;
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
|
-
let a = p(i.VERTEX_SHADER,
|
|
75
|
+
let a = p(i.VERTEX_SHADER, I), f = p(i.FRAGMENT_SHADER, me), y = i.createProgram();
|
|
76
76
|
if (!a || !f || !y || (i.attachShader(y, a), i.attachShader(y, f), i.linkProgram(y), !i.getProgramParameter(y, i.LINK_STATUS))) {
|
|
77
77
|
r.value = !0;
|
|
78
78
|
return;
|
|
@@ -98,14 +98,14 @@ var N = {
|
|
|
98
98
|
i = null, setTimeout(() => {
|
|
99
99
|
e?.getExtension("WEBGL_lose_context")?.loseContext();
|
|
100
100
|
}, 150);
|
|
101
|
-
}), (e, t) => (D(), y("div",
|
|
101
|
+
}), (e, t) => (D(), y("div", P, [r.value ? (D(), y("div", F)) : (D(), y("canvas", {
|
|
102
102
|
key: 0,
|
|
103
103
|
ref_key: "canvasEl",
|
|
104
104
|
ref: n,
|
|
105
105
|
class: "pk-aurora__canvas"
|
|
106
106
|
}, null, 512))]));
|
|
107
107
|
}
|
|
108
|
-
}),
|
|
108
|
+
}), L = .18, ge = .35, R = /* @__PURE__ */ w({
|
|
109
109
|
__name: "PkVoiceOrb",
|
|
110
110
|
props: {
|
|
111
111
|
sample: {},
|
|
@@ -117,20 +117,20 @@ var N = {
|
|
|
117
117
|
bars: { default: 5 }
|
|
118
118
|
},
|
|
119
119
|
setup(e) {
|
|
120
|
-
let t = e, n = ce("barsEl"), r = Array.from({ length: t.bars }, () =>
|
|
120
|
+
let t = e, n = ce("barsEl"), r = Array.from({ length: t.bars }, () => L), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
|
|
121
121
|
let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
|
|
122
122
|
if (!n?.length) {
|
|
123
123
|
let t = Date.now() / 260;
|
|
124
124
|
return Array.from({ length: i }, (n, r) => {
|
|
125
125
|
let i = .65 + .35 * Math.sin(t + r * .9);
|
|
126
|
-
return
|
|
126
|
+
return L + e * 2.4 * i;
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
let a = Math.max(1, Math.floor(n.length / 2)), o = Math.max(1, Math.floor(a / i));
|
|
130
130
|
return Array.from({ length: i }, (e, t) => {
|
|
131
131
|
let r = 0;
|
|
132
132
|
for (let e = 0; e < o; e += 1) r += n[t * o + e] ?? 0;
|
|
133
|
-
return
|
|
133
|
+
return L + r / o / 255 * 2.2;
|
|
134
134
|
});
|
|
135
135
|
}, s = () => {
|
|
136
136
|
let e = n.value?.children;
|
|
@@ -139,12 +139,12 @@ var N = {
|
|
|
139
139
|
});
|
|
140
140
|
}, c = () => {
|
|
141
141
|
let e = o();
|
|
142
|
-
r = r.map((t, n) => t + (Math.min(1, Math.max(
|
|
142
|
+
r = r.map((t, n) => t + (Math.min(1, Math.max(L, e[n] ?? L)) - t) * ge), s(), i = requestAnimationFrame(c);
|
|
143
143
|
}, l = () => {
|
|
144
144
|
i !== void 0 && (cancelAnimationFrame(i), i = void 0);
|
|
145
145
|
};
|
|
146
|
-
return
|
|
147
|
-
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() =>
|
|
146
|
+
return M(() => t.state, async (e) => {
|
|
147
|
+
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => L * 1.6), await ne(), s()) : i === void 0 && (i = requestAnimationFrame(c));
|
|
148
148
|
}, { immediate: !0 }), E(l), (t, r) => (D(), y("div", {
|
|
149
149
|
class: T(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
|
|
150
150
|
"aria-hidden": "true"
|
|
@@ -157,18 +157,18 @@ var N = {
|
|
|
157
157
|
class: "pk-voice-orb__bar"
|
|
158
158
|
}))), 128))], 512)], 2));
|
|
159
159
|
}
|
|
160
|
-
}),
|
|
160
|
+
}), z = {
|
|
161
161
|
key: 0,
|
|
162
162
|
class: "pk-voice-session__badge",
|
|
163
163
|
"aria-hidden": "true"
|
|
164
|
-
},
|
|
164
|
+
}, _e = {
|
|
165
165
|
class: "pk-voice-session__status",
|
|
166
166
|
role: "status"
|
|
167
|
-
},
|
|
167
|
+
}, ve = {
|
|
168
168
|
key: 0,
|
|
169
169
|
class: "pk-voice-session__live-dot",
|
|
170
170
|
"aria-hidden": "true"
|
|
171
|
-
},
|
|
171
|
+
}, ye = ["title"], be = ["title"], xe = { class: "pk-voice-session__actions" }, Se = /* @__PURE__ */ w({
|
|
172
172
|
__name: "PkVoiceSession",
|
|
173
173
|
props: {
|
|
174
174
|
state: {},
|
|
@@ -187,7 +187,7 @@ var N = {
|
|
|
187
187
|
"dismiss"
|
|
188
188
|
],
|
|
189
189
|
setup(e, { emit: t }) {
|
|
190
|
-
let n = e, r = t, { t: i } =
|
|
190
|
+
let n = e, r = t, { t: i } = le({ useScope: "global" }), a = g(() => n.error ? i("message.voiceFailed") : n.state === "connecting" ? i("message.voiceConnecting") : n.state === "speaking" ? i("message.voiceSpeaking") : n.muted ? i("message.voiceMuted") : i("message.voiceListening")), o = g(() => {
|
|
191
191
|
if (n.remainingSeconds === void 0) return;
|
|
192
192
|
let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
|
|
193
193
|
return `${e}:${String(t).padStart(2, "0")}`;
|
|
@@ -197,7 +197,7 @@ var N = {
|
|
|
197
197
|
return (t, n) => {
|
|
198
198
|
let d = p;
|
|
199
199
|
return D(), y("div", { class: T(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
|
|
200
|
-
e.error ? (D(), y("span",
|
|
200
|
+
e.error ? (D(), y("span", z, [S(d, { name: "ri:error-warning-line" })])) : (D(), _(R, {
|
|
201
201
|
key: 1,
|
|
202
202
|
state: e.state,
|
|
203
203
|
sample: e.sample,
|
|
@@ -207,18 +207,18 @@ var N = {
|
|
|
207
207
|
"sample",
|
|
208
208
|
"spectrum"
|
|
209
209
|
])),
|
|
210
|
-
b("div",
|
|
210
|
+
b("div", _e, [b("span", { class: T(["pk-voice-session__state", u.value && `pk-voice-session__state--${u.value}`]) }, [c.value ? (D(), y("span", ve)) : v("", !0), ee(" " + k(a.value), 1)], 2), e.error ? (D(), y("p", {
|
|
211
211
|
key: 0,
|
|
212
212
|
class: "pk-voice-session__detail",
|
|
213
213
|
title: e.rawError ?? e.error
|
|
214
|
-
}, k(e.error), 9,
|
|
214
|
+
}, k(e.error), 9, ye)) : v("", !0)]),
|
|
215
215
|
o.value ? (D(), y("span", {
|
|
216
216
|
key: 2,
|
|
217
217
|
class: T(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
|
|
218
218
|
title: j(i)("hint.voiceRemaining"),
|
|
219
219
|
"aria-hidden": "true"
|
|
220
|
-
}, k(o.value), 11,
|
|
221
|
-
b("div",
|
|
220
|
+
}, k(o.value), 11, be)) : v("", !0),
|
|
221
|
+
b("div", xe, [e.error ? (D(), y(m, { key: 0 }, [S(l, {
|
|
222
222
|
icon: "ri:refresh-line",
|
|
223
223
|
label: j(i)("action.retry"),
|
|
224
224
|
onClick: n[0] ||= (e) => r("retry")
|
|
@@ -255,7 +255,7 @@ var N = {
|
|
|
255
255
|
], 2);
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
|
-
}),
|
|
258
|
+
}), Ce = (e) => {
|
|
259
259
|
let t = se(), n = O("disconnected"), r = O("listening"), a = O(), o = O([]), s = O(), c = O(), l, u, d = 0, f = !1, p = () => {
|
|
260
260
|
u &&= (clearInterval(u), void 0), s.value = void 0;
|
|
261
261
|
}, m = (e) => {
|
|
@@ -379,12 +379,12 @@ var N = {
|
|
|
379
379
|
readLevel: ee,
|
|
380
380
|
readSpectrum: S
|
|
381
381
|
};
|
|
382
|
-
},
|
|
382
|
+
}, we = 4e3, Te = [
|
|
383
383
|
3e3,
|
|
384
384
|
5e3,
|
|
385
385
|
1e4
|
|
386
|
-
],
|
|
387
|
-
function
|
|
386
|
+
], Ee = 12e4, B = 3e4;
|
|
387
|
+
function De(e) {
|
|
388
388
|
let t = O(null), n = O(!1), r, i = !1, a = () => {
|
|
389
389
|
clearTimeout(r), r = void 0;
|
|
390
390
|
}, o = (e, t) => {
|
|
@@ -402,12 +402,12 @@ function Oe(e) {
|
|
|
402
402
|
}
|
|
403
403
|
let r = t.value;
|
|
404
404
|
if (r) {
|
|
405
|
-
let e = Date.parse(r.dueAt) - Date.now() +
|
|
406
|
-
o(Math.max(
|
|
405
|
+
let e = Date.parse(r.dueAt) - Date.now() + we;
|
|
406
|
+
o(Math.max(we, e), () => l(r.wakeId, Date.now(), 0));
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
async function l(t, n, r) {
|
|
410
|
-
await e.refreshMessages(), !i && (s(t) || Date.now() - n >=
|
|
410
|
+
await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Ee ? await c() : o(Te[Math.min(r, Te.length - 1)], () => l(t, n, r + 1)));
|
|
411
411
|
}
|
|
412
412
|
async function u() {
|
|
413
413
|
n.value = !0;
|
|
@@ -421,8 +421,15 @@ function Oe(e) {
|
|
|
421
421
|
function d() {
|
|
422
422
|
a(), t.value = null;
|
|
423
423
|
}
|
|
424
|
-
|
|
425
|
-
|
|
424
|
+
let f;
|
|
425
|
+
function p() {
|
|
426
|
+
t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
|
|
427
|
+
}
|
|
428
|
+
let m = () => p();
|
|
429
|
+
return document.addEventListener("visibilitychange", m), M(() => t.value?.wakeId, (e) => {
|
|
430
|
+
clearInterval(f), f = void 0, e && !i && (p(), f = setInterval(p, B));
|
|
431
|
+
}), E(() => {
|
|
432
|
+
i = !0, a(), clearInterval(f), document.removeEventListener("visibilitychange", m);
|
|
426
433
|
}), {
|
|
427
434
|
pendingWakeup: t,
|
|
428
435
|
isStopping: n,
|
|
@@ -433,16 +440,16 @@ function Oe(e) {
|
|
|
433
440
|
}
|
|
434
441
|
//#endregion
|
|
435
442
|
//#region ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
|
|
436
|
-
var
|
|
443
|
+
var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
|
|
437
444
|
key: 1,
|
|
438
445
|
class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
|
|
439
|
-
},
|
|
446
|
+
}, Ae = { class: "pk-chatbot-view-chat__agent-chip" }, je = {
|
|
440
447
|
key: 0,
|
|
441
448
|
class: "pk-chatbot-view-chat__agent-chip-name"
|
|
442
|
-
},
|
|
449
|
+
}, Me = {
|
|
443
450
|
key: 0,
|
|
444
451
|
class: "pk-chatbot-view-chat__drop-overlay"
|
|
445
|
-
},
|
|
452
|
+
}, Ne = 3e3, Pe = 6e4, Fe = 3e5, Ie = 6e5, Le = /* @__PURE__ */ w({
|
|
446
453
|
__name: "PkChatbotViewChat",
|
|
447
454
|
props: {
|
|
448
455
|
agentId: {},
|
|
@@ -451,116 +458,116 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
|
451
458
|
},
|
|
452
459
|
emits: ["show-info", "revise"],
|
|
453
460
|
setup(i, { emit: l }) {
|
|
454
|
-
let m = C(() => import("./PkToolShowForm-
|
|
455
|
-
let e =
|
|
456
|
-
if (e) return e.reason === "per-chat" ?
|
|
457
|
-
}),
|
|
458
|
-
let t = await
|
|
461
|
+
let m = C(() => import("./PkToolShowForm-DdyPbM6u.js").then((e) => e.n)), ee = C(() => import("./PkToolShowContactForm-BufNZX42.js").then((e) => e.n)), w = C(() => import("./PkToolShowSuggestedReply-TNaSN94U.js").then((e) => e.n)), ne = C(() => import("./PkToolShowSources-CK30aUfr.js").then((e) => e.n)), re = C(() => import("./PkToolRequestGeolocation-VZ6TUHwA.js")), ie = C(() => import("./PkToolRequestOAuthConnection-LMTQMCU3.js")), ae = C(() => import("./PkToolShowLocation-Dyz6h_0n.js").then((e) => e.n)), oe = C(() => import("./PkToolShowDiagram-daSyNcr9.js")), se = C(() => import("./PkToolEditSpreadsheet-COhUFZGD.js")), A = i, pe = l, P = n(A.agentId), { agentInterface: F, agentFileUpload: I, agentVoice: me, actions: L, revisedAnswers: ge, messages: R, chat: z, messageFeedbacks: _e, feedbackDialogMessage: ve, isFeedbackSubmitting: ye, isFeedbackSubmitted: be, feedbackSubmitError: xe, isLeadSubmitted: we, isLoadingSubmitLead: Te, submitLeadError: Ee, input: B, inputMessagePlaceholder: Le, isConversationBlocked: Re, baseUrl: ze, pendingAttachments: Be, isAttachmentLimitReached: Ve, fileLimitError: He, apiClient: V, isDark: Ue } = de(P), We = (e) => V.value.getMediaDownloadUrl(A.agentId, P.localChatId, e), { handleSubmit: Ge, stopGeneration: Ke, regenerate: qe, onUpvote: Je, onDownvote: Ye, onFeedback: Xe, onFeedbackSubmit: Ze, onLeadSubmit: Qe, startNewChat: $e, addToolOutput: H, addToolApprovalResponse: et, handleFileSelect: tt, clearFileLimitError: nt, refreshMessages: rt, appendMessage: it } = P, { t: U } = le({ useScope: "global" }), at = g(() => {
|
|
462
|
+
let e = He.value;
|
|
463
|
+
if (e) return e.reason === "per-chat" ? U("message.fileLimitPerChat", { max: e.max }) : U("message.fileLimitPerMessage", { max: e.max });
|
|
464
|
+
}), ot = a(() => F.value?.dismissableNotice), st = g(() => R.value.some((e) => e.role === "user")), ct = g(() => A.modifier === "fullscreen" && !st.value), lt = fe(F, () => A.userName), ut = ce("chatViewEl"), dt = async (e) => (await V.value.expandSourceContext(A.agentId, e.documentId, e.chunkIndex)).content, ft = async (e) => {
|
|
465
|
+
let t = await V.value.downloadSourceDocument(A.agentId, e);
|
|
459
466
|
window.open(t.downloadUrl, "_blank");
|
|
460
|
-
}, { isOverDropZone:
|
|
461
|
-
dataTypes: g(() =>
|
|
467
|
+
}, { isOverDropZone: pt } = ue(ut, {
|
|
468
|
+
dataTypes: g(() => I.value?.allowedMimeTypes ?? []),
|
|
462
469
|
onDrop: (e) => {
|
|
463
|
-
if (
|
|
470
|
+
if (I.value?.enabled && e) for (let t of e) tt(t);
|
|
464
471
|
}
|
|
465
|
-
}),
|
|
472
|
+
}), W = O(!1), G = !1, K = O(!1), mt = [
|
|
466
473
|
3e3,
|
|
467
474
|
5e3,
|
|
468
475
|
1e4
|
|
469
|
-
],
|
|
470
|
-
function
|
|
471
|
-
clearTimeout(
|
|
476
|
+
], q, J, Y = !1, X = 0, ht = !1;
|
|
477
|
+
function gt() {
|
|
478
|
+
clearTimeout(q), q = void 0, J = void 0, Y = !1, X = 0, K.value = !1;
|
|
472
479
|
}
|
|
473
|
-
function
|
|
474
|
-
|
|
480
|
+
function _t(e) {
|
|
481
|
+
G || (clearTimeout(q), q = setTimeout(() => {
|
|
475
482
|
vt();
|
|
476
483
|
}, e));
|
|
477
484
|
}
|
|
478
485
|
async function vt() {
|
|
479
|
-
if (
|
|
480
|
-
|
|
486
|
+
if (G || ht) return;
|
|
487
|
+
ht = !0;
|
|
481
488
|
let e;
|
|
482
489
|
try {
|
|
483
|
-
e = await
|
|
490
|
+
e = await rt();
|
|
484
491
|
} finally {
|
|
485
|
-
|
|
492
|
+
ht = !1;
|
|
486
493
|
}
|
|
487
|
-
if (
|
|
488
|
-
if (e === "caught-up" && (
|
|
489
|
-
|
|
494
|
+
if (G) return;
|
|
495
|
+
if (e === "caught-up" && (K.value = !1), Z.isActive.value) {
|
|
496
|
+
J = void 0, Y = !1, X = 0, _t(Ne);
|
|
490
497
|
return;
|
|
491
498
|
}
|
|
492
|
-
|
|
493
|
-
let t = Date.now() -
|
|
494
|
-
if (e === "caught-up" && t >= (
|
|
495
|
-
|
|
499
|
+
J === void 0 && (J = Date.now(), Y = !!Z.error.value);
|
|
500
|
+
let t = Date.now() - J;
|
|
501
|
+
if (e === "caught-up" && t >= (Y ? Fe : Pe) || t >= Ie) {
|
|
502
|
+
gt();
|
|
496
503
|
return;
|
|
497
504
|
}
|
|
498
|
-
let n =
|
|
499
|
-
|
|
505
|
+
let n = mt[Math.min(X, mt.length - 1)];
|
|
506
|
+
X += 1, _t(n);
|
|
500
507
|
}
|
|
501
508
|
let yt = (e = 1200) => {
|
|
502
|
-
|
|
503
|
-
}, Z =
|
|
509
|
+
_t(e);
|
|
510
|
+
}, Z = Ce({
|
|
504
511
|
fetchGrant: async () => {
|
|
505
|
-
let e = await
|
|
506
|
-
deviceContext:
|
|
507
|
-
externalContext:
|
|
512
|
+
let e = await V.value.createVoiceSession(A.agentId, P.localChatId, {
|
|
513
|
+
deviceContext: P.buildDeviceContext(),
|
|
514
|
+
externalContext: P.externalContext
|
|
508
515
|
});
|
|
509
|
-
return e.chatId !==
|
|
516
|
+
return e.chatId !== P.localChatId && (P.localChatId = e.chatId), e;
|
|
510
517
|
},
|
|
511
|
-
closeGrant: (e) =>
|
|
518
|
+
closeGrant: (e) => V.value.closeVoiceSession(A.agentId, e),
|
|
512
519
|
onTranscript: (e) => {
|
|
513
|
-
e.role === "user" ? (
|
|
520
|
+
e.role === "user" ? (K.value = !0, it({
|
|
514
521
|
id: `${r}user-${t()}`,
|
|
515
522
|
role: "user",
|
|
516
523
|
parts: [{
|
|
517
524
|
type: "text",
|
|
518
525
|
text: e.text
|
|
519
526
|
}]
|
|
520
|
-
})) :
|
|
527
|
+
})) : K.value = !1;
|
|
521
528
|
},
|
|
522
529
|
onTurnEnd: () => {
|
|
523
530
|
yt();
|
|
524
531
|
}
|
|
525
532
|
});
|
|
526
|
-
|
|
527
|
-
e && (
|
|
533
|
+
M(() => Z.error.value, (e) => {
|
|
534
|
+
e && (K.value = !1);
|
|
528
535
|
});
|
|
529
|
-
let bt = g(() =>
|
|
536
|
+
let bt = g(() => me.value?.enabled === !0), xt = g(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), St = g(() => {
|
|
530
537
|
let e = Z.error.value;
|
|
531
|
-
if (e) return /took too long/i.test(e) ?
|
|
538
|
+
if (e) return /took too long/i.test(e) ? U("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? U("message.voiceNoAnswer") : U("message.voiceInterrupted");
|
|
532
539
|
}), Ct = g(() => Z.isSpeaking.value ? "output" : "input"), wt = () => Z.readLevel(Ct.value), Tt = () => Z.readSpectrum(Ct.value), Et = async () => {
|
|
533
|
-
|
|
540
|
+
W.value = !1, await Z.start(), Z.isActive.value && (gt(), _t(Ne));
|
|
534
541
|
}, Dt = async () => {
|
|
535
|
-
|
|
542
|
+
K.value = !1, await Z.stop(), !G && yt(0);
|
|
536
543
|
}, Ot = () => {
|
|
537
544
|
Z.dismissError();
|
|
538
545
|
}, kt = async () => {
|
|
539
546
|
Z.dismissError(), await Z.stop(), await Et();
|
|
540
547
|
}, Q = (e) => e?.toolCallId ?? "", At = O(/* @__PURE__ */ new Set()), jt = (e) => At.value.has(Q(e)), Mt = O(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (At.value = new Set(At.value).add(Q(e)), yt()), !0) : !1, Nt = (e, t, n) => {
|
|
541
|
-
$(t, s(t, n)) ||
|
|
548
|
+
$(t, s(t, n)) || H({
|
|
542
549
|
tool: e,
|
|
543
550
|
toolCallId: Q(t),
|
|
544
551
|
output: n
|
|
545
552
|
});
|
|
546
553
|
}, Pt = (e) => {
|
|
547
|
-
let t = e.confirmed ?
|
|
548
|
-
$({ toolCallId: e.toolCallId }, t) ? At.value.has(e.toolCallId) && (Mt.value = new Map(Mt.value).set(e.toolCallId, e.confirmed)) :
|
|
554
|
+
let t = e.confirmed ? U("message.voiceConfirmed") : U("message.voiceCancelled");
|
|
555
|
+
$({ toolCallId: e.toolCallId }, t) ? At.value.has(e.toolCallId) && (Mt.value = new Map(Mt.value).set(e.toolCallId, e.confirmed)) : H({
|
|
549
556
|
tool: "requestConfirm",
|
|
550
557
|
toolCallId: e.toolCallId,
|
|
551
558
|
output: e.confirmed ? "confirmed" : "cancelled"
|
|
552
559
|
});
|
|
553
560
|
}, Ft = (e, t) => {
|
|
554
|
-
$(e, t) || (
|
|
561
|
+
$(e, t) || (B.value = t, Ge());
|
|
555
562
|
}, It = (e, t) => {
|
|
556
|
-
let n = t.error ?
|
|
557
|
-
$(e, n) ||
|
|
563
|
+
let n = t.error ? U("message.voiceLocationRefused") : U("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
|
|
564
|
+
$(e, n) || H({
|
|
558
565
|
tool: "requestGeolocation",
|
|
559
566
|
toolCallId: Q(e),
|
|
560
567
|
output: t
|
|
561
568
|
});
|
|
562
569
|
}, Lt = (e, t) => {
|
|
563
|
-
$(e,
|
|
570
|
+
$(e, U("message.voiceConnectionDone")) || H({
|
|
564
571
|
tool: "requestOAuthConnection",
|
|
565
572
|
toolCallId: Q(e),
|
|
566
573
|
output: {
|
|
@@ -569,41 +576,41 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
|
569
576
|
}
|
|
570
577
|
});
|
|
571
578
|
}, Rt = () => {
|
|
572
|
-
|
|
579
|
+
W.value = !W.value, Z.setMuted(W.value);
|
|
573
580
|
};
|
|
574
581
|
E(() => {
|
|
575
|
-
|
|
582
|
+
G = !0, gt();
|
|
576
583
|
});
|
|
577
|
-
let { pendingWakeup: zt, isStopping: Bt, check: Vt, reset: Ht, stop: Ut } =
|
|
584
|
+
let { pendingWakeup: zt, isStopping: Bt, check: Vt, reset: Ht, stop: Ut } = De({
|
|
578
585
|
agentId: () => A.agentId,
|
|
579
|
-
chatId: () =>
|
|
580
|
-
apiClient: () =>
|
|
581
|
-
messages: () =>
|
|
582
|
-
refreshMessages:
|
|
586
|
+
chatId: () => P.localChatId,
|
|
587
|
+
apiClient: () => V.value,
|
|
588
|
+
messages: () => R.value,
|
|
589
|
+
refreshMessages: rt
|
|
583
590
|
});
|
|
584
|
-
return
|
|
591
|
+
return M([() => P.localChatId, st], ([, e]) => {
|
|
585
592
|
Ht(), e && Vt();
|
|
586
|
-
}, { immediate: !0 }),
|
|
587
|
-
e === "ready" && t !== "ready" &&
|
|
593
|
+
}, { immediate: !0 }), M(() => z.value.status, (e, t) => {
|
|
594
|
+
e === "ready" && t !== "ready" && st.value && Vt();
|
|
588
595
|
}), (t, n) => {
|
|
589
596
|
let r = p;
|
|
590
597
|
return D(), y("div", {
|
|
591
598
|
ref_key: "chatViewEl",
|
|
592
|
-
ref:
|
|
599
|
+
ref: ut,
|
|
593
600
|
class: T(["pk-chatbot-view-chat", {
|
|
594
|
-
"pk-chatbot-view-chat--dragover": j(
|
|
595
|
-
"pk-chatbot-view-chat--empty":
|
|
601
|
+
"pk-chatbot-view-chat--dragover": j(pt) && j(I)?.enabled,
|
|
602
|
+
"pk-chatbot-view-chat--empty": ct.value
|
|
596
603
|
}])
|
|
597
604
|
}, [
|
|
598
605
|
S(h, {
|
|
599
606
|
name: "pk-chatbot-view-chat-fade",
|
|
600
607
|
mode: "out-in"
|
|
601
608
|
}, {
|
|
602
|
-
default:
|
|
609
|
+
default: N(() => [ct.value ? (D(), _(d, {
|
|
603
610
|
key: 0,
|
|
604
|
-
greeting: j(
|
|
605
|
-
logo: j(
|
|
606
|
-
name: j(
|
|
611
|
+
greeting: j(lt),
|
|
612
|
+
logo: j(F)?.logo,
|
|
613
|
+
name: j(P).name
|
|
607
614
|
}, null, 8, [
|
|
608
615
|
"greeting",
|
|
609
616
|
"logo",
|
|
@@ -612,44 +619,44 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
|
612
619
|
key: 1,
|
|
613
620
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
614
621
|
interactive: "",
|
|
615
|
-
messages: j(
|
|
622
|
+
messages: j(R),
|
|
616
623
|
"confirm-verdicts-on-call": Mt.value,
|
|
617
|
-
status: j(
|
|
618
|
-
error: j(
|
|
619
|
-
"main-color": j(
|
|
620
|
-
"text-color": j(
|
|
621
|
-
"revised-answers": j(
|
|
622
|
-
actions: j(
|
|
623
|
-
"message-feedbacks": j(
|
|
624
|
-
"feedback-message-id": j(
|
|
625
|
-
"feedback-loading": j(
|
|
626
|
-
"feedback-submitted": j(
|
|
627
|
-
"feedback-error": j(
|
|
628
|
-
"show-extended-steps": j(
|
|
629
|
-
"awaiting-spoken-answer":
|
|
630
|
-
"is-dark": j(
|
|
624
|
+
status: j(z).status,
|
|
625
|
+
error: j(z).error,
|
|
626
|
+
"main-color": j(F)?.mainColor,
|
|
627
|
+
"text-color": j(F)?.textColor,
|
|
628
|
+
"revised-answers": j(ge),
|
|
629
|
+
actions: j(L),
|
|
630
|
+
"message-feedbacks": j(_e),
|
|
631
|
+
"feedback-message-id": j(ve)?.id,
|
|
632
|
+
"feedback-loading": j(ye),
|
|
633
|
+
"feedback-submitted": j(be),
|
|
634
|
+
"feedback-error": j(xe),
|
|
635
|
+
"show-extended-steps": j(F)?.showExtendedSteps,
|
|
636
|
+
"awaiting-spoken-answer": K.value,
|
|
637
|
+
"is-dark": j(Ue),
|
|
631
638
|
"show-scroll-to-bottom": i.modifier === "fullscreen",
|
|
632
|
-
onFeedbackSubmit: n[0] ||= (e) => j(
|
|
633
|
-
onFeedbackClose: n[1] ||= (e) =>
|
|
634
|
-
onRegenerate: j(
|
|
635
|
-
onAutoRetry: j(
|
|
636
|
-
onResetChat: j(
|
|
637
|
-
onShowInfo: n[2] ||= (e) =>
|
|
638
|
-
onRevise: n[3] ||= (e) =>
|
|
639
|
-
onUpvote: j(
|
|
640
|
-
onDownvote: j(
|
|
641
|
-
onFeedback: j(
|
|
642
|
-
onApprovalRespond: j(
|
|
639
|
+
onFeedbackSubmit: n[0] ||= (e) => j(Ze)(e),
|
|
640
|
+
onFeedbackClose: n[1] ||= (e) => ve.value = void 0,
|
|
641
|
+
onRegenerate: j(qe),
|
|
642
|
+
onAutoRetry: j(qe),
|
|
643
|
+
onResetChat: j($e),
|
|
644
|
+
onShowInfo: n[2] ||= (e) => pe("show-info", e),
|
|
645
|
+
onRevise: n[3] ||= (e) => pe("revise", e),
|
|
646
|
+
onUpvote: j(Je),
|
|
647
|
+
onDownvote: j(Ye),
|
|
648
|
+
onFeedback: j(Xe),
|
|
649
|
+
onApprovalRespond: j(et),
|
|
643
650
|
onConfirmRespond: Pt
|
|
644
651
|
}, {
|
|
645
|
-
"tool-showContactForm":
|
|
652
|
+
"tool-showContactForm": N(({ part: e }) => [S(j(ee), {
|
|
646
653
|
part: e,
|
|
647
|
-
readonly: !j(
|
|
648
|
-
submitted: j(
|
|
649
|
-
loading: j(
|
|
650
|
-
error: j(
|
|
651
|
-
"privacy-policy-notice": j(
|
|
652
|
-
onSubmit: j(
|
|
654
|
+
readonly: !j(ze),
|
|
655
|
+
submitted: j(we),
|
|
656
|
+
loading: j(Te),
|
|
657
|
+
error: j(Ee),
|
|
658
|
+
"privacy-policy-notice": j(F)?.privacyPolicyNotice,
|
|
659
|
+
onSubmit: j(Qe)
|
|
653
660
|
}, null, 8, [
|
|
654
661
|
"part",
|
|
655
662
|
"readonly",
|
|
@@ -659,17 +666,17 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
|
659
666
|
"privacy-policy-notice",
|
|
660
667
|
"onSubmit"
|
|
661
668
|
])]),
|
|
662
|
-
"tool-showSuggestedReply":
|
|
669
|
+
"tool-showSuggestedReply": N(({ part: e }) => [S(j(w), {
|
|
663
670
|
part: e,
|
|
664
671
|
onSelect: (t) => Ft(e, t)
|
|
665
672
|
}, null, 8, ["part", "onSelect"])]),
|
|
666
|
-
"tool-showSources":
|
|
673
|
+
"tool-showSources": N(({ part: e }) => [S(j(ne), {
|
|
667
674
|
part: e,
|
|
668
|
-
"on-expand-context":
|
|
669
|
-
"on-download":
|
|
675
|
+
"on-expand-context": dt,
|
|
676
|
+
"on-download": ft
|
|
670
677
|
}, null, 8, ["part"])]),
|
|
671
|
-
"tool-showForm":
|
|
672
|
-
default:
|
|
678
|
+
"tool-showForm": N(({ part: e }) => [S(h, { mode: "out-in" }, {
|
|
679
|
+
default: N(() => [S(j(m), {
|
|
673
680
|
part: e,
|
|
674
681
|
answered: jt(e),
|
|
675
682
|
onSelect: (t) => Nt("showForm", e, t)
|
|
@@ -680,8 +687,8 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
|
680
687
|
])]),
|
|
681
688
|
_: 2
|
|
682
689
|
}, 1024)]),
|
|
683
|
-
"tool-showMultipleChoice":
|
|
684
|
-
default:
|
|
690
|
+
"tool-showMultipleChoice": N(({ part: e }) => [S(h, { mode: "out-in" }, {
|
|
691
|
+
default: N(() => [S(j(m), {
|
|
685
692
|
part: e,
|
|
686
693
|
"allow-custom-answer": "",
|
|
687
694
|
answered: jt(e),
|
|
@@ -693,11 +700,11 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
|
693
700
|
])]),
|
|
694
701
|
_: 2
|
|
695
702
|
}, 1024)]),
|
|
696
|
-
"tool-requestOAuthConnection":
|
|
703
|
+
"tool-requestOAuthConnection": N(({ part: e }) => [S(j(ie), {
|
|
697
704
|
part: e,
|
|
698
|
-
"backend-url": j(
|
|
699
|
-
"resolve-connection": (e) => j(
|
|
700
|
-
"check-connection": (e) => j(
|
|
705
|
+
"backend-url": j(ze),
|
|
706
|
+
"resolve-connection": (e) => j(V).getOAuthAuthorizeUrl(A.agentId, e),
|
|
707
|
+
"check-connection": (e) => j(V).getOAuthConnectionStatus(A.agentId, e),
|
|
701
708
|
onConnected: (t) => Lt(e, t)
|
|
702
709
|
}, null, 8, [
|
|
703
710
|
"part",
|
|
@@ -706,10 +713,10 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
|
706
713
|
"check-connection",
|
|
707
714
|
"onConnected"
|
|
708
715
|
])]),
|
|
709
|
-
"tool-requestGeolocation":
|
|
716
|
+
"tool-requestGeolocation": N(({ part: e }) => [S(j(re), {
|
|
710
717
|
part: e,
|
|
711
718
|
"call-live": j(Z).isActive.value,
|
|
712
|
-
"reverse-geocode": (e, t) => j(
|
|
719
|
+
"reverse-geocode": (e, t) => j(V).reverseGeocode(e, t),
|
|
713
720
|
onResult: (t) => It(e, t)
|
|
714
721
|
}, null, 8, [
|
|
715
722
|
"part",
|
|
@@ -717,25 +724,25 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
|
717
724
|
"reverse-geocode",
|
|
718
725
|
"onResult"
|
|
719
726
|
])]),
|
|
720
|
-
"tool-showLocation":
|
|
727
|
+
"tool-showLocation": N(({ part: e }) => [S(j(ae), {
|
|
721
728
|
part: e,
|
|
722
|
-
"is-dark": j(
|
|
723
|
-
"main-color": j(
|
|
724
|
-
"forward-geocode": (e, t) => j(
|
|
729
|
+
"is-dark": j(Ue),
|
|
730
|
+
"main-color": j(F)?.mainColor,
|
|
731
|
+
"forward-geocode": (e, t) => j(V).forwardGeocode(e, t)
|
|
725
732
|
}, null, 8, [
|
|
726
733
|
"part",
|
|
727
734
|
"is-dark",
|
|
728
735
|
"main-color",
|
|
729
736
|
"forward-geocode"
|
|
730
737
|
])]),
|
|
731
|
-
"tool-showDiagram":
|
|
738
|
+
"tool-showDiagram": N(({ part: e }) => [S(j(oe), {
|
|
732
739
|
part: e,
|
|
733
|
-
"is-dark": j(
|
|
740
|
+
"is-dark": j(Ue)
|
|
734
741
|
}, null, 8, ["part", "is-dark"])]),
|
|
735
|
-
"tool-editSpreadsheet":
|
|
742
|
+
"tool-editSpreadsheet": N(({ part: e }) => [(D(), _(j(se), {
|
|
736
743
|
key: j(o)(e),
|
|
737
744
|
part: e,
|
|
738
|
-
"file-url":
|
|
745
|
+
"file-url": We
|
|
739
746
|
}, null, 8, ["part"]))]),
|
|
740
747
|
_: 1
|
|
741
748
|
}, 8, [
|
|
@@ -766,16 +773,16 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
|
766
773
|
]))]),
|
|
767
774
|
_: 1
|
|
768
775
|
}),
|
|
769
|
-
b("div",
|
|
776
|
+
b("div", Oe, [
|
|
770
777
|
S(h, { name: "pk-chatbot-view-chat-fade" }, {
|
|
771
|
-
default:
|
|
778
|
+
default: N(() => [ct.value ? (D(), _(he, {
|
|
772
779
|
key: 0,
|
|
773
780
|
class: "pk-chatbot-view-chat__aurora",
|
|
774
781
|
"source-selector": ".pk-chatbot-input__form"
|
|
775
782
|
})) : v("", !0)]),
|
|
776
783
|
_: 1
|
|
777
784
|
}),
|
|
778
|
-
j(zt) && !j(
|
|
785
|
+
j(zt) && !j(Re) ? (D(), _(f, {
|
|
779
786
|
key: 0,
|
|
780
787
|
pending: j(zt),
|
|
781
788
|
stopping: j(Bt),
|
|
@@ -785,33 +792,33 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
|
785
792
|
"stopping",
|
|
786
793
|
"onStop"
|
|
787
794
|
])) : v("", !0),
|
|
788
|
-
j(
|
|
795
|
+
j(Re) ? (D(), y("div", ke, k(j(U)("message.chatErrorConversationBlocked")), 1)) : xt.value === "idle" ? (D(), _(u, {
|
|
789
796
|
key: 3,
|
|
790
|
-
modelValue: j(
|
|
791
|
-
"onUpdate:modelValue": n[4] ||= (e) => te(
|
|
792
|
-
"pending-attachments": j(
|
|
793
|
-
"onUpdate:pendingAttachments": n[5] ||= (e) => te(
|
|
794
|
-
placeholder: j(
|
|
795
|
-
"dismissable-notice": j(
|
|
796
|
-
status: j(
|
|
797
|
-
"max-message-length": j(
|
|
798
|
-
"file-upload": j(
|
|
799
|
-
"attachment-limit-reached": j(
|
|
800
|
-
"attachment-notice":
|
|
797
|
+
modelValue: j(B),
|
|
798
|
+
"onUpdate:modelValue": n[4] ||= (e) => te(B) ? B.value = e : null,
|
|
799
|
+
"pending-attachments": j(Be),
|
|
800
|
+
"onUpdate:pendingAttachments": n[5] ||= (e) => te(Be) ? Be.value = e : null,
|
|
801
|
+
placeholder: j(Le),
|
|
802
|
+
"dismissable-notice": j(ot) && j(z).messages.length <= 1 ? j(ot) : void 0,
|
|
803
|
+
status: j(z).status,
|
|
804
|
+
"max-message-length": j(F)?.maxMessageLength,
|
|
805
|
+
"file-upload": j(I),
|
|
806
|
+
"attachment-limit-reached": j(Ve),
|
|
807
|
+
"attachment-notice": at.value,
|
|
801
808
|
"voice-enabled": bt.value,
|
|
802
|
-
onStopGeneration: j(
|
|
803
|
-
onSubmit: j(
|
|
804
|
-
onFileSelect: j(
|
|
805
|
-
onDismissAttachmentNotice: j(
|
|
809
|
+
onStopGeneration: j(Ke),
|
|
810
|
+
onSubmit: j(Ge),
|
|
811
|
+
onFileSelect: j(tt),
|
|
812
|
+
onDismissAttachmentNotice: j(nt),
|
|
806
813
|
onVoiceStart: Et
|
|
807
814
|
}, x({ _: 2 }, [i.modifier === "fullscreen" ? {
|
|
808
815
|
name: "prepend",
|
|
809
|
-
fn:
|
|
816
|
+
fn: N(() => [b("span", Ae, [S(c, {
|
|
810
817
|
modifiers: "surface",
|
|
811
818
|
class: "pk-chatbot-view-chat__agent-chip-avatar",
|
|
812
|
-
"img-src": j(
|
|
813
|
-
name: j(
|
|
814
|
-
}, null, 8, ["img-src", "name"]), j(
|
|
819
|
+
"img-src": j(F)?.logo,
|
|
820
|
+
name: j(P).name
|
|
821
|
+
}, null, 8, ["img-src", "name"]), j(P).name ? (D(), y("strong", je, k(j(P).name), 1)) : v("", !0)])]),
|
|
815
822
|
key: "0"
|
|
816
823
|
} : void 0]), 1032, [
|
|
817
824
|
"modelValue",
|
|
@@ -828,13 +835,13 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
|
828
835
|
"onSubmit",
|
|
829
836
|
"onFileSelect",
|
|
830
837
|
"onDismissAttachmentNotice"
|
|
831
|
-
])) : (D(), _(
|
|
838
|
+
])) : (D(), _(Se, {
|
|
832
839
|
key: 2,
|
|
833
840
|
state: xt.value,
|
|
834
841
|
sample: wt,
|
|
835
842
|
spectrum: Tt,
|
|
836
843
|
"remaining-seconds": j(Z).remainingSeconds.value,
|
|
837
|
-
muted:
|
|
844
|
+
muted: W.value,
|
|
838
845
|
error: St.value,
|
|
839
846
|
"raw-error": j(Z).error.value,
|
|
840
847
|
live: j(Z).isActive.value,
|
|
@@ -853,10 +860,10 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
|
853
860
|
]))
|
|
854
861
|
]),
|
|
855
862
|
S(h, null, {
|
|
856
|
-
default:
|
|
863
|
+
default: N(() => [j(pt) && j(I)?.enabled ? (D(), y("div", Me, [S(r, {
|
|
857
864
|
name: "ri:upload-cloud-2-line",
|
|
858
865
|
class: "pk-chatbot-view-chat__drop-overlay-icon"
|
|
859
|
-
}), b("span", null, k(j(
|
|
866
|
+
}), b("span", null, k(j(U)("action.dropFile")), 1)])) : v("", !0)]),
|
|
860
867
|
_: 1
|
|
861
868
|
})
|
|
862
869
|
], 2);
|
|
@@ -864,6 +871,6 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
|
|
|
864
871
|
}
|
|
865
872
|
});
|
|
866
873
|
//#endregion
|
|
867
|
-
export {
|
|
874
|
+
export { he as i, Se as n, R as r, Le as t };
|
|
868
875
|
|
|
869
|
-
//# sourceMappingURL=PkChatbotViewChat-
|
|
876
|
+
//# sourceMappingURL=PkChatbotViewChat-DyEDdBwU.js.map
|