@8wave/ai-elements 0.126.0-beta.40 → 0.126.0-beta.41

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 (155) hide show
  1. package/dist/_chunks/{Agent-DZEyfr8D.js → Agent-DJ6TBi6l.js} +143 -138
  2. package/dist/_chunks/Agent-DJ6TBi6l.js.map +1 -0
  3. package/dist/_chunks/{PkFilePreview-BHqmp1EW.js → PkFilePreview-BrWWeK4E.js} +3 -3
  4. package/dist/_chunks/{PkFilePreview-BHqmp1EW.js.map → PkFilePreview-BrWWeK4E.js.map} +1 -1
  5. package/dist/_chunks/{PkFilePreviewDialog-BHAgVlKs.js → PkFilePreviewDialog-BRZH_LxY.js} +2 -2
  6. package/dist/_chunks/{PkFilePreviewDialog-BHAgVlKs.js.map → PkFilePreviewDialog-BRZH_LxY.js.map} +1 -1
  7. package/dist/_chunks/{PkImageEditorDialog-BDwL39Du.js → PkImageEditorDialog-D21ggZkD.js} +6 -5
  8. package/dist/_chunks/{PkImageEditorDialog-BDwL39Du.js.map → PkImageEditorDialog-D21ggZkD.js.map} +1 -1
  9. package/dist/_chunks/{PkSelectionActions-DLsZ8-gW.js → PkSelectionActions-BLfFobXb.js} +2 -2
  10. package/dist/_chunks/{PkSelectionActions-DLsZ8-gW.js.map → PkSelectionActions-BLfFobXb.js.map} +1 -1
  11. package/dist/_chunks/{PkStreamingMarkdown-14rJ_FK2.js → PkStreamingMarkdown-Bekhx_vG.js} +300 -213
  12. package/dist/_chunks/PkStreamingMarkdown-Bekhx_vG.js.map +1 -0
  13. package/dist/_chunks/{PkToolChatFile-62j1S0Pq.js → PkToolChatFile-BzN4fMaY.js} +3 -3
  14. package/dist/_chunks/{PkToolChatFile-62j1S0Pq.js.map → PkToolChatFile-BzN4fMaY.js.map} +1 -1
  15. package/dist/_chunks/{PkToolRequestGeolocation-B9EM_K6O.js → PkToolRequestGeolocation-Dj5OxEMP.js} +2 -2
  16. package/dist/_chunks/{PkToolRequestGeolocation-B9EM_K6O.js.map → PkToolRequestGeolocation-Dj5OxEMP.js.map} +1 -1
  17. package/dist/_chunks/{PkToolRequestOAuthConnection-CfjfqCHX.js → PkToolRequestOAuthConnection-Cj_IYnrW.js} +2 -2
  18. package/dist/_chunks/{PkToolRequestOAuthConnection-CfjfqCHX.js.map → PkToolRequestOAuthConnection-Cj_IYnrW.js.map} +1 -1
  19. package/dist/_chunks/PkToolShowArtifact-BkGtejtb.js +110 -0
  20. package/dist/_chunks/PkToolShowArtifact-BkGtejtb.js.map +1 -0
  21. package/dist/_chunks/{PkToolShowContactForm-BeJ5GR6t.js → PkToolShowContactForm-BXsvfCKR.js} +2 -2
  22. package/dist/_chunks/{PkToolShowContactForm-BeJ5GR6t.js.map → PkToolShowContactForm-BXsvfCKR.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowForm-B9VDoS_W.js → PkToolShowForm-DeG_AzO9.js} +4 -4
  24. package/dist/_chunks/{PkToolShowForm-B9VDoS_W.js.map → PkToolShowForm-DeG_AzO9.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowImageGallery-DFuc5IJ1.js → PkToolShowImageGallery-Dri9KUNg.js} +2 -2
  26. package/dist/_chunks/{PkToolShowImageGallery-DFuc5IJ1.js.map → PkToolShowImageGallery-Dri9KUNg.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowProductList-C2EJKYOV.js → PkToolShowProductList-C-XQdsus.js} +2 -2
  28. package/dist/_chunks/{PkToolShowProductList-C2EJKYOV.js.map → PkToolShowProductList-C-XQdsus.js.map} +1 -1
  29. package/dist/_chunks/{PkToolShowSources-BL3DnfcN.js → PkToolShowSources-DMDML2kQ.js} +3 -3
  30. package/dist/_chunks/{PkToolShowSources-BL3DnfcN.js.map → PkToolShowSources-DMDML2kQ.js.map} +1 -1
  31. package/dist/_chunks/{PkToolShowSuggestedReply-DLgtjBJ1.js → PkToolShowSuggestedReply-BYoW-L6k.js} +2 -2
  32. package/dist/_chunks/{PkToolShowSuggestedReply-DLgtjBJ1.js.map → PkToolShowSuggestedReply-BYoW-L6k.js.map} +1 -1
  33. package/dist/_chunks/{PkToolShowVideo-DcWXDcOZ.js → PkToolShowVideo-C_1ziurv.js} +2 -2
  34. package/dist/_chunks/{PkToolShowVideo-DcWXDcOZ.js.map → PkToolShowVideo-C_1ziurv.js.map} +1 -1
  35. package/dist/_chunks/{PkToolShowWebPages-CPqMC6qt.js → PkToolShowWebPages-yFdm0n0F.js} +2 -2
  36. package/dist/_chunks/{PkToolShowWebPages-CPqMC6qt.js.map → PkToolShowWebPages-yFdm0n0F.js.map} +1 -1
  37. package/dist/_chunks/{chatImagePolicy-DMt6O5iK.js → chatImagePolicy-Dqke0kDv.js} +2 -2
  38. package/dist/_chunks/{chatImagePolicy-DMt6O5iK.js.map → chatImagePolicy-Dqke0kDv.js.map} +1 -1
  39. package/dist/_chunks/{markdown-nw5sXwU0.js → markdown-Z_eeOlvv.js} +16 -16
  40. package/dist/_chunks/{markdown-nw5sXwU0.js.map → markdown-Z_eeOlvv.js.map} +1 -1
  41. package/dist/_chunks/{utils-DE4cAz37.js → utils-C1JaUBI_.js} +2 -2
  42. package/dist/_chunks/{utils-DE4cAz37.js.map → utils-C1JaUBI_.js.map} +1 -1
  43. package/dist/ai-elements.es.js +3754 -3573
  44. package/dist/ai-elements.es.js.map +1 -1
  45. package/dist-vue/PkChatbot.js +1 -1
  46. package/dist-vue/PkChatbotAuth.js +1 -1
  47. package/dist-vue/PkChatbotEmptyState.js +1 -1
  48. package/dist-vue/PkChatbotInput.js +1 -1
  49. package/dist-vue/PkChatbotMessages.js +1 -1
  50. package/dist-vue/PkChatbotStepPayload.js +1 -1
  51. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  52. package/dist-vue/PkChatbotSteps.js +1 -1
  53. package/dist-vue/PkChatbotViewChat.js +1 -1
  54. package/dist-vue/PkChatbotViewConversations.js +1 -1
  55. package/dist-vue/PkChatbotViewFiles.js +1 -1
  56. package/dist-vue/PkChatbotViewProfile.js +1 -1
  57. package/dist-vue/_chunks/{Agent-CBAd3F7k.js → Agent-DrnYCRFA.js} +2 -2
  58. package/dist-vue/_chunks/{Agent-CBAd3F7k.js.map → Agent-DrnYCRFA.js.map} +1 -1
  59. package/dist-vue/_chunks/{Document-B3w5H0R0.js → Document-CA7c3oZE.js} +11 -11
  60. package/dist-vue/_chunks/{Document-B3w5H0R0.js.map → Document-CA7c3oZE.js.map} +1 -1
  61. package/dist-vue/_chunks/{Media-0U2B_qCS.js → Media-BIlhY_h6.js} +31 -26
  62. package/dist-vue/_chunks/Media-BIlhY_h6.js.map +1 -0
  63. package/dist-vue/_chunks/{PkChatbot-aCgj2DMu.js → PkChatbot-QjeNY0h6.js} +8 -8
  64. package/dist-vue/_chunks/{PkChatbot-aCgj2DMu.js.map → PkChatbot-QjeNY0h6.js.map} +1 -1
  65. package/dist-vue/_chunks/{PkChatbotAuth-C5agN8ht.js → PkChatbotAuth-C8ZjLNFY.js} +8 -8
  66. package/dist-vue/_chunks/{PkChatbotAuth-C5agN8ht.js.map → PkChatbotAuth-C8ZjLNFY.js.map} +1 -1
  67. package/dist-vue/_chunks/{PkChatbotEmptyState-CLfzcH_t.js → PkChatbotEmptyState-D6S0iYe3.js} +2 -2
  68. package/dist-vue/_chunks/{PkChatbotEmptyState-CLfzcH_t.js.map → PkChatbotEmptyState-D6S0iYe3.js.map} +1 -1
  69. package/dist-vue/_chunks/PkChatbotInput-CunAf5Rq.js +708 -0
  70. package/dist-vue/_chunks/PkChatbotInput-CunAf5Rq.js.map +1 -0
  71. package/dist-vue/_chunks/{PkChatbotMessages-CG3UZYcP.js → PkChatbotMessages-CzPsgCAN.js} +351 -326
  72. package/dist-vue/_chunks/PkChatbotMessages-CzPsgCAN.js.map +1 -0
  73. package/dist-vue/_chunks/{PkChatbotStepPayload-fyrbP7yS.js → PkChatbotStepPayload-BQDpTDgn.js} +2 -2
  74. package/dist-vue/_chunks/{PkChatbotStepPayload-fyrbP7yS.js.map → PkChatbotStepPayload-BQDpTDgn.js.map} +1 -1
  75. package/dist-vue/_chunks/{PkChatbotStepToolDetail-Drhc6X-x.js → PkChatbotStepToolDetail-Dsf9t1B6.js} +3 -3
  76. package/dist-vue/_chunks/{PkChatbotStepToolDetail-Drhc6X-x.js.map → PkChatbotStepToolDetail-Dsf9t1B6.js.map} +1 -1
  77. package/dist-vue/_chunks/{PkChatbotSteps-DZwV7UVr.js → PkChatbotSteps-HACZ1RrB.js} +5 -5
  78. package/dist-vue/_chunks/{PkChatbotSteps-DZwV7UVr.js.map → PkChatbotSteps-HACZ1RrB.js.map} +1 -1
  79. package/dist-vue/_chunks/{PkChatbotViewChat-IU3HJpxG.js → PkChatbotViewChat-BpDCX_72.js} +107 -107
  80. package/dist-vue/_chunks/PkChatbotViewChat-BpDCX_72.js.map +1 -0
  81. package/dist-vue/_chunks/{PkChatbotViewConversations-4zGrp7Fo.js → PkChatbotViewConversations-B0nUFwuu.js} +3 -3
  82. package/dist-vue/_chunks/{PkChatbotViewConversations-4zGrp7Fo.js.map → PkChatbotViewConversations-B0nUFwuu.js.map} +1 -1
  83. package/dist-vue/_chunks/{PkChatbotViewFiles-PHdrHZOf.js → PkChatbotViewFiles-gGshDAPk.js} +3 -3
  84. package/dist-vue/_chunks/{PkChatbotViewFiles-PHdrHZOf.js.map → PkChatbotViewFiles-gGshDAPk.js.map} +1 -1
  85. package/dist-vue/_chunks/{PkChatbotViewProfile-BrZ7oiUY.js → PkChatbotViewProfile-BuJtqq8F.js} +2 -2
  86. package/dist-vue/_chunks/{PkChatbotViewProfile-BrZ7oiUY.js.map → PkChatbotViewProfile-BuJtqq8F.js.map} +1 -1
  87. package/dist-vue/_chunks/{PkFilePreview-WqS-s3vk.js → PkFilePreview-0p50S8Km.js} +4 -4
  88. package/dist-vue/_chunks/{PkFilePreview-WqS-s3vk.js.map → PkFilePreview-0p50S8Km.js.map} +1 -1
  89. package/dist-vue/_chunks/{PkFilePreviewDialog-BIaTAK05.js → PkFilePreviewDialog-B1N4xDEu.js} +2 -2
  90. package/dist-vue/_chunks/{PkFilePreviewDialog-BIaTAK05.js.map → PkFilePreviewDialog-B1N4xDEu.js.map} +1 -1
  91. package/dist-vue/_chunks/{PkImageEditorDialog-_-UkV0CO.js → PkImageEditorDialog-B-jW5yE8.js} +6 -5
  92. package/dist-vue/_chunks/{PkImageEditorDialog-_-UkV0CO.js.map → PkImageEditorDialog-B-jW5yE8.js.map} +1 -1
  93. package/dist-vue/_chunks/{PkStreamingMarkdown-ha0V58V9.js → PkStreamingMarkdown-WIueQOg3.js} +530 -445
  94. package/dist-vue/_chunks/PkStreamingMarkdown-WIueQOg3.js.map +1 -0
  95. package/dist-vue/_chunks/{PkToolChatFile-OusYITiO.js → PkToolChatFile-W6OJP7HH.js} +3 -3
  96. package/dist-vue/_chunks/{PkToolChatFile-OusYITiO.js.map → PkToolChatFile-W6OJP7HH.js.map} +1 -1
  97. package/dist-vue/_chunks/{PkToolRequestGeolocation-CyL_M1Rm.js → PkToolRequestGeolocation-BPZfJfR1.js} +2 -2
  98. package/dist-vue/_chunks/{PkToolRequestGeolocation-CyL_M1Rm.js.map → PkToolRequestGeolocation-BPZfJfR1.js.map} +1 -1
  99. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DWkeVLpx.js → PkToolRequestOAuthConnection-BaMZkvU5.js} +2 -2
  100. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DWkeVLpx.js.map → PkToolRequestOAuthConnection-BaMZkvU5.js.map} +1 -1
  101. package/dist-vue/_chunks/PkToolShowArtifact-CPBFsUrY.js +107 -0
  102. package/dist-vue/_chunks/PkToolShowArtifact-CPBFsUrY.js.map +1 -0
  103. package/dist-vue/_chunks/{PkToolShowChart-BSnYmoJJ.js → PkToolShowChart-BaUS47YU.js} +2 -2
  104. package/dist-vue/_chunks/{PkToolShowChart-BSnYmoJJ.js.map → PkToolShowChart-BaUS47YU.js.map} +1 -1
  105. package/dist-vue/_chunks/{PkToolShowContactForm-DFufPNnQ.js → PkToolShowContactForm-6OQ-hjCt.js} +2 -2
  106. package/dist-vue/_chunks/{PkToolShowContactForm-DFufPNnQ.js.map → PkToolShowContactForm-6OQ-hjCt.js.map} +1 -1
  107. package/dist-vue/_chunks/{PkToolShowDiagram-BR4fE_be.js → PkToolShowDiagram-D6hPQVoe.js} +2 -2
  108. package/dist-vue/_chunks/{PkToolShowDiagram-BR4fE_be.js.map → PkToolShowDiagram-D6hPQVoe.js.map} +1 -1
  109. package/dist-vue/_chunks/{PkToolShowForm-yh0YAXcg.js → PkToolShowForm-CAadu_Pq.js} +4 -4
  110. package/dist-vue/_chunks/{PkToolShowForm-yh0YAXcg.js.map → PkToolShowForm-CAadu_Pq.js.map} +1 -1
  111. package/dist-vue/_chunks/{PkToolShowImageGallery-mmUY1Yfg.js → PkToolShowImageGallery-BlTyCF8h.js} +2 -2
  112. package/dist-vue/_chunks/{PkToolShowImageGallery-mmUY1Yfg.js.map → PkToolShowImageGallery-BlTyCF8h.js.map} +1 -1
  113. package/dist-vue/_chunks/{PkToolShowProductList-B-ya1TDt.js → PkToolShowProductList-CZFkf9UD.js} +2 -2
  114. package/dist-vue/_chunks/{PkToolShowProductList-B-ya1TDt.js.map → PkToolShowProductList-CZFkf9UD.js.map} +1 -1
  115. package/dist-vue/_chunks/{PkToolShowSources-DYkHkVdX.js → PkToolShowSources-Bci0Ab2u.js} +3 -3
  116. package/dist-vue/_chunks/{PkToolShowSources-DYkHkVdX.js.map → PkToolShowSources-Bci0Ab2u.js.map} +1 -1
  117. package/dist-vue/_chunks/{PkToolShowSuggestedReply-wKgwHTRO.js → PkToolShowSuggestedReply-DCZbwFhR.js} +2 -2
  118. package/dist-vue/_chunks/{PkToolShowSuggestedReply-wKgwHTRO.js.map → PkToolShowSuggestedReply-DCZbwFhR.js.map} +1 -1
  119. package/dist-vue/_chunks/{PkToolShowVideo-CRg2lAY8.js → PkToolShowVideo-BnSYdoTJ.js} +2 -2
  120. package/dist-vue/_chunks/{PkToolShowVideo-CRg2lAY8.js.map → PkToolShowVideo-BnSYdoTJ.js.map} +1 -1
  121. package/dist-vue/_chunks/{PkToolShowWebPages-C_pWag94.js → PkToolShowWebPages-CHrHuFZI.js} +2 -2
  122. package/dist-vue/_chunks/{PkToolShowWebPages-C_pWag94.js.map → PkToolShowWebPages-CHrHuFZI.js.map} +1 -1
  123. package/dist-vue/_chunks/{createChatbotApiClient-DBKfGL6y.js → createChatbotApiClient-_gh3Y1rl.js} +3 -3
  124. package/dist-vue/_chunks/createChatbotApiClient-_gh3Y1rl.js.map +1 -0
  125. package/dist-vue/_chunks/{useChatbotStore-Hb5EjISl.js → useChatbotStore-CjFPM9Q5.js} +3 -3
  126. package/dist-vue/_chunks/{useChatbotStore-Hb5EjISl.js.map → useChatbotStore-CjFPM9Q5.js.map} +1 -1
  127. package/dist-vue/_chunks/{utils-Df5n2cDc.js → utils-BYvQMZLG.js} +2 -2
  128. package/dist-vue/_chunks/{utils-Df5n2cDc.js.map → utils-BYvQMZLG.js.map} +1 -1
  129. package/dist-vue/api.js +1 -1
  130. package/dist-vue/composables.js +40 -8
  131. package/dist-vue/composables.js.map +1 -1
  132. package/dist-vue/index.js +71 -71
  133. package/dist-vue/index.js.map +1 -1
  134. package/dist-vue/locales.js +10 -0
  135. package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +2 -2
  136. package/dist-vue/packages/components/src/chat/PkImageEditorDialog.d.ts +5 -0
  137. package/dist-vue/packages/components/src/chat/PkStreamingMarkdown.d.ts +6 -0
  138. package/dist-vue/packages/components/src/chat/richCopy.d.ts +33 -0
  139. package/dist-vue/packages/components/src/chat/screenshot.d.ts +38 -0
  140. package/dist-vue/packages/models/src/schema/Chat.d.ts +1 -1
  141. package/dist-vue/style.css +1 -1
  142. package/package.json +1 -1
  143. package/dist/_chunks/Agent-DZEyfr8D.js.map +0 -1
  144. package/dist/_chunks/PkStreamingMarkdown-14rJ_FK2.js.map +0 -1
  145. package/dist/_chunks/PkToolShowArtifact-I_QZS7Pf.js +0 -94
  146. package/dist/_chunks/PkToolShowArtifact-I_QZS7Pf.js.map +0 -1
  147. package/dist-vue/_chunks/Media-0U2B_qCS.js.map +0 -1
  148. package/dist-vue/_chunks/PkChatbotInput-C9l_1I3d.js +0 -584
  149. package/dist-vue/_chunks/PkChatbotInput-C9l_1I3d.js.map +0 -1
  150. package/dist-vue/_chunks/PkChatbotMessages-CG3UZYcP.js.map +0 -1
  151. package/dist-vue/_chunks/PkChatbotViewChat-IU3HJpxG.js.map +0 -1
  152. package/dist-vue/_chunks/PkStreamingMarkdown-ha0V58V9.js.map +0 -1
  153. package/dist-vue/_chunks/PkToolShowArtifact-x57Gri2a.js +0 -91
  154. package/dist-vue/_chunks/PkToolShowArtifact-x57Gri2a.js.map +0 -1
  155. package/dist-vue/_chunks/createChatbotApiClient-DBKfGL6y.js.map +0 -1
