@camera.ui/server 2.2.1 → 2.2.3

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 (490) hide show
  1. package/dist/interface/assets/{404-Ci4V-7l9.js → 404-D0S6IGok.js} +1 -1
  2. package/dist/interface/assets/{About-BSGYUvI7.js → About-DAw9u8ZY.js} +1 -1
  3. package/dist/interface/assets/Assistant-Gi6_YkEY.js +1 -0
  4. package/dist/interface/assets/Automation-6eFKPJPu.js +3 -0
  5. package/dist/interface/assets/AutomationImport-95PfbPvG.js +2 -0
  6. package/dist/interface/assets/AutomationStore-BHxzzx7a.js +2 -0
  7. package/dist/interface/assets/AutomationStoreDetail-DEVlRllt.js +2 -0
  8. package/dist/interface/assets/Automations-DEivoiS1.js +2 -0
  9. package/dist/interface/assets/Camera-B5l_gv7t.js +2 -0
  10. package/dist/interface/assets/{CameraConsole-DbmJ9PNU.js → CameraConsole-B8bBYQzk.js} +1 -1
  11. package/dist/interface/assets/Cameras-HblWPGCv.js +651 -0
  12. package/dist/interface/assets/Camview-DEKrbg5R.js +1 -0
  13. package/dist/interface/assets/{CertificateUpload-_VQx5fjA.js → CertificateUpload-CC6YtX7h.js} +1 -1
  14. package/dist/interface/assets/{Config-BuuQmMOC.js → Config-DQEaOnaN.js} +1 -1
  15. package/dist/interface/assets/{ConfigActionAssistant-DforDPLT.js → ConfigActionAssistant-C_XRnBzo.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionCameraControl-LwL8BSZX.js → ConfigActionCameraControl-oRzM9rjX.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionDelay-C6u-CHFE.js → ConfigActionDelay-Dc-NZS5L.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionHttp-CxbJVkf2.js → ConfigActionHttp-Nw0wt-JZ.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionImageInput-BpDXjbnf.js → ConfigActionImageInput-Do60Upqm.js} +1 -1
  20. package/dist/interface/assets/{ConfigActionMqtt-BkbAAepo.js → ConfigActionMqtt-BeQVgaGX.js} +1 -1
  21. package/dist/interface/assets/{ConfigActionNotification-B2Dtkf2b.js → ConfigActionNotification-BA0FjOWs.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionNotificationControl-DMW2_Vez.js → ConfigActionNotificationControl-Ce3Kd_Xv.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionOutput-WVe74xXz.js → ConfigActionOutput-ChiOMWDy.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionPlugin-C3iZfPRv.js → ConfigActionPlugin-Cn3r0glk.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionSensor-DSW92VVP.js → ConfigActionSensor-DkdBCu-6.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionSnapshot-Cl3NLmyn.js → ConfigActionSnapshot-CLlaDFUV.js} +1 -1
  27. package/dist/interface/assets/{ConfigActionVariable-Due14Kwt.js → ConfigActionVariable-D4x3Luxl.js} +1 -1
  28. package/dist/interface/assets/{ConfigConditionIfElse-mIXw954j.js → ConfigConditionIfElse-BpL8KZ5X.js} +1 -1
  29. package/dist/interface/assets/{ConfigConditionSensorState-C_FpJLnM.js → ConfigConditionSensorState-CSQexUF_.js} +1 -1
  30. package/dist/interface/assets/{ConfigConditionSwitch-CYRUg-Uo.js → ConfigConditionSwitch-CB2J_5kr.js} +1 -1
  31. package/dist/interface/assets/{ConfigConditionTime-WkevpYaO.js → ConfigConditionTime-X9fsNsYu.js} +1 -1
  32. package/dist/interface/assets/{ConfigSensorValueInput-BDz5olLY.js → ConfigSensorValueInput-VPhPxrQl.js} +1 -1
  33. package/dist/interface/assets/{ConfigTriggerDetection-Cb_BObEL.js → ConfigTriggerDetection-Dhzng4X5.js} +1 -1
  34. package/dist/interface/assets/{ConfigTriggerGeofence-B7Iugx3i.js → ConfigTriggerGeofence-Cm0CLNf5.js} +1 -1
  35. package/dist/interface/assets/{ConfigTriggerManual-D7w6C58j.js → ConfigTriggerManual-CRi3rsgG.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerMqtt-D_ozlopI.js → ConfigTriggerMqtt-Ck__CWck.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerSchedule-1UcaRD5S.js → ConfigTriggerSchedule-C1PZrHEu.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerSensor-D9_lg6yH.js → ConfigTriggerSensor-9xVgCtkn.js} +1 -1
  39. package/dist/interface/assets/{ConfigTriggerSystem-COPR6t7r.js → ConfigTriggerSystem-Denf1gkO.js} +1 -1
  40. package/dist/interface/assets/{ConfigTriggerWebhook-C0v6uR67.js → ConfigTriggerWebhook-im24LkCn.js} +1 -1
  41. package/dist/interface/assets/Console-Q1HpmyO_.js +1 -0
  42. package/dist/interface/assets/CuiAssistantConversation-BxJf9sdu.js +5 -0
  43. package/dist/interface/assets/{CuiAssistantConversation-BkWDr6uX.css → CuiAssistantConversation-DmSdiv1b.css} +1 -1
  44. package/dist/interface/assets/{CuiAutomationRunsDialog-CGBqZXR4.js → CuiAutomationRunsDialog-B3tJ-Cma.js} +1 -1
  45. package/dist/interface/assets/CuiBottomSheet-C37blNu-.js +1 -0
  46. package/dist/interface/assets/{CuiBottomSheet-DomRjKV8.js → CuiBottomSheet-kvvLw1MQ.js} +1 -1
  47. package/dist/interface/assets/CuiCameraPipCard-TVAf5ZYQ.js +1 -0
  48. package/dist/interface/assets/CuiCameraRecordings-C26rX8dh.css +1 -0
  49. package/dist/interface/assets/CuiCameraRecordings-IHg1dNf4.js +1 -0
  50. package/dist/interface/assets/{CuiCameraShares-CVbWZZ_i.js → CuiCameraShares-B5ghuJS-.js} +1 -1
  51. package/dist/interface/assets/{CuiCameraTable-B1F2UjZk.js → CuiCameraTable-Y5XUkU7w.js} +1 -1
  52. package/dist/interface/assets/CuiCameraTable-xDZz7Wpe.js +1 -0
  53. package/dist/interface/assets/{CuiChartTable-CcovDii1.js → CuiChartTable-CXdupaj5.js} +1 -1
  54. package/dist/interface/assets/CuiChartTable-DXY7rY3O.css +1 -0
  55. package/dist/interface/assets/{CuiConsole-BzJJnQTd.js → CuiConsole-5KgXSOS5.js} +2 -2
  56. package/dist/interface/assets/CuiDataTable-DPIbKnvU.css +1 -0
  57. package/dist/interface/assets/CuiDataTable-hArZWV9B.js +1 -0
  58. package/dist/interface/assets/CuiLightControl-MRpR0XIZ.js +1 -0
  59. package/dist/interface/assets/{CuiList-Dfklll0h.js → CuiList-D-l4HrBP.js} +1 -1
  60. package/dist/interface/assets/CuiPluginCard-whoQ5YHn.js +2 -0
  61. package/dist/interface/assets/CuiPluginCategoryChip-CH53zk2o.js +1 -0
  62. package/dist/interface/assets/CuiPluginOAuthButton-BBA0AzVO.js +2 -0
  63. package/dist/interface/assets/{CuiPluginTrustBadge-CILKiExH.js → CuiPluginTrustBadge-C0EX5aCI.js} +1 -1
  64. package/dist/interface/assets/{CuiQRCode-DHUwFLQz.js → CuiQRCode-BRT0NO5c.js} +1 -1
  65. package/dist/interface/assets/CuiSchema-DBY1x1BT.js +1 -0
  66. package/dist/interface/assets/{CuiTopNavbarItem-DBsbHvkJ.js → CuiTopNavbarItem-CpMT8_0r.js} +1 -1
  67. package/dist/interface/assets/Faces-Dqi30qs9.js +1 -0
  68. package/dist/interface/assets/FirstSteps-B8n4fGK3.js +1 -0
  69. package/dist/interface/assets/Floorplan-ZHXNaZA8.js +1 -0
  70. package/dist/interface/assets/{Instances-cgw_Xzu0.js → Instances-DEj3gs6H.js} +1 -1
  71. package/dist/interface/assets/{Logs-BrTGt33Q.js → Logs-CwHvSKd6.js} +2 -2
  72. package/dist/interface/assets/Menu-C4BxUV0P.js +1 -0
  73. package/dist/interface/assets/Metrics-BCOE-rcw.js +9 -0
  74. package/dist/interface/assets/{OAuthDeviceFlow-Bx6YBLUX.js → OAuthDeviceFlow-D6bjZOYS.js} +1 -1
  75. package/dist/interface/assets/Plugin-ppCvxkl4.js +1 -0
  76. package/dist/interface/assets/{PluginConsole-C6xky2l3.js → PluginConsole-BP42Qpee.js} +1 -1
  77. package/dist/interface/assets/PluginDetail-BnX5lZGz.js +2 -0
  78. package/dist/interface/assets/{PluginSchema-D5dmitq0.js → PluginSchema-uVKXzfo6.js} +1 -1
  79. package/dist/interface/assets/PluginSearch-C4MvWyLb.js +1 -0
  80. package/dist/interface/assets/PluginSearch-no79fTuf.js +2 -0
  81. package/dist/interface/assets/{PluginUpdateProgress-Cj4Ilm8M.js → PluginUpdateProgress-73jprYHA.js} +1 -1
  82. package/dist/interface/assets/Plugins-DtEqS6_j.js +1 -0
  83. package/dist/interface/assets/RecentEventsFilter-CtyCbt6Z.js +1 -0
  84. package/dist/interface/assets/Recordings-DrcOsRLn.js +1 -0
  85. package/dist/interface/assets/{SensorEdit-BBTdSbok.js → SensorEdit-D4-mMg8S.js} +1 -1
  86. package/dist/interface/assets/{SensorHistory-BmGYTFWx.js → SensorHistory-C-X7VI-f.js} +1 -1
  87. package/dist/interface/assets/Sensors-BJh8BkCR.js +2 -0
  88. package/dist/interface/assets/{Settings-B-lq2Bls.js → Settings-B9CZvA-d.js} +1 -1
  89. package/dist/interface/assets/SettingsAccount-CkvScQmF.js +1 -0
  90. package/dist/interface/assets/SettingsAccount-D3zF2kLc.js +1 -0
  91. package/dist/interface/assets/{SettingsAppearance-DMhqHxXU.js → SettingsAppearance-CbG8M38w.js} +1 -1
  92. package/dist/interface/assets/SettingsAppearance-ZHqNXXIL.js +1 -0
  93. package/dist/interface/assets/SettingsAssistant-BESab92C.css +1 -0
  94. package/dist/interface/assets/SettingsAssistant-DxYPnbms.js +1 -0
  95. package/dist/interface/assets/{SettingsBackup-C9clJ_2F.js → SettingsBackup-DZBzUyQm.js} +1 -1
  96. package/dist/interface/assets/{SettingsList-Ba5TjVzD.js → SettingsList-DFg8g7IM.js} +1 -1
  97. package/dist/interface/assets/{SettingsMqtt-4tFIdfzL.js → SettingsMqtt-BeujOZkh.js} +1 -1
  98. package/dist/interface/assets/SettingsNotifications-DtSTE76r.js +1 -0
  99. package/dist/interface/assets/{SettingsPermissions-B6vNyFvJ.js → SettingsPermissions-CPOAefv0.js} +1 -1
  100. package/dist/interface/assets/SettingsRecordings-ClAtT4Bh.js +1 -0
  101. package/dist/interface/assets/SettingsRemote-58S4Thfp.js +2 -0
  102. package/dist/interface/assets/SettingsSystem-tTGpuiRW.js +2 -0
  103. package/dist/interface/assets/{SettingsUsers-DOUvMVjf.js → SettingsUsers-D8b7I5c2.js} +1 -1
  104. package/dist/interface/assets/{Terminal-BoMq8civ.js → Terminal-1_Fi0VW-.js} +2 -2
  105. package/dist/interface/assets/Training-CQHfQjUP.css +1 -0
  106. package/dist/interface/assets/Training-DfOqDTHJ.js +1 -0
  107. package/dist/interface/assets/{Updates-Cceza_vs.js → Updates-BW0p7Wc5.js} +1 -1
  108. package/dist/interface/assets/{VariableInput-Ds5NaShw.js → VariableInput-sqnLuk6S.js} +1 -1
  109. package/dist/interface/assets/{VariableSuggestions-B0Y5QsCw.js → VariableSuggestions-3pbnxhyT.js} +1 -1
  110. package/dist/interface/assets/{VersionsHandler-D3ugTFh9.js → VersionsHandler-CWmjDygB.js} +1 -1
  111. package/dist/interface/assets/VirtualSensorCreate-BzmFlvYD.js +1 -0
  112. package/dist/interface/assets/Workers-Dm9o2wMo.js +2 -0
  113. package/dist/interface/assets/api-B6TtU9Ew.css +2 -0
  114. package/dist/interface/assets/{api-C4b9FQa5.js → api-CQ-3I3-i.js} +1 -1
  115. package/dist/interface/assets/api-DPgKdIQZ.js +4 -0
  116. package/dist/interface/assets/{assistant-DfBoMwZZ.js → assistant-0UymvpMy.js} +1 -1
  117. package/dist/interface/assets/{auth-jXwc9evv.js → auth-C0jhqNaz.js} +1 -1
  118. package/dist/interface/assets/{automations-Bx7_-5ll.js → automations-Bj30nb8s.js} +1 -1
  119. package/dist/interface/assets/cameraSources-CiMjIjsh.js +1 -0
  120. package/dist/interface/assets/cloudHandoff-Cxljjl7N.js +1 -0
  121. package/dist/interface/assets/{config-4L2n-1_z.js → config-D-uVfwYp.js} +1 -1
  122. package/dist/interface/assets/dots-vertical-C4DlXZyp.js +1 -0
  123. package/dist/interface/assets/eventIcons-BPQ-zSnz.js +1 -0
  124. package/dist/interface/assets/{flowSchema-ZMBzlKJI.js → flowSchema-D3nNJVLL.js} +1 -1
  125. package/dist/interface/assets/{intercomService-DQ4LZJfW.js → intercomService-BeoNs-09.js} +1 -1
  126. package/dist/interface/assets/main-BrNGfemk.js +3 -0
  127. package/dist/interface/assets/{mqtt-DEt78fr7.js → mqtt-D7jRwifB.js} +1 -1
  128. package/dist/interface/assets/{notifications-mJrKtTFp.js → notifications-BpRVoerg.js} +1 -1
  129. package/dist/interface/assets/pause-B7ud2O8d.js +1 -0
  130. package/dist/interface/assets/{plugins-IMJg5aI8.js → plugins-wZ4RDxCb.js} +1 -1
  131. package/dist/interface/assets/{rooms-Dt3X1UEj.js → rooms-CFcu2dU1.js} +1 -1
  132. package/dist/interface/assets/sensorIcons-B117n8l2.js +1 -0
  133. package/dist/interface/assets/{sensorSlots-CUWphRrL.js → sensorSlots-CAr3prFc.js} +1 -1
  134. package/dist/interface/assets/{sensors-DG-GPuvr.js → sensors-oriEG3KR.js} +1 -1
  135. package/dist/interface/assets/{server-CFtdMCM4.js → server-Ce6ou2NV.js} +1 -1
  136. package/dist/interface/assets/{theme-C8wlVvxI.js → theme-CBTC6-Lp.js} +1 -1
  137. package/dist/interface/assets/{types-BxQYBZ2c.js → types-C-amdBz6.js} +1 -1
  138. package/dist/interface/assets/types-CjU6-JvD.js +1 -0
  139. package/dist/interface/assets/types-CzjppLwt.js +1 -0
  140. package/dist/interface/assets/{ungrouped-Dbr16vFt.css → ungrouped-AYNBKz52.css} +1 -1
  141. package/dist/interface/assets/ungrouped-BQzKp2PT.js +1 -0
  142. package/dist/interface/assets/{updates-DqHYjhVs.js → updates-Cohtc6vb.js} +1 -1
  143. package/dist/interface/assets/{useAppVersion-iJHv6EYQ.js → useAppVersion-xxi6fR7J.js} +1 -1
  144. package/dist/interface/assets/{useAssistantActions-BeXqj2-6.js → useAssistantActions-BkRK1FBg.js} +1 -1
  145. package/dist/interface/assets/useBackupRestore-BGvhSqJB.js +1 -0
  146. package/dist/interface/assets/{useCameraOptions-DVcUIXzh.js → useCameraOptions-ophs2V4p.js} +1 -1
  147. package/dist/interface/assets/{useKeyboardInset-DpxykA20.js → useKeyboardInset-Cpz6Hs5c.js} +1 -1
  148. package/dist/interface/assets/{useLogsSocket-D2gJ0e00.js → useLogsSocket-CB07yhv4.js} +1 -1
  149. package/dist/interface/assets/{useNavLayout-D-KmCM3U.js → useNavLayout-BYEejBpb.js} +1 -1
  150. package/dist/interface/assets/{usePermissions-CsWQ7pWp.js → usePermissions-yWhjYMcr.js} +1 -1
  151. package/dist/interface/assets/{usePluginUpdates-D0bz8TeJ.js → usePluginUpdates-9rvsWfdJ.js} +1 -1
  152. package/dist/interface/assets/{usePushRegistration-B9vouC4k.js → usePushRegistration-b5owOzjH.js} +1 -1
  153. package/dist/interface/assets/{useServerRestart-CaYRL38s.js → useServerRestart-yRXDWnH_.js} +1 -1
  154. package/dist/interface/assets/{useStreamStatus-BSl9TJlX.js → useStreamStatus-BHyWrAHu.js} +1 -1
  155. package/dist/interface/assets/{useTabSwipe-B6GIPOrZ.js → useTabSwipe-Dr9HYP1J.js} +1 -1
  156. package/dist/interface/assets/{useUpdateChannel-BuIKUKQ9.js → useUpdateChannel-IVj0XKlN.js} +1 -1
  157. package/dist/interface/assets/{useUpdatesSocket-B8F-9tUI.js → useUpdatesSocket-CuPHbSF7.js} +1 -1
  158. package/dist/interface/assets/{useUserOptions-9Lcq7htw.js → useUserOptions-zIfrMDiG.js} +1 -1
  159. package/dist/interface/assets/{vendor-cameraui-zaB6gIk1.js → vendor-cameraui-Dhg7MEnt.js} +2 -2
  160. package/dist/interface/assets/{vendor-core-CfoDuMvj.js → vendor-core-CQ2HVu0L.js} +1 -1
  161. package/dist/interface/assets/{vendor-primevue-5HrOunkM.js → vendor-primevue-CeWNZxSE.js} +1 -1
  162. package/dist/interface/assets/vendor-zod-CBbC1rE7.js +109 -0
  163. package/dist/interface/ha/{404-BA6DAi0I.js → 404-B70KNhsW.js} +1 -1
  164. package/dist/interface/ha/{About-D3tEPbYC.js → About-DLNqqctZ.js} +3 -3
  165. package/dist/interface/ha/{Assistant-BSlIm7T1.js → Assistant-Duvvoz2B.js} +1004 -988
  166. package/dist/interface/ha/{Automation-B7ZCtbpe.js → Automation-DZ8zvsvo.js} +199 -199
  167. package/dist/interface/ha/{AutomationImport-CVEGBlET.js → AutomationImport-DOCdim5O.js} +7 -7
  168. package/dist/interface/ha/{AutomationStore-hW-ReFbV.js → AutomationStore-Bjoubp-m.js} +52 -51
  169. package/dist/interface/ha/{AutomationStoreDetail-R-1XPudW.js → AutomationStoreDetail-H-RWNpwm.js} +20 -20
  170. package/dist/interface/ha/{Automations-9CLEXB1U.js → Automations-GyofQfo7.js} +87 -100
  171. package/dist/interface/ha/{Camera-CQK1LgJe.js → Camera-Bo5nMQaU.js} +30 -30
  172. package/dist/interface/ha/{CameraConsole-C6CZ3tzc.js → CameraConsole-BmDQ3rcS.js} +5 -5
  173. package/dist/interface/ha/{Cameras-Bw_Co8e9.js → Cameras-BfHoFjpC.js} +224 -224
  174. package/dist/interface/ha/{Camview-fb7D6KvD.js → Camview-DVoIdM3o.js} +332 -331
  175. package/dist/interface/ha/{Config-Cf0XlhJ-.js → Config-CC8tQiOy.js} +110 -110
  176. package/dist/interface/ha/{ConfigActionAssistant-BtnJwaka.js → ConfigActionAssistant-hfsz38an.js} +4 -4
  177. package/dist/interface/ha/{ConfigActionCameraControl-B1NtlCI4.js → ConfigActionCameraControl-C0-wxlAS.js} +5 -5
  178. package/dist/interface/ha/{ConfigActionHttp-BpI7XQC3.js → ConfigActionHttp-CM_3bIUq.js} +2 -2
  179. package/dist/interface/ha/{ConfigActionImageInput-tLzrOm0l.js → ConfigActionImageInput-B5306Z_7.js} +1 -1
  180. package/dist/interface/ha/{ConfigActionMqtt-DIuCKfQL.js → ConfigActionMqtt-DLiM83Kz.js} +4 -4
  181. package/dist/interface/ha/{ConfigActionNotification-CotMZbgF.js → ConfigActionNotification-36VBlfim.js} +4 -4
  182. package/dist/interface/ha/{ConfigActionNotificationControl-ClnOPBa2.js → ConfigActionNotificationControl-DRjDvA1H.js} +2 -2
  183. package/dist/interface/ha/{ConfigActionOutput-DFRh3xK2.js → ConfigActionOutput-BkGHERoJ.js} +1 -1
  184. package/dist/interface/ha/{ConfigActionPlugin-BSUdCGwz.js → ConfigActionPlugin-Ds1_Pow7.js} +5 -5
  185. package/dist/interface/ha/{ConfigActionSensor-B-PHlt11.js → ConfigActionSensor-22uKE0d0.js} +6 -6
  186. package/dist/interface/ha/{ConfigActionSnapshot-DomyiKiQ.js → ConfigActionSnapshot-uTTsTfo2.js} +2 -2
  187. package/dist/interface/ha/{ConfigActionVariable-D4QZ0GSg.js → ConfigActionVariable-DNMJBiQV.js} +1 -1
  188. package/dist/interface/ha/{ConfigConditionIfElse-Din_LVbb.js → ConfigConditionIfElse-BVzmIDKK.js} +3 -3
  189. package/dist/interface/ha/{ConfigConditionSensorState-cnMbVYSj.js → ConfigConditionSensorState-Di7Ic1xI.js} +4 -4
  190. package/dist/interface/ha/{ConfigConditionSwitch-nLCPZ02V.js → ConfigConditionSwitch-D8CcTHJ1.js} +10 -10
  191. package/dist/interface/ha/{ConfigConditionTime-CcZFjBil.js → ConfigConditionTime-CRn4k6uE.js} +2 -2
  192. package/dist/interface/ha/{ConfigSensorValueInput-CrZoNX72.js → ConfigSensorValueInput-DthsOthT.js} +5 -4
  193. package/dist/interface/ha/{ConfigTriggerDetection-MsrbiErr.js → ConfigTriggerDetection-BDYanDEV.js} +4 -4
  194. package/dist/interface/ha/{ConfigTriggerGeofence-BxQ0n4-f.js → ConfigTriggerGeofence-Binp0lYx.js} +7 -7
  195. package/dist/interface/ha/{ConfigTriggerMqtt-ti8xd7vF.js → ConfigTriggerMqtt-BaPzSHbK.js} +1 -1
  196. package/dist/interface/ha/{ConfigTriggerSensor-CNlsV9yo.js → ConfigTriggerSensor-DiTaTZXm.js} +2 -2
  197. package/dist/interface/ha/{ConfigTriggerSystem-CsULDPX-.js → ConfigTriggerSystem-CsdWiz-S.js} +2 -2
  198. package/dist/interface/ha/{ConfigTriggerWebhook-BnUer9x_.js → ConfigTriggerWebhook-Ca0PsUmU.js} +2 -2
  199. package/dist/interface/ha/{Console-B1Y6mBPP.js → Console-0amlIoZR.js} +100 -100
  200. package/dist/interface/ha/{CuiAutomationRunsDialog-BHJIQ0Tj.js → CuiAutomationRunsDialog-DNBuwkgL.js} +2 -2
  201. package/dist/interface/ha/{CuiBottomSheet-DyCegs0G.js → CuiBottomSheet-CdXBYz4P.js} +1 -1
  202. package/dist/interface/ha/{CuiCameraRecordings-Cfzu3-OA.js → CuiCameraRecordings-D4ZB56nd.js} +21 -21
  203. package/dist/interface/ha/{CuiCameraShares-CE2Z9Osp.js → CuiCameraShares-YmzZusZR.js} +5 -5
  204. package/dist/interface/ha/{CuiCameraTable-DCm-DNjq.js → CuiCameraTable-DFzhCO3J.js} +8 -8
  205. package/dist/interface/ha/{CuiChartTable-BYkhLvXA.js → CuiChartTable-BvfJbFNS.js} +20 -18
  206. package/dist/interface/ha/{CuiConsole-DTDUpQ_E.js → CuiConsole-DtxyD6Sd.js} +5 -5
  207. package/dist/interface/ha/{CuiDataTable-Cxk-gD0O.js → CuiDataTable-CHvx6ALQ.js} +19 -12
  208. package/dist/interface/ha/{CuiPluginCard-CaJWPBXm.js → CuiPluginCard-B3vU57eD.js} +50 -50
  209. package/dist/interface/ha/{CuiPluginOAuthButton--RbsaIiq.js → CuiPluginOAuthButton-DgOFfP5e.js} +8 -8
  210. package/dist/interface/ha/{CuiPluginTrustBadge-G79t87hq.js → CuiPluginTrustBadge-udmtgGHt.js} +3 -3
  211. package/dist/interface/ha/{CuiQRCode-C0o0cS3C.js → CuiQRCode-8yDZMC3o.js} +7 -7
  212. package/dist/interface/ha/{CuiSchema-BmfjaboJ.js → CuiSchema-0Hikg2mm.js} +125 -125
  213. package/dist/interface/ha/{CuiTopNavbarItem-KlOpTPMA.js → CuiTopNavbarItem-B139fVxP.js} +1 -1
  214. package/dist/interface/ha/{Faces-CG1S8jsV.js → Faces-YdAf9USr.js} +45 -44
  215. package/dist/interface/ha/{FirstSteps-B4cODn_E.js → FirstSteps-Dts6TJ6O.js} +64 -64
  216. package/dist/interface/ha/{Floorplan-CM5cL4_h.js → Floorplan-D6XXe8ni.js} +428 -427
  217. package/dist/interface/ha/{Instances-B1KAGADd.js → Instances-DsIsonqp.js} +71 -71
  218. package/dist/interface/ha/{Logs-CNVJvujx.js → Logs-Cyo3LC94.js} +11 -11
  219. package/dist/interface/ha/{Menu-hlaVYE5G.js → Menu-yh_sI9d9.js} +20 -25
  220. package/dist/interface/ha/{Metrics-CUllrnJc.js → Metrics-VehQmsmN.js} +91 -90
  221. package/dist/interface/ha/{OAuthDeviceFlow-kYPoT4p2.js → OAuthDeviceFlow-CXp9NvbY.js} +9 -9
  222. package/dist/interface/ha/{Plugin-QvBE-VHD.js → Plugin-BqvlXx43.js} +127 -126
  223. package/dist/interface/ha/{PluginConsole-Cpd8sx5a.js → PluginConsole-Dx84BNoO.js} +6 -6
  224. package/dist/interface/ha/{PluginDetail-CqSaIeH-.js → PluginDetail-DUpDS2nD.js} +10 -10
  225. package/dist/interface/ha/{PluginSearch-C-3nAbyu.js → PluginSearch-Cvh0P9VB.js} +127 -126
  226. package/dist/interface/ha/{PluginUpdateProgress-Izcgxa6-.js → PluginUpdateProgress-CfyI2Qdp.js} +3 -3
  227. package/dist/interface/ha/Plugins-DXreIUwr.js +692 -0
  228. package/dist/interface/ha/RecentEventsFilter-C1deXNIS.js +79 -0
  229. package/dist/interface/ha/{Recordings-BSR6AGq2.js → Recordings-Cb8ifRcB.js} +352 -383
  230. package/dist/interface/ha/{SensorEdit-KLS5N1YP.js → SensorEdit-CsNXxcdj.js} +353 -351
  231. package/dist/interface/ha/{SensorHistory-nHGwqzDW.js → SensorHistory-DToDalOm.js} +2 -2
  232. package/dist/interface/ha/{Sensors-VAy09hDh.js → Sensors-B6giaowJ.js} +191 -189
  233. package/dist/interface/ha/{Settings-DINmP-PB.js → Settings-CVed7MM_.js} +22 -22
  234. package/dist/interface/ha/{SettingsAccount-B-3XO53P.js → SettingsAccount-CvvsLPoT.js} +263 -262
  235. package/dist/interface/ha/{SettingsAppearance-B7ONsdV3.js → SettingsAppearance-BDJeNGTd.js} +19 -19
  236. package/dist/interface/ha/SettingsAssistant-B168p5HB.js +1857 -0
  237. package/dist/interface/ha/{SettingsBackup-CRzyW7Ce.js → SettingsBackup-Bz_9xJ61.js} +42 -42
  238. package/dist/interface/ha/{SettingsList-GWb7HKeq.js → SettingsList-B42rajJc.js} +2 -2
  239. package/dist/interface/ha/{SettingsMqtt-Db8CUtzi.js → SettingsMqtt-B5Qy6bxD.js} +23 -23
  240. package/dist/interface/ha/SettingsNotifications-C59UxYic.js +529 -0
  241. package/dist/interface/ha/{SettingsRecordings-s52rT7TX.js → SettingsRecordings-CkJGOiyQ.js} +11 -10
  242. package/dist/interface/ha/{SettingsRemote-DYUJdmKW.js → SettingsRemote-Cc-qt3si.js} +340 -340
  243. package/dist/interface/ha/{SettingsSystem-Bkfc5Tky.js → SettingsSystem-Cco2XXsS.js} +9 -9
  244. package/dist/interface/ha/{SettingsUsers-BHLsFMG9.js → SettingsUsers-BDh-3saR.js} +36 -36
  245. package/dist/interface/ha/{Terminal-CDZjjg7e.js → Terminal-D2U-kFPW.js} +41 -41
  246. package/dist/interface/ha/Training-DWcaCI-3.js +1499 -0
  247. package/dist/interface/ha/{Updates-DM5YITjv.js → Updates-DGHNcvO9.js} +13 -13
  248. package/dist/interface/ha/{VariableInput-DOiVQbEb.js → VariableInput-Bujz1T1I.js} +1 -1
  249. package/dist/interface/ha/{VersionsHandler-CjzF5jII.js → VersionsHandler-CXvbeKbl.js} +10 -10
  250. package/dist/interface/ha/{VirtualSensorCreate-q7b13gfi.js → VirtualSensorCreate-DOYONbgu.js} +3 -3
  251. package/dist/interface/ha/{Workers-Vf16lK9P.js → Workers-tQbC3WS6.js} +28 -28
  252. package/dist/interface/ha/{accordion-DdpJ2jcK.js → accordion-X9Wa7KVq.js} +1 -1
  253. package/dist/interface/ha/{api-C0pVlzsW.js → api-BI6_Fcag.js} +9483 -9888
  254. package/dist/interface/ha/{api-Bnk0paIs.js → api-DfJZj7ht.js} +3 -3
  255. package/dist/interface/ha/{assistant-DJPdidEd.js → assistant-BqSg4N8v.js} +55 -55
  256. package/dist/interface/ha/{auth-CmCJIpis.js → auth-BFoSqfzS.js} +39 -39
  257. package/dist/interface/ha/{automationBlueprint-CtX7AOzy.js → automationBlueprint-Q0yt2MdH.js} +4 -3
  258. package/dist/interface/ha/cameraui-cards.js +1 -1
  259. package/dist/interface/ha/{cards-Cn0baEOx.js → cards-BW9I5B5Z.js} +561 -560
  260. package/dist/interface/ha/checkbox-D012nd17.js +279 -0
  261. package/dist/interface/ha/{config-DxaLI3Wy.js → config-CeNHEP9A.js} +16 -16
  262. package/dist/interface/ha/{datepicker-DpDmhDeD.js → datepicker-44Ub2Hx0.js} +329 -604
  263. package/dist/interface/ha/dist-BTp4AyuI.js +287 -0
  264. package/dist/interface/ha/{dist-aGnBxAoZ.js → dist-BV3OfApt.js} +763 -1048
  265. package/dist/interface/ha/dots-vertical-BEPlUtxU.js +19 -0
  266. package/dist/interface/ha/eventIcons-DrjNuTS2.js +676 -0
  267. package/dist/interface/ha/{mqtt-BSUalkMz.js → mqtt-BkYa2CXH.js} +12 -12
  268. package/dist/interface/ha/{multiselect-Cedfen4P.js → multiselect-B0fAnW75.js} +1 -1
  269. package/dist/interface/ha/{notifications-DuVSTES6.js → notifications-E3WSCGpc.js} +22 -22
  270. package/dist/interface/ha/pause-Ch6v65wA.js +19 -0
  271. package/dist/interface/ha/{pinia-Dk3LfWcE.js → pinia-DoDLbPZ3.js} +2293 -2274
  272. package/dist/interface/ha/{plugins-XTsvVLj3.js → plugins-2jjU7TfW.js} +68 -68
  273. package/dist/interface/ha/pwa/favicon-16.ico +0 -0
  274. package/dist/interface/ha/pwa/favicon-32.ico +0 -0
  275. package/dist/interface/ha/pwa/favicon-48.ico +0 -0
  276. package/dist/interface/ha/pwa/pwa-120x120.png +0 -0
  277. package/dist/interface/ha/pwa/pwa-24x24.png +0 -0
  278. package/dist/interface/ha/pwa/pwa-36x36.png +0 -0
  279. package/dist/interface/ha/pwa/pwa-48x48.png +0 -0
  280. package/dist/interface/ha/pwa/pwa-50x50.png +0 -0
  281. package/dist/interface/ha/pwa/pwa-64x64.png +0 -0
  282. package/dist/interface/ha/pwa/pwa-72x72.png +0 -0
  283. package/dist/interface/ha/pwa/pwa-88x88.png +0 -0
  284. package/dist/interface/ha/pwa/pwa-96x96.png +0 -0
  285. package/dist/interface/ha/{rooms-Ch5UrfPN.js → rooms-BkEw1ev-.js} +8 -8
  286. package/dist/interface/ha/{server-h-kQ6sSS.js → server-CuK4o2fS.js} +31 -31
  287. package/dist/interface/ha/{types-DjunpV_X.js → types-BRHWeX0a.js} +48 -34
  288. package/dist/interface/ha/{ungrouped-DkDSBlpG.js → ungrouped-BDwep3kg.js} +189 -206
  289. package/dist/interface/ha/{updates-D0cNiMIr.js → updates-R4xTxour.js} +42 -42
  290. package/dist/interface/ha/{useAppVersion-Cpv2npEz.js → useAppVersion-uaFjqUpx.js} +1 -1
  291. package/dist/interface/ha/{useLogsSocket-Du83S3Wz.js → useLogsSocket-BZq9GXfy.js} +1 -1
  292. package/dist/interface/ha/{useNavLayout-XBJRTK3F.js → useNavLayout-BJdDE__R.js} +11 -11
  293. package/dist/interface/ha/{useServerRestart-CWhJrEyy.js → useServerRestart-DDCKnE6c.js} +1 -1
  294. package/dist/interface/ha/{useTabSwipe-BSlykGzV.js → useTabSwipe-CEH6ltIZ.js} +1 -1
  295. package/dist/interface/ha/{useUpdateChannel-DZttbpyK.js → useUpdateChannel-CHt1il2V.js} +2 -2
  296. package/dist/interface/ha/{useUpdatesSocket-DI15Udke.js → useUpdatesSocket-BnVaNioY.js} +1 -1
  297. package/dist/interface/ha/{useUserOptions-CQL8tMr4.js → useUserOptions-C7cQ1P3Q.js} +1 -1
  298. package/dist/interface/index.html +35 -34
  299. package/dist/interface/pwa/favicon-16.ico +0 -0
  300. package/dist/interface/pwa/favicon-32.ico +0 -0
  301. package/dist/interface/pwa/favicon-48.ico +0 -0
  302. package/dist/interface/pwa/pwa-120x120.png +0 -0
  303. package/dist/interface/pwa/pwa-24x24.png +0 -0
  304. package/dist/interface/pwa/pwa-36x36.png +0 -0
  305. package/dist/interface/pwa/pwa-48x48.png +0 -0
  306. package/dist/interface/pwa/pwa-50x50.png +0 -0
  307. package/dist/interface/pwa/pwa-64x64.png +0 -0
  308. package/dist/interface/pwa/pwa-72x72.png +0 -0
  309. package/dist/interface/pwa/pwa-88x88.png +0 -0
  310. package/dist/interface/pwa/pwa-96x96.png +0 -0
  311. package/dist/interface/sw.js +1 -1
  312. package/dist/server/package.json +7 -8
  313. package/dist/server/requirements.txt +1 -1
  314. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/__init__.py +2 -0
  315. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/__init__.py +2 -0
  316. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/frames.py +9 -5
  317. package/dist/server/src/api/controllers/assistant.controller.js +2 -1
  318. package/dist/server/src/api/controllers/assistant.controller.js.map +1 -1
  319. package/dist/server/src/api/controllers/plugins.controller.js +3 -3
  320. package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
  321. package/dist/server/src/api/controllers/users.controller.d.ts +3 -1
  322. package/dist/server/src/api/controllers/users.controller.js +38 -0
  323. package/dist/server/src/api/controllers/users.controller.js.map +1 -1
  324. package/dist/server/src/api/database/index.d.ts +1 -1
  325. package/dist/server/src/api/database/index.js +1 -1
  326. package/dist/server/src/api/database/index.js.map +1 -1
  327. package/dist/server/src/api/database/migrations/v2-2-3.d.ts +3 -0
  328. package/dist/server/src/api/database/migrations/v2-2-3.js +22 -0
  329. package/dist/server/src/api/database/migrations/v2-2-3.js.map +1 -0
  330. package/dist/server/src/api/database/record-schemas.d.ts +44 -1
  331. package/dist/server/src/api/database/record-schemas.js +3 -3
  332. package/dist/server/src/api/database/record-schemas.js.map +1 -1
  333. package/dist/server/src/api/database/types.d.ts +4 -2
  334. package/dist/server/src/api/routes/users.routes.js +24 -1
  335. package/dist/server/src/api/routes/users.routes.js.map +1 -1
  336. package/dist/server/src/api/schemas/assistant.schema.d.ts +43 -1
  337. package/dist/server/src/api/schemas/assistant.schema.js +2 -1
  338. package/dist/server/src/api/schemas/assistant.schema.js.map +1 -1
  339. package/dist/server/src/api/schemas/cameras.schema.d.ts +32 -16
  340. package/dist/server/src/api/schemas/cameras.schema.js +5 -5
  341. package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
  342. package/dist/server/src/api/schemas/users.schema.d.ts +8 -0
  343. package/dist/server/src/api/schemas/users.schema.js +45 -0
  344. package/dist/server/src/api/schemas/users.schema.js.map +1 -1
  345. package/dist/server/src/api/services/users.service.d.ts +3 -1
  346. package/dist/server/src/api/services/users.service.js +33 -0
  347. package/dist/server/src/api/services/users.service.js.map +1 -1
  348. package/dist/server/src/api/types/index.d.ts +4 -1
  349. package/dist/server/src/api/types/index.js.map +1 -1
  350. package/dist/server/src/api/websocket/nsp/logs.d.ts +5 -2
  351. package/dist/server/src/api/websocket/nsp/logs.js +20 -5
  352. package/dist/server/src/api/websocket/nsp/logs.js.map +1 -1
  353. package/dist/server/src/api/websocket/nsp/training.d.ts +1 -1
  354. package/dist/server/src/api/websocket/nsp/training.js +3 -2
  355. package/dist/server/src/api/websocket/nsp/training.js.map +1 -1
  356. package/dist/server/src/assistant/manager.d.ts +1 -0
  357. package/dist/server/src/assistant/manager.js +24 -2
  358. package/dist/server/src/assistant/manager.js.map +1 -1
  359. package/dist/server/src/assistant/prompt.d.ts +1 -0
  360. package/dist/server/src/assistant/prompt.js +10 -1
  361. package/dist/server/src/assistant/prompt.js.map +1 -1
  362. package/dist/server/src/assistant/reasoning.d.ts +1 -1
  363. package/dist/server/src/assistant/reasoning.js +6 -3
  364. package/dist/server/src/assistant/reasoning.js.map +1 -1
  365. package/dist/server/src/assistant/retry.d.ts +4 -0
  366. package/dist/server/src/assistant/retry.js +3 -0
  367. package/dist/server/src/assistant/retry.js.map +1 -1
  368. package/dist/server/src/assistant/search.js +4 -2
  369. package/dist/server/src/assistant/search.js.map +1 -1
  370. package/dist/server/src/assistant/skills.js +3 -2
  371. package/dist/server/src/assistant/skills.js.map +1 -1
  372. package/dist/server/src/assistant/tool-names.d.ts +2 -0
  373. package/dist/server/src/assistant/tool-names.js +23 -0
  374. package/dist/server/src/assistant/tool-names.js.map +1 -0
  375. package/dist/server/src/assistant/tools/api.js +2 -0
  376. package/dist/server/src/assistant/tools/api.js.map +1 -1
  377. package/dist/server/src/assistant/tools/docs.js +1 -0
  378. package/dist/server/src/assistant/tools/docs.js.map +1 -1
  379. package/dist/server/src/assistant/tools/index.js +2 -2
  380. package/dist/server/src/assistant/tools/index.js.map +1 -1
  381. package/dist/server/src/assistant/tools/memory.js +1 -0
  382. package/dist/server/src/assistant/tools/memory.js.map +1 -1
  383. package/dist/server/src/assistant/tools/notifications.d.ts +2 -1
  384. package/dist/server/src/assistant/tools/notifications.js +69 -35
  385. package/dist/server/src/assistant/tools/notifications.js.map +1 -1
  386. package/dist/server/src/assistant/tools/plugins.d.ts +7 -1
  387. package/dist/server/src/assistant/tools/plugins.js +13 -9
  388. package/dist/server/src/assistant/tools/plugins.js.map +1 -1
  389. package/dist/server/src/assistant/tools/settings.js +1 -0
  390. package/dist/server/src/assistant/tools/settings.js.map +1 -1
  391. package/dist/server/src/assistant/uploads.js +8 -1
  392. package/dist/server/src/assistant/uploads.js.map +1 -1
  393. package/dist/server/src/automations/utilities/imageInput.js +4 -2
  394. package/dist/server/src/automations/utilities/imageInput.js.map +1 -1
  395. package/dist/server/src/camera/controller.d.ts +3 -0
  396. package/dist/server/src/camera/controller.js +41 -28
  397. package/dist/server/src/camera/controller.js.map +1 -1
  398. package/dist/server/src/camera/index.d.ts +1 -7
  399. package/dist/server/src/camera/index.js +0 -13
  400. package/dist/server/src/camera/index.js.map +1 -1
  401. package/dist/server/src/camera/privacy/snapshot.js +4 -2
  402. package/dist/server/src/camera/privacy/snapshot.js.map +1 -1
  403. package/dist/server/src/camera/snapshot-store.d.ts +22 -0
  404. package/dist/server/src/camera/snapshot-store.js +78 -0
  405. package/dist/server/src/camera/snapshot-store.js.map +1 -0
  406. package/dist/server/src/camera/streaming/fmp4-session.d.ts +2 -1
  407. package/dist/server/src/camera/streaming/fmp4-session.js +4 -0
  408. package/dist/server/src/camera/streaming/fmp4-session.js.map +1 -1
  409. package/dist/server/src/camera/streaming/rtp-session.js +1 -0
  410. package/dist/server/src/camera/streaming/rtp-session.js.map +1 -1
  411. package/dist/server/src/manager/downloadManager.d.ts +1 -0
  412. package/dist/server/src/manager/downloadManager.js +3 -0
  413. package/dist/server/src/manager/downloadManager.js.map +1 -1
  414. package/dist/server/src/manager/notificationManager.d.ts +1 -0
  415. package/dist/server/src/manager/notificationManager.js +13 -2
  416. package/dist/server/src/manager/notificationManager.js.map +1 -1
  417. package/dist/server/src/manager/trainingCandidateManager.js +17 -13
  418. package/dist/server/src/manager/trainingCandidateManager.js.map +1 -1
  419. package/dist/server/src/manager/types.d.ts +4 -0
  420. package/dist/server/src/rpc/interfaces/device.d.ts +1 -0
  421. package/dist/server/src/sensors/registry.js +2 -2
  422. package/dist/server/src/sensors/registry.js.map +1 -1
  423. package/dist/server/src/utils/image.d.ts +1 -0
  424. package/dist/server/src/utils/image.js +95 -0
  425. package/dist/server/src/utils/image.js.map +1 -0
  426. package/package.json +7 -8
  427. package/dist/interface/assets/Assistant-CblA57eC.js +0 -1
  428. package/dist/interface/assets/Automation-WFaHCnEO.js +0 -3
  429. package/dist/interface/assets/AutomationImport-HRMq3VvF.js +0 -2
  430. package/dist/interface/assets/AutomationStore-BaaFYySv.js +0 -2
  431. package/dist/interface/assets/AutomationStoreDetail-IiLAbn4L.js +0 -2
  432. package/dist/interface/assets/Automations-DRTUxje4.js +0 -2
  433. package/dist/interface/assets/Camera-CaNYoR20.js +0 -2
  434. package/dist/interface/assets/Cameras-DnLbeJFs.js +0 -651
  435. package/dist/interface/assets/Camview-uZ50ebLh.js +0 -1
  436. package/dist/interface/assets/Console-CHdFH_Ip.js +0 -1
  437. package/dist/interface/assets/CuiAssistantConversation-B_eSNMuO.js +0 -5
  438. package/dist/interface/assets/CuiBottomSheet-B7hreGA-.js +0 -1
  439. package/dist/interface/assets/CuiCameraPipCard-BXCRph8M.js +0 -1
  440. package/dist/interface/assets/CuiCameraRecordings-B7BhgPpP.css +0 -1
  441. package/dist/interface/assets/CuiCameraRecordings-CztUs6YM.js +0 -1
  442. package/dist/interface/assets/CuiCameraTable-BmsSlihU.js +0 -1
  443. package/dist/interface/assets/CuiChartTable-DCGY-zVy.css +0 -1
  444. package/dist/interface/assets/CuiDataTable-CNFiiz_X.js +0 -1
  445. package/dist/interface/assets/CuiDataTable-DbkFXZeg.css +0 -1
  446. package/dist/interface/assets/CuiLightControl-u_yM0oyh.js +0 -1
  447. package/dist/interface/assets/CuiPluginCard-Bib3KXMs.js +0 -2
  448. package/dist/interface/assets/CuiPluginCategoryChip-CKSV5COz.js +0 -1
  449. package/dist/interface/assets/CuiPluginOAuthButton-Cug_uTVq.js +0 -2
  450. package/dist/interface/assets/CuiSchema-ycZ4rNC_.js +0 -1
  451. package/dist/interface/assets/Faces-D6pm4dxq.js +0 -1
  452. package/dist/interface/assets/FirstSteps-DotR0zU_.js +0 -1
  453. package/dist/interface/assets/Floorplan-xxlvYsYV.js +0 -1
  454. package/dist/interface/assets/Menu-6FMKvbpH.js +0 -1
  455. package/dist/interface/assets/Metrics-SQdgeJrD.js +0 -9
  456. package/dist/interface/assets/Plugin-CsT7_OZp.js +0 -1
  457. package/dist/interface/assets/PluginDetail-Bz65OQlN.js +0 -2
  458. package/dist/interface/assets/PluginSearch-CrzD6rwo.js +0 -1
  459. package/dist/interface/assets/PluginSearch-DKSrC539.js +0 -2
  460. package/dist/interface/assets/Plugins-BvuGEkhs.js +0 -1
  461. package/dist/interface/assets/Recordings-6MHDmY05.js +0 -1
  462. package/dist/interface/assets/Sensors-XQLst9D2.js +0 -2
  463. package/dist/interface/assets/SettingsAccount-BwC-JLu1.js +0 -1
  464. package/dist/interface/assets/SettingsAccount-D8txIS7w.js +0 -1
  465. package/dist/interface/assets/SettingsAppearance-D1PEIzvU.js +0 -1
  466. package/dist/interface/assets/SettingsAssistant-BpTwRGXe.css +0 -1
  467. package/dist/interface/assets/SettingsAssistant-C_9kjVnu.js +0 -1
  468. package/dist/interface/assets/SettingsNotifications-DhXKEfw0.js +0 -1
  469. package/dist/interface/assets/SettingsRecordings-BqRtaATr.js +0 -1
  470. package/dist/interface/assets/SettingsRemote-9YXNd_d3.js +0 -2
  471. package/dist/interface/assets/SettingsSystem-CwlTgN12.js +0 -2
  472. package/dist/interface/assets/Training-DMNjB3uX.css +0 -1
  473. package/dist/interface/assets/Training-DQP1EUdI.js +0 -1
  474. package/dist/interface/assets/VirtualSensorCreate-VIHqPQuq.js +0 -1
  475. package/dist/interface/assets/Workers-CJXGSHP0.js +0 -2
  476. package/dist/interface/assets/api-0KzHya6g.js +0 -4
  477. package/dist/interface/assets/api-C85p0Dk3.css +0 -2
  478. package/dist/interface/assets/cameraSources-B5dOcB7w.js +0 -1
  479. package/dist/interface/assets/cloudHandoff-DzrB62Ot.js +0 -1
  480. package/dist/interface/assets/main-BREBoPYq.js +0 -3
  481. package/dist/interface/assets/sensorIcons-Dwg45YYo.js +0 -1
  482. package/dist/interface/assets/types-B5ZroTch.js +0 -1
  483. package/dist/interface/assets/types-BZz-3rol.js +0 -1
  484. package/dist/interface/assets/ungrouped-CH2Ug0hy.js +0 -1
  485. package/dist/interface/assets/useBackupRestore-5E-Y8DMu.js +0 -1
  486. package/dist/interface/assets/vendor-zod-BMOt_yT8.js +0 -109
  487. package/dist/interface/ha/Plugins-BkvUlAHi.js +0 -705
  488. package/dist/interface/ha/SettingsAssistant-VQkALMWq.js +0 -1699
  489. package/dist/interface/ha/SettingsNotifications-lNH9mh9I.js +0 -529
  490. package/dist/interface/ha/Training-BbRm4L9a.js +0 -1469
@@ -6,60 +6,61 @@ import { t as N } from "./message-BExXUXHN.js";
6
6
  import { t as ne } from "./chevron-down-CN3LNAsG.js";
7
7
  import { t as P } from "./tag-Bko2QYOK.js";
8
8
  import { t as F } from "./history-Bm6QaZ6b.js";
9
- import { Jr as I, K as re, Ln as L, Lr as R, Mt as z, Nt as ie, Or as B, Pt as ae, Rr as oe, Tr as V, V as se, X as H, Yr as ce, bi as U, ca as W, ft as G, g as K, hr as le, ki as ue, kr as de, nt as fe, p as q, pr as pe, r as me, rn as he, tr as ge, wn as _e, wr as ve, wt as ye } from "./api-C0pVlzsW.js";
10
- import { A as be, b as xe, u as Se } from "./intercomService-Dwd0bhSN.js";
11
- import { et as Ce, nt as we, r as Te, tt as Ee } from "./pinia-Dk3LfWcE.js";
12
- import { n as De } from "./vue-i18n-BBObX4QY.js";
13
- import { i as Oe } from "./alert-outline-BssBb-kV.js";
14
- import { t as ke } from "./button-DJDZxmKj.js";
15
- import { n as Ae, t as je } from "./inputicon-BPVltPdr.js";
16
- import { t as Me } from "./inputtext-vdcrNX6K.js";
17
- import { t as Ne } from "./close-C_ajB9j7.js";
18
- import { t as Pe } from "./select-CaVzuLaS.js";
19
- import { t as Fe } from "./multiselect-Cedfen4P.js";
20
- import { t as Ie } from "./textarea-DrKQ6YMZ.js";
21
- import { t as Le } from "./clock-outline-CLOrwuhP.js";
22
- import { t as Re } from "./source-branch-CimaS9J1.js";
23
- import { a as ze, i as Be, n as Ve, o as He, r as Ue, t as We } from "./assistant-DJPdidEd.js";
24
- import { t as Ge } from "./search-DMJuYUDF.js";
25
- import { t as Ke } from "./content-copy-ChfuNPUb.js";
26
- import { t as qe } from "./CuiMarkdownContent-CU4eGw6l.js";
27
- import { t as Je } from "./brain-DBagansp.js";
28
- import { u as Ye } from "./cards-Cn0baEOx.js";
29
- import { c as Xe, d as Ze, i as Qe, l as $e, n as et, r as tt, t as nt, u as rt } from "./types-B9Rna2FN.js";
30
- import { t as it } from "./pencil-outline-3AYc7WXi.js";
31
- import { t as at } from "./back-filled-B-jI6Dqb.js";
32
- import { t as ot } from "./help-circle-outline-Du1jH6xY.js";
33
- import { t as st } from "./refresh-Cf7GQyew.js";
34
- import { t as ct } from "./check-circle-outline-DHmzynUf.js";
35
- import { t as lt } from "./chevron-up-D5-4qnos.js";
36
- import { t as ut } from "./microphone-TB58caA2.js";
37
- import { t as dt } from "./useAssistantActions-B6KFp1pU.js";
9
+ import { Br as I, Dt as re, Et as L, J as R, On as z, Or as ie, Q as B, Qi as V, Tt as ae, V as oe, Vn as se, Xt as H, at as ce, br as U, g as W, gr as le, hr as G, ht as ue, ir as de, kr as K, or as fe, p as q, r as pe, ui as me, yi as he, yr as J, zr as ge } from "./api-BI6_Fcag.js";
10
+ import { A as _e, b as ve, u as ye } from "./intercomService-Dwd0bhSN.js";
11
+ import { G as be, U as xe, W as Se, r as Ce } from "./pinia-DoDLbPZ3.js";
12
+ import { n as we } from "./vue-i18n-BBObX4QY.js";
13
+ import { i as Te } from "./alert-outline-BssBb-kV.js";
14
+ import { p as Ee, s as De } from "./eventIcons-DrjNuTS2.js";
15
+ import { t as Oe } from "./button-DJDZxmKj.js";
16
+ import { n as ke, t as Ae } from "./inputicon-BPVltPdr.js";
17
+ import { t as je } from "./inputtext-vdcrNX6K.js";
18
+ import { t as Me } from "./close-C_ajB9j7.js";
19
+ import { t as Ne } from "./select-CaVzuLaS.js";
20
+ import { t as Pe } from "./multiselect-B0fAnW75.js";
21
+ import { t as Fe } from "./textarea-DrKQ6YMZ.js";
22
+ import { t as Ie } from "./clock-outline-CLOrwuhP.js";
23
+ import { t as Le } from "./source-branch-CimaS9J1.js";
24
+ import { a as Re, i as ze, n as Be, o as Ve, r as He, t as Y } from "./assistant-BqSg4N8v.js";
25
+ import { t as Ue } from "./search-DMJuYUDF.js";
26
+ import { t as We } from "./content-copy-ChfuNPUb.js";
27
+ import { t as Ge } from "./CuiMarkdownContent-CU4eGw6l.js";
28
+ import { t as Ke } from "./brain-DBagansp.js";
29
+ import { u as qe } from "./cards-BW9I5B5Z.js";
30
+ import { c as Je, d as Ye, i as Xe, l as Ze, n as Qe, r as $e, t as et, u as tt } from "./types-B9Rna2FN.js";
31
+ import { t as nt } from "./pencil-outline-3AYc7WXi.js";
32
+ import { t as rt } from "./back-filled-B-jI6Dqb.js";
33
+ import { t as it } from "./help-circle-outline-Du1jH6xY.js";
34
+ import { t as at } from "./refresh-Cf7GQyew.js";
35
+ import { t as ot } from "./check-circle-outline-DHmzynUf.js";
36
+ import { t as st } from "./chevron-up-D5-4qnos.js";
37
+ import { t as ct } from "./microphone-TB58caA2.js";
38
+ import { t as lt } from "./useAssistantActions-B6KFp1pU.js";
38
39
  //#region ~icons/mdi/content-save-outline
39
- var ft = {
40
+ var ut = {
40
41
  viewBox: "0 0 24 24",
41
42
  width: "1.2em",
42
43
  height: "1.2em"
43
44
  };
44
- function pt(e, t) {
45
- return i(), x("svg", ft, [...t[0] ||= [T("path", {
45
+ function dt(e, t) {
46
+ return i(), x("svg", ut, [...t[0] ||= [T("path", {
46
47
  fill: "currentColor",
47
48
  d: "M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7zm2 16H5V5h11.17L19 7.83zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3s3-1.34 3-3s-1.34-3-3-3M6 6h9v4H6z"
48
49
  }, null, -1)]]);
49
50
  }
50
- var mt = d({
51
+ var ft = d({
51
52
  name: "mdi-content-save-outline",
52
- render: pt
53
- }), ht = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex-col gap-3" }, gt = { class: "flex items-start gap-2" }, _t = { class: "min-w-0 flex-1 font-medium text-color" }, vt = {
53
+ render: dt
54
+ }), pt = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex-col gap-3" }, mt = { class: "flex items-start gap-2" }, ht = { class: "min-w-0 flex-1 font-medium text-color" }, gt = {
54
55
  key: 0,
55
56
  class: "flex flex-wrap gap-2"
56
- }, yt = {
57
+ }, _t = {
57
58
  key: 1,
58
59
  class: "flex flex-col sm:flex-row gap-2"
59
- }, bt = { class: "flex flex-1 flex-col gap-1" }, xt = ["for"], St = { class: "flex flex-1 flex-col gap-1" }, Ct = ["for"], wt = { class: "flex items-center gap-2" }, Tt = {
60
+ }, vt = { class: "flex flex-1 flex-col gap-1" }, yt = ["for"], bt = { class: "flex flex-1 flex-col gap-1" }, xt = ["for"], St = { class: "flex items-center gap-2" }, Ct = {
60
61
  key: 1,
61
62
  class: "flex-1"
62
- }, Et = /*#__PURE__*/ B(/* @__PURE__ */ A({
63
+ }, wt = /*#__PURE__*/ J(/* @__PURE__ */ A({
63
64
  __name: "CuiAssistantQuestion",
64
65
  props: {
65
66
  question: {},
@@ -77,10 +78,10 @@ var mt = d({
77
78
  v.value && c("answer", v.value);
78
79
  }
79
80
  return (a, s) => {
80
- let _ = ot, y = ke, S = Me;
81
- return i(), x("div", ht, [
82
- T("div", gt, [M(_, { class: "w-5 h-5 shrink-0 text-muted mt-0.5" }), T("div", _t, o(e.question.question), 1)]),
83
- g(f).length ? (i(), x("div", vt, [(i(!0), x(C, null, r(g(f), (t) => (i(), p(y, {
81
+ let _ = it, y = Oe, S = je;
82
+ return i(), x("div", pt, [
83
+ T("div", mt, [M(_, { class: "w-5 h-5 shrink-0 text-muted mt-0.5" }), T("div", ht, o(e.question.question), 1)]),
84
+ g(f).length ? (i(), x("div", gt, [(i(!0), x(C, null, r(g(f), (t) => (i(), p(y, {
84
85
  key: t,
85
86
  type: "button",
86
87
  severity: "secondary",
@@ -94,20 +95,20 @@ var mt = d({
94
95
  "label",
95
96
  "onClick"
96
97
  ]))), 128))])) : m("", !0),
97
- e.question.kind === "time_range" ? (i(), x("div", yt, [T("div", bt, [T("label", {
98
+ e.question.kind === "time_range" ? (i(), x("div", _t, [T("div", vt, [T("label", {
98
99
  for: `question-from-${e.question.toolCallId}`,
99
100
  class: "text-xs text-muted"
100
- }, o(a.$t("views.assistant.question_from")), 9, xt), M(S, {
101
+ }, o(a.$t("views.assistant.question_from")), 9, yt), M(S, {
101
102
  id: `question-from-${e.question.toolCallId}`,
102
103
  modelValue: g(u),
103
104
  "onUpdate:modelValue": s[0] ||= (e) => h(u) ? u.value = e : null,
104
105
  type: "datetime-local",
105
106
  fluid: "",
106
107
  size: "small"
107
- }, null, 8, ["id", "modelValue"])]), T("div", St, [T("label", {
108
+ }, null, 8, ["id", "modelValue"])]), T("div", bt, [T("label", {
108
109
  for: `question-to-${e.question.toolCallId}`,
109
110
  class: "text-xs text-muted"
110
- }, o(a.$t("views.assistant.question_to")), 9, Ct), M(S, {
111
+ }, o(a.$t("views.assistant.question_to")), 9, xt), M(S, {
111
112
  id: `question-to-${e.question.toolCallId}`,
112
113
  modelValue: g(d),
113
114
  "onUpdate:modelValue": s[1] ||= (e) => h(d) ? d.value = e : null,
@@ -115,8 +116,8 @@ var mt = d({
115
116
  fluid: "",
116
117
  size: "small"
117
118
  }, null, 8, ["id", "modelValue"])])])) : m("", !0),
118
- T("div", wt, [
119
- e.question.kind === "time_range" ? (i(), x("span", Tt)) : (i(), p(S, {
119
+ T("div", St, [
120
+ e.question.kind === "time_range" ? (i(), x("span", Ct)) : (i(), p(S, {
120
121
  key: 0,
121
122
  modelValue: g(l),
122
123
  "onUpdate:modelValue": s[2] ||= (e) => h(l) ? l.value = e : null,
@@ -154,13 +155,13 @@ var mt = d({
154
155
  ]);
155
156
  };
156
157
  }
157
- }), [["__scopeId", "data-v-49502a42"]]), Dt = { class: "cui-assistant-approval rounded-xl px-4 py-3 text-sm flex flex-col gap-3" }, Ot = { class: "flex items-start gap-2" }, kt = { class: "min-w-0 flex-1" }, At = { class: "font-medium text-color" }, jt = { class: "text-muted" }, Mt = {
158
+ }), [["__scopeId", "data-v-49502a42"]]), Tt = { class: "cui-assistant-approval rounded-xl px-4 py-3 text-sm flex flex-col gap-3" }, Et = { class: "flex items-start gap-2" }, Dt = { class: "min-w-0 flex-1" }, Ot = { class: "font-medium text-color" }, kt = { class: "text-muted" }, At = {
158
159
  key: 0,
159
160
  class: "cui-assistant-pre mt-2 max-h-40 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono"
160
- }, Nt = {
161
+ }, jt = {
161
162
  key: 1,
162
163
  class: "mt-2 flex flex-col gap-1"
163
- }, Pt = { class: "flex justify-end gap-2" }, Ft = /*#__PURE__*/ B(/* @__PURE__ */ A({
164
+ }, Mt = { class: "flex justify-end gap-2" }, Nt = /*#__PURE__*/ J(/* @__PURE__ */ A({
164
165
  __name: "CuiAssistantApproval",
165
166
  props: {
166
167
  toolName: {},
@@ -170,7 +171,7 @@ var mt = d({
170
171
  },
171
172
  emits: ["approve", "reject"],
172
173
  setup(e, { emit: t }) {
173
- let n = e, r = t, a = j(!1), s = j(""), c = _(() => Qe(n.toolName)), l = _(() => {
174
+ let n = e, r = t, a = j(!1), s = j(""), c = _(() => Xe(n.toolName)), l = _(() => {
174
175
  if (n.args === void 0 || n.args === null || typeof n.args == "object" && Object.keys(n.args).length === 0) return "";
175
176
  try {
176
177
  return JSON.stringify(n.args, null, 2);
@@ -199,12 +200,12 @@ var mt = d({
199
200
  r("approve", l.value === s.value ? void 0 : e);
200
201
  }
201
202
  return (t, n) => {
202
- let _ = ye, y = Ie, b = N, S = ke;
203
- return i(), x("div", Dt, [T("div", Ot, [M(_, { class: "w-5 h-5 shrink-0 text-warning mt-0.5" }), T("div", kt, [
204
- T("div", At, o(t.$t("views.assistant.approval_title", { tool: g(c) })), 1),
205
- T("div", jt, o(t.$t("views.assistant.approval_hint")), 1),
206
- g(l) && !g(a) ? (i(), x("pre", Mt, o(g(l)), 1)) : m("", !0),
207
- g(a) ? (i(), x("div", Nt, [M(y, {
203
+ let _ = De, y = Fe, b = N, S = Oe;
204
+ return i(), x("div", Tt, [T("div", Et, [M(_, { class: "w-5 h-5 shrink-0 text-warning mt-0.5" }), T("div", Dt, [
205
+ T("div", Ot, o(t.$t("views.assistant.approval_title", { tool: g(c) })), 1),
206
+ T("div", kt, o(t.$t("views.assistant.approval_hint")), 1),
207
+ g(l) && !g(a) ? (i(), x("pre", At, o(g(l)), 1)) : m("", !0),
208
+ g(a) ? (i(), x("div", jt, [M(y, {
208
209
  modelValue: g(s),
209
210
  "onUpdate:modelValue": n[0] ||= (e) => h(s) ? s.value = e : null,
210
211
  "auto-resize": "",
@@ -227,7 +228,7 @@ var mt = d({
227
228
  default: v(() => [D(o(t.$t("views.assistant.approval_edit_hint")), 1)]),
228
229
  _: 1
229
230
  }))])) : m("", !0)
230
- ])]), T("div", Pt, [
231
+ ])]), T("div", Mt, [
231
232
  g(l) ? (i(), p(S, {
232
233
  key: 0,
233
234
  type: "button",
@@ -262,55 +263,55 @@ var mt = d({
262
263
  ])]);
263
264
  };
264
265
  }
265
- }), [["__scopeId", "data-v-f3109818"]]), It = {
266
+ }), [["__scopeId", "data-v-f3109818"]]), Pt = {
266
267
  viewBox: "0 0 24 24",
267
268
  width: "1.2em",
268
269
  height: "1.2em"
269
270
  };
270
- function Lt(e, t) {
271
- return i(), x("svg", It, [...t[0] ||= [T("path", {
271
+ function Ft(e, t) {
272
+ return i(), x("svg", Pt, [...t[0] ||= [T("path", {
272
273
  fill: "currentColor",
273
274
  d: "M12 20c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m-2 14.5l6-4.5l-6-4.5z"
274
275
  }, null, -1)]]);
275
276
  }
276
- var Rt = d({
277
+ var It = d({
277
278
  name: "mdi-play-circle-outline",
278
- render: Lt
279
- }), zt = {
279
+ render: Ft
280
+ }), Lt = {
280
281
  viewBox: "0 0 24 24",
281
282
  width: "1.2em",
282
283
  height: "1.2em"
283
284
  };
284
- function Bt(e, t) {
285
- return i(), x("svg", zt, [...t[0] ||= [T("path", {
285
+ function Rt(e, t) {
286
+ return i(), x("svg", Lt, [...t[0] ||= [T("path", {
286
287
  fill: "currentColor",
287
288
  d: "M13 5v6h1.17L12 13.17L9.83 11H11V5zm2-2H9v6H5l7 7l7-7h-4zm4 15H5v2h14z"
288
289
  }, null, -1)]]);
289
290
  }
290
- var Vt = d({
291
+ var zt = d({
291
292
  name: "mdi-download-outline",
292
- render: Bt
293
- }), Ht = {
293
+ render: Rt
294
+ }), Bt = {
294
295
  viewBox: "0 0 24 24",
295
296
  width: "1.2em",
296
297
  height: "1.2em"
297
298
  };
298
- function Ut(e, t) {
299
- return i(), x("svg", Ht, [...t[0] ||= [T("path", {
299
+ function Vt(e, t) {
300
+ return i(), x("svg", Bt, [...t[0] ||= [T("path", {
300
301
  fill: "currentColor",
301
302
  d: "M15 8v8H5V8zm1-2H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3.5l4 4v-11l-4 4V7a1 1 0 0 0-1-1"
302
303
  }, null, -1)]]);
303
304
  }
304
- var Wt = d({
305
+ var Ht = d({
305
306
  name: "mdi-video-outline",
306
- render: Ut
307
+ render: Vt
307
308
  });
308
309
  //#endregion
309
310
  //#region src/composables/useAssistantReferences.ts
310
- function Gt() {
311
- let e = ce(), { t } = De(), n = ue(), r = G(), { openEpisodePlayer: i } = H(), a = ge("@camera.ui/camera-ui-nvr"), { download: o } = ve(), s = j(null);
311
+ function Ut() {
312
+ let e = I(), { t } = we(), n = he(), r = ue(), { openEpisodePlayer: i } = B(), a = se("@camera.ui/camera-ui-nvr"), { download: o } = G(), s = j(null);
312
313
  async function c() {
313
- let e = await he({
314
+ let e = await H({
314
315
  parameter: {
315
316
  page: 1,
316
317
  pageSize: -1
@@ -320,7 +321,7 @@ function Gt() {
320
321
  return new Map(e.result.map((e) => [e._id, e]));
321
322
  }
322
323
  function l(e, t) {
323
- r.openComponentDialog(fe, {
324
+ r.openComponentDialog(ce, {
324
325
  data: {
325
326
  title: e.name,
326
327
  dedupeKey: `camera-event:${e._id}:${t}`,
@@ -389,17 +390,17 @@ function Gt() {
389
390
  }
390
391
  //#endregion
391
392
  //#region src/components/CuiAssistantReferences/CuiAssistantReferences.vue?vue&type=script&setup=true&lang.ts
392
- var Kt = { class: "flex flex-wrap gap-1.5" }, qt = ["disabled", "onClick"], Jt = { class: "truncate max-w-[16rem]" }, Yt = /*#__PURE__*/ B(/* @__PURE__ */ A({
393
+ var Wt = { class: "flex flex-wrap gap-1.5" }, Gt = ["disabled", "onClick"], Kt = { class: "truncate max-w-[16rem]" }, qt = /*#__PURE__*/ J(/* @__PURE__ */ A({
393
394
  __name: "CuiAssistantReferences",
394
395
  props: { references: {} },
395
396
  setup(e) {
396
- let { t } = De(), { busy: n, open: a } = Gt();
397
+ let { t } = we(), { busy: n, open: a } = Ut();
397
398
  function s(e) {
398
399
  return e.kind === "camera" ? t("views.assistant.open_camera") : e.kind === "episode" ? t("views.assistant.open_episode") : e.kind === "download" ? t("views.assistant.download_clip") : t("views.assistant.open_recording");
399
400
  }
400
401
  return (t, c) => {
401
- let l = Wt, u = Vt, d = Rt;
402
- return i(), x("div", Kt, [(i(!0), x(C, null, r(e.references, (e, t) => (i(), x("button", {
402
+ let l = Ht, u = zt, d = It;
403
+ return i(), x("div", Wt, [(i(!0), x(C, null, r(e.references, (e, t) => (i(), x("button", {
403
404
  key: `${e.kind}:${e.id}:${t}`,
404
405
  type: "button",
405
406
  class: "cui-assistant-ref flex cursor-pointer items-center gap-1.5 rounded-lg px-2.5 py-1 text-xs",
@@ -414,10 +415,10 @@ var Kt = { class: "flex flex-wrap gap-1.5" }, qt = ["disabled", "onClick"], Jt =
414
415
  })) : (i(), p(d, {
415
416
  key: 2,
416
417
  class: "w-3.5 h-3.5 shrink-0"
417
- })), T("span", Jt, o(e.label || s(e)), 1)], 8, qt))), 128))]);
418
+ })), T("span", Kt, o(e.label || s(e)), 1)], 8, Gt))), 128))]);
418
419
  };
419
420
  }
420
- }), [["__scopeId", "data-v-aae1a6dd"]]), Xt = { class: "flex items-center gap-3" }, Zt = { class: "flex min-w-0 flex-1 flex-col" }, Qt = { class: "text-sm font-medium" }, $t = { class: "text-xs" }, en = /*#__PURE__*/ B(/* @__PURE__ */ A({
421
+ }), [["__scopeId", "data-v-aae1a6dd"]]), Jt = { class: "flex items-center gap-3" }, Yt = { class: "flex min-w-0 flex-1 flex-col" }, Xt = { class: "text-sm font-medium" }, Zt = { class: "text-xs" }, Qt = /*#__PURE__*/ J(/* @__PURE__ */ A({
421
422
  __name: "CuiAssistantNotice",
422
423
  props: {
423
424
  title: {},
@@ -432,19 +433,19 @@ var Kt = { class: "flex flex-wrap gap-1.5" }, qt = ["disabled", "onClick"], Jt =
432
433
  size: "small",
433
434
  class: "cui-assistant-notice"
434
435
  }, {
435
- default: v(() => [T("div", Xt, [T("div", Zt, [T("span", Qt, o(e.title), 1), T("span", $t, o(e.text), 1)]), s(t.$slots, "default", {}, void 0, !0)])]),
436
+ default: v(() => [T("div", Jt, [T("div", Yt, [T("span", Xt, o(e.title), 1), T("span", Zt, o(e.text), 1)]), s(t.$slots, "default", {}, void 0, !0)])]),
436
437
  _: 3
437
438
  }, 8, ["severity"]);
438
439
  };
439
440
  }
440
- }), [["__scopeId", "data-v-1dc28011"]]), tn = /* @__PURE__ */ A({
441
+ }), [["__scopeId", "data-v-1dc28011"]]), $t = /* @__PURE__ */ A({
441
442
  __name: "CuiAssistantSetting",
442
443
  props: {
443
444
  setting: {},
444
445
  modelId: {}
445
446
  },
446
447
  setup(e) {
447
- let t = new We(), n = e, r = K(), { user: a } = Te(r), { data: o } = t.getAssistantInfoQuery(), s = t.patchAssistantInfoMutation(), c = _(() => a.value?.role === "admin" || a.value?.role === "master"), l = _(() => o.value?.settings.models ?? []), u = _(() => l.value.find((e) => e._id === n.modelId) ?? (o.value ? $e(o.value.settings) : void 0)), d = _(() => n.setting === "sendImages" ? u.value?.sendImages === !0 : o.value?.settings[n.setting] === !0);
448
+ let t = new Y(), n = e, r = W(), { user: a } = Ce(r), { data: o } = t.getAssistantInfoQuery(), s = t.patchAssistantInfoMutation(), c = _(() => a.value?.role === "admin" || a.value?.role === "master"), l = _(() => o.value?.settings.models ?? []), u = _(() => l.value.find((e) => e._id === n.modelId) ?? (o.value ? Ze(o.value.settings) : void 0)), d = _(() => n.setting === "sendImages" ? u.value?.sendImages === !0 : o.value?.settings[n.setting] === !0);
448
449
  async function f(e) {
449
450
  if (n.setting !== "sendImages") {
450
451
  await s.mutateAsync({ [n.setting]: e });
@@ -452,12 +453,12 @@ var Kt = { class: "flex flex-wrap gap-1.5" }, qt = ["disabled", "onClick"], Jt =
452
453
  }
453
454
  let t = u.value;
454
455
  t && await s.mutateAsync({ models: l.value.map((n) => ({
455
- ...rt(n),
456
+ ...tt(n),
456
457
  ...n._id === t._id ? { sendImages: e } : {}
457
458
  })) });
458
459
  }
459
460
  return (t, n) => {
460
- let r = L, a = en;
461
+ let r = z, a = Qt;
461
462
  return i(), p(a, {
462
463
  severity: g(d) ? "success" : "warn",
463
464
  title: t.$t(`views.assistant.setting_${e.setting}_title`),
@@ -478,71 +479,71 @@ var Kt = { class: "flex flex-wrap gap-1.5" }, qt = ["disabled", "onClick"], Jt =
478
479
  ]);
479
480
  };
480
481
  }
481
- }), nn = {
482
+ }), en = {
482
483
  viewBox: "0 0 24 24",
483
484
  width: "1.2em",
484
485
  height: "1.2em"
485
486
  };
486
- function rn(e, t) {
487
- return i(), x("svg", nn, [...t[0] ||= [T("path", {
487
+ function tn(e, t) {
488
+ return i(), x("svg", en, [...t[0] ||= [T("path", {
488
489
  fill: "currentColor",
489
490
  d: "M7 5h14v2H7zm0 8v-2h14v2zM4 4.5A1.5 1.5 0 0 1 5.5 6A1.5 1.5 0 0 1 4 7.5A1.5 1.5 0 0 1 2.5 6A1.5 1.5 0 0 1 4 4.5m0 6A1.5 1.5 0 0 1 5.5 12A1.5 1.5 0 0 1 4 13.5A1.5 1.5 0 0 1 2.5 12A1.5 1.5 0 0 1 4 10.5M7 19v-2h14v2zm-3-2.5A1.5 1.5 0 0 1 5.5 18A1.5 1.5 0 0 1 4 19.5A1.5 1.5 0 0 1 2.5 18A1.5 1.5 0 0 1 4 16.5"
490
491
  }, null, -1)]]);
491
492
  }
492
- var an = d({
493
+ var nn = d({
493
494
  name: "mdi-format-list-bulleted",
494
- render: rn
495
- }), on = {
495
+ render: tn
496
+ }), rn = {
496
497
  viewBox: "0 0 24 24",
497
498
  width: "1.2em",
498
499
  height: "1.2em"
499
500
  };
500
- function sn(e, t) {
501
- return i(), x("svg", on, [...t[0] ||= [T("path", {
501
+ function an(e, t) {
502
+ return i(), x("svg", rn, [...t[0] ||= [T("path", {
502
503
  fill: "currentColor",
503
504
  d: "M7 10h5v5H7m12 4H5V8h14m0-5h-1V1h-2v2H8V1H6v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2"
504
505
  }, null, -1)]]);
505
506
  }
506
- var cn = d({
507
+ var on = d({
507
508
  name: "mdi-calendar-today",
508
- render: sn
509
- }), ln = {
509
+ render: an
510
+ }), sn = {
510
511
  viewBox: "0 0 24 24",
511
512
  width: "1.2em",
512
513
  height: "1.2em"
513
514
  };
514
- function un(e, t) {
515
- return i(), x("svg", ln, [...t[0] ||= [T("path", {
515
+ function cn(e, t) {
516
+ return i(), x("svg", sn, [...t[0] ||= [T("path", {
516
517
  fill: "currentColor",
517
518
  d: "M7.5 4A5.5 5.5 0 0 0 2 9.5c0 .5.09 1 .22 1.5H6.3l1.27-3.37c.3-.8 1.48-.88 1.86 0L11.5 13l.59-1.42c.13-.33.48-.58.91-.58h8.78c.13-.5.22-1 .22-1.5A5.5 5.5 0 0 0 16.5 4c-1.86 0-3.5.93-4.5 2.34C11 4.93 9.36 4 7.5 4M3 12.5a1 1 0 0 0-1 1a1 1 0 0 0 1 1h2.44L11 20c1 .9 1 .9 2 0l5.56-5.5H21a1 1 0 0 0 1-1a1 1 0 0 0-1-1h-7.6l-.93 2.3c-.4 1.01-1.55.87-1.92.03L8.5 9.5l-.96 2.33c-.15.38-.49.67-.94.67z"
518
519
  }, null, -1)]]);
519
520
  }
520
- var dn = d({
521
+ var ln = d({
521
522
  name: "mdi-heart-pulse",
522
- render: un
523
- }), fn = { class: "cui-assistant-card rounded-xl px-4 py-3 text-sm" }, pn = { class: "flex items-start gap-2" }, mn = { class: "min-w-0 flex-1" }, hn = { class: "font-medium text-color" }, gn = {
523
+ render: cn
524
+ }), un = { class: "cui-assistant-card rounded-xl px-4 py-3 text-sm" }, dn = { class: "flex items-start gap-2" }, fn = { class: "min-w-0 flex-1" }, pn = { class: "font-medium text-color" }, mn = {
524
525
  key: 0,
525
526
  class: "text-xs text-muted"
526
- }, _n = { class: "mt-3 flex flex-col gap-2" }, vn = { class: "min-w-0 flex-1 truncate text-color" }, yn = {
527
+ }, hn = { class: "mt-3 flex flex-col gap-2" }, gn = { class: "min-w-0 flex-1 truncate text-color" }, _n = {
527
528
  key: 0,
528
529
  class: "shrink-0 font-medium tabular-nums text-color"
529
- }, bn = {
530
+ }, vn = {
530
531
  key: 0,
531
532
  class: "cui-assistant-card-bar ml-4 h-1 overflow-hidden rounded-full"
532
- }, xn = {
533
+ }, yn = {
533
534
  key: 1,
534
535
  class: "ml-4 text-xs text-muted"
535
- }, Sn = {
536
+ }, bn = {
536
537
  key: 0,
537
538
  class: "mt-3 text-xs text-muted"
538
- }, Cn = /*#__PURE__*/ B(/* @__PURE__ */ A({
539
+ }, xn = /*#__PURE__*/ J(/* @__PURE__ */ A({
539
540
  __name: "CuiAssistantCard",
540
541
  props: {
541
542
  card: {},
542
543
  references: {}
543
544
  },
544
545
  setup(e) {
545
- let t = e, { busy: n, open: a } = Gt();
546
+ let t = e, { busy: n, open: a } = Ut();
546
547
  function s(e) {
547
548
  if (e.episodeId) return t.references?.find((t) => t.kind === "episode" && t.id === e.episodeId) ?? {
548
549
  kind: "episode",
@@ -554,9 +555,9 @@ var dn = d({
554
555
  return e === "ok" ? "bg-success" : e === "warn" ? "bg-warning" : e === "error" ? "bg-danger" : "cui-assistant-card-dot-plain";
555
556
  }
556
557
  return (t, d) => {
557
- let f = dn, h = cn, _ = an, y = le;
558
- return i(), x("div", fn, [
559
- T("div", pn, [e.card.kind === "system_health" ? (i(), p(f, {
558
+ let f = ln, h = on, _ = nn, y = fe;
559
+ return i(), x("div", un, [
560
+ T("div", dn, [e.card.kind === "system_health" ? (i(), p(f, {
560
561
  key: 0,
561
562
  class: "w-5 h-5 shrink-0 text-muted mt-0.5"
562
563
  })) : e.card.kind === "day_recap" ? (i(), p(h, {
@@ -565,8 +566,8 @@ var dn = d({
565
566
  })) : (i(), p(_, {
566
567
  key: 2,
567
568
  class: "w-5 h-5 shrink-0 text-muted mt-0.5"
568
- })), T("div", mn, [T("div", hn, o(e.card.title), 1), e.card.subtitle ? (i(), x("div", gn, o(e.card.subtitle), 1)) : m("", !0)])]),
569
- T("div", _n, [(i(!0), x(C, null, r(e.card.items, (e, t) => (i(), x("div", {
569
+ })), T("div", fn, [T("div", pn, o(e.card.title), 1), e.card.subtitle ? (i(), x("div", mn, o(e.card.subtitle), 1)) : m("", !0)])]),
570
+ T("div", hn, [(i(!0), x(C, null, r(e.card.items, (e, t) => (i(), x("div", {
570
571
  key: t,
571
572
  class: "flex flex-col gap-1"
572
573
  }, [
@@ -578,8 +579,8 @@ var dn = d({
578
579
  }, {
579
580
  default: v(() => [
580
581
  T("span", { class: l(["cui-assistant-card-dot h-2 w-2 shrink-0 self-center rounded-full", c(e.severity)]) }, null, 2),
581
- T("span", vn, o(e.label), 1),
582
- e.value ? (i(), x("span", yn, o(e.value), 1)) : m("", !0),
582
+ T("span", gn, o(e.label), 1),
583
+ e.value ? (i(), x("span", _n, o(e.value), 1)) : m("", !0),
583
584
  s(e) ? (i(), p(y, {
584
585
  key: 1,
585
586
  class: "h-4 w-4 shrink-0 self-center text-muted"
@@ -592,46 +593,46 @@ var dn = d({
592
593
  "disabled",
593
594
  "onClick"
594
595
  ])),
595
- e.share === void 0 ? m("", !0) : (i(), x("div", bn, [T("div", {
596
+ e.share === void 0 ? m("", !0) : (i(), x("div", vn, [T("div", {
596
597
  class: "cui-assistant-card-fill h-full rounded-full",
597
598
  style: S({ width: `${Math.round(Math.min(1, Math.max(0, e.share)) * 100)}%` })
598
599
  }, null, 4)])),
599
- e.note ? (i(), x("div", xn, o(e.note), 1)) : m("", !0)
600
+ e.note ? (i(), x("div", yn, o(e.note), 1)) : m("", !0)
600
601
  ]))), 128))]),
601
- e.card.footer ? (i(), x("div", Sn, o(e.card.footer), 1)) : m("", !0)
602
+ e.card.footer ? (i(), x("div", bn, o(e.card.footer), 1)) : m("", !0)
602
603
  ]);
603
604
  };
604
605
  }
605
- }), [["__scopeId", "data-v-02b66e4e"]]), wn = {
606
+ }), [["__scopeId", "data-v-02b66e4e"]]), Sn = {
606
607
  viewBox: "0 0 24 24",
607
608
  width: "1.2em",
608
609
  height: "1.2em"
609
610
  };
610
- function Tn(e, t) {
611
- return i(), x("svg", wn, [...t[0] ||= [T("path", {
611
+ function Cn(e, t) {
612
+ return i(), x("svg", Sn, [...t[0] ||= [T("path", {
612
613
  fill: "currentColor",
613
614
  d: "M12 20c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-18C6.47 2 2 6.47 2 12s4.47 10 10 10s10-4.47 10-10S17.53 2 12 2m2.59 6L12 10.59L9.41 8L8 9.41L10.59 12L8 14.59L9.41 16L12 13.41L14.59 16L16 14.59L13.41 12L16 9.41z"
614
615
  }, null, -1)]]);
615
616
  }
616
- var En = d({
617
+ var wn = d({
617
618
  name: "mdi-close-circle-outline",
618
- render: Tn
619
- }), Dn = { class: "cui-assistant-tool rounded-xl text-sm" }, On = { class: "font-medium truncate text-color" }, kn = { class: "text-muted truncate" }, An = { class: "ml-auto shrink-0 text-muted" }, jn = {
619
+ render: Cn
620
+ }), Tn = { class: "cui-assistant-tool rounded-xl text-sm" }, En = { class: "font-medium truncate text-color" }, Dn = { class: "text-muted truncate" }, On = { class: "ml-auto shrink-0 text-muted" }, kn = {
620
621
  key: 0,
621
622
  class: "flex flex-wrap gap-2 px-3 pb-2"
622
- }, Mn = ["onClick"], Nn = ["src", "alt"], Pn = {
623
+ }, An = ["onClick"], jn = ["src", "alt"], Mn = {
623
624
  key: 1,
624
625
  class: "flex flex-col gap-2 px-3 pb-2"
625
- }, Fn = {
626
+ }, Nn = {
626
627
  key: 2,
627
628
  class: "flex flex-col gap-2 px-3 pb-2"
628
- }, In = {
629
+ }, Pn = {
629
630
  key: 3,
630
631
  class: "px-3 pb-2"
631
- }, Ln = {
632
+ }, Fn = {
632
633
  key: 4,
633
634
  class: "cui-assistant-tool-details px-3 py-2 flex flex-col gap-2"
634
- }, Rn = { key: 0 }, zn = { class: "text-xs uppercase tracking-wide text-muted" }, Bn = { class: "cui-assistant-pre mt-1 max-h-64 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono" }, Vn = { key: 1 }, Hn = { class: "text-xs uppercase tracking-wide text-muted" }, Un = { class: "cui-assistant-pre mt-1 max-h-64 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono" }, Wn = /*#__PURE__*/ B(/* @__PURE__ */ A({
635
+ }, In = { key: 0 }, Ln = { class: "text-xs uppercase tracking-wide text-muted" }, Rn = { class: "cui-assistant-pre mt-1 max-h-64 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono" }, zn = { key: 1 }, Bn = { class: "text-xs uppercase tracking-wide text-muted" }, Vn = { class: "cui-assistant-pre mt-1 max-h-64 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono" }, Hn = /*#__PURE__*/ J(/* @__PURE__ */ A({
635
636
  __name: "CuiAssistantToolCall",
636
637
  props: {
637
638
  part: {},
@@ -652,19 +653,19 @@ var En = d({
652
653
  }
653
654
  },
654
655
  setup(e) {
655
- let t = e, { t: n } = De(), { openImageDialog: a } = G(), s = j(!1), c = _(() => Qe(t.part.name)), l = _(() => [
656
+ let t = e, { t: n } = we(), { openImageDialog: a } = ue(), s = j(!1), c = _(() => Xe(t.part.name)), l = _(() => [
656
657
  "awaiting-input",
657
658
  "input-streaming",
658
659
  "input-complete",
659
660
  "approval-responded"
660
661
  ].includes(t.part.state) && !t.result), u = _(() => l.value && t.busy), d = _(() => l.value && !t.busy), f = _(() => t.part.state === "approval-requested"), h = _(() => t.part.approval?.needsApproval === !0 && t.part.approval.approved === !1), v = _(() => t.part.state === "error" || t.result?.state === "error" || !!t.result?.error), y = _(() => u.value ? n("views.assistant.tool_running") : d.value ? n("views.assistant.tool_unfinished") : f.value ? n("views.assistant.tool_waiting_approval") : h.value ? n("views.assistant.tool_rejected") : v.value ? n("views.assistant.tool_failed") : ""), b = _(() => {
661
- let e = t.part.input ?? tt(t.part.arguments);
662
+ let e = t.part.input ?? $e(t.part.arguments);
662
663
  return e == null || typeof e == "object" && Object.keys(e).length === 0 ? "" : D(e);
663
- }), S = _(() => nt(t.result)), w = _(() => {
664
+ }), S = _(() => et(t.result)), w = _(() => {
664
665
  if (t.result?.error) return t.result.error;
665
666
  let e = t.result?.content;
666
- return e === void 0 ? "" : typeof e == "string" && !S.value ? D(tt(e) ?? e) : (S.value ?? []).filter((e) => e.type === "text").map((e) => e.type === "text" ? e.content : "").join("\n");
667
- }), E = _(() => [...t.extraImages ?? [], ...et(S.value, c.value)]);
667
+ return e === void 0 ? "" : typeof e == "string" && !S.value ? D($e(e) ?? e) : (S.value ?? []).filter((e) => e.type === "text").map((e) => e.type === "text" ? e.content : "").join("\n");
668
+ }), E = _(() => [...t.extraImages ?? [], ...Qe(S.value, c.value)]);
668
669
  function D(e) {
669
670
  if (typeof e == "string") return e;
670
671
  try {
@@ -682,8 +683,8 @@ var En = d({
682
683
  } });
683
684
  }
684
685
  return (t, n) => {
685
- let a = de, l = _e, _ = ye, S = En, D = ct, k = lt, A = ne, j = Cn, ee = tn, te = en, N = Yt;
686
- return i(), x("div", Dn, [
686
+ let a = U, l = Ee, _ = De, S = wn, D = ot, k = st, A = ne, j = xn, ee = $t, te = Qt, N = qt;
687
+ return i(), x("div", Tn, [
687
688
  T("button", {
688
689
  type: "button",
689
690
  class: "flex w-full cursor-pointer items-center gap-2 px-3 py-2 text-left",
@@ -706,9 +707,9 @@ var En = d({
706
707
  key: 4,
707
708
  class: "w-4 h-4 shrink-0 text-success"
708
709
  })),
709
- T("span", On, o(g(c)), 1),
710
- T("span", kn, o(g(y)), 1),
711
- T("span", An, [g(s) ? (i(), p(k, {
710
+ T("span", En, o(g(c)), 1),
711
+ T("span", Dn, o(g(y)), 1),
712
+ T("span", On, [g(s) ? (i(), p(k, {
712
713
  key: 0,
713
714
  class: "w-4 h-4"
714
715
  })) : (i(), p(A, {
@@ -716,7 +717,7 @@ var En = d({
716
717
  class: "w-4 h-4"
717
718
  }))])
718
719
  ]),
719
- e.inlineAttachments && g(E).length ? (i(), x("div", jn, [(i(!0), x(C, null, r(g(E), (e) => (i(), x("button", {
720
+ e.inlineAttachments && g(E).length ? (i(), x("div", kn, [(i(!0), x(C, null, r(g(E), (e) => (i(), x("button", {
720
721
  key: e.src,
721
722
  type: "button",
722
723
  class: "cui-assistant-thumb cursor-pointer overflow-hidden rounded-lg",
@@ -726,13 +727,13 @@ var En = d({
726
727
  alt: e.alt,
727
728
  class: "h-24 w-auto object-cover",
728
729
  loading: "lazy"
729
- }, null, 8, Nn)], 8, Mn))), 128))])) : m("", !0),
730
- e.inlineAttachments && e.cards?.length ? (i(), x("div", Pn, [(i(!0), x(C, null, r(e.cards, (t, n) => (i(), p(j, {
730
+ }, null, 8, jn)], 8, An))), 128))])) : m("", !0),
731
+ e.inlineAttachments && e.cards?.length ? (i(), x("div", Mn, [(i(!0), x(C, null, r(e.cards, (t, n) => (i(), p(j, {
731
732
  key: n,
732
733
  card: t,
733
734
  references: e.references
734
735
  }, null, 8, ["card", "references"]))), 128))])) : m("", !0),
735
- e.inlineAttachments && (e.settings?.length || e.notices?.length) ? (i(), x("div", Fn, [(i(!0), x(C, null, r(e.settings, (t) => (i(), p(ee, {
736
+ e.inlineAttachments && (e.settings?.length || e.notices?.length) ? (i(), x("div", Nn, [(i(!0), x(C, null, r(e.settings, (t) => (i(), p(ee, {
736
737
  key: t,
737
738
  setting: t,
738
739
  "model-id": e.modelId
@@ -741,86 +742,86 @@ var En = d({
741
742
  title: t.$t(`views.assistant.notice_${e.capability}_title`, { model: e.model }),
742
743
  text: t.$t(`views.assistant.notice_${e.capability}_text`)
743
744
  }, null, 8, ["title", "text"]))), 128))])) : m("", !0),
744
- e.inlineAttachments && e.references?.length ? (i(), x("div", In, [M(N, { references: e.references }, null, 8, ["references"])])) : m("", !0),
745
- g(s) ? (i(), x("div", Ln, [g(b) ? (i(), x("div", Rn, [T("span", zn, o(t.$t("views.assistant.tool_arguments")), 1), T("pre", Bn, o(g(b)), 1)])) : m("", !0), g(w) ? (i(), x("div", Vn, [T("span", Hn, o(t.$t("views.assistant.tool_result")), 1), T("pre", Un, o(g(w)), 1)])) : m("", !0)])) : m("", !0)
745
+ e.inlineAttachments && e.references?.length ? (i(), x("div", Pn, [M(N, { references: e.references }, null, 8, ["references"])])) : m("", !0),
746
+ g(s) ? (i(), x("div", Fn, [g(b) ? (i(), x("div", In, [T("span", Ln, o(t.$t("views.assistant.tool_arguments")), 1), T("pre", Rn, o(g(b)), 1)])) : m("", !0), g(w) ? (i(), x("div", zn, [T("span", Bn, o(t.$t("views.assistant.tool_result")), 1), T("pre", Vn, o(g(w)), 1)])) : m("", !0)])) : m("", !0)
746
747
  ]);
747
748
  };
748
749
  }
749
- }), [["__scopeId", "data-v-cf2f40da"]]), Gn = {
750
+ }), [["__scopeId", "data-v-cf2f40da"]]), Un = {
750
751
  viewBox: "0 0 24 24",
751
752
  width: "1.2em",
752
753
  height: "1.2em"
753
754
  };
754
- function Kn(e, t) {
755
- return i(), x("svg", Gn, [...t[0] ||= [T("path", {
755
+ function Wn(e, t) {
756
+ return i(), x("svg", Un, [...t[0] ||= [T("path", {
756
757
  fill: "currentColor",
757
758
  d: "M12 3v10.55c-.59-.34-1.27-.55-2-.55c-2.21 0-4 1.79-4 4s1.79 4 4 4s4-1.79 4-4V7h4V3z"
758
759
  }, null, -1)]]);
759
760
  }
760
- var qn = d({
761
+ var Gn = d({
761
762
  name: "mdi-music-note",
762
- render: Kn
763
- }), Jn = "[continue]";
764
- function Yn(e) {
763
+ render: Wn
764
+ }), Kn = "[continue]";
765
+ function qn(e) {
765
766
  return e.parts.filter((e) => e.type === "text").map((e) => e.type === "text" ? e.content : "").join("\n").trim();
766
767
  }
767
- function Xn(e) {
768
- return e?.role === "user" && Yn(e) === "[continue]";
768
+ function Jn(e) {
769
+ return e?.role === "user" && qn(e) === "[continue]";
769
770
  }
770
771
  //#endregion
771
772
  //#region src/components/CuiAssistantMessage/CuiAssistantMessage.vue?vue&type=script&setup=true&lang.ts
772
- var Zn = {
773
+ var Yn = {
773
774
  key: 0,
774
775
  class: "group flex flex-col items-end"
775
- }, Qn = {
776
+ }, Xn = {
776
777
  key: 0,
777
778
  class: "w-full max-w-[min(82%,54ch)]"
778
- }, $n = { class: "mt-1.5 flex justify-end gap-1" }, er = {
779
+ }, Zn = { class: "mt-1.5 flex justify-end gap-1" }, Qn = {
779
780
  key: 1,
780
781
  class: "cui-assistant-bubble max-w-[min(82%,54ch)] rounded-2xl rounded-br-[4px] px-3.5 py-2.5 text-[15px] leading-relaxed whitespace-pre-wrap break-words text-color"
781
- }, tr = {
782
+ }, $n = {
782
783
  key: 0,
783
784
  class: "mt-2 flex flex-wrap gap-2"
784
- }, nr = ["src"], rr = {
785
+ }, er = ["src"], tr = {
785
786
  key: 1,
786
787
  class: "mt-2 flex flex-wrap gap-2"
787
- }, ir = {
788
+ }, nr = {
788
789
  key: 2,
789
790
  class: "mt-1 flex gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100"
790
- }, ar = {
791
+ }, rr = {
791
792
  key: 1,
792
793
  class: "cui-assistant-answer group flex flex-col"
793
- }, or = {
794
+ }, ir = {
794
795
  key: 0,
795
796
  class: "mb-1.5 flex items-center gap-2 text-[12.5px] text-muted"
796
- }, sr = { class: "flex min-w-0 flex-col gap-2.5" }, cr = {
797
+ }, ar = { class: "flex min-w-0 flex-col gap-2.5" }, or = {
797
798
  key: 0,
798
799
  class: "text-[15px] leading-relaxed text-color break-words"
799
- }, lr = {
800
+ }, sr = {
800
801
  key: 0,
801
802
  class: "cui-assistant-caret"
802
- }, ur = ["open"], dr = { class: "flex cursor-pointer select-none items-center gap-2 px-3 py-2" }, fr = { class: "shrink-0 font-medium text-color" }, pr = { class: "truncate text-muted" }, mr = { class: "flex flex-col gap-2 px-2 pb-2" }, hr = {
803
+ }, cr = ["open"], lr = { class: "flex cursor-pointer select-none items-center gap-2 px-3 py-2" }, ur = { class: "shrink-0 font-medium text-color" }, dr = { class: "truncate text-muted" }, fr = { class: "flex flex-col gap-2 px-2 pb-2" }, pr = {
803
804
  key: 3,
804
805
  class: "text-xs text-muted"
805
- }, gr = { class: "cursor-pointer select-none" }, _r = { class: "mt-1 whitespace-pre-wrap break-words" }, vr = {
806
+ }, mr = { class: "cursor-pointer select-none" }, hr = { class: "mt-1 whitespace-pre-wrap break-words" }, gr = {
806
807
  key: 0,
807
808
  class: "flex items-center gap-2 text-[13.5px] text-muted"
808
- }, yr = {
809
+ }, _r = {
809
810
  class: "cui-assistant-pulse flex items-center gap-1",
810
811
  "aria-hidden": "true"
811
- }, br = {
812
+ }, vr = {
812
813
  key: 0,
813
814
  class: "flex flex-wrap gap-2"
814
- }, xr = ["onClick"], Sr = ["src", "alt"], Cr = {
815
+ }, yr = ["onClick"], br = ["src", "alt"], xr = {
815
816
  key: 1,
816
817
  class: "mt-2 flex items-center gap-2 text-[12.5px] text-muted"
817
- }, wr = {
818
+ }, Sr = {
818
819
  key: 2,
819
820
  class: "mt-2 flex items-center gap-2"
820
- }, Tr = {
821
+ }, Cr = {
821
822
  key: 0,
822
823
  class: "cui-assistant-usage text-[11px] tabular-nums text-muted"
823
- }, Er = { class: "flex gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100" }, Dr = 6, Or = /*#__PURE__*/ B(/* @__PURE__ */ A({
824
+ }, wr = { class: "flex gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100" }, Tr = 6, Er = /*#__PURE__*/ J(/* @__PURE__ */ A({
824
825
  __name: "CuiAssistantMessage",
825
826
  props: {
826
827
  message: {},
@@ -845,12 +846,12 @@ var Zn = {
845
846
  "continue"
846
847
  ],
847
848
  setup(e, { emit: a }) {
848
- let s = e, u = a, { t: d } = De(), { openImageDialog: f } = G(), y = [
849
+ let s = e, u = a, { t: d } = we(), { openImageDialog: f } = ue(), y = [
849
850
  "awaiting-input",
850
851
  "input-streaming",
851
852
  "input-complete",
852
853
  "approval-responded"
853
- ], b = w("editRef"), S = j(!1), O = j(""), k = _(() => Yn(s.message)), A = _(() => s.message.parts.filter((e) => e.type === "image").map((e) => e.type === "image" ? e.source.type === "url" ? e.source.value.startsWith("attachment:") ? s.toolImages?.[e.source.value.slice(11)]?.[0]?.src ?? "" : e.source.value : `data:${e.source.mimeType ?? "image/jpeg"};base64,${e.source.value}` : "").filter(Boolean)), ee = _(() => s.message.parts.filter((e) => e.type === "audio" || e.type === "video").map((e) => ({ kind: e.type }))), N = _(() => {
854
+ ], b = w("editRef"), S = j(!1), O = j(""), k = _(() => qn(s.message)), A = _(() => s.message.parts.filter((e) => e.type === "image").map((e) => e.type === "image" ? e.source.type === "url" ? e.source.value.startsWith("attachment:") ? s.toolImages?.[e.source.value.slice(11)]?.[0]?.src ?? "" : e.source.value : `data:${e.source.mimeType ?? "image/jpeg"};base64,${e.source.value}` : "").filter(Boolean)), ee = _(() => s.message.parts.filter((e) => e.type === "audio" || e.type === "video").map((e) => ({ kind: e.type }))), N = _(() => {
854
855
  let e = /* @__PURE__ */ new Map();
855
856
  for (let t of s.message.parts) t.type === "tool-result" && e.set(t.toolCallId, t);
856
857
  let t = [];
@@ -884,7 +885,7 @@ var Zn = {
884
885
  let e = [], t = [], n = [], r = [], i = [], a = /* @__PURE__ */ new Set();
885
886
  for (let o of N.value) {
886
887
  if (o.kind !== "tool") continue;
887
- let c = [...s.toolImages?.[o.part.id] ?? [], ...et(nt(o.result), Qe(o.part.name))];
888
+ let c = [...s.toolImages?.[o.part.id] ?? [], ...Qe(et(o.result), Xe(o.part.name))];
888
889
  for (let t of c) !a.has(t.src) && a.add(t.src) && e.push(t);
889
890
  t.push(...s.toolCards?.[o.part.id] ?? []);
890
891
  for (let e of s.toolSettings?.[o.part.id] ?? []) r.includes(e) || r.push(e);
@@ -894,7 +895,7 @@ var Zn = {
894
895
  !a.has(t) && a.add(t) && n.push(e);
895
896
  }
896
897
  }
897
- let o = new Set(t.flatMap((e) => e.items.flatMap((e) => [e.episodeId, e.eventId].filter(Boolean)))), c = n.filter((e) => !o.has(e.id)).slice(0, Dr);
898
+ let o = new Set(t.flatMap((e) => e.items.flatMap((e) => [e.episodeId, e.eventId].filter(Boolean)))), c = [...n.filter((e) => e.kind === "download"), ...n.filter((e) => e.kind !== "download" && !o.has(e.id)).slice(0, Tr)];
898
899
  return e.length || t.length || c.length || r.length || i.length ? {
899
900
  images: e,
900
901
  cards: t,
@@ -913,7 +914,7 @@ var Zn = {
913
914
  input: R(e.promptTokens),
914
915
  output: R(e.completionTokens)
915
916
  }), `${t.toFixed(1)} s`];
916
- return e.completionTokens && t > 0 && n.push(d("views.assistant.usage_speed", { n: Math.round(e.completionTokens / t) })), e.costUsd !== null && n.push(d("views.assistant.usage_cost", { cost: ie(e.costUsd) })), n.join(" · ");
917
+ return e.completionTokens && t > 0 && n.push(d("views.assistant.usage_speed", { n: Math.round(e.completionTokens / t) })), e.costUsd !== null && n.push(d("views.assistant.usage_cost", { cost: z(e.costUsd) })), n.join(" · ");
917
918
  }), L = _(() => {
918
919
  let e = s.usage;
919
920
  return e ? d("views.assistant.usage_details", {
@@ -927,20 +928,20 @@ var Zn = {
927
928
  function R(e) {
928
929
  return e < 1e3 ? String(e) : `${(e / 1e3).toFixed(+(e < 1e4))}k`;
929
930
  }
930
- function ie(e) {
931
+ function z(e) {
931
932
  return `$${e.toFixed(e < .01 ? 4 : 3)}`;
932
933
  }
933
- function B(e) {
934
+ function ie(e) {
934
935
  return !!s.busy && e.items.some((e) => !e.result && y.includes(e.part.state));
935
936
  }
936
- async function ae() {
937
+ async function B() {
937
938
  O.value = k.value, S.value = !0, await c(), b.value?.$el.focus();
938
939
  }
939
- function oe() {
940
+ function V() {
940
941
  let e = O.value.trim();
941
942
  e && (S.value = !1, e !== k.value && u("edit", e));
942
943
  }
943
- function V(e) {
944
+ function se(e) {
944
945
  f({ data: {
945
946
  title: e.alt,
946
947
  src: e.src,
@@ -949,11 +950,11 @@ var Zn = {
949
950
  } });
950
951
  }
951
952
  async function H() {
952
- await me(P.value);
953
+ await pe(P.value);
953
954
  }
954
955
  return (a, s) => {
955
- let c = Ie, d = ke, f = qn, _ = Wt, y = it, w = Re, j = se, N = qe, R = Wn, ie = de, ce = ct, U = Cn, W = tn, G = en, K = Yt, le = Ze, ue = z, fe = st, q = te;
956
- return e.message.role === "user" ? (i(), x("div", Zn, [g(S) ? (i(), x("div", Qn, [M(c, {
956
+ let c = Fe, d = Oe, f = Gn, _ = Ht, y = nt, w = Le, j = oe, N = Ge, R = Hn, z = U, ce = ot, W = xn, le = $t, G = Qt, ue = qt, de = Ye, K = ae, fe = at, q = te;
957
+ return e.message.role === "user" ? (i(), x("div", Yn, [g(S) ? (i(), x("div", Xn, [M(c, {
957
958
  ref_key: "editRef",
958
959
  ref: b,
959
960
  modelValue: g(O),
@@ -961,8 +962,8 @@ var Zn = {
961
962
  "auto-resize": "",
962
963
  rows: "2",
963
964
  class: "w-full text-[15px] leading-relaxed",
964
- onKeydown: [n(t(oe, ["exact", "prevent"]), ["enter"]), s[1] ||= n(t((e) => S.value = !1, ["prevent"]), ["esc"])]
965
- }, null, 8, ["modelValue", "onKeydown"]), T("div", $n, [M(d, {
965
+ onKeydown: [n(t(V, ["exact", "prevent"]), ["enter"]), s[1] ||= n(t((e) => S.value = !1, ["prevent"]), ["esc"])]
966
+ }, null, 8, ["modelValue", "onKeydown"]), T("div", Zn, [M(d, {
966
967
  type: "button",
967
968
  size: "small",
968
969
  severity: "secondary",
@@ -974,16 +975,16 @@ var Zn = {
974
975
  size: "small",
975
976
  label: a.$t("views.assistant.edit_send"),
976
977
  disabled: !g(O).trim(),
977
- onClick: oe
978
- }, null, 8, ["label", "disabled"])])])) : (i(), x("div", er, [
978
+ onClick: V
979
+ }, null, 8, ["label", "disabled"])])])) : (i(), x("div", Qn, [
979
980
  D(o(g(k)) + " ", 1),
980
- g(A).length ? (i(), x("div", tr, [(i(!0), x(C, null, r(g(A), (e) => (i(), x("img", {
981
+ g(A).length ? (i(), x("div", $n, [(i(!0), x(C, null, r(g(A), (e) => (i(), x("img", {
981
982
  key: e,
982
983
  src: e,
983
984
  class: "h-24 rounded-lg",
984
985
  alt: ""
985
- }, null, 8, nr))), 128))])) : m("", !0),
986
- g(ee).length ? (i(), x("div", rr, [(i(!0), x(C, null, r(g(ee), (e, t) => (i(), x("span", {
986
+ }, null, 8, er))), 128))])) : m("", !0),
987
+ g(ee).length ? (i(), x("div", tr, [(i(!0), x(C, null, r(g(ee), (e, t) => (i(), x("span", {
987
988
  key: t,
988
989
  class: "cui-assistant-media inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted"
989
990
  }, [e.kind === "audio" ? (i(), p(f, {
@@ -993,14 +994,14 @@ var Zn = {
993
994
  key: 1,
994
995
  class: "w-3.5 h-3.5"
995
996
  })), D(" " + o(e.kind === "audio" ? a.$t("views.assistant.attachment_audio") : a.$t("views.assistant.attachment_video")), 1)]))), 128))])) : m("", !0)
996
- ])), !g(S) && !e.busy ? (i(), x("div", ir, [
997
+ ])), !g(S) && !e.busy ? (i(), x("div", nr, [
997
998
  E((i(), p(d, {
998
999
  type: "button",
999
1000
  severity: "secondary",
1000
1001
  text: "",
1001
1002
  rounded: "",
1002
1003
  class: "cui-icon-md text-muted",
1003
- onClick: ae
1004
+ onClick: B
1004
1005
  }, {
1005
1006
  icon: v(() => [M(y, { class: "w-3.5 h-3.5" })]),
1006
1007
  _: 1
@@ -1042,13 +1043,13 @@ var Zn = {
1042
1043
  void 0,
1043
1044
  { top: !0 }
1044
1045
  ]])
1045
- ])) : m("", !0)])) : (i(), x("div", ar, [
1046
- e.continuation ? m("", !0) : (i(), x("div", or, [T("span", { class: l(["cui-assistant-dot h-1.5 w-1.5 shrink-0 rounded-full", { "cui-assistant-dot-live": e.working }]) }, null, 2), T("span", null, o(a.$t("views.assistant.title")), 1)])),
1047
- T("div", sr, [
1048
- (i(!0), x(C, null, r(g(ne), (t, n) => (i(), x(C, { key: n }, [t.kind === "text" ? (i(), x("div", cr, [M(N, {
1046
+ ])) : m("", !0)])) : (i(), x("div", rr, [
1047
+ e.continuation ? m("", !0) : (i(), x("div", ir, [T("span", { class: l(["cui-assistant-dot h-1.5 w-1.5 shrink-0 rounded-full", { "cui-assistant-dot-live": e.working }]) }, null, 2), T("span", null, o(a.$t("views.assistant.title")), 1)])),
1048
+ T("div", ar, [
1049
+ (i(!0), x(C, null, r(g(ne), (t, n) => (i(), x(C, { key: n }, [t.kind === "text" ? (i(), x("div", or, [M(N, {
1049
1050
  content: t.text,
1050
1051
  class: "cui-assistant-markdown"
1051
- }, null, 8, ["content"]), e.working && n === g(ne).length - 1 ? (i(), x("span", lr)) : m("", !0)])) : t.kind === "tool" ? (i(), p(R, {
1052
+ }, null, 8, ["content"]), e.working && n === g(ne).length - 1 ? (i(), x("span", sr)) : m("", !0)])) : t.kind === "tool" ? (i(), p(R, {
1052
1053
  key: 1,
1053
1054
  part: t.part,
1054
1055
  result: t.result,
@@ -1075,8 +1076,8 @@ var Zn = {
1075
1076
  key: 2,
1076
1077
  class: "cui-assistant-steps rounded-xl text-sm",
1077
1078
  open: e.streaming
1078
- }, [T("summary", dr, [
1079
- B(t) ? (i(), p(ie, {
1079
+ }, [T("summary", lr, [
1080
+ ie(t) ? (i(), p(z, {
1080
1081
  key: 0,
1081
1082
  class: "w-4 h-4 m-0 shrink-0",
1082
1083
  "stroke-width": "6"
@@ -1084,9 +1085,9 @@ var Zn = {
1084
1085
  key: 1,
1085
1086
  class: "w-4 h-4 shrink-0 text-success"
1086
1087
  })),
1087
- T("span", fr, o(a.$t("views.assistant.steps", { n: t.items.length })), 1),
1088
- T("span", pr, o(t.items.map((e) => g(Qe)(e.part.name)).join(", ")), 1)
1089
- ]), T("div", mr, [(i(!0), x(C, null, r(t.items, (t) => (i(), p(R, {
1088
+ T("span", ur, o(a.$t("views.assistant.steps", { n: t.items.length })), 1),
1089
+ T("span", dr, o(t.items.map((e) => g(Xe)(e.part.name)).join(", ")), 1)
1090
+ ]), T("div", fr, [(i(!0), x(C, null, r(t.items, (t) => (i(), p(R, {
1090
1091
  key: t.part.id,
1091
1092
  part: t.part,
1092
1093
  result: t.result,
@@ -1109,29 +1110,29 @@ var Zn = {
1109
1110
  "model-id",
1110
1111
  "inline-attachments",
1111
1112
  "busy"
1112
- ]))), 128))])], 8, ur)) : t.kind === "thinking" ? (i(), x("details", hr, [T("summary", gr, o(a.$t("views.assistant.thinking")), 1), T("pre", _r, o(t.text), 1)])) : m("", !0)], 64))), 128)),
1113
- e.working && g(ne).at(-1)?.kind !== "text" ? (i(), x("span", vr, [T("span", yr, [(i(), x(C, null, r(3, (e) => T("span", {
1113
+ ]))), 128))])], 8, cr)) : t.kind === "thinking" ? (i(), x("details", pr, [T("summary", mr, o(a.$t("views.assistant.thinking")), 1), T("pre", hr, o(t.text), 1)])) : m("", !0)], 64))), 128)),
1114
+ e.working && g(ne).at(-1)?.kind !== "text" ? (i(), x("span", gr, [T("span", _r, [(i(), x(C, null, r(3, (e) => T("span", {
1114
1115
  key: e,
1115
1116
  class: "h-1.5 w-1.5 rounded-full"
1116
1117
  })), 64))]), D(" " + o(g(I)), 1)])) : m("", !0),
1117
1118
  g(F) ? (i(), x(C, { key: 1 }, [
1118
- g(F).images.length ? (i(), x("div", br, [(i(!0), x(C, null, r(g(F).images, (e) => (i(), x("button", {
1119
+ g(F).images.length ? (i(), x("div", vr, [(i(!0), x(C, null, r(g(F).images, (e) => (i(), x("button", {
1119
1120
  key: e.src,
1120
1121
  type: "button",
1121
1122
  class: "cui-assistant-thumb cursor-pointer overflow-hidden rounded-lg",
1122
- onClick: (t) => V(e)
1123
+ onClick: (t) => se(e)
1123
1124
  }, [T("img", {
1124
1125
  src: e.src,
1125
1126
  alt: e.alt,
1126
1127
  class: "h-32 w-auto object-cover",
1127
1128
  loading: "lazy"
1128
- }, null, 8, Sr)], 8, xr))), 128))])) : m("", !0),
1129
- (i(!0), x(C, null, r(g(F).cards, (e, t) => (i(), p(U, {
1129
+ }, null, 8, br)], 8, yr))), 128))])) : m("", !0),
1130
+ (i(!0), x(C, null, r(g(F).cards, (e, t) => (i(), p(W, {
1130
1131
  key: t,
1131
1132
  card: e,
1132
1133
  references: g(F).all
1133
1134
  }, null, 8, ["card", "references"]))), 128)),
1134
- (i(!0), x(C, null, r(g(F).settings, (t) => (i(), p(W, {
1135
+ (i(!0), x(C, null, r(g(F).settings, (t) => (i(), p(le, {
1135
1136
  key: t,
1136
1137
  setting: t,
1137
1138
  "model-id": e.modelId
@@ -1141,13 +1142,13 @@ var Zn = {
1141
1142
  title: a.$t(`views.assistant.notice_${e.capability}_title`, { model: e.model }),
1142
1143
  text: a.$t(`views.assistant.notice_${e.capability}_text`)
1143
1144
  }, null, 8, ["title", "text"]))), 128)),
1144
- g(F).references.length ? (i(), p(K, {
1145
+ g(F).references.length ? (i(), p(ue, {
1145
1146
  key: 1,
1146
1147
  references: g(F).references
1147
1148
  }, null, 8, ["references"])) : m("", !0)
1148
1149
  ], 64)) : m("", !0)
1149
1150
  ]),
1150
- e.stopped && !e.streaming ? (i(), x("div", Cr, [T("span", null, o(a.$t("views.assistant.answer_stopped")), 1), M(d, {
1151
+ e.stopped && !e.streaming ? (i(), x("div", xr, [T("span", null, o(a.$t("views.assistant.answer_stopped")), 1), M(d, {
1151
1152
  type: "button",
1152
1153
  size: "small",
1153
1154
  severity: "secondary",
@@ -1156,19 +1157,19 @@ var Zn = {
1156
1157
  disabled: e.busy,
1157
1158
  onClick: s[5] ||= (e) => u("continue")
1158
1159
  }, {
1159
- icon: v(() => [M(le, { class: "w-3.5 h-3.5" })]),
1160
+ icon: v(() => [M(de, { class: "w-3.5 h-3.5" })]),
1160
1161
  _: 1
1161
1162
  }, 8, ["label", "disabled"])])) : m("", !0),
1162
- !e.streaming && (g(P) || e.stopped) ? (i(), x("div", wr, [g(re) ? E((i(), x("span", Tr, [D(o(g(re)), 1)])), [[
1163
+ !e.streaming && (g(P) || e.stopped) ? (i(), x("div", Sr, [g(re) ? E((i(), x("span", Cr, [D(o(g(re)), 1)])), [[
1163
1164
  q,
1164
1165
  { value: g(L) },
1165
1166
  void 0,
1166
1167
  { top: !0 }
1167
- ]]) : m("", !0), T("div", Er, [
1168
- g(P) ? E((i(), p(ue, {
1168
+ ]]) : m("", !0), T("div", wr, [
1169
+ g(P) ? E((i(), p(K, {
1169
1170
  key: 0,
1170
1171
  "action-text": a.$t("views.assistant.copied"),
1171
- icon: g(Ke),
1172
+ icon: g(We),
1172
1173
  "icon-class": "w-3.5 h-3.5",
1173
1174
  "button-props": {
1174
1175
  severity: "secondary",
@@ -1238,53 +1239,53 @@ var Zn = {
1238
1239
  ]));
1239
1240
  };
1240
1241
  }
1241
- }), [["__scopeId", "data-v-bedd2a72"]]), kr = {
1242
+ }), [["__scopeId", "data-v-0132c9a8"]]), Dr = {
1242
1243
  viewBox: "0 0 24 24",
1243
1244
  width: "1.2em",
1244
1245
  height: "1.2em"
1245
1246
  };
1246
- function Ar(e, t) {
1247
- return i(), x("svg", kr, [...t[0] ||= [T("path", {
1247
+ function Or(e, t) {
1248
+ return i(), x("svg", Dr, [...t[0] ||= [T("path", {
1248
1249
  fill: "currentColor",
1249
1250
  d: "M13 20h-2V8l-5.5 5.5l-1.42-1.42L12 4.16l7.92 7.92l-1.42 1.42L13 8z"
1250
1251
  }, null, -1)]]);
1251
1252
  }
1252
- var jr = d({
1253
+ var kr = d({
1253
1254
  name: "mdi-arrow-up",
1254
- render: Ar
1255
- }), Mr = {
1255
+ render: Or
1256
+ }), Ar = {
1256
1257
  viewBox: "0 0 24 24",
1257
1258
  width: "1.2em",
1258
1259
  height: "1.2em"
1259
1260
  };
1260
- function Nr(e, t) {
1261
- return i(), x("svg", Mr, [...t[0] ||= [T("path", {
1261
+ function jr(e, t) {
1262
+ return i(), x("svg", Ar, [...t[0] ||= [T("path", {
1262
1263
  fill: "currentColor",
1263
1264
  d: "M18 18H6V6h12z"
1264
1265
  }, null, -1)]]);
1265
1266
  }
1266
- var Pr = d({
1267
+ var Mr = d({
1267
1268
  name: "mdi-stop",
1268
- render: Nr
1269
- }), Fr = {
1269
+ render: jr
1270
+ }), Nr = {
1270
1271
  viewBox: "0 0 24 24",
1271
1272
  width: "1.2em",
1272
1273
  height: "1.2em"
1273
1274
  };
1274
- function Ir(e, t) {
1275
- return i(), x("svg", Fr, [...t[0] ||= [T("path", {
1275
+ function Pr(e, t) {
1276
+ return i(), x("svg", Nr, [...t[0] ||= [T("path", {
1276
1277
  fill: "currentColor",
1277
1278
  d: "M16.5 6v11.5a4 4 0 0 1-4 4a4 4 0 0 1-4-4V5A2.5 2.5 0 0 1 11 2.5A2.5 2.5 0 0 1 13.5 5v10.5a1 1 0 0 1-1 1a1 1 0 0 1-1-1V6H10v9.5a2.5 2.5 0 0 0 2.5 2.5a2.5 2.5 0 0 0 2.5-2.5V5a4 4 0 0 0-4-4a4 4 0 0 0-4 4v12.5a5.5 5.5 0 0 0 5.5 5.5a5.5 5.5 0 0 0 5.5-5.5V6z"
1278
1279
  }, null, -1)]]);
1279
1280
  }
1280
- var Lr = d({
1281
+ var Fr = d({
1281
1282
  name: "mdi-paperclip",
1282
- render: Ir
1283
- }), Rr = {
1283
+ render: Pr
1284
+ }), Ir = {
1284
1285
  image: 12582912,
1285
1286
  audio: 26214400,
1286
1287
  video: 62914560
1287
- }, zr = "image/*,audio/*,video/*", Br = {
1288
+ }, Lr = "image/*,audio/*,video/*", Rr = {
1288
1289
  de: "de-DE",
1289
1290
  en: "en-US",
1290
1291
  fr: "fr-FR",
@@ -1297,22 +1298,22 @@ var Lr = d({
1297
1298
  ru: "ru-RU",
1298
1299
  zh: "zh-CN",
1299
1300
  ja: "ja-JP"
1300
- }, Vr = { class: "cui-assistant-composer rounded-2xl" }, Hr = {
1301
+ }, zr = { class: "cui-assistant-composer rounded-2xl" }, Br = {
1301
1302
  key: 0,
1302
1303
  class: "px-3 pb-2"
1303
- }, Ur = {
1304
+ }, Vr = {
1304
1305
  key: 1,
1305
1306
  class: "flex flex-wrap gap-2 px-3 pb-1"
1306
- }, Wr = ["src"], Gr = {
1307
+ }, Hr = ["src"], Ur = {
1307
1308
  key: 1,
1308
1309
  class: "flex items-center gap-1.5 px-2.5 py-2"
1309
- }, Kr = { class: "max-w-40 truncate" }, qr = { class: "text-muted" }, Jr = ["accept"], Yr = {
1310
+ }, Wr = { class: "max-w-40 truncate" }, Gr = { class: "text-muted" }, Kr = ["accept"], qr = {
1310
1311
  key: 1,
1311
1312
  class: "ml-auto flex items-center gap-1.5 text-[11.5px] text-muted"
1312
- }, Xr = {
1313
+ }, Jr = {
1313
1314
  key: 2,
1314
1315
  class: "ml-auto"
1315
- }, Zr = /*#__PURE__*/ B(/* @__PURE__ */ A({
1316
+ }, Yr = /*#__PURE__*/ J(/* @__PURE__ */ A({
1316
1317
  __name: "CuiAssistantComposer",
1317
1318
  props: {
1318
1319
  busy: {
@@ -1332,27 +1333,27 @@ var Lr = d({
1332
1333
  },
1333
1334
  emits: ["send", "stop"],
1334
1335
  setup(e, { expose: u, emit: d }) {
1335
- let f = e, _ = d, { smBreakpoint: y } = R(), { t: S, locale: O } = De(), k = window.SpeechRecognition ?? window.webkitSpeechRecognition, A = !!k && window.isSecureContext, ee = w("inputRef"), ne = w("fileInput"), P = j(""), F = j(!1), I = j([]), re = j(""), L = null, z;
1336
- function ie() {
1336
+ let f = e, _ = d, { smBreakpoint: y } = ie(), { t: S, locale: O } = we(), k = window.SpeechRecognition ?? window.webkitSpeechRecognition, A = !!k && window.isSecureContext, ee = w("inputRef"), ne = w("fileInput"), P = j(""), F = j(!1), I = j([]), re = j(""), L = null, R;
1337
+ function z() {
1337
1338
  let e = ee.value?.$el;
1338
1339
  return e?.tagName === "TEXTAREA" ? e : e?.querySelector("textarea");
1339
1340
  }
1340
1341
  function B() {
1341
- ie()?.focus();
1342
+ z()?.focus();
1342
1343
  }
1343
- function ae() {
1344
- let e = ie();
1344
+ function V() {
1345
+ let e = z();
1345
1346
  e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
1346
1347
  }
1347
- function oe() {
1348
+ function ae() {
1348
1349
  let e = P.value.trim();
1349
1350
  !e && !I.value.length || f.disabled || (_("send", {
1350
1351
  text: e,
1351
1352
  attachments: I.value
1352
1353
  }), P.value = "", I.value = []);
1353
1354
  }
1354
- function V(e) {
1355
- re.value = e, clearTimeout(z), z = setTimeout(() => re.value = "", 4e3);
1355
+ function oe(e) {
1356
+ re.value = e, clearTimeout(R), R = setTimeout(() => re.value = "", 4e3);
1356
1357
  }
1357
1358
  function se(e) {
1358
1359
  let t = e.type.split("/")[0];
@@ -1371,15 +1372,15 @@ var Lr = d({
1371
1372
  for (let t of e) {
1372
1373
  let e = se(t);
1373
1374
  if (!e) {
1374
- V(S("views.assistant.attach_unsupported"));
1375
+ oe(S("views.assistant.attach_unsupported"));
1375
1376
  continue;
1376
1377
  }
1377
- if (t.size > Rr[e]) {
1378
- V(S("views.assistant.attach_too_large", { max: Math.round(Rr[e] / 1024 / 1024) }));
1378
+ if (t.size > Ir[e]) {
1379
+ oe(S("views.assistant.attach_too_large", { max: Math.round(Ir[e] / 1024 / 1024) }));
1379
1380
  continue;
1380
1381
  }
1381
1382
  if (I.value.length >= 8) {
1382
- V(S("views.assistant.attach_too_many", { max: 8 }));
1383
+ oe(S("views.assistant.attach_too_many", { max: 8 }));
1383
1384
  break;
1384
1385
  }
1385
1386
  let n = await ce(t);
@@ -1398,35 +1399,35 @@ var Lr = d({
1398
1399
  let t = e.target;
1399
1400
  t.files?.length && await U(Array.from(t.files)), t.value = "";
1400
1401
  }
1401
- async function G(e) {
1402
+ async function le(e) {
1402
1403
  let t = Array.from(e.clipboardData?.files ?? []);
1403
1404
  t.length && (e.preventDefault(), await U(t));
1404
1405
  }
1405
- function K(e) {
1406
+ function G(e) {
1406
1407
  I.value = I.value.filter((t) => t.id !== e);
1407
1408
  }
1408
- function le() {
1409
+ function ue() {
1409
1410
  if (F.value) {
1410
1411
  L?.stop();
1411
1412
  return;
1412
1413
  }
1413
1414
  if (!k) return;
1414
1415
  let e = P.value.trim(), t = new k();
1415
- t.lang = Br[O.value] ?? O.value, t.interimResults = !0, t.continuous = !1, t.onresult = (t) => {
1416
+ t.lang = Rr[O.value] ?? O.value, t.interimResults = !0, t.continuous = !1, t.onresult = (t) => {
1416
1417
  let n = "";
1417
1418
  for (let e = 0; e < t.results.length; e += 1) n += t.results[e][0]?.transcript ?? "";
1418
1419
  P.value = e ? `${e} ${n.trim()}` : n.trim();
1419
1420
  }, t.onend = () => {
1420
1421
  F.value = !1, L = null, B();
1421
- }, t.onerror = () => {
1422
- F.value = !1, L = null;
1422
+ }, t.onerror = (e) => {
1423
+ F.value = !1, L = null, e.error !== "no-speech" && e.error !== "aborted" && oe(e.error === "not-allowed" || e.error === "service-not-allowed" ? S("views.assistant.voice_denied") : S("views.assistant.voice_failed", { error: e.error }));
1423
1424
  }, L = t, F.value = !0, t.start();
1424
1425
  }
1425
- return b(P, () => c(ae)), a(() => {
1426
- L?.abort(), clearTimeout(z);
1426
+ return b(P, () => c(V)), a(() => {
1427
+ L?.abort(), clearTimeout(R);
1427
1428
  }), u({ focus: B }), (a, c) => {
1428
- let u = Ie, d = en, f = qn, b = Wt, S = Ne, w = ke, O = N, k = Lr, j = ut, L = Pr, R = jr, z = te;
1429
- return i(), x("div", Vr, [
1429
+ let u = Fe, d = Qt, f = Gn, b = Ht, S = Me, w = Oe, O = N, k = Fr, j = ct, L = Mr, R = kr, z = te;
1430
+ return i(), x("div", zr, [
1430
1431
  M(u, {
1431
1432
  ref_key: "inputRef",
1432
1433
  ref: ee,
@@ -1437,19 +1438,19 @@ var Lr = d({
1437
1438
  "auto-resize": "",
1438
1439
  rows: "1",
1439
1440
  class: "cui-assistant-input block w-full max-h-52 resize-none px-4 pt-3.5 pb-1 text-[15px] leading-relaxed",
1440
- onKeydown: n(t(oe, ["exact", "prevent"]), ["enter"]),
1441
- onPaste: G
1441
+ onKeydown: n(t(ae, ["exact", "prevent"]), ["enter"]),
1442
+ onPaste: le
1442
1443
  }, null, 8, [
1443
1444
  "modelValue",
1444
1445
  "placeholder",
1445
1446
  "disabled",
1446
1447
  "onKeydown"
1447
1448
  ]),
1448
- e.visionMissing && g(I).some((e) => e.kind === "image") ? (i(), x("div", Hr, [M(d, {
1449
+ e.visionMissing && g(I).some((e) => e.kind === "image") ? (i(), x("div", Br, [M(d, {
1449
1450
  title: a.$t("views.assistant.notice_vision_title", { model: e.visionMissing }),
1450
1451
  text: a.$t("views.assistant.notice_vision_attach")
1451
1452
  }, null, 8, ["title", "text"])])) : m("", !0),
1452
- g(I).length ? (i(), x("div", Ur, [(i(!0), x(C, null, r(g(I), (e) => (i(), x("div", {
1453
+ g(I).length ? (i(), x("div", Vr, [(i(!0), x(C, null, r(g(I), (e) => (i(), x("div", {
1453
1454
  key: e.id,
1454
1455
  class: "cui-assistant-attachment relative flex items-center rounded-lg text-xs text-color"
1455
1456
  }, [e.kind === "image" ? (i(), x("img", {
@@ -1457,7 +1458,7 @@ var Lr = d({
1457
1458
  src: e.preview,
1458
1459
  class: "h-14 w-14 rounded-lg object-cover",
1459
1460
  alt: ""
1460
- }, null, 8, Wr)) : (i(), x("span", Gr, [
1461
+ }, null, 8, Hr)) : (i(), x("span", Ur, [
1461
1462
  e.kind === "audio" ? (i(), p(f, {
1462
1463
  key: 0,
1463
1464
  class: "w-4 h-4 text-muted"
@@ -1465,14 +1466,14 @@ var Lr = d({
1465
1466
  key: 1,
1466
1467
  class: "w-4 h-4 text-muted"
1467
1468
  })),
1468
- T("span", Kr, o(e.name), 1),
1469
- T("span", qr, o(H(e.size)), 1)
1469
+ T("span", Wr, o(e.name), 1),
1470
+ T("span", Gr, o(H(e.size)), 1)
1470
1471
  ])), E((i(), p(w, {
1471
1472
  type: "button",
1472
1473
  severity: "secondary",
1473
1474
  rounded: "",
1474
1475
  class: "cui-assistant-attachment-remove cui-icon-sm absolute -top-1.5 -right-1.5",
1475
- onClick: (t) => K(e.id)
1476
+ onClick: (t) => G(e.id)
1476
1477
  }, {
1477
1478
  icon: v(() => [M(S, { class: "w-3 h-3" })]),
1478
1479
  _: 1
@@ -1517,9 +1518,9 @@ var Lr = d({
1517
1518
  type: "file",
1518
1519
  class: "hidden",
1519
1520
  multiple: "",
1520
- accept: g(zr),
1521
+ accept: g(Lr),
1521
1522
  onChange: W
1522
- }, null, 40, Jr),
1523
+ }, null, 40, Kr),
1523
1524
  g(A) ? E((i(), p(w, {
1524
1525
  key: 0,
1525
1526
  type: "button",
@@ -1528,7 +1529,7 @@ var Lr = d({
1528
1529
  rounded: "",
1529
1530
  class: l(["cui-assistant-voice shrink-0", { "cui-assistant-voice-active": g(F) }]),
1530
1531
  disabled: e.disabled || e.busy,
1531
- onClick: le
1532
+ onClick: ue
1532
1533
  }, {
1533
1534
  icon: v(() => [M(j, { class: "w-4 h-4" })]),
1534
1535
  _: 1
@@ -1538,12 +1539,12 @@ var Lr = d({
1538
1539
  void 0,
1539
1540
  { top: !0 }
1540
1541
  ]]) : m("", !0),
1541
- !g(y) && !e.compact ? (i(), x("span", Yr, [
1542
+ !g(y) && !e.compact ? (i(), x("span", qr, [
1542
1543
  c[3] ||= T("kbd", { class: "cui-assistant-kbd" }, "↵", -1),
1543
1544
  D(" " + o(a.$t("views.assistant.hint_send")) + " · ", 1),
1544
1545
  c[4] ||= T("kbd", { class: "cui-assistant-kbd" }, "⇧↵", -1),
1545
1546
  D(" " + o(a.$t("views.assistant.hint_newline")), 1)
1546
- ])) : (i(), x("span", Xr)),
1547
+ ])) : (i(), x("span", Jr)),
1547
1548
  e.busy ? E((i(), p(w, {
1548
1549
  key: 3,
1549
1550
  type: "button",
@@ -1564,7 +1565,7 @@ var Lr = d({
1564
1565
  type: "button",
1565
1566
  class: "cui-assistant-send shrink-0",
1566
1567
  disabled: e.disabled || !g(P).trim() && !g(I).length,
1567
- onClick: oe
1568
+ onClick: ae
1568
1569
  }, {
1569
1570
  icon: v(() => [M(R, { class: "w-4 h-4" })]),
1570
1571
  _: 1
@@ -1573,45 +1574,45 @@ var Lr = d({
1573
1574
  ]);
1574
1575
  };
1575
1576
  }
1576
- }), [["__scopeId", "data-v-59b0a765"]]), Qr = {
1577
+ }), [["__scopeId", "data-v-1b2f48d6"]]), Xr = {
1577
1578
  viewBox: "0 0 24 24",
1578
1579
  width: "1.2em",
1579
1580
  height: "1.2em"
1580
1581
  };
1581
- function $r(e, t) {
1582
- return i(), x("svg", Qr, [...t[0] ||= [T("path", {
1582
+ function Zr(e, t) {
1583
+ return i(), x("svg", Xr, [...t[0] ||= [T("path", {
1583
1584
  fill: "currentColor",
1584
1585
  d: "M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"
1585
1586
  }, null, -1)]]);
1586
1587
  }
1587
- var ei = d({
1588
+ var Qr = d({
1588
1589
  name: "mdi-tune",
1589
- render: $r
1590
- }), ti = {
1590
+ render: Zr
1591
+ }), $r = {
1591
1592
  id: "pending-answer",
1592
1593
  role: "assistant",
1593
1594
  parts: []
1594
- }, ni = /* @__PURE__ */ function(e) {
1595
+ }, ei = /* @__PURE__ */ function(e) {
1595
1596
  return e.TEXT_MESSAGE_START = "TEXT_MESSAGE_START", e.TEXT_MESSAGE_CONTENT = "TEXT_MESSAGE_CONTENT", e.TEXT_MESSAGE_END = "TEXT_MESSAGE_END", e.TEXT_MESSAGE_CHUNK = "TEXT_MESSAGE_CHUNK", e.TOOL_CALL_START = "TOOL_CALL_START", e.TOOL_CALL_ARGS = "TOOL_CALL_ARGS", e.TOOL_CALL_END = "TOOL_CALL_END", e.TOOL_CALL_CHUNK = "TOOL_CALL_CHUNK", e.TOOL_CALL_RESULT = "TOOL_CALL_RESULT", e.THINKING_START = "THINKING_START", e.THINKING_END = "THINKING_END", e.THINKING_TEXT_MESSAGE_START = "THINKING_TEXT_MESSAGE_START", e.THINKING_TEXT_MESSAGE_CONTENT = "THINKING_TEXT_MESSAGE_CONTENT", e.THINKING_TEXT_MESSAGE_END = "THINKING_TEXT_MESSAGE_END", e.STATE_SNAPSHOT = "STATE_SNAPSHOT", e.STATE_DELTA = "STATE_DELTA", e.MESSAGES_SNAPSHOT = "MESSAGES_SNAPSHOT", e.ACTIVITY_SNAPSHOT = "ACTIVITY_SNAPSHOT", e.ACTIVITY_DELTA = "ACTIVITY_DELTA", e.RAW = "RAW", e.CUSTOM = "CUSTOM", e.RUN_STARTED = "RUN_STARTED", e.RUN_FINISHED = "RUN_FINISHED", e.RUN_ERROR = "RUN_ERROR", e.STEP_STARTED = "STEP_STARTED", e.STEP_FINISHED = "STEP_FINISHED", e.REASONING_START = "REASONING_START", e.REASONING_MESSAGE_START = "REASONING_MESSAGE_START", e.REASONING_MESSAGE_CONTENT = "REASONING_MESSAGE_CONTENT", e.REASONING_MESSAGE_END = "REASONING_MESSAGE_END", e.REASONING_MESSAGE_CHUNK = "REASONING_MESSAGE_CHUNK", e.REASONING_END = "REASONING_END", e.REASONING_ENCRYPTED_VALUE = "REASONING_ENCRYPTED_VALUE", e;
1596
1597
  }({});
1597
1598
  //#endregion
1598
1599
  //#region node_modules/@tanstack/ai/dist/esm/utilities/ag-ui-usage.js
1599
- function ri(e) {
1600
+ function ti(e) {
1600
1601
  return Object.keys(e).length > 0 ? e : void 0;
1601
1602
  }
1602
- function ii(e) {
1603
+ function ni(e) {
1603
1604
  return typeof e == "object" && !!e && !Array.isArray(e) && "promptTokens" in e;
1604
1605
  }
1605
- function ai(e, t) {
1606
- return ii(e) ? e : oi(Array.isArray(e) ? e : void 0, t);
1606
+ function ri(e, t) {
1607
+ return ni(e) ? e : ii(Array.isArray(e) ? e : void 0, t);
1607
1608
  }
1608
- function oi(e, t) {
1609
+ function ii(e, t) {
1609
1610
  let n = e?.[0];
1610
1611
  if (n == null && t == null) return;
1611
- let { promptTokensDetails: r, completionTokensDetails: i, ...a } = t ?? {}, o = ri({
1612
+ let { promptTokensDetails: r, completionTokensDetails: i, ...a } = t ?? {}, o = ti({
1612
1613
  ...n?.cachedInputTokens === void 0 ? {} : { cachedTokens: n.cachedInputTokens },
1613
1614
  ...r
1614
- }), s = ri({
1615
+ }), s = ti({
1615
1616
  ...n?.reasoningTokens === void 0 ? {} : { reasoningTokens: n.reasoningTokens },
1616
1617
  ...i
1617
1618
  });
@@ -1626,28 +1627,28 @@ function oi(e, t) {
1626
1627
  }
1627
1628
  //#endregion
1628
1629
  //#region node_modules/@tanstack/ai/dist/esm/utilities/merge-metadata.js
1629
- function si(e) {
1630
+ function ai(e) {
1630
1631
  return typeof e == "object" && !!e && !Array.isArray(e);
1631
1632
  }
1632
- function ci(e, t) {
1633
+ function oi(e, t) {
1633
1634
  if (t == null) return e;
1634
1635
  if (e == null) return { ...t };
1635
1636
  let n = {
1636
1637
  ...e,
1637
1638
  ...t
1638
1639
  };
1639
- return si(e.tanstack) && si(t.tanstack) && (n.tanstack = {
1640
+ return ai(e.tanstack) && ai(t.tanstack) && (n.tanstack = {
1640
1641
  ...e.tanstack,
1641
1642
  ...t.tanstack
1642
1643
  }), n;
1643
1644
  }
1644
- function J(e) {
1645
+ function X(e) {
1645
1646
  if (e == null) return;
1646
1647
  let t = "metadata" in e ? e.metadata : void 0, n = (typeof t == "object" && t && !Array.isArray(t) ? t : e).tanstack;
1647
1648
  if (typeof n == "object" && n && !Array.isArray(n)) return n;
1648
1649
  }
1649
- function li(e, t) {
1650
- let n = e.metadata, r = J(e) ?? {};
1650
+ function si(e, t) {
1651
+ let n = e.metadata, r = X(e) ?? {};
1651
1652
  return {
1652
1653
  ...e,
1653
1654
  metadata: {
@@ -1661,13 +1662,13 @@ function li(e, t) {
1661
1662
  }
1662
1663
  //#endregion
1663
1664
  //#region node_modules/@tanstack/ai/dist/esm/utilities/errors.js
1664
- function ui(e) {
1665
+ function ci(e) {
1665
1666
  let t = Error(e.message || e.error?.message || "An error occurred"), n = e.code ?? e.error?.code;
1666
1667
  return n !== void 0 && Object.assign(t, { code: n }), e.rawEvent !== void 0 && Object.assign(t, { rawEvent: e.rawEvent }), t;
1667
1668
  }
1668
1669
  //#endregion
1669
1670
  //#region node_modules/@tanstack/ai/dist/esm/interrupt-serialization.js
1670
- var di = new Uint32Array([
1671
+ var li = new Uint32Array([
1671
1672
  1116352408,
1672
1673
  1899447441,
1673
1674
  3049323471,
@@ -1733,10 +1734,10 @@ var di = new Uint32Array([
1733
1734
  3204031479,
1734
1735
  3329325298
1735
1736
  ]);
1736
- function fi(e, t) {
1737
+ function ui(e, t) {
1737
1738
  return e >>> t | e << 32 - t;
1738
1739
  }
1739
- function pi(e) {
1740
+ function di(e) {
1740
1741
  let t = new TextEncoder().encode(e), n = t.length * 8, r = t.length + 1, i = r + (56 - r % 64 + 64) % 64 + 8, a = new Uint8Array(i);
1741
1742
  a.set(t), a[t.length] = 128;
1742
1743
  let o = new DataView(a.buffer);
@@ -1745,12 +1746,12 @@ function pi(e) {
1745
1746
  for (let e = 0; e < i; e += 64) {
1746
1747
  for (let t = 0; t < 16; t++) h[t] = o.getUint32(e + t * 4);
1747
1748
  for (let e = 16; e < 64; e++) {
1748
- let t = h[e - 15] ?? 0, n = h[e - 2] ?? 0, r = fi(t, 7) ^ fi(t, 18) ^ t >>> 3, i = fi(n, 17) ^ fi(n, 19) ^ n >>> 10;
1749
+ let t = h[e - 15] ?? 0, n = h[e - 2] ?? 0, r = ui(t, 7) ^ ui(t, 18) ^ t >>> 3, i = ui(n, 17) ^ ui(n, 19) ^ n >>> 10;
1749
1750
  h[e] = (h[e - 16] ?? 0) + r + (h[e - 7] ?? 0) + i >>> 0;
1750
1751
  }
1751
1752
  let t = s, n = c, r = l, i = u, a = d, g = f, _ = p, v = m;
1752
1753
  for (let e = 0; e < 64; e++) {
1753
- let o = fi(a, 6) ^ fi(a, 11) ^ fi(a, 25), s = a & g ^ ~a & _, c = v + o + s + (di[e] ?? 0) + (h[e] ?? 0) >>> 0, l = (fi(t, 2) ^ fi(t, 13) ^ fi(t, 22)) + (t & n ^ t & r ^ n & r) >>> 0;
1754
+ let o = ui(a, 6) ^ ui(a, 11) ^ ui(a, 25), s = a & g ^ ~a & _, c = v + o + s + (li[e] ?? 0) + (h[e] ?? 0) >>> 0, l = (ui(t, 2) ^ ui(t, 13) ^ ui(t, 22)) + (t & n ^ t & r ^ n & r) >>> 0;
1754
1755
  v = _, _ = g, g = a, a = i + c >>> 0, i = r, r = n, n = t, t = c + l >>> 0;
1755
1756
  }
1756
1757
  s = s + t >>> 0, c = c + n >>> 0, l = l + r >>> 0, u = u + i >>> 0, d = d + a >>> 0, f = f + g >>> 0, p = p + _ >>> 0, m = m + v >>> 0;
@@ -1758,10 +1759,10 @@ function pi(e) {
1758
1759
  let g = (e) => (e >>> 0).toString(16).padStart(8, "0");
1759
1760
  return g(s) + g(c) + g(l) + g(u) + g(d) + g(f) + g(p) + g(m);
1760
1761
  }
1761
- function mi(e) {
1762
- return `sha256:${pi(e)}`;
1762
+ function fi(e) {
1763
+ return `sha256:${di(e)}`;
1763
1764
  }
1764
- function hi(e, t) {
1765
+ function pi(e, t) {
1765
1766
  if (e === null) return "null";
1766
1767
  if (typeof e == "string" || typeof e == "boolean" || typeof e == "number" && Number.isFinite(e)) return JSON.stringify(e);
1767
1768
  if (typeof e != "object") throw TypeError("Interrupt values must be JSON-compatible.");
@@ -1771,74 +1772,74 @@ function hi(e, t) {
1771
1772
  let n;
1772
1773
  if (Array.isArray(e)) {
1773
1774
  let r = [];
1774
- for (let n = 0; n < e.length; n++) r.push(hi(e[n], t));
1775
+ for (let n = 0; n < e.length; n++) r.push(pi(e[n], t));
1775
1776
  n = `[${r.join(",")}]`;
1776
1777
  } else {
1777
1778
  let r = e;
1778
- n = `{${Object.keys(r).sort().map((e) => `${JSON.stringify(e)}:${hi(r[e], t)}`).join(",")}}`;
1779
+ n = `{${Object.keys(r).sort().map((e) => `${JSON.stringify(e)}:${pi(r[e], t)}`).join(",")}}`;
1779
1780
  }
1780
1781
  return t.delete(e), n;
1781
1782
  }
1782
- function gi(e) {
1783
- return hi(e, /* @__PURE__ */ new WeakSet());
1783
+ function mi(e) {
1784
+ return pi(e, /* @__PURE__ */ new WeakSet());
1784
1785
  }
1785
- function _i(e, t = mi) {
1786
+ function hi(e, t = fi) {
1786
1787
  if (typeof e != "string") throw TypeError("Interrupt digests require canonical JSON text.");
1787
1788
  return t(e);
1788
1789
  }
1789
- function vi(e) {
1790
- typeof e == "object" && e && !Object.isFrozen(e) && (Object.values(e).forEach(vi), Object.freeze(e));
1790
+ function gi(e) {
1791
+ typeof e == "object" && e && !Object.isFrozen(e) && (Object.values(e).forEach(gi), Object.freeze(e));
1791
1792
  }
1792
- function Y(e) {
1793
- let t = JSON.parse(gi(e));
1794
- return vi(t), t;
1793
+ function Z(e) {
1794
+ let t = JSON.parse(mi(e));
1795
+ return gi(t), t;
1795
1796
  }
1796
1797
  //#endregion
1797
1798
  //#region node_modules/@tanstack/ai/dist/esm/interrupts.js
1798
- function yi(e) {
1799
- let t = Y([...e].sort((e, t) => e.interruptId.localeCompare(t.interruptId))), n = gi(t);
1799
+ function _i(e) {
1800
+ let t = Z([...e].sort((e, t) => e.interruptId.localeCompare(t.interruptId))), n = mi(t);
1800
1801
  return Object.freeze({
1801
1802
  resolutions: t,
1802
1803
  canonicalResolutions: n,
1803
- fingerprint: _i(n)
1804
+ fingerprint: hi(n)
1804
1805
  });
1805
1806
  }
1806
1807
  //#endregion
1807
1808
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/tools/schema-converter.js
1808
- function bi(e) {
1809
+ function vi(e) {
1809
1810
  let t = {};
1810
1811
  for (let [n, r] of Object.entries(e)) n !== "$schema" && (t[n] = r);
1811
1812
  return t;
1812
1813
  }
1813
- function xi(e) {
1814
+ function yi(e) {
1814
1815
  return (typeof e == "object" || typeof e == "function") && e !== null;
1815
1816
  }
1816
- function Si(e) {
1817
- if (!xi(e) || !("~standard" in e)) return !1;
1817
+ function bi(e) {
1818
+ if (!yi(e) || !("~standard" in e)) return !1;
1818
1819
  let t = e["~standard"];
1819
1820
  return typeof t != "object" || !t || !("version" in t) || t.version !== 1 || !("jsonSchema" in t) || typeof t.jsonSchema != "object" || t.jsonSchema === null || !("input" in t.jsonSchema) ? !1 : typeof t.jsonSchema.input == "function";
1820
1821
  }
1821
- function Ci(e) {
1822
- return xi(e) && "~standard" in e && typeof e["~standard"] == "object" && e["~standard"] !== null && "version" in e["~standard"] && e["~standard"].version === 1 && "validate" in e["~standard"] && typeof e["~standard"].validate == "function";
1822
+ function xi(e) {
1823
+ return yi(e) && "~standard" in e && typeof e["~standard"] == "object" && e["~standard"] !== null && "version" in e["~standard"] && e["~standard"].version === 1 && "validate" in e["~standard"] && typeof e["~standard"].validate == "function";
1823
1824
  }
1824
- function wi(e) {
1825
+ function Si(e) {
1825
1826
  return Object.keys(e).length > 0 ? e : void 0;
1826
1827
  }
1827
- function Ti(e) {
1828
+ function Ci(e) {
1828
1829
  if (Array.isArray(e)) {
1829
- let t = e.map((e) => Ei(e, e.required || [])), n = t.map((e) => e.nullWidening ?? {});
1830
+ let t = e.map((e) => wi(e, e.required || [])), n = t.map((e) => e.nullWidening ?? {});
1830
1831
  return {
1831
1832
  schema: t.map((e) => e.schema),
1832
1833
  itemMap: n.some((e) => Object.keys(e).length > 0) ? n : void 0
1833
1834
  };
1834
1835
  }
1835
- let t = Ei(e, e.required || []);
1836
+ let t = wi(e, e.required || []);
1836
1837
  return {
1837
1838
  schema: t.schema,
1838
1839
  itemMap: t.nullWidening
1839
1840
  };
1840
1841
  }
1841
- function Ei(e, t = []) {
1842
+ function wi(e, t = []) {
1842
1843
  let n = { ...e }, r = {};
1843
1844
  if (n.type === "object" && n.properties) {
1844
1845
  let e = { ...n.properties }, i = Object.keys(e), a = {};
@@ -1847,13 +1848,13 @@ function Ei(e, t = []) {
1847
1848
  if (!r) continue;
1848
1849
  let i = !t.includes(n), o = !1, s;
1849
1850
  if (r.type === "object" && r.properties) {
1850
- let t = Ei(r, r.required || []);
1851
+ let t = wi(r, r.required || []);
1851
1852
  e[n] = i ? {
1852
1853
  ...t.schema,
1853
1854
  type: ["object", "null"]
1854
1855
  } : t.schema, o = i, s = t.nullWidening;
1855
1856
  } else if (r.type === "array" && r.items) {
1856
- let t = Ti(r.items);
1857
+ let t = Ci(r.items);
1857
1858
  e[n] = {
1858
1859
  ...r,
1859
1860
  items: t.schema,
@@ -1874,46 +1875,46 @@ function Ei(e, t = []) {
1874
1875
  n.properties = e, n.required = i, n.additionalProperties = !1, Object.keys(a).length > 0 && (r.properties = a);
1875
1876
  }
1876
1877
  if (n.type === "array" && n.items) {
1877
- let e = Ti(n.items);
1878
+ let e = Ci(n.items);
1878
1879
  n.items = e.schema, e.itemMap && (r.items = e.itemMap);
1879
1880
  }
1880
1881
  return {
1881
1882
  schema: n,
1882
- nullWidening: wi(r)
1883
+ nullWidening: Si(r)
1883
1884
  };
1884
1885
  }
1885
- function Di(e) {
1886
- if (Si(e)) {
1887
- let t = bi(e["~standard"].jsonSchema.input({ target: "draft-07" }));
1886
+ function Ti(e) {
1887
+ if (bi(e)) {
1888
+ let t = vi(e["~standard"].jsonSchema.input({ target: "draft-07" }));
1888
1889
  return "properties" in t && !t.type && (t.type = "object"), t.type === "object" && !("properties" in t) && (t.properties = {}), t.type === "object" && !("required" in t) && (t.required = []), t;
1889
1890
  }
1890
- if (Ci(e)) throw Error("Schema is a Standard Schema validator but does not expose a JSON Schema converter on `~standard.jsonSchema`. Use Zod v4.2+, ArkType v2.1.28+, or wrap a Valibot schema with `toStandardJsonSchema()` from `@valibot/to-json-schema` before passing it as `outputSchema`.");
1891
- return typeof e == "object" ? bi(e) : e;
1891
+ if (xi(e)) throw Error("Schema is a Standard Schema validator but does not expose a JSON Schema converter on `~standard.jsonSchema`. Use Zod v4.2+, ArkType v2.1.28+, or wrap a Valibot schema with `toStandardJsonSchema()` from `@valibot/to-json-schema` before passing it as `outputSchema`.");
1892
+ return typeof e == "object" ? vi(e) : e;
1892
1893
  }
1893
- function Oi(e, t = {}) {
1894
+ function Ei(e, t = {}) {
1894
1895
  if (!e) return;
1895
1896
  let { forStructuredOutput: n = !1 } = t;
1896
- if (!n && !Si(e) && !Ci(e)) return e;
1897
- let r = Di(e);
1898
- return !r || typeof r != "object" || !n ? r : Ei(r, r.required || []).schema;
1897
+ if (!n && !bi(e) && !xi(e)) return e;
1898
+ let r = Ti(e);
1899
+ return !r || typeof r != "object" || !n ? r : wi(r, r.required || []).schema;
1899
1900
  }
1900
- var ki = class extends Error {
1901
+ var Di = class extends Error {
1901
1902
  name = "StandardSchemaValidationError";
1902
1903
  issues;
1903
1904
  constructor(e) {
1904
1905
  super(`Validation failed: ${e.map((e) => e.message || "Validation failed").join(", ")}`), this.issues = e;
1905
1906
  }
1906
1907
  };
1907
- function Ai(e, t) {
1908
- if (!Ci(e)) return t;
1908
+ function Oi(e, t) {
1909
+ if (!xi(e)) return t;
1909
1910
  let n = e["~standard"].validate(t);
1910
1911
  if (n instanceof Promise) throw Error("Schema validation returned a Promise. Use validateWithStandardSchema for async validation.");
1911
1912
  if (!n.issues) return n.value;
1912
- throw new ki(n.issues);
1913
+ throw new Di(n.issues);
1913
1914
  }
1914
1915
  //#endregion
1915
1916
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/tools/approval-schema.js
1916
- var ji = /* @__PURE__ */ new Set([
1917
+ var ki = /* @__PURE__ */ new Set([
1917
1918
  "$schema",
1918
1919
  "$id",
1919
1920
  "$ref",
@@ -1935,41 +1936,41 @@ var ji = /* @__PURE__ */ new Set([
1935
1936
  "maxLength",
1936
1937
  "pattern"
1937
1938
  ]);
1938
- function Mi(e) {
1939
+ function Ai(e) {
1939
1940
  return typeof e == "object" && !!e && !Array.isArray(e) && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null);
1940
1941
  }
1941
- function Ni(e) {
1942
- return Mi(e) && Object.keys(e).some((e) => ji.has(e));
1942
+ function ji(e) {
1943
+ return Ai(e) && Object.keys(e).some((e) => ki.has(e));
1943
1944
  }
1944
- function Pi(e) {
1945
- return Ci(e) || Si(e) || Ni(e);
1945
+ function Mi(e) {
1946
+ return xi(e) || bi(e) || ji(e);
1946
1947
  }
1947
- function Fi(e) {
1948
- if (!Mi(e)) return !1;
1948
+ function Ni(e) {
1949
+ if (!Ai(e)) return !1;
1949
1950
  let t = Object.keys(e);
1950
- return t.length > 0 && t.every((e) => e === "approve" || e === "reject") && t.every((t) => Pi(e[t]));
1951
+ return t.length > 0 && t.every((e) => e === "approve" || e === "reject") && t.every((t) => Mi(e[t]));
1951
1952
  }
1952
- function Ii(e) {
1953
+ function Pi(e) {
1953
1954
  let t = {};
1954
1955
  for (let [n, r] of Object.entries(e)) t[n] = r;
1955
1956
  return t;
1956
1957
  }
1957
- function Li(e) {
1958
- if (Ci(e)) {
1959
- let t = Si(e) ? Ii(e["~standard"].jsonSchema.input({ target: "draft-2020-12" })) : void 0;
1958
+ function Fi(e) {
1959
+ if (xi(e)) {
1960
+ let t = bi(e) ? Pi(e["~standard"].jsonSchema.input({ target: "draft-2020-12" })) : void 0;
1960
1961
  return {
1961
1962
  source: e,
1962
1963
  validator: e,
1963
1964
  ...t !== void 0 && { jsonSchema: t }
1964
1965
  };
1965
1966
  }
1966
- if (Ni(e)) return {
1967
+ if (ji(e)) return {
1967
1968
  source: e,
1968
1969
  jsonSchema: e
1969
1970
  };
1970
1971
  throw TypeError("Expected a supported SchemaInput.");
1971
1972
  }
1972
- function Ri(e) {
1973
+ function Ii(e) {
1973
1974
  let t = { approved: { const: e.approved } }, n = ["approved"];
1974
1975
  return e.approved && e.inputSchema && (t.editedArgs = e.inputSchema.jsonSchema ?? {}), e.payload && (t.payload = e.payload.jsonSchema ?? {}, n.push("payload")), {
1975
1976
  type: "object",
@@ -1978,22 +1979,22 @@ function Ri(e) {
1978
1979
  additionalProperties: !1
1979
1980
  };
1980
1981
  }
1981
- function zi(e, t) {
1982
- let n = t === void 0 ? null : Li(t), r = null, i = null;
1982
+ function Li(e, t) {
1983
+ let n = t === void 0 ? null : Fi(t), r = null, i = null;
1983
1984
  if (e !== void 0) {
1984
- if (Ci(e) || Ni(e)) r = Li(e), i = r;
1985
- else if (Fi(e)) r = e.approve === void 0 ? null : Li(e.approve), i = e.reject === void 0 ? null : Li(e.reject);
1985
+ if (xi(e) || ji(e)) r = Fi(e), i = r;
1986
+ else if (Ni(e)) r = e.approve === void 0 ? null : Fi(e.approve), i = e.reject === void 0 ? null : Fi(e.reject);
1986
1987
  else throw TypeError("approvalSchema must be a SchemaInput or a nonempty map containing approve or reject.");
1987
1988
  }
1988
- let a = { oneOf: [Ri({
1989
+ let a = { oneOf: [Ii({
1989
1990
  approved: !0,
1990
1991
  payload: r,
1991
1992
  inputSchema: n
1992
- }), Ri({
1993
+ }), Ii({
1993
1994
  approved: !1,
1994
1995
  payload: i,
1995
1996
  inputSchema: null
1996
- })] }, o = gi(a), s = gi({
1997
+ })] }, o = mi(a), s = mi({
1997
1998
  approve: r?.jsonSchema ?? null,
1998
1999
  reject: i?.jsonSchema ?? null
1999
2000
  });
@@ -2003,33 +2004,33 @@ function zi(e, t) {
2003
2004
  reject: i
2004
2005
  },
2005
2006
  responseSchema: a,
2006
- responseSchemaHash: _i(o),
2007
- approvalSchemaHash: _i(s)
2007
+ responseSchemaHash: hi(o),
2008
+ approvalSchemaHash: hi(s)
2008
2009
  };
2009
2010
  }
2010
- function Bi(e) {
2011
- return _i(e === void 0 ? "undefined" : gi(Li(e).jsonSchema ?? { standardValidator: "unserialized" }));
2011
+ function Ri(e) {
2012
+ return hi(e === void 0 ? "undefined" : mi(Fi(e).jsonSchema ?? { standardValidator: "unserialized" }));
2012
2013
  }
2013
2014
  //#endregion
2014
2015
  //#region node_modules/@tanstack/ai/dist/esm/interrupt-resume.js
2015
- var Vi = "tanstack:interruptBinding", Hi = Vi;
2016
- function Ui(e) {
2016
+ var zi = "tanstack:interruptBinding", Bi = zi;
2017
+ function Vi(e) {
2017
2018
  return e && typeof e == "object" ? e : null;
2018
2019
  }
2019
- function X(e, t) {
2020
+ function Q(e, t) {
2020
2021
  return typeof e[t] == "string" ? e[t] : void 0;
2021
2022
  }
2022
- function Wi(e) {
2023
+ function Hi(e) {
2023
2024
  let t = e.v;
2024
2025
  return t === void 0 || t === 1;
2025
2026
  }
2026
- function Gi(e) {
2027
- let t = Ui(e.metadata), n = t ? Ui(t[Hi]) : null;
2028
- if (!n || X(n, "interruptId") !== e.id || !Wi(n)) return;
2029
- let r = X(n, "kind"), i = X(n, "interruptId"), a = X(n, "responseSchemaHash"), o = X(n, "expiresAt");
2027
+ function Ui(e) {
2028
+ let t = Vi(e.metadata), n = t ? Vi(t[Bi]) : null;
2029
+ if (!n || Q(n, "interruptId") !== e.id || !Hi(n)) return;
2030
+ let r = Q(n, "kind"), i = Q(n, "interruptId"), a = Q(n, "responseSchemaHash"), o = Q(n, "expiresAt");
2030
2031
  if (!i || a === "" || o !== void 0 && !Number.isFinite(Date.parse(o))) return;
2031
2032
  if (r === "generic") {
2032
- let e = X(n, "definitionId"), t = X(n, "key"), s = n.batchIndex, c = X(n, "payloadSchemaHash");
2033
+ let e = Q(n, "definitionId"), t = Q(n, "key"), s = n.batchIndex, c = Q(n, "payloadSchemaHash");
2033
2034
  return (e !== void 0 || t !== void 0 || s !== void 0 || c !== void 0) && (!e || !t || typeof s != "number" || !Number.isInteger(s) || s < 0) ? void 0 : {
2034
2035
  v: 1,
2035
2036
  kind: r,
@@ -2043,10 +2044,10 @@ function Gi(e) {
2043
2044
  };
2044
2045
  }
2045
2046
  if (!a) return;
2046
- let s = X(n, "toolName"), c = X(n, "toolCallId");
2047
+ let s = Q(n, "toolName"), c = Q(n, "toolCallId");
2047
2048
  if (s && c) {
2048
2049
  if (r === "client-tool-execution") {
2049
- let e = X(n, "outputSchemaHash");
2050
+ let e = Q(n, "outputSchemaHash");
2050
2051
  return e ? {
2051
2052
  v: 1,
2052
2053
  kind: r,
@@ -2059,7 +2060,7 @@ function Gi(e) {
2059
2060
  } : void 0;
2060
2061
  }
2061
2062
  if (r === "tool-approval") {
2062
- let e = X(n, "inputSchemaHash"), t = X(n, "approvalSchemaHash");
2063
+ let e = Q(n, "inputSchemaHash"), t = Q(n, "approvalSchemaHash");
2063
2064
  return !e || !t ? void 0 : {
2064
2065
  v: 1,
2065
2066
  kind: r,
@@ -2075,12 +2076,12 @@ function Gi(e) {
2075
2076
  }
2076
2077
  }
2077
2078
  }
2078
- function Ki(e) {
2079
- let t = Gi(e);
2079
+ function Wi(e) {
2080
+ let t = Ui(e);
2080
2081
  if (!t) return;
2081
- let n = Ui(e.metadata), r = n ? Ui(n[Hi]) : null;
2082
+ let n = Vi(e.metadata), r = n ? Vi(n[Bi]) : null;
2082
2083
  if (!r) return;
2083
- let i = X(r, "interruptedRunId"), a = r.generation;
2084
+ let i = Q(r, "interruptedRunId"), a = r.generation;
2084
2085
  if (!(!i || typeof a != "number" || !Number.isInteger(a) || a < 0)) return {
2085
2086
  ...t,
2086
2087
  interruptedRunId: i,
@@ -2089,9 +2090,9 @@ function Ki(e) {
2089
2090
  }
2090
2091
  //#endregion
2091
2092
  //#region node_modules/@tanstack/ai/dist/esm/interrupt-definition.js
2092
- var qi = "tanstack:interruptPayload";
2093
- function Ji(e, t) {
2094
- if (!Si(e)) throw TypeError(`${t} must be a Standard Schema with a JSON Schema converter.`);
2093
+ var Gi = "tanstack:interruptPayload";
2094
+ function Ki(e, t) {
2095
+ if (!bi(e)) throw TypeError(`${t} must be a Standard Schema with a JSON Schema converter.`);
2095
2096
  try {
2096
2097
  let t = e["~standard"].jsonSchema.input({ target: "draft-07" });
2097
2098
  if (t === void 0) throw TypeError("The exported schema is undefined.");
@@ -2101,28 +2102,28 @@ function Ji(e, t) {
2101
2102
  for (let [e, r] of Object.entries(t)) e !== "$schema" && (n[e] = r);
2102
2103
  return {
2103
2104
  json: n,
2104
- canonicalJson: gi(n)
2105
+ canonicalJson: mi(n)
2105
2106
  };
2106
2107
  } catch (e) {
2107
2108
  throw TypeError(`${t} could not export compatible JSON Schema: ${e instanceof Error ? e.message : String(e)}`);
2108
2109
  }
2109
2110
  }
2110
- function Yi(e) {
2111
- return _i(Ji(e, "Interrupt schema").canonicalJson);
2111
+ function qi(e) {
2112
+ return hi(Ki(e, "Interrupt schema").canonicalJson);
2112
2113
  }
2113
2114
  //#endregion
2114
2115
  //#region node_modules/@tanstack/ai/dist/esm/generic-interrupt-continuation.js
2115
- var Xi = "tanstack:interruptContinuation";
2116
- function Zi(e) {
2116
+ var Ji = "tanstack:interruptContinuation";
2117
+ function Yi(e) {
2117
2118
  return typeof e == "object" && !!e && !Array.isArray(e);
2118
2119
  }
2119
- function Qi(e) {
2120
- return { [Xi]: e };
2120
+ function Xi(e) {
2121
+ return { [Ji]: e };
2121
2122
  }
2122
- function $i(e) {
2123
- let t = Gi(e);
2123
+ function Zi(e) {
2124
+ let t = Ui(e);
2124
2125
  if (t?.kind !== "generic" || t.definitionId === void 0 || t.key === void 0 || t.batchIndex === void 0) return;
2125
- let n = Zi(e.metadata) ? e.metadata : void 0, r = n !== void 0 && Object.prototype.hasOwnProperty.call(n, "tanstack:interruptPayload");
2126
+ let n = Yi(e.metadata) ? e.metadata : void 0, r = n !== void 0 && Object.prototype.hasOwnProperty.call(n, "tanstack:interruptPayload");
2126
2127
  return {
2127
2128
  v: 1,
2128
2129
  definitionId: t.definitionId,
@@ -2133,178 +2134,178 @@ function $i(e) {
2133
2134
  ...e.expiresAt === void 0 ? {} : { expiresAt: e.expiresAt },
2134
2135
  ...t.responseSchemaHash === void 0 ? {} : { responseSchemaHash: t.responseSchemaHash },
2135
2136
  ...t.payloadSchemaHash === void 0 ? {} : { payloadSchemaHash: t.payloadSchemaHash },
2136
- ...r ? { payload: n[qi] } : {}
2137
+ ...r ? { payload: n[Gi] } : {}
2137
2138
  };
2138
2139
  }
2139
2140
  //#endregion
2140
2141
  //#region node_modules/@tanstack/ai/dist/esm/utilities/tool-result.js
2141
- var ea = /* @__PURE__ */ new Set([
2142
+ var Qi = /* @__PURE__ */ new Set([
2142
2143
  "text",
2143
2144
  "image",
2144
2145
  "audio",
2145
2146
  "video",
2146
2147
  "document"
2147
2148
  ]);
2148
- function ta(e) {
2149
+ function $i(e) {
2149
2150
  if (typeof e != "object" || !e) return !1;
2150
2151
  let t = e;
2151
- if (typeof t.type != "string" || !ea.has(t.type)) return !1;
2152
+ if (typeof t.type != "string" || !Qi.has(t.type)) return !1;
2152
2153
  if (t.type === "text") return typeof t.content == "string";
2153
2154
  let n = t.source;
2154
2155
  if (typeof n != "object" || !n) return !1;
2155
2156
  let r = n;
2156
2157
  return typeof r.value == "string" ? r.type === "data" ? typeof r.mimeType == "string" : r.type === "url" : !1;
2157
2158
  }
2158
- function na(e) {
2159
- return Array.isArray(e) && e.length > 0 && e.every(ta);
2159
+ function ea(e) {
2160
+ return Array.isArray(e) && e.length > 0 && e.every($i);
2160
2161
  }
2161
- function ra(e) {
2162
- return typeof e == "string" || na(e) ? e : JSON.stringify(e);
2162
+ function ta(e) {
2163
+ return typeof e == "string" || ea(e) ? e : JSON.stringify(e);
2163
2164
  }
2164
2165
  //#endregion
2165
2166
  //#region node_modules/@tanstack/ai/dist/esm/utilities/provider-executed.js
2166
- function ia(e) {
2167
+ function na(e) {
2167
2168
  let t = e?.metadata;
2168
2169
  return typeof t == "object" && t && t.providerExecuted === !0 ? t : null;
2169
2170
  }
2170
- function aa(e) {
2171
- return ia(e) !== null;
2171
+ function ra(e) {
2172
+ return na(e) !== null;
2172
2173
  }
2173
2174
  //#endregion
2174
2175
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/messages.js
2175
- function oa(e) {
2176
+ function ia(e) {
2176
2177
  return typeof e == "object" && !!e && !Array.isArray(e);
2177
2178
  }
2178
- function sa(e) {
2179
+ function aa(e) {
2179
2180
  return e.type === "text" || e.type === "image" || e.type === "audio" || e.type === "video" || e.type === "document";
2180
2181
  }
2181
- function ca(e) {
2182
+ function oa(e) {
2182
2183
  try {
2183
2184
  return JSON.stringify(e) ?? "";
2184
2185
  } catch {
2185
2186
  return "";
2186
2187
  }
2187
2188
  }
2188
- function la(e) {
2189
+ function sa(e) {
2189
2190
  return typeof e == "string" && e !== "" ? e : void 0;
2190
2191
  }
2191
- function ua(e) {
2192
+ function ca(e) {
2192
2193
  if ("encryptedValue" in e) {
2193
- let t = la(e.encryptedValue);
2194
+ let t = sa(e.encryptedValue);
2194
2195
  if (t !== void 0) return t;
2195
2196
  }
2196
- return la(J(e)?.signature);
2197
+ return sa(X(e)?.signature);
2197
2198
  }
2198
- function da(e) {
2199
+ function la(e) {
2199
2200
  return e.length === 0 ? null : e.every((e) => e.type === "text") ? e.map((e) => e.content).join("") || null : e;
2200
2201
  }
2201
- function fa(e) {
2202
+ function ua(e) {
2202
2203
  return e == null ? "" : typeof e == "string" ? e : e.filter((e) => e.type === "text").map((e) => e.content).join("");
2203
2204
  }
2204
- function pa(e) {
2205
- return Array.isArray(e) ? e : fa(e);
2205
+ function da(e) {
2206
+ return Array.isArray(e) ? e : ua(e);
2206
2207
  }
2207
- function ma(e) {
2208
+ function fa(e) {
2208
2209
  if (!("role" in e) || e.role !== "tool") return e;
2209
- let t = e, n = J(t)?.toolResult;
2210
- if (!oa(n) || "content" in n && !na(n.content)) return e;
2210
+ let t = e, n = X(t)?.toolResult;
2211
+ if (!ia(n) || "content" in n && !ea(n.content)) return e;
2211
2212
  let r = { ...e };
2212
2213
  if ("id" in n || Reflect.deleteProperty(r, "id"), "createdAt" in n || Reflect.deleteProperty(r, "createdAt"), typeof n.id == "string" && Reflect.set(r, "id", n.id), typeof n.createdAt == "string") {
2213
- let e = Z(n.createdAt);
2214
+ let e = pa(n.createdAt);
2214
2215
  e && Reflect.set(r, "createdAt", e);
2215
2216
  }
2216
- na(n.content) && Reflect.set(r, "content", n.content);
2217
+ ea(n.content) && Reflect.set(r, "content", n.content);
2217
2218
  let i = Reflect.get(t, "metadata");
2218
- if (oa(i)) {
2219
+ if (ia(i)) {
2219
2220
  let e = i.tanstack;
2220
- if (oa(e)) {
2221
+ if (ia(e)) {
2221
2222
  let { toolResult: t, ...n } = e, a = { ...i };
2222
2223
  Object.keys(n).length ? a.tanstack = n : delete a.tanstack, Object.keys(a).length ? Reflect.set(r, "metadata", a) : Reflect.deleteProperty(r, "metadata");
2223
2224
  }
2224
2225
  }
2225
2226
  return r;
2226
2227
  }
2227
- function Z(e) {
2228
+ function pa(e) {
2228
2229
  if (e instanceof Date) return Number.isNaN(e.getTime()) ? void 0 : e;
2229
2230
  if (typeof e != "string") return;
2230
2231
  let t = new Date(e);
2231
2232
  return Number.isNaN(t.getTime()) ? void 0 : t;
2232
2233
  }
2233
- function ha(e) {
2234
+ function ma(e) {
2234
2235
  if (e.type !== "tool-result") return e;
2235
- let t = Z(e.createdAt), { createdAt: n, ...r } = e;
2236
+ let t = pa(e.createdAt), { createdAt: n, ...r } = e;
2236
2237
  return t === void 0 ? r : {
2237
2238
  ...r,
2238
2239
  createdAt: t
2239
2240
  };
2240
2241
  }
2241
- function ga(e) {
2242
- return Z(J(e)?.createdAt);
2242
+ function ha(e) {
2243
+ return pa(X(e)?.createdAt);
2243
2244
  }
2244
- function _a(e) {
2245
- let t = Z(e.createdAt);
2245
+ function ga(e) {
2246
+ let t = pa(e.createdAt);
2246
2247
  return t === void 0 ? {} : { createdAt: t };
2247
2248
  }
2248
- function va(e) {
2249
+ function _a(e) {
2249
2250
  return e.name === void 0 ? {} : { name: e.name };
2250
2251
  }
2251
- function ya(e) {
2252
+ function va(e) {
2252
2253
  if (typeof e != "object" || !e || Array.isArray(e) || !("type" in e) || e.type !== "ui-resource" || !("toolCallId" in e) || typeof e.toolCallId != "string" || !("toolName" in e) || typeof e.toolName != "string" || !("resource" in e) || e.resource == null || typeof e.resource != "object" || Array.isArray(e.resource)) return !1;
2253
2254
  let t = e.resource;
2254
2255
  return "uri" in t && typeof t.uri == "string" && "mimeType" in t && typeof t.mimeType == "string";
2255
2256
  }
2256
- function ba(e) {
2257
+ function ya(e) {
2257
2258
  return `${e.toolCallId}\0${e.toolName}\0${e.resource.uri}`;
2258
2259
  }
2259
- function xa(e, t) {
2260
+ function ba(e, t) {
2260
2261
  if (t.length === 0) return e;
2261
- let n = new Set(e.parts.filter(ya).map((e) => ba(e))), r = t.filter((e) => !n.has(ba(e)));
2262
+ let n = new Set(e.parts.filter(va).map((e) => ya(e))), r = t.filter((e) => !n.has(ya(e)));
2262
2263
  return r.length === 0 ? e : {
2263
2264
  ...e,
2264
2265
  parts: [...e.parts, ...r]
2265
2266
  };
2266
2267
  }
2267
- function Sa(e) {
2268
- let t = e.parts.filter(ya), n = e.metadata ?? {}, r = J(e), i = {};
2268
+ function xa(e) {
2269
+ let t = e.parts.filter(va), n = e.metadata ?? {}, r = X(e), i = {};
2269
2270
  r?.model !== void 0 && (i.model = r.model), r?.signature !== void 0 && (i.signature = r.signature), t.length > 0 && (i.uiResources = t);
2270
2271
  let a = { ...n };
2271
2272
  return Object.keys(i).length > 0 ? a.tanstack = i : delete a.tanstack, Object.keys(a).length > 0 ? a : void 0;
2272
2273
  }
2273
- function Ca(e) {
2274
- return e.role === "system" ? [] : e.role === "assistant" ? Da(e) : [wa(e)];
2274
+ function Sa(e) {
2275
+ return e.role === "system" ? [] : e.role === "assistant" ? Ea(e) : [Ca(e)];
2275
2276
  }
2276
- function wa(e) {
2277
+ function Ca(e) {
2277
2278
  let t = [];
2278
- for (let n of e.parts) sa(n) && t.push(n);
2279
+ for (let n of e.parts) aa(n) && t.push(n);
2279
2280
  return {
2280
2281
  id: e.id,
2281
2282
  role: e.role,
2282
- content: da(t),
2283
- ...va(e),
2283
+ content: la(t),
2284
2284
  ..._a(e),
2285
+ ...ga(e),
2285
2286
  ...e.metadata !== void 0 && { metadata: e.metadata }
2286
2287
  };
2287
2288
  }
2288
- function Ta() {
2289
+ function wa() {
2289
2290
  return {
2290
2291
  contentParts: [],
2291
2292
  toolCalls: []
2292
2293
  };
2293
2294
  }
2294
- function Ea(e) {
2295
+ function Ta(e) {
2295
2296
  return e.state === "input-complete" || e.state === "complete" || e.state === "approval-requested" || e.state === "approval-responded" || e.state === "error" || e.output !== void 0;
2296
2297
  }
2297
- function Da(e) {
2298
- let t = [], n = Ta(), r = [], i = /* @__PURE__ */ new Set(), a = {
2298
+ function Ea(e) {
2299
+ let t = [], n = wa(), r = [], i = /* @__PURE__ */ new Set(), a = {
2299
2300
  id: e.id,
2300
- ...va(e),
2301
- ..._a(e)
2302
- }, o = Sa(e), s = {
2301
+ ..._a(e),
2302
+ ...ga(e)
2303
+ }, o = xa(e), s = {
2303
2304
  ...a,
2304
2305
  ...o !== void 0 && { metadata: o }
2305
2306
  };
2306
2307
  function c(e = !1) {
2307
- let i = da(n.contentParts), a = i !== null, o = n.toolCalls.length > 0, c = r.length > 0;
2308
+ let i = la(n.contentParts), a = i !== null, o = n.toolCalls.length > 0, c = r.length > 0;
2308
2309
  (e || a || o || c) && (t.push({
2309
2310
  ...s,
2310
2311
  role: "assistant",
@@ -2312,7 +2313,7 @@ function Da(e) {
2312
2313
  ...o && { toolCalls: n.toolCalls },
2313
2314
  ...c && { thinking: r },
2314
2315
  ...n.structuredOutput && { structuredOutput: n.structuredOutput }
2315
- }), r = []), n = Ta();
2316
+ }), r = []), n = wa();
2316
2317
  }
2317
2318
  for (let a of e.parts) switch (a.type) {
2318
2319
  case "text":
@@ -2323,7 +2324,7 @@ function Da(e) {
2323
2324
  n.contentParts.push(a);
2324
2325
  break;
2325
2326
  case "tool-call":
2326
- Ea(a) && n.toolCalls.push({
2327
+ Ta(a) && n.toolCalls.push({
2327
2328
  id: a.id,
2328
2329
  type: "function",
2329
2330
  function: {
@@ -2336,7 +2337,7 @@ function Da(e) {
2336
2337
  case "tool-result":
2337
2338
  c(t.length === 0), (a.state === "complete" || a.state === "error") && !i.has(a.toolCallId) && (t.push({
2338
2339
  ...a.id !== void 0 && { id: a.id },
2339
- ..._a(a),
2340
+ ...ga(a),
2340
2341
  role: "tool",
2341
2342
  content: a.content,
2342
2343
  toolCallId: a.toolCallId,
@@ -2346,13 +2347,13 @@ function Da(e) {
2346
2347
  }), i.add(a.toolCallId));
2347
2348
  break;
2348
2349
  case "thinking":
2349
- (a.content || a.signature) && (n.toolCalls.some(aa) && c(), r.push({
2350
+ (a.content || a.signature) && (n.toolCalls.some(ra) && c(), r.push({
2350
2351
  content: a.content,
2351
2352
  ...a.signature && { signature: a.signature }
2352
2353
  }));
2353
2354
  break;
2354
2355
  case "structured-output": if (a.status === "complete") {
2355
- let e = a.raw === "" ? a.data === void 0 ? "" : ca(a.data) : a.raw;
2356
+ let e = a.raw === "" ? a.data === void 0 ? "" : oa(a.data) : a.raw;
2356
2357
  e !== "" && (n.contentParts.push({
2357
2358
  type: "text",
2358
2359
  content: e
@@ -2362,7 +2363,7 @@ function Da(e) {
2362
2363
  c();
2363
2364
  for (let n of e.parts) if (n.type === "tool-call" && (n.output !== void 0 && !i.has(n.id) && (t.push({
2364
2365
  role: "tool",
2365
- content: ra(n.output),
2366
+ content: ta(n.output),
2366
2367
  toolCallId: n.id
2367
2368
  }), i.add(n.id)), n.output === void 0 && n.state === "approval-responded" && n.approval?.approved !== void 0 && !i.has(n.id))) {
2368
2369
  let e = n.approval.approved;
@@ -2382,14 +2383,14 @@ function Da(e) {
2382
2383
  content: null
2383
2384
  }), t;
2384
2385
  }
2385
- function Oa(e, t) {
2386
- let n = [], r = Z(e.createdAt);
2386
+ function Da(e, t) {
2387
+ let n = [], r = pa(e.createdAt);
2387
2388
  if (e.role === "assistant" && e.thinking?.length) for (let t of e.thinking) (t.content || t.signature) && n.push({
2388
2389
  type: "thinking",
2389
2390
  content: t.content,
2390
2391
  ...t.signature && { signature: t.signature }
2391
2392
  });
2392
- let i = e.structuredOutput ?? ja(J(e)?.structuredOutput);
2393
+ let i = e.structuredOutput ?? Aa(X(e)?.structuredOutput);
2393
2394
  if (e.role === "assistant" && i) {
2394
2395
  if (typeof e.content == "string" && e.content && e.content !== i.raw) {
2395
2396
  let t = i.raw, r = t !== "" && e.content.endsWith(t) ? e.content.slice(0, -t.length) : e.content;
@@ -2402,7 +2403,7 @@ function Oa(e, t) {
2402
2403
  } else if (e.role === "tool" && e.toolCallId) n.push({
2403
2404
  type: "tool-result",
2404
2405
  toolCallId: e.toolCallId,
2405
- content: pa(e.content),
2406
+ content: da(e.content),
2406
2407
  state: e.error === void 0 ? "complete" : "error",
2407
2408
  ...e.id !== void 0 && { id: e.id },
2408
2409
  ...e.name !== void 0 && { name: e.name },
@@ -2412,7 +2413,7 @@ function Oa(e, t) {
2412
2413
  });
2413
2414
  else if (Array.isArray(e.content)) for (let t of e.content) n.push(t);
2414
2415
  else {
2415
- let t = fa(e.content);
2416
+ let t = ua(e.content);
2416
2417
  t && n.push({
2417
2418
  type: "text",
2418
2419
  content: t
@@ -2436,47 +2437,47 @@ function Oa(e, t) {
2436
2437
  });
2437
2438
  }
2438
2439
  let a = {
2439
- id: t || Pa(),
2440
+ id: t || Na(),
2440
2441
  role: e.role === "tool" ? "assistant" : e.role,
2441
2442
  parts: n,
2442
- ...va(e),
2443
+ ..._a(e),
2443
2444
  ...r !== void 0 && { createdAt: r },
2444
2445
  ...e.metadata !== void 0 && { metadata: e.metadata }
2445
- }, o = J(e)?.uiResources;
2446
- return xa(a, Array.isArray(o) ? o.filter(ya) : []);
2446
+ }, o = X(e)?.uiResources;
2447
+ return ba(a, Array.isArray(o) ? o.filter(va) : []);
2447
2448
  }
2448
- function ka(e) {
2449
- if ("parts" in e) return Aa(e, {
2449
+ function Oa(e) {
2450
+ if ("parts" in e) return ka(e, {
2450
2451
  ...e,
2451
- id: e.id || Pa()
2452
+ id: e.id || Na()
2452
2453
  });
2453
- let t = e.id || Pa();
2454
+ let t = e.id || Na();
2454
2455
  switch (e.role) {
2455
- case "user": return Aa(e, {
2456
+ case "user": return ka(e, {
2456
2457
  id: t,
2457
2458
  role: "user",
2458
- parts: Ma(e.content)
2459
+ parts: ja(e.content)
2459
2460
  });
2460
2461
  case "assistant": {
2461
- let n = J(e), r = n?.toolCallMetadata, i = ja(n?.structuredOutput), a = e.toolCalls?.map((e) => {
2462
+ let n = X(e), r = n?.toolCallMetadata, i = Aa(n?.structuredOutput), a = e.toolCalls?.map((e) => {
2462
2463
  let t = typeof r == "object" && r ? r[e.id] : void 0;
2463
2464
  return t === void 0 ? e : {
2464
2465
  ...e,
2465
2466
  metadata: t
2466
2467
  };
2467
2468
  });
2468
- return Aa(e, Oa({
2469
+ return ka(e, Da({
2469
2470
  role: "assistant",
2470
2471
  content: e.content ?? null,
2471
- ...va(e),
2472
+ ..._a(e),
2472
2473
  ...a && { toolCalls: a },
2473
2474
  ...i && { structuredOutput: i }
2474
2475
  }, t));
2475
2476
  }
2476
2477
  case "tool": {
2477
- e = ma(e);
2478
- let n = Z("createdAt" in e ? e.createdAt : void 0) ?? ga(e);
2479
- return Aa(e, Oa({
2478
+ e = fa(e);
2479
+ let n = pa("createdAt" in e ? e.createdAt : void 0) ?? ha(e);
2480
+ return ka(e, Da({
2480
2481
  role: "tool",
2481
2482
  content: e.content,
2482
2483
  toolCallId: e.toolCallId,
@@ -2488,7 +2489,7 @@ function ka(e) {
2488
2489
  }, t));
2489
2490
  }
2490
2491
  case "system":
2491
- case "developer": return Aa(e, {
2492
+ case "developer": return ka(e, {
2492
2493
  id: t,
2493
2494
  role: "system",
2494
2495
  parts: e.content ? [{
@@ -2497,8 +2498,8 @@ function ka(e) {
2497
2498
  }] : []
2498
2499
  });
2499
2500
  case "reasoning": {
2500
- let n = ua(e), r = typeof e.content == "string" ? e.content : "";
2501
- return Aa(e, {
2501
+ let n = ca(e), r = typeof e.content == "string" ? e.content : "";
2502
+ return ka(e, {
2502
2503
  id: t,
2503
2504
  role: "assistant",
2504
2505
  parts: r || n !== void 0 ? [{
@@ -2508,15 +2509,15 @@ function ka(e) {
2508
2509
  }] : []
2509
2510
  });
2510
2511
  }
2511
- default: return Aa(e, {
2512
+ default: return ka(e, {
2512
2513
  id: t,
2513
2514
  role: "assistant",
2514
2515
  parts: []
2515
2516
  });
2516
2517
  }
2517
2518
  }
2518
- function Aa(e, t) {
2519
- let n = t.parts.map((e) => ha(e));
2519
+ function ka(e, t) {
2520
+ let n = t.parts.map((e) => ma(e));
2520
2521
  n !== t.parts && (t = {
2521
2522
  ...t,
2522
2523
  parts: n
@@ -2532,7 +2533,7 @@ function Aa(e, t) {
2532
2533
  metadata: a
2533
2534
  });
2534
2535
  }
2535
- let o = Z(i.createdAt) ?? (a === void 0 ? void 0 : ga(a));
2536
+ let o = pa(i.createdAt) ?? (a === void 0 ? void 0 : ha(a));
2536
2537
  if (o !== void 0 && !Object.is(o, i.createdAt)) i = {
2537
2538
  ...i,
2538
2539
  createdAt: o
@@ -2541,10 +2542,10 @@ function Aa(e, t) {
2541
2542
  let { createdAt: e, ...t } = i;
2542
2543
  i = t;
2543
2544
  }
2544
- let s = J(a)?.uiResources, c = Array.isArray(s) ? s.filter(ya) : [];
2545
- return xa(i, c);
2545
+ let s = X(a)?.uiResources, c = Array.isArray(s) ? s.filter(va) : [];
2546
+ return ba(i, c);
2546
2547
  }
2547
- function ja(e) {
2548
+ function Aa(e) {
2548
2549
  if (!(e == null || e.status !== "streaming" && e.status !== "complete" && e.status !== "error" || typeof e.raw != "string")) return {
2549
2550
  type: "structured-output",
2550
2551
  status: e.status,
@@ -2555,7 +2556,7 @@ function ja(e) {
2555
2556
  ...e.errorMessage === void 0 ? {} : { errorMessage: e.errorMessage }
2556
2557
  };
2557
2558
  }
2558
- function Ma(e) {
2559
+ function ja(e) {
2559
2560
  if (typeof e == "string") return e ? [{
2560
2561
  type: "text",
2561
2562
  content: e
@@ -2567,33 +2568,33 @@ function Ma(e) {
2567
2568
  }) : n.type !== "binary" && t.push(n);
2568
2569
  return t;
2569
2570
  }
2570
- function Na(e, t) {
2571
+ function Ma(e, t) {
2571
2572
  if ("parts" in e) {
2572
- let n = e.parts.map((e) => ha(e));
2573
+ let n = e.parts.map((e) => ma(e));
2573
2574
  return {
2574
2575
  ...e,
2575
2576
  parts: n,
2576
2577
  id: e.id || t(),
2577
- createdAt: Z(e.createdAt) ?? /* @__PURE__ */ new Date()
2578
+ createdAt: pa(e.createdAt) ?? /* @__PURE__ */ new Date()
2578
2579
  };
2579
2580
  }
2580
2581
  return {
2581
- ...Oa(e, t()),
2582
- createdAt: Z(e.createdAt) ?? /* @__PURE__ */ new Date()
2582
+ ...Da(e, t()),
2583
+ createdAt: pa(e.createdAt) ?? /* @__PURE__ */ new Date()
2583
2584
  };
2584
2585
  }
2585
- function Pa() {
2586
+ function Na() {
2586
2587
  return `msg-${Date.now()}-${Math.random().toString(36).substring(7)}`;
2587
2588
  }
2588
2589
  //#endregion
2589
2590
  //#region node_modules/@tanstack/ai/dist/esm/utilities/ag-ui-wire.js
2590
- function Fa(e) {
2591
+ function Pa(e) {
2591
2592
  return typeof e == "object" && !!e && !Array.isArray(e);
2592
2593
  }
2593
- function Ia(e, t, n, r, i = !1) {
2594
- let a = Fa(e) ? e : {}, o = Fa(a.tanstack) ? { ...a.tanstack } : {};
2594
+ function Fa(e, t, n, r, i = !1) {
2595
+ let a = Pa(e) ? e : {}, o = Pa(a.tanstack) ? { ...a.tanstack } : {};
2595
2596
  i && delete o.uiResources;
2596
- let s = Z(t), c = {
2597
+ let s = pa(t), c = {
2597
2598
  ...n === void 0 ? {} : { id: n },
2598
2599
  ...s && { createdAt: s.toISOString() },
2599
2600
  ...Array.isArray(r) && { content: r }
@@ -2606,12 +2607,12 @@ function Ia(e, t, n, r, i = !1) {
2606
2607
  };
2607
2608
  return Object.keys(l).length ? l : void 0;
2608
2609
  }
2609
- function La(e, t) {
2610
+ function Ia(e, t) {
2610
2611
  let n = [], r = new Set(e.flatMap((e) => "id" in e && e.id && e.role !== "tool" ? [e.id] : [])), i = t?.includeSnapshotStructuredOutput ?? !1, a = /* @__PURE__ */ new Set();
2611
2612
  for (let t of e) t.role === "assistant" && t.id !== void 0 && a.add(t.id);
2612
2613
  for (let t of e) {
2613
2614
  if (!("parts" in t) && t.role === "tool" && t.toolCallId) {
2614
- let e = Ja(Xa(t.id, t.toolCallId, a), r), i = Ia(t.metadata, t.createdAt, t.id, t.content);
2615
+ let e = qa(Ya(t.id, t.toolCallId, a), r), i = Fa(t.metadata, t.createdAt, t.id, t.content);
2615
2616
  n.push({
2616
2617
  role: "tool",
2617
2618
  id: e,
@@ -2623,31 +2624,31 @@ function La(e, t) {
2623
2624
  });
2624
2625
  continue;
2625
2626
  }
2626
- let e = "parts" in t ? t : Oa(t, t.id), o = e.parts;
2627
+ let e = "parts" in t ? t : Da(t, t.id), o = e.parts;
2627
2628
  if (r.add(e.id), t.role === "system") {
2628
- n.push(Ra(e, "system", { content: o.length > 0 ? Ha(o) : t.content ?? "" }, o, i));
2629
+ n.push(La(e, "system", { content: o.length > 0 ? Va(o) : t.content ?? "" }, o, i));
2629
2630
  continue;
2630
2631
  }
2631
2632
  if (t.role === "user") {
2632
- n.push(Ra(e, "user", { content: o.length > 0 ? Ua(o) : t.content ?? "" }, o, i));
2633
+ n.push(La(e, "user", { content: o.length > 0 ? Ha(o) : t.content ?? "" }, o, i));
2633
2634
  continue;
2634
2635
  }
2635
2636
  for (let t of o) if (t.type === "thinking") {
2636
2637
  let i = {
2637
2638
  role: "reasoning",
2638
- id: Ya(Ka(e.id, t), r),
2639
+ id: Ja(Ga(e.id, t), r),
2639
2640
  content: t.content
2640
2641
  };
2641
2642
  t.signature && (i.encryptedValue = t.signature), n.push(i);
2642
2643
  }
2643
- let s = Ha(o), c = Ga(o);
2644
- n.push(Ra(e, "assistant", {
2644
+ let s = Va(o), c = Wa(o);
2645
+ n.push(La(e, "assistant", {
2645
2646
  ...s !== "" && { content: s },
2646
2647
  ...c && { toolCalls: c }
2647
2648
  }, o, i));
2648
2649
  let l = new Set(o.flatMap((e) => e.type === "tool-result" ? [e.toolCallId] : []));
2649
2650
  for (let e of o) if (e.type === "tool-result") {
2650
- let t = Ja(e.id ?? qa(e.toolCallId), r), i = Ia(e.metadata, e.createdAt, e.id, e.content, !0);
2651
+ let t = qa(e.id ?? Ka(e.toolCallId), r), i = Fa(e.metadata, e.createdAt, e.id, e.content, !0);
2651
2652
  n.push({
2652
2653
  role: "tool",
2653
2654
  id: t,
@@ -2664,20 +2665,20 @@ function La(e, t) {
2664
2665
  approved: t,
2665
2666
  ...t && { pendingExecution: !0 },
2666
2667
  message: t ? "User approved this action" : "User denied this action"
2667
- }) : ra(e.output), a = typeof i == "string" ? i : JSON.stringify(i);
2668
+ }) : ta(e.output), a = typeof i == "string" ? i : JSON.stringify(i);
2668
2669
  n.push({
2669
2670
  role: "tool",
2670
- id: Ja(qa(e.id), r),
2671
+ id: qa(Ka(e.id), r),
2671
2672
  toolCallId: e.id,
2672
2673
  content: a,
2673
- metadata: Ia(void 0, void 0, void 0, i)
2674
+ metadata: Fa(void 0, void 0, void 0, i)
2674
2675
  });
2675
2676
  }
2676
2677
  }
2677
2678
  return n;
2678
2679
  }
2679
- function Ra(e, t, n, r, i) {
2680
- let a = za(e, r, i), o = {
2680
+ function La(e, t, n, r, i) {
2681
+ let a = Ra(e, r, i), o = {
2681
2682
  id: e.id,
2682
2683
  ...e.name !== void 0 && { name: e.name },
2683
2684
  ...a !== void 0 && { metadata: a }
@@ -2697,12 +2698,12 @@ function Ra(e, t, n, r, i) {
2697
2698
  ...n.toolCalls !== void 0 && { toolCalls: n.toolCalls }
2698
2699
  };
2699
2700
  }
2700
- function za(e, t, n) {
2701
- let r = { ...e.metadata ?? {} }, i = J(e), a = {};
2701
+ function Ra(e, t, n) {
2702
+ let r = { ...e.metadata ?? {} }, i = X(e), a = {};
2702
2703
  i?.model !== void 0 && (a.model = i.model), i?.signature !== void 0 && (a.signature = i.signature);
2703
- let o = Z(e.createdAt);
2704
+ let o = pa(e.createdAt);
2704
2705
  o !== void 0 && (a.createdAt = o.toISOString());
2705
- let s = Ba(t, n);
2706
+ let s = za(t, n);
2706
2707
  s && (a.structuredOutput = s);
2707
2708
  let c = {};
2708
2709
  for (let e of t) e.type === "tool-call" && e.metadata !== void 0 && (c[e.id] = e.metadata);
@@ -2710,10 +2711,10 @@ function za(e, t, n) {
2710
2711
  let l = t.filter((e) => e.type === "ui-resource");
2711
2712
  return l.length > 0 && (a.uiResources = l), Object.keys(a).length > 0 ? r.tanstack = a : delete r.tanstack, Object.keys(r).length > 0 ? r : void 0;
2712
2713
  }
2713
- function Ba(e, t) {
2714
- for (let n of e) if (n.type === "structured-output" && (t || n.status !== "complete")) return Va(n, t);
2714
+ function za(e, t) {
2715
+ for (let n of e) if (n.type === "structured-output" && (t || n.status !== "complete")) return Ba(n, t);
2715
2716
  }
2716
- function Va(e, t) {
2717
+ function Ba(e, t) {
2717
2718
  return {
2718
2719
  status: e.status,
2719
2720
  raw: e.raw,
@@ -2723,13 +2724,13 @@ function Va(e, t) {
2723
2724
  ...e.errorMessage !== void 0 && { errorMessage: e.errorMessage }
2724
2725
  };
2725
2726
  }
2726
- function Ha(e) {
2727
+ function Va(e) {
2727
2728
  let t = [];
2728
2729
  for (let n of e) n.type === "text" ? t.push(n.content) : n.type === "structured-output" && n.status === "complete" && n.raw !== "" && t.push(n.raw);
2729
2730
  return t.join("");
2730
2731
  }
2731
- function Ua(e) {
2732
- if (!e.some((e) => e.type === "image" || e.type === "audio" || e.type === "video" || e.type === "document")) return Ha(e);
2732
+ function Ha(e) {
2733
+ if (!e.some((e) => e.type === "image" || e.type === "audio" || e.type === "video" || e.type === "document")) return Va(e);
2733
2734
  let t = [];
2734
2735
  for (let n of e) n.type === "text" ? t.push({
2735
2736
  type: "text",
@@ -2737,15 +2738,15 @@ function Ua(e) {
2737
2738
  }) : (n.type === "image" || n.type === "audio" || n.type === "video" || n.type === "document") && t.push(n);
2738
2739
  return t;
2739
2740
  }
2740
- function Wa(e) {
2741
+ function Ua(e) {
2741
2742
  if (typeof e != "object" || !e || Array.isArray(e) || !("thoughtSignature" in e)) return;
2742
2743
  let t = e.thoughtSignature;
2743
2744
  return typeof t == "string" && t !== "" ? t : void 0;
2744
2745
  }
2745
- function Ga(e) {
2746
+ function Wa(e) {
2746
2747
  let t = [];
2747
2748
  for (let n of e) if (n.type === "tool-call") {
2748
- let e = Wa(n.metadata);
2749
+ let e = Ua(n.metadata);
2749
2750
  t.push({
2750
2751
  id: n.id,
2751
2752
  type: "function",
@@ -2758,82 +2759,82 @@ function Ga(e) {
2758
2759
  }
2759
2760
  return t.length > 0 ? t : void 0;
2760
2761
  }
2761
- function Ka(e, t) {
2762
- return `${e}-reasoning-${t.id ?? Za(t.content)}`;
2762
+ function Ga(e, t) {
2763
+ return `${e}-reasoning-${t.id ?? Xa(t.content)}`;
2763
2764
  }
2764
- function qa(e) {
2765
+ function Ka(e) {
2765
2766
  return `tool-${e}`;
2766
2767
  }
2767
- function Ja(e, t) {
2768
- return Ya(e, t);
2768
+ function qa(e, t) {
2769
+ return Ja(e, t);
2769
2770
  }
2770
- function Ya(e, t) {
2771
+ function Ja(e, t) {
2771
2772
  if (!t.has(e)) return t.add(e), e;
2772
2773
  let n = 2;
2773
2774
  for (; t.has(`${e}-${n}`);) n++;
2774
2775
  let r = `${e}-${n}`;
2775
2776
  return t.add(r), r;
2776
2777
  }
2777
- function Xa(e, t, n) {
2778
- let r = qa(t);
2778
+ function Ya(e, t, n) {
2779
+ let r = Ka(t);
2779
2780
  return e === void 0 || n.has(e) ? r : e;
2780
2781
  }
2781
- function Za(e) {
2782
+ function Xa(e) {
2782
2783
  let t = 0;
2783
2784
  for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) | 0;
2784
2785
  return Math.abs(t).toString(36);
2785
2786
  }
2786
2787
  //#endregion
2787
2788
  //#region node_modules/@tanstack/ai/dist/esm/utilities/restore-inbound-chunk.js
2788
- function Qa(e) {
2789
- if ((e.type === ni.RUN_FINISHED || e.type === ni.RUN_ERROR) && (Array.isArray(e.usage) || ii(e.usage))) {
2790
- let t = ai(e.usage, J(e)?.usage);
2789
+ function Za(e) {
2790
+ if ((e.type === ei.RUN_FINISHED || e.type === ei.RUN_ERROR) && (Array.isArray(e.usage) || ni(e.usage))) {
2791
+ let t = ri(e.usage, X(e)?.usage);
2791
2792
  t !== void 0 && (e.usage = t);
2792
2793
  }
2793
- if (e.type === ni.TOOL_CALL_START && e.toolName === void 0 && e.toolCallName && (e.toolName = e.toolCallName), e.type === ni.TOOL_CALL_END && e.input === void 0) {
2794
- let t = J(e)?.input;
2794
+ if (e.type === ei.TOOL_CALL_START && e.toolName === void 0 && e.toolCallName && (e.toolName = e.toolCallName), e.type === ei.TOOL_CALL_END && e.input === void 0) {
2795
+ let t = X(e)?.input;
2795
2796
  t !== void 0 && (e.input = t);
2796
2797
  }
2797
2798
  return e;
2798
2799
  }
2799
- function $a(e) {
2800
- Qa(e);
2801
- let t = J(e), n = e;
2800
+ function Qa(e) {
2801
+ Za(e);
2802
+ let t = X(e), n = e;
2802
2803
  if (t == null) return n;
2803
2804
  for (let [e, r] of Object.entries(t)) e !== "usage" && e !== "interruptErrors" && n[e] === void 0 && r !== void 0 && (n[e] = r);
2804
2805
  return t.interruptErrors !== void 0 && (n["tanstack:interruptErrors"] = t.interruptErrors), n;
2805
2806
  }
2806
2807
  //#endregion
2807
2808
  //#region node_modules/@tanstack/ai-event-client/dist/esm/envelope.js
2808
- function eo() {
2809
+ function $a() {
2809
2810
  let e = globalThis.crypto;
2810
2811
  return e?.randomUUID ? e.randomUUID() : Math.random().toString(36).slice(2);
2811
2812
  }
2812
- var to;
2813
- function no() {
2814
- return to === void 0 ? (globalThis.__TANSTACK_AI_DEVTOOLS_RUNTIME_ID__ || (globalThis.__TANSTACK_AI_DEVTOOLS_RUNTIME_ID__ = eo()), to = globalThis.__TANSTACK_AI_DEVTOOLS_RUNTIME_ID__, to) : to;
2813
+ var eo;
2814
+ function to() {
2815
+ return eo === void 0 ? (globalThis.__TANSTACK_AI_DEVTOOLS_RUNTIME_ID__ || (globalThis.__TANSTACK_AI_DEVTOOLS_RUNTIME_ID__ = $a()), eo = globalThis.__TANSTACK_AI_DEVTOOLS_RUNTIME_ID__, eo) : eo;
2815
2816
  }
2816
- var ro = 0;
2817
- function io(e) {
2817
+ var no = 0;
2818
+ function ro(e) {
2818
2819
  return e == null || e === "" ? "missing" : `value-${encodeURIComponent(String(e))}`;
2819
2820
  }
2820
- function ao(e) {
2821
- let t = e.runtimeId ?? no(), n = e.eventId && e.eventId.length > 0 ? e.eventId : [
2821
+ function io(e) {
2822
+ let t = e.runtimeId ?? to(), n = e.eventId && e.eventId.length > 0 ? e.eventId : [
2822
2823
  e.source,
2823
2824
  e.eventType,
2824
- io(t),
2825
- io(e.clientId),
2826
- io(e.requestId),
2827
- io(e.streamId),
2828
- io(e.hookId),
2829
- io(e.threadId),
2830
- io(e.runId),
2831
- io(e.messageId),
2832
- io(e.toolCallId),
2833
- io(e.sequence),
2825
+ ro(t),
2826
+ ro(e.clientId),
2827
+ ro(e.requestId),
2828
+ ro(e.streamId),
2829
+ ro(e.hookId),
2830
+ ro(e.threadId),
2831
+ ro(e.runId),
2832
+ ro(e.messageId),
2833
+ ro(e.toolCallId),
2834
+ ro(e.sequence),
2834
2835
  e.timestamp,
2835
- no(),
2836
- ro++
2836
+ to(),
2837
+ no++
2837
2838
  ].join(":");
2838
2839
  return {
2839
2840
  ...e,
@@ -2843,7 +2844,7 @@ function ao(e) {
2843
2844
  }
2844
2845
  //#endregion
2845
2846
  //#region node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js
2846
- var oo = class {
2847
+ var ao = class {
2847
2848
  #e = !0;
2848
2849
  #t;
2849
2850
  #n;
@@ -2963,24 +2964,24 @@ var oo = class {
2963
2964
  };
2964
2965
  return this.#n().addEventListener("tanstack-devtools-global", t), () => this.#n().removeEventListener("tanstack-devtools-global", t);
2965
2966
  }
2966
- }, so = class extends oo {
2967
+ }, oo = class extends ao {
2967
2968
  constructor() {
2968
2969
  super({ pluginId: "tanstack-ai-devtools" });
2969
2970
  }
2970
- }, co = Symbol.for("tanstack.ai.devtools.eventClient");
2971
- function lo() {
2972
- let e = globalThis, t = e[co];
2971
+ }, so = Symbol.for("tanstack.ai.devtools.eventClient");
2972
+ function co() {
2973
+ let e = globalThis, t = e[so];
2973
2974
  if (t) return t;
2974
- let n = new so();
2975
- return e[co] = n, n;
2975
+ let n = new oo();
2976
+ return e[so] = n, n;
2976
2977
  }
2977
- var uo = lo();
2978
- function Q(e, t) {
2979
- uo.emit(e, t);
2978
+ var lo = co();
2979
+ function $(e, t) {
2980
+ lo.emit(e, t);
2980
2981
  }
2981
2982
  //#endregion
2982
2983
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/tools/tool-definition.js
2983
- function fo(e) {
2984
+ function uo(e) {
2984
2985
  if (e.approvalSchema !== void 0 && e.needsApproval !== !0) throw TypeError("approvalSchema requires needsApproval: true.");
2985
2986
  let t = e.inputSchema, n = e.outputSchema, r = e.approvalSchema, i = e.needsApproval;
2986
2987
  return {
@@ -3016,19 +3017,19 @@ function fo(e) {
3016
3017
  }
3017
3018
  //#endregion
3018
3019
  //#region node_modules/@tanstack/ai/dist/esm/utilities/chunk-ids.js
3019
- function po(e) {
3020
+ function fo(e) {
3020
3021
  return typeof e == "string" && e !== "" ? e : void 0;
3021
3022
  }
3022
- function mo(e) {
3023
+ function po(e) {
3023
3024
  if ("runId" in e) {
3024
- let t = po(e.runId);
3025
+ let t = fo(e.runId);
3025
3026
  if (t !== void 0) return t;
3026
3027
  }
3027
- return po(J(e)?.runId);
3028
+ return fo(X(e)?.runId);
3028
3029
  }
3029
3030
  //#endregion
3030
3031
  //#region node_modules/partial-json/dist/options.js
3031
- var ho = /* @__PURE__ */ e(((e) => {
3032
+ var mo = /* @__PURE__ */ e(((e) => {
3032
3033
  Object.defineProperty(e, "__esModule", { value: !0 }), e.Allow = e.ALL = e.COLLECTION = e.ATOM = e.SPECIAL = e.INF = e._INFINITY = e.INFINITY = e.NAN = e.BOOL = e.NULL = e.OBJ = e.ARR = e.NUM = e.STR = void 0, e.STR = 1, e.NUM = 2, e.ARR = 4, e.OBJ = 8, e.NULL = 16, e.BOOL = 32, e.NAN = 64, e.INFINITY = 128, e._INFINITY = 256, e.INF = e.INFINITY | e._INFINITY, e.SPECIAL = e.NULL | e.BOOL | e.INF | e.NAN, e.ATOM = e.STR | e.NUM | e.SPECIAL, e.COLLECTION = e.ARR | e.OBJ, e.ALL = e.ATOM | e.COLLECTION, e.Allow = {
3033
3034
  STR: e.STR,
3034
3035
  NUM: e.NUM,
@@ -3045,7 +3046,7 @@ var ho = /* @__PURE__ */ e(((e) => {
3045
3046
  COLLECTION: e.COLLECTION,
3046
3047
  ALL: e.ALL
3047
3048
  }, e.default = e.Allow;
3048
- })), go = (/* @__PURE__ */ e(((e) => {
3049
+ })), ho = (/* @__PURE__ */ e(((e) => {
3049
3050
  var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
3050
3051
  r === void 0 && (r = n);
3051
3052
  var i = Object.getOwnPropertyDescriptor(t, n);
@@ -3061,13 +3062,13 @@ var ho = /* @__PURE__ */ e(((e) => {
3061
3062
  for (var r in e) r !== "default" && !Object.prototype.hasOwnProperty.call(n, r) && t(n, e, r);
3062
3063
  };
3063
3064
  Object.defineProperty(e, "__esModule", { value: !0 }), e.Allow = e.MalformedJSON = e.PartialJSON = e.parseJSON = e.parse = void 0;
3064
- var r = ho();
3065
+ var r = mo();
3065
3066
  Object.defineProperty(e, "Allow", {
3066
3067
  enumerable: !0,
3067
3068
  get: function() {
3068
3069
  return r.Allow;
3069
3070
  }
3070
- }), n(ho(), e);
3071
+ }), n(mo(), e);
3071
3072
  var i = class extends Error {};
3072
3073
  e.PartialJSON = i;
3073
3074
  var a = class extends Error {};
@@ -3159,28 +3160,28 @@ var ho = /* @__PURE__ */ e(((e) => {
3159
3160
  return l();
3160
3161
  };
3161
3162
  e.parse = o;
3162
- })))(), _o = new class {
3163
+ })))(), go = new class {
3163
3164
  parse(e) {
3164
3165
  if (e && e.trim() !== "") try {
3165
- return (0, go.parse)(e);
3166
+ return (0, ho.parse)(e);
3166
3167
  } catch {
3167
3168
  return;
3168
3169
  }
3169
3170
  }
3170
3171
  }();
3171
- function vo(e) {
3172
- return _o.parse(e);
3172
+ function _o(e) {
3173
+ return go.parse(e);
3173
3174
  }
3174
3175
  //#endregion
3175
3176
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/stream/strategies.js
3176
- var yo = class {
3177
+ var vo = class {
3177
3178
  shouldEmit(e, t) {
3178
3179
  return !0;
3179
3180
  }
3180
3181
  };
3181
3182
  //#endregion
3182
3183
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/stream/message-updaters.js
3183
- function bo(e, t, n) {
3184
+ function yo(e, t, n) {
3184
3185
  return e.map((e) => {
3185
3186
  if (e.id !== t) return e;
3186
3187
  let r = [...e.parts], i = r.length > 0 ? r[r.length - 1] : null;
@@ -3196,7 +3197,7 @@ function bo(e, t, n) {
3196
3197
  };
3197
3198
  });
3198
3199
  }
3199
- function xo(e, t, n) {
3200
+ function bo(e, t, n) {
3200
3201
  return e.map((e) => {
3201
3202
  if (e.id !== t) return e;
3202
3203
  let r = [...e.parts], i = r.find((e) => e.type === "tool-call" && e.id === n.id), a = n.metadata ?? i?.metadata, o = n.input ?? i?.input, s = {
@@ -3216,7 +3217,7 @@ function xo(e, t, n) {
3216
3217
  };
3217
3218
  });
3218
3219
  }
3219
- function So(e, t, n, r, i, a) {
3220
+ function xo(e, t, n, r, i, a) {
3220
3221
  return e.map((e) => {
3221
3222
  if (e.id !== t) return e;
3222
3223
  let o = [...e.parts], s = o.findIndex((e) => e.type === "tool-result" && e.toolCallId === n), c = {
@@ -3232,7 +3233,7 @@ function So(e, t, n, r, i, a) {
3232
3233
  };
3233
3234
  });
3234
3235
  }
3235
- function Co(e, t, n, r) {
3236
+ function So(e, t, n, r) {
3236
3237
  return e.map((e) => {
3237
3238
  if (e.id !== t) return e;
3238
3239
  let i = [...e.parts], a = i.find((e) => e.type === "tool-call" && e.id === n);
@@ -3253,7 +3254,7 @@ function Co(e, t, n, r) {
3253
3254
  };
3254
3255
  });
3255
3256
  }
3256
- function wo(e, t, n, r, i) {
3257
+ function Co(e, t, n, r, i) {
3257
3258
  return e.map((e) => {
3258
3259
  let a = [...e.parts], o = a.find((e) => e.type === "tool-call" && e.id === t);
3259
3260
  if (o) {
@@ -3270,7 +3271,7 @@ function wo(e, t, n, r, i) {
3270
3271
  };
3271
3272
  });
3272
3273
  }
3273
- function To(e, t, n) {
3274
+ function wo(e, t, n) {
3274
3275
  return e.map((e) => {
3275
3276
  let r = [...e.parts], i = r.find((e) => e.type === "tool-call" && e.approval?.id === t);
3276
3277
  if (i && i.approval) {
@@ -3290,10 +3291,10 @@ function To(e, t, n) {
3290
3291
  };
3291
3292
  });
3292
3293
  }
3293
- function Eo(e, t, n) {
3294
+ function To(e, t, n) {
3294
3295
  return e.map((e) => {
3295
3296
  if (e.id !== t) return e;
3296
- let r = [...e.parts], i = r.findIndex((e) => e.type === "structured-output"), a = i >= 0 ? r[i] : null, o = (a?.raw ?? "") + n, s = vo(o) ?? a?.partial, c = {
3297
+ let r = [...e.parts], i = r.findIndex((e) => e.type === "structured-output"), a = i >= 0 ? r[i] : null, o = (a?.raw ?? "") + n, s = _o(o) ?? a?.partial, c = {
3297
3298
  type: "structured-output",
3298
3299
  status: "streaming",
3299
3300
  raw: o,
@@ -3306,7 +3307,7 @@ function Eo(e, t, n) {
3306
3307
  };
3307
3308
  });
3308
3309
  }
3309
- function Do(e, t, n, r, i) {
3310
+ function Eo(e, t, n, r, i) {
3310
3311
  return e.map((e) => {
3311
3312
  if (e.id !== t) return e;
3312
3313
  let a = [...e.parts], o = a.findIndex((e) => e.type === "structured-output"), s = o >= 0 ? a[o].raw : "", c = r || s;
@@ -3327,7 +3328,7 @@ function Do(e, t, n, r, i) {
3327
3328
  };
3328
3329
  });
3329
3330
  }
3330
- function Oo(e, t, n) {
3331
+ function Do(e, t, n) {
3331
3332
  return e.map((e) => {
3332
3333
  if (e.id !== t) return e;
3333
3334
  let r = [...e.parts], i = r.findIndex((e) => e.type === "structured-output");
@@ -3351,7 +3352,7 @@ function Oo(e, t, n) {
3351
3352
  });
3352
3353
  });
3353
3354
  }
3354
- function ko(e, t, n, r, i) {
3355
+ function Oo(e, t, n, r, i) {
3355
3356
  return e.map((e) => {
3356
3357
  if (e.id !== t) return e;
3357
3358
  let a = [...e.parts], o = a.findIndex((e) => e.type === "thinking" && e.stepId === n), s = {
@@ -3368,16 +3369,16 @@ function ko(e, t, n, r, i) {
3368
3369
  }
3369
3370
  //#endregion
3370
3371
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/stream/processor.js
3371
- var Ao = 12;
3372
- function jo(e) {
3372
+ var ko = 12;
3373
+ function Ao(e) {
3373
3374
  return e.some((e) => {
3374
3375
  let t = e.metadata;
3375
3376
  if (!t || typeof t != "object" || Array.isArray(t)) return !1;
3376
- let n = t[Vi];
3377
+ let n = t[zi];
3377
3378
  return typeof n == "object" && !!n && !Array.isArray(n) && n.kind === "generic";
3378
3379
  });
3379
3380
  }
3380
- var Mo = class e {
3381
+ var jo = class e {
3381
3382
  chunkStrategy;
3382
3383
  events;
3383
3384
  jsonParser;
@@ -3398,7 +3399,7 @@ var Mo = class e {
3398
3399
  recording = null;
3399
3400
  recordingStartTime = 0;
3400
3401
  constructor(e = {}) {
3401
- this.chunkStrategy = e.chunkStrategy || new yo(), this.events = e.events || {}, this.jsonParser = e.jsonParser || _o, this.recordingEnabled = e.recording ?? !1, e.initialMessages && (this.messages = [...e.initialMessages]);
3402
+ this.chunkStrategy = e.chunkStrategy || new vo(), this.events = e.events || {}, this.jsonParser = e.jsonParser || go, this.recordingEnabled = e.recording ?? !1, e.initialMessages && (this.messages = [...e.initialMessages]);
3402
3403
  }
3403
3404
  setMessages(e) {
3404
3405
  this.messages = [...e], this.emitMessagesChange();
@@ -3408,7 +3409,7 @@ var Mo = class e {
3408
3409
  type: "text",
3409
3410
  content: e
3410
3411
  }] : e.map((e) => e), i = {
3411
- id: t ?? Pa(),
3412
+ id: t ?? Na(),
3412
3413
  role: "user",
3413
3414
  parts: r,
3414
3415
  createdAt: /* @__PURE__ */ new Date(),
@@ -3435,15 +3436,15 @@ var Mo = class e {
3435
3436
  console.warn(`[StreamProcessor] Could not find message with tool call ${e}`);
3436
3437
  return;
3437
3438
  }
3438
- let i = wo(this.messages, e, t, n ? "error" : void 0, n), a = ra(t), o = n ? "error" : "complete";
3439
- i = So(i, r.id, e, a, o, n), this.messages = i, this.emitMessagesChange();
3439
+ let i = Co(this.messages, e, t, n ? "error" : void 0, n), a = ta(t), o = n ? "error" : "complete";
3440
+ i = xo(i, r.id, e, a, o, n), this.messages = i, this.emitMessagesChange();
3440
3441
  }
3441
3442
  addToolApprovalResponse(e, t) {
3442
- this.messages = To(this.messages, e, t), this.emitMessagesChange();
3443
+ this.messages = wo(this.messages, e, t), this.emitMessagesChange();
3443
3444
  }
3444
3445
  toModelMessages() {
3445
3446
  let e = [];
3446
- for (let t of this.messages) e.push(...Ca(t));
3447
+ for (let t of this.messages) e.push(...Sa(t));
3447
3448
  return e;
3448
3449
  }
3449
3450
  getMessages() {
@@ -3455,7 +3456,7 @@ var Mo = class e {
3455
3456
  let t = e.parts.filter((e) => e.type === "tool-call");
3456
3457
  if (t.length === 0) return !0;
3457
3458
  let n = new Set(e.parts.filter((e) => e.type === "tool-result").map((e) => e.toolCallId));
3458
- return t.every((e) => e.state === "complete" || e.state === "approval-responded" || e.output !== void 0 && !e.approval || n.has(e.id) || aa(e));
3459
+ return t.every((e) => e.state === "complete" || e.state === "approval-responded" || e.output !== void 0 && !e.approval || n.has(e.id) || ra(e));
3459
3460
  }
3460
3461
  removeMessagesAfter(e) {
3461
3462
  let t = new Set(this.messages.slice(0, e + 1).map((e) => e.id));
@@ -3599,7 +3600,7 @@ var Mo = class e {
3599
3600
  };
3600
3601
  }
3601
3602
  }
3602
- let n = e || Pa(), r = {
3603
+ let n = e || Na(), r = {
3603
3604
  id: n,
3604
3605
  role: "assistant",
3605
3606
  parts: [],
@@ -3616,10 +3617,10 @@ var Mo = class e {
3616
3617
  if (typeof t != "object" || !t || Array.isArray(t)) return;
3617
3618
  let n = this.messages.find((t) => t.id === e);
3618
3619
  if (!n) return;
3619
- let r = t, i = J(r), a = i != null && ("content" in i || "args" in i) ? {
3620
+ let r = t, i = X(r), a = i != null && ("content" in i || "args" in i) ? {
3620
3621
  ...r,
3621
3622
  tanstack: Object.fromEntries(Object.entries(i).filter(([e]) => e !== "content" && e !== "args"))
3622
- } : r, o = ci(n.metadata, a), s = Z(J(r)?.createdAt), c = s !== void 0;
3623
+ } : r, o = oi(n.metadata, a), s = pa(X(r)?.createdAt), c = s !== void 0;
3623
3624
  this.messages = this.messages.map((t) => t.id === e ? {
3624
3625
  ...t,
3625
3626
  ...o === void 0 ? {} : { metadata: o },
@@ -3665,7 +3666,7 @@ var Mo = class e {
3665
3666
  }
3666
3667
  handleMessagesSnapshotEvent(e) {
3667
3668
  this.resetStreamState();
3668
- let t = this.messages, n = new Map(t.map((e) => [e.id, e])), r = this.mergeReasoningFanOut(e.messages.map(ka));
3669
+ let t = this.messages, n = new Map(t.map((e) => [e.id, e])), r = this.mergeReasoningFanOut(e.messages.map(Oa));
3669
3670
  this.messages = this.reconcileSnapshotToolCalls(r, t).map((e) => {
3670
3671
  if (e.metadata != null) return e;
3671
3672
  let t = n.get(e.id);
@@ -3761,7 +3762,7 @@ var Mo = class e {
3761
3762
  let { messageId: t, state: n } = this.ensureAssistantMessage(e.messageId);
3762
3763
  if (this.mergeMessageMetadata(t, e.metadata), this.structuredMessageIds.has(t)) {
3763
3764
  let r = e.delta || "";
3764
- r !== "" && (this.messages = Eo(this.messages, t, r), n.totalTextContent += r, this.queueStructuredOutputUpdate(t, r), this.emitMessagesChange());
3765
+ r !== "" && (this.messages = To(this.messages, t, r), n.totalTextContent += r, this.queueStructuredOutputUpdate(t, r), this.emitMessagesChange());
3765
3766
  return;
3766
3767
  }
3767
3768
  let r = n.currentSegmentText;
@@ -3785,7 +3786,7 @@ var Mo = class e {
3785
3786
  index: r.toolCalls.size,
3786
3787
  ...o !== void 0 && { metadata: o }
3787
3788
  };
3788
- r.toolCalls.set(i, s), r.toolCallOrder.push(i), this.toolCallToMessage.set(i, n), this.messages = xo(this.messages, n, {
3789
+ r.toolCalls.set(i, s), r.toolCallOrder.push(i), this.toolCallToMessage.set(i, n), this.messages = bo(this.messages, n, {
3789
3790
  id: e.toolCallId,
3790
3791
  name: a,
3791
3792
  arguments: "",
@@ -3802,7 +3803,7 @@ var Mo = class e {
3802
3803
  let i = r.toolCalls.get(t);
3803
3804
  if (!i) return;
3804
3805
  let a = i.state === "awaiting-input";
3805
- i.arguments += e.delta || "", a && e.delta && (i.state = "input-streaming"), i.parsedArguments = this.jsonParser.parse(i.arguments), this.messages = xo(this.messages, n, {
3806
+ i.arguments += e.delta || "", a && e.delta && (i.state = "input-streaming"), i.parsedArguments = this.jsonParser.parse(i.arguments), this.messages = bo(this.messages, n, {
3806
3807
  id: i.id,
3807
3808
  name: i.name,
3808
3809
  arguments: i.arguments,
@@ -3814,13 +3815,13 @@ var Mo = class e {
3814
3815
  if (!t) return;
3815
3816
  let n = this.getMessageState(t);
3816
3817
  if (!n) return;
3817
- let r = e.input === void 0 ? J(e)?.input : e.input, i = n.toolCalls.get(e.toolCallId);
3818
+ let r = e.input === void 0 ? X(e)?.input : e.input, i = n.toolCalls.get(e.toolCallId);
3818
3819
  if (i && i.state !== "input-complete") {
3819
3820
  if (r !== void 0 && !i.arguments) try {
3820
3821
  i.arguments = JSON.stringify(r);
3821
3822
  } catch {}
3822
3823
  let a = n.toolCallOrder.indexOf(e.toolCallId);
3823
- this.completeToolCall(t, a, i), r !== void 0 && (i.parsedArguments = r, this.messages = xo(this.messages, t, {
3824
+ this.completeToolCall(t, a, i), r !== void 0 && (i.parsedArguments = r, this.messages = bo(this.messages, t, {
3824
3825
  id: i.id,
3825
3826
  name: i.name,
3826
3827
  arguments: i.arguments,
@@ -3836,35 +3837,35 @@ var Mo = class e {
3836
3837
  handleToolCallResultEvent(e) {
3837
3838
  let t = this.toolCallToMessage.get(e.toolCallId) ?? this.messages.find((t) => t.parts.some((t) => t.type === "tool-call" && t.id === e.toolCallId))?.id;
3838
3839
  if (!t) return;
3839
- let n = e.state === "output-error" || J(e)?.state === "output-error", r;
3840
+ let n = e.state === "output-error" || X(e)?.state === "output-error", r;
3840
3841
  try {
3841
3842
  r = JSON.parse(e.content);
3842
3843
  } catch {
3843
3844
  r = e.content;
3844
3845
  }
3845
- this.messages = wo(this.messages, e.toolCallId, r, n ? "error" : void 0);
3846
+ this.messages = Co(this.messages, e.toolCallId, r, n ? "error" : void 0);
3846
3847
  let i = n ? "error" : "complete";
3847
- this.messages = So(this.messages, t, e.toolCallId, e.content, i, i === "error" ? this.extractToolResultError(r) : void 0), this.emitMessagesChange();
3848
+ this.messages = xo(this.messages, t, e.toolCallId, e.content, i, i === "error" ? this.extractToolResultError(r) : void 0), this.emitMessagesChange();
3848
3849
  }
3849
3850
  handleRunStartedEvent(e) {
3850
3851
  this.activeRuns.add(e.runId);
3851
3852
  }
3852
3853
  handleRunFinishedEvent(e) {
3853
3854
  let t = e;
3854
- if (this.finishReason = t.finishReason === void 0 ? J(e)?.finishReason ?? null : t.finishReason, this.activeRuns.delete(e.runId), e.outcome?.type === "interrupt" && this.handleInterrupts(e.outcome.interrupts), this.activeRuns.size === 0) {
3855
+ if (this.finishReason = t.finishReason === void 0 ? X(e)?.finishReason ?? null : t.finishReason, this.activeRuns.delete(e.runId), e.outcome?.type === "interrupt" && this.handleInterrupts(e.outcome.interrupts), this.activeRuns.size === 0) {
3855
3856
  if (this.completeAllToolCalls(), this.finishReason === "tool_calls" && e.outcome?.type !== "interrupt") return;
3856
3857
  this.isDone = !0, this.finalizeStream();
3857
3858
  }
3858
3859
  }
3859
3860
  handleInterrupts(e) {
3860
- let t = jo(e);
3861
+ let t = Ao(e);
3861
3862
  for (let n of e) {
3862
3863
  let e = n.metadata && typeof n.metadata == "object" ? n.metadata : {}, r = typeof e.kind == "string" ? e.kind : void 0, i = n.toolCallId;
3863
3864
  if (!i) continue;
3864
3865
  let a = typeof e.toolName == "string" ? e.toolName : this.findToolCallName(i), o = Object.hasOwn(e, "input") ? e.input : {};
3865
3866
  if (r === "approval" || n.reason === "approval_required") {
3866
3867
  let e = this.getActiveAssistantMessageId() ?? this.toolCallToMessage.get(i) ?? this.messages.find((e) => e.role === "assistant" && e.parts.some((e) => e.type === "tool-call" && e.id === i))?.id;
3867
- e && (this.messages = Co(this.messages, e, i, n.id), this.emitMessagesChange()), this.events.onApprovalRequest?.({
3868
+ e && (this.messages = So(this.messages, e, i, n.id), this.emitMessagesChange()), this.events.onApprovalRequest?.({
3868
3869
  toolCallId: i,
3869
3870
  toolName: a,
3870
3871
  input: o,
@@ -3891,13 +3892,13 @@ var Mo = class e {
3891
3892
  }
3892
3893
  handleRunErrorEvent(e) {
3893
3894
  this.hasError = !0;
3894
- let t = mo(e);
3895
+ let t = po(e);
3895
3896
  t ? this.activeRuns.delete(t) : this.activeRuns.clear();
3896
3897
  let { messageId: n } = this.ensureAssistantMessage(), r = e.message || "An error occurred";
3897
- e.message || console.error("[StreamProcessor] RUN_ERROR with no message; original chunk:", e), this.structuredMessageIds.has(n) && (this.flushStructuredOutputUpdate(n), this.messages = Oo(this.messages, n, r), this.structuredMessageIds.delete(n), this.emitStructuredOutputChange(n, "error"), this.emitMessagesChange()), this.events.onError?.(ui(e));
3898
+ e.message || console.error("[StreamProcessor] RUN_ERROR with no message; original chunk:", e), this.structuredMessageIds.has(n) && (this.flushStructuredOutputUpdate(n), this.messages = Do(this.messages, n, r), this.structuredMessageIds.delete(n), this.emitStructuredOutputChange(n, "error"), this.emitMessagesChange()), this.events.onError?.(ci(e));
3898
3899
  }
3899
3900
  handleStepStartedEvent(e) {
3900
- let t = e.stepName || Pa(), n = this.getActiveAssistantMessageId();
3901
+ let t = e.stepName || Na(), n = this.getActiveAssistantMessageId();
3901
3902
  if (n) {
3902
3903
  let e = this.getMessageState(n);
3903
3904
  if (e) {
@@ -3913,7 +3914,7 @@ var Mo = class e {
3913
3914
  let { messageId: r, state: i } = this.ensureAssistantMessage(this.getActiveAssistantMessageId() ?? void 0), a = i.currentThinkingStepId ?? t.stepId;
3914
3915
  if (!a) return;
3915
3916
  let o = i.thinkingSteps.get(a);
3916
- o !== void 0 && (i.thinkingStepSignatures.set(a, n), this.messages = ko(this.messages, r, a, o, n), this.emitMessagesChange());
3917
+ o !== void 0 && (i.thinkingStepSignatures.set(a, n), this.messages = Oo(this.messages, r, a, o, n), this.emitMessagesChange());
3917
3918
  }
3918
3919
  handleReasoningMessageContentEvent(e) {
3919
3920
  let { messageId: t, state: n } = this.ensureAssistantMessage(this.getActiveAssistantMessageId() ?? void 0);
@@ -3923,7 +3924,7 @@ var Mo = class e {
3923
3924
  let i = n.currentThinkingStepId ?? e.messageId;
3924
3925
  n.thinkingSteps.has(i) || (n.thinkingSteps.set(i, ""), n.thinkingStepOrder.push(i), n.currentThinkingStepId = i);
3925
3926
  let a = (n.thinkingSteps.get(i) ?? "") + r;
3926
- n.thinkingSteps.set(i, a), this.messages = ko(this.messages, t, i, a, n.thinkingStepSignatures.get(i)), this.emitMessagesChange(), this.events.onThinkingUpdate?.(t, i, a);
3927
+ n.thinkingSteps.set(i, a), this.messages = Oo(this.messages, t, i, a, n.thinkingStepSignatures.get(i)), this.emitMessagesChange(), this.events.onThinkingUpdate?.(t, i, a);
3927
3928
  }
3928
3929
  handleReasoningEncryptedValueEvent(e) {
3929
3930
  let t = e.encryptedValue;
@@ -3935,7 +3936,7 @@ var Mo = class e {
3935
3936
  let { messageId: n, state: r } = this.ensureAssistantMessage(this.getActiveAssistantMessageId() ?? void 0), i = r.currentThinkingStepId ?? e.entityId;
3936
3937
  r.thinkingStepSignatures.set(i, t);
3937
3938
  let a = r.thinkingSteps.get(i) ?? "";
3938
- r.thinkingSteps.has(i) || (r.thinkingSteps.set(i, a), r.thinkingStepOrder.push(i)), this.messages = ko(this.messages, n, i, a, t), this.emitMessagesChange();
3939
+ r.thinkingSteps.has(i) || (r.thinkingSteps.set(i, a), r.thinkingStepOrder.push(i)), this.messages = Oo(this.messages, n, i, a, t), this.emitMessagesChange();
3939
3940
  }
3940
3941
  attachToolCallSignature(e, t) {
3941
3942
  this.messages = this.messages.map((n) => {
@@ -3974,7 +3975,7 @@ var Mo = class e {
3974
3975
  }
3975
3976
  if (e.name === "structured-output.complete" && e.value) {
3976
3977
  let n = e.value, { messageId: r } = this.ensureAssistantMessage(n.messageId ?? t ?? void 0);
3977
- r && (this.flushStructuredOutputUpdate(r), this.messages = Do(this.messages, r, n.object, n.raw ?? "", n.reasoning), this.structuredMessageIds.delete(r), this.emitStructuredOutputChange(r, "complete"), this.emitMessagesChange());
3978
+ r && (this.flushStructuredOutputUpdate(r), this.messages = Eo(this.messages, r, n.object, n.raw ?? "", n.reasoning), this.structuredMessageIds.delete(r), this.emitStructuredOutputChange(r, "complete"), this.emitMessagesChange());
3978
3979
  }
3979
3980
  if (e.name === "tool-input-available" && e.value) {
3980
3981
  let { toolCallId: t, toolName: n, input: r } = e.value;
@@ -3987,7 +3988,7 @@ var Mo = class e {
3987
3988
  }
3988
3989
  if (e.name === "approval-requested" && e.value) {
3989
3990
  let { toolCallId: n, toolName: r, input: i, approval: a } = e.value, o = t ?? this.toolCallToMessage.get(n);
3990
- o && (this.messages = Co(this.messages, o, n, a.id), this.emitMessagesChange()), this.events.onApprovalRequest?.({
3991
+ o && (this.messages = So(this.messages, o, n, a.id), this.emitMessagesChange()), this.events.onApprovalRequest?.({
3991
3992
  toolCallId: n,
3992
3993
  toolName: r,
3993
3994
  input: i,
@@ -4041,7 +4042,7 @@ var Mo = class e {
4041
4042
  } catch {
4042
4043
  n.parsedArguments = void 0;
4043
4044
  }
4044
- this.isToolCallPartErrored(n.id) || this.isToolCallPartAwaitingUserAction(n.id) || (this.messages = xo(this.messages, e, {
4045
+ this.isToolCallPartErrored(n.id) || this.isToolCallPartAwaitingUserAction(n.id) || (this.messages = bo(this.messages, e, {
4045
4046
  id: n.id,
4046
4047
  name: n.name,
4047
4048
  arguments: n.arguments,
@@ -4058,14 +4059,14 @@ var Mo = class e {
4058
4059
  }
4059
4060
  emitTextUpdateForMessage(e) {
4060
4061
  let t = this.getMessageState(e);
4061
- t && (t.lastEmittedText = t.currentSegmentText, this.messages = bo(this.messages, e, t.currentSegmentText), this.emitMessagesChange(), this.events.onTextUpdate?.(e, t.currentSegmentText));
4062
+ t && (t.lastEmittedText = t.currentSegmentText, this.messages = yo(this.messages, e, t.currentSegmentText), this.emitMessagesChange(), this.events.onTextUpdate?.(e, t.currentSegmentText));
4062
4063
  }
4063
4064
  queueStructuredOutputUpdate(e, t) {
4064
4065
  let n = this.structuredOutputUpdateBatches.get(e), r = {
4065
4066
  delta: `${n?.delta ?? ""}${t}`,
4066
4067
  chunkCount: (n?.chunkCount ?? 0) + 1
4067
4068
  };
4068
- this.structuredOutputUpdateBatches.set(e, r), r.chunkCount >= Ao && this.flushStructuredOutputUpdate(e);
4069
+ this.structuredOutputUpdateBatches.set(e, r), r.chunkCount >= ko && this.flushStructuredOutputUpdate(e);
4069
4070
  }
4070
4071
  flushStructuredOutputUpdate(e) {
4071
4072
  let t = this.structuredOutputUpdateBatches.get(e);
@@ -4098,7 +4099,7 @@ var Mo = class e {
4098
4099
  let r = this.messages.find((e) => e.id === t);
4099
4100
  r && r.role === "assistant" && (e = r);
4100
4101
  }
4101
- for (let e of this.structuredMessageIds) this.flushStructuredOutputUpdate(e), this.messages = Oo(this.messages, e, "Stream ended without structured-output.complete"), this.emitStructuredOutputChange(e, "error");
4102
+ for (let e of this.structuredMessageIds) this.flushStructuredOutputUpdate(e), this.messages = Do(this.messages, e, "Stream ended without structured-output.complete"), this.emitStructuredOutputChange(e, "error");
4102
4103
  if (this.structuredMessageIds.clear(), this.structuredOutputUpdateBatches.clear(), this.activeMessageIds.clear(), e && !this.hasError && this.isWhitespaceOnlyMessage(e)) {
4103
4104
  this.messages = this.messages.filter((t) => t.id !== e.id), this.emitMessagesChange();
4104
4105
  return;
@@ -4168,55 +4169,55 @@ var Mo = class e {
4168
4169
  return e.parts.length !== 0 && e.parts.every((e) => e.type === "text" && e.content.trim() === "");
4169
4170
  }
4170
4171
  static async replay(t, n) {
4171
- return new e(n).process(No(t));
4172
+ return new e(n).process(Mo(t));
4172
4173
  }
4173
4174
  };
4174
- function No(e) {
4175
+ function Mo(e) {
4175
4176
  return { async *[Symbol.asyncIterator]() {
4176
4177
  for (let { chunk: t } of e.chunks) yield t;
4177
4178
  } };
4178
4179
  }
4179
4180
  //#endregion
4180
4181
  //#region node_modules/@tanstack/ai/dist/esm/client.js
4181
- var Po = /* @__PURE__ */ function(e) {
4182
+ var No = /* @__PURE__ */ function(e) {
4182
4183
  return e.TEXT_MESSAGE_START = "TEXT_MESSAGE_START", e.TEXT_MESSAGE_CONTENT = "TEXT_MESSAGE_CONTENT", e.TEXT_MESSAGE_END = "TEXT_MESSAGE_END", e.TEXT_MESSAGE_CHUNK = "TEXT_MESSAGE_CHUNK", e.TOOL_CALL_START = "TOOL_CALL_START", e.TOOL_CALL_ARGS = "TOOL_CALL_ARGS", e.TOOL_CALL_END = "TOOL_CALL_END", e.TOOL_CALL_CHUNK = "TOOL_CALL_CHUNK", e.TOOL_CALL_RESULT = "TOOL_CALL_RESULT", e.THINKING_START = "THINKING_START", e.THINKING_END = "THINKING_END", e.THINKING_TEXT_MESSAGE_START = "THINKING_TEXT_MESSAGE_START", e.THINKING_TEXT_MESSAGE_CONTENT = "THINKING_TEXT_MESSAGE_CONTENT", e.THINKING_TEXT_MESSAGE_END = "THINKING_TEXT_MESSAGE_END", e.STATE_SNAPSHOT = "STATE_SNAPSHOT", e.STATE_DELTA = "STATE_DELTA", e.MESSAGES_SNAPSHOT = "MESSAGES_SNAPSHOT", e.ACTIVITY_SNAPSHOT = "ACTIVITY_SNAPSHOT", e.ACTIVITY_DELTA = "ACTIVITY_DELTA", e.RAW = "RAW", e.CUSTOM = "CUSTOM", e.RUN_STARTED = "RUN_STARTED", e.RUN_FINISHED = "RUN_FINISHED", e.RUN_ERROR = "RUN_ERROR", e.STEP_STARTED = "STEP_STARTED", e.STEP_FINISHED = "STEP_FINISHED", e.REASONING_START = "REASONING_START", e.REASONING_MESSAGE_START = "REASONING_MESSAGE_START", e.REASONING_MESSAGE_CONTENT = "REASONING_MESSAGE_CONTENT", e.REASONING_MESSAGE_END = "REASONING_MESSAGE_END", e.REASONING_MESSAGE_CHUNK = "REASONING_MESSAGE_CHUNK", e.REASONING_END = "REASONING_END", e.REASONING_ENCRYPTED_VALUE = "REASONING_ENCRYPTED_VALUE", e;
4183
- }({}), Fo = class extends Error {
4184
+ }({}), Po = class extends Error {
4184
4185
  missingFeature;
4185
4186
  constructor(e) {
4186
- super(Io(e)), this.name = "UnsupportedResponseStreamError", this.missingFeature = e;
4187
+ super(Fo(e)), this.name = "UnsupportedResponseStreamError", this.missingFeature = e;
4187
4188
  }
4188
4189
  };
4189
- function Io(e) {
4190
+ function Fo(e) {
4190
4191
  return `Streaming fetch responses are not supported in this runtime because ${e} is unavailable. React Native users need a compatible fetch/stream/TextDecoder polyfill, or should use a fetch, XHR, or custom transport that can deliver streaming chunks.`;
4191
4192
  }
4192
- function Lo(e) {
4193
- if (!e.body) throw new Fo("Response.body");
4194
- if (typeof e.body.getReader != "function") throw new Fo("Response.body.getReader");
4193
+ function Io(e) {
4194
+ if (!e.body) throw new Po("Response.body");
4195
+ if (typeof e.body.getReader != "function") throw new Po("Response.body.getReader");
4195
4196
  return e.body.getReader();
4196
4197
  }
4197
- function Ro() {
4198
- if (typeof globalThis.TextDecoder != "function") throw new Fo("TextDecoder");
4198
+ function Lo() {
4199
+ if (typeof globalThis.TextDecoder != "function") throw new Po("TextDecoder");
4199
4200
  return new globalThis.TextDecoder();
4200
4201
  }
4201
4202
  //#endregion
4202
4203
  //#region node_modules/@tanstack/ai-client/dist/esm/sse-utils.js
4203
- function zo(e) {
4204
+ function Ro(e) {
4204
4205
  if (!e.startsWith("data:")) return e;
4205
4206
  let t = e.slice(5);
4206
4207
  return t.startsWith(" ") ? t.slice(1) : t;
4207
4208
  }
4208
4209
  //#endregion
4209
4210
  //#region node_modules/@tanstack/ai-client/dist/esm/message-date-normalizer.js
4210
- function Bo(e) {
4211
+ function zo(e) {
4211
4212
  if (e instanceof Date) return Number.isNaN(e.getTime()) ? void 0 : e;
4212
4213
  if (typeof e != "string") return;
4213
4214
  let t = new Date(e);
4214
4215
  return Number.isNaN(t.getTime()) ? void 0 : t;
4215
4216
  }
4216
- function Vo(e) {
4217
- let t = Bo(e.createdAt), n = e.parts.map((e) => {
4217
+ function Bo(e) {
4218
+ let t = zo(e.createdAt), n = e.parts.map((e) => {
4218
4219
  if (e.type !== "tool-result") return e;
4219
- let t = Bo(e.createdAt), { createdAt: n, ...r } = e;
4220
+ let t = zo(e.createdAt), { createdAt: n, ...r } = e;
4220
4221
  return t ? {
4221
4222
  ...r,
4222
4223
  createdAt: t
@@ -4231,42 +4232,42 @@ function Vo(e) {
4231
4232
  parts: n
4232
4233
  };
4233
4234
  }
4234
- function Ho(e) {
4235
- return e.map(Vo);
4235
+ function Vo(e) {
4236
+ return e.map(Bo);
4236
4237
  }
4237
4238
  //#endregion
4238
4239
  //#region node_modules/@tanstack/ai/dist/esm/byok/providers.js
4239
- var Uo = /^[a-z][a-z0-9-]{0,63}$/;
4240
- function Wo(e) {
4241
- return typeof e == "string" && Uo.test(e);
4240
+ var Ho = /^[a-z][a-z0-9-]{0,63}$/;
4241
+ function Uo(e) {
4242
+ return typeof e == "string" && Ho.test(e);
4242
4243
  }
4243
4244
  //#endregion
4244
4245
  //#region node_modules/@tanstack/ai/dist/esm/byok/missing.js
4245
- function Go(e) {
4246
+ function Wo(e) {
4246
4247
  if (typeof e != "object" || !e || !("error" in e)) return !1;
4247
4248
  let t = e.error;
4248
- return !(typeof t != "object" || !t || !("type" in t) || t.type !== "byok_missing" || !("provider" in t) || typeof t.provider != "string" || !Wo(t.provider) || !("message" in t) || typeof t.message != "string");
4249
+ return !(typeof t != "object" || !t || !("type" in t) || t.type !== "byok_missing" || !("provider" in t) || typeof t.provider != "string" || !Uo(t.provider) || !("message" in t) || typeof t.message != "string");
4249
4250
  }
4250
4251
  //#endregion
4251
4252
  //#region node_modules/@tanstack/ai/dist/esm/byok/errors.js
4252
- var Ko = class extends Error {
4253
+ var Go = class extends Error {
4253
4254
  provider;
4254
4255
  constructor(e) {
4255
4256
  super(`Missing ${e} API key`), this.name = "ByokMissingError", this.provider = e;
4256
4257
  }
4257
- }, qo = class extends Error {
4258
+ }, Ko = class extends Error {
4258
4259
  provider;
4259
4260
  reason;
4260
4261
  constructor(e, t) {
4261
4262
  super(t === "locked" ? `${e} key is locked` : `Missing ${e} API key`), this.name = "ByokBlockedError", this.provider = e, this.reason = t;
4262
4263
  }
4263
- }, Jo = class extends Error {
4264
+ }, qo = class extends Error {
4264
4265
  constructor() {
4265
4266
  super("BYOK is enabled but no provider slug was resolved. Pass byokProvider or forwardedProps.provider."), this.name = "ByokUnresolvedProviderError";
4266
4267
  }
4267
- }, Yo = /* @__PURE__ */ new WeakMap();
4268
- function $(e) {
4269
- return Yo.get(e) ?? mo(e);
4268
+ }, Jo = /* @__PURE__ */ new WeakMap();
4269
+ function Yo(e) {
4270
+ return Jo.get(e) ?? po(e);
4270
4271
  }
4271
4272
  var Xo = class extends Error {
4272
4273
  constructor() {
@@ -4349,7 +4350,7 @@ function cs(e, t) {
4349
4350
  }
4350
4351
  async function* ls(e, t) {
4351
4352
  try {
4352
- let n = Ro(), r = "";
4353
+ let n = Lo(), r = "";
4353
4354
  for (; !t?.aborted;) {
4354
4355
  let i;
4355
4356
  try {
@@ -4374,10 +4375,10 @@ async function* ls(e, t) {
4374
4375
  }
4375
4376
  }
4376
4377
  function us(e) {
4377
- return $a(e);
4378
+ return Qa(e);
4378
4379
  }
4379
4380
  function ds(e) {
4380
- let t = J(e)?.model;
4381
+ let t = X(e)?.model;
4381
4382
  if (typeof t == "string") return t;
4382
4383
  let n = "usage" in e ? e.usage : void 0;
4383
4384
  if (Array.isArray(n)) {
@@ -4394,10 +4395,10 @@ async function* fs(e, t) {
4394
4395
  continue;
4395
4396
  }
4396
4397
  if (o.startsWith(":") || o.startsWith("event:") || o.startsWith("retry:")) continue;
4397
- let e = zo(o);
4398
+ let e = Ro(o);
4398
4399
  if (e === "[DONE]") {
4399
- yield { chunk: li({
4400
- type: Po.RUN_FINISHED,
4400
+ yield { chunk: si({
4401
+ type: No.RUN_FINISHED,
4401
4402
  threadId: n ?? t?.threadId ?? "",
4402
4403
  runId: r ?? t?.runId ?? "",
4403
4404
  timestamp: Date.now()
@@ -4422,7 +4423,7 @@ async function ps(e) {
4422
4423
  if (!e.ok) {
4423
4424
  if (e.status === 401) {
4424
4425
  let t = await e.clone().json().catch(() => null);
4425
- if (Go(t)) throw new Ko(t.error.provider);
4426
+ if (Wo(t)) throw new Go(t.error.provider);
4426
4427
  }
4427
4428
  throw Error(`HTTP error! status: ${e.status} ${e.statusText}`);
4428
4429
  }
@@ -4442,7 +4443,7 @@ async function ms(e, t, n, r, i) {
4442
4443
  pending: o.interrupts.pending
4443
4444
  } : null;
4444
4445
  return {
4445
- messages: Array.isArray(o.messages) ? Ho(o.messages) : [],
4446
+ messages: Array.isArray(o.messages) ? Vo(o.messages) : [],
4446
4447
  activeRun: s,
4447
4448
  interrupts: c
4448
4449
  };
@@ -4470,7 +4471,7 @@ async function hs(e, t, n, r, i) {
4470
4471
  };
4471
4472
  }
4472
4473
  async function* gs(e, t, n) {
4473
- await ps(e), yield* fs(ls(Lo(e), t), n);
4474
+ await ps(e), yield* fs(ls(Io(e), t), n);
4474
4475
  }
4475
4476
  async function* _s(e, t) {
4476
4477
  for await (let { chunk: n } of gs(e, t)) yield n;
@@ -4535,7 +4536,7 @@ function bs(e) {
4535
4536
  if (!t) throw Error("Connection adapter must provide either connect or both subscribe and send");
4536
4537
  let i = [], a = [], o;
4537
4538
  function s(e, t) {
4538
- t && Yo.set(e, t);
4539
+ t && Jo.set(e, t);
4539
4540
  let n = a.shift();
4540
4541
  n ? n(e) : i.push(e);
4541
4542
  }
@@ -4575,8 +4576,8 @@ function bs(e) {
4575
4576
  try {
4576
4577
  let c = e.connect(t, n, r, i);
4577
4578
  for await (let e of c) "threadId" in e && typeof e.threadId == "string" && (o = e.threadId), "runId" in e && typeof e.runId == "string" && (l = e.runId), (e.type === "RUN_FINISHED" || e.type === "RUN_ERROR") && (a = !0), s(e, i?.runId);
4578
- !r?.aborted && !a && s(li({
4579
- type: Po.RUN_FINISHED,
4579
+ !r?.aborted && !a && s(si({
4580
+ type: No.RUN_FINISHED,
4580
4581
  threadId: is(o ?? i?.threadId, "threadId"),
4581
4582
  runId: is(l ?? i?.runId, "runId"),
4582
4583
  timestamp: Date.now()
@@ -4588,7 +4589,7 @@ function bs(e) {
4588
4589
  if (!r?.aborted && !a) try {
4589
4590
  let t = e instanceof Error ? e.message : "Unknown error in connect()";
4590
4591
  s({
4591
- type: Po.RUN_ERROR,
4592
+ type: No.RUN_ERROR,
4592
4593
  threadId: is(o ?? i?.threadId, "threadId"),
4593
4594
  runId: is(l ?? i?.runId, "runId"),
4594
4595
  timestamp: Date.now(),
@@ -4607,7 +4608,7 @@ function bs(e) {
4607
4608
  };
4608
4609
  }
4609
4610
  function xs(e, t, n, r) {
4610
- let i = La(e), a = {
4611
+ let i = Ia(e), a = {
4611
4612
  ...r.body,
4612
4613
  ...n?.forwardedProps ?? {},
4613
4614
  ...t
@@ -4707,10 +4708,10 @@ function Ts(e) {
4707
4708
  return e.resumable;
4708
4709
  }
4709
4710
  function Es(e, t) {
4710
- let n = $i(e.descriptor);
4711
+ let n = Zi(e.descriptor);
4711
4712
  return n ? {
4712
4713
  ...t,
4713
- metadata: Qi(n)
4714
+ metadata: Xi(n)
4714
4715
  } : t;
4715
4716
  }
4716
4717
  function Ds(e) {
@@ -4755,16 +4756,16 @@ function Ns(e) {
4755
4756
  return js(e.metadata) || Ms(e.metadata);
4756
4757
  }
4757
4758
  function Ps(e) {
4758
- return Ki(e);
4759
+ return Wi(e);
4759
4760
  }
4760
4761
  function Fs(e) {
4761
4762
  if (!As(e.metadata)) return !1;
4762
- let t = e.metadata[Vi];
4763
+ let t = e.metadata[zi];
4763
4764
  return !As(t) || t.v !== void 0 && t.v !== 1 ? !1 : t.kind === "generic" || t.kind === "tool-approval" || t.kind === "client-tool-execution" || "definitionId" in t || "key" in t || "batchIndex" in t || "payloadSchemaHash" in t;
4764
4765
  }
4765
4766
  function Is(e) {
4766
4767
  if (!As(e.metadata)) return !1;
4767
- let t = e.metadata[Vi];
4768
+ let t = e.metadata[zi];
4768
4769
  return !As(t) || t.kind !== "generic" ? !1 : "definitionId" in t || "key" in t || "batchIndex" in t || "payloadSchemaHash" in t;
4769
4770
  }
4770
4771
  function Ls(e) {
@@ -4775,14 +4776,14 @@ function Rs(e) {
4775
4776
  }
4776
4777
  function zs(e) {
4777
4778
  if (e.responseSchema !== void 0) try {
4778
- return _i(gi(e.responseSchema));
4779
+ return hi(mi(e.responseSchema));
4779
4780
  } catch {
4780
4781
  return;
4781
4782
  }
4782
4783
  }
4783
4784
  function Bs(e) {
4784
4785
  if (e !== void 0) try {
4785
- return Yi(e);
4786
+ return qi(e);
4786
4787
  } catch {
4787
4788
  return;
4788
4789
  }
@@ -4795,7 +4796,7 @@ function Hs(e, t, n) {
4795
4796
  valid: !0,
4796
4797
  payload: t
4797
4798
  };
4798
- if (Ci(e)) {
4799
+ if (xi(e)) {
4799
4800
  let r = e["~standard"].validate(t), i = (e) => e.issues ? {
4800
4801
  code: n,
4801
4802
  message: e.issues[0]?.message ?? "Schema validation failed."
@@ -4848,7 +4849,7 @@ function Xs(e, t) {
4848
4849
  }
4849
4850
  function Zs(e, t, n) {
4850
4851
  let r = zs(e) ?? n?.responseSchemaHash;
4851
- return Y({
4852
+ return Z({
4852
4853
  v: 1,
4853
4854
  kind: "generic",
4854
4855
  interruptId: e.id,
@@ -4859,7 +4860,7 @@ function Zs(e, t, n) {
4859
4860
  });
4860
4861
  }
4861
4862
  function Qs(e, t) {
4862
- let n = Y(e.descriptor), r = e.error === void 0 ? Object.freeze([]) : Object.freeze([Y(e.error)]), i = r[0];
4863
+ let n = Z(e.descriptor), r = e.error === void 0 ? Object.freeze([]) : Object.freeze([Z(e.error)]), i = r[0];
4863
4864
  return {
4864
4865
  id: n.id,
4865
4866
  interruptId: n.id,
@@ -4913,7 +4914,7 @@ var $s = class {
4913
4914
  threadId: e.threadId,
4914
4915
  interruptedRunId: e.interruptedRunId,
4915
4916
  generation: e.generation,
4916
- interrupts: Y(e.interrupts)
4917
+ interrupts: Z(e.interrupts)
4917
4918
  };
4918
4919
  let n = /* @__PURE__ */ new Map();
4919
4920
  for (let t of e.interrupts) {
@@ -4981,7 +4982,7 @@ var $s = class {
4981
4982
  return n ? (this.resolveItem(n.descriptor.id, { approved: t }), !0) : !1;
4982
4983
  }
4983
4984
  hydrateInterrupt(e, t, n) {
4984
- let r = Y(e), i = Ps(r), a = i === void 0 && Ns(r);
4985
+ let r = Z(e), i = Ps(r), a = i === void 0 && Ns(r);
4985
4986
  if (i === void 0 && !a) return Fs(r) ? {
4986
4987
  descriptor: r,
4987
4988
  binding: Zs(r, t, void 0),
@@ -5014,10 +5015,10 @@ var $s = class {
5014
5015
  if (s && i.kind === "tool-approval") {
5015
5016
  let e = this.tools?.find((e) => e.name === i.toolName);
5016
5017
  if (e?.needsApproval === !0 && r.toolCallId === i.toolCallId) try {
5017
- let t = zi(e.approvalSchema, e.inputSchema);
5018
- if (Bi(e.inputSchema) === i.inputSchemaHash && t.approvalSchemaHash === i.approvalSchemaHash && t.responseSchemaHash === i.responseSchemaHash) return {
5018
+ let t = Li(e.approvalSchema, e.inputSchema);
5019
+ if (Ri(e.inputSchema) === i.inputSchemaHash && t.approvalSchemaHash === i.approvalSchemaHash && t.responseSchemaHash === i.responseSchemaHash) return {
5019
5020
  descriptor: r,
5020
- binding: Y(i),
5021
+ binding: Z(i),
5021
5022
  kind: "tool-approval",
5022
5023
  status: "pending",
5023
5024
  canResolve: !0,
@@ -5029,9 +5030,9 @@ var $s = class {
5029
5030
  }
5030
5031
  if (s && i.kind === "client-tool-execution") {
5031
5032
  let e = this.tools?.find((e) => e.name === i.toolName);
5032
- if (e !== void 0 && r.toolCallId === i.toolCallId && Bi(e.outputSchema) === i.outputSchemaHash) return {
5033
+ if (e !== void 0 && r.toolCallId === i.toolCallId && Ri(e.outputSchema) === i.outputSchemaHash) return {
5033
5034
  descriptor: r,
5034
- binding: Y(i),
5035
+ binding: Z(i),
5035
5036
  kind: "client-tool-execution",
5036
5037
  status: "pending",
5037
5038
  canResolve: !0,
@@ -5042,7 +5043,7 @@ var $s = class {
5042
5043
  }
5043
5044
  if (i !== void 0 && i.kind === "generic" && i.definitionId !== void 0 && i.key !== void 0 && i.batchIndex !== void 0 && i.key.length > 0 && n.get(i.batchIndex) !== 1) return {
5044
5045
  descriptor: r,
5045
- binding: Y(i),
5046
+ binding: Z(i),
5046
5047
  kind: "generic",
5047
5048
  status: "error",
5048
5049
  canResolve: !1,
@@ -5056,13 +5057,13 @@ var $s = class {
5056
5057
  let t = Ls(r);
5057
5058
  return {
5058
5059
  descriptor: r,
5059
- binding: Y(i),
5060
+ binding: Z(i),
5060
5061
  definition: e,
5061
5062
  kind: "generic",
5062
5063
  status: "pending",
5063
5064
  canResolve: !0,
5064
5065
  resumable: !0,
5065
- ...t === void 0 ? {} : { payload: Y(t) },
5066
+ ...t === void 0 ? {} : { payload: Z(t) },
5066
5067
  validationGeneration: 0
5067
5068
  };
5068
5069
  }
@@ -5090,13 +5091,13 @@ var $s = class {
5090
5091
  return Object.freeze(e);
5091
5092
  }
5092
5093
  if (n.kind === "tool-approval" && n.binding.kind === "tool-approval") {
5093
- let t = Y(n.binding), i = {
5094
+ let t = Z(n.binding), i = {
5094
5095
  ...r,
5095
5096
  kind: "tool-approval",
5096
5097
  binding: t,
5097
5098
  toolName: n.binding.toolName,
5098
5099
  toolCallId: n.binding.toolCallId,
5099
- originalArgs: Y(n.binding.originalArgs),
5100
+ originalArgs: Z(n.binding.originalArgs),
5100
5101
  cancel: () => this.cancelItem(n.descriptor.id, e),
5101
5102
  clearResolution: () => this.clearItem(n.descriptor.id, e),
5102
5103
  resolveInterrupt: (t, r) => {
@@ -5110,7 +5111,7 @@ var $s = class {
5110
5111
  };
5111
5112
  return Object.freeze(i);
5112
5113
  }
5113
- let i = n.binding.kind === "generic" ? Y(n.binding) : Y({
5114
+ let i = n.binding.kind === "generic" ? Z(n.binding) : Z({
5114
5115
  v: 1,
5115
5116
  kind: "generic",
5116
5117
  interruptId: n.descriptor.id,
@@ -5198,7 +5199,7 @@ var $s = class {
5198
5199
  maybeSubmit() {
5199
5200
  let e = this.items.some((e) => e.kind === "generic"), t = this.items.filter((t) => Ts(t) && !(e && t.kind === "client-tool-execution"));
5200
5201
  if (t.length === 0 || t.some((e) => e.resolution === void 0 || e.status !== "staged")) return;
5201
- let n = this.requireHydration(), r = yi(t.map((e) => e.resolution).filter((e) => e !== void 0)), i = Object.freeze({
5202
+ let n = this.requireHydration(), r = _i(t.map((e) => e.resolution).filter((e) => e !== void 0)), i = Object.freeze({
5202
5203
  threadId: n.threadId,
5203
5204
  interruptedRunId: n.interruptedRunId,
5204
5205
  generation: n.generation,
@@ -5225,7 +5226,7 @@ var $s = class {
5225
5226
  })])), n || this.publish();
5226
5227
  return;
5227
5228
  }
5228
- e.resolution = Y(Es(e, {
5229
+ e.resolution = Z(Es(e, {
5229
5230
  interruptId: e.descriptor.id,
5230
5231
  status: "resolved",
5231
5232
  payload: t.payload
@@ -5293,7 +5294,7 @@ var $s = class {
5293
5294
  return;
5294
5295
  }
5295
5296
  this.invalidateRetry();
5296
- for (let n of t) n.validationGeneration++, n.resolution = Y({
5297
+ for (let n of t) n.validationGeneration++, n.resolution = Z({
5297
5298
  interruptId: n.descriptor.id,
5298
5299
  status: "resolved",
5299
5300
  payload: { approved: e }
@@ -5384,8 +5385,8 @@ var $s = class {
5384
5385
  let i = !1, a = !1, o = [];
5385
5386
  for (let e of r) if ((e.code === "stale" || e.code === "expired" || e.code === "conflict") && (i = !0), a ||= e.retryable, e.scope === "item") {
5386
5387
  let t = this.items.find((t) => Ts(t) && t.descriptor.id === e.interruptId);
5387
- t && (t.status = "error", t.error = Y(e));
5388
- } else o.push(Y(e));
5388
+ t && (t.status = "error", t.error = Z(e));
5389
+ } else o.push(Z(e));
5389
5390
  let s = Ys(this.rootErrors, this.submissionRootErrors, o);
5390
5391
  this.rootErrors = s.rootErrors, this.submissionRootErrors = s.submissionRootErrors;
5391
5392
  for (let e of this.items) Ts(e) && e.status === "submitting" && (e.status = "error");
@@ -5434,11 +5435,11 @@ var $s = class {
5434
5435
  //#region node_modules/@tanstack/ai-client/dist/esm/byok/resolve.js
5435
5436
  function ec(e, ...t) {
5436
5437
  let n = e?.();
5437
- if (Wo(n)) return n;
5438
- for (let e of t) if (Wo(e)) return e;
5438
+ if (Uo(n)) return n;
5439
+ for (let e of t) if (Uo(e)) return e;
5439
5440
  }
5440
5441
  async function tc(e, t) {
5441
- if (!t) throw new Jo();
5442
+ if (!t) throw new qo();
5442
5443
  return await e.prepare(t), e.headers(t);
5443
5444
  }
5444
5445
  //#endregion
@@ -5569,7 +5570,7 @@ var nc = class {
5569
5570
  ...typeof t?.toolCallId == "string" ? { toolCallId: t.toolCallId } : {}
5570
5571
  };
5571
5572
  if (i) {
5572
- let r = ao({
5573
+ let r = io({
5573
5574
  eventType: e,
5574
5575
  clientId: this.clientId,
5575
5576
  ...o,
@@ -5577,18 +5578,18 @@ var nc = class {
5577
5578
  visibility: a,
5578
5579
  timestamp: n
5579
5580
  });
5580
- uo.emit(e, {
5581
+ lo.emit(e, {
5581
5582
  ...t,
5582
5583
  ...r
5583
5584
  });
5584
5585
  } else {
5585
- let r = ao({
5586
+ let r = io({
5586
5587
  eventType: e,
5587
5588
  source: "client",
5588
5589
  visibility: "client-state",
5589
5590
  timestamp: n
5590
5591
  });
5591
- uo.emit(e, {
5592
+ lo.emit(e, {
5592
5593
  ...t,
5593
5594
  ...r
5594
5595
  });
@@ -5749,7 +5750,7 @@ var dc = class {
5749
5750
  this.skipNextPersist = !0;
5750
5751
  }
5751
5752
  shouldIgnoreChunk(e) {
5752
- let t = $(e);
5753
+ let t = Yo(e);
5753
5754
  if (t && this.clearedRunIds.has(t)) return e.type === "RUN_STARTED" && (this.ignoredActiveRunIds.add(t), this.currentRunlessRunId = t), this.markIgnoredChunkIds(e), !0;
5754
5755
  if (t && this.ignoredActiveRunIds.has(t) || this.isRunlessChunkFromIgnoredRun(e)) return this.markIgnoredChunkIds(e), !0;
5755
5756
  let n = cc(e);
@@ -5782,7 +5783,7 @@ var dc = class {
5782
5783
  n && this.clearedToolCallIds.add(n);
5783
5784
  }
5784
5785
  isRunlessChunkFromIgnoredRun(e) {
5785
- return $(e) || !this.currentRunlessRunId || !this.ignoredActiveRunIds.has(this.currentRunlessRunId) && !this.clearedRunIds.has(this.currentRunlessRunId) ? !1 : e.type === "TEXT_MESSAGE_START" || e.type === "TEXT_MESSAGE_CONTENT" || e.type === "TOOL_CALL_START" || e.type === "TOOL_CALL_ARGS" || e.type === "TOOL_CALL_END" || e.type === "TOOL_CALL_RESULT" || e.type === "MESSAGES_SNAPSHOT" || e.type === "RUN_ERROR";
5786
+ return Yo(e) || !this.currentRunlessRunId || !this.ignoredActiveRunIds.has(this.currentRunlessRunId) && !this.clearedRunIds.has(this.currentRunlessRunId) ? !1 : e.type === "TEXT_MESSAGE_START" || e.type === "TEXT_MESSAGE_CONTENT" || e.type === "TOOL_CALL_START" || e.type === "TOOL_CALL_ARGS" || e.type === "TOOL_CALL_END" || e.type === "TOOL_CALL_RESULT" || e.type === "MESSAGES_SNAPSHOT" || e.type === "RUN_ERROR";
5786
5787
  }
5787
5788
  };
5788
5789
  //#endregion
@@ -5808,7 +5809,7 @@ var hc = class {
5808
5809
  e.currentRunId && (this.clearedRunIds.add(e.currentRunId), this.ignoredActiveRunIds.add(e.currentRunId));
5809
5810
  }
5810
5811
  shouldIgnoreChunk(e) {
5811
- let t = $(e);
5812
+ let t = Yo(e);
5812
5813
  if (t && this.clearedRunIds.has(t)) return e.type === "RUN_STARTED" && (this.ignoredActiveRunIds.add(t), this.currentRunlessRunId = t), this.markIgnoredChunkIds(e), !0;
5813
5814
  if (t && this.ignoredActiveRunIds.has(t) || this.isRunlessChunkFromIgnoredRun(e)) return this.markIgnoredChunkIds(e), !0;
5814
5815
  let n = fc(e);
@@ -5841,7 +5842,7 @@ var hc = class {
5841
5842
  n && this.clearedToolCallIds.add(n);
5842
5843
  }
5843
5844
  isRunlessChunkFromIgnoredRun(e) {
5844
- return $(e) || !this.currentRunlessRunId || !this.ignoredActiveRunIds.has(this.currentRunlessRunId) && !this.clearedRunIds.has(this.currentRunlessRunId) ? !1 : e.type === "TEXT_MESSAGE_START" || e.type === "TEXT_MESSAGE_CONTENT" || e.type === "TOOL_CALL_START" || e.type === "TOOL_CALL_ARGS" || e.type === "TOOL_CALL_END" || e.type === "TOOL_CALL_RESULT" || e.type === "MESSAGES_SNAPSHOT" || e.type === "RUN_ERROR";
5845
+ return Yo(e) || !this.currentRunlessRunId || !this.ignoredActiveRunIds.has(this.currentRunlessRunId) && !this.clearedRunIds.has(this.currentRunlessRunId) ? !1 : e.type === "TEXT_MESSAGE_START" || e.type === "TEXT_MESSAGE_CONTENT" || e.type === "TOOL_CALL_START" || e.type === "TOOL_CALL_ARGS" || e.type === "TOOL_CALL_END" || e.type === "TOOL_CALL_RESULT" || e.type === "MESSAGES_SNAPSHOT" || e.type === "RUN_ERROR";
5845
5846
  }
5846
5847
  };
5847
5848
  //#endregion
@@ -5866,7 +5867,7 @@ function vc(e) {
5866
5867
  function yc(e) {
5867
5868
  if (e.type !== "RUN_FINISHED" || e.outcome?.type === "interrupt") return !1;
5868
5869
  let t = e;
5869
- return t.finishReason === void 0 ? J(e)?.finishReason === "tool_calls" : t.finishReason === "tool_calls";
5870
+ return t.finishReason === void 0 ? X(e)?.finishReason === "tool_calls" : t.finishReason === "tool_calls";
5870
5871
  }
5871
5872
  function bc(e) {
5872
5873
  let t = {
@@ -5914,7 +5915,7 @@ function xc(e) {
5914
5915
  typeof t.content.content == "string" ? r.push({
5915
5916
  type: "text",
5916
5917
  content: t.content.content
5917
- }) : r.push(...t.content.content), i = ci(i, t.content.metadata);
5918
+ }) : r.push(...t.content.content), i = oi(i, t.content.metadata);
5918
5919
  }
5919
5920
  return {
5920
5921
  content: {
@@ -6050,7 +6051,7 @@ var wc = 2e3, Tc = /* @__PURE__ */ new Set([
6050
6051
  let t = e.initialResumeSnapshot;
6051
6052
  !(Array.isArray(t.pendingInterrupts) && t.pendingInterrupts.length > 0) && t.resumeState.runId && (o = t.resumeState.runId);
6052
6053
  }
6053
- this.processor = new Mo({
6054
+ this.processor = new jo({
6054
6055
  ...e.streamProcessor?.chunkStrategy ? { chunkStrategy: e.streamProcessor.chunkStrategy } : {},
6055
6056
  ...a ? { initialMessages: a } : {},
6056
6057
  events: {
@@ -6176,7 +6177,7 @@ var wc = 2e3, Tc = /* @__PURE__ */ new Set([
6176
6177
  } catch {
6177
6178
  return;
6178
6179
  }
6179
- !this.disposed && this.tailing && (this.isLoading || this.abortController || (t.messages.length > 0 && this.processor.setMessages(Ho(t.messages)), t.interrupts && t.interrupts.pending.length > 0 ? this.applyResumeSnapshot({
6180
+ !this.disposed && this.tailing && (this.isLoading || this.abortController || (t.messages.length > 0 && this.processor.setMessages(Vo(t.messages)), t.interrupts && t.interrupts.pending.length > 0 ? this.applyResumeSnapshot({
6180
6181
  resumeState: {
6181
6182
  threadId: this.threadId,
6182
6183
  runId: t.interrupts.runId
@@ -6198,12 +6199,12 @@ var wc = 2e3, Tc = /* @__PURE__ */ new Set([
6198
6199
  }
6199
6200
  retireIgnoredClearedTerminalChunk(e) {
6200
6201
  if (e.type !== "RUN_FINISHED" && e.type !== "RUN_ERROR") return;
6201
- let t = $(e) ?? this.clearedStreamTracker.takeRunlessRunId();
6202
- t && (this.activeRunIds.delete(t), this.setSessionGenerating(this.activeRunIds.size > 0), $(e) || this.resolveProcessing());
6202
+ let t = Yo(e) ?? this.clearedStreamTracker.takeRunlessRunId();
6203
+ t && (this.activeRunIds.delete(t), this.setSessionGenerating(this.activeRunIds.size > 0), Yo(e) || this.resolveProcessing());
6203
6204
  }
6204
6205
  updateRunLifecycle(e, t) {
6205
6206
  if (e.type === "RUN_STARTED") {
6206
- let t = $(e) ?? e.runId;
6207
+ let t = Yo(e) ?? e.runId;
6207
6208
  this.activeResumeThreadId = "threadId" in e && typeof e.threadId == "string" ? e.threadId : this.activeResumeThreadId, this.activeResumeRunId = t, this.activeRunIds.add(t), this.clearedStreamTracker.onRunStarted(t), this.setSessionGenerating(!0), this.persistor && this.connection.joinRun && !this.lastResume && this.persistResumeSnapshot({
6208
6209
  threadId: this.activeResumeThreadId ?? this.threadId,
6209
6210
  runId: t
@@ -6211,14 +6212,14 @@ var wc = 2e3, Tc = /* @__PURE__ */ new Set([
6211
6212
  return;
6212
6213
  }
6213
6214
  if (e.type !== "RUN_FINISHED" && e.type !== "RUN_ERROR") return;
6214
- let n = $(e);
6215
+ let n = Yo(e);
6215
6216
  n ? (this.activeRunIds.delete(n), this.clearedStreamTracker.onRunSettled(n)) : e.type === "RUN_ERROR" && (this.activeRunIds.clear(), this.clearedStreamTracker.onSessionRunError()), this.setSessionGenerating(this.activeRunIds.size > 0);
6216
6217
  let r = e.type === "RUN_FINISHED" && yc(e);
6217
6218
  t?.resolveProcessing !== !1 && !r && this.resolveProcessing();
6218
6219
  }
6219
6220
  observeInterruptState(e) {
6220
6221
  if (e.type !== "RUN_FINISHED" && e.type !== "RUN_ERROR" || this.activeInterruptSubmission && e.type === "RUN_ERROR") return;
6221
- let t = $(e), n = "threadId" in e && typeof e.threadId == "string" ? e.threadId : this.activeResumeThreadId;
6222
+ let t = Yo(e), n = "threadId" in e && typeof e.threadId == "string" ? e.threadId : this.activeResumeThreadId;
6222
6223
  if (e.type === "RUN_FINISHED" && e.outcome?.type === "interrupt") {
6223
6224
  let r = this.currentRunId ?? t ?? this.activeResumeRunId ?? "";
6224
6225
  this.lastResume = {
@@ -6468,25 +6469,25 @@ var wc = 2e3, Tc = /* @__PURE__ */ new Set([
6468
6469
  t && t.role === "assistant" && this.processor.setMessages(e.slice(0, -1));
6469
6470
  }
6470
6471
  async processIncomingChunk(e, t) {
6471
- if (e = $a(e), e.type === "RUN_ERROR" && this.isActiveInterruptSubmissionFailure(e)) {
6472
- let t = J(e)?.interruptErrors;
6472
+ if (e = Qa(e), e.type === "RUN_ERROR" && this.isActiveInterruptSubmissionFailure(e)) {
6473
+ let t = X(e)?.interruptErrors;
6473
6474
  this.interruptSubmissionFailure = { errors: Array.isArray(t) ? t : [] };
6474
6475
  }
6475
6476
  if (this.connectionStatus === "connecting" && this.setConnectionStatus("connected"), this.clearedStreamTracker.shouldIgnoreChunk(e)) {
6476
- (e.type === "RUN_FINISHED" || e.type === "RUN_ERROR") && ($(e) ? this.updateRunLifecycle(e, { resolveProcessing: !1 }) : this.drainIgnoredRunlessChunk(e), this.retireIgnoredClearedTerminalChunk(e), this.resolveJoinedRun(e));
6477
+ (e.type === "RUN_FINISHED" || e.type === "RUN_ERROR") && (Yo(e) ? this.updateRunLifecycle(e, { resolveProcessing: !1 }) : this.drainIgnoredRunlessChunk(e), this.retireIgnoredClearedTerminalChunk(e), this.resolveJoinedRun(e));
6477
6478
  return;
6478
6479
  }
6479
6480
  this.callbacksRef.current.onChunk(e), this.devtoolsBridge.observeChunk(e), this.processor.processChunk(e), this.updateRunLifecycle(e), this.observeInterruptState(e), t?.defer !== !1 && (typeof document > "u" || !document.hidden) && await new Promise((e) => setTimeout(e, 0)), this.resolveJoinedRun(e);
6480
6481
  }
6481
6482
  isActiveInterruptSubmissionFailure(e) {
6482
- let t = this.activeInterruptSubmission, n = J(e)?.interruptErrors;
6483
+ let t = this.activeInterruptSubmission, n = X(e)?.interruptErrors;
6483
6484
  if (!t || !Array.isArray(n) || n.length === 0) return !1;
6484
- let r = $(e);
6485
+ let r = Yo(e);
6485
6486
  return r !== void 0 && r !== this.currentRunId || typeof e.threadId == "string" && e.threadId !== t.threadId ? !1 : n.every((e) => typeof e != "object" || !e || typeof e.threadId != "string" || typeof e.interruptedRunId != "string" || typeof e.generation != "number" ? !1 : e.threadId === t.threadId && e.interruptedRunId === t.interruptedRunId && e.generation === t.generation);
6486
6487
  }
6487
6488
  resolveJoinedRun(e) {
6488
6489
  if (e.type !== "RUN_FINISHED" && e.type !== "RUN_ERROR") return;
6489
- let t = $(e);
6490
+ let t = Yo(e);
6490
6491
  if (t === void 0) return;
6491
6492
  let n = this.joinedRunWaiters.get(t);
6492
6493
  n !== void 0 && (this.joinedRunWaiters.delete(t), n());
@@ -6595,7 +6596,7 @@ var wc = 2e3, Tc = /* @__PURE__ */ new Set([
6595
6596
  }
6596
6597
  async append(e) {
6597
6598
  if (this.mountDevtools(), this.hasPendingInterrupts()) throw Error("ChatClient: cannot append normal input while pending interrupts exist. Use resumeInterrupts() instead.");
6598
- let t = Na(e, Pa);
6599
+ let t = Ma(e, Na);
6599
6600
  if (t.role === "system") return;
6600
6601
  let n = t;
6601
6602
  this.events.messageAppended(n);
@@ -6640,7 +6641,7 @@ var wc = 2e3, Tc = /* @__PURE__ */ new Set([
6640
6641
  clientTools: Array.from(u.values()).map((e) => ({
6641
6642
  name: e.name,
6642
6643
  description: e.description,
6643
- parameters: e.inputSchema ? Oi(e.inputSchema) : { type: "object" }
6644
+ parameters: e.inputSchema ? Ei(e.inputSchema) : { type: "object" }
6644
6645
  })),
6645
6646
  forwardedProps: { ...f },
6646
6647
  ...r ? { resume: r } : {},
@@ -6652,7 +6653,7 @@ var wc = 2e3, Tc = /* @__PURE__ */ new Set([
6652
6653
  } catch (t) {
6653
6654
  let n = t instanceof Error ? t : Error(String(t));
6654
6655
  if (n.name === "AbortError") return s && (this.devtoolsBridge.emitRunLifecycle("run:cancelled", s, "cancelled"), c = !0), !1;
6655
- if (n instanceof Ko && this.byok?.request(n.provider, "missing"), n instanceof qo && n.reason === "locked" && this.byok?.request(n.provider, "locked"), e === this.streamGeneration && (this.reportStreamError(n), s && (this.devtoolsBridge.emitRunLifecycle("run:errored", s, "errored", { error: n.message }), c = !0)), e === this.streamGeneration && (n instanceof Ko || n instanceof qo || n instanceof Jo)) throw n;
6656
+ if (n instanceof Go && this.byok?.request(n.provider, "missing"), n instanceof Ko && n.reason === "locked" && this.byok?.request(n.provider, "locked"), e === this.streamGeneration && (this.reportStreamError(n), s && (this.devtoolsBridge.emitRunLifecycle("run:errored", s, "errored", { error: n.message }), c = !0)), e === this.streamGeneration && (n instanceof Go || n instanceof Ko || n instanceof qo)) throw n;
6656
6657
  } finally {
6657
6658
  e === this.streamGeneration && (this.currentStreamId = null, this.devtoolsBridge.setCurrentStreamId(null), this.currentMessageId = null, this.setCurrentRunId(null), this.activeClientTools = null, this.activeContext = void 0, this.abortController = null, this.setIsLoading(!1), this.pendingMessageBody = void 0, s && !c && (o ? this.devtoolsBridge.emitRunLifecycle("run:completed", s, "completed") : a.aborted && this.devtoolsBridge.emitRunLifecycle("run:cancelled", s, "cancelled")), await this.drainPostStreamActions(), o ? (this.status !== "ready" && this.setStatus("ready"), this.messageQueueDraining || await this.drainQueue()) : this.flushQueue());
6658
6659
  }
@@ -6714,7 +6715,7 @@ var wc = 2e3, Tc = /* @__PURE__ */ new Set([
6714
6715
  }
6715
6716
  }
6716
6717
  validateClientToolOutput(e, t) {
6717
- return e.outputSchema && Ci(e.outputSchema) ? Ai(e.outputSchema, t) : t;
6718
+ return e.outputSchema && xi(e.outputSchema) ? Oi(e.outputSchema, t) : t;
6718
6719
  }
6719
6720
  async addToolApprovalResponse(e) {
6720
6721
  if (this.processor.addToolApprovalResponse(e.id, e.approved), this.devtoolsBridge.emitSnapshot(), this.interruptManager.resolveToolApprovalDecision(e.id, e.approved)) return;
@@ -6940,21 +6941,21 @@ var Nc = class {
6940
6941
  this.options = e;
6941
6942
  }
6942
6943
  emitRegistered() {
6943
- this.prepareForMountEmit() && (this.registered = !0, Q("hook:registered", {
6944
+ this.prepareForMountEmit() && (this.registered = !0, $("hook:registered", {
6944
6945
  ...this.createEnvelope("hook:registered"),
6945
6946
  ...this.createMetadataPayload(),
6946
6947
  lifecycle: "mounted"
6947
6948
  }));
6948
6949
  }
6949
6950
  emitUpdated() {
6950
- this.prepareForEmit() && Q("hook:updated", {
6951
+ this.prepareForEmit() && $("hook:updated", {
6951
6952
  ...this.createEnvelope("hook:updated"),
6952
6953
  ...this.createMetadataPayload(),
6953
6954
  lifecycle: "active"
6954
6955
  });
6955
6956
  }
6956
6957
  emitSnapshot() {
6957
- this.prepareForEmit() && Q("hook:state-snapshot", {
6958
+ this.prepareForEmit() && $("hook:state-snapshot", {
6958
6959
  ...this.createEnvelope("hook:state-snapshot"),
6959
6960
  ...this.createMetadataPayload(),
6960
6961
  state: this.options.getSnapshot()
@@ -6965,19 +6966,19 @@ var Nc = class {
6965
6966
  let e = this.options.getTools ? Array.from(this.options.getTools()).map((e) => ({
6966
6967
  name: e.name,
6967
6968
  description: e.description,
6968
- inputSchema: e.inputSchema ? Oi(e.inputSchema) : { type: "object" },
6969
- outputSchema: e.outputSchema ? Oi(e.outputSchema) : void 0,
6969
+ inputSchema: e.inputSchema ? Ei(e.inputSchema) : { type: "object" },
6970
+ outputSchema: e.outputSchema ? Ei(e.outputSchema) : void 0,
6970
6971
  needsApproval: e.needsApproval,
6971
6972
  metadata: e.metadata
6972
6973
  })) : [];
6973
- Q("tools:registered", {
6974
+ $("tools:registered", {
6974
6975
  ...this.createEnvelope("tools:registered"),
6975
6976
  ...this.createMetadataPayload(),
6976
6977
  tools: e
6977
6978
  });
6978
6979
  }
6979
6980
  emitRunLifecycle(e, t, n, r = {}) {
6980
- this.prepareForEmit() && Q(e, {
6981
+ this.prepareForEmit() && $(e, {
6981
6982
  ...this.createEnvelope(e, "client-state", { runId: t }),
6982
6983
  runId: t,
6983
6984
  status: n,
@@ -7002,7 +7003,7 @@ var Nc = class {
7002
7003
  this.deactivate();
7003
7004
  return;
7004
7005
  }
7005
- Q("hook:unregistered", {
7006
+ $("hook:unregistered", {
7006
7007
  ...this.createEnvelope("hook:unregistered"),
7007
7008
  ...this.createMetadataPayload(),
7008
7009
  reason: "disposed"
@@ -7018,9 +7019,9 @@ var Nc = class {
7018
7019
  activate() {
7019
7020
  if (this.disposed) return;
7020
7021
  let e = jc(), t = e.get(this.options.hookId);
7021
- t && t !== this && (typeof t.supersede == "function" ? t.supersede() : t.deactivate()), e.set(this.options.hookId, this), !(this.unsubscribers.length > 0) && (this.unsubscribers.push(uo.on("devtools:request-state", (e) => {
7022
+ t && t !== this && (typeof t.supersede == "function" ? t.supersede() : t.deactivate()), e.set(this.options.hookId, this), !(this.unsubscribers.length > 0) && (this.unsubscribers.push(lo.on("devtools:request-state", (e) => {
7022
7023
  this.handleRequestState(e);
7023
- })), this.options.applyToolFixture && this.unsubscribers.push(uo.on("devtools:tool-fixture:apply", (e) => {
7024
+ })), this.options.applyToolFixture && this.unsubscribers.push(lo.on("devtools:tool-fixture:apply", (e) => {
7024
7025
  this.handleToolFixtureApply(e);
7025
7026
  })));
7026
7027
  }
@@ -7038,7 +7039,7 @@ var Nc = class {
7038
7039
  return !e.hookId && !e.threadId ? !1 : e.hookId ? e.hookId === this.options.hookId : !e.threadId || !!this.options.threadId && e.threadId === this.options.threadId;
7039
7040
  }
7040
7041
  createEnvelope(e, t = "client-state", n = {}) {
7041
- return ao({
7042
+ return io({
7042
7043
  eventType: e,
7043
7044
  source: "client",
7044
7045
  visibility: t,
@@ -7126,12 +7127,12 @@ var Nc = class {
7126
7127
  let t = e, n = t.scope, r = t.adapter;
7127
7128
  if (!n || typeof r != "string") return;
7128
7129
  let i = this.currentRunId ? { runId: this.currentRunId } : {};
7129
- Q("memory:retrieve:started", {
7130
+ $("memory:retrieve:started", {
7130
7131
  ...this.createEnvelope("memory:retrieve:started", "client-state", i),
7131
7132
  scope: n,
7132
7133
  adapter: r,
7133
7134
  query: t.query ?? ""
7134
- }), t.recall && Q("memory:retrieve:completed", {
7135
+ }), t.recall && $("memory:retrieve:completed", {
7135
7136
  ...this.createEnvelope("memory:retrieve:completed", "client-state", i),
7136
7137
  scope: n,
7137
7138
  adapter: r,
@@ -7139,7 +7140,7 @@ var Nc = class {
7139
7140
  hasTools: !!t.recall.hasTools,
7140
7141
  systemPromptChars: t.recall.systemPromptChars ?? 0,
7141
7142
  durationMs: t.recall.durationMs ?? 0
7142
- }), t.snapshot && Q("memory:snapshot", {
7143
+ }), t.snapshot && $("memory:snapshot", {
7143
7144
  ...this.createEnvelope("memory:snapshot", "client-state", i),
7144
7145
  scope: n,
7145
7146
  adapter: r,
@@ -7161,7 +7162,7 @@ var Nc = class {
7161
7162
  let n = this.currentRunId ? { runId: this.currentRunId } : {};
7162
7163
  if (e === "compaction:started") {
7163
7164
  let e = Dc(t);
7164
- Q("compaction:started", {
7165
+ $("compaction:started", {
7165
7166
  ...this.createEnvelope("compaction:started", "client-state", n),
7166
7167
  ...e
7167
7168
  });
@@ -7169,7 +7170,7 @@ var Nc = class {
7169
7170
  }
7170
7171
  if (e === "compaction:ended") {
7171
7172
  let e = Dc(t);
7172
- Q("compaction:ended", {
7173
+ $("compaction:ended", {
7173
7174
  ...this.createEnvelope("compaction:ended", "client-state", n),
7174
7175
  ...e
7175
7176
  });
@@ -7178,7 +7179,7 @@ var Nc = class {
7178
7179
  if (e === "compaction:state") {
7179
7180
  let e = kc(t);
7180
7181
  if (!e) return;
7181
- Q("compaction:state", {
7182
+ $("compaction:state", {
7182
7183
  ...this.createEnvelope("compaction:state", "client-state", n),
7183
7184
  ...e
7184
7185
  });
@@ -7187,7 +7188,7 @@ var Nc = class {
7187
7188
  emitSkillsState(e) {
7188
7189
  if (!e || typeof e != "object") return;
7189
7190
  let t = e, n = Array.isArray(t.catalog) ? t.catalog : [], r = Array.isArray(t.activated) ? t.activated : [], i = this.currentRunId ? { runId: this.currentRunId } : {};
7190
- Q("skills:snapshot", {
7191
+ $("skills:snapshot", {
7191
7192
  ...this.createEnvelope("skills:snapshot", "client-state", i),
7192
7193
  catalog: n,
7193
7194
  activated: r
@@ -7693,14 +7694,14 @@ function Jc(e) {
7693
7694
  }
7694
7695
  async function Yc(e, t) {
7695
7696
  let n = new Headers(t?.headers ?? {});
7696
- for (let [e, t] of Object.entries(await V())) n.set(e, t);
7697
+ for (let [e, t] of Object.entries(await le())) n.set(e, t);
7697
7698
  return n.set("X-Cui-Timezone", Intl.DateTimeFormat().resolvedOptions().timeZone), fetch(e, {
7698
7699
  ...t,
7699
7700
  headers: n
7700
7701
  });
7701
7702
  }
7702
7703
  function Xc() {
7703
- return `${(W().target.value?.endpoint.url ?? window.location.origin).replace(/\/+$/, "")}/api/assistant/chat`;
7704
+ return `${(V().target.value?.endpoint.url ?? window.location.origin).replace(/\/+$/, "")}/api/assistant/chat`;
7704
7705
  }
7705
7706
  function Zc(e, t) {
7706
7707
  try {
@@ -7737,7 +7738,7 @@ async function Qc(e, t, n, r) {
7737
7738
  }
7738
7739
  case "open_camview": return Zc(e, "/camview");
7739
7740
  case "open_page": {
7740
- let t = we[String(r.page ?? "")];
7741
+ let t = be[String(r.page ?? "")];
7741
7742
  return t ? Zc(e, t.path) : {
7742
7743
  ok: !1,
7743
7744
  message: "unknown page"
@@ -7779,12 +7780,12 @@ async function Qc(e, t, n, r) {
7779
7780
  }
7780
7781
  }
7781
7782
  function $c(e) {
7782
- let t = ce(), n = dt(), r = [...(e.approvalTools ?? []).filter((e) => e.approval && e.inputSchema).map((e) => fo({
7783
+ let t = I(), n = lt(), r = [...(e.approvalTools ?? []).filter((e) => e.approval && e.inputSchema).map((e) => uo({
7783
7784
  name: e.name,
7784
7785
  description: e.description,
7785
7786
  inputSchema: e.inputSchema,
7786
7787
  needsApproval: !0
7787
- })), ...Ee.map((e) => fo({
7788
+ })), ...Se.map((e) => uo({
7788
7789
  name: e.name,
7789
7790
  description: e.description,
7790
7791
  inputSchema: e.inputSchema
@@ -7792,8 +7793,8 @@ function $c(e) {
7792
7793
  language: e.language.value,
7793
7794
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
7794
7795
  }, a = j({}), o = j({}), s = j({}), c = j({}), l = j({}), u = j({}), d = j(null);
7795
- function f() {
7796
- i.disabledGroups = [...e.disabledGroups?.value ?? []], i.instructions = e.instructions?.value?.trim() || void 0, i.modelId = e.modelId?.value ?? void 0;
7796
+ function f(t = !1) {
7797
+ i.regenerate = t, i.disabledGroups = [...e.disabledGroups?.value ?? []], i.instructions = e.instructions?.value?.trim() || void 0, i.modelId = e.modelId?.value ?? void 0;
7797
7798
  }
7798
7799
  function p(e) {
7799
7800
  for (let [t, n] of Object.entries(e)) n.images.length && (a.value[t] = n.images.map((e) => ({
@@ -7807,13 +7808,13 @@ function $c(e) {
7807
7808
  connection: {
7808
7809
  ...Ss(Xc, { fetchClient: Yc }),
7809
7810
  hydrate: async (e) => {
7810
- let t = await ze(e);
7811
+ let t = await Re(e);
7811
7812
  return p(t.attachments), t;
7812
7813
  }
7813
7814
  },
7814
7815
  persistence: !0,
7815
7816
  tools: r,
7816
- interrupts: [Ce],
7817
+ interrupts: [xe],
7817
7818
  queue: {
7818
7819
  whenBusy: "queue",
7819
7820
  maxSize: 5
@@ -7882,16 +7883,16 @@ function $c(e) {
7882
7883
  d.value = null, f(), await m.sendMessage(e);
7883
7884
  }
7884
7885
  async function x() {
7885
- d.value = null, f(), await m.reload();
7886
+ d.value = null, f(!0), await m.reload();
7886
7887
  }
7887
7888
  function S() {
7888
7889
  let e = m.runId.value;
7889
- e && Ue(e).catch(() => void 0), m.stop();
7890
+ e && He(e).catch(() => void 0), m.stop();
7890
7891
  let t = m.messages.value.at(-1);
7891
7892
  d.value = t?.role === "assistant" ? t.id : null;
7892
7893
  }
7893
7894
  async function C() {
7894
- await b(Jn);
7895
+ await b(Kn);
7895
7896
  }
7896
7897
  function w(e, t) {
7897
7898
  p(t), m.setMessages(e);
@@ -7938,7 +7939,7 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
7938
7939
  class: "cui-assistant-note pl-3 text-[13.5px] text-muted"
7939
7940
  }, ml = { class: "font-medium text-color-faded" }, hl = {
7940
7941
  key: 0,
7941
- class: "cui-assistant-dock relative px-4 pb-3 pt-6"
7942
+ class: "relative px-4 pb-3 pt-6"
7942
7943
  }, gl = { class: "mx-auto w-full max-w-[720px]" }, _l = {
7943
7944
  key: 0,
7944
7945
  class: "mb-2 flex flex-col gap-1"
@@ -7975,7 +7976,7 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
7975
7976
  }, Yl = {
7976
7977
  key: 1,
7977
7978
  class: "flex max-h-64 flex-col overflow-y-auto"
7978
- }, Xl = { class: "min-w-0 flex-1 leading-snug" }, Zl = /*#__PURE__*/ B(/* @__PURE__ */ A({
7979
+ }, Xl = { class: "min-w-0 flex-1 leading-snug" }, Zl = /*#__PURE__*/ J(/* @__PURE__ */ A({
7979
7980
  __name: "CuiAssistantConversation",
7980
7981
  props: {
7981
7982
  threadId: {},
@@ -7996,26 +7997,22 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
7996
7997
  "emptied"
7997
7998
  ],
7998
7999
  setup(e, { expose: a, emit: s }) {
7999
- let u = new We(), d = e, f = s, { t: y, locale: S } = De(), O = ue(), { data: k } = u.listProfilesQuery(), A = u.createProfileMutation(), N = u.patchProfileMutation(), F = u.deleteProfileMutation(), { data: I, refetch: re } = u.memoryQuery(), L = u.deleteMemoryFactMutation(), R = u.deleteMemoryMutation(), { data: z } = u.getAssistantInfoQuery(), B = w("scrollRef"), oe = w("contentRef"), V = w("composerRef"), H = w("toolsPopover"), ce = w("memoryPopover"), U = j(!0), W = j([]), G = j(""), K = j(null), le = j(!1), de = j(""), fe = j(null), q = $c({
8000
+ let u = new Y(), d = e, f = s, { t: y, locale: S } = we(), O = he(), { data: k } = u.listProfilesQuery(), A = u.createProfileMutation(), N = u.patchProfileMutation(), F = u.deleteProfileMutation(), { data: I, refetch: R } = u.memoryQuery(), z = u.deleteMemoryFactMutation(), ie = u.deleteMemoryMutation(), { data: B } = u.getAssistantInfoQuery(), V = w("scrollRef"), ae = w("contentRef"), se = w("composerRef"), H = w("toolsPopover"), ce = w("memoryPopover"), U = j(!0), W = j([]), le = j(""), G = j(null), ue = j(!1), K = j(""), fe = j(null), q = $c({
8000
8001
  threadId: _(() => d.threadId),
8001
8002
  initialMessages: d.initialMessages,
8002
8003
  initialAttachments: d.initialAttachments,
8003
8004
  language: S,
8004
8005
  disabledGroups: W,
8005
- instructions: G,
8006
+ instructions: le,
8006
8007
  modelId: fe,
8007
8008
  approvalTools: d.approvalTools,
8008
8009
  onFinish: () => f("finished"),
8009
- onError: (e) => O.add({
8010
- severity: "error",
8011
- detail: e.message,
8012
- life: 5e3
8013
- })
8014
- }), me = _(() => q.messages.value.length === 0), he = _(() => z.value?.settings.models ?? []), ge = _(() => z.value ? $e(z.value.settings) : void 0), _e = _(() => he.value.find((e) => e._id === fe.value) ?? ge.value), ve = _(() => _e.value?.capabilities?.vision === !1 ? _e.value.name : void 0), ye = _(() => q.busy.value && !q.approvals.value.length && !q.questions.value.length && !q.pausedElsewhere.value), Se = _(() => ye.value && q.messages.value.at(-1)?.role !== "assistant"), Ce = _(() => {
8010
+ onError: ot
8011
+ }), pe = _(() => q.messages.value.length === 0), me = _(() => B.value?.settings.models ?? []), J = _(() => B.value ? Ze(B.value.settings) : void 0), ge = _(() => me.value.find((e) => e._id === fe.value) ?? J.value), ye = _(() => ge.value?.capabilities?.vision === !1 ? ge.value.name : void 0), be = _(() => q.busy.value && !q.approvals.value.length && !q.questions.value.length && !q.pausedElsewhere.value), xe = _(() => be.value && q.messages.value.at(-1)?.role !== "assistant"), Se = _(() => {
8015
8012
  let e = q.messages.value, t = [];
8016
8013
  return e.forEach((n, r) => {
8017
- if (Xn(n)) return;
8018
- let i = n.role === "assistant" && Xn(e[r - 1]), a = t[t.length - 1];
8014
+ if (Jn(n)) return;
8015
+ let i = n.role === "assistant" && Jn(e[r - 1]), a = t[t.length - 1];
8019
8016
  if (n.role === "assistant" && !i && a?.message.role === "assistant" && !a.continuation && a.lastIndex === r - 1) {
8020
8017
  a.message = {
8021
8018
  ...a.message,
@@ -8031,7 +8028,7 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8031
8028
  continuation: i
8032
8029
  });
8033
8030
  }), t;
8034
- }), we = _(() => {
8031
+ }), Ce = _(() => {
8035
8032
  let e = /* @__PURE__ */ new Map();
8036
8033
  for (let t of d.tools) {
8037
8034
  let n = t.group === "core" ? y("views.assistant.tool_group_core") : t.group === "docs" ? y("views.assistant.tool_group_docs") : t.group === "terminal" ? y("views.assistant.tool_group_terminal") : t.source.kind === "plugin" ? t.source.pluginName : t.source.kind === "external" ? t.source.serverName : t.group, r = e.get(t.group) ?? {
@@ -8043,83 +8040,83 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8043
8040
  }
8044
8041
  let t = (e) => e === "core" ? 0 : e === "docs" ? 1 : e.startsWith("plugin:") ? 2 : 3;
8045
8042
  return Array.from(e.values()).sort((e, n) => t(e.id) - t(n.id) || e.label.localeCompare(n.label));
8046
- }), Te = _({
8047
- get: () => we.value.filter((e) => !W.value.includes(e.id)).map((e) => e.id),
8043
+ }), Ee = _({
8044
+ get: () => Ce.value.filter((e) => !W.value.includes(e.id)).map((e) => e.id),
8048
8045
  set: (e) => {
8049
- W.value = we.value.filter((t) => !e.includes(t.id)).map((e) => e.id);
8046
+ W.value = Ce.value.filter((t) => !e.includes(t.id)).map((e) => e.id);
8050
8047
  }
8051
- }), Ee = _(() => {
8048
+ }), De = _(() => {
8052
8049
  let e = (/* @__PURE__ */ new Date()).getHours();
8053
8050
  return y(e < 5 ? "views.assistant.greeting_night" : e < 11 ? "views.assistant.greeting_morning" : e < 18 ? "views.assistant.greeting_day" : "views.assistant.greeting_evening");
8054
8051
  });
8055
- function Ae(e) {
8052
+ function ke(e) {
8056
8053
  for (let t of e.ids) if (q.usage.value[t]) return q.usage.value[t];
8057
8054
  }
8058
- function je() {
8059
- let e = B.value;
8055
+ function Ae() {
8056
+ let e = V.value;
8060
8057
  e && (U.value = e.scrollHeight - e.scrollTop - e.clientHeight < 120);
8061
8058
  }
8062
- function Re() {
8063
- U.value = !0, ze();
8059
+ function Le() {
8060
+ U.value = !0, Re();
8064
8061
  }
8065
- function ze() {
8066
- let e = B.value;
8062
+ function Re() {
8063
+ let e = V.value;
8067
8064
  e && (e.scrollTop = e.scrollHeight);
8068
8065
  }
8069
- function Be(e) {
8070
- ce.value?.toggle(e), re();
8066
+ function He(e) {
8067
+ ce.value?.toggle(e), R();
8071
8068
  }
8072
8069
  function Ue(e) {
8073
8070
  let t = k.value?.find((t) => t._id === e);
8074
- t && (W.value = [...t.disabledGroups], G.value = t.instructions, fe.value = he.value.some((e) => e._id === t.modelId) ? t.modelId : null);
8071
+ t && (W.value = [...t.disabledGroups], le.value = t.instructions, fe.value = me.value.some((e) => e._id === t.modelId) ? t.modelId : null);
8075
8072
  }
8076
- function Ge(e) {
8077
- return he.value.find((t) => t._id === e.modelId) ?? ge.value;
8073
+ function We(e) {
8074
+ return me.value.find((t) => t._id === e.modelId) ?? J.value;
8078
8075
  }
8079
- function Ke(e) {
8080
- return e ? Xe(e).filter((e) => e.severity !== "success") : [];
8076
+ function Ge(e) {
8077
+ return e ? Je(e).filter((e) => e.severity !== "success") : [];
8081
8078
  }
8082
8079
  async function qe() {
8083
- let e = de.value.trim();
8080
+ let e = K.value.trim();
8084
8081
  if (!e) return;
8085
8082
  let t = await A.mutateAsync({
8086
8083
  name: e,
8087
- modelId: _e.value?._id ?? "",
8084
+ modelId: ge.value?._id ?? "",
8088
8085
  disabledGroups: [...W.value],
8089
- instructions: G.value.trim()
8086
+ instructions: le.value.trim()
8090
8087
  });
8091
- K.value = t._id, le.value = !1, de.value = "";
8088
+ G.value = t._id, ue.value = !1, K.value = "";
8092
8089
  }
8093
8090
  async function Ye() {
8094
- K.value && await N.mutateAsync({
8095
- profileId: K.value,
8091
+ G.value && await N.mutateAsync({
8092
+ profileId: G.value,
8096
8093
  patch: {
8097
- modelId: _e.value?._id ?? "",
8094
+ modelId: ge.value?._id ?? "",
8098
8095
  disabledGroups: [...W.value],
8099
- instructions: G.value.trim()
8096
+ instructions: le.value.trim()
8100
8097
  }
8101
8098
  });
8102
8099
  }
8103
- async function Ze() {
8104
- K.value &&= (await F.mutateAsync(K.value), null);
8100
+ async function Xe() {
8101
+ G.value &&= (await F.mutateAsync(G.value), null);
8105
8102
  }
8106
8103
  function Qe() {
8107
8104
  for (let e of [H.value, ce.value]) e?.visible && e.alignOverlay();
8108
8105
  }
8109
- function et(e) {
8106
+ function $e(e) {
8110
8107
  let t = q.messages.value, n = e + 1;
8111
- for (; n < t.length && (t[n].role !== "user" || Xn(t[n]));) n++;
8108
+ for (; n < t.length && (t[n].role !== "user" || Jn(t[n]));) n++;
8112
8109
  return n;
8113
8110
  }
8114
- function tt(e) {
8111
+ function et(e) {
8115
8112
  let t = q.messages.value, n = e;
8116
- for (; n > 0 && (t[n].role !== "user" || Xn(t[n]));) n--;
8113
+ for (; n > 0 && (t[n].role !== "user" || Jn(t[n]));) n--;
8117
8114
  return n;
8118
8115
  }
8119
- async function nt(e) {
8116
+ async function tt(e) {
8120
8117
  U.value = !0, q.setMessages(q.messages.value.slice(0, e)), await q.reload();
8121
8118
  }
8122
- async function rt(e, t) {
8119
+ async function nt(e, t) {
8123
8120
  U.value = !0;
8124
8121
  let n = q.messages.value[e].parts.filter((e) => e.type === "image" || e.type === "audio" || e.type === "video");
8125
8122
  q.setMessages(q.messages.value.slice(0, e)), n.length ? await q.sendMessage({ content: [{
@@ -8127,14 +8124,14 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8127
8124
  content: t
8128
8125
  }, ...n] }) : await q.sendMessage(t);
8129
8126
  }
8130
- async function it(e) {
8131
- let t = q.messages.value, n = [...t.slice(0, tt(e)), ...t.slice(et(e))];
8127
+ async function rt(e) {
8128
+ let t = q.messages.value, n = [...t.slice(0, et(e)), ...t.slice($e(e))];
8132
8129
  if (q.setMessages(n), !n.length) {
8133
8130
  f("emptied");
8134
8131
  return;
8135
8132
  }
8136
8133
  try {
8137
- await He(d.threadId, n);
8134
+ await Ve(d.threadId, n);
8138
8135
  } catch (e) {
8139
8136
  e?.response?.status !== 404 && O.add({
8140
8137
  severity: "error",
@@ -8143,9 +8140,9 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8143
8140
  });
8144
8141
  }
8145
8142
  }
8146
- async function at(e) {
8143
+ async function it(e) {
8147
8144
  try {
8148
- let t = await Ve(d.threadId, et(e) - 1);
8145
+ let t = await Be(d.threadId, $e(e) - 1);
8149
8146
  f("branched", t);
8150
8147
  } catch (e) {
8151
8148
  O.add({
@@ -8155,7 +8152,7 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8155
8152
  });
8156
8153
  }
8157
8154
  }
8158
- async function ot(e) {
8155
+ async function at(e) {
8159
8156
  if (U.value = !0, !e.attachments.length) {
8160
8157
  await q.sendMessage(e.text);
8161
8158
  return;
@@ -8174,49 +8171,68 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8174
8171
  });
8175
8172
  await q.sendMessage({ content: t });
8176
8173
  }
8177
- function st(e) {
8174
+ function ot(e) {
8175
+ if (e.message.includes("status: 409")) {
8176
+ st();
8177
+ return;
8178
+ }
8179
+ O.add({
8180
+ severity: "error",
8181
+ detail: e.message,
8182
+ life: 5e3
8183
+ });
8184
+ }
8185
+ async function st() {
8186
+ let e = await ze(d.threadId).catch(() => void 0);
8187
+ e && (q.replaceFromStore(e.messages, e.attachments), O.add({
8188
+ severity: "info",
8189
+ detail: y("views.assistant.thread_reloaded"),
8190
+ life: 5e3
8191
+ }));
8192
+ }
8193
+ function ct(e) {
8178
8194
  return !q.busy.value && (q.replaceFromStore(e.messages, e.attachments), !0);
8179
8195
  }
8180
8196
  return b(() => q.messages.value, async () => {
8181
- U.value && (await c(), ze());
8197
+ U.value && (await c(), Re());
8182
8198
  }, { deep: !0 }), b(() => q.approvals.value.length + q.questions.value.length, async (e, t) => {
8183
- e <= t || (U.value = !0, await c(), ze());
8184
- }), b(me, async () => {
8185
- await c(), V.value?.focus();
8186
- }), xe(window, "scroll", Qe, {
8199
+ e <= t || (U.value = !0, await c(), Re());
8200
+ }), b(pe, async () => {
8201
+ await c(), se.value?.focus();
8202
+ }), ve(window, "scroll", Qe, {
8187
8203
  capture: !0,
8188
8204
  passive: !0
8189
- }), be(oe, () => {
8190
- U.value && ze();
8205
+ }), _e([V, ae], () => {
8206
+ U.value && Re();
8191
8207
  }), ee(async () => {
8192
- await c(), ze(), V.value?.focus(), d.initialPrompt && await ot({
8208
+ await c(), Re(), se.value?.focus(), d.initialPrompt && await at({
8193
8209
  text: d.initialPrompt,
8194
8210
  attachments: []
8195
8211
  });
8196
- }), a({ refreshFromStore: st }), (a, s) => {
8197
- let c = Oe, u = en, d = ei, f = ke, _ = Je, y = Zr, b = Or, S = Ft, w = Et, O = ne, j = Le, ee = Ne, re = Ie, z = Fe, ue = P, be = Pe, xe = mt, De = ie, ze = se, Ve = ae, He = Me, We = pe, Xe = te;
8212
+ }), a({ refreshFromStore: ct }), (a, s) => {
8213
+ let c = Te, u = Qt, d = Qr, f = Oe, _ = Ke, y = Yr, b = Er, S = Nt, w = wt, O = ne, j = Ie, ee = Me, R = Fe, B = Pe, he = P, _e = Ne, ve = ft, we = L, Re = oe, ze = re, Be = je, Ve = de, Y = te;
8198
8214
  return i(), x("div", el, [
8199
8215
  T("div", {
8200
8216
  ref_key: "scrollRef",
8201
- ref: B,
8202
- class: l(["flex-1 min-h-0 overflow-y-auto px-4", { "flex items-center justify-center pb-[8vh]": g(me) }]),
8203
- onScrollPassive: je
8204
- }, [g(me) ? (i(), x("div", tl, [
8205
- T("div", nl, [T("div", rl, [M(c, { class: "w-6 h-6 text-color" })]), T("h1", il, [D(o(g(Ee)) + " ", 1), T("span", al, o(a.$t("views.assistant.greeting_sub")), 1)])]),
8206
- g(_e)?.capabilities?.toolCalling === !1 ? (i(), p(u, {
8217
+ ref: V,
8218
+ class: l(["flex-1 min-h-0 overflow-y-auto px-4", { "flex items-center justify-center pb-[8vh]": g(pe) }]),
8219
+ onScrollPassive: Ae
8220
+ }, [g(pe) ? (i(), x("div", tl, [
8221
+ T("div", nl, [T("div", rl, [M(c, { class: "w-6 h-6 text-color" })]), T("h1", il, [D(o(g(De)) + " ", 1), T("span", al, o(a.$t("views.assistant.greeting_sub")), 1)])]),
8222
+ g(ge)?.capabilities?.toolCalling === !1 ? (i(), p(u, {
8207
8223
  key: 0,
8208
8224
  class: "mb-4",
8209
- title: a.$t("views.assistant.notice_tools_title", { model: g(_e).name }),
8225
+ title: a.$t("views.assistant.notice_tools_title", { model: g(ge).name }),
8210
8226
  text: a.$t("views.assistant.notice_tools_text")
8211
8227
  }, null, 8, ["title", "text"])) : m("", !0),
8212
8228
  M(y, {
8213
8229
  ref_key: "composerRef",
8214
- ref: V,
8230
+ ref: se,
8215
8231
  busy: g(q).busy.value,
8216
- "vision-missing": g(ve),
8232
+ "vision-missing": g(ye),
8217
8233
  compact: e.compact,
8218
8234
  placeholder: a.$t("views.assistant.composer_placeholder"),
8219
- onSend: ot,
8235
+ onSend: at,
8220
8236
  onStop: s[2] ||= (e) => g(q).stop()
8221
8237
  }, {
8222
8238
  tools: v(() => [T("span", ol, [E((i(), p(f, {
@@ -8230,21 +8246,21 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8230
8246
  icon: v(() => [M(d, { class: "w-4 h-4" })]),
8231
8247
  _: 1
8232
8248
  }, 8, ["disabled"])), [[
8233
- Xe,
8249
+ Y,
8234
8250
  { value: a.$t("views.assistant.tools_title") },
8235
8251
  void 0,
8236
8252
  { top: !0 }
8237
- ]]), g(W).length ? (i(), x("span", sl, o(g(Te).length), 1)) : m("", !0)]), T("span", cl, [E((i(), p(f, {
8253
+ ]]), g(W).length ? (i(), x("span", sl, o(g(Ee).length), 1)) : m("", !0)]), T("span", cl, [E((i(), p(f, {
8238
8254
  type: "button",
8239
8255
  severity: "secondary",
8240
8256
  text: "",
8241
8257
  rounded: "",
8242
- onClick: s[1] ||= (e) => Be(e)
8258
+ onClick: s[1] ||= (e) => He(e)
8243
8259
  }, {
8244
8260
  icon: v(() => [M(_, { class: "w-4 h-4" })]),
8245
8261
  _: 1
8246
8262
  })), [[
8247
- Xe,
8263
+ Y,
8248
8264
  { value: a.$t("views.assistant.memory_title") },
8249
8265
  void 0,
8250
8266
  { top: !0 }
@@ -8260,7 +8276,7 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8260
8276
  key: e,
8261
8277
  type: "button",
8262
8278
  class: "cui-assistant-chip cursor-pointer rounded-full px-3.5 py-1.5 text-[13px]",
8263
- onClick: (t) => ot({
8279
+ onClick: (t) => at({
8264
8280
  text: e,
8265
8281
  attachments: []
8266
8282
  })
@@ -8268,14 +8284,14 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8268
8284
  ])) : (i(), x("div", {
8269
8285
  key: 1,
8270
8286
  ref_key: "contentRef",
8271
- ref: oe,
8287
+ ref: ae,
8272
8288
  class: "mx-auto flex w-full max-w-[720px] flex-col gap-7 pt-6 pb-4"
8273
8289
  }, [
8274
- (i(!0), x(C, null, r(g(Ce), (e) => (i(), p(b, {
8290
+ (i(!0), x(C, null, r(g(Se), (e) => (i(), p(b, {
8275
8291
  key: e.message.id,
8276
8292
  message: e.message,
8277
8293
  streaming: g(q).isLoading.value && e.lastIndex === g(q).messages.value.length - 1 && e.message.role === "assistant",
8278
- working: g(ye) && e.lastIndex === g(q).messages.value.length - 1 && e.message.role === "assistant",
8294
+ working: g(be) && e.lastIndex === g(q).messages.value.length - 1 && e.message.role === "assistant",
8279
8295
  busy: g(q).busy.value,
8280
8296
  continuation: e.continuation,
8281
8297
  stopped: e.ids.includes(g(q).stoppedId.value ?? ""),
@@ -8284,13 +8300,13 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8284
8300
  "tool-cards": g(q).toolCards.value,
8285
8301
  "tool-settings": g(q).toolSettings.value,
8286
8302
  "tool-notices": g(q).toolNotices.value,
8287
- "model-id": g(_e)?._id,
8288
- usage: Ae(e),
8303
+ "model-id": g(ge)?._id,
8304
+ usage: ke(e),
8289
8305
  class: l({ "-mt-5": e.continuation }),
8290
- onRegenerate: (t) => nt(e.index),
8291
- onEdit: (t) => rt(e.index, t),
8292
- onDelete: (t) => it(e.index),
8293
- onBranch: (t) => at(e.index),
8306
+ onRegenerate: (t) => tt(e.index),
8307
+ onEdit: (t) => nt(e.index, t),
8308
+ onDelete: (t) => rt(e.index),
8309
+ onBranch: (t) => it(e.index),
8294
8310
  onContinue: s[3] ||= (e) => g(q).continueAnswer()
8295
8311
  }, null, 8, [
8296
8312
  "message",
@@ -8312,13 +8328,13 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8312
8328
  "onDelete",
8313
8329
  "onBranch"
8314
8330
  ]))), 128)),
8315
- g(Se) ? (i(), p(b, {
8331
+ g(xe) ? (i(), p(b, {
8316
8332
  key: 0,
8317
- message: g(ti),
8333
+ message: g($r),
8318
8334
  working: "",
8319
8335
  busy: "",
8320
- continuation: g(Xn)(g(q).messages.value.at(-1)),
8321
- class: l({ "-mt-5": g(Xn)(g(q).messages.value.at(-1)) })
8336
+ continuation: g(Jn)(g(q).messages.value.at(-1)),
8337
+ class: l({ "-mt-5": g(Jn)(g(q).messages.value.at(-1)) })
8322
8338
  }, null, 8, [
8323
8339
  "message",
8324
8340
  "continuation",
@@ -8361,18 +8377,18 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8361
8377
  g(q).pausedElsewhere.value ? (i(), x("div", fl, o(a.$t("views.assistant.paused_elsewhere")), 1)) : m("", !0),
8362
8378
  g(q).error.value ? (i(), x("div", pl, [T("strong", ml, o(g(q).error.value.message), 1)])) : m("", !0)
8363
8379
  ], 512))], 34),
8364
- g(me) ? m("", !0) : (i(), x("div", hl, [g(U) ? m("", !0) : E((i(), p(f, {
8380
+ g(pe) ? m("", !0) : (i(), x("div", hl, [g(U) ? m("", !0) : E((i(), p(f, {
8365
8381
  key: 0,
8366
8382
  type: "button",
8367
8383
  rounded: "",
8368
8384
  severity: "secondary",
8369
8385
  class: "cui-assistant-jump absolute left-1/2 top-0 z-[2] -translate-x-1/2 -translate-y-1/2",
8370
- onClick: Re
8386
+ onClick: Le
8371
8387
  }, {
8372
8388
  icon: v(() => [M(O, { class: "w-4 h-4" })]),
8373
8389
  _: 1
8374
8390
  })), [[
8375
- Xe,
8391
+ Y,
8376
8392
  { value: a.$t("views.assistant.scroll_to_latest") },
8377
8393
  void 0,
8378
8394
  { top: !0 }
@@ -8394,7 +8410,7 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8394
8410
  icon: v(() => [M(ee, { class: "w-3.5 h-3.5" })]),
8395
8411
  _: 1
8396
8412
  }, 8, ["onClick"])), [[
8397
- Xe,
8413
+ Y,
8398
8414
  { value: a.$t("views.assistant.queue_cancel") },
8399
8415
  void 0,
8400
8416
  { top: !0 }
@@ -8402,12 +8418,12 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8402
8418
  ]))), 128))])) : m("", !0),
8403
8419
  M(y, {
8404
8420
  ref_key: "composerRef",
8405
- ref: V,
8421
+ ref: se,
8406
8422
  busy: g(q).busy.value,
8407
- "vision-missing": g(ve),
8423
+ "vision-missing": g(ye),
8408
8424
  compact: e.compact,
8409
8425
  placeholder: a.$t("views.assistant.composer_placeholder"),
8410
- onSend: ot,
8426
+ onSend: at,
8411
8427
  onStop: s[6] ||= (e) => g(q).stop()
8412
8428
  }, {
8413
8429
  tools: v(() => [T("span", yl, [E((i(), p(f, {
@@ -8421,21 +8437,21 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8421
8437
  icon: v(() => [M(d, { class: "w-4 h-4" })]),
8422
8438
  _: 1
8423
8439
  }, 8, ["disabled"])), [[
8424
- Xe,
8440
+ Y,
8425
8441
  { value: a.$t("views.assistant.tools_title") },
8426
8442
  void 0,
8427
8443
  { top: !0 }
8428
- ]]), g(W).length ? (i(), x("span", bl, o(g(Te).length), 1)) : m("", !0)]), T("span", xl, [E((i(), p(f, {
8444
+ ]]), g(W).length ? (i(), x("span", bl, o(g(Ee).length), 1)) : m("", !0)]), T("span", xl, [E((i(), p(f, {
8429
8445
  type: "button",
8430
8446
  severity: "secondary",
8431
8447
  text: "",
8432
8448
  rounded: "",
8433
- onClick: s[5] ||= (e) => Be(e)
8449
+ onClick: s[5] ||= (e) => He(e)
8434
8450
  }, {
8435
8451
  icon: v(() => [M(_, { class: "w-4 h-4" })]),
8436
8452
  _: 1
8437
8453
  })), [[
8438
- Xe,
8454
+ Y,
8439
8455
  { value: a.$t("views.assistant.memory_title") },
8440
8456
  void 0,
8441
8457
  { top: !0 }
@@ -8449,30 +8465,30 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8449
8465
  ]),
8450
8466
  T("div", Cl, o(a.$t("views.assistant.disclaimer")), 1)
8451
8467
  ])])),
8452
- M(We, {
8468
+ M(Ve, {
8453
8469
  ref_key: "toolsPopover",
8454
8470
  ref: H
8455
8471
  }, {
8456
8472
  default: v(() => [T("div", wl, [
8457
8473
  T("span", Tl, o(a.$t("views.assistant.tools_title")), 1),
8458
- T("div", El, [T("label", Dl, o(a.$t("views.assistant.instructions_label")), 1), M(re, {
8474
+ T("div", El, [T("label", Dl, o(a.$t("views.assistant.instructions_label")), 1), M(R, {
8459
8475
  id: "assistantInstructions",
8460
- modelValue: g(G),
8461
- "onUpdate:modelValue": s[7] ||= (e) => h(G) ? G.value = e : null,
8476
+ modelValue: g(le),
8477
+ "onUpdate:modelValue": s[7] ||= (e) => h(le) ? le.value = e : null,
8462
8478
  rows: "2",
8463
8479
  "auto-resize": "",
8464
8480
  class: "text-sm",
8465
8481
  placeholder: a.$t("views.assistant.instructions_placeholder")
8466
8482
  }, null, 8, ["modelValue", "placeholder"])]),
8467
- T("div", Ol, [T("label", kl, o(a.$t("views.assistant.tools_label")), 1), M(z, {
8468
- modelValue: g(Te),
8469
- "onUpdate:modelValue": s[8] ||= (e) => h(Te) ? Te.value = e : null,
8483
+ T("div", Ol, [T("label", kl, o(a.$t("views.assistant.tools_label")), 1), M(B, {
8484
+ modelValue: g(Ee),
8485
+ "onUpdate:modelValue": s[8] ||= (e) => h(Ee) ? Ee.value = e : null,
8470
8486
  "input-id": "assistantTools",
8471
- options: g(we),
8487
+ options: g(Ce),
8472
8488
  "option-label": "label",
8473
8489
  "option-value": "id",
8474
8490
  "max-selected-labels": 2,
8475
- "selected-items-label": a.$t("views.assistant.tools_selected", { n: g(Te).length }),
8491
+ "selected-items-label": a.$t("views.assistant.tools_selected", { n: g(Ee).length }),
8476
8492
  placeholder: a.$t("views.assistant.tools_none"),
8477
8493
  class: "min-w-0"
8478
8494
  }, {
@@ -8484,17 +8500,17 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8484
8500
  "selected-items-label",
8485
8501
  "placeholder"
8486
8502
  ])]),
8487
- g(he).length > 1 ? (i(), x("div", Nl, [T("label", Pl, o(a.$t("views.assistant.model_label")), 1), M(be, {
8503
+ g(me).length > 1 ? (i(), x("div", Nl, [T("label", Pl, o(a.$t("views.assistant.model_label")), 1), M(_e, {
8488
8504
  modelValue: g(fe),
8489
8505
  "onUpdate:modelValue": s[9] ||= (e) => h(fe) ? fe.value = e : null,
8490
8506
  "input-id": "assistantModel",
8491
- options: g(he),
8507
+ options: g(me),
8492
8508
  "option-label": "name",
8493
8509
  "option-value": "_id",
8494
8510
  class: "min-w-0",
8495
- placeholder: g(ge)?.name
8511
+ placeholder: g(J)?.name
8496
8512
  }, {
8497
- option: v(({ option: e }) => [T("div", Fl, [T("span", Il, o(e.name), 1), T("span", Ll, [(i(!0), x(C, null, r(Ke(e), (e) => (i(), p(ue, {
8513
+ option: v(({ option: e }) => [T("div", Fl, [T("span", Il, o(e.name), 1), T("span", Ll, [(i(!0), x(C, null, r(Ge(e), (e) => (i(), p(he, {
8498
8514
  key: e.key,
8499
8515
  severity: e.severity,
8500
8516
  value: a.$t(`views.settings.assistant_capability_${e.key}`),
@@ -8508,11 +8524,11 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8508
8524
  ])])) : m("", !0),
8509
8525
  T("div", Rl, [
8510
8526
  T("label", zl, o(a.$t("views.assistant.profiles_label")), 1),
8511
- M(Ve, null, {
8527
+ M(ze, null, {
8512
8528
  default: v(() => [
8513
- M(be, {
8514
- modelValue: g(K),
8515
- "onUpdate:modelValue": [s[10] ||= (e) => h(K) ? K.value = e : null, Ue],
8529
+ M(_e, {
8530
+ modelValue: g(G),
8531
+ "onUpdate:modelValue": [s[10] ||= (e) => h(G) ? G.value = e : null, Ue],
8516
8532
  "input-id": "assistantProfile",
8517
8533
  options: g(k) ?? [],
8518
8534
  "option-label": "name",
@@ -8521,7 +8537,7 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8521
8537
  class: "min-w-0",
8522
8538
  placeholder: a.$t("views.assistant.profile_none")
8523
8539
  }, {
8524
- option: v(({ option: e }) => [T("div", Bl, [T("span", Vl, o(e.name), 1), T("span", Hl, [(i(!0), x(C, null, r(Ke(Ge(e)), (e) => (i(), p(ue, {
8540
+ option: v(({ option: e }) => [T("div", Bl, [T("span", Vl, o(e.name), 1), T("span", Hl, [(i(!0), x(C, null, r(Ge(We(e)), (e) => (i(), p(he, {
8525
8541
  key: e.key,
8526
8542
  severity: e.severity,
8527
8543
  value: a.$t(`views.settings.assistant_capability_${e.key}`),
@@ -8533,26 +8549,26 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8533
8549
  "options",
8534
8550
  "placeholder"
8535
8551
  ]),
8536
- M(De, { class: "!p-0" }, {
8552
+ M(we, { class: "!p-0" }, {
8537
8553
  default: v(() => [E((i(), p(f, {
8538
8554
  type: "button",
8539
8555
  severity: "secondary",
8540
8556
  text: "",
8541
8557
  class: "h-full rounded-none",
8542
8558
  loading: g(A).isPending.value || g(N).isPending.value,
8543
- onClick: s[11] ||= (e) => g(K) ? Ye() : le.value = !0
8559
+ onClick: s[11] ||= (e) => g(G) ? Ye() : ue.value = !0
8544
8560
  }, {
8545
- icon: v(() => [M(xe, { class: "w-4 h-4" })]),
8561
+ icon: v(() => [M(ve, { class: "w-4 h-4" })]),
8546
8562
  _: 1
8547
8563
  }, 8, ["loading"])), [[
8548
- Xe,
8549
- { value: g(K) ? a.$t("views.assistant.profile_update") : a.$t("views.assistant.profile_save") },
8564
+ Y,
8565
+ { value: g(G) ? a.$t("views.assistant.profile_update") : a.$t("views.assistant.profile_save") },
8550
8566
  void 0,
8551
8567
  { top: !0 }
8552
8568
  ]])]),
8553
8569
  _: 1
8554
8570
  }),
8555
- g(K) ? (i(), p(De, {
8571
+ g(G) ? (i(), p(we, {
8556
8572
  key: 0,
8557
8573
  class: "!p-0"
8558
8574
  }, {
@@ -8562,12 +8578,12 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8562
8578
  text: "",
8563
8579
  class: "h-full rounded-none",
8564
8580
  loading: g(F).isPending.value,
8565
- onClick: Ze
8581
+ onClick: Xe
8566
8582
  }, {
8567
- icon: v(() => [M(ze, { class: "w-4 h-4" })]),
8583
+ icon: v(() => [M(Re, { class: "w-4 h-4" })]),
8568
8584
  _: 1
8569
8585
  }, 8, ["loading"])), [[
8570
- Xe,
8586
+ Y,
8571
8587
  { value: a.$t("views.assistant.profile_delete") },
8572
8588
  void 0,
8573
8589
  { top: !0 }
@@ -8577,13 +8593,13 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8577
8593
  ]),
8578
8594
  _: 1
8579
8595
  }),
8580
- g(le) ? (i(), x("div", Ul, [M(He, {
8581
- modelValue: g(de),
8582
- "onUpdate:modelValue": s[12] ||= (e) => h(de) ? de.value = e : null,
8596
+ g(ue) ? (i(), x("div", Ul, [M(Be, {
8597
+ modelValue: g(K),
8598
+ "onUpdate:modelValue": s[12] ||= (e) => h(K) ? K.value = e : null,
8583
8599
  class: "flex-1 min-w-0",
8584
8600
  size: "small",
8585
8601
  placeholder: a.$t("views.assistant.profile_name_placeholder"),
8586
- onKeydown: [n(t(qe, ["prevent"]), ["enter"]), s[13] ||= n((e) => le.value = !1, ["esc"])]
8602
+ onKeydown: [n(t(qe, ["prevent"]), ["enter"]), s[13] ||= n((e) => ue.value = !1, ["esc"])]
8587
8603
  }, null, 8, [
8588
8604
  "modelValue",
8589
8605
  "placeholder",
@@ -8592,14 +8608,14 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8592
8608
  type: "button",
8593
8609
  size: "small",
8594
8610
  label: a.$t("components.form.button.save"),
8595
- disabled: !g(de).trim(),
8611
+ disabled: !g(K).trim(),
8596
8612
  onClick: qe
8597
8613
  }, null, 8, ["label", "disabled"])])) : m("", !0)
8598
8614
  ])
8599
8615
  ])]),
8600
8616
  _: 1
8601
8617
  }, 512),
8602
- M(We, {
8618
+ M(Ve, {
8603
8619
  ref_key: "memoryPopover",
8604
8620
  ref: ce
8605
8621
  }, {
@@ -8614,13 +8630,13 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8614
8630
  text: "",
8615
8631
  rounded: "",
8616
8632
  class: "cui-icon-md shrink-0 text-muted",
8617
- loading: g(L).isPending.value,
8618
- onClick: (t) => g(L).mutate(e._id)
8633
+ loading: g(z).isPending.value,
8634
+ onClick: (t) => g(z).mutate(e._id)
8619
8635
  }, {
8620
8636
  icon: v(() => [M(ee, { class: "w-3 h-3" })]),
8621
8637
  _: 1
8622
8638
  }, 8, ["loading", "onClick"])), [[
8623
- Xe,
8639
+ Y,
8624
8640
  { value: a.$t("views.assistant.memory_forget") },
8625
8641
  void 0,
8626
8642
  { top: !0 }
@@ -8633,8 +8649,8 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8633
8649
  outlined: "",
8634
8650
  class: "w-full",
8635
8651
  label: a.$t("views.assistant.memory_forget_all"),
8636
- loading: g(R).isPending.value,
8637
- onClick: s[14] ||= (e) => g(R).mutate()
8652
+ loading: g(ie).isPending.value,
8653
+ onClick: s[14] ||= (e) => g(ie).mutate()
8638
8654
  }, null, 8, ["label", "loading"])) : m("", !0)
8639
8655
  ])]),
8640
8656
  _: 1
@@ -8642,7 +8658,7 @@ var el = { class: "relative flex h-full min-h-0 flex-col" }, tl = {
8642
8658
  ]);
8643
8659
  };
8644
8660
  }
8645
- }), [["__scopeId", "data-v-98a9b392"]]), Ql = {
8661
+ }), [["__scopeId", "data-v-e50ce56d"]]), Ql = {
8646
8662
  viewBox: "0 0 24 24",
8647
8663
  width: "1.2em",
8648
8664
  height: "1.2em"
@@ -8668,7 +8684,7 @@ var eu = d({
8668
8684
  }, ou = { class: "cui-assistant-group px-2 pt-3.5 pb-1 text-[11.5px] font-medium text-muted" }, su = ["onClick"], cu = { class: "min-w-0 flex-1 truncate" }, lu = {
8669
8685
  key: 3,
8670
8686
  class: "cui-assistant-sidebar-foot px-3 py-2"
8671
- }, uu = /*#__PURE__*/ B(/* @__PURE__ */ A({
8687
+ }, uu = /*#__PURE__*/ J(/* @__PURE__ */ A({
8672
8688
  __name: "CuiAssistantSidebar",
8673
8689
  props: {
8674
8690
  threads: {},
@@ -8692,7 +8708,7 @@ var eu = d({
8692
8708
  "close"
8693
8709
  ],
8694
8710
  setup(e, { emit: n }) {
8695
- let a = e, s = n, { topbarOffset: c, bottombarHeight: u } = oe(), d = w("sidebarRef"), f = j(""), y = _(() => a.isOpen ? 288 : 0), b = _(() => {
8711
+ let a = e, s = n, { topbarOffset: c, bottombarHeight: u } = K(), d = w("sidebarRef"), f = j(""), y = _(() => a.isOpen ? 288 : 0), b = _(() => {
8696
8712
  let e = f.value.trim().toLowerCase(), t = a.threads.filter((t) => !e || t.title.toLowerCase().includes(e)).sort((e, t) => t.updatedAt - e.updatedAt), n = [
8697
8713
  "today",
8698
8714
  "yesterday",
@@ -8713,10 +8729,10 @@ var eu = d({
8713
8729
  let t = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), n = Math.round((t(/* @__PURE__ */ new Date()) - t(new Date(e))) / 864e5);
8714
8730
  return n <= 0 ? "today" : n === 1 ? "yesterday" : n <= 7 ? "week" : n <= 30 ? "month" : "older";
8715
8731
  }
8716
- return Se(d, (e) => {
8732
+ return ye(d, (e) => {
8717
8733
  a.isOpen && a.isOverlay && (e.target.closest("#assistant-sidebar-toggle") || s("close"));
8718
8734
  }), (n, a) => {
8719
- let _ = eu, w = ke, O = Ye, k = Ge, A = je, j = Me, ee = Ae, N = de, ne = se, P = te;
8735
+ let _ = eu, w = Oe, O = qe, k = Ue, A = Ae, j = je, ee = ke, N = U, ne = oe, P = te;
8720
8736
  return i(), x("nav", {
8721
8737
  ref_key: "sidebarRef",
8722
8738
  ref: d,
@@ -8819,49 +8835,49 @@ var eu = d({
8819
8835
  }, vu = {
8820
8836
  key: 1,
8821
8837
  class: "flex flex-1 flex-col items-center justify-center gap-5 px-6 text-center"
8822
- }, yu = { class: "cui-assistant-hero-icon flex h-16 w-16 items-center justify-center rounded-full" }, bu = { class: "max-w-md" }, xu = { class: "text-lg font-semibold text-color" }, Su = { class: "mt-1 text-sm text-muted" }, Cu = /*#__PURE__*/ B(/* @__PURE__ */ A({
8838
+ }, yu = { class: "cui-assistant-hero-icon flex h-16 w-16 items-center justify-center rounded-full" }, bu = { class: "max-w-md" }, xu = { class: "text-lg font-semibold text-color" }, Su = { class: "mt-1 text-sm text-muted" }, Cu = /*#__PURE__*/ J(/* @__PURE__ */ A({
8823
8839
  __name: "Assistant",
8824
8840
  setup(e) {
8825
- let t = new We(), n = I(), r = ce(), { t: a } = De(), { smBreakpoint: s, mdBreakpoint: u, xlBreakpoint: d } = R(), { openTextDialog: f } = G(), h = U("/notifications"), C = K(), { user: D } = Te(C), { data: O, isLoading: k } = t.getAssistantInfoQuery(), { data: A, isLoading: N } = t.listThreadsQuery(), ne = t.deleteThreadMutation(), P = t.deleteAllThreadsMutation(), L = w("conversationRef"), z = j(ge()), ie = j([]), B = j({}), ae = j(typeof n.query.prompt == "string" ? n.query.prompt : void 0), oe = j(!1), V = j(d.value ? "opened" : "closed"), se = j(!1), H = _(() => O.value?.status.state ?? "disabled"), W = _(() => D.value?.role === "admin" || D.value?.role === "master"), le = _(() => (O.value?.tools ?? []).filter((e) => e.approval)), ue = _(() => V.value === "opened"), fe = _(() => A.value?.find((e) => e.id === z.value)?.title ?? ""), pe = _(() => u.value), me = _(() => u.value || H.value !== "ready" ? "0px" : ue.value ? "288px" : "0px"), he = _(() => [
8841
+ let t = new Y(), n = ge(), r = I(), { t: a } = we(), { smBreakpoint: s, mdBreakpoint: u, xlBreakpoint: d } = ie(), { openTextDialog: f } = ue(), h = me("/notifications"), C = W(), { user: D } = Ce(C), { data: O, isLoading: k } = t.getAssistantInfoQuery(), { data: A, isLoading: N } = t.listThreadsQuery(), ne = t.deleteThreadMutation(), P = t.deleteAllThreadsMutation(), re = w("conversationRef"), L = j(he()), z = j([]), B = j({}), V = j(typeof n.query.prompt == "string" ? n.query.prompt : void 0), ae = j(!1), oe = j(d.value ? "opened" : "closed"), se = j(!1), H = _(() => O.value?.status.state ?? "disabled"), ce = _(() => D.value?.role === "admin" || D.value?.role === "master"), le = _(() => (O.value?.tools ?? []).filter((e) => e.approval)), G = _(() => oe.value === "opened"), de = _(() => A.value?.find((e) => e.id === L.value)?.title ?? ""), K = _(() => u.value), fe = _(() => u.value || H.value !== "ready" ? "0px" : G.value ? "288px" : "0px"), pe = _(() => [
8826
8842
  a("views.assistant.suggestion_today"),
8827
8843
  a("views.assistant.suggestion_week"),
8828
8844
  a("views.assistant.suggestion_offline"),
8829
8845
  a("views.assistant.suggestion_sensors"),
8830
8846
  a("views.assistant.suggestion_tools")
8831
8847
  ]);
8832
- function ge() {
8848
+ function he() {
8833
8849
  return q();
8834
8850
  }
8851
+ function J() {
8852
+ oe.value = oe.value === "opened" ? "closed" : "opened";
8853
+ }
8835
8854
  function _e() {
8836
- V.value = V.value === "opened" ? "closed" : "opened";
8855
+ oe.value = "closed";
8837
8856
  }
8838
8857
  function ve() {
8839
- V.value = "closed";
8858
+ z.value = [], B.value = {}, V.value = void 0, L.value = he(), K.value && _e();
8840
8859
  }
8841
- function ye() {
8842
- ie.value = [], B.value = {}, ae.value = void 0, z.value = ge(), pe.value && ve();
8843
- }
8844
- async function be(e) {
8845
- if (pe.value && ve(), e !== z.value) {
8846
- oe.value = !0;
8860
+ async function ye(e) {
8861
+ if (K.value && _e(), e !== L.value) {
8862
+ ae.value = !0;
8847
8863
  try {
8848
- let t = await Be(e);
8849
- ie.value = t.messages, B.value = t.attachments, ae.value = void 0, z.value = e;
8864
+ let t = await ze(e);
8865
+ z.value = t.messages, B.value = t.attachments, V.value = void 0, L.value = e;
8850
8866
  } finally {
8851
- oe.value = !1;
8867
+ ae.value = !1;
8852
8868
  }
8853
8869
  }
8854
8870
  }
8855
- async function xe(e) {
8856
- await ne.mutateAsync(e).catch(() => void 0), e === z.value && ye();
8871
+ async function be(e) {
8872
+ await ne.mutateAsync(e).catch(() => void 0), e === L.value && ve();
8857
8873
  }
8858
- async function Se(e) {
8859
- ie.value = e.messages, B.value = e.attachments, ae.value = void 0, z.value = e._id, await t.queryClient.refetchQueries({
8874
+ async function xe(e) {
8875
+ z.value = e.messages, B.value = e.attachments, V.value = void 0, L.value = e._id, await t.queryClient.refetchQueries({
8860
8876
  queryKey: ["assistant", "threads"],
8861
8877
  exact: !0
8862
8878
  });
8863
8879
  }
8864
- function Ce() {
8880
+ function Se() {
8865
8881
  f({
8866
8882
  data: {
8867
8883
  title: a("views.assistant.delete_all_conversations"),
@@ -8870,47 +8886,47 @@ var eu = d({
8870
8886
  confirmButtonProps: { severity: "danger" }
8871
8887
  },
8872
8888
  onConfirm: async () => {
8873
- await P.mutateAsync(), ye();
8889
+ await P.mutateAsync(), ve();
8874
8890
  }
8875
8891
  });
8876
8892
  }
8877
- async function we(e) {
8893
+ async function Ee(e) {
8878
8894
  try {
8879
- await be(e);
8895
+ await ye(e);
8880
8896
  } catch {
8881
- z.value = e;
8897
+ L.value = e;
8882
8898
  }
8883
8899
  }
8884
- async function Ee() {
8900
+ async function De() {
8885
8901
  await t.queryClient.refetchQueries({
8886
8902
  queryKey: ["assistant", "threads"],
8887
8903
  exact: !0
8888
8904
  });
8889
8905
  }
8890
- async function Ae(e) {
8906
+ async function ke(e) {
8891
8907
  if (await t.queryClient.refetchQueries({
8892
8908
  queryKey: ["assistant", "threads"],
8893
8909
  exact: !0
8894
- }), e.threadId !== z.value) return;
8895
- let n = await Be(e.threadId).catch(() => void 0);
8896
- n && L.value?.refreshFromStore(n);
8910
+ }), e.threadId !== L.value) return;
8911
+ let n = await ze(e.threadId).catch(() => void 0);
8912
+ n && re.value?.refreshFromStore(n);
8897
8913
  }
8898
- function je() {
8899
- let e = A.value?.some((e) => e.id === z.value), t = {
8914
+ function Ae() {
8915
+ let e = A.value?.some((e) => e.id === L.value), t = {
8900
8916
  ...n.query,
8901
- thread: e ? z.value : void 0
8917
+ thread: e ? L.value : void 0
8902
8918
  };
8903
8919
  t.thread !== n.query.thread && r.replace({ query: t });
8904
8920
  }
8905
- return b([z, A], je), ee(async () => {
8906
- h.on("assistant-thread", (e) => Ae(e));
8921
+ return b([L, A], Ae), ee(async () => {
8922
+ h.on("assistant-thread", (e) => ke(e));
8907
8923
  let e = typeof n.query.thread == "string" ? n.query.thread : void 0;
8908
8924
  n.query.prompt !== void 0 && r.replace({ query: {
8909
8925
  ...n.query,
8910
8926
  prompt: void 0
8911
- } }), e && !ae.value && await we(e), await c(), se.value = !0;
8927
+ } }), e && !V.value && await Ee(e), await c(), se.value = !0;
8912
8928
  }), (e, t) => {
8913
- let n = re, r = at, a = ke, c = F, u = Ye, d = uu, f = eu, h = de, _ = Oe, b = Zl, C = te;
8929
+ let n = R, r = rt, a = Oe, c = F, u = qe, d = uu, f = eu, h = U, _ = Te, b = Zl, C = te;
8914
8930
  return i(), x("div", null, [
8915
8931
  M(n, { position: "center" }, {
8916
8932
  default: v(() => [T("span", du, o(e.$t("views.assistant.title")), 1)]),
@@ -8931,7 +8947,7 @@ var eu = d({
8931
8947
  class: "cui-button p-2 text-color",
8932
8948
  text: "",
8933
8949
  rounded: "",
8934
- onClick: _e
8950
+ onClick: J
8935
8951
  }, {
8936
8952
  icon: v(() => [M(c, {
8937
8953
  width: "100%",
@@ -8948,7 +8964,7 @@ var eu = d({
8948
8964
  text: "",
8949
8965
  rounded: "",
8950
8966
  disabled: g(H) !== "ready",
8951
- onClick: ye
8967
+ onClick: ve
8952
8968
  }, {
8953
8969
  icon: v(() => [M(u, {
8954
8970
  width: "100%",
@@ -8961,15 +8977,15 @@ var eu = d({
8961
8977
  g(H) === "ready" ? (i(), p(d, {
8962
8978
  key: 0,
8963
8979
  threads: g(A) ?? [],
8964
- "active-id": g(z),
8980
+ "active-id": g(L),
8965
8981
  loading: g(N),
8966
- "is-open": g(ue),
8967
- "is-overlay": g(pe),
8968
- onSelect: be,
8969
- onCreate: ye,
8970
- onDelete: xe,
8971
- onDeleteAll: Ce,
8972
- onClose: ve
8982
+ "is-open": g(G),
8983
+ "is-overlay": g(K),
8984
+ onSelect: ye,
8985
+ onCreate: ve,
8986
+ onDelete: be,
8987
+ onDeleteAll: Se,
8988
+ onClose: _e
8973
8989
  }, null, 8, [
8974
8990
  "threads",
8975
8991
  "active-id",
@@ -8980,28 +8996,28 @@ var eu = d({
8980
8996
  (i(), p(y, {
8981
8997
  to: "#container",
8982
8998
  defer: ""
8983
- }, [g(ue) && g(pe) ? (i(), x("div", {
8999
+ }, [g(G) && g(K) ? (i(), x("div", {
8984
9000
  key: 0,
8985
9001
  class: "fixed top-0 left-0 right-0 bottom-0 w-full h-full bg-black/50 z-1",
8986
- onClick: ve
9002
+ onClick: _e
8987
9003
  })) : m("", !0)])),
8988
9004
  T("main", {
8989
9005
  class: "relative w-full h-full",
8990
9006
  style: S({
8991
- paddingLeft: g(me),
9007
+ paddingLeft: g(fe),
8992
9008
  transition: g(se) ? "padding-left 200ms" : void 0
8993
9009
  })
8994
9010
  }, [T("div", fu, [
8995
9011
  g(s) ? m("", !0) : (i(), x("div", pu, [
8996
9012
  t[3] ||= T("div", { class: "ml-2" }, null, -1),
8997
- !g(ue) && g(H) === "ready" ? E((i(), p(a, {
9013
+ !g(G) && g(H) === "ready" ? E((i(), p(a, {
8998
9014
  key: 0,
8999
9015
  id: "assistant-sidebar-toggle",
9000
9016
  severity: "secondary",
9001
9017
  class: "mr-2 cui-icon-lg relative z-2",
9002
9018
  text: "",
9003
9019
  rounded: "",
9004
- onClick: _e
9020
+ onClick: J
9005
9021
  }, {
9006
9022
  icon: v(() => [M(f, {
9007
9023
  width: "100%",
@@ -9015,7 +9031,7 @@ var eu = d({
9015
9031
  { bottom: !0 }
9016
9032
  ]]) : m("", !0),
9017
9033
  T("h1", mu, o(e.$t("views.assistant.title")), 1),
9018
- g(fe) ? (i(), x("span", hu, o(g(fe)), 1)) : m("", !0),
9034
+ g(de) ? (i(), x("span", hu, o(g(de)), 1)) : m("", !0),
9019
9035
  t[4] ||= T("div", { class: "gradient-blur rotate-180 !h-[70px]" }, [
9020
9036
  T("div"),
9021
9037
  T("div"),
@@ -9030,7 +9046,7 @@ var eu = d({
9030
9046
  text: "",
9031
9047
  rounded: "",
9032
9048
  class: "cui-icon-lg relative z-2",
9033
- onClick: ye
9049
+ onClick: ve
9034
9050
  }, {
9035
9051
  icon: v(() => [M(u, {
9036
9052
  width: "100%",
@@ -9046,24 +9062,24 @@ var eu = d({
9046
9062
  T("div", { class: l(["h-full w-full flex flex-col", {
9047
9063
  "pt-2": g(s),
9048
9064
  "pt-[calc(40px+2rem)]": !g(s)
9049
- }]) }, [g(k) || g(oe) ? (i(), x("div", _u, [M(h, {
9065
+ }]) }, [g(k) || g(ae) ? (i(), x("div", _u, [M(h, {
9050
9066
  class: "w-[30px] h-[30px] m-0",
9051
9067
  "stroke-width": "5"
9052
9068
  })])) : g(H) === "ready" ? (i(), p(b, {
9053
9069
  ref_key: "conversationRef",
9054
- ref: L,
9055
- key: g(z),
9056
- "thread-id": g(z),
9057
- "initial-messages": g(ie),
9070
+ ref: re,
9071
+ key: g(L),
9072
+ "thread-id": g(L),
9073
+ "initial-messages": g(z),
9058
9074
  "initial-attachments": g(B),
9059
- "initial-prompt": g(ae),
9060
- suggestions: g(he),
9075
+ "initial-prompt": g(V),
9076
+ suggestions: g(pe),
9061
9077
  "approval-tools": g(le),
9062
9078
  tools: g(O)?.tools ?? [],
9063
9079
  class: "flex-1 min-h-0",
9064
- onFinished: Ee,
9065
- onBranched: Se,
9066
- onEmptied: t[2] ||= (e) => xe(g(z))
9080
+ onFinished: De,
9081
+ onBranched: xe,
9082
+ onEmptied: t[2] ||= (e) => be(g(L))
9067
9083
  }, null, 8, [
9068
9084
  "thread-id",
9069
9085
  "initial-messages",
@@ -9074,8 +9090,8 @@ var eu = d({
9074
9090
  "tools"
9075
9091
  ])) : (i(), x("div", vu, [
9076
9092
  T("div", yu, [M(_, { class: "w-8 h-8 text-muted" })]),
9077
- T("div", bu, [T("div", xu, o(e.$t(g(H) === "disabled" ? "views.assistant.disabled_title" : "views.assistant.unconfigured_title")), 1), T("div", Su, o(e.$t(g(W) ? "views.assistant.setup_hint_admin" : "views.assistant.setup_hint_user")), 1)]),
9078
- g(W) ? (i(), p(a, {
9093
+ T("div", bu, [T("div", xu, o(e.$t(g(H) === "disabled" ? "views.assistant.disabled_title" : "views.assistant.unconfigured_title")), 1), T("div", Su, o(e.$t(g(ce) ? "views.assistant.setup_hint_admin" : "views.assistant.setup_hint_user")), 1)]),
9094
+ g(ce) ? (i(), p(a, {
9079
9095
  key: 0,
9080
9096
  class: "cui-button-medium",
9081
9097
  label: e.$t("views.assistant.open_settings"),