@8wave/ai-elements 0.111.0-beta.3 → 0.111.0-beta.8

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 (209) hide show
  1. package/dist/_chunks/{Agent-Su_LDF9_.js → Agent-tE7ZJPxG.js} +80 -78
  2. package/dist/_chunks/Agent-tE7ZJPxG.js.map +1 -0
  3. package/dist/_chunks/{Document-DecVclEe.js → Document-Bmx6774B.js} +33 -21
  4. package/dist/_chunks/Document-Bmx6774B.js.map +1 -0
  5. package/dist/_chunks/Media-Cft7Pwrh.js +108 -0
  6. package/dist/_chunks/Media-Cft7Pwrh.js.map +1 -0
  7. package/dist/_chunks/{PkLazyImg-ClL4nr95.js → PkLazyImg-Dbj2dDXA.js} +2 -2
  8. package/dist/_chunks/{PkLazyImg-ClL4nr95.js.map → PkLazyImg-Dbj2dDXA.js.map} +1 -1
  9. package/dist/_chunks/{PkStreamingMarkdown-CwqsJnJJ.js → PkStreamingMarkdown-CNI8aV8t.js} +636 -427
  10. package/dist/_chunks/PkStreamingMarkdown-CNI8aV8t.js.map +1 -0
  11. package/dist/_chunks/{PkToolRequestGeolocation-OokLeTf1.js → PkToolRequestGeolocation-Bzy4IYSp.js} +3 -3
  12. package/{dist-vue/_chunks/PkToolRequestGeolocation-Bxqz9oSo.js.map → dist/_chunks/PkToolRequestGeolocation-Bzy4IYSp.js.map} +1 -1
  13. package/dist/_chunks/{PkToolRequestOAuthConnection-CtqKG6Yb.js → PkToolRequestOAuthConnection-CWEKoD71.js} +3 -3
  14. package/dist/_chunks/{PkToolRequestOAuthConnection-CtqKG6Yb.js.map → PkToolRequestOAuthConnection-CWEKoD71.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowArtifact-M6jlSmyJ.js → PkToolShowArtifact-CGbHDEie.js} +4 -4
  16. package/dist/_chunks/{PkToolShowArtifact-M6jlSmyJ.js.map → PkToolShowArtifact-CGbHDEie.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowCalendarEvent-C41JgOUA.js → PkToolShowCalendarEvent-DIFX_rUz.js} +3 -3
  18. package/dist/_chunks/{PkToolShowCalendarEvent-C41JgOUA.js.map → PkToolShowCalendarEvent-DIFX_rUz.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowComparison-DbbUD9pg.js → PkToolShowComparison-B38hHWq2.js} +3 -3
  20. package/dist/_chunks/{PkToolShowComparison-DbbUD9pg.js.map → PkToolShowComparison-B38hHWq2.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowContactForm-D_dW59Dl.js → PkToolShowContactForm-DUw_bZiJ.js} +4 -4
  22. package/dist/_chunks/{PkToolShowContactForm-D_dW59Dl.js.map → PkToolShowContactForm-DUw_bZiJ.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowDiagram-BdmG9gm8.js → PkToolShowDiagram-Dx1Ba0PG.js} +3 -3
  24. package/dist/_chunks/PkToolShowDiagram-Dx1Ba0PG.js.map +1 -0
  25. package/dist/_chunks/{PkToolShowEmail-Dn3JHYIR.js → PkToolShowEmail-DnFFgzom.js} +3 -3
  26. package/dist/_chunks/{PkToolShowEmail-Dn3JHYIR.js.map → PkToolShowEmail-DnFFgzom.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowForm-DbJHMDbt.js → PkToolShowForm-CKQQltJ6.js} +6 -7
  28. package/dist/_chunks/PkToolShowForm-CKQQltJ6.js.map +1 -0
  29. package/dist/_chunks/{PkToolShowImageGallery-C1lzlO0y.js → PkToolShowImageGallery-D99N_Plf.js} +2 -2
  30. package/dist/_chunks/{PkToolShowImageGallery-C1lzlO0y.js.map → PkToolShowImageGallery-D99N_Plf.js.map} +1 -1
  31. package/dist/_chunks/{PkToolShowLocation-CKhPxKFA.js → PkToolShowLocation-AfnrtFVJ.js} +3 -3
  32. package/dist/_chunks/{PkToolShowLocation-CKhPxKFA.js.map → PkToolShowLocation-AfnrtFVJ.js.map} +1 -1
  33. package/dist/_chunks/{PkToolShowMessage-U9CCU7eG.js → PkToolShowMessage-DUo2c-im.js} +3 -3
  34. package/dist/_chunks/{PkToolShowMessage-U9CCU7eG.js.map → PkToolShowMessage-DUo2c-im.js.map} +1 -1
  35. package/dist/_chunks/{PkToolShowProductList-UeiRMLHu.js → PkToolShowProductList-BN6Qk1_y.js} +3 -3
  36. package/dist/_chunks/{PkToolShowProductList-UeiRMLHu.js.map → PkToolShowProductList-BN6Qk1_y.js.map} +1 -1
  37. package/dist/_chunks/{PkToolShowQrCode-CypLrfh5.js → PkToolShowQrCode-BLqeBecX.js} +3 -3
  38. package/dist/_chunks/{PkToolShowQrCode-CypLrfh5.js.map → PkToolShowQrCode-BLqeBecX.js.map} +1 -1
  39. package/dist/_chunks/{PkToolShowSources-Dot-W0Mj.js → PkToolShowSources-DpZb5FUP.js} +4 -4
  40. package/dist/_chunks/{PkToolShowSources-Dot-W0Mj.js.map → PkToolShowSources-DpZb5FUP.js.map} +1 -1
  41. package/dist/_chunks/{PkToolShowSuggestedReply-CKxSH0Y9.js → PkToolShowSuggestedReply-C10nNgBs.js} +3 -3
  42. package/dist/_chunks/{PkToolShowSuggestedReply-CKxSH0Y9.js.map → PkToolShowSuggestedReply-C10nNgBs.js.map} +1 -1
  43. package/dist/_chunks/{PkToolShowVideo-BgKxdBcC.js → PkToolShowVideo-S9b4QHUj.js} +2 -2
  44. package/dist/_chunks/{PkToolShowVideo-BgKxdBcC.js.map → PkToolShowVideo-S9b4QHUj.js.map} +1 -1
  45. package/dist/_chunks/{PkToolShowWeather-LPd3tC77.js → PkToolShowWeather-CqhG430w.js} +2 -2
  46. package/dist/_chunks/PkToolShowWeather-CqhG430w.js.map +1 -0
  47. package/dist/_chunks/{PkToolShowWebPages-ep_erFF0.js → PkToolShowWebPages-txAZi_iG.js} +3 -3
  48. package/dist/_chunks/{PkToolShowWebPages-ep_erFF0.js.map → PkToolShowWebPages-txAZi_iG.js.map} +1 -1
  49. package/dist/_chunks/PkUrl-BPbjZJ1A.js.map +1 -1
  50. package/dist/_chunks/{VvCheckboxGroup.es-Bdu2gFLN.js → VvCheckboxGroup.es-CTrF3pue.js} +2 -2
  51. package/dist/_chunks/{VvCheckboxGroup.es-Bdu2gFLN.js.map → VvCheckboxGroup.es-CTrF3pue.js.map} +1 -1
  52. package/dist/_chunks/{VvCombobox.es-C0wpJIr_.js → VvCombobox.es-BWiXmQ_S.js} +10 -10
  53. package/dist/_chunks/{VvCombobox.es-C0wpJIr_.js.map → VvCombobox.es-BWiXmQ_S.js.map} +1 -1
  54. package/dist/_chunks/{VvInputText.es-Zgtw2YNw.js → VvInputText.es-Bo9I6g8H.js} +6 -6
  55. package/dist/_chunks/{VvInputText.es-Zgtw2YNw.js.map → VvInputText.es-Bo9I6g8H.js.map} +1 -1
  56. package/dist/_chunks/{VvRadioGroup.es-DZLL19SC.js → VvRadioGroup.es-9ooHCuik.js} +2 -2
  57. package/dist/_chunks/{VvRadioGroup.es-DZLL19SC.js.map → VvRadioGroup.es-9ooHCuik.js.map} +1 -1
  58. package/dist/_chunks/{VvSelect.es-ovnZRHG5.js → VvSelect.es-DG0VuWtP.js} +2 -2
  59. package/dist/_chunks/{VvSelect.es-ovnZRHG5.js.map → VvSelect.es-DG0VuWtP.js.map} +1 -1
  60. package/dist/_chunks/{VvTextarea.es-DbP5Lt2T.js → VvTextarea.es-Dg3pxdZy.js} +6 -6
  61. package/dist/_chunks/{VvTextarea.es-DbP5Lt2T.js.map → VvTextarea.es-Dg3pxdZy.js.map} +1 -1
  62. package/dist/_chunks/{browser-NgY6LXg-.js → browser-B0Xnbqi7.js} +726 -751
  63. package/dist/_chunks/browser-B0Xnbqi7.js.map +1 -0
  64. package/dist/_chunks/{dist-n5iFNYf-.js → dist-QdjZA6MJ.js} +143 -133
  65. package/dist/_chunks/{dist-n5iFNYf-.js.map → dist-QdjZA6MJ.js.map} +1 -1
  66. package/dist/_chunks/{index.es-dtdl3VFG.js → index.es-0YpCa4c5.js} +6 -6
  67. package/dist/_chunks/{index.es-dtdl3VFG.js.map → index.es-0YpCa4c5.js.map} +1 -1
  68. package/dist/_chunks/{index.es-BJnUA_36.js → index.es-CHkJ2TMJ.js} +10 -10
  69. package/dist/_chunks/{index.es-BJnUA_36.js.map → index.es-CHkJ2TMJ.js.map} +1 -1
  70. package/dist/_chunks/text-DbSEK8si.js.map +1 -1
  71. package/dist/ai-elements.es.js +3064 -3094
  72. package/dist/ai-elements.es.js.map +1 -1
  73. package/dist-vue/PkChatbot.js +1 -1
  74. package/dist-vue/PkChatbotEmptyState.js +1 -1
  75. package/dist-vue/PkChatbotError.js +1 -1
  76. package/dist-vue/PkChatbotInput.js +1 -1
  77. package/dist-vue/PkChatbotMessages.js +1 -1
  78. package/dist-vue/PkChatbotStepPayload.js +1 -1
  79. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  80. package/dist-vue/PkChatbotSteps.js +1 -1
  81. package/dist-vue/PkChatbotViewChat.js +1 -1
  82. package/dist-vue/PkChatbotViewConversations.js +1 -1
  83. package/dist-vue/PkChatbotViewFiles.js +1 -1
  84. package/dist-vue/PkChatbotViewProfile.js +1 -1
  85. package/dist-vue/_chunks/{Agent-C8BsTAxk.js → Agent-De2gFNjR.js} +165 -176
  86. package/dist-vue/_chunks/Agent-De2gFNjR.js.map +1 -0
  87. package/dist-vue/_chunks/{Document-CaUfI_SZ.js → Document-8umjeTVS.js} +84 -72
  88. package/dist-vue/_chunks/Document-8umjeTVS.js.map +1 -0
  89. package/dist-vue/_chunks/Media-_HfFLHGD.js.map +1 -1
  90. package/dist-vue/_chunks/{PkChatbot-BPKSPIeC.js → PkChatbot-DE1bKmDi.js} +61 -61
  91. package/dist-vue/_chunks/PkChatbot-DE1bKmDi.js.map +1 -0
  92. package/dist-vue/_chunks/{PkChatbotEmptyState-BvaeBxhx.js → PkChatbotEmptyState-BtzBYOHJ.js} +2 -2
  93. package/dist-vue/_chunks/{PkChatbotEmptyState-BvaeBxhx.js.map → PkChatbotEmptyState-BtzBYOHJ.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkChatbotError-CBP2mf-n.js → PkChatbotError-gvDpRcEz.js} +21 -19
  95. package/dist-vue/_chunks/PkChatbotError-gvDpRcEz.js.map +1 -0
  96. package/dist-vue/_chunks/{PkChatbotInput-JnHaRlfk.js → PkChatbotInput-MSpF6SB6.js} +139 -124
  97. package/dist-vue/_chunks/PkChatbotInput-MSpF6SB6.js.map +1 -0
  98. package/dist-vue/_chunks/PkChatbotMessages-B6ONEJnZ.js +776 -0
  99. package/dist-vue/_chunks/PkChatbotMessages-B6ONEJnZ.js.map +1 -0
  100. package/dist-vue/_chunks/{PkChatbotStepPayload-BH6piqOi.js → PkChatbotStepPayload-XW4gT9AZ.js} +2 -2
  101. package/dist-vue/_chunks/{PkChatbotStepPayload-BH6piqOi.js.map → PkChatbotStepPayload-XW4gT9AZ.js.map} +1 -1
  102. package/dist-vue/_chunks/{PkChatbotStepToolDetail-BJ7xUvgi.js → PkChatbotStepToolDetail-C4-K6Glw.js} +3 -3
  103. package/dist-vue/_chunks/{PkChatbotStepToolDetail-BJ7xUvgi.js.map → PkChatbotStepToolDetail-C4-K6Glw.js.map} +1 -1
  104. package/dist-vue/_chunks/PkChatbotSteps-CrqjWpv0.js +190 -0
  105. package/dist-vue/_chunks/PkChatbotSteps-CrqjWpv0.js.map +1 -0
  106. package/dist-vue/_chunks/{PkChatbotViewChat-CEqzF1G9.js → PkChatbotViewChat-BMQtx1Gi.js} +10 -10
  107. package/dist-vue/_chunks/{PkChatbotViewChat-CEqzF1G9.js.map → PkChatbotViewChat-BMQtx1Gi.js.map} +1 -1
  108. package/dist-vue/_chunks/{PkChatbotViewConversations-C787v5ll.js → PkChatbotViewConversations-3LaZPFyw.js} +2 -2
  109. package/dist-vue/_chunks/{PkChatbotViewConversations-C787v5ll.js.map → PkChatbotViewConversations-3LaZPFyw.js.map} +1 -1
  110. package/dist-vue/_chunks/{PkChatbotViewFiles-CNFLt8YO.js → PkChatbotViewFiles-CTqnbsCj.js} +3 -3
  111. package/dist-vue/_chunks/{PkChatbotViewFiles-CNFLt8YO.js.map → PkChatbotViewFiles-CTqnbsCj.js.map} +1 -1
  112. package/dist-vue/_chunks/{PkChatbotViewProfile-7p0ci3qm.js → PkChatbotViewProfile-B-Mp1jGQ.js} +2 -2
  113. package/dist-vue/_chunks/{PkChatbotViewProfile-7p0ci3qm.js.map → PkChatbotViewProfile-B-Mp1jGQ.js.map} +1 -1
  114. package/dist-vue/_chunks/PkRelativeTime--1cIphlA.js.map +1 -1
  115. package/dist-vue/_chunks/{PkStreamingMarkdown-D8_LwZMR.js → PkStreamingMarkdown-D0IOaETI.js} +432 -419
  116. package/dist-vue/_chunks/PkStreamingMarkdown-D0IOaETI.js.map +1 -0
  117. package/dist-vue/_chunks/PkSvgViewer-D-0M5bqg.js.map +1 -1
  118. package/dist-vue/_chunks/{PkToolRequestGeolocation-Bxqz9oSo.js → PkToolRequestGeolocation-Q3N3jlO8.js} +2 -2
  119. package/{dist/_chunks/PkToolRequestGeolocation-OokLeTf1.js.map → dist-vue/_chunks/PkToolRequestGeolocation-Q3N3jlO8.js.map} +1 -1
  120. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C6rXgb0s.js → PkToolRequestOAuthConnection-C0LW5Evp.js} +2 -2
  121. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C6rXgb0s.js.map → PkToolRequestOAuthConnection-C0LW5Evp.js.map} +1 -1
  122. package/dist-vue/_chunks/{PkToolShowArtifact-CEXdfOGG.js → PkToolShowArtifact-DHdJuzDi.js} +2 -2
  123. package/dist-vue/_chunks/{PkToolShowArtifact-CEXdfOGG.js.map → PkToolShowArtifact-DHdJuzDi.js.map} +1 -1
  124. package/dist-vue/_chunks/{PkToolShowContactForm-DHmzAIVF.js → PkToolShowContactForm-BB2X4UdQ.js} +2 -2
  125. package/dist-vue/_chunks/{PkToolShowContactForm-DHmzAIVF.js.map → PkToolShowContactForm-BB2X4UdQ.js.map} +1 -1
  126. package/dist-vue/_chunks/{PkToolShowDiagram-dwCVZ1up.js → PkToolShowDiagram-BH6ihikd.js} +2 -2
  127. package/dist-vue/_chunks/PkToolShowDiagram-BH6ihikd.js.map +1 -0
  128. package/dist-vue/_chunks/{PkToolShowEmail-CavhsPvi.js → PkToolShowEmail-DF__nKpR.js} +2 -2
  129. package/dist-vue/_chunks/{PkToolShowEmail-CavhsPvi.js.map → PkToolShowEmail-DF__nKpR.js.map} +1 -1
  130. package/dist-vue/_chunks/{PkToolShowForm-CO5A_j9L.js → PkToolShowForm-DUKIyj9V.js} +6 -6
  131. package/dist-vue/_chunks/PkToolShowForm-DUKIyj9V.js.map +1 -0
  132. package/dist-vue/_chunks/{PkToolShowMessage-DQojxDiV.js → PkToolShowMessage-Ck6VP-gw.js} +2 -2
  133. package/dist-vue/_chunks/{PkToolShowMessage-DQojxDiV.js.map → PkToolShowMessage-Ck6VP-gw.js.map} +1 -1
  134. package/dist-vue/_chunks/{PkToolShowProductList-Cn0yewM3.js → PkToolShowProductList-zfM8cx-l.js} +2 -2
  135. package/dist-vue/_chunks/{PkToolShowProductList-Cn0yewM3.js.map → PkToolShowProductList-zfM8cx-l.js.map} +1 -1
  136. package/dist-vue/_chunks/{PkToolShowSources-7Q5Iogxi.js → PkToolShowSources-Dlaz2Y77.js} +4 -4
  137. package/dist-vue/_chunks/{PkToolShowSources-7Q5Iogxi.js.map → PkToolShowSources-Dlaz2Y77.js.map} +1 -1
  138. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DQFOVonE.js → PkToolShowSuggestedReply-DWLkUh2L.js} +2 -2
  139. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DQFOVonE.js.map → PkToolShowSuggestedReply-DWLkUh2L.js.map} +1 -1
  140. package/dist-vue/_chunks/PkToolShowWeather-Bzqalzh8.js.map +1 -1
  141. package/dist-vue/_chunks/{PkToolShowWebPages-Bzkkn9GV.js → PkToolShowWebPages-CosBYLrE.js} +2 -2
  142. package/dist-vue/_chunks/{PkToolShowWebPages-Bzkkn9GV.js.map → PkToolShowWebPages-CosBYLrE.js.map} +1 -1
  143. package/dist-vue/_chunks/{PkUrl-xUBKVJCv.js → PkUrl-B5CNTQj9.js} +2 -2
  144. package/dist-vue/_chunks/PkUrl-B5CNTQj9.js.map +1 -0
  145. package/dist-vue/_chunks/{createChatbotApiClient-D9f69brW.js → createChatbotApiClient-MkaPbGWB.js} +2 -2
  146. package/dist-vue/_chunks/createChatbotApiClient-MkaPbGWB.js.map +1 -0
  147. package/dist-vue/_chunks/{useChatbotStore-9Cw_oR6J.js → useChatbotStore-BzfqjiYz.js} +6 -3
  148. package/dist-vue/_chunks/useChatbotStore-BzfqjiYz.js.map +1 -0
  149. package/dist-vue/_chunks/useDialogConfirm-KWz0ohCQ.js.map +1 -1
  150. package/dist-vue/_chunks/{utils-Coqik0XI.js → utils-C1666_6C.js} +58 -43
  151. package/dist-vue/_chunks/utils-C1666_6C.js.map +1 -0
  152. package/dist-vue/api.js +1 -1
  153. package/dist-vue/composables.js +3 -3
  154. package/dist-vue/index.js +3853 -3485
  155. package/dist-vue/index.js.map +1 -1
  156. package/dist-vue/locales.js +36 -8
  157. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +20 -3
  158. package/dist-vue/packages/components/src/chat/PkChatButton.d.ts +3 -2
  159. package/dist-vue/packages/components/src/chat/PkLanguageModel.d.ts +26 -2
  160. package/dist-vue/packages/components/src/chat/PkLanguageModelCombobox.d.ts +53 -1
  161. package/dist-vue/packages/components/src/chat/PkModelOption.d.ts +19 -0
  162. package/dist-vue/packages/components/src/chat/PkReasoningSettings.d.ts +6 -0
  163. package/dist-vue/packages/components/src/chat/PkStreamingMarkdown.d.ts +6 -0
  164. package/dist-vue/packages/components/src/chat/PkStreamingMarkdownAutoscroll.d.ts +1 -0
  165. package/dist-vue/packages/components/src/chat/constants.d.ts +5 -18
  166. package/dist-vue/packages/components/src/chat/index.d.ts +3 -1
  167. package/dist-vue/packages/components/src/chat/modelCatalog.d.ts +46 -0
  168. package/dist-vue/packages/components/src/chat/utils.d.ts +16 -0
  169. package/dist-vue/packages/components/src/table/PkTableSortable.d.ts +5 -1
  170. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +18 -0
  171. package/dist-vue/packages/composable/src/useChatbotError.d.ts +2 -0
  172. package/dist-vue/packages/models/src/schema/Agent.d.ts +70 -10
  173. package/dist-vue/packages/models/src/schema/Chat.d.ts +10 -0
  174. package/dist-vue/packages/models/src/schema/ModelProvider.d.ts +316 -0
  175. package/dist-vue/packages/models/src/schema/Organization.d.ts +142 -2
  176. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +20 -0
  177. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +20 -0
  178. package/dist-vue/packages/models/src/schema/UserOverview.d.ts +41 -0
  179. package/dist-vue/packages/models/src/schema/constants.d.ts +56 -91
  180. package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
  181. package/dist-vue/style.css +1 -1
  182. package/package.json +1 -1
  183. package/dist/_chunks/Agent-Su_LDF9_.js.map +0 -1
  184. package/dist/_chunks/Document-DecVclEe.js.map +0 -1
  185. package/dist/_chunks/Media-C6SOQfJZ.js +0 -122
  186. package/dist/_chunks/Media-C6SOQfJZ.js.map +0 -1
  187. package/dist/_chunks/PkStreamingMarkdown-CwqsJnJJ.js.map +0 -1
  188. package/dist/_chunks/PkToolShowDiagram-BdmG9gm8.js.map +0 -1
  189. package/dist/_chunks/PkToolShowForm-DbJHMDbt.js.map +0 -1
  190. package/dist/_chunks/PkToolShowWeather-LPd3tC77.js.map +0 -1
  191. package/dist/_chunks/browser-NgY6LXg-.js.map +0 -1
  192. package/dist/_chunks/utils-YJ0ZOLDG.js +0 -185
  193. package/dist/_chunks/utils-YJ0ZOLDG.js.map +0 -1
  194. package/dist-vue/_chunks/Agent-C8BsTAxk.js.map +0 -1
  195. package/dist-vue/_chunks/Document-CaUfI_SZ.js.map +0 -1
  196. package/dist-vue/_chunks/PkChatbot-BPKSPIeC.js.map +0 -1
  197. package/dist-vue/_chunks/PkChatbotError-CBP2mf-n.js.map +0 -1
  198. package/dist-vue/_chunks/PkChatbotInput-JnHaRlfk.js.map +0 -1
  199. package/dist-vue/_chunks/PkChatbotMessages-DAlkoMkY.js +0 -771
  200. package/dist-vue/_chunks/PkChatbotMessages-DAlkoMkY.js.map +0 -1
  201. package/dist-vue/_chunks/PkChatbotSteps-rommD48p.js +0 -180
  202. package/dist-vue/_chunks/PkChatbotSteps-rommD48p.js.map +0 -1
  203. package/dist-vue/_chunks/PkStreamingMarkdown-D8_LwZMR.js.map +0 -1
  204. package/dist-vue/_chunks/PkToolShowDiagram-dwCVZ1up.js.map +0 -1
  205. package/dist-vue/_chunks/PkToolShowForm-CO5A_j9L.js.map +0 -1
  206. package/dist-vue/_chunks/PkUrl-xUBKVJCv.js.map +0 -1
  207. package/dist-vue/_chunks/createChatbotApiClient-D9f69brW.js.map +0 -1
  208. package/dist-vue/_chunks/useChatbotStore-9Cw_oR6J.js.map +0 -1
  209. package/dist-vue/_chunks/utils-Coqik0XI.js.map +0 -1
