@8wave/ai-elements 0.125.0-beta.40 → 0.125.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/{Agent-CeZ3bgZ3.js → Agent-DMvYDpLa.js} +123 -122
- package/dist/_chunks/Agent-DMvYDpLa.js.map +1 -0
- package/dist/_chunks/{PkFilePreview-D_1ZgiiA.js → PkFilePreview-DC4iX7Yc.js} +234 -209
- package/dist/_chunks/PkFilePreview-DC4iX7Yc.js.map +1 -0
- package/dist/_chunks/{PkFilePreviewDialog-CI22huzK.js → PkFilePreviewDialog-bcTkTcYk.js} +12 -7
- package/dist/_chunks/PkFilePreviewDialog-bcTkTcYk.js.map +1 -0
- package/dist/_chunks/{PkImageEditorDialog-CAEninFi.js → PkImageEditorDialog-FpbyhV3t.js} +2 -2
- package/dist/_chunks/{PkImageEditorDialog-CAEninFi.js.map → PkImageEditorDialog-FpbyhV3t.js.map} +1 -1
- package/dist/_chunks/{PkSelectionActions-BriGyWCi.js → PkSelectionActions-BbfVZY0R.js} +140 -13
- package/dist/_chunks/PkSelectionActions-BbfVZY0R.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown--9i0feuM.js → PkStreamingMarkdown-COSOOhCg.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown--9i0feuM.js.map → PkStreamingMarkdown-COSOOhCg.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-BKGUnWrj.js → PkToolChatFile-C_gS0X1j.js} +3 -3
- package/dist/_chunks/{PkToolChatFile-BKGUnWrj.js.map → PkToolChatFile-C_gS0X1j.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-DktrQJvA.js → PkToolRequestGeolocation-CwDQnr7u.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-DktrQJvA.js.map → PkToolRequestGeolocation-CwDQnr7u.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-DkcLwFWl.js → PkToolRequestOAuthConnection-DkrnVowp.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-DkcLwFWl.js.map → PkToolRequestOAuthConnection-DkrnVowp.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-BfLpz2-W.js → PkToolShowArtifact-fpFtKrZo.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-BfLpz2-W.js.map → PkToolShowArtifact-fpFtKrZo.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-BsF6DFzV.js → PkToolShowContactForm-BAM772bm.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-BsF6DFzV.js.map → PkToolShowContactForm-BAM772bm.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-w6RvbKEB.js → PkToolShowForm-DJcL0bgw.js} +4 -4
- package/dist/_chunks/{PkToolShowForm-w6RvbKEB.js.map → PkToolShowForm-DJcL0bgw.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-BEddh4He.js → PkToolShowImageGallery-DhB_ucYe.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-BEddh4He.js.map → PkToolShowImageGallery-DhB_ucYe.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-k-VB4pUB.js → PkToolShowProductList-DfcJJrOC.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-k-VB4pUB.js.map → PkToolShowProductList-DfcJJrOC.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-CGESvGrm.js → PkToolShowSources-GeWAMHYC.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-CGESvGrm.js.map → PkToolShowSources-GeWAMHYC.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-DTAq41wP.js → PkToolShowSuggestedReply-gpuWzpoh.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-DTAq41wP.js.map → PkToolShowSuggestedReply-gpuWzpoh.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DeexblEL.js → PkToolShowVideo-CikqhGpT.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-DeexblEL.js.map → PkToolShowVideo-CikqhGpT.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-C42FNo8K.js → PkToolShowWebPages-B-LuiAtg.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-C42FNo8K.js.map → PkToolShowWebPages-B-LuiAtg.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-DlZPHhW-.js → chatImagePolicy-Dv_WHhDs.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-DlZPHhW-.js.map → chatImagePolicy-Dv_WHhDs.js.map} +1 -1
- package/dist/_chunks/{markdown-DNPhTO5l.js → markdown-BYpvcbWH.js} +2 -2
- package/dist/_chunks/{markdown-DNPhTO5l.js.map → markdown-BYpvcbWH.js.map} +1 -1
- package/dist/_chunks/{utils-zkq8kMz-.js → utils-DMvy5QRR.js} +2 -2
- package/dist/_chunks/{utils-zkq8kMz-.js.map → utils-DMvy5QRR.js.map} +1 -1
- package/dist/ai-elements.es.js +405 -135
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-ldDZiq6E.js → Agent-B9iJ1WvR.js} +131 -130
- package/dist-vue/_chunks/Agent-B9iJ1WvR.js.map +1 -0
- package/dist-vue/_chunks/{Document-BfjAfogy.js → Document-DnsOE7s6.js} +2 -2
- package/dist-vue/_chunks/{Document-BfjAfogy.js.map → Document-DnsOE7s6.js.map} +1 -1
- package/dist-vue/_chunks/{PkChart-DyyBXkd3.js → PkChart-D-K7nc0g.js} +2 -2
- package/dist-vue/_chunks/{PkChart-DyyBXkd3.js.map → PkChart-D-K7nc0g.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbot-wsqj3EpU.js → PkChatbot-DVQ-Bb7n.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-wsqj3EpU.js.map → PkChatbot-DVQ-Bb7n.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-DcgIfNkX.js → PkChatbotEmptyState-OlgewA4_.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-DcgIfNkX.js.map → PkChatbotEmptyState-OlgewA4_.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-CN4rmNgu.js → PkChatbotInput-D_I0Gf_u.js} +4 -4
- package/dist-vue/_chunks/{PkChatbotInput-CN4rmNgu.js.map → PkChatbotInput-D_I0Gf_u.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-BlF4Xp0_.js → PkChatbotMessages-CAXnEfXK.js} +18 -18
- package/dist-vue/_chunks/{PkChatbotMessages-BlF4Xp0_.js.map → PkChatbotMessages-CAXnEfXK.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-q9uXE5mr.js → PkChatbotStepPayload-EBri1L10.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-q9uXE5mr.js.map → PkChatbotStepPayload-EBri1L10.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-BJz6Qwh3.js → PkChatbotStepToolDetail-DiQEa0UV.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-BJz6Qwh3.js.map → PkChatbotStepToolDetail-DiQEa0UV.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-DvJYNl_k.js → PkChatbotSteps-BgLnv2J1.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-DvJYNl_k.js.map → PkChatbotSteps-BgLnv2J1.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-tmHyxxT3.js → PkChatbotViewChat-CmjD1IXf.js} +360 -355
- package/dist-vue/_chunks/PkChatbotViewChat-CmjD1IXf.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-DOzUh_A7.js → PkChatbotViewConversations-CVZH5dXx.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewConversations-DOzUh_A7.js.map → PkChatbotViewConversations-CVZH5dXx.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-CsL8OhcA.js → PkChatbotViewFiles-CO4gv9nd.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-CsL8OhcA.js.map → PkChatbotViewFiles-CO4gv9nd.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-CFqxCK2f.js → PkChatbotViewProfile-CriJtak0.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-CFqxCK2f.js.map → PkChatbotViewProfile-CriJtak0.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-Bp5-Pl54.js → PkFilePreview-k5gEl3n8.js} +586 -434
- package/dist-vue/_chunks/PkFilePreview-k5gEl3n8.js.map +1 -0
- package/dist-vue/_chunks/{PkFilePreviewDialog-CS885vBR.js → PkFilePreviewDialog-DUwZPErE.js} +12 -7
- package/dist-vue/_chunks/PkFilePreviewDialog-DUwZPErE.js.map +1 -0
- package/dist-vue/_chunks/{PkImageEditorDialog-BhfdnsmX.js → PkImageEditorDialog-DQPXePae.js} +2 -2
- package/dist-vue/_chunks/{PkImageEditorDialog-BhfdnsmX.js.map → PkImageEditorDialog-DQPXePae.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-NgrJUZPI.js → PkStreamingMarkdown-ZasabxE0.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-NgrJUZPI.js.map → PkStreamingMarkdown-ZasabxE0.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-DnmiNGF4.js → PkToolChatFile-CD26Q2xp.js} +3 -3
- package/dist-vue/_chunks/{PkToolChatFile-DnmiNGF4.js.map → PkToolChatFile-CD26Q2xp.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-D1XNCvdr.js → PkToolRequestGeolocation-Bhh7UomV.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-D1XNCvdr.js.map → PkToolRequestGeolocation-Bhh7UomV.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-OTvMRYaL.js → PkToolRequestOAuthConnection-8GJlt5G1.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-OTvMRYaL.js.map → PkToolRequestOAuthConnection-8GJlt5G1.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-C8ueuIGQ.js → PkToolShowArtifact-BhVd_ZQ8.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-C8ueuIGQ.js.map → PkToolShowArtifact-BhVd_ZQ8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowChart-BWO6Hzlq.js → PkToolShowChart-BQXxaPIO.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowChart-BWO6Hzlq.js.map → PkToolShowChart-BQXxaPIO.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BBcDsLEO.js → PkToolShowContactForm-CackCDGD.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-BBcDsLEO.js.map → PkToolShowContactForm-CackCDGD.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-BzUcxOKy.js → PkToolShowDiagram-CABPsFi8.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-BzUcxOKy.js.map → PkToolShowDiagram-CABPsFi8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-B6uhHzJ8.js → PkToolShowForm-BStbk4Iu.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-B6uhHzJ8.js.map → PkToolShowForm-BStbk4Iu.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-C39nlJrJ.js → PkToolShowImageGallery-BeeHsdTp.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-C39nlJrJ.js.map → PkToolShowImageGallery-BeeHsdTp.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-FLLkRCnm.js → PkToolShowProductList-BfUiap9U.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-FLLkRCnm.js.map → PkToolShowProductList-BfUiap9U.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-Cb7r5jrX.js → PkToolShowSources-CgEkcyRg.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-Cb7r5jrX.js.map → PkToolShowSources-CgEkcyRg.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BVLCX5Sm.js → PkToolShowSuggestedReply-DxlGhMvE.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BVLCX5Sm.js.map → PkToolShowSuggestedReply-DxlGhMvE.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-QDLhVlau.js → PkToolShowVideo-CqSRnDNC.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-QDLhVlau.js.map → PkToolShowVideo-CqSRnDNC.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-P6PdJTEE.js → PkToolShowWebPages-B-qIS8qY.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-P6PdJTEE.js.map → PkToolShowWebPages-B-qIS8qY.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-CGeNprai.js → createChatbotApiClient-DmPcjwB3.js} +7 -7
- package/dist-vue/_chunks/{createChatbotApiClient-CGeNprai.js.map → createChatbotApiClient-DmPcjwB3.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-KXAltGz3.js → useChatbotStore-B6ILfm5Z.js} +17 -17
- package/dist-vue/_chunks/{useChatbotStore-KXAltGz3.js.map → useChatbotStore-B6ILfm5Z.js.map} +1 -1
- package/dist-vue/_chunks/{utils-D4B1FVGF.js → utils-KBB6SDPn.js} +2 -2
- package/dist-vue/_chunks/{utils-D4B1FVGF.js.map → utils-KBB6SDPn.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +6 -0
- package/dist-vue/composables.js +270 -6
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +5325 -5232
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +12 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -0
- package/dist-vue/packages/components/src/chat/PkFilePreview.d.ts +8 -0
- package/dist-vue/packages/components/src/chat/PkFilePreviewDialog.d.ts +4 -0
- package/dist-vue/packages/components/src/chat/PkSelectionActionIconPicker.d.ts +19 -0
- package/dist-vue/packages/components/src/chat/PkSelectionActions.d.ts +3 -0
- package/dist-vue/packages/components/src/chat/selectionActionEdits.d.ts +1 -0
- package/dist-vue/packages/components/src/chat/selectionActionIcons.d.ts +9 -0
- package/dist-vue/packages/components/src/chat/useChatFilePreview.d.ts +12 -12
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +18 -0
- package/dist-vue/packages/models/src/schema/Agent.d.ts +2688 -0
- package/dist-vue/packages/models/src/schema/Chart.d.ts +4 -4
- package/dist-vue/packages/models/src/schema/Lead.d.ts +6 -6
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +768 -0
- package/dist-vue/packages/models/src/schema/SelectionAction.d.ts +1415 -0
- package/dist-vue/packages/models/src/schema/SelectionActionPreview.d.ts +38 -0
- package/dist-vue/packages/models/src/schema/SpreadsheetPreview.d.ts +6 -6
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +768 -0
- package/dist-vue/packages/models/src/schema/WordPreview.d.ts +13 -13
- package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-CeZ3bgZ3.js.map +0 -1
- package/dist/_chunks/PkFilePreview-D_1ZgiiA.js.map +0 -1
- package/dist/_chunks/PkFilePreviewDialog-CI22huzK.js.map +0 -1
- package/dist/_chunks/PkSelectionActions-BriGyWCi.js.map +0 -1
- package/dist-vue/_chunks/Agent-ldDZiq6E.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-tmHyxxT3.js.map +0 -1
- package/dist-vue/_chunks/PkFilePreview-Bp5-Pl54.js.map +0 -1
- package/dist-vue/_chunks/PkFilePreviewDialog-CS885vBR.js.map +0 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { t as e } from "./PkChatbotMessages-
|
|
1
|
+
import { t as e } from "./PkChatbotMessages-CAXnEfXK.js";
|
|
2
2
|
import { o as t } from "./Media-DylqhvaF.js";
|
|
3
3
|
import { t as n } from "./useLightbox-DmtNa8bJ.js";
|
|
4
|
-
import { a as r, n as i, t as a } from "./useChatbotStore-
|
|
4
|
+
import { a as r, n as i, t as a } from "./useChatbotStore-B6ILfm5Z.js";
|
|
5
5
|
import { n as o } from "./src-nb8MU1sh.js";
|
|
6
6
|
import { s, t as c } from "./message-DuibQyHy.js";
|
|
7
|
-
import { f as l, l as u, n as d, r as f, y as p, z as m } from "./utils-
|
|
7
|
+
import { f as l, l as u, n as d, r as f, y as p, z as m } from "./utils-KBB6SDPn.js";
|
|
8
8
|
import { t as h } from "./useLocalizedString-Dmn92nix.js";
|
|
9
9
|
import { t as g } from "./PkAvatar-DwtZWSW4.js";
|
|
10
|
-
import { n as _, t as v } from "./PkChatbotInput-
|
|
10
|
+
import { n as _, t as v } from "./PkChatbotInput-D_I0Gf_u.js";
|
|
11
11
|
import { t as ee } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
|
|
12
|
-
import { t as te } from "./PkChatbotEmptyState-
|
|
12
|
+
import { t as te } from "./PkChatbotEmptyState-OlgewA4_.js";
|
|
13
13
|
import { t as ne } from "./PkChatbotWakeupBar-DEP-d-Fp.js";
|
|
14
14
|
import { VvIcon as y } from "@volverjs/ui-vue/components";
|
|
15
|
-
import { Fragment as b, Teleport as re, Transition as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createSlots as ie, createTextVNode as ae, createVNode as D, defineAsyncComponent as O, defineComponent as oe, inject as se, isRef as ce, nextTick as le, normalizeClass as k, normalizeStyle as ue, onBeforeUnmount as de, onMounted as fe, onScopeDispose as pe, onUnmounted as
|
|
16
|
-
import { useI18n as
|
|
17
|
-
import { useDropZone as
|
|
18
|
-
import { storeToRefs as
|
|
15
|
+
import { Fragment as b, Teleport as re, Transition as x, computed as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createSlots as ie, createTextVNode as ae, createVNode as D, defineAsyncComponent as O, defineComponent as oe, inject as se, isRef as ce, nextTick as le, normalizeClass as k, normalizeStyle as ue, onBeforeUnmount as de, onMounted as fe, onScopeDispose as pe, onUnmounted as A, openBlock as j, provide as me, ref as M, renderList as he, shallowRef as ge, toDisplayString as N, toValue as _e, unref as P, useTemplateRef as ve, watch as F, withCtx as I } from "vue";
|
|
16
|
+
import { useI18n as ye } from "vue-i18n";
|
|
17
|
+
import { useDropZone as be, useResizeObserver as xe } from "@vueuse/core";
|
|
18
|
+
import { storeToRefs as Se } from "pinia";
|
|
19
19
|
// ../../packages/composable/src/chatbot/useGreeting.ts
|
|
20
|
-
function
|
|
21
|
-
let { locale: n, t: r, te: i } =
|
|
22
|
-
return S(() =>
|
|
20
|
+
function Ce(e, t) {
|
|
21
|
+
let { locale: n, t: r, te: i } = ye({ useScope: "global" });
|
|
22
|
+
return S(() => L(_e(e)?.greeting?.[0]?.[n.value] ?? "", _e(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function L(e, t) {
|
|
25
25
|
return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
|
|
26
26
|
}
|
|
27
27
|
// ../../packages/components/src/chat/PkAuroraCanvas.vue?vue&type=script&setup=true&lang.ts
|
|
28
|
-
var
|
|
28
|
+
var we = {
|
|
29
29
|
key: 1,
|
|
30
30
|
class: "pk-aurora__fallback"
|
|
31
|
-
},
|
|
31
|
+
}, R = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", z = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec3 u_color2;\nuniform float u_duo;\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. Its height follows the pill's, but each half\n // ends inside the canvas: at most the room to that edge over 1.75, so\n // at the widest breath (1.24) the glow there is about 1% of its peak,\n // under one 8-bit step, and the edge fade below finds nothing to cut.\n // Uncapped, a taller pill (a second line, an attachment) or a short\n // canvas left a quarter of the glow or more at the edge, cut straight.\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5) * u_spread;\n float room = rel.y > 0.0 ? u_resolution.y - u_center.y : u_center.y;\n radii.y = min(radii.y, room / 1.75);\n radii *= breath * 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 // Two tones: left to right the glow passes from the first to the\n // second, along a border a slow noise field keeps bending\n vec2 q = rel / max(radii, vec2(1.0));\n float bands = q.x * 0.9\n + 0.7 * snoise(q * 0.8 + vec2(u_time * 0.07, -u_time * 0.05));\n vec3 color = mix(u_color, u_color2, u_duo * smoothstep(-0.6, 0.6, bands));\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(color * alpha, alpha);\n}", Te = /* @__PURE__ */ oe({
|
|
32
32
|
__name: "PkAuroraCanvas",
|
|
33
33
|
props: {
|
|
34
34
|
sourceSelector: {},
|
|
@@ -37,7 +37,7 @@ var Te = {
|
|
|
37
37
|
secondColor: {}
|
|
38
38
|
},
|
|
39
39
|
setup(e) {
|
|
40
|
-
let t = e, n =
|
|
40
|
+
let t = e, n = ve("rootEl"), r = ve("canvasEl"), i = M(!1), a = M(null), o = S(() => a.value ? {
|
|
41
41
|
"--pk-aurora-tint": `rgb(${a.value.first.join(" ")})`,
|
|
42
42
|
"--pk-aurora-tint-2": `rgb(${(a.value.duo ? a.value.second : a.value.first).join(" ")})`
|
|
43
43
|
} : void 0), s = null, c = 0, l = null, u = null, d = null, f = null, p = null, h = null, g = null, _ = null, v = null, ee = performance.now(), te = (e, t) => {
|
|
@@ -51,7 +51,7 @@ var Te = {
|
|
|
51
51
|
secondColor: t.secondColor
|
|
52
52
|
}), s && !i.value && a.value && (s.uniform3f(g, ...ne(a.value.first)), s.uniform3f(_, ...ne(a.value.second)), s.uniform1f(v, +!!a.value.duo), x(re() ? 10 : void 0)));
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
F([
|
|
55
55
|
() => t.mainColor,
|
|
56
56
|
() => t.tones,
|
|
57
57
|
() => t.secondColor
|
|
@@ -79,7 +79,7 @@ var Te = {
|
|
|
79
79
|
i.value = !0;
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
let t = te(s.VERTEX_SHADER,
|
|
82
|
+
let t = te(s.VERTEX_SHADER, R), n = te(s.FRAGMENT_SHADER, z), o = s.createProgram();
|
|
83
83
|
if (!t || !n || !o || (s.attachShader(o, t), s.attachShader(o, n), s.linkProgram(o), !s.getProgramParameter(o, s.LINK_STATUS))) {
|
|
84
84
|
i.value = !0;
|
|
85
85
|
return;
|
|
@@ -100,25 +100,25 @@ var Te = {
|
|
|
100
100
|
s.enableVertexAttribArray(m), s.vertexAttribPointer(m, 2, s.FLOAT, !1, 0, 0), u = s.getUniformLocation(o, "u_time"), d = s.getUniformLocation(o, "u_resolution"), f = s.getUniformLocation(o, "u_center"), p = s.getUniformLocation(o, "u_half"), h = s.getUniformLocation(o, "u_spread"), g = s.getUniformLocation(o, "u_color"), _ = s.getUniformLocation(o, "u_color2"), v = s.getUniformLocation(o, "u_duo"), y(), l = new ResizeObserver(b), l.observe(e), b(), le(b), re() ? x(10) : C();
|
|
101
101
|
}), de(() => {
|
|
102
102
|
cancelAnimationFrame(c), l?.disconnect();
|
|
103
|
-
}),
|
|
103
|
+
}), A(() => {
|
|
104
104
|
let e = s;
|
|
105
105
|
s = null, setTimeout(() => {
|
|
106
106
|
e?.getExtension("WEBGL_lose_context")?.loseContext();
|
|
107
107
|
}, 150);
|
|
108
|
-
}), (e, t) => (
|
|
108
|
+
}), (e, t) => (j(), T("div", {
|
|
109
109
|
ref_key: "rootEl",
|
|
110
110
|
ref: n,
|
|
111
111
|
class: "pk-aurora",
|
|
112
112
|
"aria-hidden": "true",
|
|
113
113
|
style: ue(o.value)
|
|
114
|
-
}, [i.value ? (
|
|
114
|
+
}, [i.value ? (j(), T("div", we)) : (j(), T("canvas", {
|
|
115
115
|
key: 0,
|
|
116
116
|
ref_key: "canvasEl",
|
|
117
117
|
ref: r,
|
|
118
118
|
class: "pk-aurora__canvas"
|
|
119
119
|
}, null, 512))], 4));
|
|
120
120
|
}
|
|
121
|
-
}),
|
|
121
|
+
}), B = .18, Ee = .35, De = /* @__PURE__ */ oe({
|
|
122
122
|
__name: "PkVoiceOrb",
|
|
123
123
|
props: {
|
|
124
124
|
sample: {},
|
|
@@ -130,20 +130,20 @@ var Te = {
|
|
|
130
130
|
bars: { default: 5 }
|
|
131
131
|
},
|
|
132
132
|
setup(e) {
|
|
133
|
-
let t = e, n =
|
|
133
|
+
let t = e, n = ve("barsEl"), r = Array.from({ length: t.bars }, () => B), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
|
|
134
134
|
let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
|
|
135
135
|
if (!n?.length) {
|
|
136
136
|
let t = Date.now() / 260;
|
|
137
137
|
return Array.from({ length: i }, (n, r) => {
|
|
138
138
|
let i = .65 + .35 * Math.sin(t + r * .9);
|
|
139
|
-
return
|
|
139
|
+
return B + e * 2.4 * i;
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
let a = Math.max(1, Math.floor(n.length / 2)), o = Math.max(1, Math.floor(a / i));
|
|
143
143
|
return Array.from({ length: i }, (e, t) => {
|
|
144
144
|
let r = 0;
|
|
145
145
|
for (let e = 0; e < o; e += 1) r += n[t * o + e] ?? 0;
|
|
146
|
-
return
|
|
146
|
+
return B + r / o / 255 * 2.2;
|
|
147
147
|
});
|
|
148
148
|
}, s = () => {
|
|
149
149
|
let e = n.value?.children;
|
|
@@ -152,36 +152,36 @@ var Te = {
|
|
|
152
152
|
});
|
|
153
153
|
}, c = () => {
|
|
154
154
|
let e = o();
|
|
155
|
-
r = r.map((t, n) => t + (Math.min(1, Math.max(
|
|
155
|
+
r = r.map((t, n) => t + (Math.min(1, Math.max(B, e[n] ?? B)) - t) * Ee), s(), i = requestAnimationFrame(c);
|
|
156
156
|
}, l = () => {
|
|
157
157
|
i !== void 0 && (cancelAnimationFrame(i), i = void 0);
|
|
158
158
|
};
|
|
159
|
-
return
|
|
160
|
-
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() =>
|
|
161
|
-
}, { immediate: !0 }), de(l), (t, r) => (
|
|
159
|
+
return F(() => t.state, async (e) => {
|
|
160
|
+
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => B * 1.6), await le(), s()) : i === void 0 && (i = requestAnimationFrame(c));
|
|
161
|
+
}, { immediate: !0 }), de(l), (t, r) => (j(), T("div", {
|
|
162
162
|
class: k(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
|
|
163
163
|
"aria-hidden": "true"
|
|
164
164
|
}, [E("div", {
|
|
165
165
|
ref_key: "barsEl",
|
|
166
166
|
ref: n,
|
|
167
167
|
class: "pk-voice-orb__bars"
|
|
168
|
-
}, [(
|
|
168
|
+
}, [(j(!0), T(b, null, he(e.bars, (e) => (j(), T("span", {
|
|
169
169
|
key: e,
|
|
170
170
|
class: "pk-voice-orb__bar"
|
|
171
171
|
}))), 128))], 512)], 2));
|
|
172
172
|
}
|
|
173
|
-
}),
|
|
173
|
+
}), Oe = {
|
|
174
174
|
key: 0,
|
|
175
175
|
class: "pk-voice-session__badge",
|
|
176
176
|
"aria-hidden": "true"
|
|
177
|
-
},
|
|
177
|
+
}, ke = {
|
|
178
178
|
class: "pk-voice-session__status",
|
|
179
179
|
role: "status"
|
|
180
|
-
},
|
|
180
|
+
}, V = {
|
|
181
181
|
key: 0,
|
|
182
182
|
class: "pk-voice-session__live-dot",
|
|
183
183
|
"aria-hidden": "true"
|
|
184
|
-
},
|
|
184
|
+
}, H = ["title"], Ae = ["title"], je = { class: "pk-voice-session__actions" }, Me = /* @__PURE__ */ oe({
|
|
185
185
|
__name: "PkVoiceSession",
|
|
186
186
|
props: {
|
|
187
187
|
state: {},
|
|
@@ -200,7 +200,7 @@ var Te = {
|
|
|
200
200
|
"dismiss"
|
|
201
201
|
],
|
|
202
202
|
setup(e, { emit: t }) {
|
|
203
|
-
let n = e, r = t, { t: i } =
|
|
203
|
+
let n = e, r = t, { t: i } = ye({ useScope: "global" }), a = S(() => 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 = S(() => {
|
|
204
204
|
if (n.remainingSeconds === void 0) return;
|
|
205
205
|
let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
|
|
206
206
|
return `${e}:${String(t).padStart(2, "0")}`;
|
|
@@ -209,8 +209,8 @@ var Te = {
|
|
|
209
209
|
});
|
|
210
210
|
return (t, n) => {
|
|
211
211
|
let u = y;
|
|
212
|
-
return
|
|
213
|
-
e.error ? (
|
|
212
|
+
return j(), T("div", { class: k(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
|
|
213
|
+
e.error ? (j(), T("span", Oe, [D(u, { name: "ri:error-warning-line" })])) : (j(), C(De, {
|
|
214
214
|
key: 1,
|
|
215
215
|
state: e.state,
|
|
216
216
|
sample: e.sample,
|
|
@@ -220,37 +220,37 @@ var Te = {
|
|
|
220
220
|
"sample",
|
|
221
221
|
"spectrum"
|
|
222
222
|
])),
|
|
223
|
-
E("div",
|
|
223
|
+
E("div", ke, [E("span", { class: k(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (j(), T("span", V)) : w("", !0), ae(" " + N(a.value), 1)], 2), e.error ? (j(), T("p", {
|
|
224
224
|
key: 0,
|
|
225
225
|
class: "pk-voice-session__detail",
|
|
226
226
|
title: e.rawError ?? e.error
|
|
227
|
-
},
|
|
228
|
-
o.value ? (
|
|
227
|
+
}, N(e.error), 9, H)) : w("", !0)]),
|
|
228
|
+
o.value ? (j(), T("span", {
|
|
229
229
|
key: 2,
|
|
230
230
|
class: k(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
|
|
231
|
-
title:
|
|
231
|
+
title: P(i)("hint.voiceRemaining"),
|
|
232
232
|
"aria-hidden": "true"
|
|
233
|
-
},
|
|
234
|
-
E("div",
|
|
233
|
+
}, N(o.value), 11, Ae)) : w("", !0),
|
|
234
|
+
E("div", je, [e.error ? (j(), T(b, { key: 0 }, [D(_, {
|
|
235
235
|
icon: "ri:refresh-line",
|
|
236
|
-
label:
|
|
236
|
+
label: P(i)("action.retry"),
|
|
237
237
|
onClick: n[0] ||= (e) => r("retry")
|
|
238
|
-
}, null, 8, ["label"]), e.live ? (
|
|
238
|
+
}, null, 8, ["label"]), e.live ? (j(), C(_, {
|
|
239
239
|
key: 0,
|
|
240
240
|
icon: "ri:stop-circle-line",
|
|
241
241
|
modifiers: "danger",
|
|
242
|
-
title:
|
|
243
|
-
"aria-label":
|
|
242
|
+
title: P(i)("action.hangUp"),
|
|
243
|
+
"aria-label": P(i)("action.hangUp"),
|
|
244
244
|
onClick: n[1] ||= (e) => r("hang-up")
|
|
245
|
-
}, null, 8, ["title", "aria-label"])) : (
|
|
245
|
+
}, null, 8, ["title", "aria-label"])) : (j(), C(_, {
|
|
246
246
|
key: 1,
|
|
247
247
|
icon: "ri:close-line",
|
|
248
|
-
label:
|
|
248
|
+
label: P(i)("action.close"),
|
|
249
249
|
onClick: n[2] ||= (e) => r("dismiss")
|
|
250
|
-
}, null, 8, ["label"]))], 64)) : (
|
|
250
|
+
}, null, 8, ["label"]))], 64)) : (j(), T(b, { key: 1 }, [D(_, {
|
|
251
251
|
icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
|
|
252
|
-
title: e.muted ?
|
|
253
|
-
"aria-label": e.muted ?
|
|
252
|
+
title: e.muted ? P(i)("action.unmute") : P(i)("action.mute"),
|
|
253
|
+
"aria-label": e.muted ? P(i)("action.unmute") : P(i)("action.mute"),
|
|
254
254
|
"aria-pressed": e.muted,
|
|
255
255
|
onClick: n[3] ||= (e) => r("toggle-mute")
|
|
256
256
|
}, null, 8, [
|
|
@@ -261,15 +261,15 @@ var Te = {
|
|
|
261
261
|
]), D(_, {
|
|
262
262
|
icon: "ri:stop-circle-line",
|
|
263
263
|
modifiers: "danger",
|
|
264
|
-
title:
|
|
265
|
-
"aria-label":
|
|
264
|
+
title: P(i)("action.hangUp"),
|
|
265
|
+
"aria-label": P(i)("action.hangUp"),
|
|
266
266
|
onClick: n[4] ||= (e) => r("hang-up")
|
|
267
267
|
}, null, 8, ["title", "aria-label"])], 64))])
|
|
268
268
|
], 2);
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
|
-
}),
|
|
272
|
-
let t =
|
|
271
|
+
}), Ne = (e) => {
|
|
272
|
+
let t = ge(), n = M("disconnected"), r = M("listening"), i = M(), a = M([]), s = M(), c = M(), l, u, d = 0, f = !1, p = () => {
|
|
273
273
|
u &&= (clearInterval(u), void 0), s.value = void 0;
|
|
274
274
|
}, m = (e) => {
|
|
275
275
|
let t = Date.now() + e * 1e3, n = () => {
|
|
@@ -393,21 +393,21 @@ var Te = {
|
|
|
393
393
|
readLevel: ne,
|
|
394
394
|
readSpectrum: y
|
|
395
395
|
};
|
|
396
|
-
},
|
|
397
|
-
function
|
|
398
|
-
|
|
396
|
+
}, Pe = Symbol("ChatFilePreviewDock");
|
|
397
|
+
function Fe(e) {
|
|
398
|
+
me(Pe, e);
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
return se(
|
|
400
|
+
function Ie() {
|
|
401
|
+
return se(Pe, void 0);
|
|
402
402
|
}
|
|
403
403
|
// ../../packages/components/src/chat/useWakeupWatch.ts
|
|
404
|
-
var
|
|
404
|
+
var Le = 4e3, Re = [
|
|
405
405
|
3e3,
|
|
406
406
|
5e3,
|
|
407
407
|
1e4
|
|
408
|
-
],
|
|
409
|
-
function
|
|
410
|
-
let t =
|
|
408
|
+
], ze = 12e4, Be = 3e4;
|
|
409
|
+
function Ve(e) {
|
|
410
|
+
let t = M(null), n = M(!1), r, i = !1, a = () => {
|
|
411
411
|
clearTimeout(r), r = void 0;
|
|
412
412
|
}, o = (e, t) => {
|
|
413
413
|
a(), i || (r = setTimeout(() => void t(), e));
|
|
@@ -424,12 +424,12 @@ function He(e) {
|
|
|
424
424
|
}
|
|
425
425
|
let r = t.value;
|
|
426
426
|
if (r) {
|
|
427
|
-
let e = Date.parse(r.dueAt) - Date.now() +
|
|
428
|
-
o(Math.max(
|
|
427
|
+
let e = Date.parse(r.dueAt) - Date.now() + Le;
|
|
428
|
+
o(Math.max(Le, e), () => l(r.wakeId, Date.now(), 0));
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
async function l(t, n, r) {
|
|
432
|
-
await e.refreshMessages(), !i && (s(t) || Date.now() - n >=
|
|
432
|
+
await e.refreshMessages(), !i && (s(t) || Date.now() - n >= ze ? await c() : o(Re[Math.min(r, Re.length - 1)], () => l(t, n, r + 1)));
|
|
433
433
|
}
|
|
434
434
|
async function u() {
|
|
435
435
|
n.value = !0;
|
|
@@ -454,11 +454,11 @@ function He(e) {
|
|
|
454
454
|
f = void 0;
|
|
455
455
|
}
|
|
456
456
|
let g = S(() => e.messages().some((e) => e.role === "user"));
|
|
457
|
-
|
|
457
|
+
F([e.chatId, g], ([, t]) => {
|
|
458
458
|
d();
|
|
459
459
|
let n = e.status(), r = n === "submitted" || n === "streaming" || f === e.chatId();
|
|
460
460
|
t && !r && c();
|
|
461
|
-
}, { immediate: !0 }),
|
|
461
|
+
}, { immediate: !0 }), F(e.status, (e, t) => {
|
|
462
462
|
e === "ready" && t !== "ready" && g.value && c();
|
|
463
463
|
});
|
|
464
464
|
let _;
|
|
@@ -466,8 +466,8 @@ function He(e) {
|
|
|
466
466
|
t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
|
|
467
467
|
}
|
|
468
468
|
let ee = () => v();
|
|
469
|
-
return document.addEventListener("visibilitychange", ee),
|
|
470
|
-
clearInterval(_), _ = void 0, e && !i && (v(), _ = setInterval(v,
|
|
469
|
+
return document.addEventListener("visibilitychange", ee), F(() => t.value?.wakeId, (e) => {
|
|
470
|
+
clearInterval(_), _ = void 0, e && !i && (v(), _ = setInterval(v, Be));
|
|
471
471
|
}), de(() => {
|
|
472
472
|
i = !0, a(), clearInterval(_), document.removeEventListener("visibilitychange", ee);
|
|
473
473
|
}), {
|
|
@@ -482,7 +482,7 @@ function He(e) {
|
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
484
|
// ../../packages/components/src/chat/previewChanges.ts
|
|
485
|
-
var
|
|
485
|
+
var U = 1e6, He = (e, t) => {
|
|
486
486
|
let n = 0;
|
|
487
487
|
for (; n < e.length && n < t.length && e[n] === t[n];) n += 1;
|
|
488
488
|
let r = 0;
|
|
@@ -494,29 +494,29 @@ var H = 1e6, Ue = (e, t) => {
|
|
|
494
494
|
}
|
|
495
495
|
};
|
|
496
496
|
if (!a) return o;
|
|
497
|
-
if (!i || i * a >
|
|
497
|
+
if (!i || i * a > U) return s(n, n + i, n, n + a), o;
|
|
498
498
|
let c = new Uint32Array((i + 1) * (a + 1));
|
|
499
499
|
for (let r = i - 1; r >= 0; r--) for (let i = a - 1; i >= 0; i--) c[r * (a + 1) + i] = e[n + r] === t[n + i] ? c[(r + 1) * (a + 1) + i + 1] + 1 : Math.max(c[(r + 1) * (a + 1) + i], c[r * (a + 1) + i + 1]);
|
|
500
500
|
let l = 0, u = 0, d = 0, f = 0;
|
|
501
501
|
for (; l < i && u < a;) e[n + l] === t[n + u] ? (s(n + d, n + l, n + f, n + u), l += 1, u += 1, d = l, f = u) : c[(l + 1) * (a + 1) + u] >= c[l * (a + 1) + u + 1] ? l += 1 : u += 1;
|
|
502
502
|
return s(n + d, n + i, n + f, n + a), o;
|
|
503
|
-
},
|
|
503
|
+
}, Ue = (e, t) => e === "id" || e === "ids" ? void 0 : t, W = (e) => JSON.stringify(e, Ue), We = (e, t) => {
|
|
504
504
|
let n = (e) => e.flatMap((e) => e.ids ?? []);
|
|
505
|
-
return t?.kind === "table" ? [...
|
|
505
|
+
return t?.kind === "table" ? [...He(t.rows.map(W), e.rows.map(W))].flatMap(([r, i]) => {
|
|
506
506
|
let a = i === void 0 ? void 0 : t.rows[i];
|
|
507
|
-
return n(e.rows[r].filter((e, t) => !a?.[t] ||
|
|
507
|
+
return n(e.rows[r].filter((e, t) => !a?.[t] || W(a[t]) !== W(e)));
|
|
508
508
|
}) : n(e.rows.flat());
|
|
509
|
-
},
|
|
510
|
-
let n = /* @__PURE__ */ new Set(), r =
|
|
509
|
+
}, Ge = (e, t) => {
|
|
510
|
+
let n = /* @__PURE__ */ new Set(), r = He(e.blocks.map(W), t.blocks.map(W));
|
|
511
511
|
for (let [i, a] of r) {
|
|
512
512
|
let r = t.blocks[i];
|
|
513
513
|
if (r.kind === "table") {
|
|
514
514
|
let t = a === void 0 ? void 0 : e.blocks[a];
|
|
515
|
-
for (let e of
|
|
515
|
+
for (let e of We(r, t)) n.add(e);
|
|
516
516
|
} else r.id && n.add(r.id);
|
|
517
517
|
}
|
|
518
518
|
return n;
|
|
519
|
-
},
|
|
519
|
+
}, Ke = (e, t) => {
|
|
520
520
|
let n = /* @__PURE__ */ new Map();
|
|
521
521
|
for (let r of t.rows) for (let t of r.cells) n.set(`${r.row}:${t.col}`, JSON.stringify({
|
|
522
522
|
...t,
|
|
@@ -524,25 +524,25 @@ var H = 1e6, Ue = (e, t) => {
|
|
|
524
524
|
numFmt: t.numFmt === void 0 ? void 0 : e.numberFormats?.[t.numFmt]
|
|
525
525
|
}));
|
|
526
526
|
return n;
|
|
527
|
-
},
|
|
527
|
+
}, G = (e, t) => {
|
|
528
528
|
let n = /* @__PURE__ */ new Map();
|
|
529
529
|
for (let r of t.sheets) {
|
|
530
|
-
let i = e.sheets.find((e) => e.name === r.name), a =
|
|
530
|
+
let i = e.sheets.find((e) => e.name === r.name), a = Ke(t, r), o = i ? Ke(e, i) : /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set();
|
|
531
531
|
for (let [e, t] of a) o.get(e) !== t && s.add(e);
|
|
532
532
|
for (let e of o.keys()) a.has(e) || s.add(e);
|
|
533
533
|
s.size && n.set(r.name, s);
|
|
534
534
|
}
|
|
535
535
|
return n;
|
|
536
|
-
},
|
|
536
|
+
}, qe = (e, t) => {
|
|
537
537
|
if (e.kind === "word" && t.kind === "word") {
|
|
538
|
-
let n =
|
|
538
|
+
let n = Ge(e, t);
|
|
539
539
|
return n.size ? {
|
|
540
540
|
kind: "word",
|
|
541
541
|
paragraphs: n
|
|
542
542
|
} : void 0;
|
|
543
543
|
}
|
|
544
544
|
if (e.kind === "spreadsheet" && t.kind === "spreadsheet") {
|
|
545
|
-
let n =
|
|
545
|
+
let n = G(e, t);
|
|
546
546
|
return n.size ? {
|
|
547
547
|
kind: "spreadsheet",
|
|
548
548
|
cells: n
|
|
@@ -555,11 +555,11 @@ var H = 1e6, Ue = (e, t) => {
|
|
|
555
555
|
return (i.top < r.top || i.bottom > r.bottom) && (e.scrollTop += i.top - r.top - (r.height - i.height) / 2), (i.left < r.left || i.right > r.right) && (e.scrollLeft += i.left - r.left - (r.width - i.width) / 2), !0;
|
|
556
556
|
}, Ye = 4e3;
|
|
557
557
|
function Xe(e) {
|
|
558
|
-
let t =
|
|
558
|
+
let t = M(), n = M(), r = M(!1), i = M(!1), a = ge(), o = /* @__PURE__ */ new Map(), s, c = 0, l = 0, u = () => {
|
|
559
559
|
clearTimeout(s), a.value = void 0;
|
|
560
560
|
}, d = (e, t) => {
|
|
561
561
|
u();
|
|
562
|
-
let r = e && t ?
|
|
562
|
+
let r = e && t ? qe(t, e) : void 0;
|
|
563
563
|
r && (a.value = r, s = setTimeout(u, Ye)), n.value = e;
|
|
564
564
|
}, f = async (n, a) => {
|
|
565
565
|
let s = ++c, u = l, f = a ? o.get(a) : void 0;
|
|
@@ -615,42 +615,42 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
615
615
|
"selection-action"
|
|
616
616
|
],
|
|
617
617
|
setup(o, { emit: m }) {
|
|
618
|
-
let _ = O(() => import("./PkToolShowForm-
|
|
619
|
-
|
|
620
|
-
let bt =
|
|
621
|
-
|
|
618
|
+
let _ = O(() => import("./PkToolShowForm-BStbk4Iu.js").then((e) => e.n)), b = O(() => import("./PkToolShowContactForm-CackCDGD.js").then((e) => e.n)), ae = O(() => import("./PkToolShowSuggestedReply-DxlGhMvE.js").then((e) => e.n)), oe = O(() => import("./PkToolShowSources-CgEkcyRg.js").then((e) => e.n)), se = O(() => import("./PkToolRequestGeolocation-Bhh7UomV.js").then((e) => e.n)), le = O(() => import("./PkToolRequestOAuthConnection-8GJlt5G1.js")), ue = O(() => import("./PkToolShowLocation-Nhh_LwmN.js").then((e) => e.n)), fe = O(() => import("./PkToolShowChart-BQXxaPIO.js").then((e) => e.t)), pe = O(() => import("./PkToolShowDiagram-CABPsFi8.js")), A = O(() => import("./PkToolChatFile-CD26Q2xp.js").then((e) => e.n)), he = O(() => import("./PkToolShareDocument-Bf7OE8XA.js").then((e) => e.n)), ge = O(() => import("./PkFilePreview-k5gEl3n8.js").then((e) => e.n)), _e = O(() => import("./PkFilePreviewDialog-DUwZPErE.js").then((e) => e.n)), L = o, we = m, R = i(L.agentId), { agentInterface: z, agentFileUpload: B, agentType: Ee, agentVoice: De, actions: Oe, revisedAnswers: ke, messages: V, chat: H, messageFeedbacks: Ae, feedbackDialogMessage: je, isFeedbackSubmitting: Pe, isFeedbackSubmitted: Fe, feedbackSubmitError: Le, isLeadSubmitted: Re, isLoadingSubmitLead: ze, submitLeadError: Be, input: U, inputMessagePlaceholder: He, isConversationBlocked: Ue, baseUrl: W, pendingAttachments: We, isAttachmentLimitReached: Ge, fileLimitError: Ke, apiClient: G, isDark: qe, hostToolsPending: Je, pageNoticeLevel: Ye, hostConfirmation: st, agentPageAccess: ct, hostStepTitles: lt, hostStepChanges: ut, confirmationMode: dt, canQueue: ft, queuedMessages: pt, backgroundAnswers: mt, inputFocusRequest: ht, pagePointer: gt, pagePointerAvailable: _t, pagePointing: vt, agentSelectionActions: yt } = Se(R);
|
|
619
|
+
me(f, lt), me(d, ut);
|
|
620
|
+
let bt = ve("inputEl");
|
|
621
|
+
F(ht, () => {
|
|
622
622
|
bt.value?.focus();
|
|
623
|
-
}),
|
|
623
|
+
}), F(gt, (e) => {
|
|
624
624
|
e && bt.value?.focus();
|
|
625
625
|
});
|
|
626
626
|
let xt = S(() => gt.value ? {
|
|
627
627
|
kind: gt.value.kind,
|
|
628
628
|
label: gt.value.label
|
|
629
|
-
} : void 0), K = S(() =>
|
|
629
|
+
} : void 0), K = S(() => Ee.value === "reasoning" ? void 0 : B.value), St = S(() => {
|
|
630
630
|
let e = K.value?.allowedMimeTypes ?? [];
|
|
631
631
|
return !!K.value?.enabled && (!e.length || e.some((e) => e.startsWith("image/")));
|
|
632
632
|
});
|
|
633
633
|
n({
|
|
634
|
-
available: () => !!bt.value && St.value && !
|
|
634
|
+
available: () => !!bt.value && St.value && !Ge.value,
|
|
635
635
|
annotate: (e) => bt.value?.annotateImage(e)
|
|
636
636
|
});
|
|
637
|
-
let q = (e) =>
|
|
638
|
-
let e =
|
|
637
|
+
let q = (e) => G.value.getMediaDownloadUrl(L.agentId, R.localChatId, e), { handleSubmit: Ct, stopGeneration: wt, regenerate: Tt, onUpvote: Et, onDownvote: Dt, onFeedback: Ot, onFeedbackSubmit: kt, onLeadSubmit: At, startNewChat: jt, addToolOutput: Mt, addToolApprovalResponse: Nt, handleFileSelect: Pt, discardPendingAttachment: Ft, replacePendingAttachment: It, retryPendingAttachment: Lt, clearFileLimitError: Rt, refreshMessages: zt, appendMessage: Bt, closePageNotice: Vt, respondHostConfirmation: Ht, editQueuedMessage: Ut, removeQueuedMessage: Wt, openBackgroundAnswer: Gt, dismissBackgroundAnswer: Kt } = R, { t: J } = ye({ useScope: "global" }), qt = S(() => Je.value > 0), Jt = S(() => qt.value && H.value.status === "ready" ? "streaming" : H.value.status), Yt = h(() => ct.value?.notice), Xt = S(() => Ye.value ? Yt.value || J(`message.pageAccessNotice.${Ye.value}`) : void 0), Zt = S(() => {
|
|
638
|
+
let e = Ke.value;
|
|
639
639
|
if (e) return e.reason === "per-chat" ? J("message.fileLimitPerChat", { max: e.max }) : J("message.fileLimitPerMessage", { max: e.max });
|
|
640
640
|
}), Qt = S(() => mt.value.map(({ chatId: e, title: t }) => ({
|
|
641
641
|
id: e,
|
|
642
642
|
text: t ? J("message.backgroundAnswerReady", { title: t }) : J("message.backgroundAnswerReadyUntitled")
|
|
643
|
-
}))), $t = h(() =>
|
|
644
|
-
|
|
643
|
+
}))), $t = h(() => z.value?.dismissableNotice), en = S(() => V.value.some((e) => e.role === "user")), tn = S(() => L.modifier === "fullscreen" && !en.value), nn = Ce(z, () => L.userName), rn = ve("chatViewEl"), an = Ie(), on = S(() => !!an?.value), sn = S(() => an?.value ?? "body"), cn = M(0), ln = M(0);
|
|
644
|
+
xe([rn, S(() => an?.value ?? void 0)], (e) => {
|
|
645
645
|
for (let t of e) {
|
|
646
646
|
let e = t.borderBoxSize?.[0]?.inlineSize ?? t.contentRect.width;
|
|
647
647
|
t.target === rn.value ? cn.value = e : ln.value = e;
|
|
648
648
|
}
|
|
649
649
|
}, { box: "border-box" });
|
|
650
|
-
let un = S(() => cn.value + (on.value ? ln.value : 0) >= nt), dn = S(() => cn.value > 0 && cn.value < 576), { target: Y, preview: fn, loading: pn, error: mn, changes: hn, open: gn, close: _n, reset: vn } = Xe((e) =>
|
|
650
|
+
let un = S(() => cn.value + (on.value ? ln.value : 0) >= nt), dn = S(() => cn.value > 0 && cn.value < 576), { target: Y, preview: fn, loading: pn, error: mn, changes: hn, open: gn, close: _n, reset: vn } = Xe((e) => G.value.getChatFilePreview(L.agentId, R.localChatId, e)), X = M({}), yn = (e, t) => {
|
|
651
651
|
let n = (e) => e?.fileId ?? e?.storedFileName;
|
|
652
652
|
return n(e) !== n(Y.value) && (X.value = {}), gn(e, t);
|
|
653
|
-
}, bn =
|
|
653
|
+
}, bn = M(!1), xn = S(() => !!Y.value && un.value && !bn.value), Sn = () => {
|
|
654
654
|
_n(), bn.value = !1;
|
|
655
655
|
}, Cn = /* @__PURE__ */ new Set([
|
|
656
656
|
"tool-editSpreadsheet",
|
|
@@ -659,7 +659,7 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
659
659
|
"tool-createWordDocument"
|
|
660
660
|
]), wn = S(() => {
|
|
661
661
|
let e = /* @__PURE__ */ new Map();
|
|
662
|
-
for (let t of
|
|
662
|
+
for (let t of V.value) for (let n of t.parts) {
|
|
663
663
|
let { type: t, state: r, output: i } = n;
|
|
664
664
|
if (Cn.has(t) && r === "output-available" && i?.fileId && i.version && i.storedFileName) {
|
|
665
665
|
let t = e.get(i.fileId) ?? /* @__PURE__ */ new Map();
|
|
@@ -686,7 +686,7 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
686
686
|
filename: e.filename
|
|
687
687
|
}), Sn());
|
|
688
688
|
};
|
|
689
|
-
|
|
689
|
+
F(() => R.localChatId, vn), F(() => {
|
|
690
690
|
let e = Y.value?.fileId;
|
|
691
691
|
return e ? {
|
|
692
692
|
fileId: e,
|
|
@@ -696,76 +696,78 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
696
696
|
e && t && e.fileId === t.fileId && e.newest > t.newest && Y.value?.version === t.newest && En(e.newest, Y.value.storedFileName);
|
|
697
697
|
});
|
|
698
698
|
let kn = S(() => {
|
|
699
|
-
let e =
|
|
700
|
-
if (!(
|
|
701
|
-
}), An = (
|
|
702
|
-
|
|
699
|
+
let e = H.value?.status;
|
|
700
|
+
if (!(Ue.value || e === "submitted" || e === "streaming")) return Y.value?.kind === "word" ? yt.value?.word : yt.value?.excel;
|
|
701
|
+
}), An = S(() => Jt.value === "submitted" || Jt.value === "streaming"), jn = () => {
|
|
702
|
+
un.value ? bn.value = !1 : Sn();
|
|
703
|
+
}, Mn = (e, t, n) => {
|
|
704
|
+
R.sendSelection(e, { filePointer: t }) && we("selection-action", {
|
|
703
705
|
surface: t.format === "docx" ? "word" : "excel",
|
|
704
706
|
action: n.id,
|
|
705
707
|
state: "chat",
|
|
706
708
|
size: String(n.size)
|
|
707
709
|
});
|
|
708
|
-
},
|
|
709
|
-
let t = await
|
|
710
|
+
}, Nn = async (e) => (await G.value.expandSourceContext(L.agentId, e.documentId, e.chunkIndex)).content, Pn = async (e) => {
|
|
711
|
+
let t = await G.value.downloadSourceDocument(L.agentId, e);
|
|
710
712
|
window.open(t.downloadUrl, "_blank");
|
|
711
|
-
}, { isOverDropZone:
|
|
713
|
+
}, { isOverDropZone: Fn } = be(rn, {
|
|
712
714
|
dataTypes: (e) => t(e, K.value?.allowedMimeTypes ?? []),
|
|
713
715
|
onDrop: (e) => {
|
|
714
716
|
if (K.value?.enabled && e) for (let t of e) Pt(t);
|
|
715
717
|
}
|
|
716
|
-
}),
|
|
718
|
+
}), In = M(!1), Ln = !1, Z = M(!1), Rn = [
|
|
717
719
|
3e3,
|
|
718
720
|
5e3,
|
|
719
721
|
1e4
|
|
720
|
-
],
|
|
721
|
-
function
|
|
722
|
-
clearTimeout(
|
|
722
|
+
], zn, Bn, Vn = !1, Hn = 0, Un = !1;
|
|
723
|
+
function Wn() {
|
|
724
|
+
clearTimeout(zn), zn = void 0, Bn = void 0, Vn = !1, Hn = 0, Z.value = !1;
|
|
723
725
|
}
|
|
724
|
-
function
|
|
725
|
-
|
|
726
|
-
|
|
726
|
+
function Gn(e) {
|
|
727
|
+
Ln || (clearTimeout(zn), zn = setTimeout(() => {
|
|
728
|
+
Kn();
|
|
727
729
|
}, e));
|
|
728
730
|
}
|
|
729
|
-
async function
|
|
730
|
-
if (
|
|
731
|
-
|
|
731
|
+
async function Kn() {
|
|
732
|
+
if (Ln || Un) return;
|
|
733
|
+
Un = !0;
|
|
732
734
|
let e;
|
|
733
735
|
try {
|
|
734
736
|
e = await zt();
|
|
735
737
|
} finally {
|
|
736
|
-
|
|
738
|
+
Un = !1;
|
|
737
739
|
}
|
|
738
|
-
if (
|
|
739
|
-
if (e === "caught-up" && (Z.value = !1,
|
|
740
|
-
|
|
740
|
+
if (Ln) return;
|
|
741
|
+
if (e === "caught-up" && (Z.value = !1, Sr()), Q.isActive.value) {
|
|
742
|
+
Bn = void 0, Vn = !1, Hn = 0, Gn(rt);
|
|
741
743
|
return;
|
|
742
744
|
}
|
|
743
|
-
|
|
744
|
-
let t = Date.now() -
|
|
745
|
-
if (e === "caught-up" && t >= (
|
|
746
|
-
|
|
745
|
+
Bn === void 0 && (Bn = Date.now(), Vn = !!Q.error.value);
|
|
746
|
+
let t = Date.now() - Bn;
|
|
747
|
+
if (e === "caught-up" && t >= (Vn ? at : it) || t >= ot) {
|
|
748
|
+
Wn(), Cr();
|
|
747
749
|
return;
|
|
748
750
|
}
|
|
749
|
-
let n =
|
|
750
|
-
|
|
751
|
+
let n = Rn[Math.min(Hn, Rn.length - 1)];
|
|
752
|
+
Hn += 1, Gn(n);
|
|
751
753
|
}
|
|
752
|
-
let
|
|
753
|
-
|
|
754
|
-
},
|
|
754
|
+
let qn = (e = 1200) => {
|
|
755
|
+
Gn(e);
|
|
756
|
+
}, Jn, Q = Ne({
|
|
755
757
|
fetchGrant: async () => {
|
|
756
|
-
|
|
757
|
-
let e = await
|
|
758
|
-
deviceContext:
|
|
759
|
-
externalContext:
|
|
760
|
-
pageTools:
|
|
761
|
-
...
|
|
758
|
+
Jn = R.voicePageTools();
|
|
759
|
+
let e = await G.value.createVoiceSession(L.agentId, R.localChatId, {
|
|
760
|
+
deviceContext: R.buildDeviceContext(),
|
|
761
|
+
externalContext: R.externalContext,
|
|
762
|
+
pageTools: Jn?.declaration,
|
|
763
|
+
...R.confirmationMode === "automatic" && { confirmations: "automatic" }
|
|
762
764
|
});
|
|
763
|
-
return e.chatId !==
|
|
765
|
+
return e.chatId !== R.localChatId && (R.localChatId = e.chatId), e;
|
|
764
766
|
},
|
|
765
|
-
closeGrant: (e) =>
|
|
766
|
-
clientTools: () =>
|
|
767
|
+
closeGrant: (e) => G.value.closeVoiceSession(L.agentId, e),
|
|
768
|
+
clientTools: () => Jn?.clientTools,
|
|
767
769
|
onTranscript: (e) => {
|
|
768
|
-
e.role === "user" ? (Z.value = !0,
|
|
770
|
+
e.role === "user" ? (Z.value = !0, xr(), Bt({
|
|
769
771
|
id: `${a}user-${r()}`,
|
|
770
772
|
role: "user",
|
|
771
773
|
parts: [{
|
|
@@ -775,53 +777,53 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
775
777
|
})) : Z.value = !1;
|
|
776
778
|
},
|
|
777
779
|
onTurnEnd: () => {
|
|
778
|
-
|
|
780
|
+
qn();
|
|
779
781
|
}
|
|
780
782
|
});
|
|
781
|
-
|
|
782
|
-
e ||
|
|
783
|
-
}),
|
|
783
|
+
F(() => Q.isActive.value, (e) => {
|
|
784
|
+
e || R.cancelVoicePageCalls();
|
|
785
|
+
}), F(() => Q.error.value, (e) => {
|
|
784
786
|
e && (Z.value = !1);
|
|
785
787
|
});
|
|
786
|
-
let
|
|
788
|
+
let Yn = S(() => De.value?.enabled === !0), Xn = S(() => Q.error.value ? "error" : Q.isConnecting.value ? "connecting" : Q.isSpeaking.value ? "speaking" : Q.isActive.value ? "listening" : "idle"), Zn = S(() => {
|
|
787
789
|
let e = Q.error.value;
|
|
788
790
|
if (e) return /took too long/i.test(e) ? J("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? J("message.voiceNoAnswer") : J("message.voiceInterrupted");
|
|
789
|
-
}),
|
|
790
|
-
|
|
791
|
-
}, er = async () => {
|
|
792
|
-
Z.value = !1, await Q.stop(), !Fn && Gn(0);
|
|
793
|
-
}, tr = () => {
|
|
794
|
-
Q.dismissError();
|
|
791
|
+
}), Qn = S(() => Q.isSpeaking.value ? "output" : "input"), $n = () => Q.readLevel(Qn.value), er = () => Q.readSpectrum(Qn.value), tr = async () => {
|
|
792
|
+
In.value = !1, await Q.start(), Q.isActive.value && (Wn(), Gn(rt));
|
|
795
793
|
}, nr = async () => {
|
|
796
|
-
|
|
797
|
-
}, rr = (
|
|
798
|
-
|
|
794
|
+
Z.value = !1, await Q.stop(), !Ln && qn(0);
|
|
795
|
+
}, rr = () => {
|
|
796
|
+
Q.dismissError();
|
|
797
|
+
}, ir = async () => {
|
|
798
|
+
Q.dismissError(), await Q.stop(), await tr();
|
|
799
|
+
}, ar = (e) => e?.toolCallId ?? "", or = M(/* @__PURE__ */ new Set()), sr = (e) => or.value.has(ar(e)), cr = M(/* @__PURE__ */ new Map()), lr = (e, t) => Q.isActive.value ? (Q.sendUserMessage(t) && (or.value = new Set(or.value).add(ar(e)), qn()), !0) : !1, ur = (e, t, n) => {
|
|
800
|
+
lr(t, l(t, n)) || Mt({
|
|
799
801
|
tool: e,
|
|
800
|
-
toolCallId:
|
|
802
|
+
toolCallId: ar(t),
|
|
801
803
|
output: n
|
|
802
804
|
});
|
|
803
|
-
},
|
|
805
|
+
}, dr = (e) => {
|
|
804
806
|
let t = e.confirmed ? J("message.voiceConfirmed") : J("message.voiceCancelled");
|
|
805
|
-
|
|
807
|
+
lr({ toolCallId: e.toolCallId }, t) ? or.value.has(e.toolCallId) && (cr.value = new Map(cr.value).set(e.toolCallId, e.confirmed)) : Mt({
|
|
806
808
|
tool: "requestConfirm",
|
|
807
809
|
toolCallId: e.toolCallId,
|
|
808
810
|
output: e.confirmed ? "confirmed" : "cancelled"
|
|
809
811
|
});
|
|
810
|
-
},
|
|
812
|
+
}, fr = S(() => {
|
|
811
813
|
let e = /* @__PURE__ */ new Map();
|
|
812
|
-
for (let t of
|
|
814
|
+
for (let t of V.value) for (let n of t.parts) {
|
|
813
815
|
let { type: t, state: r, output: i } = n;
|
|
814
816
|
Cn.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
|
|
815
817
|
}
|
|
816
818
|
return e;
|
|
817
|
-
}),
|
|
819
|
+
}), pr = S(() => {
|
|
818
820
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
819
821
|
if (t && n) {
|
|
820
822
|
let r = t.toLowerCase();
|
|
821
823
|
e.set(r, (e.get(r) ?? /* @__PURE__ */ new Set()).add(n));
|
|
822
824
|
}
|
|
823
825
|
};
|
|
824
|
-
for (let e of
|
|
826
|
+
for (let e of V.value) for (let n of e.parts) {
|
|
825
827
|
if (s(n)) {
|
|
826
828
|
t(n.filename, c(n)?.storedFileName);
|
|
827
829
|
continue;
|
|
@@ -830,48 +832,48 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
830
832
|
Cn.has(e) && r === "output-available" && i?.filename && t(u(i.filename, i.version), i.fileId);
|
|
831
833
|
}
|
|
832
834
|
return e;
|
|
833
|
-
}), $ = S(() =>
|
|
834
|
-
let t = (
|
|
835
|
-
|
|
836
|
-
}),
|
|
837
|
-
|
|
838
|
-
},
|
|
835
|
+
}), $ = S(() => Ue.value ? void 0 : (e) => {
|
|
836
|
+
let t = (pr.value.get(e.filename.toLowerCase())?.size ?? 0) > 1;
|
|
837
|
+
U.value = J(t ? "messagePart.chatFileRestoreRequestById" : "messagePart.chatFileRestoreRequest", e), Ct();
|
|
838
|
+
}), mr = (e, t) => {
|
|
839
|
+
lr(e, t) || (U.value = t, Ct());
|
|
840
|
+
}, hr = (e, t) => {
|
|
839
841
|
let n = t.error ? J("message.voiceLocationRefused") : J("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
|
|
840
|
-
|
|
842
|
+
lr(e, n) || Mt({
|
|
841
843
|
tool: "requestGeolocation",
|
|
842
|
-
toolCallId:
|
|
844
|
+
toolCallId: ar(e),
|
|
843
845
|
output: t
|
|
844
846
|
});
|
|
845
|
-
},
|
|
846
|
-
|
|
847
|
+
}, gr = (e, t) => {
|
|
848
|
+
lr(e, J("message.voiceConnectionDone")) || Mt({
|
|
847
849
|
tool: "requestOAuthConnection",
|
|
848
|
-
toolCallId:
|
|
850
|
+
toolCallId: ar(e),
|
|
849
851
|
output: {
|
|
850
852
|
connected: !0,
|
|
851
853
|
mcpServerId: t
|
|
852
854
|
}
|
|
853
855
|
});
|
|
854
|
-
},
|
|
855
|
-
|
|
856
|
+
}, _r = () => {
|
|
857
|
+
In.value = !In.value, Q.setMuted(In.value);
|
|
856
858
|
};
|
|
857
859
|
de(() => {
|
|
858
|
-
|
|
860
|
+
Ln = !0, Wn();
|
|
859
861
|
});
|
|
860
|
-
let { pendingWakeup:
|
|
861
|
-
agentId: () =>
|
|
862
|
-
chatId: () =>
|
|
863
|
-
apiClient: () =>
|
|
864
|
-
messages: () =>
|
|
862
|
+
let { pendingWakeup: vr, isStopping: yr, stop: br, spokenTurnStarted: xr, spokenTurnsWritten: Sr, forgetSpokenTurns: Cr } = Ve({
|
|
863
|
+
agentId: () => L.agentId,
|
|
864
|
+
chatId: () => R.localChatId,
|
|
865
|
+
apiClient: () => G.value,
|
|
866
|
+
messages: () => V.value,
|
|
865
867
|
refreshMessages: zt,
|
|
866
|
-
status: () =>
|
|
868
|
+
status: () => H.value.status
|
|
867
869
|
});
|
|
868
870
|
return (t, n) => {
|
|
869
871
|
let r = y;
|
|
870
|
-
return
|
|
872
|
+
return j(), T("div", {
|
|
871
873
|
ref_key: "chatViewEl",
|
|
872
874
|
ref: rn,
|
|
873
875
|
class: k(["pk-chatbot-view-chat", {
|
|
874
|
-
"pk-chatbot-view-chat--dragover":
|
|
876
|
+
"pk-chatbot-view-chat--dragover": P(Fn) && K.value?.enabled,
|
|
875
877
|
"pk-chatbot-view-chat--empty": tn.value,
|
|
876
878
|
"pk-chatbot-view-chat--with-preview": xn.value && !on.value
|
|
877
879
|
}])
|
|
@@ -880,61 +882,61 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
880
882
|
name: "pk-chatbot-view-chat-fade",
|
|
881
883
|
mode: "out-in"
|
|
882
884
|
}, {
|
|
883
|
-
default:
|
|
885
|
+
default: I(() => [tn.value ? (j(), C(te, {
|
|
884
886
|
key: 0,
|
|
885
|
-
greeting:
|
|
886
|
-
logo:
|
|
887
|
-
name:
|
|
887
|
+
greeting: P(nn),
|
|
888
|
+
logo: P(z)?.logo,
|
|
889
|
+
name: P(R).name
|
|
888
890
|
}, null, 8, [
|
|
889
891
|
"greeting",
|
|
890
892
|
"logo",
|
|
891
893
|
"name"
|
|
892
|
-
])) : (
|
|
894
|
+
])) : (j(), C(e, {
|
|
893
895
|
key: 1,
|
|
894
896
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
895
897
|
interactive: "",
|
|
896
|
-
messages:
|
|
897
|
-
"confirm-verdicts-on-call":
|
|
898
|
-
status:
|
|
899
|
-
error:
|
|
900
|
-
"main-color":
|
|
901
|
-
"text-color":
|
|
902
|
-
"revised-answers":
|
|
903
|
-
actions:
|
|
904
|
-
"message-feedbacks":
|
|
905
|
-
"feedback-message-id":
|
|
906
|
-
"feedback-loading":
|
|
907
|
-
"feedback-submitted":
|
|
908
|
-
"feedback-error":
|
|
909
|
-
"show-extended-steps":
|
|
910
|
-
"hide-reasoning":
|
|
898
|
+
messages: P(V),
|
|
899
|
+
"confirm-verdicts-on-call": cr.value,
|
|
900
|
+
status: P(H).status,
|
|
901
|
+
error: P(H).error,
|
|
902
|
+
"main-color": P(z)?.mainColor,
|
|
903
|
+
"text-color": P(z)?.textColor,
|
|
904
|
+
"revised-answers": P(ke),
|
|
905
|
+
actions: P(Oe),
|
|
906
|
+
"message-feedbacks": P(Ae),
|
|
907
|
+
"feedback-message-id": P(je)?.id,
|
|
908
|
+
"feedback-loading": P(Pe),
|
|
909
|
+
"feedback-submitted": P(Fe),
|
|
910
|
+
"feedback-error": P(Le),
|
|
911
|
+
"show-extended-steps": P(z)?.showExtendedSteps,
|
|
912
|
+
"hide-reasoning": P(z)?.showReasoning === !1,
|
|
911
913
|
"awaiting-spoken-answer": Z.value,
|
|
912
914
|
"host-working": qt.value,
|
|
913
|
-
"host-confirmation":
|
|
914
|
-
"is-dark":
|
|
915
|
+
"host-confirmation": P(st),
|
|
916
|
+
"is-dark": P(qe),
|
|
915
917
|
"show-scroll-to-bottom": o.modifier === "fullscreen",
|
|
916
|
-
onFeedbackSubmit: n[0] ||= (e) =>
|
|
917
|
-
onFeedbackClose: n[1] ||= (e) =>
|
|
918
|
-
onRegenerate:
|
|
919
|
-
onAutoRetry:
|
|
920
|
-
onResetChat:
|
|
921
|
-
onShowInfo: n[2] ||= (e) =>
|
|
922
|
-
onRevise: n[3] ||= (e) =>
|
|
923
|
-
onUpvote:
|
|
924
|
-
onDownvote:
|
|
925
|
-
onFeedback:
|
|
926
|
-
onApprovalRespond:
|
|
927
|
-
onConfirmRespond:
|
|
928
|
-
onHostConfirmRespond:
|
|
918
|
+
onFeedbackSubmit: n[0] ||= (e) => P(kt)(e),
|
|
919
|
+
onFeedbackClose: n[1] ||= (e) => je.value = void 0,
|
|
920
|
+
onRegenerate: P(Tt),
|
|
921
|
+
onAutoRetry: P(Tt),
|
|
922
|
+
onResetChat: P(jt),
|
|
923
|
+
onShowInfo: n[2] ||= (e) => we("show-info", e),
|
|
924
|
+
onRevise: n[3] ||= (e) => we("revise", e),
|
|
925
|
+
onUpvote: P(Et),
|
|
926
|
+
onDownvote: P(Dt),
|
|
927
|
+
onFeedback: P(Ot),
|
|
928
|
+
onApprovalRespond: P(Nt),
|
|
929
|
+
onConfirmRespond: dr,
|
|
930
|
+
onHostConfirmRespond: P(Ht)
|
|
929
931
|
}, {
|
|
930
|
-
"tool-showContactForm":
|
|
932
|
+
"tool-showContactForm": I(({ part: e }) => [D(P(b), {
|
|
931
933
|
part: e,
|
|
932
|
-
readonly: !
|
|
933
|
-
submitted:
|
|
934
|
-
loading:
|
|
935
|
-
error:
|
|
936
|
-
"privacy-policy-notice":
|
|
937
|
-
onSubmit:
|
|
934
|
+
readonly: !P(W),
|
|
935
|
+
submitted: P(Re),
|
|
936
|
+
loading: P(ze),
|
|
937
|
+
error: P(Be),
|
|
938
|
+
"privacy-policy-notice": P(z)?.privacyPolicyNotice,
|
|
939
|
+
onSubmit: P(At)
|
|
938
940
|
}, null, 8, [
|
|
939
941
|
"part",
|
|
940
942
|
"readonly",
|
|
@@ -944,20 +946,20 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
944
946
|
"privacy-policy-notice",
|
|
945
947
|
"onSubmit"
|
|
946
948
|
])]),
|
|
947
|
-
"tool-showSuggestedReply":
|
|
949
|
+
"tool-showSuggestedReply": I(({ part: e }) => [D(P(ae), {
|
|
948
950
|
part: e,
|
|
949
|
-
onSelect: (t) =>
|
|
951
|
+
onSelect: (t) => mr(e, t)
|
|
950
952
|
}, null, 8, ["part", "onSelect"])]),
|
|
951
|
-
"tool-showSources":
|
|
953
|
+
"tool-showSources": I(({ part: e }) => [D(P(oe), {
|
|
952
954
|
part: e,
|
|
953
|
-
"on-expand-context":
|
|
954
|
-
"on-download":
|
|
955
|
+
"on-expand-context": Nn,
|
|
956
|
+
"on-download": Pn
|
|
955
957
|
}, null, 8, ["part"])]),
|
|
956
|
-
"tool-showForm":
|
|
957
|
-
default:
|
|
958
|
+
"tool-showForm": I(({ part: e }) => [D(x, { mode: "out-in" }, {
|
|
959
|
+
default: I(() => [D(P(_), {
|
|
958
960
|
part: e,
|
|
959
|
-
answered:
|
|
960
|
-
onSelect: (t) =>
|
|
961
|
+
answered: sr(e),
|
|
962
|
+
onSelect: (t) => ur("showForm", e, t)
|
|
961
963
|
}, null, 8, [
|
|
962
964
|
"part",
|
|
963
965
|
"answered",
|
|
@@ -965,12 +967,12 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
965
967
|
])]),
|
|
966
968
|
_: 2
|
|
967
969
|
}, 1024)]),
|
|
968
|
-
"tool-showMultipleChoice":
|
|
969
|
-
default:
|
|
970
|
+
"tool-showMultipleChoice": I(({ part: e }) => [D(x, { mode: "out-in" }, {
|
|
971
|
+
default: I(() => [D(P(_), {
|
|
970
972
|
part: e,
|
|
971
973
|
"allow-custom-answer": "",
|
|
972
|
-
answered:
|
|
973
|
-
onSelect: (t) =>
|
|
974
|
+
answered: sr(e),
|
|
975
|
+
onSelect: (t) => ur("showMultipleChoice", e, t)
|
|
974
976
|
}, null, 8, [
|
|
975
977
|
"part",
|
|
976
978
|
"answered",
|
|
@@ -978,12 +980,12 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
978
980
|
])]),
|
|
979
981
|
_: 2
|
|
980
982
|
}, 1024)]),
|
|
981
|
-
"tool-requestOAuthConnection":
|
|
983
|
+
"tool-requestOAuthConnection": I(({ part: e }) => [D(P(le), {
|
|
982
984
|
part: e,
|
|
983
|
-
"backend-url":
|
|
984
|
-
"resolve-connection": (e) =>
|
|
985
|
-
"check-connection": (e) =>
|
|
986
|
-
onConnected: (t) =>
|
|
985
|
+
"backend-url": P(W),
|
|
986
|
+
"resolve-connection": (e) => P(G).getOAuthAuthorizeUrl(L.agentId, e),
|
|
987
|
+
"check-connection": (e) => P(G).getOAuthConnectionStatus(L.agentId, e),
|
|
988
|
+
onConnected: (t) => gr(e, t)
|
|
987
989
|
}, null, 8, [
|
|
988
990
|
"part",
|
|
989
991
|
"backend-url",
|
|
@@ -991,98 +993,98 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
991
993
|
"check-connection",
|
|
992
994
|
"onConnected"
|
|
993
995
|
])]),
|
|
994
|
-
"tool-requestGeolocation":
|
|
996
|
+
"tool-requestGeolocation": I(({ part: e }) => [D(P(se), {
|
|
995
997
|
part: e,
|
|
996
|
-
"call-live":
|
|
997
|
-
"reverse-geocode": (e, t) =>
|
|
998
|
-
onResult: (t) =>
|
|
998
|
+
"call-live": P(Q).isActive.value,
|
|
999
|
+
"reverse-geocode": (e, t) => P(G).reverseGeocode(e, t),
|
|
1000
|
+
onResult: (t) => hr(e, t)
|
|
999
1001
|
}, null, 8, [
|
|
1000
1002
|
"part",
|
|
1001
1003
|
"call-live",
|
|
1002
1004
|
"reverse-geocode",
|
|
1003
1005
|
"onResult"
|
|
1004
1006
|
])]),
|
|
1005
|
-
"tool-showLocation":
|
|
1007
|
+
"tool-showLocation": I(({ part: e }) => [D(P(ue), {
|
|
1006
1008
|
part: e,
|
|
1007
|
-
"is-dark":
|
|
1008
|
-
"main-color":
|
|
1009
|
-
"forward-geocode": (e, t) =>
|
|
1009
|
+
"is-dark": P(qe),
|
|
1010
|
+
"main-color": P(z)?.mainColor,
|
|
1011
|
+
"forward-geocode": (e, t) => P(G).forwardGeocode(e, t)
|
|
1010
1012
|
}, null, 8, [
|
|
1011
1013
|
"part",
|
|
1012
1014
|
"is-dark",
|
|
1013
1015
|
"main-color",
|
|
1014
1016
|
"forward-geocode"
|
|
1015
1017
|
])]),
|
|
1016
|
-
"tool-showChart":
|
|
1018
|
+
"tool-showChart": I(({ part: e }) => [D(P(fe), {
|
|
1017
1019
|
part: e,
|
|
1018
|
-
"is-dark":
|
|
1020
|
+
"is-dark": P(qe)
|
|
1019
1021
|
}, null, 8, ["part", "is-dark"])]),
|
|
1020
|
-
"tool-showDiagram":
|
|
1022
|
+
"tool-showDiagram": I(({ part: e }) => [D(P(pe), {
|
|
1021
1023
|
part: e,
|
|
1022
|
-
"is-dark":
|
|
1024
|
+
"is-dark": P(qe)
|
|
1023
1025
|
}, null, 8, ["part", "is-dark"])]),
|
|
1024
|
-
"tool-editSpreadsheet":
|
|
1025
|
-
key:
|
|
1026
|
+
"tool-editSpreadsheet": I(({ part: e }) => [(j(), C(P(A), {
|
|
1027
|
+
key: P(p)(e),
|
|
1026
1028
|
part: e,
|
|
1027
1029
|
"file-url": q,
|
|
1028
1030
|
preview: yn,
|
|
1029
|
-
"latest-versions":
|
|
1031
|
+
"latest-versions": fr.value,
|
|
1030
1032
|
restore: $.value
|
|
1031
1033
|
}, null, 8, [
|
|
1032
1034
|
"part",
|
|
1033
1035
|
"latest-versions",
|
|
1034
1036
|
"restore"
|
|
1035
1037
|
]))]),
|
|
1036
|
-
"tool-editWordDocument":
|
|
1037
|
-
key:
|
|
1038
|
+
"tool-editWordDocument": I(({ part: e }) => [(j(), C(P(A), {
|
|
1039
|
+
key: P(p)(e),
|
|
1038
1040
|
part: e,
|
|
1039
1041
|
"file-url": q,
|
|
1040
1042
|
preview: yn,
|
|
1041
|
-
"latest-versions":
|
|
1043
|
+
"latest-versions": fr.value,
|
|
1042
1044
|
restore: $.value
|
|
1043
1045
|
}, null, 8, [
|
|
1044
1046
|
"part",
|
|
1045
1047
|
"latest-versions",
|
|
1046
1048
|
"restore"
|
|
1047
1049
|
]))]),
|
|
1048
|
-
"tool-createSpreadsheet":
|
|
1049
|
-
key:
|
|
1050
|
+
"tool-createSpreadsheet": I(({ part: e }) => [(j(), C(P(A), {
|
|
1051
|
+
key: P(p)(e),
|
|
1050
1052
|
part: e,
|
|
1051
1053
|
"file-url": q,
|
|
1052
1054
|
preview: yn,
|
|
1053
|
-
"latest-versions":
|
|
1055
|
+
"latest-versions": fr.value,
|
|
1054
1056
|
restore: $.value
|
|
1055
1057
|
}, null, 8, [
|
|
1056
1058
|
"part",
|
|
1057
1059
|
"latest-versions",
|
|
1058
1060
|
"restore"
|
|
1059
1061
|
]))]),
|
|
1060
|
-
"tool-createWordDocument":
|
|
1061
|
-
key:
|
|
1062
|
+
"tool-createWordDocument": I(({ part: e }) => [(j(), C(P(A), {
|
|
1063
|
+
key: P(p)(e),
|
|
1062
1064
|
part: e,
|
|
1063
1065
|
"file-url": q,
|
|
1064
1066
|
preview: yn,
|
|
1065
|
-
"latest-versions":
|
|
1067
|
+
"latest-versions": fr.value,
|
|
1066
1068
|
restore: $.value
|
|
1067
1069
|
}, null, 8, [
|
|
1068
1070
|
"part",
|
|
1069
1071
|
"latest-versions",
|
|
1070
1072
|
"restore"
|
|
1071
1073
|
]))]),
|
|
1072
|
-
"tool-shareDocument":
|
|
1073
|
-
key:
|
|
1074
|
+
"tool-shareDocument": I(({ part: e }) => [(j(), C(P(he), {
|
|
1075
|
+
key: P(p)(e),
|
|
1074
1076
|
part: e,
|
|
1075
|
-
"on-download":
|
|
1077
|
+
"on-download": Pn
|
|
1076
1078
|
}, null, 8, ["part"]))]),
|
|
1077
1079
|
_: 1
|
|
1078
1080
|
}, 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.hide-reasoning.awaiting-spoken-answer.host-working.host-confirmation.is-dark.show-scroll-to-bottom.onRegenerate.onAutoRetry.onResetChat.onUpvote.onDownvote.onFeedback.onApprovalRespond.onHostConfirmRespond".split(".")))]),
|
|
1079
1081
|
_: 1
|
|
1080
1082
|
}),
|
|
1081
|
-
|
|
1083
|
+
P(pt).length ? (j(), C(ee, {
|
|
1082
1084
|
key: 0,
|
|
1083
|
-
messages:
|
|
1084
|
-
onEdit:
|
|
1085
|
-
onRemove:
|
|
1085
|
+
messages: P(pt),
|
|
1086
|
+
onEdit: P(Ut),
|
|
1087
|
+
onRemove: P(Wt)
|
|
1086
1088
|
}, null, 8, [
|
|
1087
1089
|
"messages",
|
|
1088
1090
|
"onEdit",
|
|
@@ -1090,13 +1092,13 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
1090
1092
|
])) : w("", !0),
|
|
1091
1093
|
E("div", Ze, [
|
|
1092
1094
|
D(x, { name: "pk-chatbot-view-chat-fade" }, {
|
|
1093
|
-
default:
|
|
1095
|
+
default: I(() => [tn.value ? (j(), C(Te, {
|
|
1094
1096
|
key: 0,
|
|
1095
1097
|
class: "pk-chatbot-view-chat__aurora",
|
|
1096
1098
|
"source-selector": ".pk-chatbot-input__form",
|
|
1097
|
-
"main-color":
|
|
1098
|
-
tones:
|
|
1099
|
-
"second-color":
|
|
1099
|
+
"main-color": P(z)?.mainColor,
|
|
1100
|
+
tones: P(z)?.glowTones,
|
|
1101
|
+
"second-color": P(z)?.glowSecondColor
|
|
1100
1102
|
}, null, 8, [
|
|
1101
1103
|
"main-color",
|
|
1102
1104
|
"tones",
|
|
@@ -1104,78 +1106,78 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
1104
1106
|
])) : w("", !0)]),
|
|
1105
1107
|
_: 1
|
|
1106
1108
|
}),
|
|
1107
|
-
|
|
1109
|
+
P(vr) && !P(Ue) ? (j(), C(ne, {
|
|
1108
1110
|
key: 0,
|
|
1109
|
-
pending:
|
|
1110
|
-
stopping:
|
|
1111
|
-
onStop:
|
|
1111
|
+
pending: P(vr),
|
|
1112
|
+
stopping: P(yr),
|
|
1113
|
+
onStop: P(br)
|
|
1112
1114
|
}, null, 8, [
|
|
1113
1115
|
"pending",
|
|
1114
1116
|
"stopping",
|
|
1115
1117
|
"onStop"
|
|
1116
1118
|
])) : w("", !0),
|
|
1117
|
-
|
|
1119
|
+
P(Ue) ? (j(), T("div", Qe, N(P(J)("message.chatErrorConversationBlocked")), 1)) : Xn.value === "idle" ? (j(), C(v, {
|
|
1118
1120
|
key: 3,
|
|
1119
1121
|
ref_key: "inputEl",
|
|
1120
1122
|
ref: bt,
|
|
1121
|
-
modelValue:
|
|
1122
|
-
"onUpdate:modelValue": n[4] ||= (e) => ce(
|
|
1123
|
-
"pending-attachments":
|
|
1124
|
-
"onUpdate:pendingAttachments": n[5] ||= (e) => ce(
|
|
1125
|
-
placeholder:
|
|
1126
|
-
"dismissable-notice":
|
|
1123
|
+
modelValue: P(U),
|
|
1124
|
+
"onUpdate:modelValue": n[4] ||= (e) => ce(U) ? U.value = e : null,
|
|
1125
|
+
"pending-attachments": P(We),
|
|
1126
|
+
"onUpdate:pendingAttachments": n[5] ||= (e) => ce(We) ? We.value = e : null,
|
|
1127
|
+
placeholder: P(He),
|
|
1128
|
+
"dismissable-notice": P($t) && P(H).messages.length <= 1 ? P($t) : void 0,
|
|
1127
1129
|
"page-notice": Xt.value,
|
|
1128
1130
|
status: Jt.value,
|
|
1129
|
-
"max-message-length":
|
|
1131
|
+
"max-message-length": P(z)?.maxMessageLength,
|
|
1130
1132
|
"file-upload": K.value,
|
|
1131
|
-
"attachment-limit-reached":
|
|
1133
|
+
"attachment-limit-reached": P(Ge),
|
|
1132
1134
|
"attachment-notice": Zt.value,
|
|
1133
|
-
"voice-enabled":
|
|
1134
|
-
"queue-enabled":
|
|
1135
|
+
"voice-enabled": Yn.value,
|
|
1136
|
+
"queue-enabled": P(ft),
|
|
1135
1137
|
"answer-notices": Qt.value,
|
|
1136
|
-
"pointer-available":
|
|
1137
|
-
pointing:
|
|
1138
|
+
"pointer-available": P(_t),
|
|
1139
|
+
pointing: P(vt),
|
|
1138
1140
|
pointer: xt.value,
|
|
1139
|
-
"automatic-confirmations":
|
|
1141
|
+
"automatic-confirmations": P(dt) === "automatic",
|
|
1140
1142
|
"editable-images": "",
|
|
1141
1143
|
"retryable-attachments": "",
|
|
1142
|
-
onPoint: n[6] ||= (e) =>
|
|
1144
|
+
onPoint: n[6] ||= (e) => P(R).pagePointerStart?.(),
|
|
1143
1145
|
onRemovePointer: n[7] ||= (e) => gt.value = void 0,
|
|
1144
|
-
onManualConfirmations: n[8] ||= (e) =>
|
|
1145
|
-
onStopGeneration:
|
|
1146
|
-
onSubmit:
|
|
1147
|
-
onFileSelect:
|
|
1148
|
-
onRemoveAttachment:
|
|
1149
|
-
onReplaceAttachment:
|
|
1150
|
-
onRetryAttachment:
|
|
1151
|
-
onDismissAttachmentNotice:
|
|
1152
|
-
onDismissPageNotice:
|
|
1153
|
-
onOpenAnswerNotice:
|
|
1154
|
-
onDismissAnswerNotice:
|
|
1155
|
-
onVoiceStart:
|
|
1146
|
+
onManualConfirmations: n[8] ||= (e) => P(R).setConfirmationMode("manual"),
|
|
1147
|
+
onStopGeneration: P(wt),
|
|
1148
|
+
onSubmit: P(Ct),
|
|
1149
|
+
onFileSelect: P(Pt),
|
|
1150
|
+
onRemoveAttachment: P(Ft),
|
|
1151
|
+
onReplaceAttachment: P(It),
|
|
1152
|
+
onRetryAttachment: P(Lt),
|
|
1153
|
+
onDismissAttachmentNotice: P(Rt),
|
|
1154
|
+
onDismissPageNotice: P(Vt),
|
|
1155
|
+
onOpenAnswerNotice: P(Gt),
|
|
1156
|
+
onDismissAnswerNotice: P(Kt),
|
|
1157
|
+
onVoiceStart: tr
|
|
1156
1158
|
}, ie({ _: 2 }, [o.modifier === "fullscreen" ? {
|
|
1157
1159
|
name: "prepend",
|
|
1158
|
-
fn:
|
|
1160
|
+
fn: I(() => [E("span", $e, [D(g, {
|
|
1159
1161
|
class: "pk-chatbot-view-chat__agent-chip-avatar",
|
|
1160
|
-
"img-src":
|
|
1161
|
-
name:
|
|
1162
|
-
}, null, 8, ["img-src", "name"]),
|
|
1162
|
+
"img-src": P(z)?.logo,
|
|
1163
|
+
name: P(R).name
|
|
1164
|
+
}, null, 8, ["img-src", "name"]), P(R).name ? (j(), T("strong", et, N(P(R).name), 1)) : w("", !0)])]),
|
|
1163
1165
|
key: "0"
|
|
1164
|
-
} : void 0]), 1032, /* @__PURE__ */ "modelValue.pending-attachments.placeholder.dismissable-notice.page-notice.status.max-message-length.file-upload.attachment-limit-reached.attachment-notice.voice-enabled.queue-enabled.answer-notices.pointer-available.pointing.pointer.automatic-confirmations.onStopGeneration.onSubmit.onFileSelect.onRemoveAttachment.onReplaceAttachment.onRetryAttachment.onDismissAttachmentNotice.onDismissPageNotice.onOpenAnswerNotice.onDismissAnswerNotice".split("."))) : (
|
|
1166
|
+
} : void 0]), 1032, /* @__PURE__ */ "modelValue.pending-attachments.placeholder.dismissable-notice.page-notice.status.max-message-length.file-upload.attachment-limit-reached.attachment-notice.voice-enabled.queue-enabled.answer-notices.pointer-available.pointing.pointer.automatic-confirmations.onStopGeneration.onSubmit.onFileSelect.onRemoveAttachment.onReplaceAttachment.onRetryAttachment.onDismissAttachmentNotice.onDismissPageNotice.onOpenAnswerNotice.onDismissAnswerNotice".split("."))) : (j(), C(Me, {
|
|
1165
1167
|
key: 2,
|
|
1166
|
-
state:
|
|
1167
|
-
sample:
|
|
1168
|
-
spectrum:
|
|
1169
|
-
"remaining-seconds":
|
|
1170
|
-
muted:
|
|
1171
|
-
error:
|
|
1172
|
-
"raw-error":
|
|
1173
|
-
live:
|
|
1168
|
+
state: Xn.value,
|
|
1169
|
+
sample: $n,
|
|
1170
|
+
spectrum: er,
|
|
1171
|
+
"remaining-seconds": P(Q).remainingSeconds.value,
|
|
1172
|
+
muted: In.value,
|
|
1173
|
+
error: Zn.value,
|
|
1174
|
+
"raw-error": P(Q).error.value,
|
|
1175
|
+
live: P(Q).isActive.value,
|
|
1174
1176
|
class: "pk-chatbot-view-chat__voice",
|
|
1175
|
-
onToggleMute:
|
|
1176
|
-
onHangUp:
|
|
1177
|
-
onRetry:
|
|
1178
|
-
onDismiss:
|
|
1177
|
+
onToggleMute: _r,
|
|
1178
|
+
onHangUp: nr,
|
|
1179
|
+
onRetry: ir,
|
|
1180
|
+
onDismiss: rr
|
|
1179
1181
|
}, null, 8, [
|
|
1180
1182
|
"state",
|
|
1181
1183
|
"remaining-seconds",
|
|
@@ -1186,17 +1188,17 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
1186
1188
|
]))
|
|
1187
1189
|
]),
|
|
1188
1190
|
D(x, null, {
|
|
1189
|
-
default:
|
|
1191
|
+
default: I(() => [P(Fn) && K.value?.enabled ? (j(), T("div", tt, [D(r, {
|
|
1190
1192
|
name: "ri:upload-cloud-2-line",
|
|
1191
1193
|
class: "pk-chatbot-view-chat__drop-overlay-icon"
|
|
1192
|
-
}), E("span", null,
|
|
1194
|
+
}), E("span", null, N(P(J)("action.dropFile")), 1)])) : w("", !0)]),
|
|
1193
1195
|
_: 1
|
|
1194
1196
|
}),
|
|
1195
|
-
xn.value ? (
|
|
1197
|
+
xn.value ? (j(), C(re, {
|
|
1196
1198
|
key: 1,
|
|
1197
1199
|
to: sn.value,
|
|
1198
1200
|
disabled: !on.value
|
|
1199
|
-
}, [E("aside", { class: k(["pk-chatbot-view-chat__preview", { "pk-chatbot-view-chat__preview--docked": on.value }]) }, [
|
|
1201
|
+
}, [E("aside", { class: k(["pk-chatbot-view-chat__preview", { "pk-chatbot-view-chat__preview--docked": on.value }]) }, [P(Y) ? (j(), C(P(ge), {
|
|
1200
1202
|
key: 0,
|
|
1201
1203
|
mode: X.value.mode,
|
|
1202
1204
|
"onUpdate:mode": n[9] ||= (e) => X.value.mode = e,
|
|
@@ -1206,24 +1208,24 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
1206
1208
|
"onUpdate:zoom": n[11] ||= (e) => X.value.zoom = e,
|
|
1207
1209
|
fit: X.value.fit,
|
|
1208
1210
|
"onUpdate:fit": n[12] ||= (e) => X.value.fit = e,
|
|
1209
|
-
kind:
|
|
1210
|
-
filename:
|
|
1211
|
-
version:
|
|
1211
|
+
kind: P(Y).kind,
|
|
1212
|
+
filename: P(Y).filename,
|
|
1213
|
+
version: P(Y).version,
|
|
1212
1214
|
versions: Tn.value,
|
|
1213
|
-
"download-url": q(
|
|
1214
|
-
preview:
|
|
1215
|
-
changes:
|
|
1216
|
-
loading:
|
|
1217
|
-
error:
|
|
1215
|
+
"download-url": q(P(Y).storedFileName),
|
|
1216
|
+
preview: P(fn),
|
|
1217
|
+
changes: P(hn),
|
|
1218
|
+
loading: P(pn),
|
|
1219
|
+
error: P(mn),
|
|
1218
1220
|
restorable: Dn.value,
|
|
1219
1221
|
resize: "expand",
|
|
1220
|
-
"file-id":
|
|
1221
|
-
"stored-file-name":
|
|
1222
|
+
"file-id": P(Y).fileId,
|
|
1223
|
+
"stored-file-name": P(Y).storedFileName,
|
|
1222
1224
|
"selection-actions": kn.value,
|
|
1223
1225
|
onVersion: En,
|
|
1224
1226
|
onRestore: On,
|
|
1225
1227
|
onResize: n[13] ||= (e) => bn.value = !0,
|
|
1226
|
-
onSelectionSend:
|
|
1228
|
+
onSelectionSend: Mn,
|
|
1227
1229
|
onClose: Sn
|
|
1228
1230
|
}, null, 8, [
|
|
1229
1231
|
"mode",
|
|
@@ -1244,7 +1246,7 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
1244
1246
|
"stored-file-name",
|
|
1245
1247
|
"selection-actions"
|
|
1246
1248
|
])) : w("", !0)], 2)], 8, ["to", "disabled"])) : w("", !0),
|
|
1247
|
-
|
|
1249
|
+
P(Y) && !xn.value ? (j(), C(P(_e), {
|
|
1248
1250
|
key: 2,
|
|
1249
1251
|
mode: X.value.mode,
|
|
1250
1252
|
"onUpdate:mode": n[14] ||= (e) => X.value.mode = e,
|
|
@@ -1254,21 +1256,23 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
1254
1256
|
"onUpdate:zoom": n[16] ||= (e) => X.value.zoom = e,
|
|
1255
1257
|
fit: X.value.fit,
|
|
1256
1258
|
"onUpdate:fit": n[17] ||= (e) => X.value.fit = e,
|
|
1257
|
-
target:
|
|
1259
|
+
target: P(Y),
|
|
1258
1260
|
versions: Tn.value,
|
|
1259
|
-
"download-url": q(
|
|
1260
|
-
preview:
|
|
1261
|
-
changes:
|
|
1262
|
-
loading:
|
|
1263
|
-
error:
|
|
1261
|
+
"download-url": q(P(Y).storedFileName),
|
|
1262
|
+
preview: P(fn),
|
|
1263
|
+
changes: P(hn),
|
|
1264
|
+
loading: P(pn),
|
|
1265
|
+
error: P(mn),
|
|
1264
1266
|
restorable: Dn.value,
|
|
1265
1267
|
resize: un.value ? "shrink" : void 0,
|
|
1266
1268
|
fullscreen: dn.value,
|
|
1267
1269
|
"selection-actions": kn.value,
|
|
1270
|
+
working: An.value,
|
|
1268
1271
|
onVersion: En,
|
|
1269
1272
|
onRestore: On,
|
|
1270
1273
|
onResize: n[18] ||= (e) => bn.value = !1,
|
|
1271
|
-
onSelectionSend:
|
|
1274
|
+
onSelectionSend: Mn,
|
|
1275
|
+
onShowChat: jn,
|
|
1272
1276
|
onClose: Sn
|
|
1273
1277
|
}, null, 8, [
|
|
1274
1278
|
"mode",
|
|
@@ -1285,12 +1289,13 @@ var Ze = { class: "pk-chatbot-view-chat__input-stage" }, Qe = {
|
|
|
1285
1289
|
"restorable",
|
|
1286
1290
|
"resize",
|
|
1287
1291
|
"fullscreen",
|
|
1288
|
-
"selection-actions"
|
|
1292
|
+
"selection-actions",
|
|
1293
|
+
"working"
|
|
1289
1294
|
])) : w("", !0)
|
|
1290
1295
|
], 2);
|
|
1291
1296
|
};
|
|
1292
1297
|
}
|
|
1293
1298
|
});
|
|
1294
|
-
export {
|
|
1299
|
+
export { Me as a, Fe as i, Xe as n, De as o, Je as r, Te as s, st as t };
|
|
1295
1300
|
|
|
1296
|
-
//# sourceMappingURL=PkChatbotViewChat-
|
|
1301
|
+
//# sourceMappingURL=PkChatbotViewChat-CmjD1IXf.js.map
|