@8wave/ai-elements 0.98.0 → 0.99.0-beta.2

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 (178) hide show
  1. package/README.md +24 -5
  2. package/{dist-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js → dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js} +379 -362
  3. package/dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js.map +1 -0
  4. package/dist/_chunks/{PkToolRequestGeolocation-BJ9NJZIg.js → PkToolRequestGeolocation-B73evGBg.js} +2 -2
  5. package/dist/_chunks/{PkToolRequestGeolocation-BJ9NJZIg.js.map → PkToolRequestGeolocation-B73evGBg.js.map} +1 -1
  6. package/dist/_chunks/{PkToolRequestOAuthConnection-DdvJ6n1K.js → PkToolRequestOAuthConnection-BWP5dsK_.js} +3 -3
  7. package/dist/_chunks/{PkToolRequestOAuthConnection-DdvJ6n1K.js.map → PkToolRequestOAuthConnection-BWP5dsK_.js.map} +1 -1
  8. package/dist/_chunks/{PkToolShowArtifact-BaGEr7O9.js → PkToolShowArtifact-bYYaMGxq.js} +7 -7
  9. package/dist/_chunks/{PkToolShowArtifact-BaGEr7O9.js.map → PkToolShowArtifact-bYYaMGxq.js.map} +1 -1
  10. package/dist/_chunks/{PkToolShowCalendarEvent-BYnhl2er.js → PkToolShowCalendarEvent-DdEWaTj-.js} +4 -4
  11. package/dist/_chunks/{PkToolShowCalendarEvent-BYnhl2er.js.map → PkToolShowCalendarEvent-DdEWaTj-.js.map} +1 -1
  12. package/dist/_chunks/{PkToolShowComparison-DahL5vHr.js → PkToolShowComparison-Dcar7HPW.js} +4 -4
  13. package/dist/_chunks/{PkToolShowComparison-DahL5vHr.js.map → PkToolShowComparison-Dcar7HPW.js.map} +1 -1
  14. package/dist/_chunks/{PkToolShowContactForm-upUNZtId.js → PkToolShowContactForm-DtjVW-n6.js} +13 -13
  15. package/dist/_chunks/{PkToolShowContactForm-upUNZtId.js.map → PkToolShowContactForm-DtjVW-n6.js.map} +1 -1
  16. package/dist/_chunks/{PkToolShowDiagram-Jq_4KWiK.js → PkToolShowDiagram-X35nsoIY.js} +8 -8
  17. package/dist/_chunks/{PkToolShowDiagram-Jq_4KWiK.js.map → PkToolShowDiagram-X35nsoIY.js.map} +1 -1
  18. package/dist/_chunks/{PkToolShowEmail-CtmpDS1B.js → PkToolShowEmail-jVoK8qEh.js} +4 -4
  19. package/dist/_chunks/{PkToolShowEmail-CtmpDS1B.js.map → PkToolShowEmail-jVoK8qEh.js.map} +1 -1
  20. package/dist/_chunks/{PkToolShowForm-BNV4Ja6g.js → PkToolShowForm-BP8asXtz.js} +123 -97
  21. package/dist/_chunks/PkToolShowForm-BP8asXtz.js.map +1 -0
  22. package/dist/_chunks/{PkToolShowImageGallery-mLq2p3aH.js → PkToolShowImageGallery-WQL3T4Hr.js} +2 -2
  23. package/dist/_chunks/{PkToolShowImageGallery-mLq2p3aH.js.map → PkToolShowImageGallery-WQL3T4Hr.js.map} +1 -1
  24. package/dist/_chunks/{PkToolShowLocation-SbgTbuGu.js → PkToolShowLocation-w2t7lKpb.js} +4 -4
  25. package/dist/_chunks/{PkToolShowLocation-SbgTbuGu.js.map → PkToolShowLocation-w2t7lKpb.js.map} +1 -1
  26. package/dist/_chunks/{PkToolShowMessage-CAVpDTzd.js → PkToolShowMessage-BPo7WPim.js} +4 -4
  27. package/dist/_chunks/{PkToolShowMessage-CAVpDTzd.js.map → PkToolShowMessage-BPo7WPim.js.map} +1 -1
  28. package/dist/_chunks/{PkToolShowProductList-puiPFItN.js → PkToolShowProductList-BbY4ni7Y.js} +2 -2
  29. package/dist/_chunks/{PkToolShowProductList-puiPFItN.js.map → PkToolShowProductList-BbY4ni7Y.js.map} +1 -1
  30. package/dist/_chunks/{PkToolShowQrCode-CctXvRyG.js → PkToolShowQrCode-CN0ms27N.js} +4 -4
  31. package/dist/_chunks/{PkToolShowQrCode-CctXvRyG.js.map → PkToolShowQrCode-CN0ms27N.js.map} +1 -1
  32. package/dist/_chunks/{PkToolShowSources-DwB6VXrK.js → PkToolShowSources-D2tBcx7n.js} +18 -18
  33. package/dist/_chunks/{PkToolShowSources-DwB6VXrK.js.map → PkToolShowSources-D2tBcx7n.js.map} +1 -1
  34. package/dist/_chunks/{PkToolShowSuggestedReply-QEcIhSxa.js → PkToolShowSuggestedReply-Cdh_elSh.js} +2 -2
  35. package/dist/_chunks/{PkToolShowSuggestedReply-QEcIhSxa.js.map → PkToolShowSuggestedReply-Cdh_elSh.js.map} +1 -1
  36. package/dist/_chunks/{PkToolShowVideo-DoLoI8_N.js → PkToolShowVideo-D3aU5FMO.js} +2 -2
  37. package/dist/_chunks/{PkToolShowVideo-DoLoI8_N.js.map → PkToolShowVideo-D3aU5FMO.js.map} +1 -1
  38. package/dist/_chunks/{PkToolShowWeather-C2rPCQ_K.js → PkToolShowWeather-CzanXIJp.js} +3 -3
  39. package/dist/_chunks/{PkToolShowWeather-C2rPCQ_K.js.map → PkToolShowWeather-CzanXIJp.js.map} +1 -1
  40. package/dist/_chunks/{PkToolShowWebPages-BBJYzF8V.js → PkToolShowWebPages-DkMJrWmT.js} +2 -2
  41. package/dist/_chunks/{PkToolShowWebPages-BBJYzF8V.js.map → PkToolShowWebPages-DkMJrWmT.js.map} +1 -1
  42. package/dist/_chunks/{VvCheckbox.es-D5d8k9yP.js → VvCheckbox.es-CRhIKQNR.js} +2 -2
  43. package/dist/_chunks/{VvCheckbox.es-D5d8k9yP.js.map → VvCheckbox.es-CRhIKQNR.js.map} +1 -1
  44. package/dist/_chunks/{VvCheckboxGroup.es-DVnsOjX0.js → VvCheckboxGroup.es-gOy2kM1Y.js} +5 -5
  45. package/dist/_chunks/{VvCheckboxGroup.es-DVnsOjX0.js.map → VvCheckboxGroup.es-gOy2kM1Y.js.map} +1 -1
  46. package/dist/_chunks/{VvCombobox.es-CFA-K-cQ.js → VvCombobox.es-BOwH3LmO.js} +9 -9
  47. package/dist/_chunks/VvCombobox.es-BOwH3LmO.js.map +1 -0
  48. package/dist/_chunks/{VvInputText.es-csEQ-bSG.js → VvInputText.es-D8nXroKO.js} +536 -513
  49. package/dist/_chunks/VvInputText.es-D8nXroKO.js.map +1 -0
  50. package/dist/_chunks/{VvRadio.es-BpymhC73.js → VvRadio.es-Djy5J33A.js} +2 -2
  51. package/dist/_chunks/{VvRadio.es-BpymhC73.js.map → VvRadio.es-Djy5J33A.js.map} +1 -1
  52. package/dist/_chunks/{VvRadioGroup.es-CSNzOJKx.js → VvRadioGroup.es-DQq3JYCR.js} +5 -5
  53. package/dist/_chunks/VvRadioGroup.es-DQq3JYCR.js.map +1 -0
  54. package/dist/_chunks/{VvSelect.es-CjKMd0nH.js → VvSelect.es-CE4x1ww0.js} +4 -4
  55. package/dist/_chunks/{VvSelect.es-CjKMd0nH.js.map → VvSelect.es-CE4x1ww0.js.map} +1 -1
  56. package/dist/_chunks/VvTextarea.es-BU2vqdEQ.js +1129 -0
  57. package/dist/_chunks/VvTextarea.es-BU2vqdEQ.js.map +1 -0
  58. package/dist/_chunks/{dist-BNET2z7b.js → dist-CvMCBce7.js} +39 -21
  59. package/dist/_chunks/dist-CvMCBce7.js.map +1 -0
  60. package/dist/_chunks/dot-prop-CObyt75F.js +141 -0
  61. package/dist/_chunks/dot-prop-CObyt75F.js.map +1 -0
  62. package/dist/_chunks/{floating-ui.vue-CIKvCpTA.js → floating-ui.vue-BacoFpVq.js} +278 -305
  63. package/dist/_chunks/floating-ui.vue-BacoFpVq.js.map +1 -0
  64. package/dist/_chunks/{index.es-u1dF1xg2.js → index.es-DpqfagWZ.js} +12 -12
  65. package/dist/_chunks/{index.es-u1dF1xg2.js.map → index.es-DpqfagWZ.js.map} +1 -1
  66. package/dist/_chunks/{index.es-BYny0uhz.js → index.es-_oXVRjHy.js} +2352 -2329
  67. package/dist/_chunks/index.es-_oXVRjHy.js.map +1 -0
  68. package/dist/ai-elements.es.js +4818 -5765
  69. package/dist/ai-elements.es.js.map +1 -1
  70. package/dist-vue/PkChatbot.js +1 -1
  71. package/dist-vue/PkChatbotAuth.js +1 -1
  72. package/dist-vue/PkChatbotEmptyState.js +1 -1
  73. package/dist-vue/PkChatbotFeedbackForm.js +1 -1
  74. package/dist-vue/PkChatbotInput.js +1 -1
  75. package/dist-vue/PkChatbotMessages.js +1 -1
  76. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  77. package/dist-vue/PkChatbotSteps.js +1 -1
  78. package/dist-vue/PkChatbotViewChat.js +1 -1
  79. package/dist-vue/PkChatbotViewConversations.js +1 -1
  80. package/dist-vue/PkChatbotViewFiles.js +1 -1
  81. package/dist-vue/PkChatbotViewProfile.js +1 -1
  82. package/dist-vue/_chunks/PkChatbot-Bf5uY3cO.js +236 -0
  83. package/dist-vue/_chunks/{PkChatbot-DHkhT0Jf.js.map → PkChatbot-Bf5uY3cO.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkChatbotAuth-C_L2xWuD.js → PkChatbotAuth-BGn2MDYD.js} +2 -2
  85. package/dist-vue/_chunks/{PkChatbotAuth-C_L2xWuD.js.map → PkChatbotAuth-BGn2MDYD.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkChatbotEmptyState-BGOC6vxr.js → PkChatbotEmptyState-CPqLqXek.js} +2 -2
  87. package/dist-vue/_chunks/{PkChatbotEmptyState-BGOC6vxr.js.map → PkChatbotEmptyState-CPqLqXek.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkChatbotFeedbackForm-BSe40qlc.js → PkChatbotFeedbackForm-C_y__RH8.js} +2 -2
  89. package/dist-vue/_chunks/{PkChatbotFeedbackForm-BSe40qlc.js.map → PkChatbotFeedbackForm-C_y__RH8.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkChatbotInput-DTazYlPd.js → PkChatbotInput-jvb0vuak.js} +2 -2
  91. package/dist-vue/_chunks/{PkChatbotInput-DTazYlPd.js.map → PkChatbotInput-jvb0vuak.js.map} +1 -1
  92. package/dist-vue/_chunks/PkChatbotMessages-B3G12zah.js +752 -0
  93. package/dist-vue/_chunks/PkChatbotMessages-B3G12zah.js.map +1 -0
  94. package/dist-vue/_chunks/{PkChatbotStepToolDetail-ldThv0t5.js → PkChatbotStepToolDetail-BVI72gyx.js} +2 -2
  95. package/dist-vue/_chunks/{PkChatbotStepToolDetail-ldThv0t5.js.map → PkChatbotStepToolDetail-BVI72gyx.js.map} +1 -1
  96. package/dist-vue/_chunks/PkChatbotSteps-BdU6YC_N.js +172 -0
  97. package/dist-vue/_chunks/{PkChatbotSteps-BpqdFhsG.js.map → PkChatbotSteps-BdU6YC_N.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkChatbotViewChat-C08TsXiL.js → PkChatbotViewChat-c0Ecpzoc.js} +68 -68
  99. package/dist-vue/_chunks/PkChatbotViewChat-c0Ecpzoc.js.map +1 -0
  100. package/dist-vue/_chunks/{PkChatbotViewConversations-BQZi5kSC.js → PkChatbotViewConversations-BfhRCA_1.js} +2 -2
  101. package/dist-vue/_chunks/{PkChatbotViewConversations-BQZi5kSC.js.map → PkChatbotViewConversations-BfhRCA_1.js.map} +1 -1
  102. package/dist-vue/_chunks/{PkChatbotViewFiles-TLKE_tRw.js → PkChatbotViewFiles-BipRoidH.js} +2 -2
  103. package/dist-vue/_chunks/{PkChatbotViewFiles-TLKE_tRw.js.map → PkChatbotViewFiles-BipRoidH.js.map} +1 -1
  104. package/dist-vue/_chunks/{PkChatbotViewProfile-B6ANZY96.js → PkChatbotViewProfile-DuLwYpGZ.js} +2 -2
  105. package/dist-vue/_chunks/{PkChatbotViewProfile-B6ANZY96.js.map → PkChatbotViewProfile-DuLwYpGZ.js.map} +1 -1
  106. package/{dist/_chunks/PkStreamingMarkdown-Djw604Ny.js → dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js} +344 -347
  107. package/dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js.map +1 -0
  108. package/dist-vue/_chunks/{PkToolShowArtifact-CTBwt4DN.js → PkToolShowArtifact-COwSXmF4.js} +2 -2
  109. package/dist-vue/_chunks/{PkToolShowArtifact-CTBwt4DN.js.map → PkToolShowArtifact-COwSXmF4.js.map} +1 -1
  110. package/dist-vue/_chunks/{PkToolShowContactForm-B6-MsExL.js → PkToolShowContactForm-DRRtCCxB.js} +10 -10
  111. package/dist-vue/_chunks/{PkToolShowContactForm-B6-MsExL.js.map → PkToolShowContactForm-DRRtCCxB.js.map} +1 -1
  112. package/dist-vue/_chunks/{PkToolShowForm-C-mWyeka.js → PkToolShowForm-j7Ha-0X3.js} +128 -102
  113. package/dist-vue/_chunks/PkToolShowForm-j7Ha-0X3.js.map +1 -0
  114. package/dist-vue/_chunks/{PkToolShowSources-CFh-i60o.js → PkToolShowSources-BVLw4W5l.js} +43 -43
  115. package/dist-vue/_chunks/{PkToolShowSources-CFh-i60o.js.map → PkToolShowSources-BVLw4W5l.js.map} +1 -1
  116. package/dist-vue/_chunks/{createChatbotApiClient-BOBdBxmf.js → createChatbotApiClient-IH6wBh4s.js} +148 -160
  117. package/dist-vue/_chunks/createChatbotApiClient-IH6wBh4s.js.map +1 -0
  118. package/dist-vue/_chunks/{index.es-XfWQ82pb.js → index.es-Bk1O0p8N.js} +166 -156
  119. package/dist-vue/_chunks/index.es-Bk1O0p8N.js.map +1 -0
  120. package/dist-vue/_chunks/{useChatbotStore-BJ-EDmND.js → useChatbotStore-C3uKi2FS.js} +114 -106
  121. package/dist-vue/_chunks/useChatbotStore-C3uKi2FS.js.map +1 -0
  122. package/dist-vue/_chunks/{utils-BMa8jwJS.js → utils-Cru8TJxe.js} +48 -30
  123. package/dist-vue/_chunks/utils-Cru8TJxe.js.map +1 -0
  124. package/dist-vue/api.js +1 -1
  125. package/dist-vue/composables.js +3 -3
  126. package/dist-vue/index.js +3732 -3213
  127. package/dist-vue/index.js.map +1 -1
  128. package/dist-vue/locales.js +43 -7
  129. package/dist-vue/packages/components/src/PkCheckboxField.d.ts +45 -0
  130. package/dist-vue/packages/components/src/PkEditorRepeater.d.ts +2 -2
  131. package/dist-vue/packages/components/src/{chat/PkToolRequestConfirm.d.ts → PkOfflineScreen.d.ts} +10 -3
  132. package/dist-vue/packages/components/src/PkPwaNotices.d.ts +19 -0
  133. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +18 -3
  134. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +24 -2
  135. package/dist-vue/packages/components/src/chat/PkToolApprovalBadge.d.ts +4 -0
  136. package/dist-vue/packages/components/src/chat/PkToolApprovalCard.d.ts +35 -0
  137. package/dist-vue/packages/components/src/chat/PkToolApprovalPreviewMessage.d.ts +11 -0
  138. package/dist-vue/packages/components/src/chat/index.d.ts +2 -1
  139. package/dist-vue/packages/components/src/chat/toolApprovalPreviews.d.ts +12 -0
  140. package/dist-vue/packages/components/src/chat/toolComponentMap.d.ts +5 -3
  141. package/dist-vue/packages/components/src/chat/useChatScroll.d.ts +6 -0
  142. package/dist-vue/packages/components/src/chat/utils.d.ts +13 -0
  143. package/dist-vue/packages/components/src/index.d.ts +4 -1
  144. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +70 -1
  145. package/dist-vue/packages/composable/src/index.d.ts +1 -0
  146. package/dist-vue/packages/composable/src/useConnectivity.d.ts +28 -0
  147. package/dist-vue/packages/models/src/schema/Agent.d.ts +129 -0
  148. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +30 -0
  149. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +30 -0
  150. package/dist-vue/style.css +1 -1
  151. package/package.json +3 -3
  152. package/dist/_chunks/PkStreamingMarkdown-Djw604Ny.js.map +0 -1
  153. package/dist/_chunks/PkToolRequestConfirm-FQ9nDFXy.js +0 -48
  154. package/dist/_chunks/PkToolRequestConfirm-FQ9nDFXy.js.map +0 -1
  155. package/dist/_chunks/PkToolShowForm-BNV4Ja6g.js.map +0 -1
  156. package/dist/_chunks/VvCombobox.es-CFA-K-cQ.js.map +0 -1
  157. package/dist/_chunks/VvInputText.es-csEQ-bSG.js.map +0 -1
  158. package/dist/_chunks/VvRadioGroup.es-CSNzOJKx.js.map +0 -1
  159. package/dist/_chunks/VvTextarea.es-eEyRRpuT.js +0 -1109
  160. package/dist/_chunks/VvTextarea.es-eEyRRpuT.js.map +0 -1
  161. package/dist/_chunks/dist-BNET2z7b.js.map +0 -1
  162. package/dist/_chunks/dot-prop-BXrC9bAX.js +0 -131
  163. package/dist/_chunks/dot-prop-BXrC9bAX.js.map +0 -1
  164. package/dist/_chunks/floating-ui.vue-CIKvCpTA.js.map +0 -1
  165. package/dist/_chunks/index.es-BYny0uhz.js.map +0 -1
  166. package/dist-vue/_chunks/PkChatbot-DHkhT0Jf.js +0 -236
  167. package/dist-vue/_chunks/PkChatbotMessages-B4qfTNOJ.js +0 -630
  168. package/dist-vue/_chunks/PkChatbotMessages-B4qfTNOJ.js.map +0 -1
  169. package/dist-vue/_chunks/PkChatbotSteps-BpqdFhsG.js +0 -172
  170. package/dist-vue/_chunks/PkChatbotViewChat-C08TsXiL.js.map +0 -1
  171. package/dist-vue/_chunks/PkStreamingMarkdown-DEhbK-3c.js.map +0 -1
  172. package/dist-vue/_chunks/PkToolRequestConfirm-CQNa3seA.js +0 -48
  173. package/dist-vue/_chunks/PkToolRequestConfirm-CQNa3seA.js.map +0 -1
  174. package/dist-vue/_chunks/PkToolShowForm-C-mWyeka.js.map +0 -1
  175. package/dist-vue/_chunks/createChatbotApiClient-BOBdBxmf.js.map +0 -1
  176. package/dist-vue/_chunks/index.es-XfWQ82pb.js.map +0 -1
  177. package/dist-vue/_chunks/useChatbotStore-BJ-EDmND.js.map +0 -1
  178. package/dist-vue/_chunks/utils-BMa8jwJS.js.map +0 -1
