@8wave/ai-elements 0.121.0-beta.46 → 0.121.0-beta.48

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.
Files changed (130) hide show
  1. package/dist/_chunks/{Agent-BuPgJIt4.js → Agent-jMXkLts9.js} +36 -36
  2. package/dist/_chunks/Agent-jMXkLts9.js.map +1 -0
  3. package/dist/_chunks/{PkStreamingMarkdown-BlTH2AJX.js → PkStreamingMarkdown-C43RVcRW.js} +16 -10
  4. package/dist/_chunks/PkStreamingMarkdown-C43RVcRW.js.map +1 -0
  5. package/dist/_chunks/PkToolEditedFile-BZUXx8ZG.js +51 -0
  6. package/dist/_chunks/PkToolEditedFile-BZUXx8ZG.js.map +1 -0
  7. package/dist/_chunks/{PkToolRequestGeolocation-CxMAoAv6.js → PkToolRequestGeolocation-BJc2Ki0-.js} +2 -2
  8. package/dist/_chunks/{PkToolRequestGeolocation-CxMAoAv6.js.map → PkToolRequestGeolocation-BJc2Ki0-.js.map} +1 -1
  9. package/dist/_chunks/{PkToolRequestOAuthConnection-DU1Y2odZ.js → PkToolRequestOAuthConnection-OU56LTl0.js} +2 -2
  10. package/dist/_chunks/{PkToolRequestOAuthConnection-DU1Y2odZ.js.map → PkToolRequestOAuthConnection-OU56LTl0.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowArtifact-jQeIv65U.js → PkToolShowArtifact-yP7FXi0H.js} +2 -2
  12. package/dist/_chunks/{PkToolShowArtifact-jQeIv65U.js.map → PkToolShowArtifact-yP7FXi0H.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowContactForm-D7wg3Jlu.js → PkToolShowContactForm-w6aLTe1i.js} +2 -2
  14. package/dist/_chunks/{PkToolShowContactForm-D7wg3Jlu.js.map → PkToolShowContactForm-w6aLTe1i.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowForm-BMVgXxzl.js → PkToolShowForm-ChhVlxqc.js} +3 -3
  16. package/dist/_chunks/{PkToolShowForm-BMVgXxzl.js.map → PkToolShowForm-ChhVlxqc.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowImageGallery-Ba0CfKt6.js → PkToolShowImageGallery-D88a9a0P.js} +2 -2
  18. package/dist/_chunks/{PkToolShowImageGallery-Ba0CfKt6.js.map → PkToolShowImageGallery-D88a9a0P.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowProductList-DbZfUUWe.js → PkToolShowProductList-Jff9j3eQ.js} +2 -2
  20. package/dist/_chunks/{PkToolShowProductList-DbZfUUWe.js.map → PkToolShowProductList-Jff9j3eQ.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowSources-Dkt4IId2.js → PkToolShowSources-lWRoFGvC.js} +3 -3
  22. package/dist/_chunks/{PkToolShowSources-Dkt4IId2.js.map → PkToolShowSources-lWRoFGvC.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowSuggestedReply-BF2sT3B1.js → PkToolShowSuggestedReply-Ds0Yf31m.js} +2 -2
  24. package/dist/_chunks/{PkToolShowSuggestedReply-BF2sT3B1.js.map → PkToolShowSuggestedReply-Ds0Yf31m.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowVideo-l8JoSKCj.js → PkToolShowVideo-fNFvCi1_.js} +2 -2
  26. package/dist/_chunks/{PkToolShowVideo-l8JoSKCj.js.map → PkToolShowVideo-fNFvCi1_.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowWebPages-DtcEmrYt.js → PkToolShowWebPages-Bah-YhpM.js} +2 -2
  28. package/dist/_chunks/{PkToolShowWebPages-DtcEmrYt.js.map → PkToolShowWebPages-Bah-YhpM.js.map} +1 -1
  29. package/dist/_chunks/{chatImagePolicy-CQYTWTkP.js → chatImagePolicy-BvKnRHdM.js} +2 -2
  30. package/dist/_chunks/{chatImagePolicy-CQYTWTkP.js.map → chatImagePolicy-BvKnRHdM.js.map} +1 -1
  31. package/dist/_chunks/{markdown-Br9ROCBT.js → markdown-B1y2QQAa.js} +13 -13
  32. package/dist/_chunks/{markdown-Br9ROCBT.js.map → markdown-B1y2QQAa.js.map} +1 -1
  33. package/dist/ai-elements.es.js +1595 -1574
  34. package/dist/ai-elements.es.js.map +1 -1
  35. package/dist-vue/PkChatbot.js +1 -1
  36. package/dist-vue/PkChatbotEmptyState.js +1 -1
  37. package/dist-vue/PkChatbotInput.js +1 -1
  38. package/dist-vue/PkChatbotMessages.js +1 -1
  39. package/dist-vue/PkChatbotStepPayload.js +1 -1
  40. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  41. package/dist-vue/PkChatbotSteps.js +1 -1
  42. package/dist-vue/PkChatbotViewChat.js +1 -1
  43. package/dist-vue/PkChatbotViewConversations.js +1 -1
  44. package/dist-vue/PkChatbotViewFiles.js +1 -1
  45. package/dist-vue/PkChatbotViewProfile.js +1 -1
  46. package/dist-vue/_chunks/{Agent-DZb775Ak.js → Agent-BYwOk7Tt.js} +102 -102
  47. package/dist-vue/_chunks/Agent-BYwOk7Tt.js.map +1 -0
  48. package/dist-vue/_chunks/{Document-E72l_VU6.js → Document-CQdYPyrv.js} +2 -2
  49. package/dist-vue/_chunks/{Document-E72l_VU6.js.map → Document-CQdYPyrv.js.map} +1 -1
  50. package/dist-vue/_chunks/{PkChatbot-CObEhs2T.js → PkChatbot-DonyiJn3.js} +8 -8
  51. package/dist-vue/_chunks/{PkChatbot-CObEhs2T.js.map → PkChatbot-DonyiJn3.js.map} +1 -1
  52. package/dist-vue/_chunks/{PkChatbotEmptyState-Dh7ETVnf.js → PkChatbotEmptyState-CaNM6c77.js} +2 -2
  53. package/dist-vue/_chunks/{PkChatbotEmptyState-Dh7ETVnf.js.map → PkChatbotEmptyState-CaNM6c77.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkChatbotInput-CuEoeb_M.js → PkChatbotInput-Bt02PGbZ.js} +2 -2
  55. package/dist-vue/_chunks/{PkChatbotInput-CuEoeb_M.js.map → PkChatbotInput-Bt02PGbZ.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkChatbotMessages-DMSActW1.js → PkChatbotMessages-DIeAiZ7I.js} +25 -24
  57. package/dist-vue/_chunks/PkChatbotMessages-DIeAiZ7I.js.map +1 -0
  58. package/dist-vue/_chunks/{PkChatbotStepPayload-CXdsUMrw.js → PkChatbotStepPayload-D1_JG-M8.js} +2 -2
  59. package/dist-vue/_chunks/{PkChatbotStepPayload-CXdsUMrw.js.map → PkChatbotStepPayload-D1_JG-M8.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotStepToolDetail-DbpXR7jh.js → PkChatbotStepToolDetail-DKJ3qg98.js} +3 -3
  61. package/dist-vue/_chunks/{PkChatbotStepToolDetail-DbpXR7jh.js.map → PkChatbotStepToolDetail-DKJ3qg98.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkChatbotSteps-QFFZ0DjH.js → PkChatbotSteps-DgaJc9Pv.js} +5 -5
  63. package/dist-vue/_chunks/{PkChatbotSteps-QFFZ0DjH.js.map → PkChatbotSteps-DgaJc9Pv.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkChatbotViewChat-BZb-U7Ju.js → PkChatbotViewChat-10NIwiUP.js} +172 -162
  65. package/dist-vue/_chunks/PkChatbotViewChat-10NIwiUP.js.map +1 -0
  66. package/dist-vue/_chunks/{PkChatbotViewConversations-CCPRWCKs.js → PkChatbotViewConversations-hsboinns.js} +3 -3
  67. package/dist-vue/_chunks/{PkChatbotViewConversations-CCPRWCKs.js.map → PkChatbotViewConversations-hsboinns.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkChatbotViewFiles-BgqksCn0.js → PkChatbotViewFiles-DDO_L8UB.js} +9 -9
  69. package/dist-vue/_chunks/PkChatbotViewFiles-DDO_L8UB.js.map +1 -0
  70. package/dist-vue/_chunks/{PkChatbotViewProfile-B6tHWrqn.js → PkChatbotViewProfile-BC7Ok94X.js} +2 -2
  71. package/dist-vue/_chunks/{PkChatbotViewProfile-B6tHWrqn.js.map → PkChatbotViewProfile-BC7Ok94X.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkStreamingMarkdown-DwDs-cGP.js → PkStreamingMarkdown-0jN60Rku.js} +3 -3
  73. package/dist-vue/_chunks/{PkStreamingMarkdown-DwDs-cGP.js.map → PkStreamingMarkdown-0jN60Rku.js.map} +1 -1
  74. package/dist-vue/_chunks/PkToolEditedFile-DsiNIHAR.js +50 -0
  75. package/dist-vue/_chunks/PkToolEditedFile-DsiNIHAR.js.map +1 -0
  76. package/dist-vue/_chunks/{PkToolRequestGeolocation-DC8hSH0j.js → PkToolRequestGeolocation-jkEuN6_1.js} +2 -2
  77. package/dist-vue/_chunks/{PkToolRequestGeolocation-DC8hSH0j.js.map → PkToolRequestGeolocation-jkEuN6_1.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BH_-drvw.js → PkToolRequestOAuthConnection-BTNd8Urz.js} +2 -2
  79. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BH_-drvw.js.map → PkToolRequestOAuthConnection-BTNd8Urz.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkToolShowArtifact-CjVN96wJ.js → PkToolShowArtifact-BitKlzvt.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowArtifact-CjVN96wJ.js.map → PkToolShowArtifact-BitKlzvt.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowContactForm-CmBLigw8.js → PkToolShowContactForm-DKkapC2s.js} +2 -2
  83. package/dist-vue/_chunks/{PkToolShowContactForm-CmBLigw8.js.map → PkToolShowContactForm-DKkapC2s.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkToolShowDiagram-dKUU5_6F.js → PkToolShowDiagram-BI-fI2vG.js} +2 -2
  85. package/dist-vue/_chunks/{PkToolShowDiagram-dKUU5_6F.js.map → PkToolShowDiagram-BI-fI2vG.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolShowForm-B6ESvq-5.js → PkToolShowForm-LR8mW4SY.js} +4 -4
  87. package/dist-vue/_chunks/{PkToolShowForm-B6ESvq-5.js.map → PkToolShowForm-LR8mW4SY.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolShowImageGallery-Daq0IwTH.js → PkToolShowImageGallery-DuJ_cbcf.js} +2 -2
  89. package/dist-vue/_chunks/{PkToolShowImageGallery-Daq0IwTH.js.map → PkToolShowImageGallery-DuJ_cbcf.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolShowProductList-Bc3Gzyxy.js → PkToolShowProductList-D7Tw7_NR.js} +2 -2
  91. package/dist-vue/_chunks/{PkToolShowProductList-Bc3Gzyxy.js.map → PkToolShowProductList-D7Tw7_NR.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolShowSources-BDvRbenn.js → PkToolShowSources-DeplEks2.js} +3 -3
  93. package/dist-vue/_chunks/{PkToolShowSources-BDvRbenn.js.map → PkToolShowSources-DeplEks2.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Cd6VkzvJ.js → PkToolShowSuggestedReply-Dw-yePEO.js} +2 -2
  95. package/dist-vue/_chunks/{PkToolShowSuggestedReply-Cd6VkzvJ.js.map → PkToolShowSuggestedReply-Dw-yePEO.js.map} +1 -1
  96. package/dist-vue/_chunks/{PkToolShowVideo-Bo1gsD97.js → PkToolShowVideo-CAJhU52k.js} +2 -2
  97. package/dist-vue/_chunks/{PkToolShowVideo-Bo1gsD97.js.map → PkToolShowVideo-CAJhU52k.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkToolShowWebPages-DI3sZiqh.js → PkToolShowWebPages-Be6dKCsO.js} +2 -2
  99. package/dist-vue/_chunks/{PkToolShowWebPages-DI3sZiqh.js.map → PkToolShowWebPages-Be6dKCsO.js.map} +1 -1
  100. package/dist-vue/_chunks/{createChatbotApiClient-hcFAulTq.js → createChatbotApiClient-huxzfST2.js} +16 -16
  101. package/dist-vue/_chunks/{createChatbotApiClient-hcFAulTq.js.map → createChatbotApiClient-huxzfST2.js.map} +1 -1
  102. package/dist-vue/_chunks/{useChatbotStore-Ct7G-voO.js → useChatbotStore-8tG3oA_R.js} +20 -20
  103. package/dist-vue/_chunks/{useChatbotStore-Ct7G-voO.js.map → useChatbotStore-8tG3oA_R.js.map} +1 -1
  104. package/dist-vue/_chunks/{utils-EPX3V3VI.js → utils-_H2BDYuj.js} +16 -10
  105. package/dist-vue/_chunks/utils-_H2BDYuj.js.map +1 -0
  106. package/dist-vue/api.js +1 -1
  107. package/dist-vue/composables.js +28 -18
  108. package/dist-vue/composables.js.map +1 -1
  109. package/dist-vue/index.js +5211 -5194
  110. package/dist-vue/index.js.map +1 -1
  111. package/dist-vue/locales.js +10 -0
  112. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +2 -2
  113. package/dist-vue/packages/components/src/chat/{PkToolEditSpreadsheet.d.ts → PkToolEditedFile.d.ts} +4 -3
  114. package/dist-vue/packages/components/src/chat/useWakeupWatch.d.ts +5 -1
  115. package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +5 -5
  116. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +7 -7
  117. package/dist-vue/packages/composable/src/useFileRow.d.ts +7 -6
  118. package/dist-vue/packages/models/src/schema/Agent.d.ts +42 -0
  119. package/package.json +1 -1
  120. package/dist/_chunks/Agent-BuPgJIt4.js.map +0 -1
  121. package/dist/_chunks/PkStreamingMarkdown-BlTH2AJX.js.map +0 -1
  122. package/dist/_chunks/PkToolEditSpreadsheet-CDxglslA.js +0 -41
  123. package/dist/_chunks/PkToolEditSpreadsheet-CDxglslA.js.map +0 -1
  124. package/dist-vue/_chunks/Agent-DZb775Ak.js.map +0 -1
  125. package/dist-vue/_chunks/PkChatbotMessages-DMSActW1.js.map +0 -1
  126. package/dist-vue/_chunks/PkChatbotViewChat-BZb-U7Ju.js.map +0 -1
  127. package/dist-vue/_chunks/PkChatbotViewFiles-BgqksCn0.js.map +0 -1
  128. package/dist-vue/_chunks/PkToolEditSpreadsheet-B61LtERY.js +0 -40
  129. package/dist-vue/_chunks/PkToolEditSpreadsheet-B61LtERY.js.map +0 -1
  130. package/dist-vue/_chunks/utils-EPX3V3VI.js.map +0 -1
