@8wave/ai-elements 0.121.0-beta.41 → 0.121.0-beta.42
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/{PkChatbotFilePreview-CpFXWpU7.js → PkChatbotFilePreview-DxpEIFOG.js} +2 -2
- package/dist/_chunks/{PkChatbotFilePreview-CpFXWpU7.js.map → PkChatbotFilePreview-DxpEIFOG.js.map} +1 -1
- package/dist/_chunks/{PkHeldImage-DvHKY7Vh.js → PkHeldImage-CztNY8OZ.js} +2 -2
- package/dist/_chunks/{PkHeldImage-DvHKY7Vh.js.map → PkHeldImage-CztNY8OZ.js.map} +1 -1
- package/dist/_chunks/{PkLazyImg-BBFsS16D.js → PkLazyImg-BqbuNQgf.js} +2 -2
- package/dist/_chunks/{PkLazyImg-BBFsS16D.js.map → PkLazyImg-BqbuNQgf.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-D2aqCD0I.js → PkStreamingMarkdown-BlTH2AJX.js} +2 -2
- package/dist/_chunks/{PkStreamingMarkdown-D2aqCD0I.js.map → PkStreamingMarkdown-BlTH2AJX.js.map} +1 -1
- package/dist/_chunks/{PkToolEditSpreadsheet-83ZdmGeA.js → PkToolEditSpreadsheet-CDxglslA.js} +2 -2
- package/dist/_chunks/{PkToolEditSpreadsheet-83ZdmGeA.js.map → PkToolEditSpreadsheet-CDxglslA.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-1cOmCG8P.js → PkToolRequestGeolocation-CxMAoAv6.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-1cOmCG8P.js.map → PkToolRequestGeolocation-CxMAoAv6.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-CCu3FCyo.js → PkToolRequestOAuthConnection-DU1Y2odZ.js} +3 -3
- package/dist/_chunks/{PkToolRequestOAuthConnection-CCu3FCyo.js.map → PkToolRequestOAuthConnection-DU1Y2odZ.js.map} +1 -1
- package/dist/_chunks/{PkToolShareDocument-BhT59J9o.js → PkToolShareDocument-YrPrexhS.js} +5 -5
- package/dist/_chunks/{PkToolShareDocument-BhT59J9o.js.map → PkToolShareDocument-YrPrexhS.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-CiYkZkpe.js → PkToolShowArtifact-jQeIv65U.js} +4 -4
- package/dist/_chunks/{PkToolShowArtifact-CiYkZkpe.js.map → PkToolShowArtifact-jQeIv65U.js.map} +1 -1
- package/dist/_chunks/{PkToolShowCalendarEvent-Dzh4JURs.js → PkToolShowCalendarEvent-CAN5-qnM.js} +4 -4
- package/dist/_chunks/{PkToolShowCalendarEvent-Dzh4JURs.js.map → PkToolShowCalendarEvent-CAN5-qnM.js.map} +1 -1
- package/dist/_chunks/{PkToolShowComparison-CFHrXnaB.js → PkToolShowComparison-DGxHYpl3.js} +4 -4
- package/dist/_chunks/{PkToolShowComparison-CFHrXnaB.js.map → PkToolShowComparison-DGxHYpl3.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-D7TEzrYe.js → PkToolShowContactForm-D7wg3Jlu.js} +5 -5
- package/dist/_chunks/{PkToolShowContactForm-D7TEzrYe.js.map → PkToolShowContactForm-D7wg3Jlu.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-DGnIuRst.js → PkToolShowDiagram-BBs1rh96.js} +4 -4
- package/dist/_chunks/{PkToolShowDiagram-DGnIuRst.js.map → PkToolShowDiagram-BBs1rh96.js.map} +1 -1
- package/dist/_chunks/{PkToolShowEmail-C3jped-R.js → PkToolShowEmail-CeiSo-zx.js} +4 -4
- package/dist/_chunks/{PkToolShowEmail-C3jped-R.js.map → PkToolShowEmail-CeiSo-zx.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-CSh4Q6sl.js → PkToolShowForm-BMVgXxzl.js} +4 -4
- package/dist/_chunks/{PkToolShowForm-CSh4Q6sl.js.map → PkToolShowForm-BMVgXxzl.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-CQEaEfYE.js → PkToolShowImageGallery-Ba0CfKt6.js} +3 -3
- package/dist/_chunks/{PkToolShowImageGallery-CQEaEfYE.js.map → PkToolShowImageGallery-Ba0CfKt6.js.map} +1 -1
- package/dist/_chunks/{PkToolShowLocation-gyMiVjhi.js → PkToolShowLocation-Cp95-u2H.js} +4 -4
- package/dist/_chunks/{PkToolShowLocation-gyMiVjhi.js.map → PkToolShowLocation-Cp95-u2H.js.map} +1 -1
- package/dist/_chunks/{PkToolShowMessage-wGPPnOAM.js → PkToolShowMessage-Bn8O_W0D.js} +4 -4
- package/dist/_chunks/{PkToolShowMessage-wGPPnOAM.js.map → PkToolShowMessage-Bn8O_W0D.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-BCmULLct.js → PkToolShowProductList-DbZfUUWe.js} +4 -4
- package/dist/_chunks/{PkToolShowProductList-BCmULLct.js.map → PkToolShowProductList-DbZfUUWe.js.map} +1 -1
- package/dist/_chunks/{PkToolShowQrCode-CeZsvZvb.js → PkToolShowQrCode-D_9_c-Ws.js} +4 -4
- package/dist/_chunks/{PkToolShowQrCode-CeZsvZvb.js.map → PkToolShowQrCode-D_9_c-Ws.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-R9KWsfTQ.js → PkToolShowSources-Dkt4IId2.js} +4 -4
- package/dist/_chunks/{PkToolShowSources-R9KWsfTQ.js.map → PkToolShowSources-Dkt4IId2.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-DYZz9aV2.js → PkToolShowSuggestedReply-BF2sT3B1.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-DYZz9aV2.js.map → PkToolShowSuggestedReply-BF2sT3B1.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-C_9SZtZM.js → PkToolShowVideo-l8JoSKCj.js} +3 -3
- package/dist/_chunks/{PkToolShowVideo-C_9SZtZM.js.map → PkToolShowVideo-l8JoSKCj.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWeather-BgS4_SWb.js → PkToolShowWeather-DifqBB7o.js} +2 -2
- package/dist/_chunks/{PkToolShowWeather-BgS4_SWb.js.map → PkToolShowWeather-DifqBB7o.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-DwRYfle9.js → PkToolShowWebPages-DtcEmrYt.js} +4 -4
- package/dist/_chunks/{PkToolShowWebPages-DwRYfle9.js.map → PkToolShowWebPages-DtcEmrYt.js.map} +1 -1
- package/dist/_chunks/{VvButtonLocalized-B6igS2e0.js → VvButtonLocalized-D7K9ZslZ.js} +2 -2
- package/dist/_chunks/{VvButtonLocalized-B6igS2e0.js.map → VvButtonLocalized-D7K9ZslZ.js.map} +1 -1
- package/dist/_chunks/{VvCheckboxGroup.es-OXhptnPU.js → VvCheckboxGroup.es-BebSMBKU.js} +2 -2
- package/dist/_chunks/{VvCheckboxGroup.es-OXhptnPU.js.map → VvCheckboxGroup.es-BebSMBKU.js.map} +1 -1
- package/dist/_chunks/{VvCombobox.es-SLzX9VnX.js → VvCombobox.es-BfiDcdcw.js} +481 -481
- package/dist/_chunks/{VvCombobox.es-SLzX9VnX.js.map → VvCombobox.es-BfiDcdcw.js.map} +1 -1
- package/dist/_chunks/{VvInputText.es-CETcNKlr.js → VvInputText.es-DllQ2Tue.js} +435 -435
- package/dist/_chunks/{VvInputText.es-CETcNKlr.js.map → VvInputText.es-DllQ2Tue.js.map} +1 -1
- package/dist/_chunks/{VvRadioGroup.es-UBZBB89A.js → VvRadioGroup.es-D6uqf6a1.js} +2 -2
- package/dist/_chunks/{VvRadioGroup.es-UBZBB89A.js.map → VvRadioGroup.es-D6uqf6a1.js.map} +1 -1
- package/dist/_chunks/{VvSelect.es-B_MShGnJ.js → VvSelect.es-BR5Ci5VC.js} +2 -2
- package/dist/_chunks/{VvSelect.es-B_MShGnJ.js.map → VvSelect.es-BR5Ci5VC.js.map} +1 -1
- package/dist/_chunks/{VvTextarea.es-Dm2Yq3WM.js → VvTextarea.es-Bwe5xjXl.js} +29 -29
- package/dist/_chunks/{VvTextarea.es-Dm2Yq3WM.js.map → VvTextarea.es-Bwe5xjXl.js.map} +1 -1
- package/dist/_chunks/{dist-Do_Ac5Yv.js → dist-CB7v_M5z.js} +52 -46
- package/dist/_chunks/dist-CB7v_M5z.js.map +1 -0
- package/dist/_chunks/{index.es-BTDKU45u.js → index.es-CKF2q-ww.js} +26 -26
- package/dist/_chunks/{index.es-BTDKU45u.js.map → index.es-CKF2q-ww.js.map} +1 -1
- package/dist/_chunks/{index.es-BZS9Cscn.js → index.es-CoWhnabo.js} +16 -16
- package/dist/_chunks/{index.es-BZS9Cscn.js.map → index.es-CoWhnabo.js.map} +1 -1
- package/dist/ai-elements.es.js +4171 -3913
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotQueuedMessages.d.ts +2 -0
- package/dist-vue/PkChatbotQueuedMessages.js +1 -0
- 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/PkChatbot-CObEhs2T.js +279 -0
- package/dist-vue/_chunks/PkChatbot-CObEhs2T.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotInput-BJHtmPR-.js → PkChatbotInput-CuEoeb_M.js} +47 -22
- package/dist-vue/_chunks/PkChatbotInput-CuEoeb_M.js.map +1 -0
- package/dist-vue/_chunks/PkChatbotQueuedMessages-DlydYgwC.js +51 -0
- package/dist-vue/_chunks/PkChatbotQueuedMessages-DlydYgwC.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-BI_PtT72.js → PkChatbotViewChat-BZb-U7Ju.js} +246 -224
- package/dist-vue/_chunks/PkChatbotViewChat-BZb-U7Ju.js.map +1 -0
- package/dist-vue/_chunks/PkChatbotViewConversations-CCPRWCKs.js +210 -0
- package/dist-vue/_chunks/PkChatbotViewConversations-CCPRWCKs.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewFiles-Cwm-JQMF.js → PkChatbotViewFiles-BgqksCn0.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewFiles-Cwm-JQMF.js.map → PkChatbotViewFiles-BgqksCn0.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-C_GElIM3.js → PkChatbotViewProfile-B6tHWrqn.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-C_GElIM3.js.map → PkChatbotViewProfile-B6tHWrqn.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-DUz4dwzY.js → createChatbotApiClient-hcFAulTq.js} +12 -3
- package/dist-vue/_chunks/createChatbotApiClient-hcFAulTq.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-D7LcpA-6.js → useChatbotStore-Ct7G-voO.js} +953 -800
- package/dist-vue/_chunks/useChatbotStore-Ct7G-voO.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +10 -6
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +96 -82
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +16 -2
- package/dist-vue/packages/components/src/chat/PkChatSidebarConversationItem.d.ts +2 -0
- package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +17 -3
- package/dist-vue/packages/components/src/chat/PkChatbotQueuedMessages.d.ts +22 -0
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +5 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +37 -2
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/dist-Do_Ac5Yv.js.map +0 -1
- package/dist-vue/_chunks/PkChatbot-DIqduIwr.js +0 -290
- package/dist-vue/_chunks/PkChatbot-DIqduIwr.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-BJHtmPR-.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-BI_PtT72.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewConversations-Bg4jSO9a.js +0 -199
- package/dist-vue/_chunks/PkChatbotViewConversations-Bg4jSO9a.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-DUz4dwzY.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-D7LcpA-6.js.map +0 -1
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
import { t as e } from "./PkChatbotMessages-DMSActW1.js";
|
|
2
2
|
import { o as t } from "./Media-D-UGzdcW.js";
|
|
3
|
-
import { a as n, n as r, t as i } from "./useChatbotStore-
|
|
3
|
+
import { a as n, n as r, t as i } from "./useChatbotStore-Ct7G-voO.js";
|
|
4
4
|
import { n as a } from "./src-BZRiAJsH.js";
|
|
5
5
|
import { c as o, h as s, n as c } from "./utils-EPX3V3VI.js";
|
|
6
6
|
import { t as l } from "./useLocalizedString-PfaKjIQY.js";
|
|
7
7
|
import { t as u } from "./PkAvatar-BTqu8tn9.js";
|
|
8
|
-
import { n as d, t as f } from "./PkChatbotInput-
|
|
9
|
-
import { t as p } from "./
|
|
10
|
-
import { t as m } from "./
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
8
|
+
import { n as d, t as f } from "./PkChatbotInput-CuEoeb_M.js";
|
|
9
|
+
import { t as p } from "./PkChatbotQueuedMessages-DlydYgwC.js";
|
|
10
|
+
import { t as m } from "./PkChatbotEmptyState-Dh7ETVnf.js";
|
|
11
|
+
import { t as h } from "./PkChatbotWakeupBar-Cjgarxnw.js";
|
|
12
|
+
import { VvIcon as g } from "@volverjs/ui-vue/components";
|
|
13
|
+
import { Fragment as _, Transition as v, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createSlots as ee, createTextVNode as te, createVNode as w, defineAsyncComponent as T, defineComponent as E, isRef as ne, nextTick as re, normalizeClass as D, onBeforeUnmount as O, onMounted as ie, onScopeDispose as ae, onUnmounted as oe, openBlock as k, provide as se, ref as A, renderList as ce, shallowRef as le, toDisplayString as j, toValue as ue, unref as M, useTemplateRef as de, watch as N, withCtx as P } from "vue";
|
|
14
|
+
import { useI18n as fe } from "vue-i18n";
|
|
15
|
+
import { useDropZone as pe } from "@vueuse/core";
|
|
16
|
+
import { storeToRefs as me } from "pinia";
|
|
16
17
|
//#region ../../packages/composable/src/chatbot/useGreeting.ts
|
|
17
|
-
function
|
|
18
|
-
let { locale: n, t: r, te: i } =
|
|
19
|
-
return
|
|
18
|
+
function he(e, t) {
|
|
19
|
+
let { locale: n, t: r, te: i } = fe({ useScope: "global" });
|
|
20
|
+
return y(() => F(ue(e)?.greeting?.[0]?.[n.value] ?? "", ue(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
|
|
20
21
|
}
|
|
21
22
|
function F(e, t) {
|
|
22
23
|
return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
|
|
23
24
|
}
|
|
24
25
|
//#endregion
|
|
25
26
|
//#region ../../packages/components/src/chat/PkAuroraCanvas.vue?vue&type=script&setup=true&lang.ts
|
|
26
|
-
var
|
|
27
|
+
var ge = {
|
|
27
28
|
class: "pk-aurora",
|
|
28
29
|
"aria-hidden": "true"
|
|
29
30
|
}, I = {
|
|
30
31
|
key: 1,
|
|
31
32
|
class: "pk-aurora__fallback"
|
|
32
|
-
}, L = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}",
|
|
33
|
+
}, L = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", _e = "\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}", ve = /* @__PURE__ */ E({
|
|
33
34
|
__name: "PkAuroraCanvas",
|
|
34
35
|
props: { sourceSelector: {} },
|
|
35
36
|
setup(e) {
|
|
36
|
-
let t = e, n =
|
|
37
|
+
let t = e, n = de("canvasEl"), r = A(!1), i = null, a = 0, o = null, s = null, c = null, l = null, u = null, d = null, f = performance.now(), p = (e, t) => {
|
|
37
38
|
if (!i) return null;
|
|
38
39
|
let n = i.createShader(e);
|
|
39
40
|
return !n || (i.shaderSource(n, t), i.compileShader(n), !i.getShaderParameter(n, i.COMPILE_STATUS)) ? null : n;
|
|
@@ -62,7 +63,7 @@ var he = {
|
|
|
62
63
|
}, v = () => {
|
|
63
64
|
_(), a = requestAnimationFrame(v);
|
|
64
65
|
};
|
|
65
|
-
return
|
|
66
|
+
return ie(() => {
|
|
66
67
|
let e = n.value;
|
|
67
68
|
i = e?.getContext("webgl", { alpha: !0 }) ?? null;
|
|
68
69
|
let t = m();
|
|
@@ -70,7 +71,7 @@ var he = {
|
|
|
70
71
|
r.value = !0;
|
|
71
72
|
return;
|
|
72
73
|
}
|
|
73
|
-
let a = p(i.VERTEX_SHADER, L), f = p(i.FRAGMENT_SHADER,
|
|
74
|
+
let a = p(i.VERTEX_SHADER, L), f = p(i.FRAGMENT_SHADER, _e), y = i.createProgram();
|
|
74
75
|
if (!a || !f || !y || (i.attachShader(y, a), i.attachShader(y, f), i.linkProgram(y), !i.getProgramParameter(y, i.LINK_STATUS))) {
|
|
75
76
|
r.value = !0;
|
|
76
77
|
return;
|
|
@@ -88,22 +89,22 @@ var he = {
|
|
|
88
89
|
1
|
|
89
90
|
]), i.STATIC_DRAW);
|
|
90
91
|
let x = i.getAttribLocation(y, "a_position");
|
|
91
|
-
i.enableVertexAttribArray(x), i.vertexAttribPointer(x, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(y, "u_time"), c = i.getUniformLocation(y, "u_resolution"), l = i.getUniformLocation(y, "u_center"), u = i.getUniformLocation(y, "u_half"), d = i.getUniformLocation(y, "u_spread"), i.uniform3f(i.getUniformLocation(y, "u_color"), ...t), o = new ResizeObserver(h), o.observe(e), h(),
|
|
92
|
+
i.enableVertexAttribArray(x), i.vertexAttribPointer(x, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(y, "u_time"), c = i.getUniformLocation(y, "u_resolution"), l = i.getUniformLocation(y, "u_center"), u = i.getUniformLocation(y, "u_half"), d = i.getUniformLocation(y, "u_spread"), i.uniform3f(i.getUniformLocation(y, "u_color"), ...t), o = new ResizeObserver(h), o.observe(e), h(), re(h), g() ? _(10) : v();
|
|
92
93
|
}), O(() => {
|
|
93
94
|
cancelAnimationFrame(a), o?.disconnect();
|
|
94
|
-
}),
|
|
95
|
+
}), oe(() => {
|
|
95
96
|
let e = i;
|
|
96
97
|
i = null, setTimeout(() => {
|
|
97
98
|
e?.getExtension("WEBGL_lose_context")?.loseContext();
|
|
98
99
|
}, 150);
|
|
99
|
-
}), (e, t) => (k(),
|
|
100
|
+
}), (e, t) => (k(), S("div", ge, [r.value ? (k(), S("div", I)) : (k(), S("canvas", {
|
|
100
101
|
key: 0,
|
|
101
102
|
ref_key: "canvasEl",
|
|
102
103
|
ref: n,
|
|
103
104
|
class: "pk-aurora__canvas"
|
|
104
105
|
}, null, 512))]));
|
|
105
106
|
}
|
|
106
|
-
}), R = .18,
|
|
107
|
+
}), R = .18, ye = .35, be = /* @__PURE__ */ E({
|
|
107
108
|
__name: "PkVoiceOrb",
|
|
108
109
|
props: {
|
|
109
110
|
sample: {},
|
|
@@ -115,7 +116,7 @@ var he = {
|
|
|
115
116
|
bars: { default: 5 }
|
|
116
117
|
},
|
|
117
118
|
setup(e) {
|
|
118
|
-
let t = e, n =
|
|
119
|
+
let t = e, n = de("barsEl"), r = Array.from({ length: t.bars }, () => R), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
|
|
119
120
|
let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
|
|
120
121
|
if (!n?.length) {
|
|
121
122
|
let t = Date.now() / 260;
|
|
@@ -137,25 +138,25 @@ var he = {
|
|
|
137
138
|
});
|
|
138
139
|
}, c = () => {
|
|
139
140
|
let e = o();
|
|
140
|
-
r = r.map((t, n) => t + (Math.min(1, Math.max(R, e[n] ?? R)) - t) *
|
|
141
|
+
r = r.map((t, n) => t + (Math.min(1, Math.max(R, e[n] ?? R)) - t) * ye), s(), i = requestAnimationFrame(c);
|
|
141
142
|
}, l = () => {
|
|
142
143
|
i !== void 0 && (cancelAnimationFrame(i), i = void 0);
|
|
143
144
|
};
|
|
144
145
|
return N(() => t.state, async (e) => {
|
|
145
|
-
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => R * 1.6), await
|
|
146
|
-
}, { immediate: !0 }), O(l), (t, r) => (k(),
|
|
146
|
+
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => R * 1.6), await re(), s()) : i === void 0 && (i = requestAnimationFrame(c));
|
|
147
|
+
}, { immediate: !0 }), O(l), (t, r) => (k(), S("div", {
|
|
147
148
|
class: D(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
|
|
148
149
|
"aria-hidden": "true"
|
|
149
|
-
}, [
|
|
150
|
+
}, [C("div", {
|
|
150
151
|
ref_key: "barsEl",
|
|
151
152
|
ref: n,
|
|
152
153
|
class: "pk-voice-orb__bars"
|
|
153
|
-
}, [(k(!0),
|
|
154
|
+
}, [(k(!0), S(_, null, ce(e.bars, (e) => (k(), S("span", {
|
|
154
155
|
key: e,
|
|
155
156
|
class: "pk-voice-orb__bar"
|
|
156
157
|
}))), 128))], 512)], 2));
|
|
157
158
|
}
|
|
158
|
-
}),
|
|
159
|
+
}), xe = {
|
|
159
160
|
key: 0,
|
|
160
161
|
class: "pk-voice-session__badge",
|
|
161
162
|
"aria-hidden": "true"
|
|
@@ -166,7 +167,7 @@ var he = {
|
|
|
166
167
|
key: 0,
|
|
167
168
|
class: "pk-voice-session__live-dot",
|
|
168
169
|
"aria-hidden": "true"
|
|
169
|
-
},
|
|
170
|
+
}, Se = ["title"], Ce = ["title"], we = { class: "pk-voice-session__actions" }, Te = /* @__PURE__ */ E({
|
|
170
171
|
__name: "PkVoiceSession",
|
|
171
172
|
props: {
|
|
172
173
|
state: {},
|
|
@@ -185,17 +186,17 @@ var he = {
|
|
|
185
186
|
"dismiss"
|
|
186
187
|
],
|
|
187
188
|
setup(e, { emit: t }) {
|
|
188
|
-
let n = e, r = t, { t: i } =
|
|
189
|
+
let n = e, r = t, { t: i } = fe({ useScope: "global" }), a = y(() => 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 = y(() => {
|
|
189
190
|
if (n.remainingSeconds === void 0) return;
|
|
190
191
|
let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
|
|
191
192
|
return `${e}:${String(t).padStart(2, "0")}`;
|
|
192
|
-
}), s =
|
|
193
|
+
}), s = y(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = y(() => !n.error && (n.state === "listening" || n.state === "speaking")), l = y(() => {
|
|
193
194
|
if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
|
|
194
195
|
});
|
|
195
196
|
return (t, n) => {
|
|
196
|
-
let u =
|
|
197
|
-
return k(),
|
|
198
|
-
e.error ? (k(),
|
|
197
|
+
let u = g;
|
|
198
|
+
return k(), S("div", { class: D(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
|
|
199
|
+
e.error ? (k(), S("span", xe, [w(u, { name: "ri:error-warning-line" })])) : (k(), b(be, {
|
|
199
200
|
key: 1,
|
|
200
201
|
state: e.state,
|
|
201
202
|
sample: e.sample,
|
|
@@ -205,34 +206,34 @@ var he = {
|
|
|
205
206
|
"sample",
|
|
206
207
|
"spectrum"
|
|
207
208
|
])),
|
|
208
|
-
|
|
209
|
+
C("div", z, [C("span", { class: D(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (k(), S("span", B)) : x("", !0), te(" " + j(a.value), 1)], 2), e.error ? (k(), S("p", {
|
|
209
210
|
key: 0,
|
|
210
211
|
class: "pk-voice-session__detail",
|
|
211
212
|
title: e.rawError ?? e.error
|
|
212
|
-
}, j(e.error), 9,
|
|
213
|
-
o.value ? (k(),
|
|
213
|
+
}, j(e.error), 9, Se)) : x("", !0)]),
|
|
214
|
+
o.value ? (k(), S("span", {
|
|
214
215
|
key: 2,
|
|
215
216
|
class: D(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
|
|
216
217
|
title: M(i)("hint.voiceRemaining"),
|
|
217
218
|
"aria-hidden": "true"
|
|
218
|
-
}, j(o.value), 11,
|
|
219
|
-
|
|
219
|
+
}, j(o.value), 11, Ce)) : x("", !0),
|
|
220
|
+
C("div", we, [e.error ? (k(), S(_, { key: 0 }, [w(d, {
|
|
220
221
|
icon: "ri:refresh-line",
|
|
221
222
|
label: M(i)("action.retry"),
|
|
222
223
|
onClick: n[0] ||= (e) => r("retry")
|
|
223
|
-
}, null, 8, ["label"]), e.live ? (k(),
|
|
224
|
+
}, null, 8, ["label"]), e.live ? (k(), b(d, {
|
|
224
225
|
key: 0,
|
|
225
226
|
icon: "ri:stop-circle-line",
|
|
226
227
|
modifiers: "danger",
|
|
227
228
|
title: M(i)("action.hangUp"),
|
|
228
229
|
"aria-label": M(i)("action.hangUp"),
|
|
229
230
|
onClick: n[1] ||= (e) => r("hang-up")
|
|
230
|
-
}, null, 8, ["title", "aria-label"])) : (k(),
|
|
231
|
+
}, null, 8, ["title", "aria-label"])) : (k(), b(d, {
|
|
231
232
|
key: 1,
|
|
232
233
|
icon: "ri:close-line",
|
|
233
234
|
label: M(i)("action.close"),
|
|
234
235
|
onClick: n[2] ||= (e) => r("dismiss")
|
|
235
|
-
}, null, 8, ["label"]))], 64)) : (k(),
|
|
236
|
+
}, null, 8, ["label"]))], 64)) : (k(), S(_, { key: 1 }, [w(d, {
|
|
236
237
|
icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
|
|
237
238
|
title: e.muted ? M(i)("action.unmute") : M(i)("action.mute"),
|
|
238
239
|
"aria-label": e.muted ? M(i)("action.unmute") : M(i)("action.mute"),
|
|
@@ -253,8 +254,8 @@ var he = {
|
|
|
253
254
|
], 2);
|
|
254
255
|
};
|
|
255
256
|
}
|
|
256
|
-
}),
|
|
257
|
-
let t =
|
|
257
|
+
}), Ee = (e) => {
|
|
258
|
+
let t = le(), n = A("disconnected"), r = A("listening"), i = A(), o = A([]), s = A(), c = A(), l, u, d = 0, f = !1, p = () => {
|
|
258
259
|
u &&= (clearInterval(u), void 0), s.value = void 0;
|
|
259
260
|
}, m = (e) => {
|
|
260
261
|
let t = Date.now() + e * 1e3, n = () => {
|
|
@@ -323,7 +324,7 @@ var he = {
|
|
|
323
324
|
if (await h(u), !s()) return;
|
|
324
325
|
t.value = void 0, p(), n.value = "disconnected", i.value = e instanceof Error ? e.message : String(e);
|
|
325
326
|
}
|
|
326
|
-
},
|
|
327
|
+
}, v = () => {
|
|
327
328
|
i.value = void 0;
|
|
328
329
|
}, b = (e) => {
|
|
329
330
|
t.value?.setMicMuted(e);
|
|
@@ -343,21 +344,21 @@ var he = {
|
|
|
343
344
|
} catch {
|
|
344
345
|
return 0;
|
|
345
346
|
}
|
|
346
|
-
},
|
|
347
|
+
}, C = (e) => {
|
|
347
348
|
let n = t.value;
|
|
348
349
|
if (n) try {
|
|
349
350
|
return e === "input" ? n.getInputByteFrequencyData() : n.getOutputByteFrequencyData();
|
|
350
351
|
} catch {
|
|
351
352
|
return;
|
|
352
353
|
}
|
|
353
|
-
},
|
|
354
|
+
}, ee = () => {
|
|
354
355
|
let e = l;
|
|
355
356
|
l = void 0, d += 1, p(), h(e);
|
|
356
357
|
let r = t.value;
|
|
357
358
|
t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
|
|
358
359
|
};
|
|
359
|
-
return typeof window < "u" && window.addEventListener("pagehide",
|
|
360
|
-
f = !0, typeof window < "u" && window.removeEventListener("pagehide",
|
|
360
|
+
return typeof window < "u" && window.addEventListener("pagehide", ee), ae(() => {
|
|
361
|
+
f = !0, typeof window < "u" && window.removeEventListener("pagehide", ee), g();
|
|
361
362
|
}), {
|
|
362
363
|
status: n,
|
|
363
364
|
mode: r,
|
|
@@ -365,24 +366,24 @@ var he = {
|
|
|
365
366
|
transcript: o,
|
|
366
367
|
remainingSeconds: s,
|
|
367
368
|
chatId: c,
|
|
368
|
-
isActive:
|
|
369
|
-
isConnecting:
|
|
370
|
-
isSpeaking:
|
|
371
|
-
isListening:
|
|
369
|
+
isActive: y(() => n.value === "connected" || n.value === "connecting"),
|
|
370
|
+
isConnecting: y(() => n.value === "connecting"),
|
|
371
|
+
isSpeaking: y(() => n.value === "connected" && r.value === "speaking"),
|
|
372
|
+
isListening: y(() => n.value === "connected" && r.value === "listening"),
|
|
372
373
|
start: _,
|
|
373
374
|
stop: g,
|
|
374
|
-
dismissError:
|
|
375
|
+
dismissError: v,
|
|
375
376
|
setMuted: b,
|
|
376
377
|
sendUserMessage: x,
|
|
377
378
|
readLevel: S,
|
|
378
|
-
readSpectrum:
|
|
379
|
+
readSpectrum: C
|
|
379
380
|
};
|
|
380
|
-
},
|
|
381
|
+
}, De = 4e3, Oe = [
|
|
381
382
|
3e3,
|
|
382
383
|
5e3,
|
|
383
384
|
1e4
|
|
384
|
-
],
|
|
385
|
-
function
|
|
385
|
+
], ke = 12e4, Ae = 3e4;
|
|
386
|
+
function je(e) {
|
|
386
387
|
let t = A(null), n = A(!1), r, i = !1, a = () => {
|
|
387
388
|
clearTimeout(r), r = void 0;
|
|
388
389
|
}, o = (e, t) => {
|
|
@@ -400,12 +401,12 @@ function Ae(e) {
|
|
|
400
401
|
}
|
|
401
402
|
let r = t.value;
|
|
402
403
|
if (r) {
|
|
403
|
-
let e = Date.parse(r.dueAt) - Date.now() +
|
|
404
|
-
o(Math.max(
|
|
404
|
+
let e = Date.parse(r.dueAt) - Date.now() + De;
|
|
405
|
+
o(Math.max(De, e), () => l(r.wakeId, Date.now(), 0));
|
|
405
406
|
}
|
|
406
407
|
}
|
|
407
408
|
async function l(t, n, r) {
|
|
408
|
-
await e.refreshMessages(), !i && (s(t) || Date.now() - n >=
|
|
409
|
+
await e.refreshMessages(), !i && (s(t) || Date.now() - n >= ke ? await c() : o(Oe[Math.min(r, Oe.length - 1)], () => l(t, n, r + 1)));
|
|
409
410
|
}
|
|
410
411
|
async function u() {
|
|
411
412
|
n.value = !0;
|
|
@@ -425,7 +426,7 @@ function Ae(e) {
|
|
|
425
426
|
}
|
|
426
427
|
let m = () => p();
|
|
427
428
|
return document.addEventListener("visibilitychange", m), N(() => t.value?.wakeId, (e) => {
|
|
428
|
-
clearInterval(f), f = void 0, e && !i && (p(), f = setInterval(p,
|
|
429
|
+
clearInterval(f), f = void 0, e && !i && (p(), f = setInterval(p, Ae));
|
|
429
430
|
}), O(() => {
|
|
430
431
|
i = !0, a(), clearInterval(f), document.removeEventListener("visibilitychange", m);
|
|
431
432
|
}), {
|
|
@@ -438,16 +439,16 @@ function Ae(e) {
|
|
|
438
439
|
}
|
|
439
440
|
//#endregion
|
|
440
441
|
//#region ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
|
|
441
|
-
var
|
|
442
|
+
var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
442
443
|
key: 1,
|
|
443
444
|
class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
|
|
444
|
-
},
|
|
445
|
+
}, Pe = { class: "pk-chatbot-view-chat__agent-chip" }, Fe = {
|
|
445
446
|
key: 0,
|
|
446
447
|
class: "pk-chatbot-view-chat__agent-chip-name"
|
|
447
|
-
},
|
|
448
|
+
}, Ie = {
|
|
448
449
|
key: 0,
|
|
449
450
|
class: "pk-chatbot-view-chat__drop-overlay"
|
|
450
|
-
},
|
|
451
|
+
}, Le = 3e3, Re = 6e4, ze = 3e5, Be = 6e5, Ve = /* @__PURE__ */ E({
|
|
451
452
|
__name: "PkChatbotViewChat",
|
|
452
453
|
props: {
|
|
453
454
|
agentId: {},
|
|
@@ -456,58 +457,61 @@ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
|
|
|
456
457
|
},
|
|
457
458
|
emits: ["show-info", "revise"],
|
|
458
459
|
setup(a, { emit: d }) {
|
|
459
|
-
let
|
|
460
|
-
|
|
461
|
-
let H =
|
|
462
|
-
let e =
|
|
460
|
+
let _ = T(() => import("./PkToolShowForm-B6ESvq-5.js").then((e) => e.n)), te = T(() => import("./PkToolShowContactForm-CmBLigw8.js").then((e) => e.n)), E = T(() => import("./PkToolShowSuggestedReply-Cd6VkzvJ.js").then((e) => e.n)), re = T(() => import("./PkToolShowSources-BDvRbenn.js").then((e) => e.n)), ie = T(() => import("./PkToolRequestGeolocation-DC8hSH0j.js")), ae = T(() => import("./PkToolRequestOAuthConnection-BH_-drvw.js")), oe = T(() => import("./PkToolShowLocation-BipZrvw7.js").then((e) => e.n)), ce = T(() => import("./PkToolShowDiagram-dKUU5_6F.js")), le = T(() => import("./PkToolEditSpreadsheet-B61LtERY.js")), ue = T(() => import("./PkToolShareDocument-C8sPmh0k.js").then((e) => e.n)), F = a, ge = d, I = r(F.agentId), { agentInterface: L, agentFileUpload: _e, agentType: R, agentVoice: ye, actions: be, revisedAnswers: xe, messages: z, chat: B, messageFeedbacks: Se, feedbackDialogMessage: Ce, isFeedbackSubmitting: we, isFeedbackSubmitted: De, feedbackSubmitError: Oe, isLeadSubmitted: ke, isLoadingSubmitLead: Ae, submitLeadError: Ve, input: He, inputMessagePlaceholder: Ue, isConversationBlocked: We, baseUrl: Ge, pendingAttachments: Ke, isAttachmentLimitReached: qe, fileLimitError: Je, apiClient: V, isDark: Ye, hostToolsPending: Xe, pageNoticeLevel: Ze, hostConfirmation: Qe, agentPageAccess: $e, hostStepTitles: et, canQueue: tt, queuedMessages: nt, backgroundAnswers: rt } = me(I);
|
|
461
|
+
se(c, et);
|
|
462
|
+
let H = y(() => R.value === "reasoning" ? void 0 : _e.value), it = (e) => V.value.getMediaDownloadUrl(F.agentId, I.localChatId, e), { handleSubmit: at, stopGeneration: ot, regenerate: st, onUpvote: ct, onDownvote: lt, onFeedback: ut, onFeedbackSubmit: dt, onLeadSubmit: ft, startNewChat: pt, addToolOutput: U, addToolApprovalResponse: mt, handleFileSelect: ht, clearFileLimitError: gt, refreshMessages: _t, appendMessage: vt, closePageNotice: yt, respondHostConfirmation: bt, editQueuedMessage: xt, removeQueuedMessage: St, openBackgroundAnswer: Ct, dismissBackgroundAnswer: wt } = I, { t: W } = fe({ useScope: "global" }), Tt = y(() => Xe.value > 0), Et = y(() => Tt.value && B.value.status === "ready" ? "streaming" : B.value.status), Dt = l(() => $e.value?.notice), Ot = y(() => Ze.value ? Dt.value || W(`message.pageAccessNotice.${Ze.value}`) : void 0), kt = y(() => {
|
|
463
|
+
let e = Je.value;
|
|
463
464
|
if (e) return e.reason === "per-chat" ? W("message.fileLimitPerChat", { max: e.max }) : W("message.fileLimitPerMessage", { max: e.max });
|
|
464
|
-
}),
|
|
465
|
+
}), At = y(() => rt.value.map(({ chatId: e, title: t }) => ({
|
|
466
|
+
id: e,
|
|
467
|
+
text: t ? W("message.backgroundAnswerReady", { title: t }) : W("message.backgroundAnswerReadyUntitled")
|
|
468
|
+
}))), jt = l(() => L.value?.dismissableNotice), Mt = y(() => z.value.some((e) => e.role === "user")), Nt = y(() => F.modifier === "fullscreen" && !Mt.value), Pt = he(L, () => F.userName), Ft = de("chatViewEl"), It = async (e) => (await V.value.expandSourceContext(F.agentId, e.documentId, e.chunkIndex)).content, Lt = async (e) => {
|
|
465
469
|
let t = await V.value.downloadSourceDocument(F.agentId, e);
|
|
466
470
|
window.open(t.downloadUrl, "_blank");
|
|
467
|
-
}, { isOverDropZone:
|
|
471
|
+
}, { isOverDropZone: Rt } = pe(Ft, {
|
|
468
472
|
dataTypes: (e) => t(e, H.value?.allowedMimeTypes ?? []),
|
|
469
473
|
onDrop: (e) => {
|
|
470
|
-
if (H.value?.enabled && e) for (let t of e)
|
|
474
|
+
if (H.value?.enabled && e) for (let t of e) ht(t);
|
|
471
475
|
}
|
|
472
|
-
}), G = A(!1), K = !1, q = A(!1),
|
|
476
|
+
}), G = A(!1), K = !1, q = A(!1), zt = [
|
|
473
477
|
3e3,
|
|
474
478
|
5e3,
|
|
475
479
|
1e4
|
|
476
|
-
], J, Y, X = !1,
|
|
477
|
-
function
|
|
478
|
-
clearTimeout(J), J = void 0, Y = void 0, X = !1,
|
|
480
|
+
], J, Y, X = !1, Bt = 0, Vt = !1;
|
|
481
|
+
function Ht() {
|
|
482
|
+
clearTimeout(J), J = void 0, Y = void 0, X = !1, Bt = 0, q.value = !1;
|
|
479
483
|
}
|
|
480
|
-
function
|
|
484
|
+
function Ut(e) {
|
|
481
485
|
K || (clearTimeout(J), J = setTimeout(() => {
|
|
482
|
-
|
|
486
|
+
Wt();
|
|
483
487
|
}, e));
|
|
484
488
|
}
|
|
485
|
-
async function
|
|
486
|
-
if (K ||
|
|
487
|
-
|
|
489
|
+
async function Wt() {
|
|
490
|
+
if (K || Vt) return;
|
|
491
|
+
Vt = !0;
|
|
488
492
|
let e;
|
|
489
493
|
try {
|
|
490
|
-
e = await
|
|
494
|
+
e = await _t();
|
|
491
495
|
} finally {
|
|
492
|
-
|
|
496
|
+
Vt = !1;
|
|
493
497
|
}
|
|
494
498
|
if (K) return;
|
|
495
499
|
if (e === "caught-up" && (q.value = !1), Z.isActive.value) {
|
|
496
|
-
Y = void 0, X = !1,
|
|
500
|
+
Y = void 0, X = !1, Bt = 0, Ut(Le);
|
|
497
501
|
return;
|
|
498
502
|
}
|
|
499
503
|
Y === void 0 && (Y = Date.now(), X = !!Z.error.value);
|
|
500
504
|
let t = Date.now() - Y;
|
|
501
|
-
if (e === "caught-up" && t >= (X ?
|
|
502
|
-
|
|
505
|
+
if (e === "caught-up" && t >= (X ? ze : Re) || t >= Be) {
|
|
506
|
+
Ht();
|
|
503
507
|
return;
|
|
504
508
|
}
|
|
505
|
-
let n =
|
|
506
|
-
|
|
509
|
+
let n = zt[Math.min(Bt, zt.length - 1)];
|
|
510
|
+
Bt += 1, Ut(n);
|
|
507
511
|
}
|
|
508
|
-
let
|
|
509
|
-
|
|
510
|
-
}, Z =
|
|
512
|
+
let Gt = (e = 1200) => {
|
|
513
|
+
Ut(e);
|
|
514
|
+
}, Z = Ee({
|
|
511
515
|
fetchGrant: async () => {
|
|
512
516
|
let e = await V.value.createVoiceSession(F.agentId, I.localChatId, {
|
|
513
517
|
deviceContext: I.buildDeviceContext(),
|
|
@@ -517,7 +521,7 @@ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
|
|
|
517
521
|
},
|
|
518
522
|
closeGrant: (e) => V.value.closeVoiceSession(F.agentId, e),
|
|
519
523
|
onTranscript: (e) => {
|
|
520
|
-
e.role === "user" ? (q.value = !0,
|
|
524
|
+
e.role === "user" ? (q.value = !0, vt({
|
|
521
525
|
id: `${i}user-${n()}`,
|
|
522
526
|
role: "user",
|
|
523
527
|
parts: [{
|
|
@@ -527,46 +531,46 @@ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
|
|
|
527
531
|
})) : q.value = !1;
|
|
528
532
|
},
|
|
529
533
|
onTurnEnd: () => {
|
|
530
|
-
|
|
534
|
+
Gt();
|
|
531
535
|
}
|
|
532
536
|
});
|
|
533
537
|
N(() => Z.error.value, (e) => {
|
|
534
538
|
e && (q.value = !1);
|
|
535
539
|
});
|
|
536
|
-
let
|
|
540
|
+
let Kt = y(() => ye.value?.enabled === !0), qt = y(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), Jt = y(() => {
|
|
537
541
|
let e = Z.error.value;
|
|
538
542
|
if (e) return /took too long/i.test(e) ? W("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? W("message.voiceNoAnswer") : W("message.voiceInterrupted");
|
|
539
|
-
}),
|
|
540
|
-
G.value = !1, await Z.start(), Z.isActive.value && (
|
|
541
|
-
},
|
|
542
|
-
q.value = !1, await Z.stop(), !K &&
|
|
543
|
-
},
|
|
543
|
+
}), Yt = y(() => Z.isSpeaking.value ? "output" : "input"), Xt = () => Z.readLevel(Yt.value), Zt = () => Z.readSpectrum(Yt.value), Qt = async () => {
|
|
544
|
+
G.value = !1, await Z.start(), Z.isActive.value && (Ht(), Ut(Le));
|
|
545
|
+
}, $t = async () => {
|
|
546
|
+
q.value = !1, await Z.stop(), !K && Gt(0);
|
|
547
|
+
}, en = () => {
|
|
544
548
|
Z.dismissError();
|
|
545
|
-
},
|
|
546
|
-
Z.dismissError(), await Z.stop(), await
|
|
547
|
-
}, Q = (e) => e?.toolCallId ?? "",
|
|
549
|
+
}, tn = async () => {
|
|
550
|
+
Z.dismissError(), await Z.stop(), await Qt();
|
|
551
|
+
}, Q = (e) => e?.toolCallId ?? "", nn = A(/* @__PURE__ */ new Set()), rn = (e) => nn.value.has(Q(e)), an = A(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (nn.value = new Set(nn.value).add(Q(e)), Gt()), !0) : !1, on = (e, t, n) => {
|
|
548
552
|
$(t, o(t, n)) || U({
|
|
549
553
|
tool: e,
|
|
550
554
|
toolCallId: Q(t),
|
|
551
555
|
output: n
|
|
552
556
|
});
|
|
553
|
-
},
|
|
557
|
+
}, sn = (e) => {
|
|
554
558
|
let t = e.confirmed ? W("message.voiceConfirmed") : W("message.voiceCancelled");
|
|
555
|
-
$({ toolCallId: e.toolCallId }, t) ?
|
|
559
|
+
$({ toolCallId: e.toolCallId }, t) ? nn.value.has(e.toolCallId) && (an.value = new Map(an.value).set(e.toolCallId, e.confirmed)) : U({
|
|
556
560
|
tool: "requestConfirm",
|
|
557
561
|
toolCallId: e.toolCallId,
|
|
558
562
|
output: e.confirmed ? "confirmed" : "cancelled"
|
|
559
563
|
});
|
|
560
|
-
},
|
|
561
|
-
$(e, t) || (
|
|
562
|
-
},
|
|
564
|
+
}, cn = (e, t) => {
|
|
565
|
+
$(e, t) || (He.value = t, at());
|
|
566
|
+
}, ln = (e, t) => {
|
|
563
567
|
let n = t.error ? W("message.voiceLocationRefused") : W("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
|
|
564
568
|
$(e, n) || U({
|
|
565
569
|
tool: "requestGeolocation",
|
|
566
570
|
toolCallId: Q(e),
|
|
567
571
|
output: t
|
|
568
572
|
});
|
|
569
|
-
},
|
|
573
|
+
}, un = (e, t) => {
|
|
570
574
|
$(e, W("message.voiceConnectionDone")) || U({
|
|
571
575
|
tool: "requestOAuthConnection",
|
|
572
576
|
toolCallId: Q(e),
|
|
@@ -575,91 +579,91 @@ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
|
|
|
575
579
|
mcpServerId: t
|
|
576
580
|
}
|
|
577
581
|
});
|
|
578
|
-
},
|
|
582
|
+
}, dn = () => {
|
|
579
583
|
G.value = !G.value, Z.setMuted(G.value);
|
|
580
584
|
};
|
|
581
585
|
O(() => {
|
|
582
|
-
K = !0,
|
|
586
|
+
K = !0, Ht();
|
|
583
587
|
});
|
|
584
|
-
let { pendingWakeup:
|
|
588
|
+
let { pendingWakeup: fn, isStopping: pn, check: mn, reset: hn, stop: gn } = je({
|
|
585
589
|
agentId: () => F.agentId,
|
|
586
590
|
chatId: () => I.localChatId,
|
|
587
591
|
apiClient: () => V.value,
|
|
588
592
|
messages: () => z.value,
|
|
589
|
-
refreshMessages:
|
|
593
|
+
refreshMessages: _t
|
|
590
594
|
});
|
|
591
|
-
return N([() => I.localChatId,
|
|
592
|
-
|
|
595
|
+
return N([() => I.localChatId, Mt], ([, e]) => {
|
|
596
|
+
hn(), e && mn();
|
|
593
597
|
}, { immediate: !0 }), N(() => B.value.status, (e, t) => {
|
|
594
|
-
e === "ready" && t !== "ready" &&
|
|
598
|
+
e === "ready" && t !== "ready" && Mt.value && mn();
|
|
595
599
|
}), (t, n) => {
|
|
596
|
-
let r =
|
|
597
|
-
return k(),
|
|
600
|
+
let r = g;
|
|
601
|
+
return k(), S("div", {
|
|
598
602
|
ref_key: "chatViewEl",
|
|
599
|
-
ref:
|
|
603
|
+
ref: Ft,
|
|
600
604
|
class: D(["pk-chatbot-view-chat", {
|
|
601
|
-
"pk-chatbot-view-chat--dragover": M(
|
|
602
|
-
"pk-chatbot-view-chat--empty":
|
|
605
|
+
"pk-chatbot-view-chat--dragover": M(Rt) && H.value?.enabled,
|
|
606
|
+
"pk-chatbot-view-chat--empty": Nt.value
|
|
603
607
|
}])
|
|
604
608
|
}, [
|
|
605
|
-
w(
|
|
609
|
+
w(v, {
|
|
606
610
|
name: "pk-chatbot-view-chat-fade",
|
|
607
611
|
mode: "out-in"
|
|
608
612
|
}, {
|
|
609
|
-
default: P(() => [
|
|
613
|
+
default: P(() => [Nt.value ? (k(), b(m, {
|
|
610
614
|
key: 0,
|
|
611
|
-
greeting: M(
|
|
615
|
+
greeting: M(Pt),
|
|
612
616
|
logo: M(L)?.logo,
|
|
613
617
|
name: M(I).name
|
|
614
618
|
}, null, 8, [
|
|
615
619
|
"greeting",
|
|
616
620
|
"logo",
|
|
617
621
|
"name"
|
|
618
|
-
])) : (k(),
|
|
622
|
+
])) : (k(), b(e, {
|
|
619
623
|
key: 1,
|
|
620
624
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
621
625
|
interactive: "",
|
|
622
626
|
messages: M(z),
|
|
623
|
-
"confirm-verdicts-on-call":
|
|
627
|
+
"confirm-verdicts-on-call": an.value,
|
|
624
628
|
status: M(B).status,
|
|
625
629
|
error: M(B).error,
|
|
626
630
|
"main-color": M(L)?.mainColor,
|
|
627
631
|
"text-color": M(L)?.textColor,
|
|
628
|
-
"revised-answers": M(
|
|
629
|
-
actions: M(
|
|
630
|
-
"message-feedbacks": M(
|
|
631
|
-
"feedback-message-id": M(
|
|
632
|
-
"feedback-loading": M(
|
|
633
|
-
"feedback-submitted": M(
|
|
634
|
-
"feedback-error": M(
|
|
632
|
+
"revised-answers": M(xe),
|
|
633
|
+
actions: M(be),
|
|
634
|
+
"message-feedbacks": M(Se),
|
|
635
|
+
"feedback-message-id": M(Ce)?.id,
|
|
636
|
+
"feedback-loading": M(we),
|
|
637
|
+
"feedback-submitted": M(De),
|
|
638
|
+
"feedback-error": M(Oe),
|
|
635
639
|
"show-extended-steps": M(L)?.showExtendedSteps,
|
|
636
640
|
"awaiting-spoken-answer": q.value,
|
|
637
|
-
"host-working":
|
|
638
|
-
"host-confirmation": M(
|
|
639
|
-
"is-dark": M(
|
|
641
|
+
"host-working": Tt.value,
|
|
642
|
+
"host-confirmation": M(Qe),
|
|
643
|
+
"is-dark": M(Ye),
|
|
640
644
|
"show-scroll-to-bottom": a.modifier === "fullscreen",
|
|
641
|
-
onFeedbackSubmit: n[0] ||= (e) => M(
|
|
642
|
-
onFeedbackClose: n[1] ||= (e) =>
|
|
643
|
-
onRegenerate: M(
|
|
644
|
-
onAutoRetry: M(
|
|
645
|
-
onResetChat: M(
|
|
646
|
-
onShowInfo: n[2] ||= (e) =>
|
|
647
|
-
onRevise: n[3] ||= (e) =>
|
|
648
|
-
onUpvote: M(
|
|
649
|
-
onDownvote: M(
|
|
650
|
-
onFeedback: M(
|
|
651
|
-
onApprovalRespond: M(
|
|
652
|
-
onConfirmRespond:
|
|
653
|
-
onHostConfirmRespond: M(
|
|
645
|
+
onFeedbackSubmit: n[0] ||= (e) => M(dt)(e),
|
|
646
|
+
onFeedbackClose: n[1] ||= (e) => Ce.value = void 0,
|
|
647
|
+
onRegenerate: M(st),
|
|
648
|
+
onAutoRetry: M(st),
|
|
649
|
+
onResetChat: M(pt),
|
|
650
|
+
onShowInfo: n[2] ||= (e) => ge("show-info", e),
|
|
651
|
+
onRevise: n[3] ||= (e) => ge("revise", e),
|
|
652
|
+
onUpvote: M(ct),
|
|
653
|
+
onDownvote: M(lt),
|
|
654
|
+
onFeedback: M(ut),
|
|
655
|
+
onApprovalRespond: M(mt),
|
|
656
|
+
onConfirmRespond: sn,
|
|
657
|
+
onHostConfirmRespond: M(bt)
|
|
654
658
|
}, {
|
|
655
|
-
"tool-showContactForm": P(({ part: e }) => [w(M(
|
|
659
|
+
"tool-showContactForm": P(({ part: e }) => [w(M(te), {
|
|
656
660
|
part: e,
|
|
657
|
-
readonly: !M(
|
|
658
|
-
submitted: M(
|
|
659
|
-
loading: M(
|
|
660
|
-
error: M(
|
|
661
|
+
readonly: !M(Ge),
|
|
662
|
+
submitted: M(ke),
|
|
663
|
+
loading: M(Ae),
|
|
664
|
+
error: M(Ve),
|
|
661
665
|
"privacy-policy-notice": M(L)?.privacyPolicyNotice,
|
|
662
|
-
onSubmit: M(
|
|
666
|
+
onSubmit: M(ft)
|
|
663
667
|
}, null, 8, [
|
|
664
668
|
"part",
|
|
665
669
|
"readonly",
|
|
@@ -671,18 +675,18 @@ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
|
|
|
671
675
|
])]),
|
|
672
676
|
"tool-showSuggestedReply": P(({ part: e }) => [w(M(E), {
|
|
673
677
|
part: e,
|
|
674
|
-
onSelect: (t) =>
|
|
678
|
+
onSelect: (t) => cn(e, t)
|
|
675
679
|
}, null, 8, ["part", "onSelect"])]),
|
|
676
|
-
"tool-showSources": P(({ part: e }) => [w(M(
|
|
680
|
+
"tool-showSources": P(({ part: e }) => [w(M(re), {
|
|
677
681
|
part: e,
|
|
678
|
-
"on-expand-context":
|
|
679
|
-
"on-download":
|
|
682
|
+
"on-expand-context": It,
|
|
683
|
+
"on-download": Lt
|
|
680
684
|
}, null, 8, ["part"])]),
|
|
681
|
-
"tool-showForm": P(({ part: e }) => [w(
|
|
682
|
-
default: P(() => [w(M(
|
|
685
|
+
"tool-showForm": P(({ part: e }) => [w(v, { mode: "out-in" }, {
|
|
686
|
+
default: P(() => [w(M(_), {
|
|
683
687
|
part: e,
|
|
684
|
-
answered:
|
|
685
|
-
onSelect: (t) =>
|
|
688
|
+
answered: rn(e),
|
|
689
|
+
onSelect: (t) => on("showForm", e, t)
|
|
686
690
|
}, null, 8, [
|
|
687
691
|
"part",
|
|
688
692
|
"answered",
|
|
@@ -690,12 +694,12 @@ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
|
|
|
690
694
|
])]),
|
|
691
695
|
_: 2
|
|
692
696
|
}, 1024)]),
|
|
693
|
-
"tool-showMultipleChoice": P(({ part: e }) => [w(
|
|
694
|
-
default: P(() => [w(M(
|
|
697
|
+
"tool-showMultipleChoice": P(({ part: e }) => [w(v, { mode: "out-in" }, {
|
|
698
|
+
default: P(() => [w(M(_), {
|
|
695
699
|
part: e,
|
|
696
700
|
"allow-custom-answer": "",
|
|
697
|
-
answered:
|
|
698
|
-
onSelect: (t) =>
|
|
701
|
+
answered: rn(e),
|
|
702
|
+
onSelect: (t) => on("showMultipleChoice", e, t)
|
|
699
703
|
}, null, 8, [
|
|
700
704
|
"part",
|
|
701
705
|
"answered",
|
|
@@ -703,12 +707,12 @@ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
|
|
|
703
707
|
])]),
|
|
704
708
|
_: 2
|
|
705
709
|
}, 1024)]),
|
|
706
|
-
"tool-requestOAuthConnection": P(({ part: e }) => [w(M(
|
|
710
|
+
"tool-requestOAuthConnection": P(({ part: e }) => [w(M(ae), {
|
|
707
711
|
part: e,
|
|
708
|
-
"backend-url": M(
|
|
712
|
+
"backend-url": M(Ge),
|
|
709
713
|
"resolve-connection": (e) => M(V).getOAuthAuthorizeUrl(F.agentId, e),
|
|
710
714
|
"check-connection": (e) => M(V).getOAuthConnectionStatus(F.agentId, e),
|
|
711
|
-
onConnected: (t) =>
|
|
715
|
+
onConnected: (t) => un(e, t)
|
|
712
716
|
}, null, 8, [
|
|
713
717
|
"part",
|
|
714
718
|
"backend-url",
|
|
@@ -716,20 +720,20 @@ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
|
|
|
716
720
|
"check-connection",
|
|
717
721
|
"onConnected"
|
|
718
722
|
])]),
|
|
719
|
-
"tool-requestGeolocation": P(({ part: e }) => [w(M(
|
|
723
|
+
"tool-requestGeolocation": P(({ part: e }) => [w(M(ie), {
|
|
720
724
|
part: e,
|
|
721
725
|
"call-live": M(Z).isActive.value,
|
|
722
726
|
"reverse-geocode": (e, t) => M(V).reverseGeocode(e, t),
|
|
723
|
-
onResult: (t) =>
|
|
727
|
+
onResult: (t) => ln(e, t)
|
|
724
728
|
}, null, 8, [
|
|
725
729
|
"part",
|
|
726
730
|
"call-live",
|
|
727
731
|
"reverse-geocode",
|
|
728
732
|
"onResult"
|
|
729
733
|
])]),
|
|
730
|
-
"tool-showLocation": P(({ part: e }) => [w(M(
|
|
734
|
+
"tool-showLocation": P(({ part: e }) => [w(M(oe), {
|
|
731
735
|
part: e,
|
|
732
|
-
"is-dark": M(
|
|
736
|
+
"is-dark": M(Ye),
|
|
733
737
|
"main-color": M(L)?.mainColor,
|
|
734
738
|
"forward-geocode": (e, t) => M(V).forwardGeocode(e, t)
|
|
735
739
|
}, null, 8, [
|
|
@@ -738,72 +742,86 @@ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
|
|
|
738
742
|
"main-color",
|
|
739
743
|
"forward-geocode"
|
|
740
744
|
])]),
|
|
741
|
-
"tool-showDiagram": P(({ part: e }) => [w(M(
|
|
745
|
+
"tool-showDiagram": P(({ part: e }) => [w(M(ce), {
|
|
742
746
|
part: e,
|
|
743
|
-
"is-dark": M(
|
|
747
|
+
"is-dark": M(Ye)
|
|
744
748
|
}, null, 8, ["part", "is-dark"])]),
|
|
745
|
-
"tool-editSpreadsheet": P(({ part: e }) => [(k(),
|
|
749
|
+
"tool-editSpreadsheet": P(({ part: e }) => [(k(), b(M(le), {
|
|
746
750
|
key: M(s)(e),
|
|
747
751
|
part: e,
|
|
748
|
-
"file-url":
|
|
752
|
+
"file-url": it
|
|
749
753
|
}, null, 8, ["part"]))]),
|
|
750
|
-
"tool-shareDocument": P(({ part: e }) => [(k(),
|
|
754
|
+
"tool-shareDocument": P(({ part: e }) => [(k(), b(M(ue), {
|
|
751
755
|
key: M(s)(e),
|
|
752
756
|
part: e,
|
|
753
|
-
"on-download":
|
|
757
|
+
"on-download": Lt
|
|
754
758
|
}, null, 8, ["part"]))]),
|
|
755
759
|
_: 1
|
|
756
760
|
}, 8, /* @__PURE__ */ "messages.confirm-verdicts-on-call.status.error.main-color.text-color.revised-answers.actions.message-feedbacks.feedback-message-id.feedback-loading.feedback-submitted.feedback-error.show-extended-steps.awaiting-spoken-answer.host-working.host-confirmation.is-dark.show-scroll-to-bottom.onRegenerate.onAutoRetry.onResetChat.onUpvote.onDownvote.onFeedback.onApprovalRespond.onHostConfirmRespond".split(".")))]),
|
|
757
761
|
_: 1
|
|
758
762
|
}),
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
763
|
+
M(nt).length ? (k(), b(p, {
|
|
764
|
+
key: 0,
|
|
765
|
+
messages: M(nt),
|
|
766
|
+
onEdit: M(xt),
|
|
767
|
+
onRemove: M(St)
|
|
768
|
+
}, null, 8, [
|
|
769
|
+
"messages",
|
|
770
|
+
"onEdit",
|
|
771
|
+
"onRemove"
|
|
772
|
+
])) : x("", !0),
|
|
773
|
+
C("div", Me, [
|
|
774
|
+
w(v, { name: "pk-chatbot-view-chat-fade" }, {
|
|
775
|
+
default: P(() => [Nt.value ? (k(), b(ve, {
|
|
762
776
|
key: 0,
|
|
763
777
|
class: "pk-chatbot-view-chat__aurora",
|
|
764
778
|
"source-selector": ".pk-chatbot-input__form"
|
|
765
|
-
})) :
|
|
779
|
+
})) : x("", !0)]),
|
|
766
780
|
_: 1
|
|
767
781
|
}),
|
|
768
|
-
M(
|
|
782
|
+
M(fn) && !M(We) ? (k(), b(h, {
|
|
769
783
|
key: 0,
|
|
770
|
-
pending: M(
|
|
771
|
-
stopping: M(
|
|
772
|
-
onStop: M(
|
|
784
|
+
pending: M(fn),
|
|
785
|
+
stopping: M(pn),
|
|
786
|
+
onStop: M(gn)
|
|
773
787
|
}, null, 8, [
|
|
774
788
|
"pending",
|
|
775
789
|
"stopping",
|
|
776
790
|
"onStop"
|
|
777
|
-
])) :
|
|
778
|
-
M(
|
|
791
|
+
])) : x("", !0),
|
|
792
|
+
M(We) ? (k(), S("div", Ne, j(M(W)("message.chatErrorConversationBlocked")), 1)) : qt.value === "idle" ? (k(), b(f, {
|
|
779
793
|
key: 3,
|
|
780
|
-
modelValue: M(
|
|
781
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
782
|
-
"pending-attachments": M(
|
|
783
|
-
"onUpdate:pendingAttachments": n[5] ||= (e) =>
|
|
784
|
-
placeholder: M(
|
|
785
|
-
"dismissable-notice": M(
|
|
786
|
-
"page-notice":
|
|
787
|
-
status:
|
|
794
|
+
modelValue: M(He),
|
|
795
|
+
"onUpdate:modelValue": n[4] ||= (e) => ne(He) ? He.value = e : null,
|
|
796
|
+
"pending-attachments": M(Ke),
|
|
797
|
+
"onUpdate:pendingAttachments": n[5] ||= (e) => ne(Ke) ? Ke.value = e : null,
|
|
798
|
+
placeholder: M(Ue),
|
|
799
|
+
"dismissable-notice": M(jt) && M(B).messages.length <= 1 ? M(jt) : void 0,
|
|
800
|
+
"page-notice": Ot.value,
|
|
801
|
+
status: Et.value,
|
|
788
802
|
"max-message-length": M(L)?.maxMessageLength,
|
|
789
803
|
"file-upload": H.value,
|
|
790
|
-
"attachment-limit-reached": M(
|
|
791
|
-
"attachment-notice":
|
|
792
|
-
"voice-enabled":
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
804
|
+
"attachment-limit-reached": M(qe),
|
|
805
|
+
"attachment-notice": kt.value,
|
|
806
|
+
"voice-enabled": Kt.value,
|
|
807
|
+
"queue-enabled": M(tt),
|
|
808
|
+
"answer-notices": At.value,
|
|
809
|
+
onStopGeneration: M(ot),
|
|
810
|
+
onSubmit: M(at),
|
|
811
|
+
onFileSelect: M(ht),
|
|
812
|
+
onDismissAttachmentNotice: M(gt),
|
|
813
|
+
onDismissPageNotice: M(yt),
|
|
814
|
+
onOpenAnswerNotice: M(Ct),
|
|
815
|
+
onDismissAnswerNotice: M(wt),
|
|
816
|
+
onVoiceStart: Qt
|
|
799
817
|
}, ee({ _: 2 }, [a.modifier === "fullscreen" ? {
|
|
800
818
|
name: "prepend",
|
|
801
|
-
fn: P(() => [
|
|
819
|
+
fn: P(() => [C("span", Pe, [w(u, {
|
|
802
820
|
modifiers: "surface",
|
|
803
821
|
class: "pk-chatbot-view-chat__agent-chip-avatar",
|
|
804
822
|
"img-src": M(L)?.logo,
|
|
805
823
|
name: M(I).name
|
|
806
|
-
}, null, 8, ["img-src", "name"]), M(I).name ? (k(),
|
|
824
|
+
}, null, 8, ["img-src", "name"]), M(I).name ? (k(), S("strong", Fe, j(M(I).name), 1)) : x("", !0)])]),
|
|
807
825
|
key: "0"
|
|
808
826
|
} : void 0]), 1032, [
|
|
809
827
|
"modelValue",
|
|
@@ -817,26 +835,30 @@ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
|
|
|
817
835
|
"attachment-limit-reached",
|
|
818
836
|
"attachment-notice",
|
|
819
837
|
"voice-enabled",
|
|
838
|
+
"queue-enabled",
|
|
839
|
+
"answer-notices",
|
|
820
840
|
"onStopGeneration",
|
|
821
841
|
"onSubmit",
|
|
822
842
|
"onFileSelect",
|
|
823
843
|
"onDismissAttachmentNotice",
|
|
824
|
-
"onDismissPageNotice"
|
|
825
|
-
|
|
844
|
+
"onDismissPageNotice",
|
|
845
|
+
"onOpenAnswerNotice",
|
|
846
|
+
"onDismissAnswerNotice"
|
|
847
|
+
])) : (k(), b(Te, {
|
|
826
848
|
key: 2,
|
|
827
|
-
state:
|
|
828
|
-
sample:
|
|
829
|
-
spectrum:
|
|
849
|
+
state: qt.value,
|
|
850
|
+
sample: Xt,
|
|
851
|
+
spectrum: Zt,
|
|
830
852
|
"remaining-seconds": M(Z).remainingSeconds.value,
|
|
831
853
|
muted: G.value,
|
|
832
|
-
error:
|
|
854
|
+
error: Jt.value,
|
|
833
855
|
"raw-error": M(Z).error.value,
|
|
834
856
|
live: M(Z).isActive.value,
|
|
835
857
|
class: "pk-chatbot-view-chat__voice",
|
|
836
|
-
onToggleMute:
|
|
837
|
-
onHangUp:
|
|
838
|
-
onRetry:
|
|
839
|
-
onDismiss:
|
|
858
|
+
onToggleMute: dn,
|
|
859
|
+
onHangUp: $t,
|
|
860
|
+
onRetry: tn,
|
|
861
|
+
onDismiss: en
|
|
840
862
|
}, null, 8, [
|
|
841
863
|
"state",
|
|
842
864
|
"remaining-seconds",
|
|
@@ -846,11 +868,11 @@ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
|
|
|
846
868
|
"live"
|
|
847
869
|
]))
|
|
848
870
|
]),
|
|
849
|
-
w(
|
|
850
|
-
default: P(() => [M(
|
|
871
|
+
w(v, null, {
|
|
872
|
+
default: P(() => [M(Rt) && H.value?.enabled ? (k(), S("div", Ie, [w(r, {
|
|
851
873
|
name: "ri:upload-cloud-2-line",
|
|
852
874
|
class: "pk-chatbot-view-chat__drop-overlay-icon"
|
|
853
|
-
}),
|
|
875
|
+
}), C("span", null, j(M(W)("action.dropFile")), 1)])) : x("", !0)]),
|
|
854
876
|
_: 1
|
|
855
877
|
})
|
|
856
878
|
], 2);
|
|
@@ -858,6 +880,6 @@ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
|
|
|
858
880
|
}
|
|
859
881
|
});
|
|
860
882
|
//#endregion
|
|
861
|
-
export {
|
|
883
|
+
export { ve as i, Te as n, be as r, Ve as t };
|
|
862
884
|
|
|
863
|
-
//# sourceMappingURL=PkChatbotViewChat-
|
|
885
|
+
//# sourceMappingURL=PkChatbotViewChat-BZb-U7Ju.js.map
|