@@ -1,86 +1,86 @@
1
1
  import { b as e, g as t, r as n, w as r, x as i } from "./schemas-CwcNxjnD.js";
2
2
  import { t as a } from "./VvButtonLocalized-C-vx25u4.js";
3
- import { A as o, H as s, _ as c, k as l, r as u } from "./Agent-CBAd3F7k.js";
4
- import { c as d } from "./Media-0U2B_qCS.js";
5
- import { A as f, C as p, I as m, L as h, N as g, O as _, P as v, S as y, W as b, _ as x, at as ee, b as te, d as ne, f as re, g as S, i as ie, it as ae, n as oe, r as se, t as C, x as ce, y as le, z as ue } from "./utils-Df5n2cDc.js";
6
- import { t as de } from "./PkStreamingMarkdown-ha0V58V9.js";
7
- import { t as fe } from "./PkChatbotError-DFZ5S5jd.js";
8
- import { t as pe } from "./PkChatbotFeedbackForm-DjsLxYjT.js";
9
- import { c as me, i as w, l as T, n as he, o as ge, s as _e, t as ve, u as ye } from "./message-DuibQyHy.js";
10
- import { t as be } from "./PkChatbotMessageFeedback-DltXugdR.js";
11
- import { t as xe } from "./PkChatbotFilePreview-aKJBtw04.js";
12
- import { t as Se } from "./PkChatbotAudioTranscript-DgmuXalb.js";
13
- import { t as Ce } from "./PkRelativeTime-CZF5CYHv.js";
3
+ import { A as o, H as s, _ as c, k as l, r as u } from "./Agent-DrnYCRFA.js";
4
+ import { l as d } from "./Media-BIlhY_h6.js";
5
+ import { A as f, C as p, I as m, L as h, N as g, O as _, P as v, S as y, W as b, _ as x, at as ee, b as te, d as ne, f as re, g as S, i as ie, it as ae, n as oe, r as se, t as C, x as ce, y as le, z as ue } from "./utils-BYvQMZLG.js";
6
+ import { n as de, r as fe, t as pe } from "./PkStreamingMarkdown-WIueQOg3.js";
7
+ import { t as me } from "./PkChatbotError-DFZ5S5jd.js";
8
+ import { t as he } from "./PkChatbotFeedbackForm-DjsLxYjT.js";
9
+ import { c as ge, i as w, l as T, n as _e, o as ve, s as ye, t as be, u as xe } from "./message-DuibQyHy.js";
10
+ import { t as Se } from "./PkChatbotMessageFeedback-DltXugdR.js";
11
+ import { t as Ce } from "./PkChatbotFilePreview-aKJBtw04.js";
12
+ import { t as we } from "./PkChatbotAudioTranscript-DgmuXalb.js";
13
+ import { t as Te } from "./PkRelativeTime-CZF5CYHv.js";
14
14
  import "./src-nb8MU1sh.js";
15
- import { n as we, r as Te, t as Ee } from "./PkChatbotSteps-DZwV7UVr.js";
16
- import { t as De } from "./PkChatbotOutlineRail-BI-DMvZi.js";
17
- import { n as Oe } from "./useLightbox-DrEFS3gx.js";
18
- import { VvAccordion as ke, VvButtonGroup as Ae, VvIcon as je } from "@volverjs/ui-vue/components";
19
- import { Fragment as E, Transition as D, computed as O, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createTextVNode as Me, createVNode as N, defineAsyncComponent as P, defineComponent as Ne, inject as Pe, mergeProps as Fe, nextTick as F, normalizeClass as I, normalizeStyle as Ie, onBeforeUnmount as Le, onMounted as Re, openBlock as L, ref as R, renderList as ze, renderSlot as Be, resolveDynamicComponent as Ve, shallowRef as He, toDisplayString as z, unref as B, useSlots as Ue, useTemplateRef as We, watch as V, withCtx as H, withModifiers as U } from "vue";
20
- import { useI18n as Ge } from "vue-i18n";
21
- import { useResizeObserver as Ke } from "@vueuse/core";
15
+ import { n as Ee, r as De, t as Oe } from "./PkChatbotSteps-HACZ1RrB.js";
16
+ import { t as ke } from "./PkChatbotOutlineRail-BI-DMvZi.js";
17
+ import { n as Ae } from "./useLightbox-DrEFS3gx.js";
18
+ import { VvAccordion as je, VvButtonGroup as Me, VvIcon as Ne } from "@volverjs/ui-vue/components";
19
+ import { Fragment as E, Transition as D, computed as O, createBlock as k, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createTextVNode as Pe, createVNode as N, defineAsyncComponent as P, defineComponent as F, inject as Fe, mergeProps as Ie, nextTick as I, normalizeClass as L, normalizeStyle as Le, onBeforeUnmount as Re, onMounted as ze, openBlock as R, ref as z, renderList as Be, renderSlot as Ve, resolveDynamicComponent as He, shallowRef as Ue, toDisplayString as B, unref as V, useSlots as We, useTemplateRef as Ge, watch as H, withCtx as U, withModifiers as W } from "vue";
20
+ import { useI18n as Ke } from "vue-i18n";
21
+ import { useResizeObserver as qe } from "@vueuse/core";
22
22
  t({
23
23
  platform: e(),
24
24
  threadId: e()
25
25
  });