@@ -1,236 +0,0 @@
1
- import { t as e } from "./useChatbotStore-BJ-EDmND.js";
2
- import { t } from "./PkChatbotViewConversations-BQZi5kSC.js";
3
- import { t as n } from "./PkChatbotViewChat-C08TsXiL.js";
4
- import { t as r } from "./useShortUrlResolver-DI8ycJiO.js";
5
- import { t as ee } from "./PkChatbotViewFiles-TLKE_tRw.js";
6
- import { t as i } from "./useLocalizedString-PfaKjIQY.js";
7
- import { t as te } from "./PkStreamingMarkdown-DEhbK-3c.js";
8
- import { t as ne } from "./PkAvatar-CyIgsndA.js";
9
- import { d as a } from "./utils-BMa8jwJS.js";
10
- import { t as o } from "./chatbotProfileContext-CgnFhNPn.js";
11
- import { t as re } from "./PkChatbotViewProfile-B6ANZY96.js";
12
- import { VvAlert as ie, VvButton as ae, VvButtonGroup as oe, VvDropdown as se, VvDropdownAction as ce, VvIcon as le } from "@volverjs/ui-vue/components";
13
- import { Fragment as ue, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as f, createTextVNode as p, createVNode as m, defineComponent as h, guardReactiveProps as g, inject as _, mergeModels as v, mergeProps as de, normalizeClass as fe, normalizeProps as y, normalizeStyle as b, openBlock as x, renderList as S, renderSlot as C, toDisplayString as w, toRef as pe, unref as T, useModel as me, useSlots as he, watch as E, watchEffect as ge, withCtx as D } from "vue";
14
- import { useI18n as _e } from "vue-i18n";
15
- import { storeToRefs as ve } from "pinia";
16
- //#region ../../packages/components/src/chat/PkChatbot.vue?vue&type=script&setup=true&lang.ts
17
- var ye = { class: "pk-chatbot__header-start" }, be = ["title"], xe = { key: 1 }, Se = { class: "pk-chatbot__warning-body" }, O = { class: "pk-chatbot__warning-header" }, Ce = { class: "pk-chatbot__warning-title" }, k = { class: "pk-chatbot__warning-text" }, A = {
18
- key: 5,
19
- class: "pk-chatbot__view-auth flex-1 min-h-0 overflow-y-auto"
20
- }, we = {
21
- key: 7,
22
- class: "pk-chatbot__footer"
23
- }, j = /* @__PURE__ */ h({
24
- __name: "PkChatbot",
25
- props: /*@__PURE__*/ v({
26
- baseUrl: {},
27
- basePath: {},
28
- agentId: {},
29
- agentType: {},
30
- userId: {},
31
- name: {},
32
- model: {},
33
- agentModel: {},
34
- agentTools: {},
35
- agentInterface: {},
36
- actions: {},
37
- revisedAnswers: {},
38
- headers: {},
39
- systemTheme: {},
40
- agentFileUpload: {},
41
- fallbackModels: {},
42
- gatewayOptions: {},
43
- externalContext: {},
44
- modifier: {},
45
- userName: {},
46
- userFilesEnabled: { type: Boolean }
47
- }, {
48
- chatId: {
49
- type: String,
50
- default: void 0
51
- },
52
- chatIdModifiers: {}
53
- }),
54
- emits: /*@__PURE__*/ v([
55
- "message-update",
56
- "show-info",
57
- "revise",
58
- "error"
59
- ], ["update:chatId"]),
60
- setup(h, { expose: v, emit: j }) {
61
- let M = he(), { t: N } = _e({ useScope: "global" }), P = h, F = j, I = me(h, "chatId"), L = e(P.agentId);
62
- r((e) => L.apiClient.resolveShortUrls(e));
63
- let { messages: R, chat: Te, localChatId: z, activeView: B, chatError: Ee, isDark: De } = ve(L), V = pe(L, "agentId"), { startNewChat: H, stopGeneration: U, regenerate: Oe, navigate: W, sendMessage: ke } = L, G = _(o, void 0), K = s(() => G?.canManageProfile.value ?? !1), Ae = s(() => !K.value && (G?.canSignIn?.value ?? !1) && M["view-auth"] !== void 0);
64
- E(K, (e) => {
65
- e && B.value === "auth" && W("chat");
66
- }), ge(() => {
67
- L.baseUrl = P.baseUrl, L.basePath = P.basePath, L.name = P.name, L.agentType = P.agentType, L.userId = P.userId, L.agentInterface = P.agentInterface, L.agentModel = P.agentModel, L.agentTools = P.agentTools, L.headers = P.headers, L.revisedAnswers = P.revisedAnswers, L.model = P.model, L.actionsInput = P.actions, L.agentFileUpload = P.agentFileUpload, L.fallbackModels = P.fallbackModels, L.gatewayOptions = P.gatewayOptions, L.externalContext = P.externalContext, L.systemTheme = P.systemTheme, L.hideWelcomeMessage = P.modifier === "fullscreen";
68
- }), E(() => I.value, (e) => {
69
- e && e !== L.localChatId && (L.localChatId = e);
70
- }, { immediate: !0 }), E(z, (e) => {
71
- I.value = e;
72
- }), E(Ee, (e) => {
73
- if (e) try {
74
- let t = JSON.parse(e.message);
75
- F("error", t);
76
- } catch {}
77
- });
78
- let q = s(() => P.modifier === "fullscreen"), J = s(() => P.agentType === "reasoning"), Y = s(() => P.agentInterface?.useColorsForAgentHeader), je = s(() => ["theme", `theme--${De.value ? "dark" : "light"}`]), X = s(() => P.agentInterface?.mainColor), Z = s(() => a(P.agentInterface?.textColor, X.value)), Q = i(() => P.agentInterface?.footerMessage), $ = s(() => B.value === "conversations" ? N("label.conversations") : B.value === "profile" ? N("label.profile") : B.value === "auth" ? N("label.authentication") : B.value === "files" ? N("userFiles.chatFilesTitle") : P.name), Me = s(() => Te.value.status === "ready"), Ne = s(() => R.value?.[R.value.length - 1]);
79
- return v({
80
- startNewChat: H,
81
- regenerate: Oe,
82
- stopGeneration: U,
83
- sendMessage: ke
84
- }), E([V, z], async ([e, t]) => {
85
- await L.initialize(e, t);
86
- }, { immediate: !0 }), E(B, (e) => {
87
- e === "conversations" ? L.loadConversations(V.value) : e === "files" && L.loadChatFiles();
88
- }), E(Ne, (e) => {
89
- e && F("message-update", e);
90
- }, {
91
- deep: !0,
92
- immediate: !0
93
- }), (e, r) => {
94
- let i = ae, a = le, o = ce, s = se, _ = oe, v = ie;
95
- return x(), u("div", { class: fe(["pk-chatbot", [je.value, { "pk-chatbot--fullscreen": q.value }]]) }, [
96
- q.value ? l("", !0) : (x(), u("div", {
97
- key: 0,
98
- class: "pk-chatbot__header",
99
- style: b(Y.value ? { backgroundColor: X.value } : void 0)
100
- }, [d("div", ye, [T(B) === "chat" ? (x(), c(ne, {
101
- key: 1,
102
- modifiers: "surface ring shrink-0",
103
- class: "pk-chatbot__avatar",
104
- name: h.name,
105
- "img-src": h.agentInterface?.logo
106
- }, null, 8, ["name", "img-src"])) : (x(), u(ue, { key: 0 }, [m(i, de({
107
- modifiers: Y.value ? `action-quiet-${Z.value}` : "action-quiet",
108
- icon: "ri:arrow-left-s-line",
109
- title: T(N)("action.goBack")
110
- }, { onClick: r[0] ||= (e) => T(W)("chat") }), null, 16), m(a, {
111
- name: T(B) === "conversations" ? "ri:history-line" : T(B) === "files" ? "ri:attachment-2" : "ri:user-line",
112
- class: "pk-chatbot__nav-icon",
113
- style: b(Y.value ? { color: Z.value } : void 0)
114
- }, null, 8, ["name", "style"])], 64)), d("strong", {
115
- class: "pk-chatbot__title",
116
- title: $.value,
117
- style: b(Y.value ? { color: Z.value } : void 0)
118
- }, w($.value), 13, be)]), m(_, {
119
- class: "pk-chatbot__header-end",
120
- modifiers: "compact"
121
- }, {
122
- default: D(() => [
123
- C(e.$slots, "header-actions", y(g({
124
- mainColor: X.value,
125
- useColorsForAgentHeader: Y.value,
126
- contrastColor: Z.value,
127
- startNewChat: T(H),
128
- stopGeneration: T(U)
129
- }))),
130
- m(s, y(g({
131
- placement: "bottom-end",
132
- modifiers: "menu",
133
- flip: !0,
134
- offset: 3,
135
- strategy: "fixed"
136
- })), {
137
- items: D(() => [
138
- m(o, { onClick: r[1] ||= (e) => T(H)() }, {
139
- default: D(() => [m(a, { name: "ri:edit-box-line" }), p(" " + w(T(N)("action.startNewChat")), 1)]),
140
- _: 1
141
- }),
142
- J.value ? l("", !0) : (x(), c(o, {
143
- key: 0,
144
- onClick: r[2] ||= (e) => T(W)("conversations")
145
- }, {
146
- default: D(() => [m(a, { name: "ri:history-line" }), p(" " + w(T(N)("action.viewRecentChats")), 1)]),
147
- _: 1
148
- })),
149
- (K.value || h.userFilesEnabled) && T(z) ? (x(), c(o, {
150
- key: 1,
151
- onClick: r[3] ||= (e) => T(W)("files")
152
- }, {
153
- default: D(() => [m(a, { name: "ri:attachment-2" }), p(" " + w(T(N)("userFiles.chatFilesTitle")), 1)]),
154
- _: 1
155
- })) : l("", !0),
156
- K.value ? (x(), c(o, {
157
- key: 2,
158
- onClick: r[4] ||= (e) => T(W)("profile")
159
- }, {
160
- default: D(() => [m(a, { name: "ri:user-line" }), p(" " + w(T(N)("label.profile")), 1)]),
161
- _: 1
162
- })) : Ae.value ? (x(), c(o, {
163
- key: 3,
164
- onClick: r[5] ||= (e) => T(W)("auth")
165
- }, {
166
- default: D(() => [m(a, { name: "ri:account-circle-line" }), p(" " + w(T(N)("action.signIn")), 1)]),
167
- _: 1
168
- })) : l("", !0)
169
- ]),
170
- default: D(() => [m(i, y(g({
171
- modifiers: Y.value ? `action-quiet-${Z.value}` : "action-quiet",
172
- icon: "ri:more-2-fill",
173
- disabled: !Me.value,
174
- title: T(N)("action.moreActions")
175
- })), null, 16)]),
176
- _: 1
177
- }, 16),
178
- C(e.$slots, "actions", y(g({
179
- mainColor: X.value,
180
- useColorsForAgentHeader: Y.value,
181
- contrastColor: Z.value,
182
- startNewChat: T(H),
183
- stopGeneration: T(U)
184
- })))
185
- ]),
186
- _: 3
187
- })], 4)),
188
- J.value ? (x(), u("div", xe, [d("div", Se, [m(v, { modifiers: "callout" }, {
189
- default: D(() => [d("div", O, [m(a, {
190
- name: "ri:alert-line",
191
- class: "pk-chatbot__warning-icon"
192
- }), d("strong", Ce, w(T(N)("message.warning")), 1)]), d("p", k, w(T(N)("message.reasoningAgent")), 1)]),
193
- _: 1
194
- })])])) : l("", !0),
195
- T(B) === "chat" ? (x(), c(n, {
196
- key: 2,
197
- "agent-id": h.agentId,
198
- modifier: h.modifier,
199
- "user-name": h.userName,
200
- onShowInfo: r[6] ||= (e) => F("show-info", e),
201
- onRevise: r[7] ||= (e) => F("revise", e)
202
- }, f({ _: 2 }, [S(Object.keys(T(M)), (t) => ({
203
- name: t,
204
- fn: D((n) => [C(e.$slots, t, y(g(n)))])
205
- }))]), 1032, [
206
- "agent-id",
207
- "modifier",
208
- "user-name"
209
- ])) : T(B) === "conversations" ? (x(), c(t, {
210
- key: 3,
211
- "agent-id": h.agentId
212
- }, f({ _: 2 }, [S(Object.keys(T(M)), (t) => ({
213
- name: t,
214
- fn: D((n) => [C(e.$slots, t, y(g(n)))])
215
- }))]), 1032, ["agent-id"])) : T(B) === "files" ? (x(), c(ee, {
216
- key: 4,
217
- "agent-id": h.agentId
218
- }, null, 8, ["agent-id"])) : T(B) === "auth" ? (x(), u("div", A, [C(e.$slots, "view-auth")])) : (x(), c(re, {
219
- key: 6,
220
- "agent-id": h.agentId
221
- }, f({ _: 2 }, [S(Object.keys(T(M)), (t) => ({
222
- name: t,
223
- fn: D((n) => [C(e.$slots, t, y(g(n)))])
224
- }))]), 1032, ["agent-id"])),
225
- T(Q) ? (x(), u("div", we, [m(te, {
226
- markdown: T(Q),
227
- class: "wysiwyg"
228
- }, null, 8, ["markdown"])])) : l("", !0)
229
- ], 2);
230
- };
231
- }
232
- });
233
- //#endregion
234
- export { j as t };
235
-
236
- //# sourceMappingURL=PkChatbot-DHkhT0Jf.js.map