@@ -1,13 +1,13 @@
1
- import { t as e } from "./PkChatbotMessages-DMSActW1.js";
1
+ import { t as e } from "./PkChatbotMessages-DIeAiZ7I.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-Ct7G-voO.js";
3
+ import { a as n, n as r, t as i } from "./useChatbotStore-8tG3oA_R.js";
4
4
  import { n as a } from "./src-BZRiAJsH.js";
5
- import { c as o, h as s, n as c } from "./utils-EPX3V3VI.js";
5
+ import { c as o, h as s, n as c } from "./utils-_H2BDYuj.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-CuEoeb_M.js";
8
+ import { n as d, t as f } from "./PkChatbotInput-Bt02PGbZ.js";
9
9
  import { t as p } from "./PkChatbotQueuedMessages-DlydYgwC.js";
10
- import { t as m } from "./PkChatbotEmptyState-Dh7ETVnf.js";
10
+ import { t as m } from "./PkChatbotEmptyState-CaNM6c77.js";
11
11
  import { t as h } from "./PkChatbotWakeupBar-Cjgarxnw.js";
12
12
  import { VvIcon as g } from "@volverjs/ui-vue/components";
13
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";
@@ -160,14 +160,14 @@ var ge = {
160
160
  key: 0,
161
161
  class: "pk-voice-session__badge",
162
162
  "aria-hidden": "true"
163
- }, z = {
163
+ }, Se = {
164
164
  class: "pk-voice-session__status",
165
165
  role: "status"
166
- }, B = {
166
+ }, z = {
167
167
  key: 0,
168
168
  class: "pk-voice-session__live-dot",
169
169
  "aria-hidden": "true"
170
- }, Se = ["title"], Ce = ["title"], we = { class: "pk-voice-session__actions" }, Te = /* @__PURE__ */ E({
170
+ }, Ce = ["title"], we = ["title"], Te = { class: "pk-voice-session__actions" }, Ee = /* @__PURE__ */ E({
171
171
  __name: "PkVoiceSession",
172
172
  props: {
173
173
  state: {},
@@ -206,18 +206,18 @@ var ge = {
206
206
  "sample",
207
207
  "spectrum"
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
+ C("div", Se, [C("span", { class: D(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (k(), S("span", z)) : x("", !0), te(" " + j(a.value), 1)], 2), e.error ? (k(), S("p", {
210
210
  key: 0,
211
211
  class: "pk-voice-session__detail",
212
212
  title: e.rawError ?? e.error
213
- }, j(e.error), 9, Se)) : x("", !0)]),
213
+ }, j(e.error), 9, Ce)) : x("", !0)]),
214
214
  o.value ? (k(), S("span", {
215
215
  key: 2,
216
216
  class: D(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
217
217
  title: M(i)("hint.voiceRemaining"),
218
218
  "aria-hidden": "true"
219
- }, j(o.value), 11, Ce)) : x("", !0),
220
- C("div", we, [e.error ? (k(), S(_, { key: 0 }, [w(d, {
219
+ }, j(o.value), 11, we)) : x("", !0),
220
+ C("div", Te, [e.error ? (k(), S(_, { key: 0 }, [w(d, {
221
221
  icon: "ri:refresh-line",
222
222
  label: M(i)("action.retry"),
223
223
  onClick: n[0] ||= (e) => r("retry")
@@ -254,7 +254,7 @@ var ge = {
254
254
  ], 2);
255
255
  };
256
256
  }
257
- }), Ee = (e) => {
257
+ }), De = (e) => {
258
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 = () => {
259
259
  u &&= (clearInterval(u), void 0), s.value = void 0;
260
260
  }, m = (e) => {
@@ -378,12 +378,12 @@ var ge = {
378
378
  readLevel: S,
379
379
  readSpectrum: C
380
380
  };
381
- }, De = 4e3, Oe = [
381
+ }, Oe = 4e3, ke = [
382
382
  3e3,
383
383
  5e3,
384
384
  1e4
385
- ], ke = 12e4, Ae = 3e4;
386
- function je(e) {
385
+ ], Ae = 12e4, je = 3e4;
386
+ function Me(e) {
387
387
  let t = A(null), n = A(!1), r, i = !1, a = () => {
388
388
  clearTimeout(r), r = void 0;
389
389
  }, o = (e, t) => {
@@ -401,12 +401,12 @@ function je(e) {
401
401
  }
402
402
  let r = t.value;
403
403
  if (r) {
404
- let e = Date.parse(r.dueAt) - Date.now() + De;
405
- o(Math.max(De, e), () => l(r.wakeId, Date.now(), 0));
404
+ let e = Date.parse(r.dueAt) - Date.now() + Oe;
405
+ o(Math.max(Oe, e), () => l(r.wakeId, Date.now(), 0));
406
406
  }
407
407
  }
408
408
  async function l(t, n, r) {
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
+ await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Ae ? await c() : o(ke[Math.min(r, ke.length - 1)], () => l(t, n, r + 1)));
410
410
  }
411
411
  async function u() {
412
412
  n.value = !0;
@@ -420,15 +420,23 @@ function je(e) {
420
420
  function d() {
421
421
  a(), t.value = null;
422
422
  }
423
- let f;
424
- function p() {
423
+ let f = y(() => e.messages().some((e) => e.role === "user"));
424
+ N([e.chatId, f], ([, t]) => {
425
+ d();
426
+ let n = e.status();
427
+ t && n !== "submitted" && n !== "streaming" && c();
428
+ }, { immediate: !0 }), N(e.status, (e, t) => {
429
+ e === "ready" && t !== "ready" && f.value && c();
430
+ });
431
+ let p;
432
+ function m() {
425
433
  t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
426
434
  }
427
- let m = () => p();
428
- return document.addEventListener("visibilitychange", m), N(() => t.value?.wakeId, (e) => {
429
- clearInterval(f), f = void 0, e && !i && (p(), f = setInterval(p, Ae));
435
+ let h = () => m();
436
+ return document.addEventListener("visibilitychange", h), N(() => t.value?.wakeId, (e) => {
437
+ clearInterval(p), p = void 0, e && !i && (m(), p = setInterval(m, je));
430
438
  }), O(() => {
431
- i = !0, a(), clearInterval(f), document.removeEventListener("visibilitychange", m);
439
+ i = !0, a(), clearInterval(p), document.removeEventListener("visibilitychange", h);
432
440
  }), {
433
441
  pendingWakeup: t,
434
442
  isStopping: n,
@@ -439,16 +447,16 @@ function je(e) {
439
447
  }
440
448
  //#endregion
441
449
  //#region ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
442
- var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
450
+ var Ne = { class: "pk-chatbot-view-chat__input-stage" }, Pe = {
443
451
  key: 1,
444
452
  class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
445
- }, Pe = { class: "pk-chatbot-view-chat__agent-chip" }, Fe = {
453
+ }, Fe = { class: "pk-chatbot-view-chat__agent-chip" }, Ie = {
446
454
  key: 0,
447
455
  class: "pk-chatbot-view-chat__agent-chip-name"
448
- }, Ie = {
456
+ }, Le = {
449
457
  key: 0,
450
458
  class: "pk-chatbot-view-chat__drop-overlay"
451
- }, Le = 3e3, Re = 6e4, ze = 3e5, Be = 6e5, Ve = /* @__PURE__ */ E({
459
+ }, Re = 3e3, ze = 6e4, Be = 3e5, Ve = 6e5, He = /* @__PURE__ */ E({
452
460
  __name: "PkChatbotViewChat",
453
461
  props: {
454
462
  agentId: {},
@@ -457,121 +465,121 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
457
465
  },
458
466
  emits: ["show-info", "revise"],
459
467
  setup(a, { emit: d }) {
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;
464
- if (e) return e.reason === "per-chat" ? W("message.fileLimitPerChat", { max: e.max }) : W("message.fileLimitPerMessage", { max: e.max });
465
- }), At = y(() => rt.value.map(({ chatId: e, title: t }) => ({
468
+ let _ = T(() => import("./PkToolShowForm-LR8mW4SY.js").then((e) => e.n)), te = T(() => import("./PkToolShowContactForm-DKkapC2s.js").then((e) => e.n)), E = T(() => import("./PkToolShowSuggestedReply-Dw-yePEO.js").then((e) => e.n)), re = T(() => import("./PkToolShowSources-DeplEks2.js").then((e) => e.n)), ie = T(() => import("./PkToolRequestGeolocation-jkEuN6_1.js")), ae = T(() => import("./PkToolRequestOAuthConnection-BTNd8Urz.js")), oe = T(() => import("./PkToolShowLocation-BipZrvw7.js").then((e) => e.n)), ce = T(() => import("./PkToolShowDiagram-BI-fI2vG.js")), le = T(() => import("./PkToolEditedFile-DsiNIHAR.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: Se, chat: z, messageFeedbacks: Ce, feedbackDialogMessage: we, isFeedbackSubmitting: Te, isFeedbackSubmitted: Oe, feedbackSubmitError: ke, isLeadSubmitted: Ae, isLoadingSubmitLead: je, submitLeadError: He, input: Ue, inputMessagePlaceholder: We, isConversationBlocked: Ge, baseUrl: Ke, pendingAttachments: qe, isAttachmentLimitReached: Je, fileLimitError: Ye, apiClient: B, isDark: Xe, hostToolsPending: Ze, pageNoticeLevel: Qe, hostConfirmation: $e, agentPageAccess: et, hostStepTitles: tt, canQueue: nt, queuedMessages: rt, backgroundAnswers: it } = me(I);
469
+ se(c, tt);
470
+ let V = y(() => R.value === "reasoning" ? void 0 : _e.value), at = (e) => B.value.getMediaDownloadUrl(F.agentId, I.localChatId, e), { handleSubmit: ot, stopGeneration: st, regenerate: ct, onUpvote: lt, onDownvote: ut, onFeedback: dt, onFeedbackSubmit: ft, onLeadSubmit: pt, startNewChat: mt, addToolOutput: H, addToolApprovalResponse: ht, handleFileSelect: gt, clearFileLimitError: _t, refreshMessages: vt, appendMessage: yt, closePageNotice: bt, respondHostConfirmation: xt, editQueuedMessage: St, removeQueuedMessage: Ct, openBackgroundAnswer: wt, dismissBackgroundAnswer: Tt } = I, { t: U } = fe({ useScope: "global" }), Et = y(() => Ze.value > 0), Dt = y(() => Et.value && z.value.status === "ready" ? "streaming" : z.value.status), Ot = l(() => et.value?.notice), kt = y(() => Qe.value ? Ot.value || U(`message.pageAccessNotice.${Qe.value}`) : void 0), At = y(() => {
471
+ let e = Ye.value;
472
+ if (e) return e.reason === "per-chat" ? U("message.fileLimitPerChat", { max: e.max }) : U("message.fileLimitPerMessage", { max: e.max });
473
+ }), jt = y(() => it.value.map(({ chatId: e, title: t }) => ({
466
474
  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) => {
469
- let t = await V.value.downloadSourceDocument(F.agentId, e);
475
+ text: t ? U("message.backgroundAnswerReady", { title: t }) : U("message.backgroundAnswerReadyUntitled")
476
+ }))), Mt = l(() => L.value?.dismissableNotice), Nt = y(() => Se.value.some((e) => e.role === "user")), Pt = y(() => F.modifier === "fullscreen" && !Nt.value), Ft = he(L, () => F.userName), It = de("chatViewEl"), Lt = async (e) => (await B.value.expandSourceContext(F.agentId, e.documentId, e.chunkIndex)).content, Rt = async (e) => {
477
+ let t = await B.value.downloadSourceDocument(F.agentId, e);
470
478
  window.open(t.downloadUrl, "_blank");
471
- }, { isOverDropZone: Rt } = pe(Ft, {
472
- dataTypes: (e) => t(e, H.value?.allowedMimeTypes ?? []),
479
+ }, { isOverDropZone: zt } = pe(It, {
480
+ dataTypes: (e) => t(e, V.value?.allowedMimeTypes ?? []),
473
481
  onDrop: (e) => {
474
- if (H.value?.enabled && e) for (let t of e) ht(t);
482
+ if (V.value?.enabled && e) for (let t of e) gt(t);
475
483
  }
476
- }), G = A(!1), K = !1, q = A(!1), zt = [
484
+ }), W = A(!1), G = !1, K = A(!1), Bt = [
477
485
  3e3,
478
486
  5e3,
479
487
  1e4
480
- ], J, Y, X = !1, Bt = 0, Vt = !1;
488
+ ], q, J, Y = !1, X = 0, Vt = !1;
481
489
  function Ht() {
482
- clearTimeout(J), J = void 0, Y = void 0, X = !1, Bt = 0, q.value = !1;
490
+ clearTimeout(q), q = void 0, J = void 0, Y = !1, X = 0, K.value = !1;
483
491
  }
484
492
  function Ut(e) {
485
- K || (clearTimeout(J), J = setTimeout(() => {
493
+ G || (clearTimeout(q), q = setTimeout(() => {
486
494
  Wt();
487
495
  }, e));
488
496
  }
489
497
  async function Wt() {
490
- if (K || Vt) return;
498
+ if (G || Vt) return;
491
499
  Vt = !0;
492
500
  let e;
493
501
  try {
494
- e = await _t();
502
+ e = await vt();
495
503
  } finally {
496
504
  Vt = !1;
497
505
  }
498
- if (K) return;
499
- if (e === "caught-up" && (q.value = !1), Z.isActive.value) {
500
- Y = void 0, X = !1, Bt = 0, Ut(Le);
506
+ if (G) return;
507
+ if (e === "caught-up" && (K.value = !1), Z.isActive.value) {
508
+ J = void 0, Y = !1, X = 0, Ut(Re);
501
509
  return;
502
510
  }
503
- Y === void 0 && (Y = Date.now(), X = !!Z.error.value);
504
- let t = Date.now() - Y;
505
- if (e === "caught-up" && t >= (X ? ze : Re) || t >= Be) {
511
+ J === void 0 && (J = Date.now(), Y = !!Z.error.value);
512
+ let t = Date.now() - J;
513
+ if (e === "caught-up" && t >= (Y ? Be : ze) || t >= Ve) {
506
514
  Ht();
507
515
  return;
508
516
  }
509
- let n = zt[Math.min(Bt, zt.length - 1)];
510
- Bt += 1, Ut(n);
517
+ let n = Bt[Math.min(X, Bt.length - 1)];
518
+ X += 1, Ut(n);
511
519
  }
512
520
  let Gt = (e = 1200) => {
513
521
  Ut(e);
514
- }, Z = Ee({
522
+ }, Z = De({
515
523
  fetchGrant: async () => {
516
- let e = await V.value.createVoiceSession(F.agentId, I.localChatId, {
524
+ let e = await B.value.createVoiceSession(F.agentId, I.localChatId, {
517
525
  deviceContext: I.buildDeviceContext(),
518
526
  externalContext: I.externalContext
519
527
  });
520
528
  return e.chatId !== I.localChatId && (I.localChatId = e.chatId), e;
521
529
  },
522
- closeGrant: (e) => V.value.closeVoiceSession(F.agentId, e),
530
+ closeGrant: (e) => B.value.closeVoiceSession(F.agentId, e),
523
531
  onTranscript: (e) => {
524
- e.role === "user" ? (q.value = !0, vt({
532
+ e.role === "user" ? (K.value = !0, yt({
525
533
  id: `${i}user-${n()}`,
526
534
  role: "user",
527
535
  parts: [{
528
536
  type: "text",
529
537
  text: e.text
530
538
  }]
531
- })) : q.value = !1;
539
+ })) : K.value = !1;
532
540
  },
533
541
  onTurnEnd: () => {
534
542
  Gt();
535
543
  }
536
544
  });
537
545
  N(() => Z.error.value, (e) => {
538
- e && (q.value = !1);
546
+ e && (K.value = !1);
539
547
  });
540
548
  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(() => {
541
549
  let e = Z.error.value;
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");
550
+ if (e) return /took too long/i.test(e) ? U("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? U("message.voiceNoAnswer") : U("message.voiceInterrupted");
543
551
  }), 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));
552
+ W.value = !1, await Z.start(), Z.isActive.value && (Ht(), Ut(Re));
545
553
  }, $t = async () => {
546
- q.value = !1, await Z.stop(), !K && Gt(0);
554
+ K.value = !1, await Z.stop(), !G && Gt(0);
547
555
  }, en = () => {
548
556
  Z.dismissError();
549
557
  }, tn = async () => {
550
558
  Z.dismissError(), await Z.stop(), await Qt();
551
559
  }, 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) => {
552
- $(t, o(t, n)) || U({
560
+ $(t, o(t, n)) || H({
553
561
  tool: e,
554
562
  toolCallId: Q(t),
555
563
  output: n
556
564
  });
557
565
  }, sn = (e) => {
558
- let t = e.confirmed ? W("message.voiceConfirmed") : W("message.voiceCancelled");
559
- $({ toolCallId: e.toolCallId }, t) ? nn.value.has(e.toolCallId) && (an.value = new Map(an.value).set(e.toolCallId, e.confirmed)) : U({
566
+ let t = e.confirmed ? U("message.voiceConfirmed") : U("message.voiceCancelled");
567
+ $({ toolCallId: e.toolCallId }, t) ? nn.value.has(e.toolCallId) && (an.value = new Map(an.value).set(e.toolCallId, e.confirmed)) : H({
560
568
  tool: "requestConfirm",
561
569
  toolCallId: e.toolCallId,
562
570
  output: e.confirmed ? "confirmed" : "cancelled"
563
571
  });
564
572
  }, cn = (e, t) => {
565
- $(e, t) || (He.value = t, at());
573
+ $(e, t) || (Ue.value = t, ot());
566
574
  }, ln = (e, t) => {
567
- let n = t.error ? W("message.voiceLocationRefused") : W("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
568
- $(e, n) || U({
575
+ let n = t.error ? U("message.voiceLocationRefused") : U("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
576
+ $(e, n) || H({
569
577
  tool: "requestGeolocation",
570
578
  toolCallId: Q(e),
571
579
  output: t
572
580
  });
573
581
  }, un = (e, t) => {
574
- $(e, W("message.voiceConnectionDone")) || U({
582
+ $(e, U("message.voiceConnectionDone")) || H({
575
583
  tool: "requestOAuthConnection",
576
584
  toolCallId: Q(e),
577
585
  output: {
@@ -580,39 +588,36 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
580
588
  }
581
589
  });
582
590
  }, dn = () => {
583
- G.value = !G.value, Z.setMuted(G.value);
591
+ W.value = !W.value, Z.setMuted(W.value);
584
592
  };
585
593
  O(() => {
586
- K = !0, Ht();
594
+ G = !0, Ht();
587
595
  });
588
- let { pendingWakeup: fn, isStopping: pn, check: mn, reset: hn, stop: gn } = je({
596
+ let { pendingWakeup: fn, isStopping: pn, stop: mn } = Me({
589
597
  agentId: () => F.agentId,
590
598
  chatId: () => I.localChatId,
591
- apiClient: () => V.value,
592
- messages: () => z.value,
593
- refreshMessages: _t
599
+ apiClient: () => B.value,
600
+ messages: () => Se.value,
601
+ refreshMessages: vt,
602
+ status: () => z.value.status
594
603
  });
595
- return N([() => I.localChatId, Mt], ([, e]) => {
596
- hn(), e && mn();
597
- }, { immediate: !0 }), N(() => B.value.status, (e, t) => {
598
- e === "ready" && t !== "ready" && Mt.value && mn();
599
- }), (t, n) => {
604
+ return (t, n) => {
600
605
  let r = g;
601
606
  return k(), S("div", {
602
607
  ref_key: "chatViewEl",
603
- ref: Ft,
608
+ ref: It,
604
609
  class: D(["pk-chatbot-view-chat", {
605
- "pk-chatbot-view-chat--dragover": M(Rt) && H.value?.enabled,
606
- "pk-chatbot-view-chat--empty": Nt.value
610
+ "pk-chatbot-view-chat--dragover": M(zt) && V.value?.enabled,
611
+ "pk-chatbot-view-chat--empty": Pt.value
607
612
  }])
608
613
  }, [
609
614
  w(v, {
610
615
  name: "pk-chatbot-view-chat-fade",
611
616
  mode: "out-in"
612
617
  }, {
613
- default: P(() => [Nt.value ? (k(), b(m, {
618
+ default: P(() => [Pt.value ? (k(), b(m, {
614
619
  key: 0,
615
- greeting: M(Pt),
620
+ greeting: M(Ft),
616
621
  logo: M(L)?.logo,
617
622
  name: M(I).name
618
623
  }, null, 8, [
@@ -623,47 +628,47 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
623
628
  key: 1,
624
629
  class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
625
630
  interactive: "",
626
- messages: M(z),
631
+ messages: M(Se),
627
632
  "confirm-verdicts-on-call": an.value,
628
- status: M(B).status,
629
- error: M(B).error,
633
+ status: M(z).status,
634
+ error: M(z).error,
630
635
  "main-color": M(L)?.mainColor,
631
636
  "text-color": M(L)?.textColor,
632
637
  "revised-answers": M(xe),
633
638
  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),
639
+ "message-feedbacks": M(Ce),
640
+ "feedback-message-id": M(we)?.id,
641
+ "feedback-loading": M(Te),
642
+ "feedback-submitted": M(Oe),
643
+ "feedback-error": M(ke),
639
644
  "show-extended-steps": M(L)?.showExtendedSteps,
640
- "awaiting-spoken-answer": q.value,
641
- "host-working": Tt.value,
642
- "host-confirmation": M(Qe),
643
- "is-dark": M(Ye),
645
+ "awaiting-spoken-answer": K.value,
646
+ "host-working": Et.value,
647
+ "host-confirmation": M($e),
648
+ "is-dark": M(Xe),
644
649
  "show-scroll-to-bottom": a.modifier === "fullscreen",
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
+ onFeedbackSubmit: n[0] ||= (e) => M(ft)(e),
651
+ onFeedbackClose: n[1] ||= (e) => we.value = void 0,
652
+ onRegenerate: M(ct),
653
+ onAutoRetry: M(ct),
654
+ onResetChat: M(mt),
650
655
  onShowInfo: n[2] ||= (e) => ge("show-info", e),
651
656
  onRevise: n[3] ||= (e) => ge("revise", e),
652
- onUpvote: M(ct),
653
- onDownvote: M(lt),
654
- onFeedback: M(ut),
655
- onApprovalRespond: M(mt),
657
+ onUpvote: M(lt),
658
+ onDownvote: M(ut),
659
+ onFeedback: M(dt),
660
+ onApprovalRespond: M(ht),
656
661
  onConfirmRespond: sn,
657
- onHostConfirmRespond: M(bt)
662
+ onHostConfirmRespond: M(xt)
658
663
  }, {
659
664
  "tool-showContactForm": P(({ part: e }) => [w(M(te), {
660
665
  part: e,
661
- readonly: !M(Ge),
662
- submitted: M(ke),
663
- loading: M(Ae),
664
- error: M(Ve),
666
+ readonly: !M(Ke),
667
+ submitted: M(Ae),
668
+ loading: M(je),
669
+ error: M(He),
665
670
  "privacy-policy-notice": M(L)?.privacyPolicyNotice,
666
- onSubmit: M(ft)
671
+ onSubmit: M(pt)
667
672
  }, null, 8, [
668
673
  "part",
669
674
  "readonly",
@@ -679,8 +684,8 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
679
684
  }, null, 8, ["part", "onSelect"])]),
680
685
  "tool-showSources": P(({ part: e }) => [w(M(re), {
681
686
  part: e,
682
- "on-expand-context": It,
683
- "on-download": Lt
687
+ "on-expand-context": Lt,
688
+ "on-download": Rt
684
689
  }, null, 8, ["part"])]),
685
690
  "tool-showForm": P(({ part: e }) => [w(v, { mode: "out-in" }, {
686
691
  default: P(() => [w(M(_), {
@@ -709,9 +714,9 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
709
714
  }, 1024)]),
710
715
  "tool-requestOAuthConnection": P(({ part: e }) => [w(M(ae), {
711
716
  part: e,
712
- "backend-url": M(Ge),
713
- "resolve-connection": (e) => M(V).getOAuthAuthorizeUrl(F.agentId, e),
714
- "check-connection": (e) => M(V).getOAuthConnectionStatus(F.agentId, e),
717
+ "backend-url": M(Ke),
718
+ "resolve-connection": (e) => M(B).getOAuthAuthorizeUrl(F.agentId, e),
719
+ "check-connection": (e) => M(B).getOAuthConnectionStatus(F.agentId, e),
715
720
  onConnected: (t) => un(e, t)
716
721
  }, null, 8, [
717
722
  "part",
@@ -723,7 +728,7 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
723
728
  "tool-requestGeolocation": P(({ part: e }) => [w(M(ie), {
724
729
  part: e,
725
730
  "call-live": M(Z).isActive.value,
726
- "reverse-geocode": (e, t) => M(V).reverseGeocode(e, t),
731
+ "reverse-geocode": (e, t) => M(B).reverseGeocode(e, t),
727
732
  onResult: (t) => ln(e, t)
728
733
  }, null, 8, [
729
734
  "part",
@@ -733,9 +738,9 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
733
738
  ])]),
734
739
  "tool-showLocation": P(({ part: e }) => [w(M(oe), {
735
740
  part: e,
736
- "is-dark": M(Ye),
741
+ "is-dark": M(Xe),
737
742
  "main-color": M(L)?.mainColor,
738
- "forward-geocode": (e, t) => M(V).forwardGeocode(e, t)
743
+ "forward-geocode": (e, t) => M(B).forwardGeocode(e, t)
739
744
  }, null, 8, [
740
745
  "part",
741
746
  "is-dark",
@@ -744,84 +749,89 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
744
749
  ])]),
745
750
  "tool-showDiagram": P(({ part: e }) => [w(M(ce), {
746
751
  part: e,
747
- "is-dark": M(Ye)
752
+ "is-dark": M(Xe)
748
753
  }, null, 8, ["part", "is-dark"])]),
749
754
  "tool-editSpreadsheet": P(({ part: e }) => [(k(), b(M(le), {
750
755
  key: M(s)(e),
751
756
  part: e,
752
- "file-url": it
757
+ "file-url": at
758
+ }, null, 8, ["part"]))]),
759
+ "tool-editWordDocument": P(({ part: e }) => [(k(), b(M(le), {
760
+ key: M(s)(e),
761
+ part: e,
762
+ "file-url": at
753
763
  }, null, 8, ["part"]))]),
754
764
  "tool-shareDocument": P(({ part: e }) => [(k(), b(M(ue), {
755
765
  key: M(s)(e),
756
766
  part: e,
757
- "on-download": Lt
767
+ "on-download": Rt
758
768
  }, null, 8, ["part"]))]),
759
769
  _: 1
760
770
  }, 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(".")))]),
761
771
  _: 1
762
772
  }),
763
- M(nt).length ? (k(), b(p, {
773
+ M(rt).length ? (k(), b(p, {
764
774
  key: 0,
765
- messages: M(nt),
766
- onEdit: M(xt),
767
- onRemove: M(St)
775
+ messages: M(rt),
776
+ onEdit: M(St),
777
+ onRemove: M(Ct)
768
778
  }, null, 8, [
769
779
  "messages",
770
780
  "onEdit",
771
781
  "onRemove"
772
782
  ])) : x("", !0),
773
- C("div", Me, [
783
+ C("div", Ne, [
774
784
  w(v, { name: "pk-chatbot-view-chat-fade" }, {
775
- default: P(() => [Nt.value ? (k(), b(ve, {
785
+ default: P(() => [Pt.value ? (k(), b(ve, {
776
786
  key: 0,
777
787
  class: "pk-chatbot-view-chat__aurora",
778
788
  "source-selector": ".pk-chatbot-input__form"
779
789
  })) : x("", !0)]),
780
790
  _: 1
781
791
  }),
782
- M(fn) && !M(We) ? (k(), b(h, {
792
+ M(fn) && !M(Ge) ? (k(), b(h, {
783
793
  key: 0,
784
794
  pending: M(fn),
785
795
  stopping: M(pn),
786
- onStop: M(gn)
796
+ onStop: M(mn)
787
797
  }, null, 8, [
788
798
  "pending",
789
799
  "stopping",
790
800
  "onStop"
791
801
  ])) : x("", !0),
792
- M(We) ? (k(), S("div", Ne, j(M(W)("message.chatErrorConversationBlocked")), 1)) : qt.value === "idle" ? (k(), b(f, {
802
+ M(Ge) ? (k(), S("div", Pe, j(M(U)("message.chatErrorConversationBlocked")), 1)) : qt.value === "idle" ? (k(), b(f, {
793
803
  key: 3,
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,
804
+ modelValue: M(Ue),
805
+ "onUpdate:modelValue": n[4] ||= (e) => ne(Ue) ? Ue.value = e : null,
806
+ "pending-attachments": M(qe),
807
+ "onUpdate:pendingAttachments": n[5] ||= (e) => ne(qe) ? qe.value = e : null,
808
+ placeholder: M(We),
809
+ "dismissable-notice": M(Mt) && M(z).messages.length <= 1 ? M(Mt) : void 0,
810
+ "page-notice": kt.value,
811
+ status: Dt.value,
802
812
  "max-message-length": M(L)?.maxMessageLength,
803
- "file-upload": H.value,
804
- "attachment-limit-reached": M(qe),
805
- "attachment-notice": kt.value,
813
+ "file-upload": V.value,
814
+ "attachment-limit-reached": M(Je),
815
+ "attachment-notice": At.value,
806
816
  "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),
817
+ "queue-enabled": M(nt),
818
+ "answer-notices": jt.value,
819
+ onStopGeneration: M(st),
820
+ onSubmit: M(ot),
821
+ onFileSelect: M(gt),
822
+ onDismissAttachmentNotice: M(_t),
823
+ onDismissPageNotice: M(bt),
824
+ onOpenAnswerNotice: M(wt),
825
+ onDismissAnswerNotice: M(Tt),
816
826
  onVoiceStart: Qt
817
827
  }, ee({ _: 2 }, [a.modifier === "fullscreen" ? {
818
828
  name: "prepend",
819
- fn: P(() => [C("span", Pe, [w(u, {
829
+ fn: P(() => [C("span", Fe, [w(u, {
820
830
  modifiers: "surface",
821
831
  class: "pk-chatbot-view-chat__agent-chip-avatar",
822
832
  "img-src": M(L)?.logo,
823
833
  name: M(I).name
824
- }, null, 8, ["img-src", "name"]), M(I).name ? (k(), S("strong", Fe, j(M(I).name), 1)) : x("", !0)])]),
834
+ }, null, 8, ["img-src", "name"]), M(I).name ? (k(), S("strong", Ie, j(M(I).name), 1)) : x("", !0)])]),
825
835
  key: "0"
826
836
  } : void 0]), 1032, [
827
837
  "modelValue",
@@ -844,13 +854,13 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
844
854
  "onDismissPageNotice",
845
855
  "onOpenAnswerNotice",
846
856
  "onDismissAnswerNotice"
847
- ])) : (k(), b(Te, {
857
+ ])) : (k(), b(Ee, {
848
858
  key: 2,
849
859
  state: qt.value,
850
860
  sample: Xt,
851
861
  spectrum: Zt,
852
862
  "remaining-seconds": M(Z).remainingSeconds.value,
853
- muted: G.value,
863
+ muted: W.value,
854
864
  error: Jt.value,
855
865
  "raw-error": M(Z).error.value,
856
866
  live: M(Z).isActive.value,
@@ -869,10 +879,10 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
869
879
  ]))
870
880
  ]),
871
881
  w(v, null, {
872
- default: P(() => [M(Rt) && H.value?.enabled ? (k(), S("div", Ie, [w(r, {
882
+ default: P(() => [M(zt) && V.value?.enabled ? (k(), S("div", Le, [w(r, {
873
883
  name: "ri:upload-cloud-2-line",
874
884
  class: "pk-chatbot-view-chat__drop-overlay-icon"
875
- }), C("span", null, j(M(W)("action.dropFile")), 1)])) : x("", !0)]),
885
+ }), C("span", null, j(M(U)("action.dropFile")), 1)])) : x("", !0)]),
876
886
  _: 1
877
887
  })
878
888
  ], 2);
@@ -880,6 +890,6 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
880
890
  }
881
891
  });
882
892
  //#endregion
883
- export { ve as i, Te as n, be as r, Ve as t };
893
+ export { ve as i, Ee as n, be as r, He as t };
884
894
 
885
- //# sourceMappingURL=PkChatbotViewChat-BZb-U7Ju.js.map
895
+ //# sourceMappingURL=PkChatbotViewChat-10NIwiUP.js.map