26
- var qe = t({
26
+ var Je = t({
27
27
  wakeId: r(),
28
28
  dueAt: ee(),
29
29
  reason: e(),
30
30
  kind: n(["wakeup", "task"]).optional(),
31
31
  taskId: r().optional()
32
32
  });
33
- t({ pendingWakeup: qe.nullable() });
34
- var Je = t({ wakeId: r() });
35
- i([Je, ae]);
36
- var W = (e) => e?.role === "user" && !!e.metadata?.wakeup, Ye = /* @__PURE__ */ new Set([
33
+ t({ pendingWakeup: Je.nullable() });
34
+ var Ye = t({ wakeId: r() });
35
+ i([Ye, ae]);
36
+ var G = (e) => e?.role === "user" && !!e.metadata?.wakeup, Xe = /* @__PURE__ */ new Set([
37
37
  "input-streaming",
38
38
  "input-available",
39
39
  "approval-requested"
40
- ]), Xe = /* @__PURE__ */ new Set([
40
+ ]), Ze = /* @__PURE__ */ new Set([
41
41
  ...o,
42
42
  ...l,
43
43
  ...c
44
44
  ]);
45
45
  [...l, u.ShowContactForm];
46
- var G = (e) => e.state, Ze = (e) => e.type.startsWith("tool-") ? e.type.slice(5) : void 0, Qe = (e) => e?.role === "assistant" && e.parts.some((e) => {
46
+ var K = (e) => e.state, Qe = (e) => e.type.startsWith("tool-") ? e.type.slice(5) : void 0, $e = (e) => e?.role === "assistant" && e.parts.some((e) => {
47
47
  if (e.type === "text") return e.text.trim().length > 0;
48
48
  if (e.type === "file") return !0;
49
- let t = G(e);
50
- if (t && Ye.has(t)) return !0;
51
- let n = Ze(e);
52
- return n !== void 0 && Xe.has(n) && t === "output-available";
53
- }), $e = (e) => {
49
+ let t = K(e);
50
+ if (t && Xe.has(t)) return !0;
51
+ let n = Qe(e);
52
+ return n !== void 0 && Ze.has(n) && t === "output-available";
53
+ }), et = (e) => {
54
54
  if (e?.role !== "assistant") return !1;
55
55
  let t = !1;
56
- for (let n of e.parts) (n.type === "tool-scheduleWakeup" || n.type === "tool-reportTaskRun") && (t = G(n) === "output-available" && n.input?.noop === !0);
56
+ for (let n of e.parts) (n.type === "tool-scheduleWakeup" || n.type === "tool-reportTaskRun") && (t = K(n) === "output-available" && n.input?.noop === !0);
57
57
  return t;
58
- }, et = (e) => e?.role === "assistant" && !Qe(e) && $e(e), tt = {
59
- requestOAuthConnection: P(() => import("./PkToolRequestOAuthConnection-DWkeVLpx.js")),
58
+ }, tt = (e) => e?.role === "assistant" && !$e(e) && et(e), nt = {
59
+ requestOAuthConnection: P(() => import("./PkToolRequestOAuthConnection-BaMZkvU5.js")),
60
60
  shareDocument: P(() => import("./PkToolShareDocument-Bkt9JVqk.js").then((e) => e.n)),
61
- showArtifact: P(() => import("./PkToolShowArtifact-x57Gri2a.js").then((e) => e.n)),
61
+ showArtifact: P(() => import("./PkToolShowArtifact-CPBFsUrY.js").then((e) => e.n)),
62
62
  showCalendarEvent: P(() => import("./PkToolShowCalendarEvent-CAejFLQI.js").then((e) => e.n)),
63
- showChart: P(() => import("./PkToolShowChart-BSnYmoJJ.js")),
63
+ showChart: P(() => import("./PkToolShowChart-BaUS47YU.js")),
64
64
  showComparison: P(() => import("./PkToolShowComparison-BEHyRNXE.js").then((e) => e.n)),
65
- showContactForm: P(() => import("./PkToolShowContactForm-DFufPNnQ.js").then((e) => e.n)),
66
- showDiagram: P(() => import("./PkToolShowDiagram-BR4fE_be.js")),
65
+ showContactForm: P(() => import("./PkToolShowContactForm-6OQ-hjCt.js").then((e) => e.n)),
66
+ showDiagram: P(() => import("./PkToolShowDiagram-D6hPQVoe.js")),
67
67
  showEmail: P(() => import("./PkToolShowEmail-idhNR5-l.js").then((e) => e.n)),
68
- showImageGallery: P(() => import("./PkToolShowImageGallery-mmUY1Yfg.js").then((e) => e.n)),
68
+ showImageGallery: P(() => import("./PkToolShowImageGallery-BlTyCF8h.js").then((e) => e.n)),
69
69
  showLocation: P(() => import("./PkToolShowLocation-CyaKgQUX.js").then((e) => e.n)),
70
70
  showMessage: P(() => import("./PkToolShowMessage-B4gztWUk.js").then((e) => e.n)),
71
- showForm: P(() => import("./PkToolShowForm-yh0YAXcg.js").then((e) => e.n)),
72
- showMultipleChoice: P(() => import("./PkToolShowForm-yh0YAXcg.js").then((e) => e.n)),
73
- showProductList: P(() => import("./PkToolShowProductList-B-ya1TDt.js").then((e) => e.n)),
71
+ showForm: P(() => import("./PkToolShowForm-CAadu_Pq.js").then((e) => e.n)),
72
+ showMultipleChoice: P(() => import("./PkToolShowForm-CAadu_Pq.js").then((e) => e.n)),
73
+ showProductList: P(() => import("./PkToolShowProductList-CZFkf9UD.js").then((e) => e.n)),
74
74
  showQrCode: P(() => import("./PkToolShowQrCode-96KzD1rX.js").then((e) => e.n)),
75
- showSources: P(() => import("./PkToolShowSources-DYkHkVdX.js").then((e) => e.n)),
76
- showSuggestedReply: P(() => import("./PkToolShowSuggestedReply-wKgwHTRO.js").then((e) => e.n)),
77
- showVideo: P(() => import("./PkToolShowVideo-CRg2lAY8.js")),
75
+ showSources: P(() => import("./PkToolShowSources-Bci0Ab2u.js").then((e) => e.n)),
76
+ showSuggestedReply: P(() => import("./PkToolShowSuggestedReply-DCZbwFhR.js").then((e) => e.n)),
77
+ showVideo: P(() => import("./PkToolShowVideo-BnSYdoTJ.js")),
78
78
  showWeather: P(() => import("./PkToolShowWeather-DkWGFxNa.js")),
79
- showWebPages: P(() => import("./PkToolShowWebPages-C_pWag94.js").then((e) => e.n))
80
- }, nt = {
79
+ showWebPages: P(() => import("./PkToolShowWebPages-CHrHuFZI.js").then((e) => e.n))
80
+ }, rt = {
81
81
  key: 0,
82
82
  class: "text-12 text-word-3 m-0 mb-xs"
83
- }, K = /* @__PURE__ */ Ne({
83
+ }, q = /* @__PURE__ */ F({
84
84
  __name: "PkToolApprovalPreviewMessage",
85
85
  props: { input: {} },
86
86
  setup(e) {
@@ -88,12 +88,12 @@ var G = (e) => e.state, Ze = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
88
88
  let e = t.input;
89
89
  return typeof e?.message == "string" ? e.message : "";
90
90
  });
91
- return (e, t) => n.value ? (L(), j("p", nt, z(n.value), 1)) : A("", !0);
91
+ return (e, t) => n.value ? (R(), j("p", rt, B(n.value), 1)) : A("", !0);
92
92
  }
93
- }), q = { [C]: K }, rt = {
93
+ }), J = { [C]: q }, it = {
94
94
  key: 0,
95
95
  class: "text-12 text-word-3 m-0 mb-xs"
96
- }, it = /* @__PURE__ */ Ne({
96
+ }, at = /* @__PURE__ */ F({
97
97
  __name: "PkToolApprovalCard",
98
98
  props: {
99
99
  part: {},
@@ -102,7 +102,7 @@ var G = (e) => e.state, Ze = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
102
102
  },
103
103
  emits: ["respond"],
104
104
  setup(e, { emit: t }) {
105
- let n = e, r = t, { t: i, te: o } = Ge({ useScope: "global" }), c = O(() => n.part), l = O(() => w(n.part)), u = O(() => l.value === C), d = O(() => u.value ? (c.value.state === "input-available" || s(c.value.output)) && n.callVerdict === void 0 : c.value.state === "approval-requested"), f = O(() => d.value && n.actionable === !0), p = O(() => d.value && n.actionable !== !0), m = O(() => u.value ? c.value.output === "confirmed" || n.callVerdict === !0 : c.value.approval?.approved === !0), h = O(() => u.value ? c.value.output === "cancelled" || n.callVerdict === !1 : c.value.approval?.approved === !1 || c.value.state === "output-denied"), g = O(() => q[l.value]), _ = O(() => g.value ? i("toolApproval.prompt") : i("toolApproval.promptNamed", { tool: b(l.value, {
105
+ let n = e, r = t, { t: i, te: o } = Ke({ useScope: "global" }), c = O(() => n.part), l = O(() => w(n.part)), u = O(() => l.value === C), d = O(() => u.value ? (c.value.state === "input-available" || s(c.value.output)) && n.callVerdict === void 0 : c.value.state === "approval-requested"), f = O(() => d.value && n.actionable === !0), p = O(() => d.value && n.actionable !== !0), m = O(() => u.value ? c.value.output === "confirmed" || n.callVerdict === !0 : c.value.approval?.approved === !0), h = O(() => u.value ? c.value.output === "cancelled" || n.callVerdict === !1 : c.value.approval?.approved === !1 || c.value.state === "output-denied"), g = O(() => J[l.value]), _ = O(() => g.value ? i("toolApproval.prompt") : i("toolApproval.promptNamed", { tool: b(l.value, {
106
106
  t: i,
107
107
  te: o
108
108
  }) })), v = O(() => {
@@ -120,37 +120,37 @@ var G = (e) => e.state, Ze = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
120
120
  };
121
121
  }), y = O(() => !!v.value && !g.value);
122
122
  return (t, n) => {
123
- let o = a, s = Ae, l = je;
124
- return L(), j("div", { class: I(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !y.value }]) }, [
123
+ let o = a, s = Me, l = Ne;
124
+ return R(), j("div", { class: L(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !y.value }]) }, [
125
125
  N(D, null, {
126
- default: H(() => [!u.value && d.value ? (L(), j("p", rt, z(_.value), 1)) : A("", !0)]),
126
+ default: U(() => [!u.value && d.value ? (R(), j("p", it, B(_.value), 1)) : A("", !0)]),
127
127
  _: 1
128
128
  }),
129
- g.value ? (L(), k(Ve(g.value), {
129
+ g.value ? (R(), k(He(g.value), {
130
130
  key: 0,
131
131
  part: e.part,
132
132
  input: c.value.input
133
133
  }, null, 8, ["part", "input"])) : A("", !0),
134
134
  N(D, { mode: "out-in" }, {
135
- default: H(() => [v.value ? (L(), j("p", {
135
+ default: U(() => [v.value ? (R(), j("p", {
136
136
  key: 1,
137
- class: I(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": g.value }])
137
+ class: L(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": g.value }])
138
138
  }, [N(l, {
139
139
  name: v.value.icon,
140
140
  class: "shrink-0"
141
- }, null, 8, ["name"]), Me(" " + z(v.value.message), 1)], 2)) : (L(), k(s, { key: 0 }, {
142
- default: H(() => [N(o, {
141
+ }, null, 8, ["name"]), Pe(" " + B(v.value.message), 1)], 2)) : (R(), k(s, { key: 0 }, {
142
+ default: U(() => [N(o, {
143
143
  modifiers: "primary-small",
144
144
  disabled: !f.value,
145
145
  icon: "ri:check-line",
146
- label: B(i)("action.proceed"),
147
- onClick: n[0] ||= U((e) => r("respond", !0), ["stop"])
146
+ label: V(i)("action.proceed"),
147
+ onClick: n[0] ||= W((e) => r("respond", !0), ["stop"])
148
148
  }, null, 8, ["disabled", "label"]), N(o, {
149
149
  modifiers: "action-quiet-small",
150
150
  disabled: !f.value,
151
151
  icon: "ri:close-line",
152
- label: B(i)("action.cancel"),
153
- onClick: n[1] ||= U((e) => r("respond", !1), ["stop"])
152
+ label: V(i)("action.cancel"),
153
+ onClick: n[1] ||= W((e) => r("respond", !1), ["stop"])
154
154
  }, null, 8, ["disabled", "label"])]),
155
155
  _: 1
156
156
  }))]),
@@ -159,16 +159,16 @@ var G = (e) => e.state, Ze = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
159
159
  ], 2);
160
160
  };
161
161
  }
162
- }), J = { class: "pk-host-call-confirm-card w-full bg-surface p-sm rounded-xl border border-surface-3" }, at = { class: "text-14 text-word-2 m-0 mb-xs" }, ot = {
162
+ }), ot = { class: "pk-host-call-confirm-card w-full bg-surface p-sm rounded-xl border border-surface-3" }, st = { class: "text-14 text-word-2 m-0 mb-xs" }, ct = {
163
163
  key: 1,
164
164
  class: "pk-host-call-confirm-card__details text-14 m-0 mb-xs"
165
- }, st = {
165
+ }, lt = {
166
166
  key: 0,
167
167
  class: "text-word-3 truncate"
168
- }, ct = {
168
+ }, ut = {
169
169
  key: 2,
170
170
  class: "text-12 text-word-3 m-0 mb-xs"
171
- }, lt = { class: "pk-host-call-confirm-card__details text-12 m-0" }, Y = { class: "text-word-3" }, ut = { class: "text-word-2 m-0" }, dt = /* @__PURE__ */ Ne({
171
+ }, dt = { class: "pk-host-call-confirm-card__details text-12 m-0" }, Y = { class: "text-word-3" }, ft = { class: "text-word-2 m-0" }, pt = /* @__PURE__ */ F({
172
172
  __name: "PkHostCallConfirmCard",
173
173
  props: {
174
174
  question: {},
@@ -179,49 +179,49 @@ var G = (e) => e.state, Ze = (e) => e.type.startsWith("tool-") ? e.type.slice(5)
179
179
  setup(e, { emit: t }) {
180
180
  let n = e, r = t, i = O(() => n.details?.some((e) => e.before !== void 0) ?? !1);
181
181
  return (t, n) => {
182
- let o = ke, s = a, c = Ae;
183
- return L(), j("div", J, [
184
- M("p", at, z(e.question), 1),
185
- e.details?.length && i.value ? (L(), k(Te, {
182
+ let o = je, s = a, c = Me;
183
+ return R(), j("div", ot, [
184
+ M("p", st, B(e.question), 1),
185
+ e.details?.length && i.value ? (R(), k(De, {
186
186
  key: 0,
187
187
  changes: e.details,
188
188
  class: "mb-xs"
189
- }, null, 8, ["changes"])) : e.details?.length ? (L(), j("dl", ot, [(L(!0), j(E, null, ze(e.details, (e, t) => (L(), j(E, { key: t }, [e.label ? (L(), j("dt", st, z(e.label), 1)) : A("", !0), M("dd", { class: I(["text-word-1 m-0 truncate", { "pk-host-call-confirm-card__alone": !e.label }]) }, z(e.value), 3)], 64))), 128))])) : e.unchanged?.length ? (L(), j("p", ct, z(t.$t("toolApproval.noChanges")), 1)) : A("", !0),
190
- e.unchanged?.length ? (L(), k(o, {
189
+ }, null, 8, ["changes"])) : e.details?.length ? (R(), j("dl", ct, [(R(!0), j(E, null, Be(e.details, (e, t) => (R(), j(E, { key: t }, [e.label ? (R(), j("dt", lt, B(e.label), 1)) : A("", !0), M("dd", { class: L(["text-word-1 m-0 truncate", { "pk-host-call-confirm-card__alone": !e.label }]) }, B(e.value), 3)], 64))), 128))])) : e.unchanged?.length ? (R(), j("p", ut, B(t.$t("toolApproval.noChanges")), 1)) : A("", !0),
190
+ e.unchanged?.length ? (R(), k(o, {
191
191
  key: 3,
192
192
  title: t.$t("toolApproval.unchangedFields", e.unchanged.length),
193
193
  modifiers: "compact",
194
194
  class: "mb-xs"
195
195
  }, {
196
- default: H(() => [M("dl", lt, [(L(!0), j(E, null, ze(e.unchanged, (e, t) => (L(), j(E, { key: t }, [M("dt", Y, z(e.label), 1), M("dd", ut, z(e.value), 1)], 64))), 128))])]),
196
+ default: U(() => [M("dl", dt, [(R(!0), j(E, null, Be(e.unchanged, (e, t) => (R(), j(E, { key: t }, [M("dt", Y, B(e.label), 1), M("dd", ft, B(e.value), 1)], 64))), 128))])]),
197
197
  _: 1
198
198
  }, 8, ["title"])) : A("", !0),
199
199
  N(c, null, {
200
- default: H(() => [N(s, {
200
+ default: U(() => [N(s, {
201
201
  modifiers: "primary-small",
202
202
  icon: "ri:check-line",
203
203
  label: t.$t("action.proceed"),
204
- onClick: n[0] ||= U((e) => r("respond", !0), ["stop"])
204
+ onClick: n[0] ||= W((e) => r("respond", !0), ["stop"])
205
205
  }, null, 8, ["label"]), N(s, {
206
206
  modifiers: "action-quiet-small",
207
207
  icon: "ri:close-line",
208
208
  label: t.$t("action.cancel"),
209
- onClick: n[1] ||= U((e) => r("respond", !1), ["stop"])
209
+ onClick: n[1] ||= W((e) => r("respond", !1), ["stop"])
210
210
  }, null, 8, ["label"])]),
211
211
  _: 1
212
212
  })
213
213
  ]);
214
214
  };
215
215
  }
216
- }), ft = 30, pt = 500;
217
- function mt(e) {
218
- 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, _ = (e = "smooth") => {
216
+ }), mt = 30, ht = 500;
217
+ function gt(e) {
218
+ let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = z(!1), u = z(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, _ = (e = "smooth") => {
219
219
  !t.value || l.value ? d = !1 : (d = !0, t.value.scrollTo({
220
220
  top: t.value.scrollHeight,
221
221
  behavior: e
222
222
  }), setTimeout(() => {
223
223
  d = !1;
224
- }, e === "instant" ? 0 : pt));
224
+ }, e === "instant" ? 0 : ht));
225
225
  }, v = (e) => {
226
226
  e.deltaY < 0 && (l.value = !0);
227
227
  }, y = 0, b = (e) => {
@@ -232,7 +232,7 @@ function mt(e) {
232
232
  }, ee = () => {
233
233
  if (!t.value) return;
234
234
  let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
235
- u.value = n - r - e < ft, d || (e < g && s?.(), e > g && (u.value && (l.value = !1), c?.())), g = e;
235
+ u.value = n - r - e < mt, d || (e < g && s?.(), e > g && (u.value && (l.value = !1), c?.())), g = e;
236
236
  }, te = () => {
237
237
  if (d || l.value || !t.value) return;
238
238
  let e = t.value, n = e.scrollHeight - e.clientHeight;
@@ -248,13 +248,13 @@ function mt(e) {
248
248
  }, re = () => {
249
249
  f?.disconnect(), f = null;
250
250
  };
251
- V(n, (e, t) => {
251
+ H(n, (e, t) => {
252
252
  e === "streaming" || e === "submitted" ? ne() : (e !== "ready" || t !== "streaming") && re();
253
- }), V(r, async () => {
253
+ }), H(r, async () => {
254
254
  if (r() && i() !== "assistant") {
255
255
  ae(), l.value = !1, d = !0;
256
256
  try {
257
- await F(), await o?.(), await F();
257
+ await I(), await o?.(), await I();
258
258
  } finally {
259
259
  _();
260
260
  }
@@ -265,7 +265,7 @@ function mt(e) {
265
265
  }, ae = () => {
266
266
  p?.disconnect(), p = null, m?.disconnect(), m = null, S &&= (clearTimeout(S), null);
267
267
  };
268
- return Re(() => {
268
+ return ze(() => {
269
269
  if (!t.value) return;
270
270
  t.value.addEventListener("wheel", v, { passive: !0 }), t.value.addEventListener("touchstart", b, { passive: !0 }), t.value.addEventListener("touchmove", x, { passive: !0 });
271
271
  let e = n() === "submitted" || n() === "streaming";
@@ -275,7 +275,7 @@ function mt(e) {
275
275
  }));
276
276
  let r = a?.() ?? t.value.firstElementChild;
277
277
  r && (h = new ResizeObserver(te), h.observe(r)), e || ie();
278
- }), Le(() => {
278
+ }), Re(() => {
279
279
  t.value?.removeEventListener("wheel", v), t.value?.removeEventListener("touchstart", b), t.value?.removeEventListener("touchmove", x), h?.disconnect(), h = null, re(), ae();
280
280
  }), {
281
281
  handleScroll: ee,
@@ -285,14 +285,14 @@ function mt(e) {
285
285
  };
286
286
  }
287
287
  // ../../packages/components/src/chat/wakeupFeed.ts
288
- var ht = (e) => e?.metadata?.wakeup?.taskId;
289
- function gt(e, t = () => !1) {
290
- let n = (e) => et(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
288
+ var _t = (e) => e?.metadata?.wakeup?.taskId;
289
+ function vt(e, t = () => !1) {
290
+ let n = (e) => tt(e) && !t(e), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = 0;
291
291
  for (; a < e.length;) {
292
292
  let t = e[a];
293
- if (W(t) && n(e[a + 1])) {
294
- let o = t.id, s = ht(t), c = 0, l;
295
- for (; W(e[a]) && ht(e[a]) === s && n(e[a + 1]);) c += 1, l = e[a].metadata?.createdAt ?? l, r.add(e[a].id), r.add(e[a + 1].id), a += 2;
293
+ if (G(t) && n(e[a + 1])) {
294
+ let o = t.id, s = _t(t), c = 0, l;
295
+ for (; G(e[a]) && _t(e[a]) === s && n(e[a + 1]);) c += 1, l = e[a].metadata?.createdAt ?? l, r.add(e[a].id), r.add(e[a + 1].id), a += 2;
296
296
  i.set(o, {
297
297
  count: c,
298
298
  lastAt: l,
@@ -307,43 +307,43 @@ function gt(e, t = () => !1) {
307
307
  };
308
308
  }
309
309
  // ../../packages/components/src/chat/PkChatbotMessages.vue?vue&type=script&setup=true&lang.ts
310
- var _t = ["aria-busy"], vt = {
310
+ var yt = ["aria-busy"], bt = {
311
311
  key: 0,
312
312
  class: "pk-chatbot-messages__outline"
313
- }, yt = {
313
+ }, xt = {
314
314
  key: 0,
315
315
  class: "pk-chatbot-divider vv-separator"
316
- }, bt = { class: "pk-chatbot-divider__label" }, xt = ["title"], St = ["title"], Ct = { class: "pk-chatbot-message__text" }, wt = ["title"], Tt = {
316
+ }, St = { class: "pk-chatbot-divider__label" }, Ct = ["title"], wt = ["title"], Tt = { class: "pk-chatbot-message__text" }, Et = ["title"], Dt = {
317
317
  key: 0,
318
318
  class: "pk-chatbot-message__reaction-emoji"
319
- }, Et = {
319
+ }, Ot = {
320
320
  key: 0,
321
321
  class: "flex flex-col items-end gap-8 w-full"
322
- }, Dt = { class: "pk-chatbot-message__host-step" }, Ot = { class: "pk-chatbot-message__host-call" }, kt = { class: "pk-chatbot-message__host-call-label" }, At = {
322
+ }, kt = { class: "pk-chatbot-message__host-step" }, At = { class: "pk-chatbot-message__host-call" }, jt = { class: "pk-chatbot-message__host-call-label" }, Mt = {
323
323
  key: 0,
324
324
  class: "pk-chatbot-message__host-call-outcome"
325
- }, jt = {
325
+ }, Nt = {
326
326
  key: 0,
327
327
  class: "pk-chatbot-message__loading-info"
328
- }, Mt = { class: "flex gap-8 items-center" }, Nt = { class: "text-12" }, Pt = ["title"], Ft = { class: "pk-chatbot-message__pointer-label" }, It = ["title"], Lt = { class: "pk-chatbot-message__pointer-label" }, Rt = { class: "flex gap-8 items-center" }, zt = {
328
+ }, Pt = { class: "flex gap-8 items-center" }, Ft = { class: "text-12" }, It = ["title"], Lt = { class: "pk-chatbot-message__pointer-label" }, Rt = ["title"], zt = { class: "pk-chatbot-message__pointer-label" }, Bt = { class: "flex gap-8 items-center" }, Vt = {
329
329
  key: 0,
330
330
  class: "pk-chatbot-message__footer"
331
- }, Bt = {
331
+ }, Ht = {
332
332
  key: 0,
333
333
  class: "pk-chatbot-message__hover-meta"
334
- }, Vt = ["datetime", "title"], Ht = { class: "truncate" }, Ut = {
334
+ }, Ut = ["datetime", "title"], Wt = { class: "truncate" }, Gt = {
335
335
  key: 0,
336
336
  class: "flex items-center gap-4 min-w-0"
337
- }, Wt = { class: "truncate" }, Gt = ["title"], Kt = {
337
+ }, Kt = { class: "truncate" }, qt = ["title"], Jt = {
338
338
  key: 2,
339
339
  class: "flex items-center gap-4 text-12 text-word-3"
340
- }, qt = { class: "truncate" }, Jt = ["datetime"], Yt = { class: "truncate" }, Xt = {
340
+ }, Yt = { class: "truncate" }, Xt = ["datetime"], Zt = { class: "truncate" }, Qt = {
341
341
  key: 4,
342
342
  class: "flex items-center gap-4 text-12 text-word-3"
343
- }, Zt = { class: "pk-chatbot-message__loading-info" }, Qt = { class: "flex gap-8 items-center" }, $t = { class: "text-12" }, en = {
343
+ }, $t = { class: "pk-chatbot-message__loading-info" }, en = { class: "flex gap-8 items-center" }, tn = { class: "text-12" }, nn = {
344
344
  key: 0,
345
345
  class: "pk-chatbot-message pk-chatbot-message--assistant"
346
- }, tn = ["title", "aria-label"], nn = /* @__PURE__ */ Ne({
346
+ }, rn = ["title", "aria-label"], an = /* @__PURE__ */ F({
347
347
  __name: "PkChatbotMessages",
348
348
  props: {
349
349
  status: {},
@@ -393,10 +393,10 @@ var _t = ["aria-busy"], vt = {
393
393
  "host-confirm-respond"
394
394
  ],
395
395
  setup(e, { emit: t }) {
396
- let n = e, r = t, { t: i, te: o, d: s, n: c } = Ge({ useScope: "global" }), l = Pe(se, void 0), u = Pe(oe, void 0), b = (e) => {
396
+ let n = e, r = t, { t: i, te: o, d: s, n: c } = Ke({ useScope: "global" }), l = Fe(se, void 0), u = Fe(oe, void 0), b = (e) => {
397
397
  let t = e.toolCallId;
398
398
  return typeof t == "string" ? u?.value[t]?.details : void 0;
399
- }, ee = Ue(), ae = (e, t) => {
399
+ }, ee = We(), ae = (e, t) => {
400
400
  if (v(e)) {
401
401
  let n = e.toolCallId;
402
402
  n && r("confirm-respond", {
@@ -410,125 +410,135 @@ var _t = ["aria-busy"], vt = {
410
410
  id: n,
411
411
  approved: t
412
412
  });
413
- }, C = We("scrollEl"), P = We("wrapperEl"), Ne = O(() => ue(n.textColor, n.mainColor));
414
- Oe(P);
415
- let { handleScroll: Le, scrollToBottom: qe, userScrolledUp: Je, isAtBottom: Ye } = mt({
413
+ }, C = Ge("scrollEl"), P = Ge("wrapperEl"), F = O(() => ue(n.textColor, n.mainColor));
414
+ Ae(P);
415
+ let { handleScroll: Re, scrollToBottom: Je, userScrolledUp: Ye, isAtBottom: Xe } = gt({
416
416
  scrollEl: C,
417
417
  status: () => n.status,
418
418
  messagesLength: () => n.messages?.length,
419
419
  lastMessageRole: () => n.messages?.[n.messages.length - 1]?.role,
420
420
  contentEl: () => P.value,
421
- beforeNewMessageScroll: () => ct(),
421
+ beforeNewMessageScroll: () => ut(),
422
422
  onScrollUp: () => r("scroll-up"),
423
423
  onScrollDown: () => r("scroll-down")
424
- }), Xe = () => {
425
- Je.value = !1, qe();
426
- }, G = O(() => (n.messages ?? []).filter((e) => e.role === "user" && !W(e)).map((e) => ({
424
+ }), Ze = () => {
425
+ Ye.value = !1, Je();
426
+ }, K = O(() => (n.messages ?? []).filter((e) => e.role === "user" && !G(e)).map((e) => ({
427
427
  id: e.id,
428
428
  preview: e.parts.find(T)?.text.trim().slice(0, 120) || "…"
429
- }))), Ze = R(), Qe = () => C.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], $e = () => {
429
+ }))), Qe = z(), $e = () => C.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], et = () => {
430
430
  let e = C.value;
431
431
  if (!e || !n.showScrollToBottom) return;
432
- let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = G.value[0]?.id;
433
- Qe().forEach((e, n) => {
434
- e.getBoundingClientRect().top <= t && (r = G.value[n]?.id);
435
- }), Ze.value = r;
432
+ let t = e.getBoundingClientRect().top + e.clientHeight / 2, r = K.value[0]?.id;
433
+ $e().forEach((e, n) => {
434
+ e.getBoundingClientRect().top <= t && (r = K.value[n]?.id);
435
+ }), Qe.value = r;
436
436
  };
437
- V(G, async () => {
438
- await F(), $e();
437
+ H(K, async () => {
438
+ await I(), et();
439
439
  });
440
- let et = () => {
441
- Le(), $e();
442
- }, nt = (e) => {
443
- let t = C.value, n = G.value.findIndex((t) => t.id === e), r = Qe()[n];
444
- t && r && (Je.value = !0, t.scrollTo({
440
+ let tt = () => {
441
+ Re(), et();
442
+ }, rt = (e) => {
443
+ let t = C.value, n = K.value.findIndex((t) => t.id === e), r = $e()[n];
444
+ t && r && (Ye.value = !0, t.scrollTo({
445
445
  top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
446
446
  behavior: "smooth"
447
447
  }));
448
- }, K = O(() => n.status === "submitted" || n.status === "streaming" || n.hostWorking === !0), q = R(0), rt = R(!1), J = !1, at = He(), ot = () => n.messages?.[n.messages.length - 1]?.role === "user" || K.value, st = () => {
449
- J = !1, rt.value = !0, q.value = 0;
450
- }, ct = async () => {
448
+ }, q = O(() => n.status === "submitted" || n.status === "streaming" || n.hostWorking === !0), J = z(0), it = z(!1), ot = !1, st = Ue(), ct = () => n.messages?.[n.messages.length - 1]?.role === "user" || q.value, lt = () => {
449
+ ot = !1, it.value = !0, J.value = 0;
450
+ }, ut = async () => {
451
451
  if (!n.messages?.length || n.disableHeightAdjustment) return;
452
- if (!ot()) {
453
- J && (await F(), C.value?.scrollHeight, ot() || st());
452
+ if (!ct()) {
453
+ ot && (await I(), C.value?.scrollHeight, ct() || lt());
454
454
  return;
455
455
  }
456
- if (J = !0, rt.value = !1, await F(), !C.value) return;
457
- let { paddingTop: e, paddingBottom: t } = getComputedStyle(C.value), r = C.value.clientHeight - Number.parseFloat(e) - Number.parseFloat(t), i = P.value && Number.parseFloat(getComputedStyle(P.value).rowGap) || 0, a = Qe();
458
- at.value = a[a.length - 1];
459
- let o = r - (at.value?.clientHeight ?? 0) - i;
460
- r > 0 && (q.value = Math.max(o, 0)), await F();
456
+ if (ot = !0, it.value = !1, await I(), !C.value) return;
457
+ let { paddingTop: e, paddingBottom: t } = getComputedStyle(C.value), r = C.value.clientHeight - Number.parseFloat(e) - Number.parseFloat(t), i = P.value && Number.parseFloat(getComputedStyle(P.value).rowGap) || 0, a = $e();
458
+ st.value = a[a.length - 1];
459
+ let o = r - (st.value?.clientHeight ?? 0) - i;
460
+ r > 0 && (J.value = Math.max(o, 0)), await I();
461
461
  };
462
- V([() => n.messages?.length, () => n.messages?.[n.messages.length - 1]?.id], () => ct()), Ke([C, at], () => {
463
- J && ct();
464
- }), Re(() => {
465
- (K.value || n.awaitingSpokenAnswer) && ct();
466
- }), V(K, (e) => {
467
- e || st();
462
+ H([() => n.messages?.length, () => n.messages?.[n.messages.length - 1]?.id], () => ut()), qe([C, st], () => {
463
+ ot && ut();
464
+ }), ze(() => {
465
+ (q.value || n.awaitingSpokenAnswer) && ut();
466
+ }), H(q, (e) => {
467
+ e || lt();
468
468
  });
469
- let lt = (e) => n.revisedAnswers?.some((t) => t.messageId === e), Y = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), ut = /* @__PURE__ */ new Set([
469
+ let dt = (e) => n.revisedAnswers?.some((t) => t.messageId === e), Y = (e) => n.messageFeedbacks?.find((t) => t.messageId === e), ft = /* @__PURE__ */ new Set([
470
470
  "showContactForm",
471
471
  "showForm",
472
472
  "showMultipleChoice",
473
473
  "showSuggestedReply"
474
- ]), ft = /* @__PURE__ */ new Set([
474
+ ]), mt = /* @__PURE__ */ new Set([
475
475
  "showChart",
476
476
  "showDiagram",
477
477
  "showLocation"
478
- ]), pt = (e) => {
478
+ ]), ht = (e) => {
479
479
  let t = w(e);
480
480
  return {
481
- ...!n.interactive && ut.has(t) ? { record: !0 } : {},
482
- ...ft.has(t) ? { isDark: n.isDark } : {}
481
+ ...!n.interactive && ft.has(t) ? { record: !0 } : {},
482
+ ...mt.has(t) ? { isDark: n.isDark } : {}
483
483
  };
484
- }, ht = (e, t) => !n.readonlyFeedback && xn(e, t), nn = (e) => n.readonlyFeedback ? Y(e) : void 0, rn = (e) => nn(e)?.vote, an = (e) => {
485
- let t = nn(e);
484
+ }, _t = (e, t) => !n.readonlyFeedback && Cn(e, t), an = (e) => n.readonlyFeedback ? Y(e) : void 0, on = (e) => an(e)?.vote, sn = (e) => {
485
+ let t = an(e);
486
486
  if (t?.vote) return;
487
487
  let n = t?.metadata?.reactionEmoji;
488
488
  return typeof n == "string" && /\p{Extended_Pictographic}/u.test(n) ? n : void 0;
489
- }, on = (e) => !!(rn(e) || an(e)), sn = (e) => {
490
- if (an(e)) return "pk-chatbot-message__reaction--neutral";
491
- let t = rn(e);
489
+ }, cn = (e) => !!(on(e) || sn(e)), ln = (e) => {
490
+ if (sn(e)) return "pk-chatbot-message__reaction--neutral";
491
+ let t = on(e);
492
492
  return t === "upvote" ? "pk-chatbot-message__reaction--positive" : t === "downvote" ? "pk-chatbot-message__reaction--negative" : "pk-chatbot-message__reaction--neutral";
493
- }, cn = (e) => {
494
- let t = rn(e);
493
+ }, un = (e) => {
494
+ let t = on(e);
495
495
  return i(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
496
- }, ln = (e) => {
497
- let t = fn(e);
496
+ }, dn = (e) => {
497
+ let t = mn(e);
498
498
  for (let e = t.length - 1; e >= 0; --e) if (T(t[e])) return e;
499
499
  return -1;
500
- }, un = O(() => n.messages?.[n.messages.length - 1]), X = O(() => {
501
- let e = un.value;
500
+ }, fn = O(() => n.messages?.[n.messages.length - 1]), X = O(() => {
501
+ let e = fn.value;
502
502
  return e ? e.parts[e.parts.length - 1] : null;
503
- }), dn = O(() => {
503
+ }), pn = O(() => {
504
504
  let e = /* @__PURE__ */ new Map();
505
505
  for (let t of n.messages ?? []) t.role === "assistant" && e.set(t.id, h(ne(m(t.parts))));
506
506
  return e;
507
- }), fn = (e) => dn.value.get(e.id) ?? e.parts, pn = O(() => n.status === "error"), mn = O(() => n.awaitingSpokenAnswer === !0 && !K.value), hn = O(() => mn.value && un.value?.role === "user" && !pn.value), gn = (e, t) => t(), _n = O(() => {
507
+ }), mn = (e) => pn.value.get(e.id) ?? e.parts, hn = O(() => n.status === "error"), gn = O(() => n.awaitingSpokenAnswer === !0 && !q.value), _n = O(() => gn.value && fn.value?.role === "user" && !hn.value), vn = (e, t) => t(), yn = O(() => {
508
508
  let e = X.value;
509
509
  return p(i, e, l?.value);
510
- }), vn = O(() => {
510
+ }), bn = O(() => {
511
511
  let e = X.value;
512
512
  return le(e);
513
- }), yn = (e) => n.messages?.findIndex((t) => t.id === e), Z = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, bn = (e) => Z(e) && n.status === "ready" && !n.hostWorking && !!n.actions?.includes("regenerate"), xn = (e, t) => (!Z(t) || n.status === "ready" && !n.hostWorking) && !!n.actions?.includes(e), Sn = (e) => {
513
+ }), xn = (e) => n.messages?.findIndex((t) => t.id === e), Z = (e) => e === void 0 || !n.messages ? !1 : e === n.messages.length - 1, Sn = (e) => Z(e) && n.status === "ready" && !n.hostWorking && !!n.actions?.includes("regenerate"), Cn = (e, t) => (!Z(t) || n.status === "ready" && !n.hostWorking) && !!n.actions?.includes(e), wn = (e, t) => Cn("copy", t) && e.parts.some((e) => T(e) && e.text.trim()), Tn = z();
514
+ async function En(e, t) {
515
+ let n = t.currentTarget?.closest(".pk-chatbot-message")?.querySelectorAll(".pk-chatbot-message__text .wysiwyg");
516
+ await de({
517
+ html: fe(Array.from(n ?? [])),
518
+ text: e.parts.filter(T).map((e) => e.text.trim()).filter(Boolean).join("\n\n")
519
+ }) && (Tn.value = e.id, setTimeout(() => {
520
+ Tn.value === e.id && (Tn.value = void 0);
521
+ }, 2e3));
522
+ }
523
+ let Dn = (e) => {
514
524
  let t = e.parts[e.parts.length - 1];
515
525
  return T(t);
516
- }, Cn = (e) => e.parts.some((e) => me(e) || ye(e) || !!x(e)), wn = (e) => !!n.showExtendedSteps && Q(e) && Cn(e), Tn = (e) => n.hostConfirmation !== void 0 && x(e) !== void 0 && e.toolCallId === n.hostConfirmation.toolCallId, En = O(() => n.hostConfirmation !== void 0 && !n.messages?.some((e) => e.parts.some(Tn))), Dn = (e, t) => K.value && Z(e) && x(t)?.state === "input-available", On = (e, t, n, r) => {
517
- if (!x(n) || wn(e)) return !1;
518
- let i = Dn(t, n);
519
- return i && r === fn(e).length - 1 ? !1 : i || f(n) || !ge(e);
520
- }, kn = (e, t) => {
526
+ }, On = (e) => e.parts.some((e) => ge(e) || xe(e) || !!x(e)), kn = (e) => !!n.showExtendedSteps && Q(e) && On(e), An = (e) => n.hostConfirmation !== void 0 && x(e) !== void 0 && e.toolCallId === n.hostConfirmation.toolCallId, jn = O(() => n.hostConfirmation !== void 0 && !n.messages?.some((e) => e.parts.some(An))), Mn = (e, t) => q.value && Z(e) && x(t)?.state === "input-available", Nn = (e, t, n, r) => {
527
+ if (!x(n) || kn(e)) return !1;
528
+ let i = Mn(t, n);
529
+ return i && r === mn(e).length - 1 ? !1 : i || f(n) || !ve(e);
530
+ }, Pn = (e, t) => {
521
531
  let n = x(t);
522
- return n?.state === "output-error" ? i(n.errorText === "The user refused this call. Do not repeat it unless the user asks." ? "toolApproval.denied" : "messagePart.hostToolFailed") : n?.state === "input-available" && !Dn(e, t) ? i("messagePart.hostToolNoAnswer") : void 0;
523
- }, An = (e) => ye(e) && !g(e) && !!(tt[w(e)] || ee[e.type] || n.showAllMessageParts), jn = (e) => e.parts.some((e) => T(e) && !!e.text.trim() || _e(e) || _(e) && !g(e) || An(e)), Q = (e) => e.role === "assistant", Mn = (e) => e.role === "user", Nn = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), Pn = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), Fn = (e) => {
524
- let t = Nn(e)?.metadata?.createdAt, n = Pn(e)?.metadata?.createdAt;
532
+ return n?.state === "output-error" ? i(n.errorText === "The user refused this call. Do not repeat it unless the user asks." ? "toolApproval.denied" : "messagePart.hostToolFailed") : n?.state === "input-available" && !Mn(e, t) ? i("messagePart.hostToolNoAnswer") : void 0;
533
+ }, Fn = (e) => xe(e) && !g(e) && !!(nt[w(e)] || ee[e.type] || n.showAllMessageParts), In = (e) => e.parts.some((e) => T(e) && !!e.text.trim() || ye(e) || _(e) && !g(e) || Fn(e)), Q = (e) => e.role === "assistant", Ln = (e) => e.role === "user", Rn = (e) => n.messages?.slice(0, e).reverse().find((e) => Q(e)), zn = (e) => n.messages?.slice(e + 1).find((e) => Q(e)), Bn = (e) => {
534
+ let t = Rn(e)?.metadata?.createdAt, n = zn(e)?.metadata?.createdAt;
525
535
  if (!t || !n) return;
526
536
  let r = new Date(t), i = new Date(n);
527
537
  return r.toDateString() === i.toDateString() ? void 0 : i;
528
- }, $ = O(() => n.showAllMessageParts ? gt([]) : gt(n.messages ?? [], jn)), In = (e) => e ? "ri:calendar-schedule-line" : "ri:alarm-line", Ln = (e) => {
538
+ }, $ = O(() => n.showAllMessageParts ? vt([]) : vt(n.messages ?? [], In)), Vn = (e) => e ? "ri:calendar-schedule-line" : "ri:alarm-line", Hn = (e) => {
529
539
  let t = e.metadata?.wakeup;
530
540
  return t?.taskId ? i("label.taskRun", { reason: t.reason }) : i("label.wakeupCheck");
531
- }, Rn = (e) => {
541
+ }, Un = (e) => {
532
542
  let t = s(e.lastAt ?? Date.now(), "time");
533
543
  return e.taskId ? i("label.taskQuietRun", {
534
544
  reason: e.reason,
@@ -538,83 +548,83 @@ var _t = ["aria-busy"], vt = {
538
548
  count: e.count,
539
549
  time: t
540
550
  }, e.count);
541
- }, zn = O(() => {
551
+ }, Wn = O(() => {
542
552
  let e = 0;
543
553
  return (n.messages ?? []).map((t) => t.parts.length > 0 ? ++e : void 0);
544
- }), Bn = (e, t) => t === 0 || e.role !== "assistant" ? !1 : !!(n.actions?.length || n.showMessageNumber || n.showMessageDateTime && e.metadata?.createdAt !== void 0 || e.metadata?.completedAt !== void 0 || n.showMessageTokensCount && e.metadata?.totalTokens !== void 0), Vn = (e) => {
554
+ }), Gn = (e, t) => t === 0 || e.role !== "assistant" ? !1 : !!(n.actions?.length || n.showMessageNumber || n.showMessageDateTime && e.metadata?.createdAt !== void 0 || e.metadata?.completedAt !== void 0 || n.showMessageTokensCount && e.metadata?.totalTokens !== void 0), Kn = (e) => {
545
555
  let t = new Date(e), n = t.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
546
556
  return s(t, n ? "time" : "date-time");
547
- }, Hn = (e) => {
557
+ }, qn = (e) => {
548
558
  let { createdAt: t, completedAt: n } = e.metadata ?? {};
549
559
  if (t && n) return S(c, n - t);
550
- }, Un = We("feedbackMessageEl");
551
- return V(() => n.feedbackMessageId, async () => {
552
- if (await F(), !n.feedbackMessageId) return;
553
- let e = Un.value?.[0]?.$el;
554
- e && (Z(yn(n.feedbackMessageId)) ? qe() : e.scrollIntoView({
560
+ }, Jn = Ge("feedbackMessageEl");
561
+ return H(() => n.feedbackMessageId, async () => {
562
+ if (await I(), !n.feedbackMessageId) return;
563
+ let e = Jn.value?.[0]?.$el;
564
+ e && (Z(xn(n.feedbackMessageId)) ? Je() : e.scrollIntoView({
555
565
  behavior: "smooth",
556
566
  block: "center"
557
567
  }));
558
568
  }), (t, n) => {
559
- let u = je, f = ke, m = a, h = Ae;
560
- return L(), j("div", {
569
+ let u = Ne, f = je, m = a, h = Me;
570
+ return R(), j("div", {
561
571
  ref_key: "scrollEl",
562
572
  ref: C,
563
- class: I(["pk-chatbot-messages scrollbar-thin", {
564
- "pk-chatbot-messages--settling": rt.value,
573
+ class: L(["pk-chatbot-messages scrollbar-thin", {
574
+ "pk-chatbot-messages--settling": it.value,
565
575
  "pk-chatbot-messages--parent-scrolls": e.parentScrolls
566
576
  }]),
567
577
  role: "log",
568
578
  "aria-live": "polite",
569
579
  "aria-relevant": "additions text",
570
- "aria-busy": K.value,
571
- style: Ie({
580
+ "aria-busy": q.value,
581
+ style: Le({
572
582
  "--chatbot-main-color": e.mainColor,
573
- "--chatbot-contrast-color": Ne.value
583
+ "--chatbot-contrast-color": F.value
574
584
  }),
575
- onScroll: et
585
+ onScroll: tt
576
586
  }, [
577
- e.showScrollToBottom && G.value.length > 1 ? (L(), j("div", vt, [N(De, {
578
- items: G.value,
579
- "active-id": Ze.value,
580
- onSelect: nt
587
+ e.showScrollToBottom && K.value.length > 1 ? (R(), j("div", bt, [N(ke, {
588
+ items: K.value,
589
+ "active-id": Qe.value,
590
+ onSelect: rt
581
591
  }, null, 8, ["items", "active-id"])])) : A("", !0),
582
592
  M("div", {
583
593
  ref_key: "wrapperEl",
584
594
  ref: P,
585
595
  class: "pk-chatbot-messages__wrapper"
586
596
  }, [
587
- (L(!0), j(E, null, ze(e.messages, (a, y) => (L(), j(E, { key: a.id }, [
588
- Mn(a) && Fn(y) ? (L(), j("div", yt, [M("span", bt, z(B(s)(Fn(y), "short")), 1)])) : A("", !0),
589
- $.value.quietRuns.has(a.id) ? (L(), j("div", {
597
+ (R(!0), j(E, null, Be(e.messages, (a, y) => (R(), j(E, { key: a.id }, [
598
+ Ln(a) && Bn(y) ? (R(), j("div", xt, [M("span", St, B(V(s)(Bn(y), "short")), 1)])) : A("", !0),
599
+ $.value.quietRuns.has(a.id) ? (R(), j("div", {
590
600
  key: 1,
591
601
  class: "pk-chatbot-wakeup",
592
602
  title: $.value.quietRuns.get(a.id).reason
593
603
  }, [N(u, {
594
- name: In($.value.quietRuns.get(a.id).taskId),
604
+ name: Vn($.value.quietRuns.get(a.id).taskId),
595
605
  class: "shrink-0"
596
- }, null, 8, ["name"]), M("span", null, z(Rn($.value.quietRuns.get(a.id))), 1)], 8, xt)) : B(W)(a) && !$.value.hidden.has(a.id) && !e.showAllMessageParts ? (L(), j("div", {
606
+ }, null, 8, ["name"]), M("span", null, B(Un($.value.quietRuns.get(a.id))), 1)], 8, Ct)) : V(G)(a) && !$.value.hidden.has(a.id) && !e.showAllMessageParts ? (R(), j("div", {
597
607
  key: 2,
598
608
  class: "pk-chatbot-wakeup",
599
609
  title: a.metadata?.wakeup?.reason
600
610
  }, [N(u, {
601
- name: In(a.metadata?.wakeup?.taskId),
611
+ name: Vn(a.metadata?.wakeup?.taskId),
602
612
  class: "shrink-0"
603
- }, null, 8, ["name"]), M("span", null, [Me(z(Ln(a)) + " ", 1), a.metadata?.createdAt ? (L(), j(E, { key: 0 }, [Me(" · " + z(B(s)(a.metadata.createdAt, "time")), 1)], 64)) : A("", !0)])], 8, St)) : A("", !0),
604
- (!B(W)(a) || e.showAllMessageParts) && (!$.value.hidden.has(a.id) || K.value && Z(y)) && (a.parts.length || Z(y) && K.value && Q(a)) ? (L(), j("div", {
613
+ }, null, 8, ["name"]), M("span", null, [Pe(B(Hn(a)) + " ", 1), a.metadata?.createdAt ? (R(), j(E, { key: 0 }, [Pe(" · " + B(V(s)(a.metadata.createdAt, "time")), 1)], 64)) : A("", !0)])], 8, wt)) : A("", !0),
614
+ (!V(G)(a) || e.showAllMessageParts) && (!$.value.hidden.has(a.id) || q.value && Z(y)) && (a.parts.length || Z(y) && q.value && Q(a)) ? (R(), j("div", {
605
615
  key: 3,
606
- class: I(["pk-chatbot-message", [`pk-chatbot-message--${a.role}`, { "pk-chatbot-message--loading": K.value && Z(y) && Q(a) }]]),
607
- style: Ie({ minHeight: Z(y) && Q(a) && !pn.value ? `${q.value}px` : void 0 })
616
+ class: L(["pk-chatbot-message", [`pk-chatbot-message--${a.role}`, { "pk-chatbot-message--loading": q.value && Z(y) && Q(a) }]]),
617
+ style: Le({ minHeight: Z(y) && Q(a) && !hn.value ? `${J.value}px` : void 0 })
608
618
  }, [
609
619
  N(D, {
610
620
  appear: "",
611
621
  name: "pk-chatbot-part"
612
622
  }, {
613
- default: H(() => [wn(a) ? (L(), k(Ee, {
623
+ default: U(() => [kn(a) ? (R(), k(Oe, {
614
624
  key: 0,
615
625
  message: a,
616
- "is-streaming": K.value && Z(y),
617
- "has-content": jn(a),
626
+ "is-streaming": q.value && Z(y),
627
+ "has-content": In(a),
618
628
  "hide-reasoning": e.hideReasoning,
619
629
  "is-dark": e.isDark
620
630
  }, null, 8, [
@@ -626,64 +636,66 @@ var _t = ["aria-busy"], vt = {
626
636
  ])) : A("", !0)]),
627
637
  _: 2
628
638
  }, 1024),
629
- (L(!0), j(E, null, ze(fn(a), (s, c) => (L(), j(E, { key: B(re)(s, c) }, [B(T)(s) && s.text.trim() ? (L(), k(D, {
639
+ (R(!0), j(E, null, Be(mn(a), (s, c) => (R(), j(E, { key: V(re)(s, c) }, [V(T)(s) && s.text.trim() ? (R(), k(D, {
630
640
  key: 0,
631
641
  appear: "",
632
642
  name: "pk-chatbot-part"
633
643
  }, {
634
- default: H(() => [M("div", Ct, [Be(t.$slots, "text", Fe({ ref_for: !0 }, {
644
+ default: U(() => [M("div", Tt, [Ve(t.$slots, "text", Ie({ ref_for: !0 }, {
635
645
  message: a,
636
646
  part: s,
637
647
  index: y,
638
- isLoading: K.value
639
- }), () => [Q(a) ? (L(), k(de, {
648
+ isLoading: q.value
649
+ }), () => [Q(a) ? (R(), k(pe, {
640
650
  key: 0,
641
651
  class: "wysiwyg",
642
652
  markdown: s.text,
643
653
  "is-dark": e.isDark,
644
- loading: Z(y) && e.status === "streaming"
654
+ loading: Z(y) && e.status === "streaming",
655
+ "copy-tables": !!e.actions?.includes("copy")
645
656
  }, null, 8, [
646
657
  "markdown",
647
658
  "is-dark",
648
- "loading"
649
- ])) : (L(), j(E, { key: 1 }, [Me(z(s.text), 1)], 64))]), on(a.id) && !Y(a.id)?.comment && c === ln(a) ? (L(), j("span", {
659
+ "loading",
660
+ "copy-tables"
661
+ ])) : (R(), j(E, { key: 1 }, [Pe(B(s.text), 1)], 64))]), cn(a.id) && !Y(a.id)?.comment && c === dn(a) ? (R(), j("span", {
650
662
  key: 0,
651
- class: I(["pk-chatbot-message__reaction", sn(a.id)]),
652
- title: cn(a.id)
653
- }, [an(a.id) ? (L(), j("span", Tt, z(an(a.id)), 1)) : (L(), k(u, {
663
+ class: L(["pk-chatbot-message__reaction", ln(a.id)]),
664
+ title: un(a.id)
665
+ }, [sn(a.id) ? (R(), j("span", Dt, B(sn(a.id)), 1)) : (R(), k(u, {
654
666
  key: 1,
655
- name: rn(a.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
656
- }, null, 8, ["name"]))], 10, wt)) : A("", !0)])]),
667
+ name: on(a.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
668
+ }, null, 8, ["name"]))], 10, Et)) : A("", !0)])]),
657
669
  _: 2
658
- }, 1024)) : B(_e)(s) ? (L(), k(D, {
670
+ }, 1024)) : V(ye)(s) ? (R(), k(D, {
659
671
  key: 1,
660
672
  appear: "",
661
673
  name: "pk-chatbot-part"
662
674
  }, {
663
- default: H(() => [B(d)(s.filename, s.mediaType) ? (L(), j("div", Et, [N(xe, {
675
+ default: U(() => [V(d)(s.filename, s.mediaType) ? (R(), j("div", Ot, [N(Ce, {
664
676
  "media-type": s.mediaType,
665
677
  url: s.url,
666
678
  filename: s.filename,
667
- size: B(ve)(s)?.bytesCount
679
+ size: V(be)(s)?.bytesCount
668
680
  }, null, 8, [
669
681
  "media-type",
670
682
  "url",
671
683
  "filename",
672
684
  "size"
673
- ]), N(Se, {
685
+ ]), N(we, {
674
686
  url: s.url,
675
- transcript: B(he)(s),
687
+ transcript: V(_e)(s),
676
688
  pending: e.status === "submitted" && Z(y)
677
689
  }, null, 8, [
678
690
  "url",
679
691
  "transcript",
680
692
  "pending"
681
- ])])) : (L(), k(xe, {
693
+ ])])) : (R(), k(Ce, {
682
694
  key: 1,
683
695
  "media-type": s.mediaType,
684
696
  url: s.url,
685
697
  filename: s.filename,
686
- size: B(ve)(s)?.bytesCount
698
+ size: V(be)(s)?.bytesCount
687
699
  }, null, 8, [
688
700
  "media-type",
689
701
  "url",
@@ -691,15 +703,15 @@ var _t = ["aria-busy"], vt = {
691
703
  "size"
692
704
  ]))]),
693
705
  _: 2
694
- }, 1024)) : B(_)(s) && !B(g)(s) ? (L(), k(D, {
706
+ }, 1024)) : V(_)(s) && !V(g)(s) ? (R(), k(D, {
695
707
  key: 2,
696
708
  appear: "",
697
709
  name: "pk-chatbot-part"
698
710
  }, {
699
- default: H(() => [(L(), k(it, {
711
+ default: U(() => [(R(), k(at, {
700
712
  key: `approval-${c}`,
701
713
  part: s,
702
- actionable: e.interactive === !0 && (B(v)(s) || Z(y)),
714
+ actionable: e.interactive === !0 && (V(v)(s) || Z(y)),
703
715
  "call-verdict": e.confirmVerdictsOnCall?.get(s.toolCallId ?? ""),
704
716
  onRespond: (e) => ae(s, e)
705
717
  }, null, 8, [
@@ -709,13 +721,13 @@ var _t = ["aria-busy"], vt = {
709
721
  "onRespond"
710
722
  ]))]),
711
723
  _: 2
712
- }, 1024)) : Tn(s) ? (L(), k(D, {
724
+ }, 1024)) : An(s) ? (R(), k(D, {
713
725
  key: 3,
714
726
  appear: "",
715
727
  name: "pk-chatbot-part"
716
728
  }, {
717
- default: H(() => [N(dt, {
718
- question: e.hostConfirmation?.question ?? B(i)("toolApproval.hostCall", { name: B(p)(B(i), s) }),
729
+ default: U(() => [N(pt, {
730
+ question: e.hostConfirmation?.question ?? V(i)("toolApproval.hostCall", { name: V(p)(V(i), s) }),
719
731
  details: e.hostConfirmation?.details,
720
732
  unchanged: e.hostConfirmation?.unchanged,
721
733
  onRespond: n[0] ||= (e) => r("host-confirm-respond", e)
@@ -725,108 +737,108 @@ var _t = ["aria-busy"], vt = {
725
737
  "unchanged"
726
738
  ])]),
727
739
  _: 2
728
- }, 1024)) : On(a, y, s, c) ? (L(), k(D, {
740
+ }, 1024)) : Nn(a, y, s, c) ? (R(), k(D, {
729
741
  key: 4,
730
742
  appear: "",
731
743
  name: "pk-chatbot-part"
732
744
  }, {
733
- default: H(() => [M("div", Dt, [M("div", Ot, [
745
+ default: U(() => [M("div", kt, [M("div", At, [
734
746
  N(u, {
735
- name: Dn(y, s) ? "loading-loop" : B(le)(s) ?? "ri:apps-line",
747
+ name: Mn(y, s) ? "loading-loop" : V(le)(s) ?? "ri:apps-line",
736
748
  class: "shrink-0"
737
749
  }, null, 8, ["name"]),
738
- M("span", kt, z(B(p)(B(i), s, B(l))), 1),
739
- kn(y, s) ? (L(), j("span", At, " · " + z(kn(y, s)), 1)) : A("", !0)
740
- ]), b(s)?.length ? (L(), k(f, {
750
+ M("span", jt, B(V(p)(V(i), s, V(l))), 1),
751
+ Pn(y, s) ? (R(), j("span", Mt, " · " + B(Pn(y, s)), 1)) : A("", !0)
752
+ ]), b(s)?.length ? (R(), k(f, {
741
753
  key: 0,
742
- title: B(i)("toolApproval.changesCount", b(s).length),
754
+ title: V(i)("toolApproval.changesCount", b(s).length),
743
755
  modifiers: "compact",
744
756
  class: "pk-chatbot-message__host-changes"
745
757
  }, {
746
- default: H(() => [N(Te, { changes: b(s) }, null, 8, ["changes"])]),
758
+ default: U(() => [N(De, { changes: b(s) }, null, 8, ["changes"])]),
747
759
  _: 2
748
760
  }, 1032, ["title"])) : A("", !0)])]),
749
761
  _: 2
750
- }, 1024)) : An(s) ? (L(), k(D, {
762
+ }, 1024)) : Fn(s) ? (R(), k(D, {
751
763
  key: 5,
752
764
  appear: "",
753
765
  name: "pk-chatbot-part"
754
766
  }, {
755
- default: H(() => [!B(ee)[s.type] && B(tt)[B(w)(s)] ? (L(), k(Ve(B(tt)[B(w)(s)]), Fe({
756
- key: `component-${c}-${B(te)(s)}`,
767
+ default: U(() => [!V(ee)[s.type] && V(nt)[V(w)(s)] ? (R(), k(He(V(nt)[V(w)(s)]), Ie({
768
+ key: `component-${c}-${V(te)(s)}`,
757
769
  part: s
758
- }, { ref_for: !0 }, pt(s)), null, 16, ["part"])) : Be(t.$slots, s.type, Fe({ ref_for: !0 }, {
770
+ }, { ref_for: !0 }, ht(s)), null, 16, ["part"])) : Ve(t.$slots, s.type, Ie({ ref_for: !0 }, {
759
771
  message: a,
760
772
  part: s,
761
773
  index: y,
762
- isLoading: K.value
763
- }), () => [e.showAllMessageParts ? (L(), j("div", jt, [M("div", Mt, [B(le)(s) ? (L(), k(u, {
774
+ isLoading: q.value
775
+ }), () => [e.showAllMessageParts ? (R(), j("div", Nt, [M("div", Pt, [V(le)(s) ? (R(), k(u, {
764
776
  key: 0,
765
- name: B(le)(s),
777
+ name: V(le)(s),
766
778
  class: "shrink-0"
767
- }, null, 8, ["name"])) : A("", !0), M("span", Nt, z(B(ce)(s, {
768
- t: B(i),
769
- te: B(o)
779
+ }, null, 8, ["name"])) : A("", !0), M("span", Ft, B(V(ce)(s, {
780
+ t: V(i),
781
+ te: V(o)
770
782
  })), 1)])])) : A("", !0)], void 0, 1)]),
771
783
  _: 2
772
784
  }, 1024)) : A("", !0), N(D, { mode: "out-in" }, {
773
- default: H(() => [c === ln(a) && e.readonlyFeedback && Y(a.id)?.comment ? (L(), k(be, {
785
+ default: U(() => [c === dn(a) && e.readonlyFeedback && Y(a.id)?.comment ? (R(), k(Se, {
774
786
  key: 0,
775
787
  feedback: Y(a.id)
776
788
  }, null, 8, ["feedback"])) : A("", !0)]),
777
789
  _: 2
778
790
  }, 1024)], 64))), 128)),
779
- Mn(a) && a.metadata?.pagePointer ? (L(), j("div", {
791
+ Ln(a) && a.metadata?.pagePointer ? (R(), j("div", {
780
792
  key: 0,
781
793
  class: "pk-chatbot-message__pointer",
782
- title: a.metadata.pagePointer.kind === "text" ? B(i)("pagePointer.selected") : B(i)("pagePointer.pointed")
794
+ title: a.metadata.pagePointer.kind === "text" ? V(i)("pagePointer.selected") : V(i)("pagePointer.pointed")
783
795
  }, [N(u, {
784
796
  name: a.metadata.pagePointer.kind === "text" ? "ri:double-quotes-l" : "ri:focus-3-line",
785
797
  class: "pk-chatbot-message__pointer-icon"
786
- }, null, 8, ["name"]), M("span", Ft, z(a.metadata.pagePointer.kind === "text" ? `«${a.metadata.pagePointer.label}»` : a.metadata.pagePointer.label), 1)], 8, Pt)) : Mn(a) && a.metadata?.filePointer ? (L(), j("div", {
798
+ }, null, 8, ["name"]), M("span", Lt, B(a.metadata.pagePointer.kind === "text" ? `«${a.metadata.pagePointer.label}»` : a.metadata.pagePointer.label), 1)], 8, It)) : Ln(a) && a.metadata?.filePointer ? (R(), j("div", {
787
799
  key: 1,
788
800
  class: "pk-chatbot-message__pointer",
789
- title: B(i)("selectionActions.selectedInFile")
801
+ title: V(i)("selectionActions.selectedInFile")
790
802
  }, [N(u, {
791
803
  name: a.metadata.filePointer.format === "docx" ? "ri:file-word-2-line" : "ri:file-excel-2-line",
792
804
  class: "pk-chatbot-message__pointer-icon"
793
- }, null, 8, ["name"]), M("span", Lt, z(a.metadata.filePointer.label), 1)], 8, It)) : A("", !0),
805
+ }, null, 8, ["name"]), M("span", zt, B(a.metadata.filePointer.label), 1)], 8, Rt)) : A("", !0),
794
806
  N(D, {
795
807
  name: "fade-in",
796
808
  mode: "out-in"
797
809
  }, {
798
- default: H(() => [K.value && Z(y) && !Sn(a) && !e.hostConfirmation && Q(a) && (!wn(a) || jn(a)) ? (L(), j("div", {
810
+ default: U(() => [q.value && Z(y) && !Dn(a) && !e.hostConfirmation && Q(a) && (!kn(a) || In(a)) ? (R(), j("div", {
799
811
  key: `loading-info-${a.id}`,
800
812
  class: "pk-chatbot-message__loading-info"
801
- }, [M("div", Rt, [
813
+ }, [M("div", Bt, [
802
814
  N(u, {
803
815
  name: "loading-loop",
804
816
  class: "shrink-0"
805
817
  }),
806
818
  N(D, { mode: "out-in" }, {
807
- default: H(() => [vn.value ? (L(), k(u, {
808
- key: vn.value,
819
+ default: U(() => [bn.value ? (R(), k(u, {
820
+ key: bn.value,
809
821
  class: "shrink-0",
810
- name: vn.value
822
+ name: bn.value
811
823
  }, null, 8, ["name"])) : A("", !0)]),
812
824
  _: 1
813
825
  }),
814
826
  N(D, { mode: "out-in" }, {
815
- default: H(() => [_n.value ? (L(), j("span", {
816
- key: _n.value,
827
+ default: U(() => [yn.value ? (R(), j("span", {
828
+ key: yn.value,
817
829
  class: "text-12"
818
- }, z(_n.value), 1)) : A("", !0)]),
830
+ }, B(yn.value), 1)) : A("", !0)]),
819
831
  _: 1
820
832
  })
821
833
  ]), N(D, {
822
834
  name: "fade-in",
823
835
  mode: "out-in"
824
836
  }, {
825
- default: H(() => [!e.hideReasoning && !wn(a) && X.value && "text" in X.value && X.value.text.trim() ? (L(), k(we, {
837
+ default: U(() => [!e.hideReasoning && !kn(a) && X.value && "text" in X.value && X.value.text.trim() ? (R(), k(Ee, {
826
838
  key: 0,
827
839
  markdown: X.value.text,
828
840
  "is-dark": e.isDark,
829
- "tail-length": B(ie),
841
+ "tail-length": V(ie),
830
842
  "inner-class": "wysiwyg",
831
843
  class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
832
844
  }, null, 8, [
@@ -839,31 +851,44 @@ var _t = ["aria-busy"], vt = {
839
851
  _: 2
840
852
  }, 1024),
841
853
  N(D, { mode: "out-in" }, {
842
- default: H(() => [Bn(a, y) ? (L(), j("div", zt, [
854
+ default: U(() => [Gn(a, y) ? (R(), j("div", Vt, [
843
855
  N(h, {
844
856
  modifiers: "compact",
845
857
  class: "mr-auto shrink-0"
846
858
  }, {
847
- default: H(() => [
859
+ default: U(() => [
848
860
  N(D, { mode: "out-in" }, {
849
- default: H(() => [bn(y) ? (L(), k(m, {
861
+ default: U(() => [Sn(y) ? (R(), k(m, {
850
862
  key: 0,
851
863
  icon: "ri:reset-right-line",
852
864
  modifiers: "action-quiet-small",
853
- title: B(i)("action.regenerate"),
854
- "aria-label": B(i)("action.regenerate"),
855
- onClick: n[1] ||= U((e) => t.$emit("regenerate"), ["stop"])
865
+ title: V(i)("action.regenerate"),
866
+ "aria-label": V(i)("action.regenerate"),
867
+ onClick: n[1] ||= W((e) => t.$emit("regenerate"), ["stop"])
856
868
  }, null, 8, ["title", "aria-label"])) : A("", !0)]),
857
869
  _: 2
858
870
  }, 1024),
871
+ wn(a, y) ? (R(), k(m, {
872
+ key: 0,
873
+ icon: Tn.value === a.id ? "ri:check-line" : "ri:file-copy-line",
874
+ modifiers: "action-quiet-small",
875
+ title: V(i)("action.copyAnswer"),
876
+ "aria-label": V(i)("action.copyAnswer"),
877
+ onClick: W((e) => En(a, e), ["stop"])
878
+ }, null, 8, [
879
+ "icon",
880
+ "title",
881
+ "aria-label",
882
+ "onClick"
883
+ ])) : A("", !0),
859
884
  N(D, { mode: "out-in" }, {
860
- default: H(() => [xn("show-info", y) ? (L(), k(m, {
885
+ default: U(() => [Cn("show-info", y) ? (R(), k(m, {
861
886
  key: 0,
862
887
  icon: "ri:information-line",
863
- title: B(i)("action.getMoreInfo"),
864
- "aria-label": B(i)("action.getMoreInfo"),
888
+ title: V(i)("action.getMoreInfo"),
889
+ "aria-label": V(i)("action.getMoreInfo"),
865
890
  modifiers: "action-quiet-small",
866
- onClick: U((e) => t.$emit("show-info", a), ["stop"])
891
+ onClick: W((e) => t.$emit("show-info", a), ["stop"])
867
892
  }, null, 8, [
868
893
  "title",
869
894
  "aria-label",
@@ -872,14 +897,14 @@ var _t = ["aria-busy"], vt = {
872
897
  _: 2
873
898
  }, 1024),
874
899
  N(D, { mode: "out-in" }, {
875
- default: H(() => [xn("revise", y) ? (L(), k(m, {
900
+ default: U(() => [Cn("revise", y) ? (R(), k(m, {
876
901
  key: 0,
877
- icon: lt(a.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
878
- title: lt(a.id) ? B(i)("action.editRevise") : B(i)("action.createRevise"),
879
- "aria-label": lt(a.id) ? B(i)("action.editRevise") : B(i)("action.createRevise"),
902
+ icon: dt(a.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
903
+ title: dt(a.id) ? V(i)("action.editRevise") : V(i)("action.createRevise"),
904
+ "aria-label": dt(a.id) ? V(i)("action.editRevise") : V(i)("action.createRevise"),
880
905
  modifiers: "action-quiet-small",
881
- class: I({ "text-brand-graphic": lt(a.id) }),
882
- onClick: U((e) => t.$emit("revise", a), ["stop"])
906
+ class: L({ "text-brand-graphic": dt(a.id) }),
907
+ onClick: W((e) => t.$emit("revise", a), ["stop"])
883
908
  }, null, 8, [
884
909
  "icon",
885
910
  "title",
@@ -890,14 +915,14 @@ var _t = ["aria-busy"], vt = {
890
915
  _: 2
891
916
  }, 1024),
892
917
  N(D, { mode: "out-in" }, {
893
- default: H(() => [ht("upvote", y) ? (L(), k(m, {
918
+ default: U(() => [_t("upvote", y) ? (R(), k(m, {
894
919
  key: 0,
895
920
  icon: Y(a.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
896
- title: B(i)("action.upvote"),
897
- "aria-label": B(i)("action.upvote"),
921
+ title: V(i)("action.upvote"),
922
+ "aria-label": V(i)("action.upvote"),
898
923
  "aria-pressed": String(Y(a.id)?.vote === "upvote"),
899
924
  modifiers: "action-quiet-small",
900
- onClick: U((e) => t.$emit("upvote", a), ["stop"])
925
+ onClick: W((e) => t.$emit("upvote", a), ["stop"])
901
926
  }, null, 8, [
902
927
  "icon",
903
928
  "title",
@@ -908,14 +933,14 @@ var _t = ["aria-busy"], vt = {
908
933
  _: 2
909
934
  }, 1024),
910
935
  N(D, { mode: "out-in" }, {
911
- default: H(() => [ht("downvote", y) ? (L(), k(m, {
936
+ default: U(() => [_t("downvote", y) ? (R(), k(m, {
912
937
  key: 0,
913
938
  icon: Y(a.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
914
- title: B(i)("action.downvote"),
915
- "aria-label": B(i)("action.downvote"),
939
+ title: V(i)("action.downvote"),
940
+ "aria-label": V(i)("action.downvote"),
916
941
  "aria-pressed": String(Y(a.id)?.vote === "downvote"),
917
942
  modifiers: "action-quiet-small",
918
- onClick: U((e) => t.$emit("downvote", a), ["stop"])
943
+ onClick: W((e) => t.$emit("downvote", a), ["stop"])
919
944
  }, null, 8, [
920
945
  "icon",
921
946
  "title",
@@ -926,13 +951,13 @@ var _t = ["aria-busy"], vt = {
926
951
  _: 2
927
952
  }, 1024),
928
953
  N(D, { mode: "out-in" }, {
929
- default: H(() => [ht("feedback", y) ? (L(), k(m, {
954
+ default: U(() => [_t("feedback", y) ? (R(), k(m, {
930
955
  key: 0,
931
956
  icon: Y(a.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
932
- title: B(i)("action.feedback"),
933
- "aria-label": B(i)("action.feedback"),
957
+ title: V(i)("action.feedback"),
958
+ "aria-label": V(i)("action.feedback"),
934
959
  modifiers: "action-quiet-small",
935
- onClick: U((e) => t.$emit("feedback", a), ["stop"])
960
+ onClick: W((e) => t.$emit("feedback", a), ["stop"])
936
961
  }, null, 8, [
937
962
  "icon",
938
963
  "title",
@@ -944,38 +969,38 @@ var _t = ["aria-busy"], vt = {
944
969
  ]),
945
970
  _: 2
946
971
  }, 1024),
947
- !e.showMessageDateTime && a.metadata?.createdAt && a.metadata?.completedAt ? (L(), j("div", Bt, [M("time", {
972
+ !e.showMessageDateTime && a.metadata?.createdAt && a.metadata?.completedAt ? (R(), j("div", Ht, [M("time", {
948
973
  datetime: new Date(a.metadata.createdAt).toISOString(),
949
- title: B(s)(new Date(a.metadata.createdAt), "date-time"),
974
+ title: V(s)(new Date(a.metadata.createdAt), "date-time"),
950
975
  class: "flex items-center gap-4 min-w-0"
951
976
  }, [N(u, {
952
977
  name: "ri:time-line",
953
978
  class: "shrink-0"
954
- }), M("span", Ht, z(Vn(a.metadata.createdAt)), 1)], 8, Vt), Hn(a) ? (L(), j("span", Ut, [N(u, {
979
+ }), M("span", Wt, B(Kn(a.metadata.createdAt)), 1)], 8, Ut), qn(a) ? (R(), j("span", Gt, [N(u, {
955
980
  name: "ri:hourglass-line",
956
981
  class: "shrink-0"
957
- }), M("span", Wt, z(Hn(a)), 1)])) : A("", !0)])) : A("", !0),
958
- e.showMessageNumber ? (L(), j("span", {
982
+ }), M("span", Kt, B(qn(a)), 1)])) : A("", !0)])) : A("", !0),
983
+ e.showMessageNumber ? (R(), j("span", {
959
984
  key: 1,
960
- title: B(i)("label.messageNumber", { n: zn.value[y] }),
985
+ title: V(i)("label.messageNumber", { n: Wn.value[y] }),
961
986
  class: "text-12 text-word-3 tabular-nums"
962
- }, " #" + z(zn.value[y]), 9, Gt)) : A("", !0),
963
- e.showMessageTokensCount && a.metadata?.totalTokens ? (L(), j("span", Kt, [N(u, {
987
+ }, " #" + B(Wn.value[y]), 9, qt)) : A("", !0),
988
+ e.showMessageTokensCount && a.metadata?.totalTokens ? (R(), j("span", Jt, [N(u, {
964
989
  name: "ri:ai-generate-2-line",
965
990
  class: "shrink-0"
966
- }), M("span", qt, z(B(c)(a.metadata.totalTokens, "integer")) + " " + z(B(i)("label.tokens")), 1)])) : A("", !0),
967
- e.showMessageDateTime && a.metadata?.createdAt ? (L(), j("time", {
991
+ }), M("span", Yt, B(V(c)(a.metadata.totalTokens, "integer")) + " " + B(V(i)("label.tokens")), 1)])) : A("", !0),
992
+ e.showMessageDateTime && a.metadata?.createdAt ? (R(), j("time", {
968
993
  key: 3,
969
994
  datetime: new Date(a.metadata?.createdAt).toISOString(),
970
995
  class: "flex items-center gap-4 text-12 text-word-3"
971
996
  }, [N(u, {
972
997
  name: "ri:time-line",
973
998
  class: "shrink-0"
974
- }), M("span", Yt, z(B(s)(new Date(a.metadata?.createdAt), "date-time")), 1)], 8, Jt)) : A("", !0),
975
- e.showMessageDateTime && a?.metadata?.completedAt && a?.metadata?.createdAt ? (L(), j("div", Xt, [N(u, {
999
+ }), M("span", Zt, B(V(s)(new Date(a.metadata?.createdAt), "date-time")), 1)], 8, Xt)) : A("", !0),
1000
+ e.showMessageDateTime && a?.metadata?.completedAt && a?.metadata?.createdAt ? (R(), j("div", Qt, [N(u, {
976
1001
  name: "ri:hourglass-line",
977
1002
  class: "shrink-0"
978
- }), N(Ce, {
1003
+ }), N(Te, {
979
1004
  class: "truncate",
980
1005
  date: a.metadata?.createdAt,
981
1006
  "end-date": a.metadata?.completedAt
@@ -984,11 +1009,11 @@ var _t = ["aria-busy"], vt = {
984
1009
  _: 2
985
1010
  }, 1024),
986
1011
  N(D, { mode: "out-in" }, {
987
- default: H(() => [a.id === e.feedbackMessageId ? (L(), k(pe, {
1012
+ default: U(() => [a.id === e.feedbackMessageId ? (R(), k(he, {
988
1013
  key: 0,
989
1014
  ref_for: !0,
990
1015
  ref_key: "feedbackMessageEl",
991
- ref: Un,
1016
+ ref: Jn,
992
1017
  loading: e.feedbackLoading,
993
1018
  submitted: e.feedbackSubmitted,
994
1019
  error: e.feedbackError,
@@ -1006,24 +1031,24 @@ var _t = ["aria-busy"], vt = {
1006
1031
  N(D, {
1007
1032
  appear: "",
1008
1033
  name: "pk-chatbot-part",
1009
- onLeave: gn
1034
+ onLeave: vn
1010
1035
  }, {
1011
- default: H(() => [mn.value ? (L(), j("div", {
1036
+ default: U(() => [gn.value ? (R(), j("div", {
1012
1037
  key: 0,
1013
1038
  class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
1014
- style: Ie({ minHeight: hn.value ? `${q.value}px` : void 0 })
1015
- }, [M("div", Zt, [M("div", Qt, [N(u, {
1039
+ style: Le({ minHeight: _n.value ? `${J.value}px` : void 0 })
1040
+ }, [M("div", $t, [M("div", en, [N(u, {
1016
1041
  name: "loading-loop",
1017
1042
  class: "shrink-0"
1018
- }), M("span", $t, z(B(i)("label.answeringOnTheCall")), 1)])])], 4)) : A("", !0)]),
1043
+ }), M("span", tn, B(V(i)("label.answeringOnTheCall")), 1)])])], 4)) : A("", !0)]),
1019
1044
  _: 1
1020
1045
  }),
1021
1046
  N(D, {
1022
1047
  appear: "",
1023
1048
  name: "pk-chatbot-part"
1024
1049
  }, {
1025
- default: H(() => [En.value ? (L(), j("div", en, [N(dt, {
1026
- question: e.hostConfirmation?.question ?? B(i)("toolApproval.prompt"),
1050
+ default: U(() => [jn.value ? (R(), j("div", nn, [N(pt, {
1051
+ question: e.hostConfirmation?.question ?? V(i)("toolApproval.prompt"),
1027
1052
  details: e.hostConfirmation?.details,
1028
1053
  unchanged: e.hostConfirmation?.unchanged,
1029
1054
  onRespond: n[4] ||= (e) => r("host-confirm-respond", e)
@@ -1038,7 +1063,7 @@ var _t = ["aria-busy"], vt = {
1038
1063
  appear: "",
1039
1064
  name: "pk-chatbot-part"
1040
1065
  }, {
1041
- default: H(() => [pn.value ? (L(), k(fe, {
1066
+ default: U(() => [hn.value ? (R(), k(me, {
1042
1067
  key: 0,
1043
1068
  error: e.error,
1044
1069
  onRetry: n[5] ||= (e) => t.$emit("auto-retry"),
@@ -1046,27 +1071,27 @@ var _t = ["aria-busy"], vt = {
1046
1071
  }, null, 8, ["error"])) : A("", !0)]),
1047
1072
  _: 1
1048
1073
  }),
1049
- un.value?.role === "user" && !hn.value || pn.value ? (L(), j("div", {
1074
+ fn.value?.role === "user" && !_n.value || hn.value ? (R(), j("div", {
1050
1075
  key: 0,
1051
1076
  class: "pk-chatbot-messages__spacer",
1052
- style: Ie({ minHeight: `${q.value}px` })
1077
+ style: Le({ minHeight: `${J.value}px` })
1053
1078
  }, null, 4)) : A("", !0)
1054
1079
  ], 512),
1055
1080
  N(D, { name: "pk-chatbot-messages-fab" }, {
1056
- default: H(() => [e.showScrollToBottom && (B(Je) || !B(Ye)) ? (L(), j("button", {
1081
+ default: U(() => [e.showScrollToBottom && (V(Ye) || !V(Xe)) ? (R(), j("button", {
1057
1082
  key: 0,
1058
1083
  type: "button",
1059
1084
  class: "pk-chatbot-messages__scroll-to-bottom",
1060
- title: B(i)("action.scrollToBottom"),
1061
- "aria-label": B(i)("action.scrollToBottom"),
1062
- onClick: Xe
1063
- }, [N(u, { name: "ri:arrow-down-line" })], 8, tn)) : A("", !0)]),
1085
+ title: V(i)("action.scrollToBottom"),
1086
+ "aria-label": V(i)("action.scrollToBottom"),
1087
+ onClick: Ze
1088
+ }, [N(u, { name: "ri:arrow-down-line" })], 8, rn)) : A("", !0)]),
1064
1089
  _: 1
1065
1090
  })
1066
- ], 46, _t);
1091
+ ], 46, yt);
1067
1092
  };
1068
1093
  }
1069
1094
  });
1070
- export { nn as t };
1095
+ export { an as t };
1071
1096
 
1072
- //# sourceMappingURL=PkChatbotMessages-CG3UZYcP.js.map
1097
+ //# sourceMappingURL=PkChatbotMessages-CzPsgCAN.js.map