@@ -1,771 +0,0 @@
1
- import { D as e } from "./Agent-C8BsTAxk.js";
2
- import { t } from "./PkChatbotError-CBP2mf-n.js";
3
- import { t as n } from "./PkStreamingMarkdown-D8_LwZMR.js";
4
- import "./src-DT8FLE4_.js";
5
- import { a as r, c as i, o as a, r as o, s, t as c } from "./message-RohfrdWS.js";
6
- import { t as l } from "./PkRelativeTime--1cIphlA.js";
7
- import { t as u } from "./PkChatbotFilePreview-CwiVQDF2.js";
8
- import { t as d } from "./PkChatbotFeedbackForm-DO1QIgmo.js";
9
- import { t as f } from "./PkChatbotMessageFeedback-BYmrVaCE.js";
10
- import { _ as p, c as m, g as h, l as g, m as ee, o as _, s as v, t as y, u as te, v as b, y as ne } from "./utils-Coqik0XI.js";
11
- import { n as re, t as ie } from "./PkChatbotSteps-rommD48p.js";
12
- import { t as x } from "./PkChatbotOutlineRail-np4g6vsz.js";
13
- import { VvButton as S, VvButtonGroup as C, VvIcon as ae } from "@volverjs/ui-vue/components";
14
- import { Fragment as w, Transition as T, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createTextVNode as oe, createVNode as j, defineAsyncComponent as M, defineComponent as N, mergeProps as se, nextTick as P, normalizeClass as F, normalizeStyle as ce, onBeforeUnmount as I, onMounted as le, openBlock as L, ref as R, renderList as ue, renderSlot as de, resolveDynamicComponent as fe, toDisplayString as z, unref as B, useSlots as pe, useTemplateRef as me, watch as V, withCtx as H, withModifiers as U } from "vue";
15
- import { useI18n as he } from "vue-i18n";
16
- //#region ../../packages/utils/src/text.ts
17
- var W = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), ge = (e) => e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[-_]+/g, " ") : "", _e = (e) => e ? W(e).replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase() : "", ve = (e) => e ? W(e).replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").toLowerCase() : "", ye = (e) => e ? e.charAt(0).toUpperCase() + e.slice(1) : "", be = {
18
- requestOAuthConnection: M(() => import("./PkToolRequestOAuthConnection-C6rXgb0s.js")),
19
- showArtifact: M(() => import("./PkToolShowArtifact-CEXdfOGG.js").then((e) => e.n)),
20
- showCalendarEvent: M(() => import("./PkToolShowCalendarEvent-BsBdsbV0.js").then((e) => e.n)),
21
- showComparison: M(() => import("./PkToolShowComparison-DMSjIpCR.js").then((e) => e.n)),
22
- showContactForm: M(() => import("./PkToolShowContactForm-DHmzAIVF.js").then((e) => e.n)),
23
- showDiagram: M(() => import("./PkToolShowDiagram-dwCVZ1up.js")),
24
- showEmail: M(() => import("./PkToolShowEmail-CavhsPvi.js").then((e) => e.n)),
25
- showImageGallery: M(() => import("./PkToolShowImageGallery-DudQzBx4.js").then((e) => e.n)),
26
- showLocation: M(() => import("./PkToolShowLocation-Bv6sLN5P.js").then((e) => e.n)),
27
- showMessage: M(() => import("./PkToolShowMessage-DQojxDiV.js").then((e) => e.n)),
28
- showForm: M(() => import("./PkToolShowForm-CO5A_j9L.js").then((e) => e.n)),
29
- showMultipleChoice: M(() => import("./PkToolShowForm-CO5A_j9L.js").then((e) => e.n)),
30
- showProductList: M(() => import("./PkToolShowProductList-Cn0yewM3.js").then((e) => e.n)),
31
- showQrCode: M(() => import("./PkToolShowQrCode-DEAvfLFu.js").then((e) => e.n)),
32
- showSources: M(() => import("./PkToolShowSources-7Q5Iogxi.js").then((e) => e.n)),
33
- showSuggestedReply: M(() => import("./PkToolShowSuggestedReply-DQFOVonE.js").then((e) => e.n)),
34
- showVideo: M(() => import("./PkToolShowVideo-Bv9kMd88.js")),
35
- showWeather: M(() => import("./PkToolShowWeather-Bzqalzh8.js")),
36
- showWebPages: M(() => import("./PkToolShowWebPages-Bzkkn9GV.js").then((e) => e.n))
37
- }, G = {
38
- key: 0,
39
- class: "text-12 text-word-3 m-0 mb-xs"
40
- }, K = /* @__PURE__ */ N({
41
- __name: "PkToolApprovalPreviewMessage",
42
- props: { input: {} },
43
- setup(e) {
44
- let t = e, n = E(() => {
45
- let e = t.input;
46
- return typeof e?.message == "string" ? e.message : "";
47
- });
48
- return (e, t) => n.value ? (L(), k("p", G, z(n.value), 1)) : O("", !0);
49
- }
50
- }), xe = { [y]: K }, Se = {
51
- key: 0,
52
- class: "text-12 text-word-3 m-0 mb-xs"
53
- }, Ce = /* @__PURE__ */ N({
54
- __name: "PkToolApprovalCard",
55
- props: {
56
- part: {},
57
- actionable: { type: Boolean },
58
- callVerdict: { type: Boolean }
59
- },
60
- emits: ["respond"],
61
- setup(t, { emit: n }) {
62
- let r = t, i = n, { t: a } = he({ useScope: "global" }), s = E(() => r.part), c = E(() => o(r.part)), l = E(() => c.value === y), u = E(() => l.value ? (s.value.state === "input-available" || e(s.value.output)) && r.callVerdict === void 0 : s.value.state === "approval-requested"), d = E(() => u.value && r.actionable === !0), f = E(() => u.value && r.actionable !== !0), p = E(() => l.value ? s.value.output === "confirmed" || r.callVerdict === !0 : s.value.approval?.approved === !0), m = E(() => l.value ? s.value.output === "cancelled" || r.callVerdict === !1 : s.value.approval?.approved === !1 || s.value.state === "output-denied"), h = E(() => xe[c.value]), g = E(() => {
63
- if (f.value) return {
64
- icon: "ri:time-line",
65
- message: a("toolApproval.expired")
66
- };
67
- if (p.value) return {
68
- icon: "ri:check-line",
69
- message: a(l.value ? "toolApproval.confirmed" : "toolApproval.approved")
70
- };
71
- if (m.value) return {
72
- icon: "ri:close-line",
73
- message: a(l.value ? "toolApproval.cancelled" : "toolApproval.denied")
74
- };
75
- }), ee = E(() => !!g.value && !h.value);
76
- return (e, n) => {
77
- let r = S, o = C, c = ae;
78
- return L(), k("div", { class: F(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !ee.value }]) }, [
79
- j(T, null, {
80
- default: H(() => [!l.value && u.value ? (L(), k("p", Se, z(B(a)("toolApproval.prompt")), 1)) : O("", !0)]),
81
- _: 1
82
- }),
83
- h.value ? (L(), D(fe(h.value), {
84
- key: 0,
85
- part: t.part,
86
- input: s.value.input
87
- }, null, 8, ["part", "input"])) : O("", !0),
88
- j(T, { mode: "out-in" }, {
89
- default: H(() => [g.value ? (L(), k("p", {
90
- key: 1,
91
- class: F(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": h.value }])
92
- }, [j(c, {
93
- name: g.value.icon,
94
- class: "shrink-0"
95
- }, null, 8, ["name"]), oe(" " + z(g.value.message), 1)], 2)) : (L(), D(o, { key: 0 }, {
96
- default: H(() => [j(r, {
97
- modifiers: "primary-small",
98
- disabled: !d.value,
99
- icon: "ri:check-line",
100
- label: B(a)("action.proceed"),
101
- onClick: n[0] ||= U((e) => i("respond", !0), ["stop"])
102
- }, null, 8, ["disabled", "label"]), j(r, {
103
- modifiers: "action-quiet-small",
104
- disabled: !d.value,
105
- icon: "ri:close-line",
106
- label: B(a)("action.cancel"),
107
- onClick: n[1] ||= U((e) => i("respond", !1), ["stop"])
108
- }, null, 8, ["disabled", "label"])]),
109
- _: 1
110
- }))]),
111
- _: 1
112
- })
113
- ], 2);
114
- };
115
- }
116
- }), we = 30, Te = 500;
117
- function Ee(e) {
118
- let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = R(!1), u = R(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, ee = (e = "smooth") => {
119
- if (!t.value || l.value) {
120
- d = !1;
121
- return;
122
- }
123
- d = !0, t.value.scrollTo({
124
- top: t.value.scrollHeight,
125
- behavior: e
126
- }), setTimeout(() => {
127
- d = !1;
128
- }, e === "instant" ? 0 : Te);
129
- }, _ = (e) => {
130
- e.deltaY < 0 && (l.value = !0);
131
- }, v = 0, y = (e) => {
132
- v = e.touches[0]?.clientY ?? 0;
133
- }, te = (e) => {
134
- let t = e.touches[0]?.clientY ?? 0;
135
- t > v && (l.value = !0), v = t;
136
- }, b = () => {
137
- if (!t.value) return;
138
- let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
139
- if (u.value = n - r - e < we, d) {
140
- g = e;
141
- return;
142
- }
143
- e < g && s?.(), e > g && (u.value && (l.value = !1), c?.()), g = e;
144
- }, ne = () => {
145
- if (d || l.value || !t.value) return;
146
- let e = t.value, n = e.scrollHeight - e.clientHeight;
147
- n <= e.scrollTop || (u.value = !0, d = !0, e.scrollTop = n, requestAnimationFrame(() => {
148
- d = !1;
149
- }));
150
- }, re = () => {
151
- !f && t.value && (f = new MutationObserver(ne), f.observe(t.value, {
152
- childList: !0,
153
- subtree: !0,
154
- characterData: !0
155
- }));
156
- }, ie = () => {
157
- f?.disconnect(), f = null;
158
- };
159
- V(n, (e, t) => {
160
- if (e === "streaming" || e === "submitted") {
161
- re();
162
- return;
163
- }
164
- (e !== "ready" || t !== "streaming") && ie();
165
- }), V(r, async () => {
166
- if (r() && i() !== "assistant") {
167
- C(), l.value = !1, d = !0;
168
- try {
169
- await P(), await o?.(), await P();
170
- } finally {
171
- ee();
172
- }
173
- }
174
- });
175
- let x = null, S = () => {
176
- t.value && (t.value.scrollHeight <= t.value.clientHeight || (t.value.scrollTop = t.value.scrollHeight, x && clearTimeout(x), x = setTimeout(C, 300)));
177
- }, C = () => {
178
- p?.disconnect(), p = null, m?.disconnect(), m = null, x &&= (clearTimeout(x), null);
179
- };
180
- return le(() => {
181
- if (!t.value) return;
182
- t.value.addEventListener("wheel", _, { passive: !0 }), t.value.addEventListener("touchstart", y, { passive: !0 }), t.value.addEventListener("touchmove", te, { passive: !0 });
183
- let e = n() === "submitted" || n() === "streaming";
184
- e ? re() : (p = new ResizeObserver(S), p.observe(t.value), m = new MutationObserver(S), m.observe(t.value, {
185
- childList: !0,
186
- subtree: !0
187
- }));
188
- let r = a?.() ?? t.value.firstElementChild;
189
- r && (h = new ResizeObserver(ne), h.observe(r)), e || S();
190
- }), I(() => {
191
- t.value?.removeEventListener("wheel", _), t.value?.removeEventListener("touchstart", y), t.value?.removeEventListener("touchmove", te), h?.disconnect(), h = null, ie(), C();
192
- }), {
193
- handleScroll: b,
194
- scrollToBottom: ee,
195
- userScrolledUp: l,
196
- isAtBottom: u
197
- };
198
- }
199
- //#endregion
200
- //#region ../../packages/components/src/chat/PkChatbotMessages.vue?vue&type=script&setup=true&lang.ts
201
- var De = ["aria-busy"], Oe = {
202
- key: 0,
203
- class: "pk-chatbot-messages__outline"
204
- }, ke = {
205
- key: 0,
206
- class: "pk-chatbot-divider"
207
- }, Ae = { class: "pk-chatbot-divider__label" }, je = { class: "pk-chatbot-message__text" }, Me = ["title"], Ne = {
208
- key: 0,
209
- class: "pk-chatbot-message__reaction-emoji"
210
- }, Pe = {
211
- key: 0,
212
- class: "pk-chatbot-message__loading-info"
213
- }, Fe = { class: "flex gap-8 items-center" }, Ie = { class: "font-mono rounded text-12" }, Le = { class: "flex gap-8 items-center" }, Re = {
214
- key: 0,
215
- class: "pk-chatbot-message__footer"
216
- }, ze = {
217
- key: 0,
218
- class: "pk-chatbot-message__hover-meta"
219
- }, Be = ["datetime", "title"], Ve = { class: "truncate" }, He = {
220
- key: 0,
221
- class: "flex items-center gap-4 min-w-0"
222
- }, Ue = { class: "truncate" }, We = {
223
- key: 1,
224
- class: "flex items-center gap-4 text-12 text-word-3"
225
- }, Ge = { class: "truncate" }, Ke = ["datetime"], qe = { class: "truncate" }, Je = {
226
- key: 3,
227
- class: "flex items-center gap-4 text-12 text-word-3"
228
- }, Ye = { class: "pk-chatbot-message__loading-info" }, Xe = { class: "flex gap-8 items-center" }, Ze = { class: "text-12" }, Qe = ["title", "aria-label"], $e = /* @__PURE__ */ N({
229
- __name: "PkChatbotMessages",
230
- props: {
231
- status: {},
232
- messages: {},
233
- error: {},
234
- actions: {},
235
- mainColor: {},
236
- textColor: {},
237
- revisedAnswers: {},
238
- messageFeedbacks: {},
239
- readonlyFeedback: { type: Boolean },
240
- disableHeightAdjustment: { type: Boolean },
241
- showMessageDateTime: { type: Boolean },
242
- showMessageTokensCount: { type: Boolean },
243
- showAllMessageParts: { type: Boolean },
244
- interactive: { type: Boolean },
245
- showExtendedSteps: { type: Boolean },
246
- awaitingSpokenAnswer: { type: Boolean },
247
- confirmVerdictsOnCall: {},
248
- isDark: { type: Boolean },
249
- showScrollToBottom: { type: Boolean },
250
- feedbackMessageId: {},
251
- feedbackLoading: { type: Boolean },
252
- feedbackSubmitted: { type: Boolean },
253
- feedbackError: {}
254
- },
255
- emits: [
256
- "show-info",
257
- "regenerate",
258
- "revise",
259
- "upvote",
260
- "downvote",
261
- "feedback",
262
- "feedback-submit",
263
- "feedback-close",
264
- "scroll-up",
265
- "scroll-down",
266
- "auto-retry",
267
- "reset-chat",
268
- "approval-respond",
269
- "confirm-respond"
270
- ],
271
- setup(e, { emit: y }) {
272
- let M = e, N = y, { t: I, d: W, n: ge } = he({ useScope: "global" }), ve = pe(), ye = (e, t) => {
273
- if (p(e)) {
274
- let n = e.toolCallId;
275
- n && N("confirm-respond", {
276
- toolCallId: n,
277
- confirmed: t
278
- });
279
- return;
280
- }
281
- let n = g(e);
282
- n && N("approval-respond", {
283
- id: n,
284
- approved: t
285
- });
286
- }, G = me("scrollEl"), K = me("wrapperEl"), xe = E(() => ne(M.textColor, M.mainColor)), { handleScroll: Se, scrollToBottom: we, userScrolledUp: Te, isAtBottom: $e } = Ee({
287
- scrollEl: G,
288
- status: () => M.status,
289
- messagesLength: () => M.messages?.length,
290
- lastMessageRole: () => M.messages?.[M.messages.length - 1]?.role,
291
- contentEl: () => K.value,
292
- beforeNewMessageScroll: () => st(),
293
- onScrollUp: () => N("scroll-up"),
294
- onScrollDown: () => N("scroll-down")
295
- }), et = () => {
296
- Te.value = !1, we();
297
- }, q = E(() => (M.messages ?? []).filter((e) => e.role === "user").map((e) => ({
298
- id: e.id,
299
- preview: e.parts.find(s)?.text.trim().slice(0, 120) || "…"
300
- }))), tt = R(), nt = () => G.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], rt = () => {
301
- let e = G.value;
302
- if (!e || !M.showScrollToBottom) return;
303
- let t = e.getBoundingClientRect().top + e.clientHeight / 2, n = q.value[0]?.id;
304
- nt().forEach((e, r) => {
305
- e.getBoundingClientRect().top <= t && (n = q.value[r]?.id);
306
- }), tt.value = n;
307
- };
308
- V(q, async () => {
309
- await P(), rt();
310
- });
311
- let it = () => {
312
- Se(), rt();
313
- }, at = (e) => {
314
- let t = G.value, n = q.value.findIndex((t) => t.id === e), r = nt()[n];
315
- t && r && (Te.value = !0, t.scrollTo({
316
- top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
317
- behavior: "smooth"
318
- }));
319
- }, J = R(0), ot = R(!1), st = async () => {
320
- let e = M.messages;
321
- if (!e?.length || M.disableHeightAdjustment || e[e.length - 1].role !== "user" && M.status !== "submitted" && M.status !== "streaming" || (ot.value = !1, await P(), !G.value)) return;
322
- let { paddingTop: t, paddingBottom: n } = getComputedStyle(G.value), r = G.value.clientHeight - Number.parseFloat(t) - Number.parseFloat(n), i = K.value && Number.parseFloat(getComputedStyle(K.value).rowGap) || 0, a = nt(), o = r - (a[a.length - 1]?.clientHeight ?? 0) - i;
323
- r > 0 && (J.value = Math.max(o, 0)), await P();
324
- };
325
- V(() => [M.messages?.length, M.messages?.[M.messages.length - 1]?.id], () => st()), le(() => {
326
- (M.status === "submitted" || M.status === "streaming" || M.awaitingSpokenAnswer) && st();
327
- }), V(() => M.status, (e) => {
328
- (e === "ready" || e === "error") && (ot.value = !0, J.value = 0);
329
- });
330
- let ct = (e) => M.revisedAnswers?.some((t) => t.messageId === e), Y = (e) => M.messageFeedbacks?.find((t) => t.messageId === e), lt = (e, t) => !M.readonlyFeedback && Dt(e, t), ut = (e) => M.readonlyFeedback ? Y(e) : void 0, dt = (e) => ut(e)?.vote, ft = (e) => {
331
- let t = ut(e);
332
- if (t?.vote) return;
333
- let n = t?.metadata?.reactionEmoji;
334
- return typeof n == "string" && /\p{Extended_Pictographic}/u.test(n) ? n : void 0;
335
- }, pt = (e) => !!(dt(e) || ft(e)), mt = (e) => {
336
- if (ft(e)) return "pk-chatbot-message__reaction--neutral";
337
- let t = dt(e);
338
- return t === "upvote" ? "pk-chatbot-message__reaction--positive" : t === "downvote" ? "pk-chatbot-message__reaction--negative" : "pk-chatbot-message__reaction--neutral";
339
- }, ht = (e) => {
340
- let t = dt(e);
341
- return I(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
342
- }, gt = (e) => {
343
- let t = yt(e);
344
- for (let e = t.length - 1; e >= 0; --e) if (s(t[e])) return e;
345
- return -1;
346
- }, _t = E(() => M.messages?.[M.messages.length - 1]), X = E(() => {
347
- let e = _t.value;
348
- return e ? e.parts[e.parts.length - 1] : null;
349
- }), vt = E(() => {
350
- let e = /* @__PURE__ */ new Map();
351
- for (let t of M.messages ?? []) t.role === "assistant" && e.set(t.id, b(t.parts));
352
- return e;
353
- }), yt = (e) => vt.value.get(e.id) ?? e.parts, Z = E(() => M.status === "submitted" || M.status === "streaming"), bt = E(() => M.status === "error"), xt = E(() => M.awaitingSpokenAnswer === !0 && !Z.value), St = E(() => xt.value && _t.value?.role === "user" && !bt.value), Ct = E(() => {
354
- let e = X.value;
355
- return te(I, e);
356
- }), wt = E(() => {
357
- let e = X.value;
358
- return v(e);
359
- }), Tt = (e) => M.messages?.findIndex((t) => t.id === e), Q = (e) => e === void 0 || !M.messages ? !1 : e === M.messages.length - 1, Et = (e) => Q(e) && M.status === "ready" && !!M.actions?.includes("regenerate"), Dt = (e, t) => (!Q(t) || M.status === "ready") && !!M.actions?.includes(e), Ot = (e) => {
360
- let t = e.parts[e.parts.length - 1];
361
- return s(t);
362
- }, kt = (e) => e.parts.some((e) => a(e) || i(e)), At = (e) => !!M.showExtendedSteps && $(e) && kt(e), $ = (e) => e.role === "assistant", jt = (e) => e.role === "user", Mt = (e) => M.messages?.slice(0, e).reverse().find((e) => $(e)), Nt = (e) => M.messages?.slice(e + 1).find((e) => $(e)), Pt = (e) => {
363
- let t = Mt(e)?.metadata?.createdAt, n = Nt(e)?.metadata?.createdAt;
364
- if (!t || !n) return;
365
- let r = new Date(t), i = new Date(n);
366
- return r.toDateString() === i.toDateString() ? void 0 : i;
367
- }, Ft = (e, t) => t === 0 || e.role !== "assistant" ? !1 : !!(M.actions?.length || M.showMessageDateTime && e.metadata?.createdAt !== void 0 || e.metadata?.completedAt !== void 0 || M.showMessageTokensCount && e.metadata?.totalTokens !== void 0), It = (e) => {
368
- let t = new Date(e), n = t.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
369
- return W(t, n ? "time" : "date-time");
370
- }, Lt = (e) => {
371
- let { createdAt: t, completedAt: n } = e.metadata ?? {};
372
- if (t && n) return _(ge, n - t);
373
- }, Rt = me("feedbackMessageEl");
374
- return V(() => M.feedbackMessageId, async () => {
375
- if (await P(), !M.feedbackMessageId) return;
376
- let e = Rt.value?.[0]?.$el;
377
- if (e) {
378
- if (Q(Tt(M.feedbackMessageId))) {
379
- we();
380
- return;
381
- }
382
- e.scrollIntoView({
383
- behavior: "smooth",
384
- block: "center"
385
- });
386
- }
387
- }), (a, g) => {
388
- let _ = ae, y = S, te = C;
389
- return L(), k("div", {
390
- ref_key: "scrollEl",
391
- ref: G,
392
- class: F(["pk-chatbot-messages", { "pk-chatbot-messages--settling": ot.value }]),
393
- role: "log",
394
- "aria-live": "polite",
395
- "aria-relevant": "additions text",
396
- "aria-busy": Z.value,
397
- style: ce({
398
- "--chatbot-main-color": e.mainColor,
399
- "--chatbot-contrast-color": xe.value
400
- }),
401
- onScroll: it
402
- }, [
403
- e.showScrollToBottom && q.value.length > 1 ? (L(), k("div", Oe, [j(x, {
404
- items: q.value,
405
- "active-id": tt.value,
406
- onSelect: at
407
- }, null, 8, ["items", "active-id"])])) : O("", !0),
408
- A("div", {
409
- ref_key: "wrapperEl",
410
- ref: K,
411
- class: "pk-chatbot-messages__wrapper"
412
- }, [
413
- (L(!0), k(w, null, ue(e.messages, (t, b) => (L(), k(w, { key: t.id }, [jt(t) && Pt(b) ? (L(), k("div", ke, [A("span", Ae, z(B(W)(Pt(b), "short")), 1)])) : O("", !0), t.parts.length || Q(b) && Z.value && $(t) ? (L(), k("div", {
414
- key: 1,
415
- class: F(["pk-chatbot-message", [`pk-chatbot-message--${t.role}`, { "pk-chatbot-message--loading": Z.value && Q(b) && $(t) }]]),
416
- style: ce({ minHeight: Q(b) && $(t) && !bt.value ? `${J.value}px` : void 0 })
417
- }, [
418
- j(T, {
419
- appear: "",
420
- name: "pk-chatbot-part"
421
- }, {
422
- default: H(() => [At(t) ? (L(), D(ie, {
423
- key: 0,
424
- message: t,
425
- "is-streaming": Z.value && Q(b),
426
- "is-dark": e.isDark
427
- }, null, 8, [
428
- "message",
429
- "is-streaming",
430
- "is-dark"
431
- ])) : O("", !0)]),
432
- _: 2
433
- }, 1024),
434
- (L(!0), k(w, null, ue(yt(t), (l, d) => (L(), k(w, { key: d }, [B(s)(l) && l.text.trim() ? (L(), D(T, {
435
- key: 0,
436
- appear: "",
437
- name: "pk-chatbot-part"
438
- }, {
439
- default: H(() => [A("div", je, [de(a.$slots, "text", se({ ref_for: !0 }, {
440
- message: t,
441
- part: l,
442
- index: b,
443
- isLoading: Z.value
444
- }), () => [$(t) ? (L(), D(n, {
445
- key: 0,
446
- class: "wysiwyg",
447
- markdown: l.text,
448
- "is-dark": e.isDark,
449
- loading: Q(b) && e.status === "streaming"
450
- }, null, 8, [
451
- "markdown",
452
- "is-dark",
453
- "loading"
454
- ])) : (L(), k(w, { key: 1 }, [oe(z(l.text), 1)], 64))]), pt(t.id) && !Y(t.id)?.comment && d === gt(t) ? (L(), k("span", {
455
- key: 0,
456
- class: F(["pk-chatbot-message__reaction", mt(t.id)]),
457
- title: ht(t.id)
458
- }, [ft(t.id) ? (L(), k("span", Ne, z(ft(t.id)), 1)) : (L(), D(_, {
459
- key: 1,
460
- name: dt(t.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
461
- }, null, 8, ["name"]))], 10, Me)) : O("", !0)])]),
462
- _: 2
463
- }, 1024)) : B(r)(l) ? (L(), D(T, {
464
- key: 1,
465
- appear: "",
466
- name: "pk-chatbot-part"
467
- }, {
468
- default: H(() => [j(u, {
469
- "media-type": l.mediaType,
470
- url: l.url,
471
- filename: l.filename,
472
- size: B(c)(l)?.bytesCount
473
- }, null, 8, [
474
- "media-type",
475
- "url",
476
- "filename",
477
- "size"
478
- ])]),
479
- _: 2
480
- }, 1024)) : B(ee)(l) && !B(h)(l) ? (L(), D(T, {
481
- key: 2,
482
- appear: "",
483
- name: "pk-chatbot-part"
484
- }, {
485
- default: H(() => [(L(), D(Ce, {
486
- key: `approval-${d}`,
487
- part: l,
488
- actionable: e.interactive === !0 && (B(p)(l) || Q(b)),
489
- "call-verdict": e.confirmVerdictsOnCall?.get(l.toolCallId ?? ""),
490
- onRespond: (e) => ye(l, e)
491
- }, null, 8, [
492
- "part",
493
- "actionable",
494
- "call-verdict",
495
- "onRespond"
496
- ]))]),
497
- _: 2
498
- }, 1024)) : B(i)(l) && !B(h)(l) && (B(be)[B(o)(l)] || B(ve)[l.type] || e.showAllMessageParts) ? (L(), D(T, {
499
- key: 3,
500
- appear: "",
501
- name: "pk-chatbot-part"
502
- }, {
503
- default: H(() => [!B(ve)[l.type] && B(be)[B(o)(l)] ? (L(), D(fe(B(be)[B(o)(l)]), {
504
- key: `component-${d}-${B(m)(l)}`,
505
- part: l
506
- }, null, 8, ["part"])) : de(a.$slots, l.type, se({ ref_for: !0 }, {
507
- message: t,
508
- part: l,
509
- index: b,
510
- isLoading: Z.value
511
- }), () => [e.showAllMessageParts ? (L(), k("div", Pe, [A("div", Fe, [B(v)(l) ? (L(), D(_, {
512
- key: 0,
513
- name: B(v)(l),
514
- class: "shrink-0"
515
- }, null, 8, ["name"])) : O("", !0), A("code", Ie, z(B(_e)(l.type)), 1)])])) : O("", !0)], void 0, 1)]),
516
- _: 2
517
- }, 1024)) : O("", !0), j(T, { mode: "out-in" }, {
518
- default: H(() => [d === gt(t) && e.readonlyFeedback && Y(t.id)?.comment ? (L(), D(f, {
519
- key: 0,
520
- feedback: Y(t.id)
521
- }, null, 8, ["feedback"])) : O("", !0)]),
522
- _: 2
523
- }, 1024)], 64))), 128)),
524
- j(T, {
525
- name: "fade-in",
526
- mode: "out-in"
527
- }, {
528
- default: H(() => [Z.value && Q(b) && !Ot(t) && $(t) && !At(t) ? (L(), k("div", {
529
- key: `loading-info-${t.id}`,
530
- class: "pk-chatbot-message__loading-info"
531
- }, [A("div", Le, [
532
- j(_, {
533
- name: "loading-loop",
534
- class: "shrink-0"
535
- }),
536
- j(T, { mode: "out-in" }, {
537
- default: H(() => [wt.value ? (L(), D(_, {
538
- key: wt.value,
539
- class: "shrink-0",
540
- name: wt.value
541
- }, null, 8, ["name"])) : O("", !0)]),
542
- _: 1
543
- }),
544
- j(T, { mode: "out-in" }, {
545
- default: H(() => [Ct.value ? (L(), k("span", {
546
- key: Ct.value,
547
- class: "text-12"
548
- }, z(Ct.value), 1)) : O("", !0)]),
549
- _: 1
550
- })
551
- ]), j(T, {
552
- name: "fade-in",
553
- mode: "out-in"
554
- }, {
555
- default: H(() => [X.value && "text" in X.value && X.value.text.trim() ? (L(), D(re, {
556
- key: 0,
557
- markdown: X.value.text,
558
- "is-dark": e.isDark,
559
- "inner-class": "wysiwyg",
560
- class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
561
- }, null, 8, ["markdown", "is-dark"])) : O("", !0)]),
562
- _: 1
563
- })])) : O("", !0)]),
564
- _: 2
565
- }, 1024),
566
- j(T, { mode: "out-in" }, {
567
- default: H(() => [Ft(t, b) ? (L(), k("div", Re, [
568
- j(te, {
569
- modifiers: "compact",
570
- class: "mr-auto shrink-0"
571
- }, {
572
- default: H(() => [
573
- j(T, { mode: "out-in" }, {
574
- default: H(() => [Et(b) ? (L(), D(y, {
575
- key: 0,
576
- icon: "ri:reset-right-line",
577
- modifiers: "action-quiet-small",
578
- title: B(I)("action.regenerate"),
579
- "aria-label": B(I)("action.regenerate"),
580
- onClick: g[0] ||= U((e) => a.$emit("regenerate"), ["stop"])
581
- }, null, 8, ["title", "aria-label"])) : O("", !0)]),
582
- _: 2
583
- }, 1024),
584
- j(T, { mode: "out-in" }, {
585
- default: H(() => [Dt("show-info", b) ? (L(), D(y, {
586
- key: 0,
587
- icon: "ri:information-line",
588
- title: B(I)("action.getMoreInfo"),
589
- "aria-label": B(I)("action.getMoreInfo"),
590
- modifiers: "action-quiet-small",
591
- onClick: U((e) => a.$emit("show-info", t), ["stop"])
592
- }, null, 8, [
593
- "title",
594
- "aria-label",
595
- "onClick"
596
- ])) : O("", !0)]),
597
- _: 2
598
- }, 1024),
599
- j(T, { mode: "out-in" }, {
600
- default: H(() => [Dt("revise", b) ? (L(), D(y, {
601
- key: 0,
602
- icon: ct(t.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
603
- title: ct(t.id) ? B(I)("action.editRevise") : B(I)("action.createRevise"),
604
- "aria-label": ct(t.id) ? B(I)("action.editRevise") : B(I)("action.createRevise"),
605
- modifiers: "action-quiet-small",
606
- class: F({ "text-brand": ct(t.id) }),
607
- onClick: U((e) => a.$emit("revise", t), ["stop"])
608
- }, null, 8, [
609
- "icon",
610
- "title",
611
- "aria-label",
612
- "class",
613
- "onClick"
614
- ])) : O("", !0)]),
615
- _: 2
616
- }, 1024),
617
- j(T, { mode: "out-in" }, {
618
- default: H(() => [lt("upvote", b) ? (L(), D(y, {
619
- key: 0,
620
- icon: Y(t.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
621
- title: B(I)("action.upvote"),
622
- "aria-label": B(I)("action.upvote"),
623
- modifiers: "action-quiet-small",
624
- onClick: U((e) => a.$emit("upvote", t), ["stop"])
625
- }, null, 8, [
626
- "icon",
627
- "title",
628
- "aria-label",
629
- "onClick"
630
- ])) : O("", !0)]),
631
- _: 2
632
- }, 1024),
633
- j(T, { mode: "out-in" }, {
634
- default: H(() => [lt("downvote", b) ? (L(), D(y, {
635
- key: 0,
636
- icon: Y(t.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
637
- title: B(I)("action.downvote"),
638
- "aria-label": B(I)("action.downvote"),
639
- modifiers: "action-quiet-small",
640
- onClick: U((e) => a.$emit("downvote", t), ["stop"])
641
- }, null, 8, [
642
- "icon",
643
- "title",
644
- "aria-label",
645
- "onClick"
646
- ])) : O("", !0)]),
647
- _: 2
648
- }, 1024),
649
- j(T, { mode: "out-in" }, {
650
- default: H(() => [lt("feedback", b) ? (L(), D(y, {
651
- key: 0,
652
- icon: Y(t.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
653
- title: B(I)("action.feedback"),
654
- "aria-label": B(I)("action.feedback"),
655
- modifiers: "action-quiet-small",
656
- onClick: U((e) => a.$emit("feedback", t), ["stop"])
657
- }, null, 8, [
658
- "icon",
659
- "title",
660
- "aria-label",
661
- "onClick"
662
- ])) : O("", !0)]),
663
- _: 2
664
- }, 1024)
665
- ]),
666
- _: 2
667
- }, 1024),
668
- !e.showMessageDateTime && t.metadata?.createdAt && t.metadata?.completedAt ? (L(), k("div", ze, [A("time", {
669
- datetime: new Date(t.metadata.createdAt).toISOString(),
670
- title: B(W)(new Date(t.metadata.createdAt), "date-time"),
671
- class: "flex items-center gap-4 min-w-0"
672
- }, [j(_, {
673
- name: "ri:time-line",
674
- class: "shrink-0"
675
- }), A("span", Ve, z(It(t.metadata.createdAt)), 1)], 8, Be), Lt(t) ? (L(), k("span", He, [j(_, {
676
- name: "ri:hourglass-line",
677
- class: "shrink-0"
678
- }), A("span", Ue, z(Lt(t)), 1)])) : O("", !0)])) : O("", !0),
679
- e.showMessageTokensCount && t.metadata?.totalTokens ? (L(), k("span", We, [j(_, {
680
- name: "ri:ai-generate-2-line",
681
- class: "shrink-0"
682
- }), A("span", Ge, z(B(ge)(t.metadata.totalTokens, "integer")) + " " + z(B(I)("label.tokens")), 1)])) : O("", !0),
683
- e.showMessageDateTime && t.metadata?.createdAt ? (L(), k("time", {
684
- key: 2,
685
- datetime: new Date(t.metadata?.createdAt).toISOString(),
686
- class: "flex items-center gap-4 text-12 text-word-3"
687
- }, [j(_, {
688
- name: "ri:time-line",
689
- class: "shrink-0"
690
- }), A("span", qe, z(B(W)(new Date(t.metadata?.createdAt), "date-time")), 1)], 8, Ke)) : O("", !0),
691
- e.showMessageDateTime && t?.metadata?.completedAt && t?.metadata?.createdAt ? (L(), k("div", Je, [j(_, {
692
- name: "ri:hourglass-line",
693
- class: "shrink-0"
694
- }), j(l, {
695
- class: "truncate",
696
- date: t.metadata?.createdAt,
697
- "end-date": t.metadata?.completedAt
698
- }, null, 8, ["date", "end-date"])])) : O("", !0)
699
- ])) : O("", !0)]),
700
- _: 2
701
- }, 1024),
702
- j(T, { mode: "out-in" }, {
703
- default: H(() => [t.id === e.feedbackMessageId ? (L(), D(d, {
704
- key: 0,
705
- ref_for: !0,
706
- ref_key: "feedbackMessageEl",
707
- ref: Rt,
708
- loading: e.feedbackLoading,
709
- submitted: e.feedbackSubmitted,
710
- error: e.feedbackError,
711
- onSubmit: g[1] ||= (e) => a.$emit("feedback-submit", e),
712
- onClose: g[2] ||= (e) => a.$emit("feedback-close")
713
- }, null, 8, [
714
- "loading",
715
- "submitted",
716
- "error"
717
- ])) : O("", !0)]),
718
- _: 2
719
- }, 1024)
720
- ], 6)) : O("", !0)], 64))), 128)),
721
- j(T, {
722
- appear: "",
723
- name: "pk-chatbot-part"
724
- }, {
725
- default: H(() => [xt.value ? (L(), k("div", {
726
- key: 0,
727
- class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
728
- style: ce({ minHeight: St.value ? `${J.value}px` : void 0 })
729
- }, [A("div", Ye, [A("div", Xe, [j(_, {
730
- name: "loading-loop",
731
- class: "shrink-0"
732
- }), A("span", Ze, z(B(I)("label.answeringOnTheCall")), 1)])])], 4)) : O("", !0)]),
733
- _: 1
734
- }),
735
- j(T, {
736
- appear: "",
737
- name: "pk-chatbot-part"
738
- }, {
739
- default: H(() => [bt.value ? (L(), D(t, {
740
- key: 0,
741
- error: e.error,
742
- onRetry: g[3] ||= (e) => a.$emit("auto-retry"),
743
- onReset: g[4] ||= (e) => a.$emit("reset-chat")
744
- }, null, 8, ["error"])) : O("", !0)]),
745
- _: 1
746
- }),
747
- _t.value?.role === "user" && !St.value || bt.value ? (L(), k("div", {
748
- key: 0,
749
- class: "pk-chatbot-messages__spacer",
750
- style: ce({ minHeight: `${J.value}px` })
751
- }, null, 4)) : O("", !0)
752
- ], 512),
753
- j(T, { name: "pk-chatbot-messages-fab" }, {
754
- default: H(() => [e.showScrollToBottom && (B(Te) || !B($e)) ? (L(), k("button", {
755
- key: 0,
756
- type: "button",
757
- class: "pk-chatbot-messages__scroll-to-bottom",
758
- title: B(I)("action.scrollToBottom"),
759
- "aria-label": B(I)("action.scrollToBottom"),
760
- onClick: et
761
- }, [j(_, { name: "ri:arrow-down-line" })], 8, Qe)) : O("", !0)]),
762
- _: 1
763
- })
764
- ], 46, De);
765
- };
766
- }
767
- });
768
- //#endregion
769
- export { ve as a, _e as i, ye as n, ge as r, $e as t };
770
-
771
- //# sourceMappingURL=PkChatbotMessages-DAlkoMkY.js.map