@camera.ui/server 2.2.8 → 2.3.0

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 (493) hide show
  1. package/LICENSE.md +8 -1
  2. package/dist/interface/assets/{404-BYV0u5qE.js → 404-C0X5UBF4.js} +1 -1
  3. package/dist/interface/assets/About-Ctp_u5qK.js +1 -0
  4. package/dist/interface/assets/Assistant-Bj2bAUHD.css +1 -0
  5. package/dist/interface/assets/Assistant-CDrBV_mg.js +1 -0
  6. package/dist/interface/assets/Automation-Dp6V80Iz.js +3 -0
  7. package/dist/interface/assets/{Automation-BSicfOGF.css → Automation-R5o9sXYY.css} +1 -1
  8. package/dist/interface/assets/{AutomationImport-Iu-K82Os.js → AutomationImport-DKgg7atE.js} +2 -2
  9. package/dist/interface/assets/AutomationStore-CU-m5VC8.js +2 -0
  10. package/dist/interface/assets/{AutomationStoreDetail-BbvLRJ5u.js → AutomationStoreDetail-CiyIs8Iu.js} +2 -2
  11. package/dist/interface/assets/Automations-Dljh-sWu.js +2 -0
  12. package/dist/interface/assets/Camera-0p0P_mbp.css +1 -0
  13. package/dist/interface/assets/Camera-Bvovab-8.js +2 -0
  14. package/dist/interface/assets/{CameraConsole-JBD3ZmJ6.js → CameraConsole-D_Fv-MAi.js} +1 -1
  15. package/dist/interface/assets/{Cameras-R5mJGMK9.js → Cameras-Cq7Gw-fk.js} +2 -2
  16. package/dist/interface/assets/{Camview-DH6_8CxH.css → Camview-Bs2VvmUS.css} +1 -1
  17. package/dist/interface/assets/Camview-CP6PA20C.js +1 -0
  18. package/dist/interface/assets/{CertificateUpload-B9S4EOQs.js → CertificateUpload-DjzNMFc3.js} +1 -1
  19. package/dist/interface/assets/{Config-CbFl5Wcp.js → Config-Dl2TlyFe.js} +1 -1
  20. package/dist/interface/assets/{ConfigActionAssistant-DIOh6-np.js → ConfigActionAssistant-DCkJ_Iqq.js} +1 -1
  21. package/dist/interface/assets/ConfigActionCameraControl-2pzl59gR.js +1 -0
  22. package/dist/interface/assets/{ConfigActionDelay-B9i4YZjy.js → ConfigActionDelay-BAp1dr0N.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionHttp-DFtxAa3U.js → ConfigActionHttp-_kqgEuun.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionImageInput-CuTH4Nw2.js → ConfigActionImageInput-BgtACnCm.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionMqtt-B9SfWP-G.js → ConfigActionMqtt-z7UzccW5.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionNotification-BGMIByJT.js → ConfigActionNotification-bhbb5AqU.js} +1 -1
  27. package/dist/interface/assets/{ConfigActionNotificationControl-Cz72szMd.js → ConfigActionNotificationControl-BbvX8MFu.js} +1 -1
  28. package/dist/interface/assets/{ConfigActionOutput-BG6DoIRe.js → ConfigActionOutput-DdgSg3FU.js} +1 -1
  29. package/dist/interface/assets/{ConfigActionPlugin-B5oRSE9n.js → ConfigActionPlugin-DGjZd1L0.js} +1 -1
  30. package/dist/interface/assets/ConfigActionSensor-DmImWFAo.js +1 -0
  31. package/dist/interface/assets/{ConfigActionSnapshot-Di-uxMrg.js → ConfigActionSnapshot-hVHSfdtS.js} +1 -1
  32. package/dist/interface/assets/{ConfigActionVariable-BBpUti5A.js → ConfigActionVariable-BIpruwsx.js} +1 -1
  33. package/dist/interface/assets/{ConfigConditionIfElse-DjOKPXQw.js → ConfigConditionIfElse-DRSpsoR4.js} +1 -1
  34. package/dist/interface/assets/{ConfigConditionSensorState-BzvvZvD0.js → ConfigConditionSensorState-C2SNARH7.js} +1 -1
  35. package/dist/interface/assets/{ConfigConditionSwitch-DQvdfUxR.js → ConfigConditionSwitch-4SbQcU7N.js} +1 -1
  36. package/dist/interface/assets/{ConfigConditionTime-BqOElX5C.js → ConfigConditionTime-ESX3shbg.js} +1 -1
  37. package/dist/interface/assets/{ConfigSensorValueInput-BT-0LhSH.js → ConfigSensorValueInput-CTUdAA-R.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerDetection-1OkudUah.js → ConfigTriggerDetection-BRr6ixxQ.js} +1 -1
  39. package/dist/interface/assets/{ConfigTriggerGeofence-HGatk3C5.js → ConfigTriggerGeofence-D-xRMGrT.js} +1 -1
  40. package/dist/interface/assets/{ConfigTriggerManual-DpRr_vVq.js → ConfigTriggerManual-aXD6k1qa.js} +1 -1
  41. package/dist/interface/assets/{ConfigTriggerMqtt-C_MId3BY.js → ConfigTriggerMqtt-pjHW4yOL.js} +1 -1
  42. package/dist/interface/assets/{ConfigTriggerSchedule-BmwDqd6N.js → ConfigTriggerSchedule-CYOt57qg.js} +1 -1
  43. package/dist/interface/assets/{ConfigTriggerSensor-Rgx8q4g8.js → ConfigTriggerSensor-BwJ_cAqd.js} +1 -1
  44. package/dist/interface/assets/{ConfigTriggerSystem-4VsHPmbn.js → ConfigTriggerSystem-DBXIrjzU.js} +1 -1
  45. package/dist/interface/assets/{ConfigTriggerWebhook-Bs7zEfY0.js → ConfigTriggerWebhook-CccBmMCb.js} +1 -1
  46. package/dist/interface/assets/Console-DWAaz1C6.js +1 -0
  47. package/dist/interface/assets/CuiAssistantConversation-B3xEiNNt.js +5 -0
  48. package/dist/interface/assets/{CuiAssistantConversation-BmBhwrNh.css → CuiAssistantConversation-C5ca1lgX.css} +1 -1
  49. package/dist/interface/assets/CuiAutomationRunsDialog-CfylVPLI.js +1 -0
  50. package/dist/interface/assets/CuiBottomSheet-ACN23VLS.js +1 -0
  51. package/dist/interface/assets/{CuiBottomSheet-Dd3uOtnC.js → CuiBottomSheet-DEVNeDqa.js} +1 -1
  52. package/dist/interface/assets/CuiCameraPipCard-rR_FW9zq.js +1 -0
  53. package/dist/interface/assets/CuiCameraRecordings-CnorhPhf.js +1 -0
  54. package/dist/interface/assets/CuiCameraShares-BxUgedC_.js +1 -0
  55. package/dist/interface/assets/{CuiCameraTable-C7WLZ2pA.js → CuiCameraTable-C3GB4Q2y.js} +2 -2
  56. package/dist/interface/assets/CuiCameraTable-MHfnZSyK.js +1 -0
  57. package/dist/interface/assets/CuiChartTable-TAzZgetO.js +1 -0
  58. package/dist/interface/assets/{CuiConsole-CkZML0iY.js → CuiConsole-Cf5lOCE1.js} +2 -2
  59. package/dist/interface/assets/{CuiDataTable-BFIhx1D3.js → CuiDataTable-DfjXa0C1.js} +1 -1
  60. package/dist/interface/assets/CuiLightControl-ChK-SvJp.js +1 -0
  61. package/dist/interface/assets/CuiList-C4fxd9lD.js +1 -0
  62. package/dist/interface/assets/CuiPluginCard-DMpANIQj.js +2 -0
  63. package/dist/interface/assets/CuiPluginCategoryChip-BKxJMid7.js +1 -0
  64. package/dist/interface/assets/{CuiPluginOAuthButton-BQZkTcgo.js → CuiPluginOAuthButton-DnQ838JJ.js} +2 -2
  65. package/dist/interface/assets/{CuiPluginTrustBadge-DbqdfdaL.js → CuiPluginTrustBadge-DyYDUWV6.js} +1 -1
  66. package/dist/interface/assets/{CuiQRCode-2WsWJQFi.js → CuiQRCode-S9fPi0_l.js} +1 -1
  67. package/dist/interface/assets/CuiSchema-DScmDQsh.js +1 -0
  68. package/dist/interface/assets/CuiTopNavbarItem-CT10aAlO.js +1 -0
  69. package/dist/interface/assets/Faces-Coy-tUVM.js +1 -0
  70. package/dist/interface/assets/FirstSteps-CrMJC049.js +1 -0
  71. package/dist/interface/assets/Floorplan-Bj_mVrxp.js +1 -0
  72. package/dist/interface/assets/{Floorplan-Ci63Zd8W.css → Floorplan-CT5TrMSD.css} +1 -1
  73. package/dist/interface/assets/Instances-B_mpKAng.js +1 -0
  74. package/dist/interface/assets/{Logs-DMehPk0t.js → Logs-fY1dpQk4.js} +2 -2
  75. package/dist/interface/assets/Menu-Bgi-NLdg.js +1 -0
  76. package/dist/interface/assets/Metrics-DnMeIrkf.css +1 -0
  77. package/dist/interface/assets/Metrics-k9KACiwh.js +12 -0
  78. package/dist/interface/assets/OAuthDeviceFlow-xTh83xmc.js +1 -0
  79. package/dist/interface/assets/Plugin-BB7x7UHw.css +1 -0
  80. package/dist/interface/assets/Plugin-VWq7sONB.js +1 -0
  81. package/dist/interface/assets/{PluginConsole-D1BRQCO9.js → PluginConsole-LnnDOVBL.js} +2 -2
  82. package/dist/interface/assets/PluginDetail-CKD9sbDx.js +2 -0
  83. package/dist/interface/assets/{PluginSchema-B9VsBHOU.js → PluginSchema-BnB0_6Sk.js} +1 -1
  84. package/dist/interface/assets/PluginSearch-BoBZLLbr.js +1 -0
  85. package/dist/interface/assets/PluginSearch-kGhweU1J.js +2 -0
  86. package/dist/interface/assets/{PluginUpdateProgress-uj0XPV-_.js → PluginUpdateProgress-DMx0QlgE.js} +1 -1
  87. package/dist/interface/assets/{Plugins-CPx9Hszm.js → Plugins-Ekmr6aVa.js} +1 -1
  88. package/dist/interface/assets/RecentEventsFilter-StLJNuks.js +1 -0
  89. package/dist/interface/assets/Recordings-8PqxJOI3.css +1 -0
  90. package/dist/interface/assets/Recordings-Bvkuk_TV.js +1 -0
  91. package/dist/interface/assets/SensorEdit-CAf9Nb01.js +1 -0
  92. package/dist/interface/assets/SensorHistory-il8bDErX.js +1 -0
  93. package/dist/interface/assets/Sensors-sxQ6HLKo.js +2 -0
  94. package/dist/interface/assets/Settings-Bu0G7Ebx.js +1 -0
  95. package/dist/interface/assets/{Settings-D7495zbV.css → Settings-DtCSaLPb.css} +1 -1
  96. package/dist/interface/assets/SettingsAccount-8OZJLQi-.js +1 -0
  97. package/dist/interface/assets/SettingsAccount-bSfFi9YH.js +1 -0
  98. package/dist/interface/assets/SettingsAppearance-CnvN_Tzr.js +1 -0
  99. package/dist/interface/assets/SettingsAppearance-EvPWgF4c.js +1 -0
  100. package/dist/interface/assets/SettingsAssistant-B6s6pHCx.js +1 -0
  101. package/dist/interface/assets/SettingsBackup-Dd2FaUcN.js +1 -0
  102. package/dist/interface/assets/SettingsList-SvCO_gfG.js +1 -0
  103. package/dist/interface/assets/SettingsMqtt-BXBzHX84.js +1 -0
  104. package/dist/interface/assets/SettingsNotifications-CV-jJwFV.js +1 -0
  105. package/dist/interface/assets/SettingsPermissions-GchFaWjz.js +1 -0
  106. package/dist/interface/assets/SettingsRecordings-C4Ch_jmV.js +1 -0
  107. package/dist/interface/assets/SettingsRemote-OZHDJKSq.js +2 -0
  108. package/dist/interface/assets/SettingsSystem-BJlHXwVs.js +2 -0
  109. package/dist/interface/assets/SettingsUsers-RGOkOzx0.js +1 -0
  110. package/dist/interface/assets/Terminal-DX-ECC91.js +4 -0
  111. package/dist/interface/assets/Training-B8my7vka.js +1 -0
  112. package/dist/interface/assets/Training-D1DDjCCD.css +1 -0
  113. package/dist/interface/assets/Updates-DmavyhAn.js +2 -0
  114. package/dist/interface/assets/{VariableInput-CcILik4M.js → VariableInput-DQJle67Y.js} +1 -1
  115. package/dist/interface/assets/{VariableSuggestions-Bj0HdrYW.js → VariableSuggestions-D8V739dF.js} +1 -1
  116. package/dist/interface/assets/{VersionsHandler-BA8Lcysg.js → VersionsHandler-B41TJhgY.js} +1 -1
  117. package/dist/interface/assets/{VirtualSensorCreate-DvHyw7I2.js → VirtualSensorCreate-MfLh-LpH.js} +1 -1
  118. package/dist/interface/assets/Workers-CafDeRhH.js +2 -0
  119. package/dist/interface/assets/api-By0v6EeA.css +2 -0
  120. package/dist/interface/assets/api-D1iULsSy.js +4 -0
  121. package/dist/interface/assets/{api-CKbL5jC7.js → api-DbUdfXO_.js} +1 -1
  122. package/dist/interface/assets/{assistant-CwmHp5bB.js → assistant-7hqP6OpA.js} +1 -1
  123. package/dist/interface/assets/{auth-AfZrkJ2f.js → auth-CDxrn7fe.js} +1 -1
  124. package/dist/interface/assets/{automations-DOCG0q8-.js → automations-CTTQlGCW.js} +1 -1
  125. package/dist/interface/assets/{cameraSources-mHEz9ROa.js → cameraSources-MOiE_1-W.js} +1 -1
  126. package/dist/interface/assets/cloudHandoff-CJzFH7CW.js +1 -0
  127. package/dist/interface/assets/{config-AG0SnOiY.js → config-6EiGxiYm.js} +1 -1
  128. package/dist/interface/assets/eventLabels-idFWh3Y_.js +1 -0
  129. package/dist/interface/assets/{flowSchema-B0d3VjU7.js → flowSchema-Dp_-p9WA.js} +1 -1
  130. package/dist/interface/assets/{intercomService-DG3EeZ6s.js → intercomService-BQYzjnAi.js} +1 -1
  131. package/dist/interface/assets/main-0oXl_8v7.js +3 -0
  132. package/dist/interface/assets/main-CdvAniEp.css +1 -0
  133. package/dist/interface/assets/mqtt-ChvXxMhR.js +1 -0
  134. package/dist/interface/assets/{notifications-8FH4ApEz.js → notifications-CbL-1oMs.js} +1 -1
  135. package/dist/interface/assets/{plugins-2JLUEMYc.js → plugins-lsoAntRQ.js} +1 -1
  136. package/dist/interface/assets/{rooms-DoAfzA8W.js → rooms-P8WrRIco.js} +1 -1
  137. package/dist/interface/assets/sensorIcons-BRTtoaHX.js +1 -0
  138. package/dist/interface/assets/{sensorSlots-biaL-O8E.js → sensorSlots-BTj-IM7z.js} +1 -1
  139. package/dist/interface/assets/{sensors-DyAMdS-H.js → sensors-Dxc7HgjZ.js} +1 -1
  140. package/dist/interface/assets/{server-BDRUGj61.js → server-DlK8gUoE.js} +1 -1
  141. package/dist/interface/assets/{theme-CLxrnR60.js → theme-BOppzzar.js} +1 -1
  142. package/dist/interface/assets/types-CeruGCb8.js +1 -0
  143. package/dist/interface/assets/{types-8JXzkoC8.js → types-J1Drrxo1.js} +1 -1
  144. package/dist/interface/assets/types-U4AuTNLR.js +1 -0
  145. package/dist/interface/assets/ungrouped-ING_JAuK.js +1 -0
  146. package/dist/interface/assets/{updates-F-veEP1I.js → updates-DtVp84Y0.js} +1 -1
  147. package/dist/interface/assets/{useAppVersion-BjUQmB7M.js → useAppVersion-BGgCk5GD.js} +1 -1
  148. package/dist/interface/assets/{useAssistantActions-CNEJol4o.js → useAssistantActions-C13O5EHU.js} +1 -1
  149. package/dist/interface/assets/useBackupRestore-vrhmc9i-.js +1 -0
  150. package/dist/interface/assets/{useCameraOptions-D_oduve2.js → useCameraOptions-CI1baRmm.js} +1 -1
  151. package/dist/interface/assets/{useKeyboardInset-CPWSVYlA.js → useKeyboardInset-CvgJp091.js} +1 -1
  152. package/dist/interface/assets/{useLogsSocket-B_jXUqv8.js → useLogsSocket-Bf0BI8ET.js} +1 -1
  153. package/dist/interface/assets/{useNavLayout-DEngIIeU.js → useNavLayout-6zM1Y-7B.js} +1 -1
  154. package/dist/interface/assets/{usePermissions-DAO92InI.js → usePermissions-DZitFsBQ.js} +1 -1
  155. package/dist/interface/assets/{usePluginUpdates-CJi8Y_wl.js → usePluginUpdates-VZdpJ_Ax.js} +1 -1
  156. package/dist/interface/assets/{usePushRegistration-j9WCeFbv.js → usePushRegistration-vcbMrTxZ.js} +1 -1
  157. package/dist/interface/assets/{useServerRestart-BVks5tuC.js → useServerRestart-DrpuNbIu.js} +1 -1
  158. package/dist/interface/assets/{useStreamStatus-DQ0NSyU8.js → useStreamStatus-l3Pfk1H4.js} +1 -1
  159. package/dist/interface/assets/{useTabSwipe-CVq7EcIY.js → useTabSwipe-BSpi25WV.js} +1 -1
  160. package/dist/interface/assets/{useUpdateChannel-C0fjDvNP.js → useUpdateChannel-kAl-5UNY.js} +1 -1
  161. package/dist/interface/assets/{useUpdatesSocket-DXKF9hzc.js → useUpdatesSocket-CaFz_fEb.js} +1 -1
  162. package/dist/interface/assets/{useUserOptions-UjMeAL5n.js → useUserOptions-BKteXnmU.js} +1 -1
  163. package/dist/interface/assets/vendor-cameraui-K1Nw4PvF.js +2326 -0
  164. package/dist/interface/assets/vendor-core-CJdfpB0I.js +1 -0
  165. package/dist/interface/assets/{vendor-primevue-Zx6t06A4.js → vendor-primevue-DoA2Rwcb.js} +871 -871
  166. package/dist/interface/assets/walk-B8FNhXuj.js +1 -0
  167. package/dist/interface/ha/{404-D5gfy0Cd.js → 404-RtgPpD9N.js} +1 -1
  168. package/dist/interface/ha/{About-JzlpCzBN.js → About-0PRv9bU0.js} +4 -4
  169. package/dist/interface/ha/{Assistant-DgOfGesf.js → Assistant-DbwxVfpl.js} +1021 -1021
  170. package/dist/interface/ha/{Automation-BDaWYiBu.js → Automation-D3HomdH7.js} +159 -155
  171. package/dist/interface/ha/{AutomationImport-BNB_PJ9R.js → AutomationImport-nQUUvZcv.js} +6 -6
  172. package/dist/interface/ha/{AutomationStore-_TeOt1wz.js → AutomationStore-BXDD92wZ.js} +8 -8
  173. package/dist/interface/ha/{AutomationStoreDetail-jjIEZoRi.js → AutomationStoreDetail-BYeq7FID.js} +19 -19
  174. package/dist/interface/ha/{Automations-DM6FEVOw.js → Automations-CJlGqmSP.js} +74 -74
  175. package/dist/interface/ha/Camera-Ai4BxVh_.js +747 -0
  176. package/dist/interface/ha/{CameraConsole-BoVql05l.js → CameraConsole-UMNOX3dE.js} +4 -4
  177. package/dist/interface/ha/{Cameras-cQBGvXq7.js → Cameras-BW-AEXYi.js} +266 -266
  178. package/dist/interface/ha/{Camview-mkG5FXZM.js → Camview-jikpVEE0.js} +195 -194
  179. package/dist/interface/ha/{Config-BNPDzo_h.js → Config-BOxwBH2D.js} +111 -111
  180. package/dist/interface/ha/{ConfigActionAssistant-C-8P3DYz.js → ConfigActionAssistant--3iWk9sq.js} +4 -4
  181. package/dist/interface/ha/{ConfigActionCameraControl-x1ksGL7m.js → ConfigActionCameraControl-DbVXWTeA.js} +3 -3
  182. package/dist/interface/ha/{ConfigActionHttp-DzCJp85z.js → ConfigActionHttp-Du3n2Yj0.js} +2 -2
  183. package/dist/interface/ha/{ConfigActionImageInput-C5C5U_2z.js → ConfigActionImageInput-BrJrTZTY.js} +4 -4
  184. package/dist/interface/ha/{ConfigActionMqtt-T29xb75r.js → ConfigActionMqtt-DZd1BNUt.js} +4 -4
  185. package/dist/interface/ha/{ConfigActionNotification-BcnyilF9.js → ConfigActionNotification-CJWW10gt.js} +3 -3
  186. package/dist/interface/ha/{ConfigActionNotificationControl-D3wIVKuU.js → ConfigActionNotificationControl-Bl41AVv1.js} +2 -2
  187. package/dist/interface/ha/{ConfigActionOutput-hD-yVczw.js → ConfigActionOutput-OTj7Lwgq.js} +1 -1
  188. package/dist/interface/ha/{ConfigActionPlugin-Bz1O-O4Q.js → ConfigActionPlugin-B790PEk0.js} +8 -8
  189. package/dist/interface/ha/{ConfigActionSensor-FOz-PYl_.js → ConfigActionSensor-BG3jZxge.js} +5 -5
  190. package/dist/interface/ha/{ConfigActionSnapshot-CmxEOuK1.js → ConfigActionSnapshot-fGmLl6jb.js} +2 -2
  191. package/dist/interface/ha/{ConfigActionVariable-BCvkrdCh.js → ConfigActionVariable-CK3vYDsr.js} +1 -1
  192. package/dist/interface/ha/{ConfigConditionIfElse-icfTG9OA.js → ConfigConditionIfElse-DyFLGg3y.js} +3 -3
  193. package/dist/interface/ha/{ConfigConditionSensorState-ClUAsm0d.js → ConfigConditionSensorState-BUTfeFO2.js} +7 -7
  194. package/dist/interface/ha/{ConfigConditionSwitch-C8AMCkn6.js → ConfigConditionSwitch-iDG_ubif.js} +5 -5
  195. package/dist/interface/ha/{ConfigSensorValueInput-ChvDQzGd.js → ConfigSensorValueInput-BmRIGUKB.js} +5 -5
  196. package/dist/interface/ha/{ConfigTriggerDetection-aUSyaClu.js → ConfigTriggerDetection-DyPQGt9M.js} +24 -24
  197. package/dist/interface/ha/{ConfigTriggerGeofence-DsJeJWP4.js → ConfigTriggerGeofence-CGE-bH_t.js} +6 -6
  198. package/dist/interface/ha/{ConfigTriggerMqtt-CsAxA7QZ.js → ConfigTriggerMqtt-CM3KZqBc.js} +1 -1
  199. package/dist/interface/ha/{ConfigTriggerSensor-CTxr9cfU.js → ConfigTriggerSensor-DoHMcwP4.js} +1 -1
  200. package/dist/interface/ha/{ConfigTriggerSystem-C8UEfpfs.js → ConfigTriggerSystem-BYKbW4Zr.js} +2 -2
  201. package/dist/interface/ha/{ConfigTriggerWebhook-frEE-SCB.js → ConfigTriggerWebhook-5PBAadG8.js} +2 -2
  202. package/dist/interface/ha/{Console-A3VtbsLg.js → Console-BEXzl4p1.js} +7 -7
  203. package/dist/interface/ha/{CuiAutomationRunsDialog-BlJvhBiX.js → CuiAutomationRunsDialog-DkK_ar5G.js} +3 -3
  204. package/dist/interface/ha/{CuiBottomSheet-Cu-t3H0Z.js → CuiBottomSheet-CYNvQV4T.js} +2 -2
  205. package/dist/interface/ha/{CuiCameraRecordings-R5ArEmqJ.js → CuiCameraRecordings-DYjecmE_.js} +30 -48
  206. package/dist/interface/ha/{CuiCameraShares-B9pfRkM4.js → CuiCameraShares-C0H60nZS.js} +7 -7
  207. package/dist/interface/ha/{CuiCameraTable-CKjGKaMC.js → CuiCameraTable-CQNMyBaq.js} +5 -5
  208. package/dist/interface/ha/{CuiChartTable-BxWjRe-k.js → CuiChartTable-Bhv1p9zj.js} +1161 -1161
  209. package/dist/interface/ha/{CuiConsole-C5fzsR7t.js → CuiConsole-DtXorGF5.js} +20 -20
  210. package/dist/interface/ha/{CuiDataTable-BOdQDY8J.js → CuiDataTable-Cy8EjCk9.js} +7 -7
  211. package/dist/interface/ha/{CuiList-CU2NJ1K6.js → CuiList-DnW6Q5m2.js} +1 -1
  212. package/dist/interface/ha/{CuiPluginCard-BT71RRAD.js → CuiPluginCard-B4SCUblV.js} +125 -125
  213. package/dist/interface/ha/{CuiPluginOAuthButton-moh9uS7G.js → CuiPluginOAuthButton-BKg9SftQ.js} +5 -5
  214. package/dist/interface/ha/{CuiPluginTrustBadge-F_pVWkPJ.js → CuiPluginTrustBadge-CEtUJhCJ.js} +1 -1
  215. package/dist/interface/ha/{CuiQRCode-BNuj-nJ4.js → CuiQRCode-gp-9hqyk.js} +7 -7
  216. package/dist/interface/ha/{CuiSchema-Cb_8Ks-I.js → CuiSchema-CYpr_dD7.js} +161 -161
  217. package/dist/interface/ha/{CuiTopNavbarItem-BGzrrTls.js → CuiTopNavbarItem-CM-1oPxf.js} +1 -1
  218. package/dist/interface/ha/Faces-pa60ySng.js +1575 -0
  219. package/dist/interface/ha/{FirstSteps-BFX0-EEi.js → FirstSteps-D42yZm7R.js} +68 -68
  220. package/dist/interface/ha/{Floorplan-D6MGqSJT.js → Floorplan-BvE546pE.js} +512 -511
  221. package/dist/interface/ha/{Instances-CHzIUyyA.js → Instances-CAGCyfbB.js} +64 -64
  222. package/dist/interface/ha/{Logs-DZKM3dWv.js → Logs-RB3Ba8WM.js} +12 -12
  223. package/dist/interface/ha/{Menu-BQz4dfQi.js → Menu-hAnHu_jq.js} +17 -17
  224. package/dist/interface/ha/{Metrics-CdpWJ1mm.js → Metrics-ChYTebkX.js} +94 -93
  225. package/dist/interface/ha/{OAuthDeviceFlow-DUELtx3X.js → OAuthDeviceFlow-C05pH-9o.js} +3 -3
  226. package/dist/interface/ha/{Plugin-5bbTF0Rv.js → Plugin-D7XwcXkW.js} +647 -439
  227. package/dist/interface/ha/{PluginConsole-C__0lzsS.js → PluginConsole-DphEIOlL.js} +4 -4
  228. package/dist/interface/ha/{PluginDetail-Blrktk9W.js → PluginDetail-DfMl-yCl.js} +9 -9
  229. package/dist/interface/ha/{PluginSearch-BKbdwHQ1.js → PluginSearch-BPN4Opg5.js} +34 -34
  230. package/dist/interface/ha/{PluginUpdateProgress-IsNiecu3.js → PluginUpdateProgress-ByJ0R5sW.js} +3 -3
  231. package/dist/interface/ha/{Plugins-CC2Dwlx5.js → Plugins-BhKmjjNn.js} +59 -59
  232. package/dist/interface/ha/{RecentEventsFilter-9ZkDHD1g.js → RecentEventsFilter-BkLMlGVJ.js} +5 -6
  233. package/dist/interface/ha/Recordings-BaU7M1OW.js +1836 -0
  234. package/dist/interface/ha/{SensorEdit-Bi2Yx_ji.js → SensorEdit-DWxcCJ0F.js} +88 -88
  235. package/dist/interface/ha/{SensorHistory-sqG_6eav.js → SensorHistory-DuA9E9wT.js} +2 -2
  236. package/dist/interface/ha/{Sensors-DLtOh1p4.js → Sensors-CVpIHcgG.js} +438 -435
  237. package/dist/interface/ha/{Settings-DI3_zenm.js → Settings-BO2eBGEn.js} +61 -61
  238. package/dist/interface/ha/{SettingsAccount-pS86Qyr-.js → SettingsAccount-BQZZfoSM.js} +255 -255
  239. package/dist/interface/ha/{SettingsAppearance-tS3bubKQ.js → SettingsAppearance-B_yGl89u.js} +16 -16
  240. package/dist/interface/ha/{SettingsAssistant-LejCRXsF.js → SettingsAssistant-kMOixl9g.js} +501 -501
  241. package/dist/interface/ha/{SettingsBackup-CkhD1Kze.js → SettingsBackup-BpG-W4j-.js} +24 -24
  242. package/dist/interface/ha/{SettingsList-bibwvPSM.js → SettingsList-Btnkzu94.js} +6 -6
  243. package/dist/interface/ha/{SettingsMqtt-DSt0B4Qg.js → SettingsMqtt-C4DX9cNC.js} +23 -23
  244. package/dist/interface/ha/{SettingsNotifications-BF7ajNwE.js → SettingsNotifications-DI6ImggH.js} +6 -6
  245. package/dist/interface/ha/{SettingsPermissions-Jh0FuIF7.js → SettingsPermissions-BCDyCFcb.js} +2 -2
  246. package/dist/interface/ha/{SettingsRecordings-BTIdncxg.js → SettingsRecordings-Bq5NkJhd.js} +10 -10
  247. package/dist/interface/ha/{SettingsRemote-Cba4P1-O.js → SettingsRemote-CtncaPIA.js} +308 -308
  248. package/dist/interface/ha/{SettingsSystem-_Nnh2ZF5.js → SettingsSystem-BJXuA7xA.js} +11 -11
  249. package/dist/interface/ha/{SettingsUsers-BfHFoxJi.js → SettingsUsers-BF0rDluv.js} +91 -91
  250. package/dist/interface/ha/{Terminal-Dv_7oWmS.js → Terminal-kTCe2jP3.js} +11 -11
  251. package/dist/interface/ha/Training-BM2Xb8Ef.js +1754 -0
  252. package/dist/interface/ha/{Updates-BHl5H7zE.js → Updates-Cv1EY_T0.js} +6 -6
  253. package/dist/interface/ha/{VariableInput-DtLo7-Nw.js → VariableInput-BO2zZu4N.js} +1 -1
  254. package/dist/interface/ha/{VersionsHandler-CF0DSeol.js → VersionsHandler-CRnT9-K7.js} +10 -10
  255. package/dist/interface/ha/{VirtualSensorCreate-C907EgIz.js → VirtualSensorCreate-6dVRxPjw.js} +8 -8
  256. package/dist/interface/ha/{Workers-Dz1d9gEQ.js → Workers-MHia86lu.js} +97 -97
  257. package/dist/interface/ha/{api-DUqpDJ2N.js → api-CH_Y8Hee.js} +17459 -14633
  258. package/dist/interface/ha/{api-gId1nlMj.js → api-DylRa66V.js} +3 -3
  259. package/dist/interface/ha/{assistant-BaR65gIY.js → assistant-smRQYA6p.js} +53 -53
  260. package/dist/interface/ha/{auth-Btsz_KxO.js → auth-BXj5Fm6s.js} +38 -38
  261. package/dist/interface/ha/{automationBlueprint-CuO3iOiM.js → automationBlueprint-DGjftXFC.js} +4 -4
  262. package/dist/interface/ha/cameraui-cards.js +1 -1
  263. package/dist/interface/ha/{cards-DWhezIPP.js → cards-E0zw1UVg.js} +114 -113
  264. package/dist/interface/ha/{config-BKStpoEQ.js → config-dG_DA6XL.js} +16 -16
  265. package/dist/interface/ha/{dist-CM7R4_Gj.js → dist-BQf9ANPx.js} +77 -77
  266. package/dist/interface/ha/{dist-BIngHzHx.js → dist-euRmladF.js} +4 -4
  267. package/dist/interface/ha/{eventIcons-BFNUgeGr.js → eventLabels-B5GrM5jO.js} +291 -233
  268. package/dist/interface/ha/{intercomService-B7HkLs6z.js → intercomService-BtJ_zUNd.js} +250 -264
  269. package/dist/interface/ha/{mqtt-ajcSmTB-.js → mqtt-CP3vVkRJ.js} +12 -12
  270. package/dist/interface/ha/{notifications-Cf9dXHEO.js → notifications-CZNwSXTg.js} +22 -22
  271. package/dist/interface/ha/{pinia-DIKO5lnE.js → pinia-CVnHHb-s.js} +533 -501
  272. package/dist/interface/ha/{plugins-ml823dJV.js → plugins--eatOIaI.js} +66 -66
  273. package/dist/interface/ha/{protocol-BB4jdtUC-DW3jl2tV.js → protocol-BB4jdtUC-BhEwymva.js} +129 -48
  274. package/dist/interface/ha/{rooms-C5gUErBi.js → rooms-D5E6K75d.js} +8 -8
  275. package/dist/interface/ha/{server-dArenpJI.js → server-D1BqEY7i.js} +31 -31
  276. package/dist/interface/ha/{types-DYymuACA.js → types-CWogEoya.js} +36 -36
  277. package/dist/interface/ha/ungrouped-Ch4UX4dy.js +58 -0
  278. package/dist/interface/ha/{updates-D5sFzGtC.js → updates-B48Owi1w.js} +28 -28
  279. package/dist/interface/ha/{useAppVersion-C5x3Ap4_.js → useAppVersion-D95sKTJR.js} +2 -2
  280. package/dist/interface/ha/{useAssistantActions-S1FrNe9b.js → useAssistantActions-kDwiO-u5.js} +1 -1
  281. package/dist/interface/ha/{useKeyboardInset-Cj0T2AFX.js → useKeyboardInset-C2R51vsC.js} +1 -1
  282. package/dist/interface/ha/{useLogsSocket-DtvfQlPh.js → useLogsSocket-BzNWa2y2.js} +1 -1
  283. package/dist/interface/ha/{useNavLayout-HSFBA4JV.js → useNavLayout-228cwwqA.js} +19 -19
  284. package/dist/interface/ha/{usePermissions-DaE_wFch.js → usePermissions-CfA5x7Df.js} +1 -1
  285. package/dist/interface/ha/{useServerRestart-Ci0SppGW.js → useServerRestart-B0c40zs5.js} +1 -1
  286. package/dist/interface/ha/{useTabSwipe-CPKkRmaH.js → useTabSwipe-CfZg5hWj.js} +2 -2
  287. package/dist/interface/ha/{useUpdateChannel-CXHHovK3.js → useUpdateChannel-DQxI7FrD.js} +2 -2
  288. package/dist/interface/ha/{useUpdatesSocket-DVST2YXV.js → useUpdatesSocket-B8LqBBd3.js} +1 -1
  289. package/dist/interface/ha/{useUserOptions-BYcYI6QA.js → useUserOptions-dZf6ejlz.js} +1 -1
  290. package/dist/interface/ha/walk-CsSXaeJw.js +33 -0
  291. package/dist/interface/index.html +35 -36
  292. package/dist/interface/sw.js +1 -1
  293. package/dist/interface/workbox-5f52ac45.js +1 -0
  294. package/dist/server/package.json +11 -11
  295. package/dist/server/requirements.txt +2 -2
  296. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/__init__.py +22 -0
  297. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/config.py +4 -0
  298. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/__init__.py +10 -0
  299. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/contract.py +6 -0
  300. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/interfaces.py +92 -4
  301. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/__init__.py +16 -0
  302. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/base.py +4 -0
  303. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/face_embedder.py +1 -1
  304. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/object.py +3 -3
  305. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/person_embedder.py +65 -0
  306. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/segmenter.py +81 -0
  307. package/dist/server/src/api/database/index.d.ts +2 -1
  308. package/dist/server/src/api/database/index.js +31 -7
  309. package/dist/server/src/api/database/index.js.map +1 -1
  310. package/dist/server/src/api/database/migrations/v2-2-9.d.ts +3 -0
  311. package/dist/server/src/api/database/migrations/v2-2-9.js +28 -0
  312. package/dist/server/src/api/database/migrations/v2-2-9.js.map +1 -0
  313. package/dist/server/src/api/database/record-schemas.d.ts +1 -1
  314. package/dist/server/src/api/database/types.d.ts +17 -1
  315. package/dist/server/src/api/schemas/assistant.schema.d.ts +1 -1
  316. package/dist/server/src/api/schemas/cameras.schema.d.ts +140 -76
  317. package/dist/server/src/api/schemas/cameras.schema.js +4 -2
  318. package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
  319. package/dist/server/src/api/schemas/training.schema.d.ts +15 -3
  320. package/dist/server/src/api/schemas/training.schema.js +4 -1
  321. package/dist/server/src/api/schemas/training.schema.js.map +1 -1
  322. package/dist/server/src/api/websocket/nsp/worker-perf.js +2 -0
  323. package/dist/server/src/api/websocket/nsp/worker-perf.js.map +1 -1
  324. package/dist/server/src/api/websocket/types.d.ts +1 -0
  325. package/dist/server/src/assistant/search.d.ts +17 -0
  326. package/dist/server/src/assistant/search.js +10 -2
  327. package/dist/server/src/assistant/search.js.map +1 -1
  328. package/dist/server/src/assistant/tools/plugins.js +7 -3
  329. package/dist/server/src/assistant/tools/plugins.js.map +1 -1
  330. package/dist/server/src/assistant/types.d.ts +2 -0
  331. package/dist/server/src/automations/actions/plugin.js +5 -9
  332. package/dist/server/src/automations/actions/plugin.js.map +1 -1
  333. package/dist/server/src/automations/pluginMethodRegistry.d.ts +6 -0
  334. package/dist/server/src/automations/pluginMethodRegistry.js +39 -0
  335. package/dist/server/src/automations/pluginMethodRegistry.js.map +1 -1
  336. package/dist/server/src/automations/segment-picture.d.ts +16 -0
  337. package/dist/server/src/automations/segment-picture.js +152 -0
  338. package/dist/server/src/automations/segment-picture.js.map +1 -0
  339. package/dist/server/src/camera/decoder/detection-coordinator.d.ts +5 -2
  340. package/dist/server/src/camera/decoder/detection-coordinator.js +45 -22
  341. package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
  342. package/dist/server/src/camera/decoder/detection-pipeline.d.ts +30 -2
  343. package/dist/server/src/camera/decoder/detection-pipeline.js +81 -21
  344. package/dist/server/src/camera/decoder/detection-pipeline.js.map +1 -1
  345. package/dist/server/src/camera/decoder/event-manager.d.ts +12 -2
  346. package/dist/server/src/camera/decoder/event-manager.js +77 -75
  347. package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
  348. package/dist/server/src/camera/decoder/event-trace.d.ts +41 -1
  349. package/dist/server/src/camera/decoder/event-trace.js +63 -8
  350. package/dist/server/src/camera/decoder/event-trace.js.map +1 -1
  351. package/dist/server/src/camera/decoder/face-tracks.d.ts +26 -0
  352. package/dist/server/src/camera/decoder/face-tracks.js +199 -0
  353. package/dist/server/src/camera/decoder/face-tracks.js.map +1 -0
  354. package/dist/server/src/camera/decoder/frame-scaler.d.ts +3 -1
  355. package/dist/server/src/camera/decoder/frame-scaler.js +36 -8
  356. package/dist/server/src/camera/decoder/frame-scaler.js.map +1 -1
  357. package/dist/server/src/camera/decoder/nvr-sink.d.ts +6 -0
  358. package/dist/server/src/camera/decoder/nvr-sink.js +1 -1
  359. package/dist/server/src/camera/decoder/nvr-sink.js.map +1 -1
  360. package/dist/server/src/camera/decoder/perf-tracker.d.ts +2 -0
  361. package/dist/server/src/camera/decoder/perf-tracker.js +4 -0
  362. package/dist/server/src/camera/decoder/perf-tracker.js.map +1 -1
  363. package/dist/server/src/camera/decoder/ptz/autotracker.d.ts +6 -1
  364. package/dist/server/src/camera/decoder/ptz/autotracker.js +107 -25
  365. package/dist/server/src/camera/decoder/ptz/autotracker.js.map +1 -1
  366. package/dist/server/src/camera/decoder/secondary-stage.d.ts +10 -8
  367. package/dist/server/src/camera/decoder/secondary-stage.js +145 -125
  368. package/dist/server/src/camera/decoder/secondary-stage.js.map +1 -1
  369. package/dist/server/src/camera/decoder/training-sink.d.ts +5 -2
  370. package/dist/server/src/camera/decoder/training-sink.js +30 -6
  371. package/dist/server/src/camera/decoder/training-sink.js.map +1 -1
  372. package/dist/server/src/camera/decoder/types.d.ts +6 -2
  373. package/dist/server/src/camera/decoder/types.js +4 -2
  374. package/dist/server/src/camera/decoder/types.js.map +1 -1
  375. package/dist/server/src/manager/trainingCandidateManager.d.ts +2 -1
  376. package/dist/server/src/manager/trainingCandidateManager.js +25 -3
  377. package/dist/server/src/manager/trainingCandidateManager.js.map +1 -1
  378. package/dist/server/src/manager/trainingSubmission.d.ts +5 -0
  379. package/dist/server/src/manager/trainingSubmission.js +73 -0
  380. package/dist/server/src/manager/trainingSubmission.js.map +1 -0
  381. package/dist/server/src/manager/types.d.ts +8 -2
  382. package/dist/server/src/manager/types.js.map +1 -1
  383. package/dist/server/src/plugins/runtime/python/proxy/sensor.py +2 -0
  384. package/dist/server/src/remote/api/routes/train.d.ts +44 -3
  385. package/dist/server/src/remote/api/routes/train.js +2 -2
  386. package/dist/server/src/remote/api/routes/train.js.map +1 -1
  387. package/dist/server/src/rpc/interfaces/core.d.ts +6 -2
  388. package/dist/server/src/rpc/interfaces/detection.d.ts +20 -3
  389. package/dist/server/src/rpc/server.d.ts +2 -0
  390. package/dist/server/src/rpc/server.js +8 -5
  391. package/dist/server/src/rpc/server.js.map +1 -1
  392. package/dist/server/src/sensors/registry.d.ts +1 -0
  393. package/dist/server/src/sensors/registry.js +20 -11
  394. package/dist/server/src/sensors/registry.js.map +1 -1
  395. package/dist/server/src/sensors/types.d.ts +1 -0
  396. package/dist/server/src/sensors/types.js +3 -0
  397. package/dist/server/src/sensors/types.js.map +1 -1
  398. package/dist/server/src/services/config/index.d.ts +1 -0
  399. package/dist/server/src/services/config/index.js +2 -0
  400. package/dist/server/src/services/config/index.js.map +1 -1
  401. package/dist/server/src/utils/image.d.ts +6 -0
  402. package/dist/server/src/utils/image.js +58 -22
  403. package/dist/server/src/utils/image.js.map +1 -1
  404. package/npm-shrinkwrap.json +115 -74
  405. package/package.json +11 -11
  406. package/dist/interface/assets/About-DBOS1rfw.js +0 -1
  407. package/dist/interface/assets/Assistant-BQ6Ld-bt.css +0 -1
  408. package/dist/interface/assets/Assistant-BRcHj8hq.js +0 -1
  409. package/dist/interface/assets/Automation-C0Emde7z.js +0 -3
  410. package/dist/interface/assets/AutomationStore-C2G0Bk8c.js +0 -2
  411. package/dist/interface/assets/Automations-D-vfqRnZ.js +0 -2
  412. package/dist/interface/assets/Camera-BpurrgAr.js +0 -2
  413. package/dist/interface/assets/Camera-D0B7yyVD.css +0 -1
  414. package/dist/interface/assets/Camview-IbOVRx20.js +0 -1
  415. package/dist/interface/assets/ConfigActionCameraControl-Bw_egtpP.js +0 -1
  416. package/dist/interface/assets/ConfigActionSensor-BErRRYfl.js +0 -1
  417. package/dist/interface/assets/Console-oCuuVKET.js +0 -1
  418. package/dist/interface/assets/CuiAssistantConversation-Bsyxau9v.js +0 -5
  419. package/dist/interface/assets/CuiAutomationRunsDialog-sRh_K6JI.js +0 -1
  420. package/dist/interface/assets/CuiBottomSheet-DWoSHzC7.js +0 -1
  421. package/dist/interface/assets/CuiCameraPipCard-D6REm8uT.js +0 -1
  422. package/dist/interface/assets/CuiCameraRecordings-C2tvrbbw.js +0 -1
  423. package/dist/interface/assets/CuiCameraShares-jrrUEHoZ.js +0 -1
  424. package/dist/interface/assets/CuiCameraTable-BOzTWLwd.js +0 -1
  425. package/dist/interface/assets/CuiChartTable-BYrIX7LV.js +0 -1
  426. package/dist/interface/assets/CuiLightControl-DitIWqUr.js +0 -1
  427. package/dist/interface/assets/CuiList-BewTNr2X.js +0 -1
  428. package/dist/interface/assets/CuiPluginCard-Bd2HFduI.js +0 -2
  429. package/dist/interface/assets/CuiPluginCategoryChip-DlzOwRgc.js +0 -1
  430. package/dist/interface/assets/CuiSchema-BL0QZmP2.js +0 -1
  431. package/dist/interface/assets/CuiTopNavbarItem-Ti2TueU1.js +0 -1
  432. package/dist/interface/assets/Faces-DARrGLXf.js +0 -1
  433. package/dist/interface/assets/FirstSteps-DBYPBvGr.js +0 -1
  434. package/dist/interface/assets/Floorplan-BaZvzoyv.js +0 -1
  435. package/dist/interface/assets/Instances-r0xReURi.js +0 -1
  436. package/dist/interface/assets/Menu-C34RRyLd.js +0 -1
  437. package/dist/interface/assets/Metrics-BjoC71_O.js +0 -12
  438. package/dist/interface/assets/Metrics-DsHBab6t.css +0 -1
  439. package/dist/interface/assets/OAuthDeviceFlow-CdZxelf2.js +0 -1
  440. package/dist/interface/assets/Plugin-Qr_Q_Qfi.css +0 -1
  441. package/dist/interface/assets/Plugin-npx7CnwV.js +0 -1
  442. package/dist/interface/assets/PluginDetail-nwTrJmO6.js +0 -2
  443. package/dist/interface/assets/PluginSearch-CP2kQWKf.js +0 -1
  444. package/dist/interface/assets/PluginSearch-WEvbKMRs.js +0 -2
  445. package/dist/interface/assets/RecentEventsFilter-D5VSH2K1.js +0 -1
  446. package/dist/interface/assets/Recordings-BEKAn6QK.css +0 -1
  447. package/dist/interface/assets/Recordings-De6Zcv0M.js +0 -1
  448. package/dist/interface/assets/SensorEdit-SD_oHBRo.js +0 -1
  449. package/dist/interface/assets/SensorHistory-SxiLOloa.js +0 -1
  450. package/dist/interface/assets/Sensors-Djl64M-W.js +0 -2
  451. package/dist/interface/assets/Settings-CAf2reGs.js +0 -1
  452. package/dist/interface/assets/SettingsAccount-BGj5Ni91.js +0 -1
  453. package/dist/interface/assets/SettingsAccount-Dy6WC8ql.js +0 -1
  454. package/dist/interface/assets/SettingsAppearance-BGFhMlRk.js +0 -1
  455. package/dist/interface/assets/SettingsAppearance-DQzQmVzE.js +0 -1
  456. package/dist/interface/assets/SettingsAssistant-BwYVyuN3.js +0 -1
  457. package/dist/interface/assets/SettingsBackup-CVExGnOo.js +0 -1
  458. package/dist/interface/assets/SettingsList-vo7sz_MY.js +0 -1
  459. package/dist/interface/assets/SettingsMqtt-B1CuOcML.js +0 -1
  460. package/dist/interface/assets/SettingsNotifications-CCQ6eiq8.js +0 -1
  461. package/dist/interface/assets/SettingsPermissions-BlOf6HEy.js +0 -1
  462. package/dist/interface/assets/SettingsRecordings-7tTBg6m1.js +0 -1
  463. package/dist/interface/assets/SettingsRemote-DBgKmIdv.js +0 -2
  464. package/dist/interface/assets/SettingsSystem-DaFMsZpN.js +0 -2
  465. package/dist/interface/assets/SettingsUsers-DXACwVPi.js +0 -1
  466. package/dist/interface/assets/Terminal-DtGqlHbk.js +0 -4
  467. package/dist/interface/assets/Training-C-ToeAl4.css +0 -1
  468. package/dist/interface/assets/Training-Ca11D1Vj.js +0 -1
  469. package/dist/interface/assets/Updates-yenwuqnD.js +0 -2
  470. package/dist/interface/assets/Workers-Dyo44zxe.js +0 -2
  471. package/dist/interface/assets/api-CHQlxVtZ.css +0 -2
  472. package/dist/interface/assets/api-CLazgL-g.js +0 -4
  473. package/dist/interface/assets/cloudHandoff-zJCrDmwk.js +0 -1
  474. package/dist/interface/assets/eventIcons-C3JWChgS.js +0 -1
  475. package/dist/interface/assets/eventLabels-BsPoPWS9.js +0 -1
  476. package/dist/interface/assets/main-CGY9cVyi.css +0 -1
  477. package/dist/interface/assets/main-DkHV6YgB.js +0 -3
  478. package/dist/interface/assets/mqtt-DE2VbNdt.js +0 -1
  479. package/dist/interface/assets/sensorIcons-BntiOPX7.js +0 -1
  480. package/dist/interface/assets/types-B4LLKzDW.js +0 -1
  481. package/dist/interface/assets/types-a7Nw-P-m.js +0 -1
  482. package/dist/interface/assets/ungrouped-BoAbb9w3.js +0 -1
  483. package/dist/interface/assets/ungrouped-ChmBvcXp.css +0 -1
  484. package/dist/interface/assets/useBackupRestore-Biqn_lhh.js +0 -1
  485. package/dist/interface/assets/vendor-cameraui-GmMRyJ2R.js +0 -2326
  486. package/dist/interface/assets/vendor-core-BeAannbA.js +0 -1
  487. package/dist/interface/ha/Camera-sH9fRv18.js +0 -670
  488. package/dist/interface/ha/Faces-CsM5VO8Q.js +0 -1441
  489. package/dist/interface/ha/Recordings-B1XsJrzs.js +0 -1539
  490. package/dist/interface/ha/Training-CaSFA5oH.js +0 -1699
  491. package/dist/interface/ha/eventLabels-B4C1_4vT.js +0 -42
  492. package/dist/interface/ha/ungrouped-BHLAySWP.js +0 -1312
  493. package/dist/interface/workbox-778a14ff.js +0 -1
@@ -6,47 +6,47 @@ import { t as R } from "./message-D6dIy_hz.js";
6
6
  import { t as z } from "./chevron-down-BNj8w2js.js";
7
7
  import { t as B } from "./tag-mchuCAPR.js";
8
8
  import { t as V } from "./history-XMyO_cLc.js";
9
- import { An as H, B as U, Cr as W, Er as G, Et as te, Mr as ne, Nr as K, Or as q, Ur as re, Wr as ie, Z as J, Zt as ae, at as oe, dr as se, g as Y, gt as X, mi as ce, p as Z, q as le, r as ue, ra as de, rr as fe, wi as pe, wr as me, yr as he } from "./api-DUqpDJ2N.js";
10
- import { g as ge } from "./protocol-BB4jdtUC-DW3jl2tV.js";
11
- import { A as _e, C as ve, h as ye, u as be, w as xe } from "./intercomService-B7HkLs6z.js";
12
- import { G as Se, U as Ce, W as we, r as Te } from "./pinia-DIKO5lnE.js";
13
- import { n as Ee } from "./vue-i18n-D5EAy78K.js";
14
- import { i as De } from "./alert-outline-FcLLjoOK.js";
15
- import { p as Oe, s as ke } from "./eventIcons-BFNUgeGr.js";
16
- import { t as Ae } from "./button-BouAFgf5.js";
17
- import { n as je, t as Me } from "./inputicon-1w06U-Jl.js";
18
- import { t as Ne } from "./inputtext-C_ygnPrC.js";
19
- import { t as Pe } from "./close-CxFbonhd.js";
20
- import { t as Fe } from "./textarea-ByXnzJzx.js";
21
- import { t as Ie } from "./clock-outline-DNStdM39.js";
22
- import { t as Le } from "./source-branch-C2kcmBcO.js";
23
- import { a as Re, i as ze, n as Be, o as Ve, r as He, t as Ue } from "./assistant-BaR65gIY.js";
24
- import { t as We } from "./search-BViwEHdF.js";
25
- import { t as Ge } from "./content-copy-CHPYjxRC.js";
26
- import { t as Ke } from "./CuiMarkdownContent-CrkZwv5j.js";
27
- import { t as qe } from "./brain-BiKXGva0.js";
28
- import { u as Je } from "./cards-DWhezIPP.js";
29
- import { t as Ye } from "./pencil-outline-SN9ingm5.js";
30
- 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-wLECk3Ml.js";
31
- import { t as it } from "./back-filled-CaxrZv0Q.js";
32
- import { t as at } from "./help-circle-outline-BniRuJRv.js";
33
- import { t as ot } from "./refresh-CpjKkasY.js";
34
- import { t as st } from "./check-circle-outline-DS7eEinv.js";
35
- import { t as ct } from "./chevron-up-DDKj43BW.js";
36
- import { t as lt } from "./microphone-C4oQPpzp.js";
37
- import { n as ut, r as dt, t as ft } from "./useKeyboardInset-Cj0T2AFX.js";
38
- import { t as pt } from "./useAssistantActions-S1FrNe9b.js";
9
+ import { $ as H, Ar as U, B as W, Ei as te, Er as G, Fr as K, Gr as ne, Kr as q, On as re, Or as ie, Pr as ae, Q as oe, Tr as se, er as ce, g as le, gi as J, ht as ue, p as Y, pr as de, q as fe, r as pe, sa as me, vn as he, xn as ge, xr as _e } from "./api-CH_Y8Hee.js";
10
+ import { g as ve } from "./protocol-BB4jdtUC-BhEwymva.js";
11
+ import { A as ye, C as be, h as xe, u as Se, w as Ce } from "./intercomService-BtJ_zUNd.js";
12
+ import { G as we, U as Te, W as Ee, r as De } from "./pinia-CVnHHb-s.js";
13
+ import { n as Oe } from "./vue-i18n-D5EAy78K.js";
14
+ import { i as ke } from "./alert-outline-FcLLjoOK.js";
15
+ import { b as Ae, m as je } from "./eventLabels-B5GrM5jO.js";
16
+ import { t as Me } from "./button-BouAFgf5.js";
17
+ import { n as Ne, t as Pe } from "./inputicon-1w06U-Jl.js";
18
+ import { t as Fe } from "./inputtext-C_ygnPrC.js";
19
+ import { t as Ie } from "./close-CxFbonhd.js";
20
+ import { t as Le } from "./textarea-ByXnzJzx.js";
21
+ import { t as Re } from "./clock-outline-DNStdM39.js";
22
+ import { t as ze } from "./source-branch-C2kcmBcO.js";
23
+ import { a as Be, i as Ve, n as He, o as Ue, r as We, t as Ge } from "./assistant-smRQYA6p.js";
24
+ import { t as Ke } from "./search-BViwEHdF.js";
25
+ import { t as qe } from "./content-copy-CHPYjxRC.js";
26
+ import { t as Je } from "./CuiMarkdownContent-CrkZwv5j.js";
27
+ import { t as Ye } from "./brain-BiKXGva0.js";
28
+ import { u as Xe } from "./cards-E0zw1UVg.js";
29
+ import { t as Ze } from "./pencil-outline-SN9ingm5.js";
30
+ import { c as Qe, d as $e, i as et, l as tt, n as nt, r as rt, t as it, u as at } from "./types-wLECk3Ml.js";
31
+ import { t as ot } from "./back-filled-CaxrZv0Q.js";
32
+ import { t as st } from "./help-circle-outline-BniRuJRv.js";
33
+ import { t as ct } from "./refresh-CpjKkasY.js";
34
+ import { t as lt } from "./check-circle-outline-DS7eEinv.js";
35
+ import { t as ut } from "./chevron-up-DDKj43BW.js";
36
+ import { t as dt } from "./microphone-C4oQPpzp.js";
37
+ import { n as ft, r as pt, t as mt } from "./useKeyboardInset-C2R51vsC.js";
38
+ import { t as ht } from "./useAssistantActions-kDwiO-u5.js";
39
39
  //#region src/components/CuiAssistantQuestion/CuiAssistantQuestion.vue?vue&type=script&setup=true&lang.ts
40
- var mt = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex-col gap-3" }, ht = { class: "flex items-start gap-2" }, gt = { class: "min-w-0 flex-1 font-medium text-color" }, _t = {
40
+ var gt = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex-col gap-3" }, _t = { class: "flex items-start gap-2" }, vt = { class: "min-w-0 flex-1 font-medium text-color" }, yt = {
41
41
  key: 0,
42
42
  class: "flex flex-wrap gap-2"
43
- }, vt = {
43
+ }, bt = {
44
44
  key: 1,
45
45
  class: "flex flex-col sm:flex-row gap-2"
46
- }, yt = { class: "flex flex-1 flex-col gap-1" }, bt = ["for"], xt = { class: "flex flex-1 flex-col gap-1" }, St = ["for"], Ct = { class: "flex items-center gap-2" }, wt = {
46
+ }, xt = { class: "flex flex-1 flex-col gap-1" }, St = ["for"], Ct = { class: "flex flex-1 flex-col gap-1" }, wt = ["for"], Tt = { class: "flex items-center gap-2" }, Et = {
47
47
  key: 1,
48
48
  class: "flex-1"
49
- }, Tt = /*#__PURE__*/ q(/* @__PURE__ */ P({
49
+ }, Dt = /*#__PURE__*/ U(/* @__PURE__ */ P({
50
50
  __name: "CuiAssistantQuestion",
51
51
  props: {
52
52
  question: {},
@@ -64,10 +64,10 @@ var mt = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex
64
64
  p.value && c("answer", p.value);
65
65
  }
66
66
  return (t, o) => {
67
- let m = at, b = Ae, x = Ne;
68
- return a(), w("div", mt, [
69
- k("div", ht, [I(m, { class: "w-5 h-5 shrink-0 text-muted mt-0.5" }), k("div", gt, s(e.question.question), 1)]),
70
- y(f).length ? (a(), w("div", _t, [(a(!0), w(E, null, i(y(f), (t) => (a(), h(b, {
67
+ let m = st, b = Me, x = Fe;
68
+ return a(), w("div", gt, [
69
+ k("div", _t, [I(m, { class: "w-5 h-5 shrink-0 text-muted mt-0.5" }), k("div", vt, s(e.question.question), 1)]),
70
+ y(f).length ? (a(), w("div", yt, [(a(!0), w(E, null, i(y(f), (t) => (a(), h(b, {
71
71
  key: t,
72
72
  type: "button",
73
73
  severity: "secondary",
@@ -81,20 +81,20 @@ var mt = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex
81
81
  "label",
82
82
  "onClick"
83
83
  ]))), 128))])) : g("", !0),
84
- e.question.kind === "time_range" ? (a(), w("div", vt, [k("div", yt, [k("label", {
84
+ e.question.kind === "time_range" ? (a(), w("div", bt, [k("div", xt, [k("label", {
85
85
  for: `question-from-${e.question.toolCallId}`,
86
86
  class: "text-xs text-muted"
87
- }, s(t.$t("views.assistant.question_from")), 9, bt), I(x, {
87
+ }, s(t.$t("views.assistant.question_from")), 9, St), I(x, {
88
88
  id: `question-from-${e.question.toolCallId}`,
89
89
  modelValue: y(u),
90
90
  "onUpdate:modelValue": o[0] ||= (e) => _(u) ? u.value = e : null,
91
91
  type: "datetime-local",
92
92
  fluid: "",
93
93
  size: "small"
94
- }, null, 8, ["id", "modelValue"])]), k("div", xt, [k("label", {
94
+ }, null, 8, ["id", "modelValue"])]), k("div", Ct, [k("label", {
95
95
  for: `question-to-${e.question.toolCallId}`,
96
96
  class: "text-xs text-muted"
97
- }, s(t.$t("views.assistant.question_to")), 9, St), I(x, {
97
+ }, s(t.$t("views.assistant.question_to")), 9, wt), I(x, {
98
98
  id: `question-to-${e.question.toolCallId}`,
99
99
  modelValue: y(d),
100
100
  "onUpdate:modelValue": o[1] ||= (e) => _(d) ? d.value = e : null,
@@ -102,8 +102,8 @@ var mt = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex
102
102
  fluid: "",
103
103
  size: "small"
104
104
  }, null, 8, ["id", "modelValue"])])])) : g("", !0),
105
- k("div", Ct, [
106
- e.question.kind === "time_range" ? (a(), w("span", wt)) : (a(), h(x, {
105
+ k("div", Tt, [
106
+ e.question.kind === "time_range" ? (a(), w("span", Et)) : (a(), h(x, {
107
107
  key: 0,
108
108
  modelValue: y(l),
109
109
  "onUpdate:modelValue": o[2] ||= (e) => _(l) ? l.value = e : null,
@@ -141,13 +141,13 @@ var mt = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex
141
141
  ]);
142
142
  };
143
143
  }
144
- }), [["__scopeId", "data-v-49502a42"]]), Et = { class: "cui-assistant-approval rounded-xl px-4 py-3 text-sm flex flex-col gap-3" }, Dt = { class: "flex items-start gap-2" }, Ot = { class: "min-w-0 flex-1" }, kt = { class: "font-medium text-color" }, At = { class: "text-muted" }, jt = {
144
+ }), [["__scopeId", "data-v-49502a42"]]), Ot = { class: "cui-assistant-approval rounded-xl px-4 py-3 text-sm flex flex-col gap-3" }, kt = { class: "flex items-start gap-2" }, At = { class: "min-w-0 flex-1" }, jt = { class: "font-medium text-color" }, Mt = { class: "text-muted" }, Nt = {
145
145
  key: 0,
146
146
  class: "cui-assistant-pre mt-2 max-h-40 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono"
147
- }, Mt = {
147
+ }, Pt = {
148
148
  key: 1,
149
149
  class: "mt-2 flex flex-col gap-1"
150
- }, Nt = { class: "flex justify-end gap-2" }, Pt = /*#__PURE__*/ q(/* @__PURE__ */ P({
150
+ }, Ft = { class: "flex justify-end gap-2" }, It = /*#__PURE__*/ U(/* @__PURE__ */ P({
151
151
  __name: "CuiAssistantApproval",
152
152
  props: {
153
153
  toolName: {},
@@ -157,7 +157,7 @@ var mt = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex
157
157
  },
158
158
  emits: ["approve", "reject"],
159
159
  setup(e, { emit: t }) {
160
- let n = e, r = t, i = F(!1), o = F(""), c = b(() => Qe(n.toolName)), l = b(() => {
160
+ let n = e, r = t, i = F(!1), o = F(""), c = b(() => et(n.toolName)), l = b(() => {
161
161
  if (n.args === void 0 || n.args === null || typeof n.args == "object" && Object.keys(n.args).length === 0) return "";
162
162
  try {
163
163
  return JSON.stringify(n.args, null, 2);
@@ -186,12 +186,12 @@ var mt = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex
186
186
  r("approve", l.value === o.value ? void 0 : e);
187
187
  }
188
188
  return (t, n) => {
189
- let p = ke, m = Fe, v = R, b = Ae;
190
- return a(), w("div", Et, [k("div", Dt, [I(p, { class: "w-5 h-5 shrink-0 text-warning mt-0.5" }), k("div", Ot, [
191
- k("div", kt, s(t.$t("views.assistant.approval_title", { tool: y(c) })), 1),
192
- k("div", At, s(t.$t("views.assistant.approval_hint")), 1),
193
- y(l) && !y(i) ? (a(), w("pre", jt, s(y(l)), 1)) : g("", !0),
194
- y(i) ? (a(), w("div", Mt, [I(m, {
189
+ let p = je, m = Le, v = R, b = Me;
190
+ return a(), w("div", Ot, [k("div", kt, [I(p, { class: "w-5 h-5 shrink-0 text-warning mt-0.5" }), k("div", At, [
191
+ k("div", jt, s(t.$t("views.assistant.approval_title", { tool: y(c) })), 1),
192
+ k("div", Mt, s(t.$t("views.assistant.approval_hint")), 1),
193
+ y(l) && !y(i) ? (a(), w("pre", Nt, s(y(l)), 1)) : g("", !0),
194
+ y(i) ? (a(), w("div", Pt, [I(m, {
195
195
  modelValue: y(o),
196
196
  "onUpdate:modelValue": n[0] ||= (e) => _(o) ? o.value = e : null,
197
197
  "auto-resize": "",
@@ -214,7 +214,7 @@ var mt = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex
214
214
  default: x(() => [j(s(t.$t("views.assistant.approval_edit_hint")), 1)]),
215
215
  _: 1
216
216
  }))])) : g("", !0)
217
- ])]), k("div", Nt, [
217
+ ])]), k("div", Ft, [
218
218
  y(l) ? (a(), h(b, {
219
219
  key: 0,
220
220
  type: "button",
@@ -249,55 +249,55 @@ var mt = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex
249
249
  ])]);
250
250
  };
251
251
  }
252
- }), [["__scopeId", "data-v-f3109818"]]), Ft = {
252
+ }), [["__scopeId", "data-v-f3109818"]]), Lt = {
253
253
  viewBox: "0 0 24 24",
254
254
  width: "1.2em",
255
255
  height: "1.2em"
256
256
  };
257
- function It(e, t) {
258
- return a(), w("svg", Ft, [...t[0] ||= [k("path", {
257
+ function Rt(e, t) {
258
+ return a(), w("svg", Lt, [...t[0] ||= [k("path", {
259
259
  fill: "currentColor",
260
260
  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"
261
261
  }, null, -1)]]);
262
262
  }
263
- var Lt = p({
263
+ var zt = p({
264
264
  name: "mdi-play-circle-outline",
265
- render: It
266
- }), Rt = {
265
+ render: Rt
266
+ }), Bt = {
267
267
  viewBox: "0 0 24 24",
268
268
  width: "1.2em",
269
269
  height: "1.2em"
270
270
  };
271
- function zt(e, t) {
272
- return a(), w("svg", Rt, [...t[0] ||= [k("path", {
271
+ function Vt(e, t) {
272
+ return a(), w("svg", Bt, [...t[0] ||= [k("path", {
273
273
  fill: "currentColor",
274
274
  d: "M13 5v6h1.17L12 13.17L9.83 11H11V5zm2-2H9v6H5l7 7l7-7h-4zm4 15H5v2h14z"
275
275
  }, null, -1)]]);
276
276
  }
277
- var Bt = p({
277
+ var Ht = p({
278
278
  name: "mdi-download-outline",
279
- render: zt
280
- }), Vt = {
279
+ render: Vt
280
+ }), Ut = {
281
281
  viewBox: "0 0 24 24",
282
282
  width: "1.2em",
283
283
  height: "1.2em"
284
284
  };
285
- function Ht(e, t) {
286
- return a(), w("svg", Vt, [...t[0] ||= [k("path", {
285
+ function Wt(e, t) {
286
+ return a(), w("svg", Ut, [...t[0] ||= [k("path", {
287
287
  fill: "currentColor",
288
288
  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"
289
289
  }, null, -1)]]);
290
290
  }
291
- var Ut = p({
291
+ var Gt = p({
292
292
  name: "mdi-video-outline",
293
- render: Ht
293
+ render: Wt
294
294
  });
295
295
  //#endregion
296
296
  //#region src/composables/useAssistantReferences.ts
297
- function Wt() {
298
- let e = ie(), { t } = Ee(), n = pe(), r = X(), { openEpisodePlayer: i } = J(), a = fe("@camera.ui/camera-ui-nvr"), { download: o } = W(), s = F(null);
297
+ function Kt() {
298
+ let e = q(), { t } = Oe(), n = te(), r = ge(), { openEpisodePlayer: i } = oe(), a = ce("@camera.ui/camera-ui-nvr"), { download: o } = se(), s = F(null);
299
299
  async function c() {
300
- let e = await ae({
300
+ let e = await he({
301
301
  parameter: {
302
302
  page: 1,
303
303
  pageSize: -1
@@ -307,7 +307,7 @@ function Wt() {
307
307
  return new Map(e.result.map((e) => [e._id, e]));
308
308
  }
309
309
  function l(e, t) {
310
- r.openComponentDialog(oe, {
310
+ r.openComponentDialog(H, {
311
311
  data: {
312
312
  title: e.name,
313
313
  dedupeKey: `camera-event:${e._id}:${t}`,
@@ -376,17 +376,17 @@ function Wt() {
376
376
  }
377
377
  //#endregion
378
378
  //#region src/components/CuiAssistantReferences/CuiAssistantReferences.vue?vue&type=script&setup=true&lang.ts
379
- var Gt = { class: "flex flex-wrap gap-1.5" }, Kt = ["disabled", "onClick"], qt = { class: "truncate max-w-[16rem]" }, Jt = /*#__PURE__*/ q(/* @__PURE__ */ P({
379
+ var qt = { class: "flex flex-wrap gap-1.5" }, Jt = ["disabled", "onClick"], Yt = { class: "truncate max-w-[16rem]" }, Xt = /*#__PURE__*/ U(/* @__PURE__ */ P({
380
380
  __name: "CuiAssistantReferences",
381
381
  props: { references: {} },
382
382
  setup(e) {
383
- let { t } = Ee(), { busy: n, open: r } = Wt();
383
+ let { t } = Oe(), { busy: n, open: r } = Kt();
384
384
  function o(e) {
385
385
  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");
386
386
  }
387
387
  return (t, c) => {
388
- let l = Ut, u = Bt, d = Lt;
389
- return a(), w("div", Gt, [(a(!0), w(E, null, i(e.references, (e, t) => (a(), w("button", {
388
+ let l = Gt, u = Ht, d = zt;
389
+ return a(), w("div", qt, [(a(!0), w(E, null, i(e.references, (e, t) => (a(), w("button", {
390
390
  key: `${e.kind}:${e.id}:${t}`,
391
391
  type: "button",
392
392
  class: "cui-assistant-ref flex cursor-pointer items-center gap-1.5 rounded-lg px-2.5 py-1 text-xs",
@@ -401,10 +401,10 @@ var Gt = { class: "flex flex-wrap gap-1.5" }, Kt = ["disabled", "onClick"], qt =
401
401
  })) : (a(), h(d, {
402
402
  key: 2,
403
403
  class: "w-3.5 h-3.5 shrink-0"
404
- })), k("span", qt, s(e.label || o(e)), 1)], 8, Kt))), 128))]);
404
+ })), k("span", Yt, s(e.label || o(e)), 1)], 8, Jt))), 128))]);
405
405
  };
406
406
  }
407
- }), [["__scopeId", "data-v-aae1a6dd"]]), Yt = { class: "flex items-center gap-3" }, Xt = { class: "flex min-w-0 flex-1 flex-col" }, Zt = { class: "text-sm font-medium" }, Qt = { class: "text-xs" }, $t = /*#__PURE__*/ q(/* @__PURE__ */ P({
407
+ }), [["__scopeId", "data-v-aae1a6dd"]]), Zt = { class: "flex items-center gap-3" }, Qt = { class: "flex min-w-0 flex-1 flex-col" }, $t = { class: "text-sm font-medium" }, en = { class: "text-xs" }, tn = /*#__PURE__*/ U(/* @__PURE__ */ P({
408
408
  __name: "CuiAssistantNotice",
409
409
  props: {
410
410
  title: {},
@@ -419,19 +419,19 @@ var Gt = { class: "flex flex-wrap gap-1.5" }, Kt = ["disabled", "onClick"], qt =
419
419
  size: "small",
420
420
  class: "cui-assistant-notice"
421
421
  }, {
422
- default: x(() => [k("div", Yt, [k("div", Xt, [k("span", Zt, s(e.title), 1), k("span", Qt, s(e.text), 1)]), c(t.$slots, "default", {}, void 0, !0)])]),
422
+ default: x(() => [k("div", Zt, [k("div", Qt, [k("span", $t, s(e.title), 1), k("span", en, s(e.text), 1)]), c(t.$slots, "default", {}, void 0, !0)])]),
423
423
  _: 3
424
424
  }, 8, ["severity"]);
425
425
  };
426
426
  }
427
- }), [["__scopeId", "data-v-1dc28011"]]), en = /* @__PURE__ */ P({
427
+ }), [["__scopeId", "data-v-1dc28011"]]), nn = /* @__PURE__ */ P({
428
428
  __name: "CuiAssistantSetting",
429
429
  props: {
430
430
  setting: {},
431
431
  modelId: {}
432
432
  },
433
433
  setup(e) {
434
- let t = new Ue(), n = e, r = Y(), { user: i } = Te(r), { data: o } = t.getAssistantInfoQuery(), s = t.patchAssistantInfoMutation(), c = b(() => i.value?.role === "admin" || i.value?.role === "master"), l = b(() => o.value?.settings.models ?? []), u = b(() => l.value.find((e) => e._id === n.modelId) ?? (o.value ? $e(o.value.settings) : void 0)), d = b(() => n.setting === "sendImages" ? u.value?.sendImages === !0 : o.value?.settings[n.setting] === !0);
434
+ let t = new Ge(), n = e, r = le(), { user: i } = De(r), { data: o } = t.getAssistantInfoQuery(), s = t.patchAssistantInfoMutation(), c = b(() => i.value?.role === "admin" || i.value?.role === "master"), l = b(() => o.value?.settings.models ?? []), u = b(() => l.value.find((e) => e._id === n.modelId) ?? (o.value ? tt(o.value.settings) : void 0)), d = b(() => n.setting === "sendImages" ? u.value?.sendImages === !0 : o.value?.settings[n.setting] === !0);
435
435
  async function f(e) {
436
436
  if (n.setting !== "sendImages") {
437
437
  await s.mutateAsync({ [n.setting]: e });
@@ -439,12 +439,12 @@ var Gt = { class: "flex flex-wrap gap-1.5" }, Kt = ["disabled", "onClick"], qt =
439
439
  }
440
440
  let t = u.value;
441
441
  t && await s.mutateAsync({ models: l.value.map((n) => ({
442
- ...rt(n),
442
+ ...at(n),
443
443
  ...n._id === t._id ? { sendImages: e } : {}
444
444
  })) });
445
445
  }
446
446
  return (t, n) => {
447
- let r = H, i = $t;
447
+ let r = re, i = tn;
448
448
  return a(), h(i, {
449
449
  severity: y(d) ? "success" : "warn",
450
450
  title: t.$t(`views.assistant.setting_${e.setting}_title`),
@@ -465,71 +465,71 @@ var Gt = { class: "flex flex-wrap gap-1.5" }, Kt = ["disabled", "onClick"], qt =
465
465
  ]);
466
466
  };
467
467
  }
468
- }), tn = {
468
+ }), rn = {
469
469
  viewBox: "0 0 24 24",
470
470
  width: "1.2em",
471
471
  height: "1.2em"
472
472
  };
473
- function nn(e, t) {
474
- return a(), w("svg", tn, [...t[0] ||= [k("path", {
473
+ function an(e, t) {
474
+ return a(), w("svg", rn, [...t[0] ||= [k("path", {
475
475
  fill: "currentColor",
476
476
  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"
477
477
  }, null, -1)]]);
478
478
  }
479
- var rn = p({
479
+ var on = p({
480
480
  name: "mdi-format-list-bulleted",
481
- render: nn
482
- }), an = {
481
+ render: an
482
+ }), sn = {
483
483
  viewBox: "0 0 24 24",
484
484
  width: "1.2em",
485
485
  height: "1.2em"
486
486
  };
487
- function on(e, t) {
488
- return a(), w("svg", an, [...t[0] ||= [k("path", {
487
+ function cn(e, t) {
488
+ return a(), w("svg", sn, [...t[0] ||= [k("path", {
489
489
  fill: "currentColor",
490
490
  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"
491
491
  }, null, -1)]]);
492
492
  }
493
- var sn = p({
493
+ var ln = p({
494
494
  name: "mdi-calendar-today",
495
- render: on
496
- }), cn = {
495
+ render: cn
496
+ }), un = {
497
497
  viewBox: "0 0 24 24",
498
498
  width: "1.2em",
499
499
  height: "1.2em"
500
500
  };
501
- function ln(e, t) {
502
- return a(), w("svg", cn, [...t[0] ||= [k("path", {
501
+ function dn(e, t) {
502
+ return a(), w("svg", un, [...t[0] ||= [k("path", {
503
503
  fill: "currentColor",
504
504
  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"
505
505
  }, null, -1)]]);
506
506
  }
507
- var un = p({
507
+ var fn = p({
508
508
  name: "mdi-heart-pulse",
509
- render: ln
510
- }), dn = { class: "cui-assistant-card rounded-xl px-4 py-3 text-sm" }, fn = { class: "flex items-start gap-2" }, pn = { class: "min-w-0 flex-1" }, mn = { class: "font-medium text-color" }, hn = {
509
+ render: dn
510
+ }), pn = { class: "cui-assistant-card rounded-xl px-4 py-3 text-sm" }, mn = { class: "flex items-start gap-2" }, hn = { class: "min-w-0 flex-1" }, gn = { class: "font-medium text-color" }, _n = {
511
511
  key: 0,
512
512
  class: "text-xs text-muted"
513
- }, gn = { class: "mt-3 flex flex-col gap-2" }, _n = { class: "min-w-0 flex-1 truncate text-color" }, vn = {
513
+ }, vn = { class: "mt-3 flex flex-col gap-2" }, yn = { class: "min-w-0 flex-1 truncate text-color" }, bn = {
514
514
  key: 0,
515
515
  class: "shrink-0 font-medium tabular-nums text-color"
516
- }, yn = {
516
+ }, xn = {
517
517
  key: 0,
518
518
  class: "cui-assistant-card-bar ml-4 h-1 overflow-hidden rounded-full"
519
- }, bn = {
519
+ }, Sn = {
520
520
  key: 1,
521
521
  class: "ml-4 text-xs text-muted"
522
- }, xn = {
522
+ }, Cn = {
523
523
  key: 0,
524
524
  class: "mt-3 text-xs text-muted"
525
- }, Sn = /*#__PURE__*/ q(/* @__PURE__ */ P({
525
+ }, wn = /*#__PURE__*/ U(/* @__PURE__ */ P({
526
526
  __name: "CuiAssistantCard",
527
527
  props: {
528
528
  card: {},
529
529
  references: {}
530
530
  },
531
531
  setup(e) {
532
- let t = e, { busy: n, open: r } = Wt();
532
+ let t = e, { busy: n, open: r } = Kt();
533
533
  function o(e) {
534
534
  if (e.episodeId) return t.references?.find((t) => t.kind === "episode" && t.id === e.episodeId) ?? {
535
535
  kind: "episode",
@@ -541,9 +541,9 @@ var un = p({
541
541
  return e === "ok" ? "bg-success" : e === "warn" ? "bg-warning" : e === "error" ? "bg-danger" : "cui-assistant-card-dot-plain";
542
542
  }
543
543
  return (t, l) => {
544
- let u = un, p = sn, m = rn, _ = se;
545
- return a(), w("div", dn, [
546
- k("div", fn, [e.card.kind === "system_health" ? (a(), h(u, {
544
+ let u = fn, p = ln, m = on, _ = de;
545
+ return a(), w("div", pn, [
546
+ k("div", mn, [e.card.kind === "system_health" ? (a(), h(u, {
547
547
  key: 0,
548
548
  class: "w-5 h-5 shrink-0 text-muted mt-0.5"
549
549
  })) : e.card.kind === "day_recap" ? (a(), h(p, {
@@ -552,8 +552,8 @@ var un = p({
552
552
  })) : (a(), h(m, {
553
553
  key: 2,
554
554
  class: "w-5 h-5 shrink-0 text-muted mt-0.5"
555
- })), k("div", pn, [k("div", mn, s(e.card.title), 1), e.card.subtitle ? (a(), w("div", hn, s(e.card.subtitle), 1)) : g("", !0)])]),
556
- k("div", gn, [(a(!0), w(E, null, i(e.card.items, (e, t) => (a(), w("div", {
555
+ })), k("div", hn, [k("div", gn, s(e.card.title), 1), e.card.subtitle ? (a(), w("div", _n, s(e.card.subtitle), 1)) : g("", !0)])]),
556
+ k("div", vn, [(a(!0), w(E, null, i(e.card.items, (e, t) => (a(), w("div", {
557
557
  key: t,
558
558
  class: "flex flex-col gap-1"
559
559
  }, [
@@ -565,8 +565,8 @@ var un = p({
565
565
  }, {
566
566
  default: x(() => [
567
567
  k("span", { class: d(["cui-assistant-card-dot h-2 w-2 shrink-0 self-center rounded-full", c(e.severity)]) }, null, 2),
568
- k("span", _n, s(e.label), 1),
569
- e.value ? (a(), w("span", vn, s(e.value), 1)) : g("", !0),
568
+ k("span", yn, s(e.label), 1),
569
+ e.value ? (a(), w("span", bn, s(e.value), 1)) : g("", !0),
570
570
  o(e) ? (a(), h(_, {
571
571
  key: 1,
572
572
  class: "h-4 w-4 shrink-0 self-center text-muted"
@@ -579,46 +579,46 @@ var un = p({
579
579
  "disabled",
580
580
  "onClick"
581
581
  ])),
582
- e.share === void 0 ? g("", !0) : (a(), w("div", yn, [k("div", {
582
+ e.share === void 0 ? g("", !0) : (a(), w("div", xn, [k("div", {
583
583
  class: "cui-assistant-card-fill h-full rounded-full",
584
584
  style: T({ width: `${Math.round(Math.min(1, Math.max(0, e.share)) * 100)}%` })
585
585
  }, null, 4)])),
586
- e.note ? (a(), w("div", bn, s(e.note), 1)) : g("", !0)
586
+ e.note ? (a(), w("div", Sn, s(e.note), 1)) : g("", !0)
587
587
  ]))), 128))]),
588
- e.card.footer ? (a(), w("div", xn, s(e.card.footer), 1)) : g("", !0)
588
+ e.card.footer ? (a(), w("div", Cn, s(e.card.footer), 1)) : g("", !0)
589
589
  ]);
590
590
  };
591
591
  }
592
- }), [["__scopeId", "data-v-02b66e4e"]]), Cn = {
592
+ }), [["__scopeId", "data-v-02b66e4e"]]), Tn = {
593
593
  viewBox: "0 0 24 24",
594
594
  width: "1.2em",
595
595
  height: "1.2em"
596
596
  };
597
- function wn(e, t) {
598
- return a(), w("svg", Cn, [...t[0] ||= [k("path", {
597
+ function En(e, t) {
598
+ return a(), w("svg", Tn, [...t[0] ||= [k("path", {
599
599
  fill: "currentColor",
600
600
  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"
601
601
  }, null, -1)]]);
602
602
  }
603
- var Tn = p({
603
+ var Dn = p({
604
604
  name: "mdi-close-circle-outline",
605
- render: wn
606
- }), En = { class: "cui-assistant-tool rounded-xl text-sm" }, Dn = { class: "font-medium truncate text-color" }, On = { class: "text-muted truncate" }, kn = { class: "ml-auto shrink-0 text-muted" }, An = {
605
+ render: En
606
+ }), On = { class: "cui-assistant-tool rounded-xl text-sm" }, kn = { class: "font-medium truncate text-color" }, An = { class: "text-muted truncate" }, jn = { class: "ml-auto shrink-0 text-muted" }, Mn = {
607
607
  key: 0,
608
608
  class: "flex flex-wrap gap-2 px-3 pb-2"
609
- }, jn = ["onClick"], Mn = ["src", "alt"], Nn = {
609
+ }, Nn = ["onClick"], Pn = ["src", "alt"], Fn = {
610
610
  key: 1,
611
611
  class: "flex flex-col gap-2 px-3 pb-2"
612
- }, Pn = {
612
+ }, In = {
613
613
  key: 2,
614
614
  class: "flex flex-col gap-2 px-3 pb-2"
615
- }, Fn = {
615
+ }, Ln = {
616
616
  key: 3,
617
617
  class: "px-3 pb-2"
618
- }, In = {
618
+ }, Rn = {
619
619
  key: 4,
620
620
  class: "cui-assistant-tool-details px-3 py-2 flex flex-col gap-2"
621
- }, Ln = { key: 0 }, Rn = { class: "text-xs uppercase tracking-wide text-muted" }, zn = { class: "cui-assistant-pre mt-1 max-h-64 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono" }, Bn = { key: 1 }, Vn = { class: "text-xs uppercase tracking-wide text-muted" }, Hn = { class: "cui-assistant-pre mt-1 max-h-64 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono" }, Un = /*#__PURE__*/ q(/* @__PURE__ */ P({
621
+ }, zn = { key: 0 }, 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 = { key: 1 }, Un = { class: "text-xs uppercase tracking-wide text-muted" }, Wn = { class: "cui-assistant-pre mt-1 max-h-64 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono" }, Gn = /*#__PURE__*/ U(/* @__PURE__ */ P({
622
622
  __name: "CuiAssistantToolCall",
623
623
  props: {
624
624
  part: {},
@@ -639,19 +639,19 @@ var Tn = p({
639
639
  }
640
640
  },
641
641
  setup(e) {
642
- let t = e, { t: n } = Ee(), { openImageDialog: r } = X(), o = F(!1), c = b(() => Qe(t.part.name)), l = b(() => [
642
+ let t = e, { t: n } = Oe(), { openImageDialog: r } = ge(), o = F(!1), c = b(() => et(t.part.name)), l = b(() => [
643
643
  "awaiting-input",
644
644
  "input-streaming",
645
645
  "input-complete",
646
646
  "approval-responded"
647
647
  ].includes(t.part.state) && !t.result), u = b(() => l.value && t.busy), d = b(() => l.value && !t.busy), f = b(() => t.part.state === "approval-requested"), p = b(() => t.part.approval?.needsApproval === !0 && t.part.approval.approved === !1), m = b(() => t.part.state === "error" || t.result?.state === "error" || !!t.result?.error), _ = b(() => u.value ? n("views.assistant.tool_running") : d.value ? n("views.assistant.tool_unfinished") : f.value ? n("views.assistant.tool_waiting_approval") : p.value ? n("views.assistant.tool_rejected") : m.value ? n("views.assistant.tool_failed") : ""), v = b(() => {
648
- let e = t.part.input ?? tt(t.part.arguments);
648
+ let e = t.part.input ?? rt(t.part.arguments);
649
649
  return e == null || typeof e == "object" && Object.keys(e).length === 0 ? "" : T(e);
650
- }), x = b(() => nt(t.result)), S = b(() => {
650
+ }), x = b(() => it(t.result)), S = b(() => {
651
651
  if (t.result?.error) return t.result.error;
652
652
  let e = t.result?.content;
653
- return e === void 0 ? "" : typeof e == "string" && !x.value ? T(tt(e) ?? e) : (x.value ?? []).filter((e) => e.type === "text").map((e) => e.type === "text" ? e.content : "").join("\n");
654
- }), C = b(() => [...t.extraImages ?? [], ...et(x.value, c.value)]);
653
+ return e === void 0 ? "" : typeof e == "string" && !x.value ? T(rt(e) ?? e) : (x.value ?? []).filter((e) => e.type === "text").map((e) => e.type === "text" ? e.content : "").join("\n");
654
+ }), C = b(() => [...t.extraImages ?? [], ...nt(x.value, c.value)]);
655
655
  function T(e) {
656
656
  if (typeof e == "string") return e;
657
657
  try {
@@ -667,8 +667,8 @@ var Tn = p({
667
667
  } });
668
668
  }
669
669
  return (t, n) => {
670
- let r = G, l = Oe, b = ke, x = Tn, T = st, O = ct, A = z, j = Sn, M = en, N = $t, P = Jt;
671
- return a(), w("div", En, [
670
+ let r = ie, l = Ae, b = je, x = Dn, T = lt, O = ut, A = z, j = wn, M = nn, N = tn, P = Xt;
671
+ return a(), w("div", On, [
672
672
  k("button", {
673
673
  type: "button",
674
674
  class: "flex w-full cursor-pointer items-center gap-2 px-3 py-2 text-left",
@@ -691,9 +691,9 @@ var Tn = p({
691
691
  key: 4,
692
692
  class: "w-4 h-4 shrink-0 text-success"
693
693
  })),
694
- k("span", Dn, s(y(c)), 1),
695
- k("span", On, s(y(_)), 1),
696
- k("span", kn, [y(o) ? (a(), h(O, {
694
+ k("span", kn, s(y(c)), 1),
695
+ k("span", An, s(y(_)), 1),
696
+ k("span", jn, [y(o) ? (a(), h(O, {
697
697
  key: 0,
698
698
  class: "w-4 h-4"
699
699
  })) : (a(), h(A, {
@@ -701,7 +701,7 @@ var Tn = p({
701
701
  class: "w-4 h-4"
702
702
  }))])
703
703
  ]),
704
- e.inlineAttachments && y(C).length ? (a(), w("div", An, [(a(!0), w(E, null, i(y(C), (e) => (a(), w("button", {
704
+ e.inlineAttachments && y(C).length ? (a(), w("div", Mn, [(a(!0), w(E, null, i(y(C), (e) => (a(), w("button", {
705
705
  key: e.src,
706
706
  type: "button",
707
707
  class: "cui-assistant-thumb cursor-pointer overflow-hidden rounded-lg",
@@ -711,13 +711,13 @@ var Tn = p({
711
711
  alt: e.alt,
712
712
  class: "h-24 w-auto object-cover",
713
713
  loading: "lazy"
714
- }, null, 8, Mn)], 8, jn))), 128))])) : g("", !0),
715
- e.inlineAttachments && e.cards?.length ? (a(), w("div", Nn, [(a(!0), w(E, null, i(e.cards, (t, n) => (a(), h(j, {
714
+ }, null, 8, Pn)], 8, Nn))), 128))])) : g("", !0),
715
+ e.inlineAttachments && e.cards?.length ? (a(), w("div", Fn, [(a(!0), w(E, null, i(e.cards, (t, n) => (a(), h(j, {
716
716
  key: n,
717
717
  card: t,
718
718
  references: e.references
719
719
  }, null, 8, ["card", "references"]))), 128))])) : g("", !0),
720
- e.inlineAttachments && (e.settings?.length || e.notices?.length) ? (a(), w("div", Pn, [(a(!0), w(E, null, i(e.settings, (t) => (a(), h(M, {
720
+ e.inlineAttachments && (e.settings?.length || e.notices?.length) ? (a(), w("div", In, [(a(!0), w(E, null, i(e.settings, (t) => (a(), h(M, {
721
721
  key: t,
722
722
  setting: t,
723
723
  "model-id": e.modelId
@@ -726,86 +726,86 @@ var Tn = p({
726
726
  title: t.$t(`views.assistant.notice_${e.capability}_title`, { model: e.model }),
727
727
  text: t.$t(`views.assistant.notice_${e.capability}_text`)
728
728
  }, null, 8, ["title", "text"]))), 128))])) : g("", !0),
729
- e.inlineAttachments && e.references?.length ? (a(), w("div", Fn, [I(P, { references: e.references }, null, 8, ["references"])])) : g("", !0),
730
- y(o) ? (a(), w("div", In, [y(v) ? (a(), w("div", Ln, [k("span", Rn, s(t.$t("views.assistant.tool_arguments")), 1), k("pre", zn, s(y(v)), 1)])) : g("", !0), y(S) ? (a(), w("div", Bn, [k("span", Vn, s(t.$t("views.assistant.tool_result")), 1), k("pre", Hn, s(y(S)), 1)])) : g("", !0)])) : g("", !0)
729
+ e.inlineAttachments && e.references?.length ? (a(), w("div", Ln, [I(P, { references: e.references }, null, 8, ["references"])])) : g("", !0),
730
+ y(o) ? (a(), w("div", Rn, [y(v) ? (a(), w("div", zn, [k("span", Bn, s(t.$t("views.assistant.tool_arguments")), 1), k("pre", Vn, s(y(v)), 1)])) : g("", !0), y(S) ? (a(), w("div", Hn, [k("span", Un, s(t.$t("views.assistant.tool_result")), 1), k("pre", Wn, s(y(S)), 1)])) : g("", !0)])) : g("", !0)
731
731
  ]);
732
732
  };
733
733
  }
734
- }), [["__scopeId", "data-v-661dfb47"]]), Wn = {
734
+ }), [["__scopeId", "data-v-661dfb47"]]), Kn = {
735
735
  viewBox: "0 0 24 24",
736
736
  width: "1.2em",
737
737
  height: "1.2em"
738
738
  };
739
- function Gn(e, t) {
740
- return a(), w("svg", Wn, [...t[0] ||= [k("path", {
739
+ function qn(e, t) {
740
+ return a(), w("svg", Kn, [...t[0] ||= [k("path", {
741
741
  fill: "currentColor",
742
742
  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"
743
743
  }, null, -1)]]);
744
744
  }
745
- var Kn = p({
745
+ var Jn = p({
746
746
  name: "mdi-music-note",
747
- render: Gn
748
- }), qn = "[continue]";
749
- function Jn(e) {
747
+ render: qn
748
+ }), Yn = "[continue]";
749
+ function Xn(e) {
750
750
  return e.parts.filter((e) => e.type === "text").map((e) => e.type === "text" ? e.content : "").join("\n").trim();
751
751
  }
752
- function Yn(e) {
753
- return e?.role === "user" && Jn(e) === "[continue]";
752
+ function Zn(e) {
753
+ return e?.role === "user" && Xn(e) === "[continue]";
754
754
  }
755
755
  //#endregion
756
756
  //#region src/components/CuiAssistantMessage/CuiAssistantMessage.vue?vue&type=script&setup=true&lang.ts
757
- var Xn = {
757
+ var Qn = {
758
758
  key: 0,
759
759
  class: "group flex flex-col items-end"
760
- }, Zn = {
760
+ }, $n = {
761
761
  key: 0,
762
762
  class: "w-full max-w-[min(82%,54ch)]"
763
- }, Qn = { class: "mt-1.5 flex justify-end gap-1" }, $n = {
763
+ }, er = { class: "mt-1.5 flex justify-end gap-1" }, tr = {
764
764
  key: 1,
765
765
  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"
766
- }, er = {
766
+ }, nr = {
767
767
  key: 0,
768
768
  class: "mt-2 flex flex-wrap gap-2"
769
- }, tr = ["src"], nr = {
769
+ }, rr = ["src"], ir = {
770
770
  key: 1,
771
771
  class: "mt-2 flex flex-wrap gap-2"
772
- }, rr = {
772
+ }, ar = {
773
773
  key: 2,
774
774
  class: "message-actions mt-1 flex gap-0.5"
775
- }, ir = {
775
+ }, or = {
776
776
  key: 1,
777
777
  class: "cui-assistant-answer group flex flex-col"
778
- }, ar = {
778
+ }, sr = {
779
779
  key: 0,
780
780
  class: "mb-1.5 flex items-center gap-2 text-[12.5px] text-muted"
781
- }, or = { class: "flex min-w-0 flex-col gap-2.5" }, sr = {
781
+ }, cr = { class: "flex min-w-0 flex-col gap-2.5" }, lr = {
782
782
  key: 0,
783
783
  class: "text-[15px] leading-relaxed text-color break-words"
784
- }, cr = {
784
+ }, ur = {
785
785
  key: 0,
786
786
  class: "cui-assistant-caret"
787
- }, lr = ["open"], ur = { class: "flex cursor-pointer select-none items-center gap-2 px-3 py-2" }, dr = { class: "shrink-0 font-medium text-color" }, fr = { class: "truncate text-muted" }, pr = { class: "flex flex-col gap-2 px-2 pb-2" }, mr = {
787
+ }, dr = ["open"], fr = { class: "flex cursor-pointer select-none items-center gap-2 px-3 py-2" }, pr = { class: "shrink-0 font-medium text-color" }, mr = { class: "truncate text-muted" }, hr = { class: "flex flex-col gap-2 px-2 pb-2" }, gr = {
788
788
  key: 3,
789
789
  class: "text-xs text-muted"
790
- }, hr = { class: "cursor-pointer select-none" }, gr = { class: "mt-1 whitespace-pre-wrap break-words" }, _r = {
790
+ }, _r = { class: "cursor-pointer select-none" }, vr = { class: "mt-1 whitespace-pre-wrap break-words" }, yr = {
791
791
  key: 0,
792
792
  class: "flex items-center gap-2 text-[13.5px] text-muted"
793
- }, vr = {
793
+ }, br = {
794
794
  class: "cui-assistant-pulse flex items-center gap-1",
795
795
  "aria-hidden": "true"
796
- }, yr = {
796
+ }, xr = {
797
797
  key: 0,
798
798
  class: "flex flex-wrap gap-2"
799
- }, br = ["onClick"], xr = ["src", "alt"], Sr = {
799
+ }, Sr = ["onClick"], Cr = ["src", "alt"], wr = {
800
800
  key: 1,
801
801
  class: "mt-2 flex items-center gap-2 text-[12.5px] text-muted"
802
- }, Cr = {
802
+ }, Tr = {
803
803
  key: 2,
804
804
  class: "answer-footer mt-2 flex items-center gap-2"
805
- }, wr = {
805
+ }, Er = {
806
806
  key: 0,
807
807
  class: "cui-assistant-usage text-[11px] tabular-nums text-muted"
808
- }, Tr = { class: "message-actions flex gap-0.5" }, Er = 6, Dr = /*#__PURE__*/ q(/* @__PURE__ */ P({
808
+ }, Dr = { class: "message-actions flex gap-0.5" }, Or = 6, kr = /*#__PURE__*/ U(/* @__PURE__ */ P({
809
809
  __name: "CuiAssistantMessage",
810
810
  props: {
811
811
  message: {},
@@ -830,12 +830,12 @@ var Xn = {
830
830
  "continue"
831
831
  ],
832
832
  setup(e, { emit: t }) {
833
- let o = e, c = t, { t: u } = Ee(), { openImageDialog: f } = X(), p = [
833
+ let o = e, c = t, { t: u } = Oe(), { openImageDialog: f } = ge(), p = [
834
834
  "awaiting-input",
835
835
  "input-streaming",
836
836
  "input-complete",
837
837
  "approval-responded"
838
- ], m = D("editRef"), v = F(!1), S = F(""), C = b(() => Jn(o.message)), T = b(() => o.message.parts.filter((e) => e.type === "image").map((e) => e.type === "image" ? e.source.type === "url" ? e.source.value.startsWith("attachment:") ? o.toolImages?.[e.source.value.slice(11)]?.[0]?.src ?? "" : e.source.value : `data:${e.source.mimeType ?? "image/jpeg"};base64,${e.source.value}` : "").filter(Boolean)), O = b(() => o.message.parts.filter((e) => e.type === "audio" || e.type === "video").map((e) => ({ kind: e.type }))), M = b(() => {
838
+ ], m = D("editRef"), v = F(!1), S = F(""), C = b(() => Xn(o.message)), T = b(() => o.message.parts.filter((e) => e.type === "image").map((e) => e.type === "image" ? e.source.type === "url" ? e.source.value.startsWith("attachment:") ? o.toolImages?.[e.source.value.slice(11)]?.[0]?.src ?? "" : e.source.value : `data:${e.source.mimeType ?? "image/jpeg"};base64,${e.source.value}` : "").filter(Boolean)), O = b(() => o.message.parts.filter((e) => e.type === "audio" || e.type === "video").map((e) => ({ kind: e.type }))), M = b(() => {
839
839
  let e = /* @__PURE__ */ new Map();
840
840
  for (let t of o.message.parts) t.type === "tool-result" && e.set(t.toolCallId, t);
841
841
  let t = [];
@@ -869,7 +869,7 @@ var Xn = {
869
869
  let e = [], t = [], n = [], r = [], i = [], a = /* @__PURE__ */ new Set();
870
870
  for (let s of M.value) {
871
871
  if (s.kind !== "tool") continue;
872
- let c = [...o.toolImages?.[s.part.id] ?? [], ...et(nt(s.result), Qe(s.part.name))];
872
+ let c = [...o.toolImages?.[s.part.id] ?? [], ...nt(it(s.result), et(s.part.name))];
873
873
  for (let t of c) !a.has(t.src) && a.add(t.src) && e.push(t);
874
874
  t.push(...o.toolCards?.[s.part.id] ?? []);
875
875
  for (let e of o.toolSettings?.[s.part.id] ?? []) r.includes(e) || r.push(e);
@@ -879,7 +879,7 @@ var Xn = {
879
879
  !a.has(t) && a.add(t) && n.push(e);
880
880
  }
881
881
  }
882
- let s = 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" && !s.has(e.id)).slice(0, Er)];
882
+ let s = 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" && !s.has(e.id)).slice(0, Or)];
883
883
  return e.length || t.length || c.length || r.length || i.length ? {
884
884
  images: e,
885
885
  cards: t,
@@ -915,28 +915,28 @@ var Xn = {
915
915
  function H(e) {
916
916
  return `$${e.toFixed(e < .01 ? 4 : 3)}`;
917
917
  }
918
- function W(e) {
918
+ function U(e) {
919
919
  return !!o.busy && e.items.some((e) => !e.result && p.includes(e.part.state));
920
920
  }
921
- async function ne() {
921
+ async function te() {
922
922
  S.value = C.value, v.value = !0, await l(), m.value?.$el.focus();
923
923
  }
924
- function K() {
924
+ function G() {
925
925
  let e = S.value.trim();
926
926
  e && (v.value = !1, e !== C.value && c("edit", e));
927
927
  }
928
- function q(e) {
928
+ function K(e) {
929
929
  f({ data: {
930
930
  title: e.alt,
931
931
  src: e.src
932
932
  } });
933
933
  }
934
- async function re() {
935
- await ue(P.value);
934
+ async function ne() {
935
+ await pe(P.value);
936
936
  }
937
937
  return (t, o) => {
938
- let l = Fe, u = Ae, f = Kn, p = Ut, b = Ye, D = Le, M = U, F = Ke, V = Un, H = G, ie = st, J = Sn, ae = en, oe = $t, se = Jt, Y = Ze, X = te, ce = ot, Z = ee;
939
- return e.message.role === "user" ? (a(), w("div", Xn, [y(v) ? (a(), w("div", Zn, [I(l, {
938
+ let l = Le, u = Me, f = Jn, p = Gt, b = Ze, D = ze, M = W, F = Je, V = Gn, H = ie, q = lt, re = wn, ae = nn, oe = tn, se = Xt, ce = $e, le = ue, J = ct, Y = ee;
939
+ return e.message.role === "user" ? (a(), w("div", Qn, [y(v) ? (a(), w("div", $n, [I(l, {
940
940
  ref_key: "editRef",
941
941
  ref: m,
942
942
  modelValue: y(S),
@@ -944,8 +944,8 @@ var Xn = {
944
944
  "auto-resize": "",
945
945
  rows: "2",
946
946
  class: "w-full text-[15px] leading-relaxed",
947
- onKeydown: [r(n(K, ["exact", "prevent"]), ["enter"]), o[1] ||= r(n((e) => v.value = !1, ["prevent"]), ["esc"])]
948
- }, null, 8, ["modelValue", "onKeydown"]), k("div", Qn, [I(u, {
947
+ onKeydown: [r(n(G, ["exact", "prevent"]), ["enter"]), o[1] ||= r(n((e) => v.value = !1, ["prevent"]), ["esc"])]
948
+ }, null, 8, ["modelValue", "onKeydown"]), k("div", er, [I(u, {
949
949
  type: "button",
950
950
  size: "small",
951
951
  severity: "secondary",
@@ -957,16 +957,16 @@ var Xn = {
957
957
  size: "small",
958
958
  label: t.$t("views.assistant.edit_send"),
959
959
  disabled: !y(S).trim(),
960
- onClick: K
961
- }, null, 8, ["label", "disabled"])])])) : (a(), w("div", $n, [
960
+ onClick: G
961
+ }, null, 8, ["label", "disabled"])])])) : (a(), w("div", tr, [
962
962
  j(s(y(C)) + " ", 1),
963
- y(T).length ? (a(), w("div", er, [(a(!0), w(E, null, i(y(T), (e) => (a(), w("img", {
963
+ y(T).length ? (a(), w("div", nr, [(a(!0), w(E, null, i(y(T), (e) => (a(), w("img", {
964
964
  key: e,
965
965
  src: e,
966
966
  class: "h-24 rounded-lg",
967
967
  alt: ""
968
- }, null, 8, tr))), 128))])) : g("", !0),
969
- y(O).length ? (a(), w("div", nr, [(a(!0), w(E, null, i(y(O), (e, n) => (a(), w("span", {
968
+ }, null, 8, rr))), 128))])) : g("", !0),
969
+ y(O).length ? (a(), w("div", ir, [(a(!0), w(E, null, i(y(O), (e, n) => (a(), w("span", {
970
970
  key: n,
971
971
  class: "cui-assistant-media inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted"
972
972
  }, [e.kind === "audio" ? (a(), h(f, {
@@ -976,19 +976,19 @@ var Xn = {
976
976
  key: 1,
977
977
  class: "w-3.5 h-3.5"
978
978
  })), j(" " + s(e.kind === "audio" ? t.$t("views.assistant.attachment_audio") : t.$t("views.assistant.attachment_video")), 1)]))), 128))])) : g("", !0)
979
- ])), !y(v) && !e.busy ? (a(), w("div", rr, [
979
+ ])), !y(v) && !e.busy ? (a(), w("div", ar, [
980
980
  A((a(), h(u, {
981
981
  type: "button",
982
982
  severity: "secondary",
983
983
  text: "",
984
984
  rounded: "",
985
985
  class: "cui-icon-md text-muted",
986
- onClick: ne
986
+ onClick: te
987
987
  }, {
988
988
  icon: x(() => [I(b, { class: "w-3.5 h-3.5" })]),
989
989
  _: 1
990
990
  })), [[
991
- Z,
991
+ Y,
992
992
  { value: t.$t("views.assistant.edit_message") },
993
993
  void 0,
994
994
  { top: !0 }
@@ -1004,7 +1004,7 @@ var Xn = {
1004
1004
  icon: x(() => [I(D, { class: "w-3.5 h-3.5" })]),
1005
1005
  _: 1
1006
1006
  })), [[
1007
- Z,
1007
+ Y,
1008
1008
  { value: t.$t("views.assistant.branch_here") },
1009
1009
  void 0,
1010
1010
  { top: !0 }
@@ -1020,18 +1020,18 @@ var Xn = {
1020
1020
  icon: x(() => [I(M, { class: "w-3.5 h-3.5" })]),
1021
1021
  _: 1
1022
1022
  })), [[
1023
- Z,
1023
+ Y,
1024
1024
  { value: t.$t("views.assistant.delete_exchange") },
1025
1025
  void 0,
1026
1026
  { top: !0 }
1027
1027
  ]])
1028
- ])) : g("", !0)])) : (a(), w("div", ir, [
1029
- e.continuation ? g("", !0) : (a(), w("div", ar, [k("span", { class: d(["cui-assistant-dot h-1.5 w-1.5 shrink-0 rounded-full", { "cui-assistant-dot-live": e.working }]) }, null, 2), k("span", null, s(t.$t("views.assistant.title")), 1)])),
1030
- k("div", or, [
1031
- (a(!0), w(E, null, i(y(N), (n, r) => (a(), w(E, { key: r }, [n.kind === "text" ? (a(), w("div", sr, [I(F, {
1028
+ ])) : g("", !0)])) : (a(), w("div", or, [
1029
+ e.continuation ? g("", !0) : (a(), w("div", sr, [k("span", { class: d(["cui-assistant-dot h-1.5 w-1.5 shrink-0 rounded-full", { "cui-assistant-dot-live": e.working }]) }, null, 2), k("span", null, s(t.$t("views.assistant.title")), 1)])),
1030
+ k("div", cr, [
1031
+ (a(!0), w(E, null, i(y(N), (n, r) => (a(), w(E, { key: r }, [n.kind === "text" ? (a(), w("div", lr, [I(F, {
1032
1032
  content: n.text,
1033
1033
  class: "cui-assistant-markdown"
1034
- }, null, 8, ["content"]), e.working && r === y(N).length - 1 ? (a(), w("span", cr)) : g("", !0)])) : n.kind === "tool" ? (a(), h(V, {
1034
+ }, null, 8, ["content"]), e.working && r === y(N).length - 1 ? (a(), w("span", ur)) : g("", !0)])) : n.kind === "tool" ? (a(), h(V, {
1035
1035
  key: 1,
1036
1036
  part: n.part,
1037
1037
  result: n.result,
@@ -1058,18 +1058,18 @@ var Xn = {
1058
1058
  key: 2,
1059
1059
  class: "cui-assistant-steps rounded-xl text-sm",
1060
1060
  open: e.streaming
1061
- }, [k("summary", ur, [
1062
- W(n) ? (a(), h(H, {
1061
+ }, [k("summary", fr, [
1062
+ U(n) ? (a(), h(H, {
1063
1063
  key: 0,
1064
1064
  class: "w-4 h-4 m-0 shrink-0",
1065
1065
  "stroke-width": "6"
1066
- })) : (a(), h(ie, {
1066
+ })) : (a(), h(q, {
1067
1067
  key: 1,
1068
1068
  class: "w-4 h-4 shrink-0 text-success"
1069
1069
  })),
1070
- k("span", dr, s(t.$t("views.assistant.steps", { n: n.items.length })), 1),
1071
- k("span", fr, s(n.items.map((e) => y(Qe)(e.part.name)).join(", ")), 1)
1072
- ]), k("div", pr, [(a(!0), w(E, null, i(n.items, (t) => (a(), h(V, {
1070
+ k("span", pr, s(t.$t("views.assistant.steps", { n: n.items.length })), 1),
1071
+ k("span", mr, s(n.items.map((e) => y(et)(e.part.name)).join(", ")), 1)
1072
+ ]), k("div", hr, [(a(!0), w(E, null, i(n.items, (t) => (a(), h(V, {
1073
1073
  key: t.part.id,
1074
1074
  part: t.part,
1075
1075
  result: t.result,
@@ -1092,24 +1092,24 @@ var Xn = {
1092
1092
  "model-id",
1093
1093
  "inline-attachments",
1094
1094
  "busy"
1095
- ]))), 128))])], 8, lr)) : n.kind === "thinking" ? (a(), w("details", mr, [k("summary", hr, s(t.$t("views.assistant.thinking")), 1), k("pre", gr, s(n.text), 1)])) : g("", !0)], 64))), 128)),
1096
- e.working && y(N).at(-1)?.kind !== "text" ? (a(), w("span", _r, [k("span", vr, [(a(), w(E, null, i(3, (e) => k("span", {
1095
+ ]))), 128))])], 8, dr)) : n.kind === "thinking" ? (a(), w("details", gr, [k("summary", _r, s(t.$t("views.assistant.thinking")), 1), k("pre", vr, s(n.text), 1)])) : g("", !0)], 64))), 128)),
1096
+ e.working && y(N).at(-1)?.kind !== "text" ? (a(), w("span", yr, [k("span", br, [(a(), w(E, null, i(3, (e) => k("span", {
1097
1097
  key: e,
1098
1098
  class: "h-1.5 w-1.5 rounded-full"
1099
1099
  })), 64))]), j(" " + s(y(R)), 1)])) : g("", !0),
1100
1100
  y(L) ? (a(), w(E, { key: 1 }, [
1101
- y(L).images.length ? (a(), w("div", yr, [(a(!0), w(E, null, i(y(L).images, (e) => (a(), w("button", {
1101
+ y(L).images.length ? (a(), w("div", xr, [(a(!0), w(E, null, i(y(L).images, (e) => (a(), w("button", {
1102
1102
  key: e.src,
1103
1103
  type: "button",
1104
1104
  class: "cui-assistant-thumb cursor-pointer overflow-hidden rounded-lg",
1105
- onClick: (t) => q(e)
1105
+ onClick: (t) => K(e)
1106
1106
  }, [k("img", {
1107
1107
  src: e.src,
1108
1108
  alt: e.alt,
1109
1109
  class: "h-32 w-auto object-cover",
1110
1110
  loading: "lazy"
1111
- }, null, 8, xr)], 8, br))), 128))])) : g("", !0),
1112
- (a(!0), w(E, null, i(y(L).cards, (e, t) => (a(), h(J, {
1111
+ }, null, 8, Cr)], 8, Sr))), 128))])) : g("", !0),
1112
+ (a(!0), w(E, null, i(y(L).cards, (e, t) => (a(), h(re, {
1113
1113
  key: t,
1114
1114
  card: e,
1115
1115
  references: y(L).all
@@ -1130,7 +1130,7 @@ var Xn = {
1130
1130
  }, null, 8, ["references"])) : g("", !0)
1131
1131
  ], 64)) : g("", !0)
1132
1132
  ]),
1133
- e.stopped && !e.streaming ? (a(), w("div", Sr, [k("span", null, s(t.$t("views.assistant.answer_stopped")), 1), I(u, {
1133
+ e.stopped && !e.streaming ? (a(), w("div", wr, [k("span", null, s(t.$t("views.assistant.answer_stopped")), 1), I(u, {
1134
1134
  type: "button",
1135
1135
  size: "small",
1136
1136
  severity: "secondary",
@@ -1139,19 +1139,19 @@ var Xn = {
1139
1139
  disabled: e.busy,
1140
1140
  onClick: o[5] ||= (e) => c("continue")
1141
1141
  }, {
1142
- icon: x(() => [I(Y, { class: "w-3.5 h-3.5" })]),
1142
+ icon: x(() => [I(ce, { class: "w-3.5 h-3.5" })]),
1143
1143
  _: 1
1144
1144
  }, 8, ["label", "disabled"])])) : g("", !0),
1145
- !e.streaming && (y(P) || e.stopped) ? (a(), w("div", Cr, [y(z) ? A((a(), w("span", wr, [j(s(y(z)), 1)])), [[
1146
- Z,
1145
+ !e.streaming && (y(P) || e.stopped) ? (a(), w("div", Tr, [y(z) ? A((a(), w("span", Er, [j(s(y(z)), 1)])), [[
1146
+ Y,
1147
1147
  { value: y(B) },
1148
1148
  void 0,
1149
1149
  { top: !0 }
1150
- ]]) : g("", !0), k("div", Tr, [
1151
- y(P) ? A((a(), h(X, {
1150
+ ]]) : g("", !0), k("div", Dr, [
1151
+ y(P) ? A((a(), h(le, {
1152
1152
  key: 0,
1153
1153
  "action-text": t.$t("views.assistant.copied"),
1154
- icon: y(Ge),
1154
+ icon: y(qe),
1155
1155
  "icon-class": "w-3.5 h-3.5",
1156
1156
  "button-props": {
1157
1157
  severity: "secondary",
@@ -1159,9 +1159,9 @@ var Xn = {
1159
1159
  rounded: !0,
1160
1160
  class: "cui-icon-md text-muted"
1161
1161
  },
1162
- onAction: re
1162
+ onAction: ne
1163
1163
  }, null, 8, ["action-text", "icon"])), [[
1164
- Z,
1164
+ Y,
1165
1165
  { value: t.$t("views.assistant.copy_answer") },
1166
1166
  void 0,
1167
1167
  { top: !0 }
@@ -1175,10 +1175,10 @@ var Xn = {
1175
1175
  disabled: e.busy,
1176
1176
  onClick: o[6] ||= (e) => c("regenerate")
1177
1177
  }, {
1178
- icon: x(() => [I(ce, { class: "w-3.5 h-3.5" })]),
1178
+ icon: x(() => [I(J, { class: "w-3.5 h-3.5" })]),
1179
1179
  _: 1
1180
1180
  }, 8, ["disabled"])), [[
1181
- Z,
1181
+ Y,
1182
1182
  { value: t.$t("views.assistant.regenerate") },
1183
1183
  void 0,
1184
1184
  { top: !0 }
@@ -1195,7 +1195,7 @@ var Xn = {
1195
1195
  icon: x(() => [I(D, { class: "w-3.5 h-3.5" })]),
1196
1196
  _: 1
1197
1197
  }, 8, ["disabled"])), [[
1198
- Z,
1198
+ Y,
1199
1199
  { value: t.$t("views.assistant.branch_here") },
1200
1200
  void 0,
1201
1201
  { top: !0 }
@@ -1212,7 +1212,7 @@ var Xn = {
1212
1212
  icon: x(() => [I(M, { class: "w-3.5 h-3.5" })]),
1213
1213
  _: 1
1214
1214
  }, 8, ["disabled"])), [[
1215
- Z,
1215
+ Y,
1216
1216
  { value: t.$t("views.assistant.delete_exchange") },
1217
1217
  void 0,
1218
1218
  { top: !0 }
@@ -1221,53 +1221,53 @@ var Xn = {
1221
1221
  ]));
1222
1222
  };
1223
1223
  }
1224
- }), [["__scopeId", "data-v-88ef583b"]]), Or = {
1224
+ }), [["__scopeId", "data-v-88ef583b"]]), Ar = {
1225
1225
  viewBox: "0 0 24 24",
1226
1226
  width: "1.2em",
1227
1227
  height: "1.2em"
1228
1228
  };
1229
- function kr(e, t) {
1230
- return a(), w("svg", Or, [...t[0] ||= [k("path", {
1229
+ function jr(e, t) {
1230
+ return a(), w("svg", Ar, [...t[0] ||= [k("path", {
1231
1231
  fill: "currentColor",
1232
1232
  d: "M13 20h-2V8l-5.5 5.5l-1.42-1.42L12 4.16l7.92 7.92l-1.42 1.42L13 8z"
1233
1233
  }, null, -1)]]);
1234
1234
  }
1235
- var Ar = p({
1235
+ var Mr = p({
1236
1236
  name: "mdi-arrow-up",
1237
- render: kr
1238
- }), jr = {
1237
+ render: jr
1238
+ }), Nr = {
1239
1239
  viewBox: "0 0 24 24",
1240
1240
  width: "1.2em",
1241
1241
  height: "1.2em"
1242
1242
  };
1243
- function Mr(e, t) {
1244
- return a(), w("svg", jr, [...t[0] ||= [k("path", {
1243
+ function Pr(e, t) {
1244
+ return a(), w("svg", Nr, [...t[0] ||= [k("path", {
1245
1245
  fill: "currentColor",
1246
1246
  d: "M18 18H6V6h12z"
1247
1247
  }, null, -1)]]);
1248
1248
  }
1249
- var Nr = p({
1249
+ var Fr = p({
1250
1250
  name: "mdi-stop",
1251
- render: Mr
1252
- }), Pr = {
1251
+ render: Pr
1252
+ }), Ir = {
1253
1253
  viewBox: "0 0 24 24",
1254
1254
  width: "1.2em",
1255
1255
  height: "1.2em"
1256
1256
  };
1257
- function Fr(e, t) {
1258
- return a(), w("svg", Pr, [...t[0] ||= [k("path", {
1257
+ function Lr(e, t) {
1258
+ return a(), w("svg", Ir, [...t[0] ||= [k("path", {
1259
1259
  fill: "currentColor",
1260
1260
  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"
1261
1261
  }, null, -1)]]);
1262
1262
  }
1263
- var Ir = p({
1263
+ var Rr = p({
1264
1264
  name: "mdi-paperclip",
1265
- render: Fr
1266
- }), Lr = {
1265
+ render: Lr
1266
+ }), zr = {
1267
1267
  image: 12582912,
1268
1268
  audio: 26214400,
1269
1269
  video: 62914560
1270
- }, Rr = "image/*,audio/*,video/*", zr = {
1270
+ }, Br = "image/*,audio/*,video/*", Vr = {
1271
1271
  de: "de-DE",
1272
1272
  en: "en-US",
1273
1273
  fr: "fr-FR",
@@ -1280,22 +1280,22 @@ var Ir = p({
1280
1280
  ru: "ru-RU",
1281
1281
  zh: "zh-CN",
1282
1282
  ja: "ja-JP"
1283
- }, Br = { class: "cui-assistant-composer-above" }, Vr = { class: "cui-assistant-tray-clip" }, Hr = {
1283
+ }, Hr = { class: "cui-assistant-composer-above" }, Ur = { class: "cui-assistant-tray-clip" }, Wr = {
1284
1284
  key: 0,
1285
1285
  class: "px-3 pb-2"
1286
- }, Ur = {
1286
+ }, Gr = {
1287
1287
  key: 1,
1288
1288
  class: "flex flex-wrap gap-2 px-3 pb-1"
1289
- }, Wr = ["src"], Gr = {
1289
+ }, Kr = ["src"], qr = {
1290
1290
  key: 1,
1291
1291
  class: "flex items-center gap-1.5 px-2.5 py-2"
1292
- }, Kr = { class: "max-w-40 truncate" }, qr = { class: "text-muted" }, Jr = ["accept"], Yr = {
1292
+ }, Jr = { class: "max-w-40 truncate" }, Yr = { class: "text-muted" }, Xr = ["accept"], Zr = {
1293
1293
  key: 1,
1294
1294
  class: "ml-auto flex items-center gap-1.5 text-[11.5px] text-muted"
1295
- }, Xr = {
1295
+ }, Qr = {
1296
1296
  key: 2,
1297
1297
  class: "ml-auto"
1298
- }, Zr = /*#__PURE__*/ q(/* @__PURE__ */ P({
1298
+ }, $r = /*#__PURE__*/ U(/* @__PURE__ */ P({
1299
1299
  __name: "CuiAssistantComposer",
1300
1300
  props: {
1301
1301
  busy: {
@@ -1319,19 +1319,19 @@ var Ir = p({
1319
1319
  },
1320
1320
  emits: ["send", "stop"],
1321
1321
  setup(e, { expose: t, emit: u }) {
1322
- let f = e, p = u, { smBreakpoint: m } = ne(), { t: v, locale: b } = Ee(), S = window.SpeechRecognition ?? window.webkitSpeechRecognition, T = !!S && window.isSecureContext, O = D("rootRef"), M = D("inputRef"), N = D("fileInput"), P = F(""), L = F(!1), z = F([]), B = F(""), V = null, H;
1322
+ let f = e, p = u, { smBreakpoint: m } = ae(), { t: v, locale: b } = Oe(), S = window.SpeechRecognition ?? window.webkitSpeechRecognition, T = !!S && window.isSecureContext, O = D("rootRef"), M = D("inputRef"), N = D("fileInput"), P = F(""), L = F(!1), z = F([]), B = F(""), V = null, H;
1323
1323
  function U() {
1324
1324
  let e = M.value?.$el;
1325
1325
  return e?.tagName === "TEXTAREA" ? e : e?.querySelector("textarea");
1326
1326
  }
1327
1327
  function W(e) {
1328
1328
  let t = e.target;
1329
- t instanceof Element && t.closest("button") && O.value?.contains(document.activeElement) && ft(document.activeElement) && e.preventDefault();
1329
+ t instanceof Element && t.closest("button") && O.value?.contains(document.activeElement) && mt(document.activeElement) && e.preventDefault();
1330
1330
  }
1331
- function G() {
1331
+ function te() {
1332
1332
  U()?.focus();
1333
1333
  }
1334
- function te() {
1334
+ function G() {
1335
1335
  let e = U();
1336
1336
  e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
1337
1337
  }
@@ -1342,40 +1342,40 @@ var Ir = p({
1342
1342
  attachments: z.value
1343
1343
  }), P.value = "", z.value = []);
1344
1344
  }
1345
- function q(e) {
1345
+ function ne(e) {
1346
1346
  B.value = e, clearTimeout(H), H = setTimeout(() => B.value = "", 4e3);
1347
1347
  }
1348
- function re(e) {
1348
+ function q(e) {
1349
1349
  let t = e.type.split("/")[0];
1350
1350
  return t === "image" || t === "audio" || t === "video" ? t : void 0;
1351
1351
  }
1352
- function ie(e) {
1352
+ function re(e) {
1353
1353
  return e >= 1048576 ? `${(e / 1024 / 1024).toFixed(1)} MB` : `${Math.max(1, Math.round(e / 1024))} KB`;
1354
1354
  }
1355
- function J(e) {
1355
+ function ie(e) {
1356
1356
  return new Promise((t, n) => {
1357
1357
  let r = new FileReader();
1358
1358
  r.onload = () => t(String(r.result)), r.onerror = () => n(r.error), r.readAsDataURL(e);
1359
1359
  });
1360
1360
  }
1361
- async function ae(e) {
1361
+ async function oe(e) {
1362
1362
  for (let t of e) {
1363
- let e = re(t);
1363
+ let e = q(t);
1364
1364
  if (!e) {
1365
- q(v("views.assistant.attach_unsupported"));
1365
+ ne(v("views.assistant.attach_unsupported"));
1366
1366
  continue;
1367
1367
  }
1368
- if (t.size > Lr[e]) {
1369
- q(v("views.assistant.attach_too_large", { max: Math.round(Lr[e] / 1024 / 1024) }));
1368
+ if (t.size > zr[e]) {
1369
+ ne(v("views.assistant.attach_too_large", { max: Math.round(zr[e] / 1024 / 1024) }));
1370
1370
  continue;
1371
1371
  }
1372
1372
  if (z.value.length >= 8) {
1373
- q(v("views.assistant.attach_too_many", { max: 8 }));
1373
+ ne(v("views.assistant.attach_too_many", { max: 8 }));
1374
1374
  break;
1375
1375
  }
1376
- let n = await J(t);
1376
+ let n = await ie(t);
1377
1377
  z.value.push({
1378
- id: Z(),
1378
+ id: Y(),
1379
1379
  name: t.name || e,
1380
1380
  kind: e,
1381
1381
  mimeType: t.type,
@@ -1385,38 +1385,38 @@ var Ir = p({
1385
1385
  });
1386
1386
  }
1387
1387
  }
1388
- async function oe(e) {
1388
+ async function se(e) {
1389
1389
  let t = e.target;
1390
- t.files?.length && await ae(Array.from(t.files)), t.value = "";
1390
+ t.files?.length && await oe(Array.from(t.files)), t.value = "";
1391
1391
  }
1392
- async function se(e) {
1392
+ async function ce(e) {
1393
1393
  let t = Array.from(e.clipboardData?.files ?? []);
1394
- t.length && (e.preventDefault(), await ae(t));
1394
+ t.length && (e.preventDefault(), await oe(t));
1395
1395
  }
1396
- function Y(e) {
1396
+ function le(e) {
1397
1397
  z.value = z.value.filter((t) => t.id !== e);
1398
1398
  }
1399
- function X() {
1399
+ function J() {
1400
1400
  if (L.value) {
1401
1401
  V?.stop();
1402
1402
  return;
1403
1403
  }
1404
1404
  if (!S) return;
1405
1405
  let e = P.value.trim(), t = new S();
1406
- t.lang = zr[b.value] ?? b.value, t.interimResults = !0, t.continuous = !1, t.onresult = (t) => {
1406
+ t.lang = Vr[b.value] ?? b.value, t.interimResults = !0, t.continuous = !1, t.onresult = (t) => {
1407
1407
  let n = "";
1408
1408
  for (let e = 0; e < t.results.length; e += 1) n += t.results[e][0]?.transcript ?? "";
1409
1409
  P.value = e ? `${e} ${n.trim()}` : n.trim();
1410
1410
  }, t.onend = () => {
1411
- L.value = !1, V = null, G();
1411
+ L.value = !1, V = null, te();
1412
1412
  }, t.onerror = (e) => {
1413
- L.value = !1, V = null, e.error !== "no-speech" && e.error !== "aborted" && q(e.error === "not-allowed" || e.error === "service-not-allowed" ? v("views.assistant.voice_denied") : v("views.assistant.voice_failed", { error: e.error }));
1413
+ L.value = !1, V = null, e.error !== "no-speech" && e.error !== "aborted" && ne(e.error === "not-allowed" || e.error === "service-not-allowed" ? v("views.assistant.voice_denied") : v("views.assistant.voice_failed", { error: e.error }));
1414
1414
  }, V = t, L.value = !0, t.start();
1415
1415
  }
1416
- return C(P, () => l(te)), o(() => {
1416
+ return C(P, () => l(G)), o(() => {
1417
1417
  V?.abort(), clearTimeout(H);
1418
- }), t({ focus: G }), (t, o) => {
1419
- let l = Fe, u = $t, f = Kn, v = Ut, b = Pe, S = Ae, C = R, D = Ir, F = lt, V = Nr, H = Ar, U = ee;
1418
+ }), t({ focus: te }), (t, o) => {
1419
+ let l = Le, u = tn, f = Jn, v = Gt, b = Ie, S = Me, C = R, D = Rr, F = dt, V = Fr, H = Mr, U = ee;
1420
1420
  return a(), w("div", {
1421
1421
  ref_key: "rootRef",
1422
1422
  ref: O,
@@ -1425,7 +1425,7 @@ var Ir = p({
1425
1425
  onPointerdown: W,
1426
1426
  onMousedown: W
1427
1427
  }, [
1428
- k("div", Br, [c(t.$slots, "above"), k("div", { class: d(["cui-assistant-tray-slot", { "cui-assistant-tray-slot-open": e.trayOpen }]) }, [k("div", Vr, [c(t.$slots, "tray")])], 2)]),
1428
+ k("div", Hr, [c(t.$slots, "above"), k("div", { class: d(["cui-assistant-tray-slot", { "cui-assistant-tray-slot-open": e.trayOpen }]) }, [k("div", Ur, [c(t.$slots, "tray")])], 2)]),
1429
1429
  I(l, {
1430
1430
  ref_key: "inputRef",
1431
1431
  ref: M,
@@ -1437,18 +1437,18 @@ var Ir = p({
1437
1437
  rows: "1",
1438
1438
  class: "cui-assistant-input block w-full max-h-52 resize-none px-4 pt-3.5 pb-1 text-[15px] leading-relaxed",
1439
1439
  onKeydown: r(n(K, ["exact", "prevent"]), ["enter"]),
1440
- onPaste: se
1440
+ onPaste: ce
1441
1441
  }, null, 8, [
1442
1442
  "modelValue",
1443
1443
  "placeholder",
1444
1444
  "disabled",
1445
1445
  "onKeydown"
1446
1446
  ]),
1447
- e.visionMissing && y(z).some((e) => e.kind === "image") ? (a(), w("div", Hr, [I(u, {
1447
+ e.visionMissing && y(z).some((e) => e.kind === "image") ? (a(), w("div", Wr, [I(u, {
1448
1448
  title: t.$t("views.assistant.notice_vision_title", { model: e.visionMissing }),
1449
1449
  text: t.$t("views.assistant.notice_vision_attach")
1450
1450
  }, null, 8, ["title", "text"])])) : g("", !0),
1451
- y(z).length ? (a(), w("div", Ur, [(a(!0), w(E, null, i(y(z), (e) => (a(), w("div", {
1451
+ y(z).length ? (a(), w("div", Gr, [(a(!0), w(E, null, i(y(z), (e) => (a(), w("div", {
1452
1452
  key: e.id,
1453
1453
  class: "cui-assistant-attachment relative flex items-center rounded-lg text-xs text-color"
1454
1454
  }, [e.kind === "image" ? (a(), w("img", {
@@ -1456,7 +1456,7 @@ var Ir = p({
1456
1456
  src: e.preview,
1457
1457
  class: "h-14 w-14 rounded-lg object-cover",
1458
1458
  alt: ""
1459
- }, null, 8, Wr)) : (a(), w("span", Gr, [
1459
+ }, null, 8, Kr)) : (a(), w("span", qr, [
1460
1460
  e.kind === "audio" ? (a(), h(f, {
1461
1461
  key: 0,
1462
1462
  class: "w-4 h-4 text-muted"
@@ -1464,14 +1464,14 @@ var Ir = p({
1464
1464
  key: 1,
1465
1465
  class: "w-4 h-4 text-muted"
1466
1466
  })),
1467
- k("span", Kr, s(e.name), 1),
1468
- k("span", qr, s(ie(e.size)), 1)
1467
+ k("span", Jr, s(e.name), 1),
1468
+ k("span", Yr, s(re(e.size)), 1)
1469
1469
  ])), A((a(), h(S, {
1470
1470
  type: "button",
1471
1471
  severity: "secondary",
1472
1472
  rounded: "",
1473
1473
  class: "cui-assistant-attachment-remove cui-icon-sm absolute -top-1.5 -right-1.5",
1474
- onClick: (t) => Y(e.id)
1474
+ onClick: (t) => le(e.id)
1475
1475
  }, {
1476
1476
  icon: x(() => [I(b, { class: "w-3 h-3" })]),
1477
1477
  _: 1
@@ -1516,9 +1516,9 @@ var Ir = p({
1516
1516
  type: "file",
1517
1517
  class: "hidden",
1518
1518
  multiple: "",
1519
- accept: y(Rr),
1520
- onChange: oe
1521
- }, null, 40, Jr),
1519
+ accept: y(Br),
1520
+ onChange: se
1521
+ }, null, 40, Xr),
1522
1522
  y(T) ? A((a(), h(S, {
1523
1523
  key: 0,
1524
1524
  type: "button",
@@ -1527,7 +1527,7 @@ var Ir = p({
1527
1527
  rounded: "",
1528
1528
  class: d(["cui-assistant-voice shrink-0", { "cui-assistant-voice-active": y(L) }]),
1529
1529
  disabled: e.disabled || e.busy,
1530
- onClick: X
1530
+ onClick: J
1531
1531
  }, {
1532
1532
  icon: x(() => [I(F, { class: "w-4 h-4" })]),
1533
1533
  _: 1
@@ -1537,12 +1537,12 @@ var Ir = p({
1537
1537
  void 0,
1538
1538
  { top: !0 }
1539
1539
  ]]) : g("", !0),
1540
- !y(m) && !e.compact ? (a(), w("span", Yr, [
1540
+ !y(m) && !e.compact ? (a(), w("span", Zr, [
1541
1541
  o[3] ||= k("kbd", { class: "cui-assistant-kbd" }, "↵", -1),
1542
1542
  j(" " + s(t.$t("views.assistant.hint_send")) + " · ", 1),
1543
1543
  o[4] ||= k("kbd", { class: "cui-assistant-kbd" }, "⇧↵", -1),
1544
1544
  j(" " + s(t.$t("views.assistant.hint_newline")), 1)
1545
- ])) : (a(), w("span", Xr)),
1545
+ ])) : (a(), w("span", Qr)),
1546
1546
  e.busy ? A((a(), h(S, {
1547
1547
  key: 3,
1548
1548
  type: "button",
@@ -1572,32 +1572,32 @@ var Ir = p({
1572
1572
  ], 34);
1573
1573
  };
1574
1574
  }
1575
- }), [["__scopeId", "data-v-1e47fe40"]]), Qr = {
1575
+ }), [["__scopeId", "data-v-1e47fe40"]]), ei = {
1576
1576
  viewBox: "0 0 24 24",
1577
1577
  width: "1.2em",
1578
1578
  height: "1.2em"
1579
1579
  };
1580
- function $r(e, t) {
1581
- return a(), w("svg", Qr, [...t[0] ||= [k("path", {
1580
+ function ti(e, t) {
1581
+ return a(), w("svg", ei, [...t[0] ||= [k("path", {
1582
1582
  fill: "currentColor",
1583
1583
  d: "M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"
1584
1584
  }, null, -1)]]);
1585
1585
  }
1586
- var ei = p({
1586
+ var ni = p({
1587
1587
  name: "mdi-tune",
1588
- render: $r
1589
- }), ti = { class: "flex w-full flex-col field-gap" }, ni = {
1588
+ render: ti
1589
+ }), ri = { class: "flex w-full flex-col field-gap" }, ii = {
1590
1590
  for: "assistantProfileName",
1591
1591
  class: "cui-label"
1592
- }, ri = /* @__PURE__ */ P({
1592
+ }, ai = /* @__PURE__ */ P({
1593
1593
  __name: "AssistantProfileName",
1594
1594
  props: { name: {} },
1595
1595
  setup(e, { expose: t }) {
1596
1596
  let n = F(e.name ?? "");
1597
1597
  return t({ onConfirm: async () => n.value.trim() || null }), (e, t) => {
1598
- let r = Ne, i = R;
1599
- return a(), w("div", ti, [
1600
- k("label", ni, s(e.$t("views.assistant.profile_name_label")), 1),
1598
+ let r = Fe, i = R;
1599
+ return a(), w("div", ri, [
1600
+ k("label", ii, s(e.$t("views.assistant.profile_name_label")), 1),
1601
1601
  I(r, {
1602
1602
  id: "assistantProfileName",
1603
1603
  modelValue: y(n),
@@ -1619,22 +1619,22 @@ var ei = p({
1619
1619
  ]);
1620
1620
  };
1621
1621
  }
1622
- }), ii = { class: "cui-assistant-tray flex w-full flex-col" }, ai = { class: "flex shrink-0 items-center gap-2 px-4 pt-3 pb-2" }, oi = { class: "text-sm font-medium text-color" }, si = {
1622
+ }), oi = { class: "cui-assistant-tray flex w-full flex-col" }, si = { class: "flex shrink-0 items-center gap-2 px-4 pt-3 pb-2" }, ci = { class: "text-sm font-medium text-color" }, li = {
1623
1623
  key: 0,
1624
1624
  class: "text-xs tabular-nums text-muted"
1625
- }, ci = { class: "flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-4 pb-4" }, li = { class: "flex flex-col gap-1.5" }, ui = {
1625
+ }, ui = { class: "flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-4 pb-4" }, di = { class: "flex flex-col gap-1.5" }, fi = {
1626
1626
  for: "assistantInstructions",
1627
1627
  class: "text-xs text-muted"
1628
- }, di = { class: "flex flex-col gap-1.5" }, fi = { class: "text-xs text-muted" }, pi = { class: "cui-assistant-options" }, mi = ["onClick"], hi = { class: "cui-assistant-option-mark cui-assistant-option-box" }, gi = { class: "min-w-0 flex-1 truncate" }, _i = { class: "shrink-0 text-xs text-muted" }, vi = {
1628
+ }, pi = { class: "flex flex-col gap-1.5" }, mi = { class: "text-xs text-muted" }, hi = { class: "cui-assistant-options" }, gi = ["onClick"], _i = { class: "cui-assistant-option-mark cui-assistant-option-box" }, vi = { class: "min-w-0 flex-1 truncate" }, yi = { class: "shrink-0 text-xs text-muted" }, bi = {
1629
1629
  key: 0,
1630
1630
  class: "flex flex-col gap-1.5"
1631
- }, yi = { class: "text-xs text-muted" }, bi = { class: "cui-assistant-options" }, xi = ["onClick"], Si = { class: "cui-assistant-option-mark" }, Ci = { class: "min-w-0 flex-1 truncate" }, wi = { class: "flex shrink-0 gap-1" }, Ti = { class: "flex flex-col gap-1.5" }, Ei = { class: "text-xs text-muted" }, Di = { class: "cui-assistant-options" }, Oi = { class: "cui-assistant-option-mark" }, ki = { class: "min-w-0 flex-1 truncate" }, Ai = ["onClick"], ji = { class: "cui-assistant-option-mark" }, Mi = { class: "min-w-0 flex-1 truncate" }, Ni = { class: "flex shrink-0 gap-1" }, Pi = { class: "flex gap-2" }, Fi = {
1631
+ }, xi = { class: "text-xs text-muted" }, Si = { class: "cui-assistant-options" }, Ci = ["onClick"], wi = { class: "cui-assistant-option-mark" }, Ti = { class: "min-w-0 flex-1 truncate" }, Ei = { class: "flex shrink-0 gap-1" }, Di = { class: "flex flex-col gap-1.5" }, Oi = { class: "text-xs text-muted" }, ki = { class: "cui-assistant-options" }, Ai = { class: "cui-assistant-option-mark" }, ji = { class: "min-w-0 flex-1 truncate" }, Mi = ["onClick"], Ni = { class: "cui-assistant-option-mark" }, Pi = { class: "min-w-0 flex-1 truncate" }, Fi = { class: "flex shrink-0 gap-1" }, Ii = { class: "flex gap-2" }, Li = {
1632
1632
  key: 0,
1633
1633
  class: "text-xs text-muted"
1634
- }, Ii = {
1634
+ }, Ri = {
1635
1635
  key: 1,
1636
1636
  class: "cui-assistant-options"
1637
- }, Li = { class: "min-w-0 flex-1 leading-snug" }, Ri = /*#__PURE__*/ q(/* @__PURE__ */ P({
1637
+ }, zi = { class: "min-w-0 flex-1 leading-snug" }, Bi = /*#__PURE__*/ U(/* @__PURE__ */ P({
1638
1638
  __name: "CuiAssistantTray",
1639
1639
  props: /*@__PURE__*/ v({
1640
1640
  panel: {},
@@ -1658,7 +1658,7 @@ var ei = p({
1658
1658
  "update:profileId"
1659
1659
  ]),
1660
1660
  setup(e, { emit: t }) {
1661
- let n = new Ue(), r = e, o = t, c = O(e, "instructions"), l = O(e, "disabledGroups"), u = O(e, "modelId"), f = O(e, "profileId"), { t: p } = Ee(), m = X(), { data: _ } = n.listProfilesQuery(), v = n.createProfileMutation(), S = n.patchProfileMutation(), T = n.deleteProfileMutation(), { data: D, refetch: j } = n.memoryQuery(), M = n.deleteMemoryFactMutation(), N = n.deleteMemoryMutation(), P = b(() => r.models.some((e) => e._id === u.value) ? u.value : r.defaultModelId);
1661
+ let n = new Ge(), r = e, o = t, c = O(e, "instructions"), l = O(e, "disabledGroups"), u = O(e, "modelId"), f = O(e, "profileId"), { t: p } = Oe(), m = ge(), { data: _ } = n.listProfilesQuery(), v = n.createProfileMutation(), S = n.patchProfileMutation(), T = n.deleteProfileMutation(), { data: D, refetch: j } = n.memoryQuery(), M = n.deleteMemoryFactMutation(), N = n.deleteMemoryMutation(), P = b(() => r.models.some((e) => e._id === u.value) ? u.value : r.defaultModelId);
1662
1662
  function F(e) {
1663
1663
  l.value = l.value.includes(e) ? l.value.filter((t) => t !== e) : [...l.value, e];
1664
1664
  }
@@ -1669,7 +1669,7 @@ var ei = p({
1669
1669
  return r.models.find((t) => t._id === e.modelId) ?? r.models.find((e) => e._id === r.defaultModelId);
1670
1670
  }
1671
1671
  function z(e) {
1672
- return e ? Xe(e).filter((e) => e.severity !== "success") : [];
1672
+ return e ? Qe(e).filter((e) => e.severity !== "success") : [];
1673
1673
  }
1674
1674
  function V() {
1675
1675
  return {
@@ -1680,7 +1680,7 @@ var ei = p({
1680
1680
  }
1681
1681
  function H() {
1682
1682
  let e = !!document.activeElement?.closest(".cui-assistant-composer");
1683
- m.openComponentDialog(ri, {
1683
+ m.openComponentDialog(ai, {
1684
1684
  data: {
1685
1685
  title: p("views.assistant.profile_save"),
1686
1686
  confirmText: p("components.form.button.save"),
@@ -1711,10 +1711,10 @@ var ei = p({
1711
1711
  return C(() => r.panel, (e) => {
1712
1712
  e === "memory" && j();
1713
1713
  }, { immediate: !0 }), (t, n) => {
1714
- let r = Pe, p = Ae, m = Fe, b = he, C = B, O = ee;
1715
- return a(), w("div", ii, [k("div", ai, [
1716
- k("span", oi, s(e.panel === "tools" ? t.$t("views.assistant.tools_title") : t.$t("views.assistant.memory_title")), 1),
1717
- e.panel === "memory" && y(D)?.length ? (a(), w("span", si, s(y(D).length), 1)) : g("", !0),
1714
+ let r = Ie, p = Me, m = Le, b = _e, C = B, O = ee;
1715
+ return a(), w("div", oi, [k("div", si, [
1716
+ k("span", ci, s(e.panel === "tools" ? t.$t("views.assistant.tools_title") : t.$t("views.assistant.memory_title")), 1),
1717
+ e.panel === "memory" && y(D)?.length ? (a(), w("span", li, s(y(D).length), 1)) : g("", !0),
1718
1718
  I(p, {
1719
1719
  type: "button",
1720
1720
  severity: "secondary",
@@ -1727,8 +1727,8 @@ var ei = p({
1727
1727
  icon: x(() => [I(r, { class: "w-4 h-4" })]),
1728
1728
  _: 1
1729
1729
  }, 8, ["aria-label"])
1730
- ]), k("div", ci, [e.panel === "tools" ? (a(), w(E, { key: 0 }, [
1731
- k("div", li, [k("label", ui, s(t.$t("views.assistant.instructions_label")), 1), I(m, {
1730
+ ]), k("div", ui, [e.panel === "tools" ? (a(), w(E, { key: 0 }, [
1731
+ k("div", di, [k("label", fi, s(t.$t("views.assistant.instructions_label")), 1), I(m, {
1732
1732
  id: "assistantInstructions",
1733
1733
  modelValue: c.value,
1734
1734
  "onUpdate:modelValue": n[1] ||= (e) => c.value = e,
@@ -1737,53 +1737,53 @@ var ei = p({
1737
1737
  class: "text-sm",
1738
1738
  placeholder: t.$t("views.assistant.instructions_placeholder")
1739
1739
  }, null, 8, ["modelValue", "placeholder"])]),
1740
- k("div", di, [k("span", fi, s(t.$t("views.assistant.tools_label")), 1), k("div", pi, [(a(!0), w(E, null, i(e.groups, (e) => (a(), w("button", {
1740
+ k("div", pi, [k("span", mi, s(t.$t("views.assistant.tools_label")), 1), k("div", hi, [(a(!0), w(E, null, i(e.groups, (e) => (a(), w("button", {
1741
1741
  key: e.id,
1742
1742
  type: "button",
1743
1743
  class: d(["cui-assistant-option", { "cui-assistant-option-on": !l.value.includes(e.id) }]),
1744
1744
  onClick: (t) => F(e.id)
1745
1745
  }, [
1746
- k("span", hi, [I(b, { class: "w-3.5 h-3.5" })]),
1747
- k("span", gi, s(e.label), 1),
1748
- k("span", _i, s(t.$t("views.assistant.tools_count", { n: e.count })), 1)
1749
- ], 10, mi))), 128))])]),
1750
- e.models.length > 1 ? (a(), w("div", vi, [k("span", yi, s(t.$t("views.assistant.model_label")), 1), k("div", bi, [(a(!0), w(E, null, i(e.models, (e) => (a(), w("button", {
1746
+ k("span", _i, [I(b, { class: "w-3.5 h-3.5" })]),
1747
+ k("span", vi, s(e.label), 1),
1748
+ k("span", yi, s(t.$t("views.assistant.tools_count", { n: e.count })), 1)
1749
+ ], 10, gi))), 128))])]),
1750
+ e.models.length > 1 ? (a(), w("div", bi, [k("span", xi, s(t.$t("views.assistant.model_label")), 1), k("div", Si, [(a(!0), w(E, null, i(e.models, (e) => (a(), w("button", {
1751
1751
  key: e._id,
1752
1752
  type: "button",
1753
1753
  class: d(["cui-assistant-option", { "cui-assistant-option-on": y(P) === e._id }]),
1754
1754
  onClick: (t) => u.value = e._id
1755
1755
  }, [
1756
- k("span", Si, [I(b, { class: "w-3.5 h-3.5" })]),
1757
- k("span", Ci, s(e.name), 1),
1758
- k("span", wi, [(a(!0), w(E, null, i(z(e), (e) => (a(), h(C, {
1756
+ k("span", wi, [I(b, { class: "w-3.5 h-3.5" })]),
1757
+ k("span", Ti, s(e.name), 1),
1758
+ k("span", Ei, [(a(!0), w(E, null, i(z(e), (e) => (a(), h(C, {
1759
1759
  key: e.key,
1760
1760
  severity: e.severity,
1761
1761
  value: t.$t(`views.settings.assistant_capability_${e.key}`),
1762
1762
  class: "text-[10px]"
1763
1763
  }, null, 8, ["severity", "value"]))), 128))])
1764
- ], 10, xi))), 128))])])) : g("", !0),
1765
- k("div", Ti, [
1766
- k("span", Ei, s(t.$t("views.assistant.profiles_label")), 1),
1767
- k("div", Di, [k("button", {
1764
+ ], 10, Ci))), 128))])])) : g("", !0),
1765
+ k("div", Di, [
1766
+ k("span", Oi, s(t.$t("views.assistant.profiles_label")), 1),
1767
+ k("div", ki, [k("button", {
1768
1768
  type: "button",
1769
1769
  class: d(["cui-assistant-option", { "cui-assistant-option-on": !f.value }]),
1770
1770
  onClick: n[2] ||= (e) => f.value = null
1771
- }, [k("span", Oi, [I(b, { class: "w-3.5 h-3.5" })]), k("span", ki, s(t.$t("views.assistant.profile_none")), 1)], 2), (a(!0), w(E, null, i(y(_) ?? [], (e) => (a(), w("button", {
1771
+ }, [k("span", Ai, [I(b, { class: "w-3.5 h-3.5" })]), k("span", ji, s(t.$t("views.assistant.profile_none")), 1)], 2), (a(!0), w(E, null, i(y(_) ?? [], (e) => (a(), w("button", {
1772
1772
  key: e._id,
1773
1773
  type: "button",
1774
1774
  class: d(["cui-assistant-option", { "cui-assistant-option-on": f.value === e._id }]),
1775
1775
  onClick: (t) => L(e)
1776
1776
  }, [
1777
- k("span", ji, [I(b, { class: "w-3.5 h-3.5" })]),
1778
- k("span", Mi, s(e.name), 1),
1779
- k("span", Ni, [(a(!0), w(E, null, i(z(R(e)), (e) => (a(), h(C, {
1777
+ k("span", Ni, [I(b, { class: "w-3.5 h-3.5" })]),
1778
+ k("span", Pi, s(e.name), 1),
1779
+ k("span", Fi, [(a(!0), w(E, null, i(z(R(e)), (e) => (a(), h(C, {
1780
1780
  key: e.key,
1781
1781
  severity: e.severity,
1782
1782
  value: t.$t(`views.settings.assistant_capability_${e.key}`),
1783
1783
  class: "text-[10px]"
1784
1784
  }, null, 8, ["severity", "value"]))), 128))])
1785
- ], 10, Ai))), 128))]),
1786
- k("div", Pi, [I(p, {
1785
+ ], 10, Mi))), 128))]),
1786
+ k("div", Ii, [I(p, {
1787
1787
  type: "button",
1788
1788
  size: "small",
1789
1789
  severity: "secondary",
@@ -1803,10 +1803,10 @@ var ei = p({
1803
1803
  onClick: W
1804
1804
  }, null, 8, ["label", "loading"])) : g("", !0)])
1805
1805
  ])
1806
- ], 64)) : (a(), w(E, { key: 1 }, [y(D)?.length ? (a(), w("div", Ii, [(a(!0), w(E, null, i(y(D), (e) => (a(), w("div", {
1806
+ ], 64)) : (a(), w(E, { key: 1 }, [y(D)?.length ? (a(), w("div", Ri, [(a(!0), w(E, null, i(y(D), (e) => (a(), w("div", {
1807
1807
  key: e._id,
1808
1808
  class: "cui-assistant-option"
1809
- }, [k("span", Li, s(e.text), 1), A((a(), h(p, {
1809
+ }, [k("span", zi, s(e.text), 1), A((a(), h(p, {
1810
1810
  type: "button",
1811
1811
  severity: "secondary",
1812
1812
  text: "",
@@ -1822,7 +1822,7 @@ var ei = p({
1822
1822
  { value: t.$t("views.assistant.memory_forget") },
1823
1823
  void 0,
1824
1824
  { top: !0 }
1825
- ]])]))), 128))])) : (a(), w("div", Fi, s(t.$t("views.assistant.memory_empty")), 1)), y(D)?.length ? (a(), h(p, {
1825
+ ]])]))), 128))])) : (a(), w("div", Li, s(t.$t("views.assistant.memory_empty")), 1)), y(D)?.length ? (a(), h(p, {
1826
1826
  key: 2,
1827
1827
  type: "button",
1828
1828
  size: "small",
@@ -1835,25 +1835,25 @@ var ei = p({
1835
1835
  }, null, 8, ["label", "loading"])) : g("", !0)], 64))])]);
1836
1836
  };
1837
1837
  }
1838
- }), [["__scopeId", "data-v-0c5455a1"]]), zi = "cubic-bezier(0.38, 0.7, 0.125, 1)", Bi = {
1838
+ }), [["__scopeId", "data-v-0c5455a1"]]), Vi = "cubic-bezier(0.38, 0.7, 0.125, 1)", Hi = {
1839
1839
  id: "pending-answer",
1840
1840
  role: "assistant",
1841
1841
  parts: []
1842
- }, Vi = /* @__PURE__ */ function(e) {
1842
+ }, Ui = /* @__PURE__ */ function(e) {
1843
1843
  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.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.SUBAGENT_STARTED = "SUBAGENT_STARTED", e.SUBAGENT_FINISHED = "SUBAGENT_FINISHED", e.SUBAGENT_ERROR = "SUBAGENT_ERROR", e;
1844
1844
  }({});
1845
1845
  //#endregion
1846
1846
  //#region node_modules/@tanstack/ai/dist/esm/utilities/ag-ui-usage.js
1847
- function Hi(e) {
1847
+ function Wi(e) {
1848
1848
  return Object.keys(e).length > 0 ? e : void 0;
1849
1849
  }
1850
- function Ui(e) {
1850
+ function Gi(e) {
1851
1851
  return typeof e == "object" && !!e && !Array.isArray(e) && "promptTokens" in e;
1852
1852
  }
1853
- function Wi(e, t) {
1854
- return Ui(e) ? e : Gi(Array.isArray(e) ? e : void 0, t);
1853
+ function Ki(e, t) {
1854
+ return Gi(e) ? e : qi(Array.isArray(e) ? e : void 0, t);
1855
1855
  }
1856
- function Gi(e, t) {
1856
+ function qi(e, t) {
1857
1857
  let n = e?.reduce((e, t) => {
1858
1858
  for (let n of [
1859
1859
  "inputTokens",
@@ -1866,11 +1866,11 @@ function Gi(e, t) {
1866
1866
  return e;
1867
1867
  }, {});
1868
1868
  if ((e === void 0 || e.length === 0) && t == null) return;
1869
- let { promptTokensDetails: r, completionTokensDetails: i, ...a } = t ?? {}, o = Hi({
1869
+ let { promptTokensDetails: r, completionTokensDetails: i, ...a } = t ?? {}, o = Wi({
1870
1870
  ...n?.cachedInputTokens === void 0 ? {} : { cachedTokens: n.cachedInputTokens },
1871
1871
  ...n?.cacheWriteInputTokens === void 0 ? {} : { cacheWriteTokens: n.cacheWriteInputTokens },
1872
1872
  ...r
1873
- }), s = Hi({
1873
+ }), s = Wi({
1874
1874
  ...n?.reasoningTokens === void 0 ? {} : { reasoningTokens: n.reasoningTokens },
1875
1875
  ...i
1876
1876
  });
@@ -1885,28 +1885,28 @@ function Gi(e, t) {
1885
1885
  }
1886
1886
  //#endregion
1887
1887
  //#region node_modules/@tanstack/ai/dist/esm/utilities/merge-metadata.js
1888
- function Ki(e) {
1888
+ function Ji(e) {
1889
1889
  return typeof e == "object" && !!e && !Array.isArray(e);
1890
1890
  }
1891
- function qi(e, t) {
1891
+ function Yi(e, t) {
1892
1892
  if (t == null) return e;
1893
1893
  if (e == null) return { ...t };
1894
1894
  let n = {
1895
1895
  ...e,
1896
1896
  ...t
1897
1897
  };
1898
- return Ki(e.tanstack) && Ki(t.tanstack) && (n.tanstack = {
1898
+ return Ji(e.tanstack) && Ji(t.tanstack) && (n.tanstack = {
1899
1899
  ...e.tanstack,
1900
1900
  ...t.tanstack
1901
1901
  }), n;
1902
1902
  }
1903
- function Q(e) {
1903
+ function X(e) {
1904
1904
  if (e == null) return;
1905
1905
  let t = "metadata" in e ? e.metadata : void 0, n = (typeof t == "object" && t && !Array.isArray(t) ? t : e).tanstack;
1906
1906
  if (typeof n == "object" && n && !Array.isArray(n)) return n;
1907
1907
  }
1908
- function Ji(e, t) {
1909
- let n = e.metadata, r = Q(e) ?? {};
1908
+ function Xi(e, t) {
1909
+ let n = e.metadata, r = X(e) ?? {};
1910
1910
  return {
1911
1911
  ...e,
1912
1912
  metadata: {
@@ -1920,13 +1920,13 @@ function Ji(e, t) {
1920
1920
  }
1921
1921
  //#endregion
1922
1922
  //#region node_modules/@tanstack/ai/dist/esm/utilities/errors.js
1923
- function Yi(e) {
1923
+ function Zi(e) {
1924
1924
  let t = Error(e.message || e.error?.message || "An error occurred"), n = e.code ?? e.error?.code;
1925
1925
  return n !== void 0 && Object.assign(t, { code: n }), e.rawEvent !== void 0 && Object.assign(t, { rawEvent: e.rawEvent }), t;
1926
1926
  }
1927
1927
  //#endregion
1928
1928
  //#region node_modules/@tanstack/ai/dist/esm/interrupt-serialization.js
1929
- var Xi = new Uint32Array([
1929
+ var Qi = new Uint32Array([
1930
1930
  1116352408,
1931
1931
  1899447441,
1932
1932
  3049323471,
@@ -1992,10 +1992,10 @@ var Xi = new Uint32Array([
1992
1992
  3204031479,
1993
1993
  3329325298
1994
1994
  ]);
1995
- function Zi(e, t) {
1995
+ function $i(e, t) {
1996
1996
  return e >>> t | e << 32 - t;
1997
1997
  }
1998
- function Qi(e) {
1998
+ function ea(e) {
1999
1999
  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);
2000
2000
  a.set(t), a[t.length] = 128;
2001
2001
  let o = new DataView(a.buffer);
@@ -2004,12 +2004,12 @@ function Qi(e) {
2004
2004
  for (let e = 0; e < i; e += 64) {
2005
2005
  for (let t = 0; t < 16; t++) h[t] = o.getUint32(e + t * 4);
2006
2006
  for (let e = 16; e < 64; e++) {
2007
- let t = h[e - 15] ?? 0, n = h[e - 2] ?? 0, r = Zi(t, 7) ^ Zi(t, 18) ^ t >>> 3, i = Zi(n, 17) ^ Zi(n, 19) ^ n >>> 10;
2007
+ let t = h[e - 15] ?? 0, n = h[e - 2] ?? 0, r = $i(t, 7) ^ $i(t, 18) ^ t >>> 3, i = $i(n, 17) ^ $i(n, 19) ^ n >>> 10;
2008
2008
  h[e] = (h[e - 16] ?? 0) + r + (h[e - 7] ?? 0) + i >>> 0;
2009
2009
  }
2010
2010
  let t = s, n = c, r = l, i = u, a = d, g = f, _ = p, v = m;
2011
2011
  for (let e = 0; e < 64; e++) {
2012
- let o = Zi(a, 6) ^ Zi(a, 11) ^ Zi(a, 25), s = a & g ^ ~a & _, c = v + o + s + (Xi[e] ?? 0) + (h[e] ?? 0) >>> 0, l = (Zi(t, 2) ^ Zi(t, 13) ^ Zi(t, 22)) + (t & n ^ t & r ^ n & r) >>> 0;
2012
+ let o = $i(a, 6) ^ $i(a, 11) ^ $i(a, 25), s = a & g ^ ~a & _, c = v + o + s + (Qi[e] ?? 0) + (h[e] ?? 0) >>> 0, l = ($i(t, 2) ^ $i(t, 13) ^ $i(t, 22)) + (t & n ^ t & r ^ n & r) >>> 0;
2013
2013
  v = _, _ = g, g = a, a = i + c >>> 0, i = r, r = n, n = t, t = c + l >>> 0;
2014
2014
  }
2015
2015
  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;
@@ -2017,10 +2017,10 @@ function Qi(e) {
2017
2017
  let g = (e) => (e >>> 0).toString(16).padStart(8, "0");
2018
2018
  return g(s) + g(c) + g(l) + g(u) + g(d) + g(f) + g(p) + g(m);
2019
2019
  }
2020
- function $i(e) {
2021
- return `sha256:${Qi(e)}`;
2020
+ function ta(e) {
2021
+ return `sha256:${ea(e)}`;
2022
2022
  }
2023
- function ea(e, t) {
2023
+ function na(e, t) {
2024
2024
  if (e === null) return "null";
2025
2025
  if (typeof e == "string" || typeof e == "boolean" || typeof e == "number" && Number.isFinite(e)) return JSON.stringify(e);
2026
2026
  if (typeof e != "object") throw TypeError("Interrupt values must be JSON-compatible.");
@@ -2030,74 +2030,74 @@ function ea(e, t) {
2030
2030
  let n;
2031
2031
  if (Array.isArray(e)) {
2032
2032
  let r = [];
2033
- for (let n = 0; n < e.length; n++) r.push(ea(e[n], t));
2033
+ for (let n = 0; n < e.length; n++) r.push(na(e[n], t));
2034
2034
  n = `[${r.join(",")}]`;
2035
2035
  } else {
2036
2036
  let r = e;
2037
- n = `{${Object.keys(r).sort().map((e) => `${JSON.stringify(e)}:${ea(r[e], t)}`).join(",")}}`;
2037
+ n = `{${Object.keys(r).sort().map((e) => `${JSON.stringify(e)}:${na(r[e], t)}`).join(",")}}`;
2038
2038
  }
2039
2039
  return t.delete(e), n;
2040
2040
  }
2041
- function ta(e) {
2042
- return ea(e, /* @__PURE__ */ new WeakSet());
2041
+ function ra(e) {
2042
+ return na(e, /* @__PURE__ */ new WeakSet());
2043
2043
  }
2044
- function na(e, t = $i) {
2044
+ function ia(e, t = ta) {
2045
2045
  if (typeof e != "string") throw TypeError("Interrupt digests require canonical JSON text.");
2046
2046
  return t(e);
2047
2047
  }
2048
- function ra(e) {
2049
- typeof e == "object" && e && !Object.isFrozen(e) && (Object.values(e).forEach(ra), Object.freeze(e));
2048
+ function aa(e) {
2049
+ typeof e == "object" && e && !Object.isFrozen(e) && (Object.values(e).forEach(aa), Object.freeze(e));
2050
2050
  }
2051
- function $(e) {
2052
- let t = JSON.parse(ta(e));
2053
- return ra(t), t;
2051
+ function Z(e) {
2052
+ let t = JSON.parse(ra(e));
2053
+ return aa(t), t;
2054
2054
  }
2055
2055
  //#endregion
2056
2056
  //#region node_modules/@tanstack/ai/dist/esm/interrupts.js
2057
- function ia(e) {
2058
- let t = $([...e].sort((e, t) => e.interruptId.localeCompare(t.interruptId))), n = ta(t);
2057
+ function oa(e) {
2058
+ let t = Z([...e].sort((e, t) => e.interruptId.localeCompare(t.interruptId))), n = ra(t);
2059
2059
  return Object.freeze({
2060
2060
  resolutions: t,
2061
2061
  canonicalResolutions: n,
2062
- fingerprint: na(n)
2062
+ fingerprint: ia(n)
2063
2063
  });
2064
2064
  }
2065
2065
  //#endregion
2066
2066
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/tools/schema-converter.js
2067
- function aa(e) {
2067
+ function sa(e) {
2068
2068
  let t = {};
2069
2069
  for (let [n, r] of Object.entries(e)) n !== "$schema" && (t[n] = r);
2070
2070
  return t;
2071
2071
  }
2072
- function oa(e) {
2072
+ function ca(e) {
2073
2073
  return (typeof e == "object" || typeof e == "function") && e !== null;
2074
2074
  }
2075
- function sa(e) {
2076
- if (!oa(e) || !("~standard" in e)) return !1;
2075
+ function la(e) {
2076
+ if (!ca(e) || !("~standard" in e)) return !1;
2077
2077
  let t = e["~standard"];
2078
2078
  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";
2079
2079
  }
2080
- function ca(e) {
2081
- return oa(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";
2080
+ function ua(e) {
2081
+ return ca(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";
2082
2082
  }
2083
- function la(e) {
2083
+ function da(e) {
2084
2084
  return Object.keys(e).length > 0 ? e : void 0;
2085
2085
  }
2086
- function ua(e) {
2086
+ function fa(e) {
2087
2087
  if (Array.isArray(e)) {
2088
- let t = e.map((e) => da(e, e.required || [])), n = t.map((e) => e.nullWidening ?? {});
2088
+ let t = e.map((e) => pa(e, e.required || [])), n = t.map((e) => e.nullWidening ?? {});
2089
2089
  return {
2090
2090
  schema: t.map((e) => e.schema),
2091
2091
  itemMap: n.some((e) => Object.keys(e).length > 0) ? n : void 0
2092
2092
  };
2093
2093
  }
2094
- let t = da(e, e.required || []);
2094
+ let t = pa(e, e.required || []);
2095
2095
  return {
2096
2096
  schema: t.schema,
2097
2097
  itemMap: t.nullWidening
2098
2098
  };
2099
2099
  }
2100
- function da(e, t = []) {
2100
+ function pa(e, t = []) {
2101
2101
  let n = { ...e }, r = {};
2102
2102
  if (n.type === "object" && n.properties) {
2103
2103
  let e = { ...n.properties }, i = Object.keys(e), a = {};
@@ -2106,13 +2106,13 @@ function da(e, t = []) {
2106
2106
  if (!r) continue;
2107
2107
  let i = !t.includes(n), o = !1, s;
2108
2108
  if (r.type === "object" && r.properties) {
2109
- let t = da(r, r.required || []);
2109
+ let t = pa(r, r.required || []);
2110
2110
  e[n] = i ? {
2111
2111
  ...t.schema,
2112
2112
  type: ["object", "null"]
2113
2113
  } : t.schema, o = i, s = t.nullWidening;
2114
2114
  } else if (r.type === "array" && r.items) {
2115
- let t = ua(r.items);
2115
+ let t = fa(r.items);
2116
2116
  e[n] = {
2117
2117
  ...r,
2118
2118
  items: t.schema,
@@ -2133,46 +2133,46 @@ function da(e, t = []) {
2133
2133
  n.properties = e, n.required = i, n.additionalProperties = !1, Object.keys(a).length > 0 && (r.properties = a);
2134
2134
  }
2135
2135
  if (n.type === "array" && n.items) {
2136
- let e = ua(n.items);
2136
+ let e = fa(n.items);
2137
2137
  n.items = e.schema, e.itemMap && (r.items = e.itemMap);
2138
2138
  }
2139
2139
  return {
2140
2140
  schema: n,
2141
- nullWidening: la(r)
2141
+ nullWidening: da(r)
2142
2142
  };
2143
2143
  }
2144
- function fa(e) {
2145
- if (sa(e)) {
2146
- let t = aa(e["~standard"].jsonSchema.input({ target: "draft-07" }));
2144
+ function ma(e) {
2145
+ if (la(e)) {
2146
+ let t = sa(e["~standard"].jsonSchema.input({ target: "draft-07" }));
2147
2147
  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;
2148
2148
  }
2149
- if (ca(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`.");
2150
- return typeof e == "object" ? aa(e) : e;
2149
+ if (ua(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`.");
2150
+ return typeof e == "object" ? sa(e) : e;
2151
2151
  }
2152
- function pa(e, t = {}) {
2152
+ function ha(e, t = {}) {
2153
2153
  if (!e) return;
2154
2154
  let { forStructuredOutput: n = !1 } = t;
2155
- if (!n && !sa(e) && !ca(e)) return e;
2156
- let r = fa(e);
2157
- return !r || typeof r != "object" || !n ? r : da(r, r.required || []).schema;
2155
+ if (!n && !la(e) && !ua(e)) return e;
2156
+ let r = ma(e);
2157
+ return !r || typeof r != "object" || !n ? r : pa(r, r.required || []).schema;
2158
2158
  }
2159
- var ma = class extends Error {
2159
+ var ga = class extends Error {
2160
2160
  name = "StandardSchemaValidationError";
2161
2161
  issues;
2162
2162
  constructor(e) {
2163
2163
  super(`Validation failed: ${e.map((e) => e.message || "Validation failed").join(", ")}`), this.issues = e;
2164
2164
  }
2165
2165
  };
2166
- function ha(e, t) {
2167
- if (!ca(e)) return t;
2166
+ function _a(e, t) {
2167
+ if (!ua(e)) return t;
2168
2168
  let n = e["~standard"].validate(t);
2169
2169
  if (n instanceof Promise) throw Error("Schema validation returned a Promise. Use validateWithStandardSchema for async validation.");
2170
2170
  if (!n.issues) return n.value;
2171
- throw new ma(n.issues);
2171
+ throw new ga(n.issues);
2172
2172
  }
2173
2173
  //#endregion
2174
2174
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/tools/approval-schema.js
2175
- var ga = /* @__PURE__ */ new Set([
2175
+ var va = /* @__PURE__ */ new Set([
2176
2176
  "$schema",
2177
2177
  "$id",
2178
2178
  "$ref",
@@ -2194,41 +2194,41 @@ var ga = /* @__PURE__ */ new Set([
2194
2194
  "maxLength",
2195
2195
  "pattern"
2196
2196
  ]);
2197
- function _a(e) {
2197
+ function ya(e) {
2198
2198
  return typeof e == "object" && !!e && !Array.isArray(e) && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null);
2199
2199
  }
2200
- function va(e) {
2201
- return _a(e) && Object.keys(e).some((e) => ga.has(e));
2200
+ function ba(e) {
2201
+ return ya(e) && Object.keys(e).some((e) => va.has(e));
2202
2202
  }
2203
- function ya(e) {
2204
- return ca(e) || sa(e) || va(e);
2203
+ function xa(e) {
2204
+ return ua(e) || la(e) || ba(e);
2205
2205
  }
2206
- function ba(e) {
2207
- if (!_a(e)) return !1;
2206
+ function Sa(e) {
2207
+ if (!ya(e)) return !1;
2208
2208
  let t = Object.keys(e);
2209
- return t.length > 0 && t.every((e) => e === "approve" || e === "reject") && t.every((t) => ya(e[t]));
2209
+ return t.length > 0 && t.every((e) => e === "approve" || e === "reject") && t.every((t) => xa(e[t]));
2210
2210
  }
2211
- function xa(e) {
2211
+ function Ca(e) {
2212
2212
  let t = {};
2213
2213
  for (let [n, r] of Object.entries(e)) t[n] = r;
2214
2214
  return t;
2215
2215
  }
2216
- function Sa(e) {
2217
- if (ca(e)) {
2218
- let t = sa(e) ? xa(e["~standard"].jsonSchema.input({ target: "draft-2020-12" })) : void 0;
2216
+ function wa(e) {
2217
+ if (ua(e)) {
2218
+ let t = la(e) ? Ca(e["~standard"].jsonSchema.input({ target: "draft-2020-12" })) : void 0;
2219
2219
  return {
2220
2220
  source: e,
2221
2221
  validator: e,
2222
2222
  ...t !== void 0 && { jsonSchema: t }
2223
2223
  };
2224
2224
  }
2225
- if (va(e)) return {
2225
+ if (ba(e)) return {
2226
2226
  source: e,
2227
2227
  jsonSchema: e
2228
2228
  };
2229
2229
  throw TypeError("Expected a supported SchemaInput.");
2230
2230
  }
2231
- function Ca(e) {
2231
+ function Ta(e) {
2232
2232
  let t = { approved: { const: e.approved } }, n = ["approved"];
2233
2233
  return e.approved && e.inputSchema && (t.editedArgs = e.inputSchema.jsonSchema ?? {}), e.payload && (t.payload = e.payload.jsonSchema ?? {}, n.push("payload")), {
2234
2234
  type: "object",
@@ -2237,22 +2237,22 @@ function Ca(e) {
2237
2237
  additionalProperties: !1
2238
2238
  };
2239
2239
  }
2240
- function wa(e, t) {
2241
- let n = t === void 0 ? null : Sa(t), r = null, i = null;
2240
+ function Ea(e, t) {
2241
+ let n = t === void 0 ? null : wa(t), r = null, i = null;
2242
2242
  if (e !== void 0) {
2243
- if (ca(e) || va(e)) r = Sa(e), i = r;
2244
- else if (ba(e)) r = e.approve === void 0 ? null : Sa(e.approve), i = e.reject === void 0 ? null : Sa(e.reject);
2243
+ if (ua(e) || ba(e)) r = wa(e), i = r;
2244
+ else if (Sa(e)) r = e.approve === void 0 ? null : wa(e.approve), i = e.reject === void 0 ? null : wa(e.reject);
2245
2245
  else throw TypeError("approvalSchema must be a SchemaInput or a nonempty map containing approve or reject.");
2246
2246
  }
2247
- let a = { oneOf: [Ca({
2247
+ let a = { oneOf: [Ta({
2248
2248
  approved: !0,
2249
2249
  payload: r,
2250
2250
  inputSchema: n
2251
- }), Ca({
2251
+ }), Ta({
2252
2252
  approved: !1,
2253
2253
  payload: i,
2254
2254
  inputSchema: null
2255
- })] }, o = ta(a), s = ta({
2255
+ })] }, o = ra(a), s = ra({
2256
2256
  approve: r?.jsonSchema ?? null,
2257
2257
  reject: i?.jsonSchema ?? null
2258
2258
  });
@@ -2262,33 +2262,33 @@ function wa(e, t) {
2262
2262
  reject: i
2263
2263
  },
2264
2264
  responseSchema: a,
2265
- responseSchemaHash: na(o),
2266
- approvalSchemaHash: na(s)
2265
+ responseSchemaHash: ia(o),
2266
+ approvalSchemaHash: ia(s)
2267
2267
  };
2268
2268
  }
2269
- function Ta(e) {
2270
- return na(e === void 0 ? "undefined" : ta(Sa(e).jsonSchema ?? { standardValidator: "unserialized" }));
2269
+ function Da(e) {
2270
+ return ia(e === void 0 ? "undefined" : ra(wa(e).jsonSchema ?? { standardValidator: "unserialized" }));
2271
2271
  }
2272
2272
  //#endregion
2273
2273
  //#region node_modules/@tanstack/ai/dist/esm/interrupt-resume.js
2274
- var Ea = "tanstack:interruptBinding", Da = Ea;
2275
- function Oa(e) {
2274
+ var Oa = "tanstack:interruptBinding", ka = Oa;
2275
+ function Aa(e) {
2276
2276
  return e && typeof e == "object" ? e : null;
2277
2277
  }
2278
- function ka(e, t) {
2278
+ function Q(e, t) {
2279
2279
  return typeof e[t] == "string" ? e[t] : void 0;
2280
2280
  }
2281
- function Aa(e) {
2281
+ function ja(e) {
2282
2282
  let t = e.v;
2283
2283
  return t === void 0 || t === 1;
2284
2284
  }
2285
- function ja(e) {
2286
- let t = Oa(e.metadata), n = t ? Oa(t[Da]) : null;
2287
- if (!n || ka(n, "interruptId") !== e.id || !Aa(n)) return;
2288
- let r = ka(n, "kind"), i = ka(n, "interruptId"), a = ka(n, "responseSchemaHash"), o = ka(n, "expiresAt");
2285
+ function Ma(e) {
2286
+ let t = Aa(e.metadata), n = t ? Aa(t[ka]) : null;
2287
+ if (!n || Q(n, "interruptId") !== e.id || !ja(n)) return;
2288
+ let r = Q(n, "kind"), i = Q(n, "interruptId"), a = Q(n, "responseSchemaHash"), o = Q(n, "expiresAt");
2289
2289
  if (!i || a === "" || o !== void 0 && !Number.isFinite(Date.parse(o))) return;
2290
2290
  if (r === "generic") {
2291
- let e = ka(n, "definitionId"), t = ka(n, "key"), s = n.batchIndex, c = ka(n, "payloadSchemaHash");
2291
+ let e = Q(n, "definitionId"), t = Q(n, "key"), s = n.batchIndex, c = Q(n, "payloadSchemaHash");
2292
2292
  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 : {
2293
2293
  v: 1,
2294
2294
  kind: r,
@@ -2302,10 +2302,10 @@ function ja(e) {
2302
2302
  };
2303
2303
  }
2304
2304
  if (!a) return;
2305
- let s = ka(n, "toolName"), c = ka(n, "toolCallId");
2305
+ let s = Q(n, "toolName"), c = Q(n, "toolCallId");
2306
2306
  if (s && c) {
2307
2307
  if (r === "client-tool-execution") {
2308
- let e = ka(n, "outputSchemaHash");
2308
+ let e = Q(n, "outputSchemaHash");
2309
2309
  return e ? {
2310
2310
  v: 1,
2311
2311
  kind: r,
@@ -2318,7 +2318,7 @@ function ja(e) {
2318
2318
  } : void 0;
2319
2319
  }
2320
2320
  if (r === "tool-approval") {
2321
- let e = ka(n, "inputSchemaHash"), t = ka(n, "approvalSchemaHash");
2321
+ let e = Q(n, "inputSchemaHash"), t = Q(n, "approvalSchemaHash");
2322
2322
  return !e || !t ? void 0 : {
2323
2323
  v: 1,
2324
2324
  kind: r,
@@ -2334,12 +2334,12 @@ function ja(e) {
2334
2334
  }
2335
2335
  }
2336
2336
  }
2337
- function Ma(e) {
2338
- let t = ja(e);
2337
+ function Na(e) {
2338
+ let t = Ma(e);
2339
2339
  if (!t) return;
2340
- let n = Oa(e.metadata), r = n ? Oa(n[Da]) : null;
2340
+ let n = Aa(e.metadata), r = n ? Aa(n[ka]) : null;
2341
2341
  if (!r) return;
2342
- let i = ka(r, "interruptedRunId"), a = r.generation;
2342
+ let i = Q(r, "interruptedRunId"), a = r.generation;
2343
2343
  if (!(!i || typeof a != "number" || !Number.isInteger(a) || a < 0)) return {
2344
2344
  ...t,
2345
2345
  interruptedRunId: i,
@@ -2348,9 +2348,9 @@ function Ma(e) {
2348
2348
  }
2349
2349
  //#endregion
2350
2350
  //#region node_modules/@tanstack/ai/dist/esm/interrupt-definition.js
2351
- var Na = "tanstack:interruptPayload";
2352
- function Pa(e, t) {
2353
- if (!sa(e)) throw TypeError(`${t} must be a Standard Schema with a JSON Schema converter.`);
2351
+ var Pa = "tanstack:interruptPayload";
2352
+ function Fa(e, t) {
2353
+ if (!la(e)) throw TypeError(`${t} must be a Standard Schema with a JSON Schema converter.`);
2354
2354
  try {
2355
2355
  let t = e["~standard"].jsonSchema.input({ target: "draft-07" });
2356
2356
  if (t === void 0) throw TypeError("The exported schema is undefined.");
@@ -2360,28 +2360,28 @@ function Pa(e, t) {
2360
2360
  for (let [e, r] of Object.entries(t)) e !== "$schema" && (n[e] = r);
2361
2361
  return {
2362
2362
  json: n,
2363
- canonicalJson: ta(n)
2363
+ canonicalJson: ra(n)
2364
2364
  };
2365
2365
  } catch (e) {
2366
2366
  throw TypeError(`${t} could not export compatible JSON Schema: ${e instanceof Error ? e.message : String(e)}`);
2367
2367
  }
2368
2368
  }
2369
- function Fa(e) {
2370
- return na(Pa(e, "Interrupt schema").canonicalJson);
2369
+ function Ia(e) {
2370
+ return ia(Fa(e, "Interrupt schema").canonicalJson);
2371
2371
  }
2372
2372
  //#endregion
2373
2373
  //#region node_modules/@tanstack/ai/dist/esm/generic-interrupt-continuation.js
2374
- var Ia = "tanstack:interruptContinuation";
2375
- function La(e) {
2376
- return typeof e == "object" && !!e && !Array.isArray(e);
2377
- }
2374
+ var La = "tanstack:interruptContinuation";
2378
2375
  function Ra(e) {
2379
- return { [Ia]: e };
2376
+ return typeof e == "object" && !!e && !Array.isArray(e);
2380
2377
  }
2381
2378
  function za(e) {
2382
- let t = ja(e);
2379
+ return { [La]: e };
2380
+ }
2381
+ function Ba(e) {
2382
+ let t = Ma(e);
2383
2383
  if (t?.kind !== "generic" || t.definitionId === void 0 || t.key === void 0 || t.batchIndex === void 0) return;
2384
- let n = La(e.metadata) ? e.metadata : void 0, r = n !== void 0 && Object.prototype.hasOwnProperty.call(n, "tanstack:interruptPayload");
2384
+ let n = Ra(e.metadata) ? e.metadata : void 0, r = n !== void 0 && Object.prototype.hasOwnProperty.call(n, "tanstack:interruptPayload");
2385
2385
  return {
2386
2386
  v: 1,
2387
2387
  definitionId: t.definitionId,
@@ -2392,87 +2392,87 @@ function za(e) {
2392
2392
  ...e.expiresAt === void 0 ? {} : { expiresAt: e.expiresAt },
2393
2393
  ...t.responseSchemaHash === void 0 ? {} : { responseSchemaHash: t.responseSchemaHash },
2394
2394
  ...t.payloadSchemaHash === void 0 ? {} : { payloadSchemaHash: t.payloadSchemaHash },
2395
- ...r ? { payload: n[Na] } : {}
2395
+ ...r ? { payload: n[Pa] } : {}
2396
2396
  };
2397
2397
  }
2398
2398
  //#endregion
2399
2399
  //#region node_modules/@tanstack/ai/dist/esm/utilities/provider-executed.js
2400
- function Ba(e) {
2400
+ function Va(e) {
2401
2401
  let t = e?.metadata;
2402
2402
  return typeof t == "object" && t && t.providerExecuted === !0 ? t : null;
2403
2403
  }
2404
- function Va(e) {
2405
- return Ba(e) !== null;
2404
+ function Ha(e) {
2405
+ return Va(e) !== null;
2406
2406
  }
2407
- function Ha(e, t) {
2407
+ function Ua(e, t) {
2408
2408
  return e?.startsWith(`${t}-segment-`) === !0;
2409
2409
  }
2410
2410
  //#endregion
2411
2411
  //#region node_modules/@tanstack/ai/dist/esm/utilities/tool-result.js
2412
- var Ua = /* @__PURE__ */ new Set([
2412
+ var Wa = /* @__PURE__ */ new Set([
2413
2413
  "text",
2414
2414
  "image",
2415
2415
  "audio",
2416
2416
  "video",
2417
2417
  "document"
2418
2418
  ]);
2419
- function Wa(e) {
2419
+ function Ga(e) {
2420
2420
  if (typeof e != "object" || !e) return !1;
2421
2421
  let t = e;
2422
- if (typeof t.type != "string" || !Ua.has(t.type)) return !1;
2422
+ if (typeof t.type != "string" || !Wa.has(t.type)) return !1;
2423
2423
  if (t.type === "text") return typeof t.content == "string";
2424
2424
  let n = t.source;
2425
2425
  if (typeof n != "object" || !n) return !1;
2426
2426
  let r = n;
2427
2427
  return typeof r.value == "string" ? r.type === "file" ? r.value.length > 0 && (r.provider === void 0 || typeof r.provider == "string") : r.type === "data" ? typeof r.mimeType == "string" : r.type === "url" : !1;
2428
2428
  }
2429
- function Ga(e) {
2430
- return Array.isArray(e) && e.length > 0 && e.every(Wa);
2431
- }
2432
2429
  function Ka(e) {
2433
- return e && typeof e == "object" && "error" in e && typeof e.error == "string" ? e.error : typeof e == "string" ? e : "Tool execution failed";
2430
+ return Array.isArray(e) && e.length > 0 && e.every(Ga);
2434
2431
  }
2435
2432
  function qa(e) {
2436
- return typeof e == "string" || Ga(e) ? e : JSON.stringify(e);
2433
+ return e && typeof e == "object" && "error" in e && typeof e.error == "string" ? e.error : typeof e == "string" ? e : "Tool execution failed";
2434
+ }
2435
+ function Ja(e) {
2436
+ return typeof e == "string" || Ka(e) ? e : JSON.stringify(e);
2437
2437
  }
2438
2438
  //#endregion
2439
2439
  //#region node_modules/@tanstack/ai/dist/esm/utilities/subagent-wire.js
2440
- function Ja(e) {
2440
+ function Ya(e) {
2441
2441
  return typeof e == "object" && !!e && !Array.isArray(e);
2442
2442
  }
2443
- function Ya(e) {
2444
- if (!Ja(e) || "parts" in e) return;
2443
+ function Xa(e) {
2444
+ if (!Ya(e) || "parts" in e) return;
2445
2445
  let t = e.subagentRunId;
2446
2446
  return typeof t == "string" && t !== "" ? t : void 0;
2447
2447
  }
2448
- function Xa(e) {
2449
- if (!Ja(e) || !Ja(e.metadata)) return;
2448
+ function Za(e) {
2449
+ if (!Ya(e) || !Ya(e.metadata)) return;
2450
2450
  let t = e.metadata.tanstack;
2451
- if (!Ja(t) || !Ja(t.subagent)) return;
2451
+ if (!Ya(t) || !Ya(t.subagent)) return;
2452
2452
  let { name: n, status: r, error: i, interruptIds: a } = t.subagent;
2453
- if (typeof n != "string" || !Za(r)) return;
2453
+ if (typeof n != "string" || !Qa(r)) return;
2454
2454
  let { description: o, parentSubagentRunId: s, parentToolCallId: c, metadata: l, placeholder: u } = t.subagent;
2455
2455
  return {
2456
2456
  name: n,
2457
2457
  status: r,
2458
2458
  ...typeof o == "string" && { description: o },
2459
- ...Ja(i) && typeof i.message == "string" && { error: {
2459
+ ...Ya(i) && typeof i.message == "string" && { error: {
2460
2460
  message: i.message,
2461
2461
  ...typeof i.code == "string" && { code: i.code }
2462
2462
  } },
2463
2463
  ...Array.isArray(a) && { interruptIds: a.filter((e) => typeof e == "string") },
2464
2464
  ...typeof s == "string" && { parentSubagentRunId: s },
2465
2465
  ...typeof c == "string" && { parentToolCallId: c },
2466
- ...Ja(l) && { metadata: l },
2466
+ ...Ya(l) && { metadata: l },
2467
2467
  ...u === !0 && { placeholder: !0 }
2468
2468
  };
2469
2469
  }
2470
- function Za(e) {
2470
+ function Qa(e) {
2471
2471
  return e === "running" || e === "finished" || e === "error" || e === "suspended";
2472
2472
  }
2473
- function Qa(e) {
2474
- if (!Ja(e)) return e;
2475
- let { subagentRunId: t, ...n } = e, r = Ja(n.metadata) ? n.metadata : void 0, i = Ja(r?.tanstack) ? r.tanstack : void 0;
2473
+ function $a(e) {
2474
+ if (!Ya(e)) return e;
2475
+ let { subagentRunId: t, ...n } = e, r = Ya(n.metadata) ? n.metadata : void 0, i = Ya(r?.tanstack) ? r.tanstack : void 0;
2476
2476
  if (!r || !i || !("subagent" in i)) return n;
2477
2477
  let { subagent: a, ...o } = i;
2478
2478
  return {
@@ -2483,11 +2483,11 @@ function Qa(e) {
2483
2483
  }
2484
2484
  };
2485
2485
  }
2486
- function $a(e) {
2486
+ function eo(e) {
2487
2487
  let t = /* @__PURE__ */ new Map();
2488
2488
  for (let n of e) {
2489
- let e = Ya(n);
2490
- e !== void 0 && !t.has(e) && t.set(e, Xa(n)?.parentSubagentRunId);
2489
+ let e = Xa(n);
2490
+ e !== void 0 && !t.has(e) && t.set(e, Za(n)?.parentSubagentRunId);
2491
2491
  }
2492
2492
  let n = (e) => {
2493
2493
  let n = e;
@@ -2499,7 +2499,7 @@ function $a(e) {
2499
2499
  return n;
2500
2500
  }, r = [], i = /* @__PURE__ */ new Map();
2501
2501
  for (let t of e) {
2502
- let e = Ya(t);
2502
+ let e = Xa(t);
2503
2503
  if (e === void 0) {
2504
2504
  r.push(t);
2505
2505
  continue;
@@ -2517,8 +2517,8 @@ function $a(e) {
2517
2517
  o.messages.push(t);
2518
2518
  continue;
2519
2519
  }
2520
- let s = Xa(t);
2521
- s && (o.info = s), s?.placeholder || o.messages.push(Qa(t));
2520
+ let s = Za(t);
2521
+ s && (o.info = s), s?.placeholder || o.messages.push($a(t));
2522
2522
  }
2523
2523
  return {
2524
2524
  top: r,
@@ -2527,158 +2527,158 @@ function $a(e) {
2527
2527
  }
2528
2528
  //#endregion
2529
2529
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/messages.js
2530
- function eo(e) {
2530
+ function to(e) {
2531
2531
  return typeof e == "object" && !!e && !Array.isArray(e);
2532
2532
  }
2533
- function to(e) {
2533
+ function no(e) {
2534
2534
  return e.type === "text" || e.type === "image" || e.type === "audio" || e.type === "video" || e.type === "document";
2535
2535
  }
2536
- function no(e) {
2536
+ function ro(e) {
2537
2537
  try {
2538
2538
  return JSON.stringify(e) ?? "";
2539
2539
  } catch {
2540
2540
  return "";
2541
2541
  }
2542
2542
  }
2543
- function ro(e) {
2543
+ function io(e) {
2544
2544
  return typeof e == "string" && e !== "" ? e : void 0;
2545
2545
  }
2546
- function io(e) {
2546
+ function ao(e) {
2547
2547
  if ("encryptedValue" in e) {
2548
- let t = ro(e.encryptedValue);
2548
+ let t = io(e.encryptedValue);
2549
2549
  if (t !== void 0) return t;
2550
2550
  }
2551
- return ro(Q(e)?.signature);
2551
+ return io(X(e)?.signature);
2552
2552
  }
2553
- function ao(e) {
2553
+ function oo(e) {
2554
2554
  return e.length === 0 ? null : e.every((e) => e.type === "text") ? e.map((e) => e.content).join("") || null : e;
2555
2555
  }
2556
- function oo(e) {
2556
+ function so(e) {
2557
2557
  return e == null ? "" : typeof e == "string" ? e : e.filter((e) => e.type === "text").map((e) => e.content).join("");
2558
2558
  }
2559
- function so(e) {
2559
+ function co(e) {
2560
2560
  let t = [];
2561
2561
  for (let n of e) if (n.type === "text" && n.content !== "") t.push(n.content);
2562
2562
  else if (n.type === "structured-output" && n.status === "complete" && n.raw !== "") t.push(n.raw);
2563
2563
  else if (n.type === "subagent") {
2564
- let e = co(n);
2564
+ let e = lo(n);
2565
2565
  e !== "" && t.push(e);
2566
2566
  }
2567
2567
  return t.join("\n\n");
2568
2568
  }
2569
- function co(e) {
2569
+ function lo(e) {
2570
2570
  let t = [];
2571
2571
  for (let n of e.subagent.messages) {
2572
2572
  if (!("parts" in n)) continue;
2573
- let e = so(n.parts).trim();
2573
+ let e = co(n.parts).trim();
2574
2574
  e !== "" && t.push(e);
2575
2575
  }
2576
2576
  return t.length === 0 ? "" : `${e.subagent.name}:\n${t.join("\n\n")}`;
2577
2577
  }
2578
- function lo(e) {
2579
- return Array.isArray(e) ? e : oo(e);
2580
- }
2581
2578
  function uo(e) {
2579
+ return Array.isArray(e) ? e : so(e);
2580
+ }
2581
+ function fo(e) {
2582
2582
  if (!("role" in e) || e.role !== "tool") return e;
2583
- let t = e, n = Q(t)?.toolResult;
2584
- if (!eo(n) || "content" in n && !Ga(n.content)) return e;
2583
+ let t = e, n = X(t)?.toolResult;
2584
+ if (!to(n) || "content" in n && !Ka(n.content)) return e;
2585
2585
  let r = { ...e };
2586
2586
  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") {
2587
- let e = fo(n.createdAt);
2587
+ let e = po(n.createdAt);
2588
2588
  e && Reflect.set(r, "createdAt", e);
2589
2589
  }
2590
- Ga(n.content) && Reflect.set(r, "content", n.content);
2590
+ Ka(n.content) && Reflect.set(r, "content", n.content);
2591
2591
  let i = Reflect.get(t, "metadata");
2592
- if (eo(i)) {
2592
+ if (to(i)) {
2593
2593
  let e = i.tanstack;
2594
- if (eo(e)) {
2594
+ if (to(e)) {
2595
2595
  let { toolResult: t, ...n } = e, a = { ...i };
2596
2596
  Object.keys(n).length ? a.tanstack = n : delete a.tanstack, Object.keys(a).length ? Reflect.set(r, "metadata", a) : Reflect.deleteProperty(r, "metadata");
2597
2597
  }
2598
2598
  }
2599
2599
  return r;
2600
2600
  }
2601
- function fo(e) {
2601
+ function po(e) {
2602
2602
  if (e instanceof Date) return Number.isNaN(e.getTime()) ? void 0 : e;
2603
2603
  if (typeof e != "string") return;
2604
2604
  let t = new Date(e);
2605
2605
  return Number.isNaN(t.getTime()) ? void 0 : t;
2606
2606
  }
2607
- function po(e) {
2607
+ function mo(e) {
2608
2608
  if (e.type !== "tool-result") return e;
2609
- let t = fo(e.createdAt), { createdAt: n, ...r } = e;
2609
+ let t = po(e.createdAt), { createdAt: n, ...r } = e;
2610
2610
  return t === void 0 ? r : {
2611
2611
  ...r,
2612
2612
  createdAt: t
2613
2613
  };
2614
2614
  }
2615
- function mo(e) {
2616
- return fo(Q(e)?.createdAt);
2617
- }
2618
2615
  function ho(e) {
2619
- let t = fo(e.createdAt);
2620
- return t === void 0 ? {} : { createdAt: t };
2616
+ return po(X(e)?.createdAt);
2621
2617
  }
2622
2618
  function go(e) {
2623
- return e.name === void 0 ? {} : { name: e.name };
2619
+ let t = po(e.createdAt);
2620
+ return t === void 0 ? {} : { createdAt: t };
2624
2621
  }
2625
2622
  function _o(e) {
2623
+ return e.name === void 0 ? {} : { name: e.name };
2624
+ }
2625
+ function vo(e) {
2626
2626
  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;
2627
2627
  let t = e.resource;
2628
2628
  return "uri" in t && typeof t.uri == "string" && "mimeType" in t && typeof t.mimeType == "string";
2629
2629
  }
2630
- function vo(e) {
2630
+ function yo(e) {
2631
2631
  return `${e.toolCallId}\0${e.toolName}\0${e.resource.uri}`;
2632
2632
  }
2633
- function yo(e, t) {
2633
+ function bo(e, t) {
2634
2634
  if (t.length === 0) return e;
2635
- let n = new Set(e.parts.filter(_o).map((e) => vo(e))), r = t.filter((e) => !n.has(vo(e)));
2635
+ let n = new Set(e.parts.filter(vo).map((e) => yo(e))), r = t.filter((e) => !n.has(yo(e)));
2636
2636
  return r.length === 0 ? e : {
2637
2637
  ...e,
2638
2638
  parts: [...e.parts, ...r]
2639
2639
  };
2640
2640
  }
2641
- function bo(e) {
2642
- let t = e.parts.filter(_o), n = e.metadata ?? {}, r = Q(e), i = {};
2641
+ function xo(e) {
2642
+ let t = e.parts.filter(vo), n = e.metadata ?? {}, r = X(e), i = {};
2643
2643
  r?.model !== void 0 && (i.model = r.model), r?.runId !== void 0 && (i.runId = r.runId), r?.signature !== void 0 && (i.signature = r.signature), t.length > 0 && (i.uiResources = t);
2644
2644
  let a = { ...n };
2645
2645
  return Object.keys(i).length > 0 ? a.tanstack = i : delete a.tanstack, Object.keys(a).length > 0 ? a : void 0;
2646
2646
  }
2647
- function xo(e) {
2648
- return e.role === "system" ? [] : e.role === "assistant" ? To(e) : [So(e)];
2649
- }
2650
2647
  function So(e) {
2648
+ return e.role === "system" ? [] : e.role === "assistant" ? Eo(e) : [Co(e)];
2649
+ }
2650
+ function Co(e) {
2651
2651
  let t = [];
2652
- for (let n of e.parts) to(n) && t.push(n);
2652
+ for (let n of e.parts) no(n) && t.push(n);
2653
2653
  return {
2654
2654
  id: e.id,
2655
2655
  role: e.role,
2656
- content: ao(t),
2656
+ content: oo(t),
2657
+ ..._o(e),
2657
2658
  ...go(e),
2658
- ...ho(e),
2659
2659
  ...e.metadata !== void 0 && { metadata: e.metadata }
2660
2660
  };
2661
2661
  }
2662
- function Co() {
2662
+ function wo() {
2663
2663
  return {
2664
2664
  contentParts: [],
2665
2665
  toolCalls: []
2666
2666
  };
2667
2667
  }
2668
- function wo(e) {
2668
+ function To(e) {
2669
2669
  return e.state === "input-complete" || e.state === "complete" || e.state === "approval-requested" || e.state === "approval-responded" || e.state === "error" || e.output !== void 0;
2670
2670
  }
2671
- function To(e) {
2672
- let t = [], n = Co(), r = [], i = /* @__PURE__ */ new Set(), a = {
2671
+ function Eo(e) {
2672
+ let t = [], n = wo(), r = [], i = /* @__PURE__ */ new Set(), a = {
2673
2673
  id: e.id,
2674
- ...go(e),
2675
- ...ho(e)
2676
- }, o = bo(e), s = {
2674
+ ..._o(e),
2675
+ ...go(e)
2676
+ }, o = xo(e), s = {
2677
2677
  ...a,
2678
2678
  ...o !== void 0 && { metadata: o }
2679
2679
  };
2680
2680
  function c(e = !1) {
2681
- let i = ao(n.contentParts), a = i !== null, o = n.toolCalls.length > 0, c = r.length > 0;
2681
+ let i = oo(n.contentParts), a = i !== null, o = n.toolCalls.length > 0, c = r.length > 0;
2682
2682
  (e || a || o || c) && (t.push({
2683
2683
  ...s,
2684
2684
  role: "assistant",
@@ -2686,7 +2686,7 @@ function To(e) {
2686
2686
  ...o && { toolCalls: n.toolCalls },
2687
2687
  ...c && { thinking: r },
2688
2688
  ...n.structuredOutput && { structuredOutput: n.structuredOutput }
2689
- }), r = []), n = Co();
2689
+ }), r = []), n = wo();
2690
2690
  }
2691
2691
  for (let a of e.parts) switch (a.type) {
2692
2692
  case "text":
@@ -2697,7 +2697,7 @@ function To(e) {
2697
2697
  n.contentParts.push(a);
2698
2698
  break;
2699
2699
  case "tool-call":
2700
- wo(a) && n.toolCalls.push({
2700
+ To(a) && n.toolCalls.push({
2701
2701
  id: a.id,
2702
2702
  type: "function",
2703
2703
  function: {
@@ -2710,7 +2710,7 @@ function To(e) {
2710
2710
  case "tool-result":
2711
2711
  c(t.length === 0), (a.state === "complete" || a.state === "error") && !i.has(a.toolCallId) && (t.push({
2712
2712
  ...a.id !== void 0 && { id: a.id },
2713
- ...ho(a),
2713
+ ...go(a),
2714
2714
  role: "tool",
2715
2715
  content: a.content,
2716
2716
  toolCallId: a.toolCallId,
@@ -2720,14 +2720,14 @@ function To(e) {
2720
2720
  }), i.add(a.toolCallId));
2721
2721
  break;
2722
2722
  case "thinking":
2723
- (a.content || a.signature) && (n.toolCalls.some(Va) && c(), r.push({
2723
+ (a.content || a.signature) && (n.toolCalls.some(Ha) && c(), r.push({
2724
2724
  content: a.content,
2725
2725
  ...a.signature && { signature: a.signature }
2726
2726
  }));
2727
2727
  break;
2728
2728
  case "structured-output":
2729
2729
  if (a.status === "complete") {
2730
- let e = a.raw === "" ? a.data === void 0 ? "" : no(a.data) : a.raw;
2730
+ let e = a.raw === "" ? a.data === void 0 ? "" : ro(a.data) : a.raw;
2731
2731
  e !== "" && (n.contentParts.push({
2732
2732
  type: "text",
2733
2733
  content: e
@@ -2736,7 +2736,7 @@ function To(e) {
2736
2736
  break;
2737
2737
  case "ui-resource": break;
2738
2738
  case "subagent": {
2739
- let e = a.subagent.parentToolCallId === void 0 ? co(a) : "";
2739
+ let e = a.subagent.parentToolCallId === void 0 ? lo(a) : "";
2740
2740
  if (e !== "") {
2741
2741
  let t = n.contentParts.length > 0 ? "\n\n" : "";
2742
2742
  n.contentParts.push({
@@ -2750,7 +2750,7 @@ function To(e) {
2750
2750
  c();
2751
2751
  for (let n of e.parts) if (n.type === "tool-call" && (n.output !== void 0 && !i.has(n.id) && (t.push({
2752
2752
  role: "tool",
2753
- content: qa(n.output),
2753
+ content: Ja(n.output),
2754
2754
  toolCallId: n.id
2755
2755
  }), i.add(n.id)), n.output === void 0 && n.state === "approval-responded" && n.approval?.approved !== void 0 && !i.has(n.id))) {
2756
2756
  let e = n.approval.approved;
@@ -2770,14 +2770,14 @@ function To(e) {
2770
2770
  content: null
2771
2771
  }), t;
2772
2772
  }
2773
- function Eo(e, t) {
2774
- let n = [], r = fo(e.createdAt);
2773
+ function Do(e, t) {
2774
+ let n = [], r = po(e.createdAt);
2775
2775
  if (e.role === "assistant" && e.thinking?.length) for (let t of e.thinking) (t.content || t.signature) && n.push({
2776
2776
  type: "thinking",
2777
2777
  content: t.content,
2778
2778
  ...t.signature && { signature: t.signature }
2779
2779
  });
2780
- let i = e.structuredOutput ?? ko(Q(e)?.structuredOutput);
2780
+ let i = e.structuredOutput ?? Ao(X(e)?.structuredOutput);
2781
2781
  if (e.role === "assistant" && i) {
2782
2782
  if (typeof e.content == "string" && e.content && e.content !== i.raw) {
2783
2783
  let t = i.raw, r = t !== "" && e.content.endsWith(t) ? e.content.slice(0, -t.length) : e.content;
@@ -2790,7 +2790,7 @@ function Eo(e, t) {
2790
2790
  } else if (e.role === "tool" && e.toolCallId) n.push({
2791
2791
  type: "tool-result",
2792
2792
  toolCallId: e.toolCallId,
2793
- content: lo(e.content),
2793
+ content: uo(e.content),
2794
2794
  state: e.error === void 0 ? "complete" : "error",
2795
2795
  ...e.id !== void 0 && { id: e.id },
2796
2796
  ...e.name !== void 0 && { name: e.name },
@@ -2800,7 +2800,7 @@ function Eo(e, t) {
2800
2800
  });
2801
2801
  else if (Array.isArray(e.content)) for (let t of e.content) n.push(t);
2802
2802
  else {
2803
- let t = oo(e.content);
2803
+ let t = so(e.content);
2804
2804
  t && n.push({
2805
2805
  type: "text",
2806
2806
  content: t
@@ -2824,49 +2824,49 @@ function Eo(e, t) {
2824
2824
  });
2825
2825
  }
2826
2826
  let a = {
2827
- id: t || No(),
2827
+ id: t || Po(),
2828
2828
  role: e.role === "tool" ? "assistant" : e.role,
2829
2829
  parts: n,
2830
- ...go(e),
2830
+ ..._o(e),
2831
2831
  ...r !== void 0 && { createdAt: r },
2832
2832
  ...e.metadata !== void 0 && { metadata: e.metadata }
2833
- }, o = Q(e)?.uiResources;
2834
- return yo(a, Array.isArray(o) ? o.filter(_o) : []);
2833
+ }, o = X(e)?.uiResources;
2834
+ return bo(a, Array.isArray(o) ? o.filter(vo) : []);
2835
2835
  }
2836
- function Do(e) {
2837
- if ("parts" in e) return Oo(e, {
2836
+ function Oo(e) {
2837
+ if ("parts" in e) return ko(e, {
2838
2838
  ...e,
2839
- id: e.id || No()
2839
+ id: e.id || Po()
2840
2840
  });
2841
- let t = e.id || No();
2841
+ let t = e.id || Po();
2842
2842
  switch (e.role) {
2843
- case "user": return Oo(e, {
2843
+ case "user": return ko(e, {
2844
2844
  id: t,
2845
2845
  role: "user",
2846
- parts: Ao(e.content)
2846
+ parts: jo(e.content)
2847
2847
  });
2848
2848
  case "assistant": {
2849
- let n = Q(e), r = n?.toolCallMetadata, i = ko(n?.structuredOutput), a = e.toolCalls?.map((e) => {
2849
+ let n = X(e), r = n?.toolCallMetadata, i = Ao(n?.structuredOutput), a = e.toolCalls?.map((e) => {
2850
2850
  let t = typeof r == "object" && r ? r[e.id] : void 0;
2851
2851
  return t === void 0 ? e : {
2852
2852
  ...e,
2853
2853
  metadata: t
2854
2854
  };
2855
2855
  });
2856
- return Oo(e, Eo({
2856
+ return ko(e, Do({
2857
2857
  role: "assistant",
2858
2858
  content: e.content ?? null,
2859
- ...go(e),
2859
+ ..._o(e),
2860
2860
  ...a && { toolCalls: a },
2861
2861
  ...i && { structuredOutput: i }
2862
2862
  }, t));
2863
2863
  }
2864
2864
  case "tool": {
2865
- e = uo(e);
2866
- let n = fo("createdAt" in e ? e.createdAt : void 0) ?? mo(e);
2867
- return Oo(e, Eo({
2865
+ e = fo(e);
2866
+ let n = po("createdAt" in e ? e.createdAt : void 0) ?? ho(e);
2867
+ return ko(e, Do({
2868
2868
  role: "tool",
2869
- content: Ga(e.content) ? e.content : jo(e.content),
2869
+ content: Ka(e.content) ? e.content : Mo(e.content),
2870
2870
  toolCallId: e.toolCallId,
2871
2871
  ..."name" in e && typeof e.name == "string" ? { name: e.name } : {},
2872
2872
  ..."id" in e && typeof e.id == "string" ? { id: e.id } : {},
@@ -2876,7 +2876,7 @@ function Do(e) {
2876
2876
  }, t));
2877
2877
  }
2878
2878
  case "system":
2879
- case "developer": return Oo(e, {
2879
+ case "developer": return ko(e, {
2880
2880
  id: t,
2881
2881
  role: "system",
2882
2882
  parts: e.content ? [{
@@ -2885,8 +2885,8 @@ function Do(e) {
2885
2885
  }] : []
2886
2886
  });
2887
2887
  case "reasoning": {
2888
- let n = io(e), r = typeof e.content == "string" ? e.content : "";
2889
- return Oo(e, {
2888
+ let n = ao(e), r = typeof e.content == "string" ? e.content : "";
2889
+ return ko(e, {
2890
2890
  id: t,
2891
2891
  role: "assistant",
2892
2892
  parts: r || n !== void 0 ? [{
@@ -2896,15 +2896,15 @@ function Do(e) {
2896
2896
  }] : []
2897
2897
  });
2898
2898
  }
2899
- default: return Oo(e, {
2899
+ default: return ko(e, {
2900
2900
  id: t,
2901
2901
  role: "assistant",
2902
2902
  parts: []
2903
2903
  });
2904
2904
  }
2905
2905
  }
2906
- function Oo(e, t) {
2907
- let n = t.parts.map((e) => po(e));
2906
+ function ko(e, t) {
2907
+ let n = t.parts.map((e) => mo(e));
2908
2908
  n !== t.parts && (t = {
2909
2909
  ...t,
2910
2910
  parts: n
@@ -2920,7 +2920,7 @@ function Oo(e, t) {
2920
2920
  metadata: a
2921
2921
  });
2922
2922
  }
2923
- let o = fo(i.createdAt) ?? (a === void 0 ? void 0 : mo(a));
2923
+ let o = po(i.createdAt) ?? (a === void 0 ? void 0 : ho(a));
2924
2924
  if (o !== void 0 && !Object.is(o, i.createdAt)) i = {
2925
2925
  ...i,
2926
2926
  createdAt: o
@@ -2929,10 +2929,10 @@ function Oo(e, t) {
2929
2929
  let { createdAt: e, ...t } = i;
2930
2930
  i = t;
2931
2931
  }
2932
- let s = Q(a)?.uiResources, c = Array.isArray(s) ? s.filter(_o) : [];
2933
- return yo(i, c);
2932
+ let s = X(a)?.uiResources, c = Array.isArray(s) ? s.filter(vo) : [];
2933
+ return bo(i, c);
2934
2934
  }
2935
- function ko(e) {
2935
+ function Ao(e) {
2936
2936
  if (!(e == null || e.status !== "streaming" && e.status !== "complete" && e.status !== "error" || typeof e.raw != "string")) return {
2937
2937
  type: "structured-output",
2938
2938
  status: e.status,
@@ -2943,14 +2943,14 @@ function ko(e) {
2943
2943
  ...e.errorMessage === void 0 ? {} : { errorMessage: e.errorMessage }
2944
2944
  };
2945
2945
  }
2946
- function Ao(e) {
2947
- let t = jo(e);
2946
+ function jo(e) {
2947
+ let t = Mo(e);
2948
2948
  return typeof t == "string" ? t ? [{
2949
2949
  type: "text",
2950
2950
  content: t
2951
2951
  }] : [] : t;
2952
2952
  }
2953
- function jo(e) {
2953
+ function Mo(e) {
2954
2954
  return typeof e == "string" ? e : e.map((e) => {
2955
2955
  if (e.type !== "text") return e;
2956
2956
  let { text: t, ...n } = e;
@@ -2960,33 +2960,33 @@ function jo(e) {
2960
2960
  };
2961
2961
  });
2962
2962
  }
2963
- function Mo(e, t) {
2963
+ function No(e, t) {
2964
2964
  if ("parts" in e) {
2965
- let n = e.parts.map((e) => po(e));
2965
+ let n = e.parts.map((e) => mo(e));
2966
2966
  return {
2967
2967
  ...e,
2968
2968
  parts: n,
2969
2969
  id: e.id || t(),
2970
- createdAt: fo(e.createdAt) ?? /* @__PURE__ */ new Date()
2970
+ createdAt: po(e.createdAt) ?? /* @__PURE__ */ new Date()
2971
2971
  };
2972
2972
  }
2973
2973
  return {
2974
- ...Eo(e, t()),
2975
- createdAt: fo(e.createdAt) ?? /* @__PURE__ */ new Date()
2974
+ ...Do(e, t()),
2975
+ createdAt: po(e.createdAt) ?? /* @__PURE__ */ new Date()
2976
2976
  };
2977
2977
  }
2978
- function No() {
2978
+ function Po() {
2979
2979
  return `msg-${Date.now()}-${Math.random().toString(36).substring(7)}`;
2980
2980
  }
2981
2981
  //#endregion
2982
2982
  //#region node_modules/@tanstack/ai/dist/esm/utilities/ag-ui-wire.js
2983
- function Po(e) {
2983
+ function Fo(e) {
2984
2984
  return typeof e == "object" && !!e && !Array.isArray(e);
2985
2985
  }
2986
- function Fo(e, t, n, r, i = !1) {
2987
- let a = Po(e) ? e : {}, o = Po(a.tanstack) ? { ...a.tanstack } : {};
2986
+ function Io(e, t, n, r, i = !1) {
2987
+ let a = Fo(e) ? e : {}, o = Fo(a.tanstack) ? { ...a.tanstack } : {};
2988
2988
  i && delete o.uiResources;
2989
- let s = fo(t), c = {
2989
+ let s = po(t), c = {
2990
2990
  ...n === void 0 ? {} : { id: n },
2991
2991
  ...s && { createdAt: s.toISOString() },
2992
2992
  ...Array.isArray(r) && { content: r }
@@ -2999,12 +2999,12 @@ function Fo(e, t, n, r, i = !1) {
2999
2999
  };
3000
3000
  return Object.keys(l).length ? l : void 0;
3001
3001
  }
3002
- function Io(e, t) {
3002
+ function Lo(e, t) {
3003
3003
  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();
3004
3004
  for (let t of e) t.role === "assistant" && t.id !== void 0 && a.add(t.id);
3005
3005
  for (let o of e) {
3006
3006
  if (!("parts" in o) && o.role === "tool" && o.toolCallId) {
3007
- let e = Yo(Zo(o.id, o.toolCallId, a), r), t = Fo(o.metadata, o.createdAt, o.id, o.content);
3007
+ let e = Xo(Qo(o.id, o.toolCallId, a), r), t = Io(o.metadata, o.createdAt, o.id, o.content);
3008
3008
  n.push({
3009
3009
  role: "tool",
3010
3010
  id: e,
@@ -3016,20 +3016,20 @@ function Io(e, t) {
3016
3016
  });
3017
3017
  continue;
3018
3018
  }
3019
- let e = "parts" in o ? o : Eo(o, o.id), s = e.parts;
3019
+ let e = "parts" in o ? o : Do(o, o.id), s = e.parts;
3020
3020
  if (r.add(e.id), o.role === "system") {
3021
- n.push(Lo(e, "system", { content: s.length > 0 ? Vo(s) : o.content ?? "" }, s, i));
3021
+ n.push(Ro(e, "system", { content: s.length > 0 ? Ho(s) : o.content ?? "" }, s, i));
3022
3022
  continue;
3023
3023
  }
3024
3024
  if (o.role === "user") {
3025
- n.push(Lo(e, "user", { content: s.length > 0 ? Wo(s) : o.content ?? "" }, s, i));
3025
+ n.push(Ro(e, "user", { content: s.length > 0 ? Go(s) : o.content ?? "" }, s, i));
3026
3026
  continue;
3027
3027
  }
3028
3028
  let c = {
3029
3029
  thinking: [],
3030
3030
  parts: []
3031
3031
  }, l = [c];
3032
- for (let e of s) e.type === "thinking" ? c.parts.some((e) => e.type === "tool-call" && Va(e)) ? (c = {
3032
+ for (let e of s) e.type === "thinking" ? c.parts.some((e) => e.type === "tool-call" && Ha(e)) ? (c = {
3033
3033
  thinking: [e],
3034
3034
  parts: []
3035
3035
  }, l.push(c)) : c.thinking.push(e) : c.parts.push(e);
@@ -3037,23 +3037,23 @@ function Io(e, t) {
3037
3037
  for (let i of t.thinking) {
3038
3038
  let t = {
3039
3039
  role: "reasoning",
3040
- id: Xo(qo(e.id, i), r),
3040
+ id: Zo(Jo(e.id, i), r),
3041
3041
  content: i.content
3042
3042
  };
3043
3043
  i.signature && (t.encryptedValue = i.signature), n.push(t);
3044
3044
  }
3045
- let o = Vo(t.parts), s = Ko(t.parts), c = a === 0 ? e : {
3045
+ let o = Ho(t.parts), s = qo(t.parts), c = a === 0 ? e : {
3046
3046
  ...e,
3047
- id: Xo(`${e.id}-segment-${a}`, r)
3047
+ id: Zo(`${e.id}-segment-${a}`, r)
3048
3048
  };
3049
- n.push(Lo(c, "assistant", {
3049
+ n.push(Ro(c, "assistant", {
3050
3050
  ...o !== "" && { content: o },
3051
3051
  ...s && { toolCalls: s }
3052
3052
  }, t.parts, i));
3053
3053
  });
3054
3054
  let u = new Set(s.flatMap((e) => e.type === "tool-result" ? [e.toolCallId] : []));
3055
3055
  for (let e of s) if (e.type === "tool-result") {
3056
- let t = Yo(e.id ?? Jo(e.toolCallId), r), i = Fo(e.metadata, e.createdAt, e.id, e.content, !0);
3056
+ let t = Xo(e.id ?? Yo(e.toolCallId), r), i = Io(e.metadata, e.createdAt, e.id, e.content, !0);
3057
3057
  n.push({
3058
3058
  role: "tool",
3059
3059
  id: t,
@@ -3070,21 +3070,21 @@ function Io(e, t) {
3070
3070
  approved: t,
3071
3071
  ...t && { pendingExecution: !0 },
3072
3072
  message: t ? "User approved this action" : "User denied this action"
3073
- }) : qa(e.output), a = typeof i == "string" ? i : JSON.stringify(i);
3073
+ }) : Ja(e.output), a = typeof i == "string" ? i : JSON.stringify(i);
3074
3074
  n.push({
3075
3075
  role: "tool",
3076
- id: Yo(Jo(e.id), r),
3076
+ id: Xo(Yo(e.id), r),
3077
3077
  toolCallId: e.id,
3078
3078
  content: a,
3079
- metadata: Fo(void 0, void 0, void 0, i)
3079
+ metadata: Io(void 0, void 0, void 0, i)
3080
3080
  });
3081
3081
  }
3082
- for (let e of s) e.type === "subagent" && n.push(...Ho(e, t));
3082
+ for (let e of s) e.type === "subagent" && n.push(...Uo(e, t));
3083
3083
  }
3084
3084
  return n;
3085
3085
  }
3086
- function Lo(e, t, n, r, i) {
3087
- let a = Ro(e, r, i), o = {
3086
+ function Ro(e, t, n, r, i) {
3087
+ let a = zo(e, r, i), o = {
3088
3088
  id: e.id,
3089
3089
  ...e.name !== void 0 && { name: e.name },
3090
3090
  ...a !== void 0 && { metadata: a }
@@ -3104,12 +3104,12 @@ function Lo(e, t, n, r, i) {
3104
3104
  ...n.toolCalls !== void 0 && { toolCalls: n.toolCalls }
3105
3105
  };
3106
3106
  }
3107
- function Ro(e, t, n) {
3108
- let r = { ...e.metadata ?? {} }, i = Q(e), a = {};
3107
+ function zo(e, t, n) {
3108
+ let r = { ...e.metadata ?? {} }, i = X(e), a = {};
3109
3109
  i?.model !== void 0 && (a.model = i.model), i?.runId !== void 0 && (a.runId = i.runId), i?.signature !== void 0 && (a.signature = i.signature);
3110
- let o = fo(e.createdAt);
3110
+ let o = po(e.createdAt);
3111
3111
  o !== void 0 && (a.createdAt = o.toISOString());
3112
- let s = zo(t, n);
3112
+ let s = Bo(t, n);
3113
3113
  s && (a.structuredOutput = s);
3114
3114
  let c = {};
3115
3115
  for (let e of t) e.type === "tool-call" && e.metadata !== void 0 && (c[e.id] = e.metadata);
@@ -3117,10 +3117,10 @@ function Ro(e, t, n) {
3117
3117
  let l = t.filter((e) => e.type === "ui-resource");
3118
3118
  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;
3119
3119
  }
3120
- function zo(e, t) {
3121
- for (let n of e) if (n.type === "structured-output" && (t || n.status !== "complete")) return Bo(n, t);
3122
- }
3123
3120
  function Bo(e, t) {
3121
+ for (let n of e) if (n.type === "structured-output" && (t || n.status !== "complete")) return Vo(n, t);
3122
+ }
3123
+ function Vo(e, t) {
3124
3124
  return {
3125
3125
  status: e.status,
3126
3126
  raw: e.raw,
@@ -3130,12 +3130,12 @@ function Bo(e, t) {
3130
3130
  ...e.errorMessage !== void 0 && { errorMessage: e.errorMessage }
3131
3131
  };
3132
3132
  }
3133
- function Vo(e) {
3133
+ function Ho(e) {
3134
3134
  let t = [];
3135
3135
  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);
3136
3136
  return t.join("");
3137
3137
  }
3138
- function Ho(e, t) {
3138
+ function Uo(e, t) {
3139
3139
  let { subagent: n } = e, r = {
3140
3140
  name: n.name,
3141
3141
  status: n.status,
@@ -3145,27 +3145,27 @@ function Ho(e, t) {
3145
3145
  ...n.parentSubagentRunId !== void 0 && { parentSubagentRunId: n.parentSubagentRunId },
3146
3146
  ...n.parentToolCallId !== void 0 && { parentToolCallId: n.parentToolCallId },
3147
3147
  ...n.metadata !== void 0 && { metadata: n.metadata }
3148
- }, i = Io(n.messages, t), a = i.some((e) => Ya(e) === void 0);
3148
+ }, i = Lo(n.messages, t), a = i.some((e) => Xa(e) === void 0);
3149
3149
  return (a ? i : [{
3150
3150
  id: `subagent:${n.id}`,
3151
3151
  role: "assistant"
3152
3152
  }, ...i]).map((e, t) => {
3153
- let i = Ya(e);
3153
+ let i = Xa(e);
3154
3154
  if (i !== void 0) {
3155
- let t = Xa(e);
3156
- return !t || t.parentSubagentRunId !== void 0 ? e : Uo(e, i, {
3155
+ let t = Za(e);
3156
+ return !t || t.parentSubagentRunId !== void 0 ? e : Wo(e, i, {
3157
3157
  ...t,
3158
3158
  parentSubagentRunId: n.id
3159
3159
  });
3160
3160
  }
3161
- return Uo(e, n.id, !a && t === 0 ? {
3161
+ return Wo(e, n.id, !a && t === 0 ? {
3162
3162
  ...r,
3163
3163
  placeholder: !0
3164
3164
  } : r);
3165
3165
  });
3166
3166
  }
3167
- function Uo(e, t, n) {
3168
- let r = Po(e.metadata) ? e.metadata : {}, i = Po(r.tanstack) ? r.tanstack : {};
3167
+ function Wo(e, t, n) {
3168
+ let r = Fo(e.metadata) ? e.metadata : {}, i = Fo(r.tanstack) ? r.tanstack : {};
3169
3169
  return {
3170
3170
  ...e,
3171
3171
  subagentRunId: t,
@@ -3178,8 +3178,8 @@ function Uo(e, t, n) {
3178
3178
  }
3179
3179
  };
3180
3180
  }
3181
- function Wo(e) {
3182
- if (!e.some((e) => e.type === "image" || e.type === "audio" || e.type === "video" || e.type === "document")) return Vo(e);
3181
+ function Go(e) {
3182
+ if (!e.some((e) => e.type === "image" || e.type === "audio" || e.type === "video" || e.type === "document")) return Ho(e);
3183
3183
  let t = [];
3184
3184
  for (let n of e) n.type === "text" ? t.push({
3185
3185
  type: "text",
@@ -3187,15 +3187,15 @@ function Wo(e) {
3187
3187
  }) : (n.type === "image" || n.type === "audio" || n.type === "video" || n.type === "document") && t.push(n);
3188
3188
  return t;
3189
3189
  }
3190
- function Go(e) {
3190
+ function Ko(e) {
3191
3191
  if (typeof e != "object" || !e || Array.isArray(e) || !("thoughtSignature" in e)) return;
3192
3192
  let t = e.thoughtSignature;
3193
3193
  return typeof t == "string" && t !== "" ? t : void 0;
3194
3194
  }
3195
- function Ko(e) {
3195
+ function qo(e) {
3196
3196
  let t = [];
3197
3197
  for (let n of e) if (n.type === "tool-call") {
3198
- let e = Go(n.metadata);
3198
+ let e = Ko(n.metadata);
3199
3199
  t.push({
3200
3200
  id: n.id,
3201
3201
  type: "function",
@@ -3208,82 +3208,82 @@ function Ko(e) {
3208
3208
  }
3209
3209
  return t.length > 0 ? t : void 0;
3210
3210
  }
3211
- function qo(e, t) {
3212
- return `${e}-reasoning-${t.id ?? Qo(t.content)}`;
3211
+ function Jo(e, t) {
3212
+ return `${e}-reasoning-${t.id ?? $o(t.content)}`;
3213
3213
  }
3214
- function Jo(e) {
3214
+ function Yo(e) {
3215
3215
  return `tool-${e}`;
3216
3216
  }
3217
- function Yo(e, t) {
3218
- return Xo(e, t);
3219
- }
3220
3217
  function Xo(e, t) {
3218
+ return Zo(e, t);
3219
+ }
3220
+ function Zo(e, t) {
3221
3221
  if (!t.has(e)) return t.add(e), e;
3222
3222
  let n = 2;
3223
3223
  for (; t.has(`${e}-${n}`);) n++;
3224
3224
  let r = `${e}-${n}`;
3225
3225
  return t.add(r), r;
3226
3226
  }
3227
- function Zo(e, t, n) {
3228
- let r = Jo(t);
3227
+ function Qo(e, t, n) {
3228
+ let r = Yo(t);
3229
3229
  return e === void 0 || n.has(e) ? r : e;
3230
3230
  }
3231
- function Qo(e) {
3231
+ function $o(e) {
3232
3232
  let t = 0;
3233
3233
  for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) | 0;
3234
3234
  return Math.abs(t).toString(36);
3235
3235
  }
3236
3236
  //#endregion
3237
3237
  //#region node_modules/@tanstack/ai/dist/esm/utilities/restore-inbound-chunk.js
3238
- function $o(e) {
3239
- if ((e.type === Vi.RUN_FINISHED || e.type === Vi.RUN_ERROR) && (Array.isArray(e.usage) || Ui(e.usage))) {
3240
- let t = Wi(e.usage, Q(e)?.usage);
3238
+ function es(e) {
3239
+ if ((e.type === Ui.RUN_FINISHED || e.type === Ui.RUN_ERROR) && (Array.isArray(e.usage) || Gi(e.usage))) {
3240
+ let t = Ki(e.usage, X(e)?.usage);
3241
3241
  t !== void 0 && (e.usage = t);
3242
3242
  }
3243
- if (e.type === Vi.TOOL_CALL_START && e.toolName === void 0 && e.toolCallName && (e.toolName = e.toolCallName), e.type === Vi.TOOL_CALL_END && e.input === void 0) {
3244
- let t = Q(e)?.input;
3243
+ if (e.type === Ui.TOOL_CALL_START && e.toolName === void 0 && e.toolCallName && (e.toolName = e.toolCallName), e.type === Ui.TOOL_CALL_END && e.input === void 0) {
3244
+ let t = X(e)?.input;
3245
3245
  t !== void 0 && (e.input = t);
3246
3246
  }
3247
3247
  return e;
3248
3248
  }
3249
- function es(e) {
3250
- $o(e);
3251
- let t = Q(e), n = e;
3249
+ function ts(e) {
3250
+ es(e);
3251
+ let t = X(e), n = e;
3252
3252
  if (t == null) return n;
3253
3253
  for (let [e, r] of Object.entries(t)) e !== "usage" && e !== "interruptErrors" && n[e] === void 0 && r !== void 0 && (n[e] = r);
3254
3254
  return t.interruptErrors !== void 0 && (n["tanstack:interruptErrors"] = t.interruptErrors), n;
3255
3255
  }
3256
3256
  //#endregion
3257
3257
  //#region node_modules/@tanstack/ai-event-client/dist/esm/envelope.js
3258
- function ts() {
3258
+ function ns() {
3259
3259
  let e = globalThis.crypto;
3260
3260
  return e?.randomUUID ? e.randomUUID() : Math.random().toString(36).slice(2);
3261
3261
  }
3262
- var ns;
3263
- function rs() {
3264
- return ns === void 0 ? (globalThis.__TANSTACK_AI_DEVTOOLS_RUNTIME_ID__ || (globalThis.__TANSTACK_AI_DEVTOOLS_RUNTIME_ID__ = ts()), ns = globalThis.__TANSTACK_AI_DEVTOOLS_RUNTIME_ID__, ns) : ns;
3262
+ var rs;
3263
+ function is() {
3264
+ return rs === void 0 ? (globalThis.__TANSTACK_AI_DEVTOOLS_RUNTIME_ID__ || (globalThis.__TANSTACK_AI_DEVTOOLS_RUNTIME_ID__ = ns()), rs = globalThis.__TANSTACK_AI_DEVTOOLS_RUNTIME_ID__, rs) : rs;
3265
3265
  }
3266
- var is = 0;
3267
- function as(e) {
3266
+ var as = 0;
3267
+ function os(e) {
3268
3268
  return e == null || e === "" ? "missing" : `value-${encodeURIComponent(String(e))}`;
3269
3269
  }
3270
- function os(e) {
3271
- let t = e.runtimeId ?? rs(), n = e.eventId && e.eventId.length > 0 ? e.eventId : [
3270
+ function ss(e) {
3271
+ let t = e.runtimeId ?? is(), n = e.eventId && e.eventId.length > 0 ? e.eventId : [
3272
3272
  e.source,
3273
3273
  e.eventType,
3274
- as(t),
3275
- as(e.clientId),
3276
- as(e.requestId),
3277
- as(e.streamId),
3278
- as(e.hookId),
3279
- as(e.threadId),
3280
- as(e.runId),
3281
- as(e.messageId),
3282
- as(e.toolCallId),
3283
- as(e.sequence),
3274
+ os(t),
3275
+ os(e.clientId),
3276
+ os(e.requestId),
3277
+ os(e.streamId),
3278
+ os(e.hookId),
3279
+ os(e.threadId),
3280
+ os(e.runId),
3281
+ os(e.messageId),
3282
+ os(e.toolCallId),
3283
+ os(e.sequence),
3284
3284
  e.timestamp,
3285
- rs(),
3286
- is++
3285
+ is(),
3286
+ as++
3287
3287
  ].join(":");
3288
3288
  return {
3289
3289
  ...e,
@@ -3293,7 +3293,7 @@ function os(e) {
3293
3293
  }
3294
3294
  //#endregion
3295
3295
  //#region node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js
3296
- var ss = class {
3296
+ var cs = class {
3297
3297
  #e = !0;
3298
3298
  #t;
3299
3299
  #n;
@@ -3413,20 +3413,20 @@ var ss = class {
3413
3413
  };
3414
3414
  return this.#n().addEventListener("tanstack-devtools-global", t), () => this.#n().removeEventListener("tanstack-devtools-global", t);
3415
3415
  }
3416
- }, cs = class extends ss {
3416
+ }, ls = class extends cs {
3417
3417
  constructor() {
3418
3418
  super({ pluginId: "tanstack-ai-devtools" });
3419
3419
  }
3420
- }, ls = Symbol.for("tanstack.ai.devtools.eventClient");
3421
- function us() {
3422
- let e = globalThis, t = e[ls];
3420
+ }, us = Symbol.for("tanstack.ai.devtools.eventClient");
3421
+ function ds() {
3422
+ let e = globalThis, t = e[us];
3423
3423
  if (t) return t;
3424
- let n = new cs();
3425
- return e[ls] = n, n;
3424
+ let n = new ls();
3425
+ return e[us] = n, n;
3426
3426
  }
3427
- var ds = us();
3428
- function fs(e, t) {
3429
- ds.emit(e, t);
3427
+ var fs = ds();
3428
+ function $(e, t) {
3429
+ fs.emit(e, t);
3430
3430
  }
3431
3431
  //#endregion
3432
3432
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/tools/tool-definition.js
@@ -3474,7 +3474,7 @@ function hs(e) {
3474
3474
  let t = ms(e.runId);
3475
3475
  if (t !== void 0) return t;
3476
3476
  }
3477
- return ms(Q(e)?.runId);
3477
+ return ms(X(e)?.runId);
3478
3478
  }
3479
3479
  //#endregion
3480
3480
  //#region node_modules/partial-json/dist/options.js
@@ -3829,7 +3829,7 @@ function Ms(e) {
3829
3829
  return e.some((e) => {
3830
3830
  let t = e.metadata;
3831
3831
  if (!t || typeof t != "object" || Array.isArray(t)) return !1;
3832
- let n = t[Ea];
3832
+ let n = t[Oa];
3833
3833
  return typeof n == "object" && !!n && !Array.isArray(n) && n.kind === "generic";
3834
3834
  });
3835
3835
  }
@@ -3872,7 +3872,7 @@ var Ns = class e {
3872
3872
  type: "text",
3873
3873
  content: e
3874
3874
  }] : e.map((e) => e), i = {
3875
- id: t ?? No(),
3875
+ id: t ?? Po(),
3876
3876
  role: "user",
3877
3877
  parts: r,
3878
3878
  createdAt: /* @__PURE__ */ new Date(),
@@ -3904,7 +3904,7 @@ var Ns = class e {
3904
3904
  console.warn(`[StreamProcessor] Could not find message with tool call ${e}`);
3905
3905
  return;
3906
3906
  }
3907
- let i = Ts(this.messages, e, t, n ? "error" : void 0, n), a = qa(t), o = n ? "error" : "complete";
3907
+ let i = Ts(this.messages, e, t, n ? "error" : void 0, n), a = Ja(t), o = n ? "error" : "complete";
3908
3908
  i = Cs(i, r.id, e, a, o, n), this.messages = i, this.emitMessagesChange();
3909
3909
  }
3910
3910
  addToolApprovalResponse(e, t) {
@@ -3917,7 +3917,7 @@ var Ns = class e {
3917
3917
  }
3918
3918
  toModelMessages() {
3919
3919
  let e = [];
3920
- for (let t of this.messages) e.push(...xo(t));
3920
+ for (let t of this.messages) e.push(...So(t));
3921
3921
  return e;
3922
3922
  }
3923
3923
  getMessages() {
@@ -3929,7 +3929,7 @@ var Ns = class e {
3929
3929
  let t = e.parts.filter((e) => e.type === "tool-call");
3930
3930
  if (t.length === 0) return !0;
3931
3931
  let n = new Set(e.parts.filter((e) => e.type === "tool-result").map((e) => e.toolCallId));
3932
- return t.every((e) => e.state === "complete" || e.state === "approval-responded" || e.output !== void 0 && !e.approval || n.has(e.id) || Va(e));
3932
+ return t.every((e) => e.state === "complete" || e.state === "approval-responded" || e.output !== void 0 && !e.approval || n.has(e.id) || Ha(e));
3933
3933
  }
3934
3934
  removeMessagesAfter(e) {
3935
3935
  let t = new Set(this.messages.slice(0, e + 1).map((e) => e.id));
@@ -4082,7 +4082,7 @@ var Ns = class e {
4082
4082
  };
4083
4083
  }
4084
4084
  }
4085
- let n = e || No(), r = {
4085
+ let n = e || Po(), r = {
4086
4086
  id: n,
4087
4087
  role: "assistant",
4088
4088
  parts: [],
@@ -4099,10 +4099,10 @@ var Ns = class e {
4099
4099
  if (typeof t != "object" || !t || Array.isArray(t)) return;
4100
4100
  let n = this.messages.find((t) => t.id === e);
4101
4101
  if (!n) return;
4102
- let r = t, i = Q(r), a = i != null && ("content" in i || "args" in i) ? {
4102
+ let r = t, i = X(r), a = i != null && ("content" in i || "args" in i) ? {
4103
4103
  ...r,
4104
4104
  tanstack: Object.fromEntries(Object.entries(i).filter(([e]) => e !== "content" && e !== "args"))
4105
- } : r, o = qi(n.metadata, a), s = fo(Q(r)?.createdAt), c = s !== void 0;
4105
+ } : r, o = Yi(n.metadata, a), s = po(X(r)?.createdAt), c = s !== void 0;
4106
4106
  this.messages = this.messages.map((t) => t.id === e ? {
4107
4107
  ...t,
4108
4108
  ...o === void 0 ? {} : { metadata: o },
@@ -4261,7 +4261,7 @@ var Ns = class e {
4261
4261
  }
4262
4262
  handleMessagesSnapshotEvent(e) {
4263
4263
  this.resetStreamState();
4264
- let t = this.messages, n = new Map(t.map((e) => [e.id, e])), { top: r, groups: i } = $a(e.messages), a = this.mergeReasoningFanOut(r.map(Do)), o = this.reconcileSnapshotToolCalls(a, t).map((e) => {
4264
+ let t = this.messages, n = new Map(t.map((e) => [e.id, e])), { top: r, groups: i } = eo(e.messages), a = this.mergeReasoningFanOut(r.map(Oo)), o = this.reconcileSnapshotToolCalls(a, t).map((e) => {
4265
4265
  if (e.metadata != null) return e;
4266
4266
  let t = n.get(e.id);
4267
4267
  return t?.metadata == null ? e : {
@@ -4276,7 +4276,7 @@ var Ns = class e {
4276
4276
  for (let t of r) {
4277
4277
  let r = new e({ subagentRunId: t.id });
4278
4278
  r.processChunk({
4279
- type: Vi.MESSAGES_SNAPSHOT,
4279
+ type: Ui.MESSAGES_SNAPSHOT,
4280
4280
  messages: t.messages,
4281
4281
  timestamp: Date.now()
4282
4282
  }), o.set(t.id, r);
@@ -4313,7 +4313,7 @@ var Ns = class e {
4313
4313
  let t = c.findIndex((t) => t.id === e.hostId);
4314
4314
  if (t === -1 && e.toolCallId !== void 0 && (t = c.findIndex((t) => t.parts.some((t) => t.type === "tool-call" && t.id === e.toolCallId))), t === -1 && !e.carried && (t = c.findLastIndex((e) => e.role === "assistant")), t === -1) {
4315
4315
  e.carried || (c = [...c, {
4316
- id: No(),
4316
+ id: Po(),
4317
4317
  role: "assistant",
4318
4318
  parts: [e.part]
4319
4319
  }]);
@@ -4341,7 +4341,7 @@ var Ns = class e {
4341
4341
  parts: [...n.flatMap(r), ...s.parts]
4342
4342
  }, n = []) : o();
4343
4343
  let c = t.at(-1);
4344
- if (c?.role === "assistant" && e.role === "assistant" && Ha(e.id, c.id)) {
4344
+ if (c?.role === "assistant" && e.role === "assistant" && Ua(e.id, c.id)) {
4345
4345
  t[t.length - 1] = {
4346
4346
  ...c,
4347
4347
  parts: [...c.parts, ...e.parts]
@@ -4399,7 +4399,7 @@ var Ns = class e {
4399
4399
  } catch {
4400
4400
  e = i.content;
4401
4401
  }
4402
- let t = i.state === "error" ? Ka(e) : void 0;
4402
+ let t = i.state === "error" ? qa(e) : void 0;
4403
4403
  a = {
4404
4404
  ...a,
4405
4405
  output: t ? { error: t } : e,
@@ -4471,7 +4471,7 @@ var Ns = class e {
4471
4471
  if (!t) return;
4472
4472
  let n = this.getMessageState(t);
4473
4473
  if (!n) return;
4474
- let r = e.input === void 0 ? Q(e)?.input : e.input, i = n.toolCalls.get(e.toolCallId);
4474
+ let r = e.input === void 0 ? X(e)?.input : e.input, i = n.toolCalls.get(e.toolCallId);
4475
4475
  if (i && i.state !== "input-complete") {
4476
4476
  if (r !== void 0 && !i.arguments) try {
4477
4477
  i.arguments = JSON.stringify(r);
@@ -4490,7 +4490,7 @@ var Ns = class e {
4490
4490
  handleToolCallResultEvent(e) {
4491
4491
  let t = this.toolCallToMessage.get(e.toolCallId) ?? this.messages.find((t) => t.parts.some((t) => t.type === "tool-call" && t.id === e.toolCallId))?.id;
4492
4492
  if (!t) return;
4493
- let n = e.state === "output-error" || Q(e)?.state === "output-error", r;
4493
+ let n = e.state === "output-error" || X(e)?.state === "output-error", r;
4494
4494
  try {
4495
4495
  r = typeof e.content == "string" ? JSON.parse(e.content) : e.content;
4496
4496
  } catch {
@@ -4498,14 +4498,14 @@ var Ns = class e {
4498
4498
  }
4499
4499
  this.messages = Ts(this.messages, e.toolCallId, r, n ? "error" : void 0);
4500
4500
  let i = n ? "error" : "complete";
4501
- this.messages = Cs(this.messages, t, e.toolCallId, jo(e.content), i, i === "error" ? Ka(r) : void 0), this.emitMessagesChange();
4501
+ this.messages = Cs(this.messages, t, e.toolCallId, Mo(e.content), i, i === "error" ? qa(r) : void 0), this.emitMessagesChange();
4502
4502
  }
4503
4503
  handleRunStartedEvent(e) {
4504
4504
  this.activeRuns.add(e.runId);
4505
4505
  }
4506
4506
  handleRunFinishedEvent(e) {
4507
4507
  let t = e;
4508
- if (this.finishReason = t.finishReason === void 0 ? Q(e)?.finishReason ?? null : t.finishReason, this.activeRuns.delete(e.runId), e.outcome?.type === "interrupt" && this.handleInterrupts(e.outcome.interrupts), this.activeRuns.size === 0) {
4508
+ 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) {
4509
4509
  if (this.completeAllToolCalls(), this.finishReason === "tool_calls" && e.outcome?.type !== "interrupt") return;
4510
4510
  this.isDone = !0, this.finalizeStream();
4511
4511
  }
@@ -4560,10 +4560,10 @@ var Ns = class e {
4560
4560
  let t = hs(e);
4561
4561
  t ? this.activeRuns.delete(t) : this.activeRuns.clear();
4562
4562
  let { messageId: n } = this.ensureAssistantMessage(), r = e.message || "An error occurred";
4563
- e.message || console.error("[StreamProcessor] RUN_ERROR with no message; original chunk:", e), this.structuredMessageIds.has(n) && (this.flushStructuredOutputUpdate(n), this.messages = ks(this.messages, n, r), this.structuredMessageIds.delete(n), this.emitStructuredOutputChange(n, "error"), this.emitMessagesChange()), this.events.onError?.(Yi(e));
4563
+ e.message || console.error("[StreamProcessor] RUN_ERROR with no message; original chunk:", e), this.structuredMessageIds.has(n) && (this.flushStructuredOutputUpdate(n), this.messages = ks(this.messages, n, r), this.structuredMessageIds.delete(n), this.emitStructuredOutputChange(n, "error"), this.emitMessagesChange()), this.events.onError?.(Zi(e));
4564
4564
  }
4565
4565
  handleStepStartedEvent(e) {
4566
- let t = e.stepName || No(), n = this.getActiveAssistantMessageId();
4566
+ let t = e.stepName || Po(), n = this.getActiveAssistantMessageId();
4567
4567
  if (n) {
4568
4568
  let e = this.getMessageState(n);
4569
4569
  if (e) {
@@ -5038,10 +5038,10 @@ async function* uc(e, t) {
5038
5038
  }
5039
5039
  }
5040
5040
  function dc(e) {
5041
- return es(e);
5041
+ return ts(e);
5042
5042
  }
5043
5043
  function fc(e) {
5044
- let t = Q(e)?.model;
5044
+ let t = X(e)?.model;
5045
5045
  if (typeof t == "string") return t;
5046
5046
  let n = "usage" in e ? e.usage : void 0;
5047
5047
  if (Array.isArray(n)) {
@@ -5060,8 +5060,8 @@ async function* pc(e, t) {
5060
5060
  if (o.startsWith(":") || o.startsWith("event:") || o.startsWith("retry:")) continue;
5061
5061
  let e = zs(o);
5062
5062
  if (e === "[DONE]") {
5063
- yield { chunk: Ji({
5064
- type: Vi.RUN_FINISHED,
5063
+ yield { chunk: Xi({
5064
+ type: Ui.RUN_FINISHED,
5065
5065
  threadId: n ?? t?.threadId ?? "",
5066
5066
  runId: r ?? t?.runId ?? "",
5067
5067
  timestamp: Date.now()
@@ -5250,8 +5250,8 @@ function Cc(e) {
5250
5250
  try {
5251
5251
  let c = e.connect(t, n, r, i);
5252
5252
  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);
5253
- !r?.aborted && !a && s(Ji({
5254
- type: Vi.RUN_FINISHED,
5253
+ !r?.aborted && !a && s(Xi({
5254
+ type: Ui.RUN_FINISHED,
5255
5255
  threadId: ac(o ?? i?.threadId, "threadId"),
5256
5256
  runId: ac(l ?? i?.runId, "runId"),
5257
5257
  timestamp: Date.now()
@@ -5263,7 +5263,7 @@ function Cc(e) {
5263
5263
  if (!r?.aborted && !a) try {
5264
5264
  let t = e instanceof Error ? e.message : "Unknown error in connect()";
5265
5265
  s({
5266
- type: Vi.RUN_ERROR,
5266
+ type: Ui.RUN_ERROR,
5267
5267
  threadId: ac(o ?? i?.threadId, "threadId"),
5268
5268
  runId: ac(l ?? i?.runId, "runId"),
5269
5269
  timestamp: Date.now(),
@@ -5282,7 +5282,7 @@ function Cc(e) {
5282
5282
  };
5283
5283
  }
5284
5284
  function wc(e, t, n, r) {
5285
- let i = Io(e), a = {
5285
+ let i = Lo(e), a = {
5286
5286
  ...r.body,
5287
5287
  ...n?.forwardedProps ?? {},
5288
5288
  ...t
@@ -5382,10 +5382,10 @@ function Oc(e) {
5382
5382
  return e.resumable;
5383
5383
  }
5384
5384
  function kc(e, t) {
5385
- let n = za(e.descriptor);
5385
+ let n = Ba(e.descriptor);
5386
5386
  return n ? {
5387
5387
  ...t,
5388
- metadata: Ra(n)
5388
+ metadata: za(n)
5389
5389
  } : t;
5390
5390
  }
5391
5391
  function Ac(e) {
@@ -5430,16 +5430,16 @@ function Ic(e) {
5430
5430
  return Pc(e.metadata) || Fc(e.metadata);
5431
5431
  }
5432
5432
  function Lc(e) {
5433
- return Ma(e);
5433
+ return Na(e);
5434
5434
  }
5435
5435
  function Rc(e) {
5436
5436
  if (!Nc(e.metadata)) return !1;
5437
- let t = e.metadata[Ea];
5437
+ let t = e.metadata[Oa];
5438
5438
  return !Nc(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;
5439
5439
  }
5440
5440
  function zc(e) {
5441
5441
  if (!Nc(e.metadata)) return !1;
5442
- let t = e.metadata[Ea];
5442
+ let t = e.metadata[Oa];
5443
5443
  return !Nc(t) || t.kind !== "generic" ? !1 : "definitionId" in t || "key" in t || "batchIndex" in t || "payloadSchemaHash" in t;
5444
5444
  }
5445
5445
  function Bc(e) {
@@ -5450,14 +5450,14 @@ function Vc(e) {
5450
5450
  }
5451
5451
  function Hc(e) {
5452
5452
  if (e.responseSchema !== void 0) try {
5453
- return na(ta(e.responseSchema));
5453
+ return ia(ra(e.responseSchema));
5454
5454
  } catch {
5455
5455
  return;
5456
5456
  }
5457
5457
  }
5458
5458
  function Uc(e) {
5459
5459
  if (e !== void 0) try {
5460
- return Fa(e);
5460
+ return Ia(e);
5461
5461
  } catch {
5462
5462
  return;
5463
5463
  }
@@ -5470,7 +5470,7 @@ function Gc(e, t, n) {
5470
5470
  valid: !0,
5471
5471
  payload: t
5472
5472
  };
5473
- if (ca(e)) {
5473
+ if (ua(e)) {
5474
5474
  let r = e["~standard"].validate(t), i = (e) => e.issues ? {
5475
5475
  code: n,
5476
5476
  message: e.issues[0]?.message ?? "Schema validation failed."
@@ -5523,7 +5523,7 @@ function $c(e, t) {
5523
5523
  }
5524
5524
  function el(e, t, n) {
5525
5525
  let r = Hc(e) ?? n?.responseSchemaHash;
5526
- return $({
5526
+ return Z({
5527
5527
  v: 1,
5528
5528
  kind: "generic",
5529
5529
  interruptId: e.id,
@@ -5534,7 +5534,7 @@ function el(e, t, n) {
5534
5534
  });
5535
5535
  }
5536
5536
  function tl(e, t) {
5537
- let n = $(e.descriptor), r = e.error === void 0 ? Object.freeze([]) : Object.freeze([$(e.error)]), i = r[0];
5537
+ let n = Z(e.descriptor), r = e.error === void 0 ? Object.freeze([]) : Object.freeze([Z(e.error)]), i = r[0];
5538
5538
  return {
5539
5539
  id: n.id,
5540
5540
  interruptId: n.id,
@@ -5588,7 +5588,7 @@ var nl = class {
5588
5588
  threadId: e.threadId,
5589
5589
  interruptedRunId: e.interruptedRunId,
5590
5590
  generation: e.generation,
5591
- interrupts: $(e.interrupts)
5591
+ interrupts: Z(e.interrupts)
5592
5592
  };
5593
5593
  let n = /* @__PURE__ */ new Map();
5594
5594
  for (let t of e.interrupts) {
@@ -5656,7 +5656,7 @@ var nl = class {
5656
5656
  return n ? (this.resolveItem(n.descriptor.id, { approved: t }), !0) : !1;
5657
5657
  }
5658
5658
  hydrateInterrupt(e, t, n) {
5659
- let r = $(e), i = Lc(r), a = i === void 0 && Ic(r);
5659
+ let r = Z(e), i = Lc(r), a = i === void 0 && Ic(r);
5660
5660
  if (i === void 0 && !a) return Rc(r) ? {
5661
5661
  descriptor: r,
5662
5662
  binding: el(r, t, void 0),
@@ -5689,10 +5689,10 @@ var nl = class {
5689
5689
  if (s && i.kind === "tool-approval") {
5690
5690
  let e = this.tools?.find((e) => e.name === i.toolName);
5691
5691
  if (e?.needsApproval === !0 && r.toolCallId === i.toolCallId) try {
5692
- let t = wa(e.approvalSchema, e.inputSchema);
5693
- if (Ta(e.inputSchema) === i.inputSchemaHash && t.approvalSchemaHash === i.approvalSchemaHash && t.responseSchemaHash === i.responseSchemaHash) return {
5692
+ let t = Ea(e.approvalSchema, e.inputSchema);
5693
+ if (Da(e.inputSchema) === i.inputSchemaHash && t.approvalSchemaHash === i.approvalSchemaHash && t.responseSchemaHash === i.responseSchemaHash) return {
5694
5694
  descriptor: r,
5695
- binding: $(i),
5695
+ binding: Z(i),
5696
5696
  kind: "tool-approval",
5697
5697
  status: "pending",
5698
5698
  canResolve: !0,
@@ -5704,9 +5704,9 @@ var nl = class {
5704
5704
  }
5705
5705
  if (s && i.kind === "client-tool-execution") {
5706
5706
  let e = this.tools?.find((e) => e.name === i.toolName);
5707
- if (e !== void 0 && r.toolCallId === i.toolCallId && Ta(e.outputSchema) === i.outputSchemaHash) return {
5707
+ if (e !== void 0 && r.toolCallId === i.toolCallId && Da(e.outputSchema) === i.outputSchemaHash) return {
5708
5708
  descriptor: r,
5709
- binding: $(i),
5709
+ binding: Z(i),
5710
5710
  kind: "client-tool-execution",
5711
5711
  status: "pending",
5712
5712
  canResolve: !0,
@@ -5717,7 +5717,7 @@ var nl = class {
5717
5717
  }
5718
5718
  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 {
5719
5719
  descriptor: r,
5720
- binding: $(i),
5720
+ binding: Z(i),
5721
5721
  kind: "generic",
5722
5722
  status: "error",
5723
5723
  canResolve: !1,
@@ -5731,13 +5731,13 @@ var nl = class {
5731
5731
  let t = Bc(r);
5732
5732
  return {
5733
5733
  descriptor: r,
5734
- binding: $(i),
5734
+ binding: Z(i),
5735
5735
  definition: e,
5736
5736
  kind: "generic",
5737
5737
  status: "pending",
5738
5738
  canResolve: !0,
5739
5739
  resumable: !0,
5740
- ...t === void 0 ? {} : { payload: $(t) },
5740
+ ...t === void 0 ? {} : { payload: Z(t) },
5741
5741
  validationGeneration: 0
5742
5742
  };
5743
5743
  }
@@ -5765,13 +5765,13 @@ var nl = class {
5765
5765
  return Object.freeze(e);
5766
5766
  }
5767
5767
  if (n.kind === "tool-approval" && n.binding.kind === "tool-approval") {
5768
- let t = $(n.binding), i = {
5768
+ let t = Z(n.binding), i = {
5769
5769
  ...r,
5770
5770
  kind: "tool-approval",
5771
5771
  binding: t,
5772
5772
  toolName: n.binding.toolName,
5773
5773
  toolCallId: n.binding.toolCallId,
5774
- originalArgs: $(n.binding.originalArgs),
5774
+ originalArgs: Z(n.binding.originalArgs),
5775
5775
  cancel: () => this.cancelItem(n.descriptor.id, e),
5776
5776
  clearResolution: () => this.clearItem(n.descriptor.id, e),
5777
5777
  resolveInterrupt: (t, r) => {
@@ -5785,7 +5785,7 @@ var nl = class {
5785
5785
  };
5786
5786
  return Object.freeze(i);
5787
5787
  }
5788
- let i = n.binding.kind === "generic" ? $(n.binding) : $({
5788
+ let i = n.binding.kind === "generic" ? Z(n.binding) : Z({
5789
5789
  v: 1,
5790
5790
  kind: "generic",
5791
5791
  interruptId: n.descriptor.id,
@@ -5873,7 +5873,7 @@ var nl = class {
5873
5873
  maybeSubmit() {
5874
5874
  let e = this.items.some((e) => e.kind === "generic"), t = this.items.filter((t) => Oc(t) && !(e && t.kind === "client-tool-execution"));
5875
5875
  if (t.length === 0 || t.some((e) => e.resolution === void 0 || e.status !== "staged")) return;
5876
- let n = this.requireHydration(), r = ia(t.map((e) => e.resolution).filter((e) => e !== void 0)), i = Object.freeze({
5876
+ let n = this.requireHydration(), r = oa(t.map((e) => e.resolution).filter((e) => e !== void 0)), i = Object.freeze({
5877
5877
  threadId: n.threadId,
5878
5878
  interruptedRunId: n.interruptedRunId,
5879
5879
  generation: n.generation,
@@ -5900,7 +5900,7 @@ var nl = class {
5900
5900
  })])), n || this.publish();
5901
5901
  return;
5902
5902
  }
5903
- e.resolution = $(kc(e, {
5903
+ e.resolution = Z(kc(e, {
5904
5904
  interruptId: e.descriptor.id,
5905
5905
  status: "resolved",
5906
5906
  payload: t.payload
@@ -5968,7 +5968,7 @@ var nl = class {
5968
5968
  return;
5969
5969
  }
5970
5970
  this.invalidateRetry();
5971
- for (let n of t) n.validationGeneration++, n.resolution = $({
5971
+ for (let n of t) n.validationGeneration++, n.resolution = Z({
5972
5972
  interruptId: n.descriptor.id,
5973
5973
  status: "resolved",
5974
5974
  payload: { approved: e }
@@ -6059,8 +6059,8 @@ var nl = class {
6059
6059
  let i = !1, a = !1, o = [];
6060
6060
  for (let e of r) if ((e.code === "stale" || e.code === "expired" || e.code === "conflict") && (i = !0), a ||= e.retryable, e.scope === "item") {
6061
6061
  let t = this.items.find((t) => Oc(t) && t.descriptor.id === e.interruptId);
6062
- t && (t.status = "error", t.error = $(e));
6063
- } else o.push($(e));
6062
+ t && (t.status = "error", t.error = Z(e));
6063
+ } else o.push(Z(e));
6064
6064
  let s = Qc(this.rootErrors, this.submissionRootErrors, o);
6065
6065
  this.rootErrors = s.rootErrors, this.submissionRootErrors = s.submissionRootErrors;
6066
6066
  for (let e of this.items) Oc(e) && e.status === "submitting" && (e.status = "error");
@@ -6250,7 +6250,7 @@ var sl = class {
6250
6250
  ...typeof t?.toolCallId == "string" ? { toolCallId: t.toolCallId } : {}
6251
6251
  };
6252
6252
  if (i) {
6253
- let r = os({
6253
+ let r = ss({
6254
6254
  eventType: e,
6255
6255
  clientId: this.clientId,
6256
6256
  ...o,
@@ -6258,18 +6258,18 @@ var sl = class {
6258
6258
  visibility: a,
6259
6259
  timestamp: n
6260
6260
  });
6261
- ds.emit(e, {
6261
+ fs.emit(e, {
6262
6262
  ...t,
6263
6263
  ...r
6264
6264
  });
6265
6265
  } else {
6266
- let r = os({
6266
+ let r = ss({
6267
6267
  eventType: e,
6268
6268
  source: "client",
6269
6269
  visibility: "client-state",
6270
6270
  timestamp: n
6271
6271
  });
6272
- ds.emit(e, {
6272
+ fs.emit(e, {
6273
6273
  ...t,
6274
6274
  ...r
6275
6275
  });
@@ -6547,7 +6547,7 @@ function Cl(e) {
6547
6547
  function wl(e) {
6548
6548
  if (e.type !== "RUN_FINISHED" || e.outcome?.type === "interrupt") return !1;
6549
6549
  let t = e;
6550
- return t.finishReason === void 0 ? Q(e)?.finishReason === "tool_calls" : t.finishReason === "tool_calls";
6550
+ return t.finishReason === void 0 ? X(e)?.finishReason === "tool_calls" : t.finishReason === "tool_calls";
6551
6551
  }
6552
6552
  function Tl(e) {
6553
6553
  let t = {
@@ -6595,7 +6595,7 @@ function El(e) {
6595
6595
  typeof t.content.content == "string" ? r.push({
6596
6596
  type: "text",
6597
6597
  content: t.content.content
6598
- }) : r.push(...t.content.content), i = qi(i, t.content.metadata);
6598
+ }) : r.push(...t.content.content), i = Yi(i, t.content.metadata);
6599
6599
  }
6600
6600
  return {
6601
6601
  content: {
@@ -7207,8 +7207,8 @@ var Il = class {
7207
7207
  t && t.role === "assistant" && this.processor.setMessages(e.slice(0, -1));
7208
7208
  }
7209
7209
  async processIncomingChunk(e, t) {
7210
- if (e = es(e), e.type === "RUN_ERROR" && this.isActiveInterruptSubmissionFailure(e)) {
7211
- let t = Q(e)?.interruptErrors;
7210
+ if (e = ts(e), e.type === "RUN_ERROR" && this.isActiveInterruptSubmissionFailure(e)) {
7211
+ let t = X(e)?.interruptErrors;
7212
7212
  this.interruptSubmissionFailure = { errors: Array.isArray(t) ? t : [] };
7213
7213
  }
7214
7214
  if (this.connectionStatus === "connecting" && this.setConnectionStatus("connected"), this.clearedStreamTracker.shouldIgnoreChunk(e)) {
@@ -7217,14 +7217,14 @@ var Il = class {
7217
7217
  }
7218
7218
  this.callbacksRef.current.onChunk(e), this.devtoolsBridge.observeChunk(e);
7219
7219
  let n = Nl(e);
7220
- if (n && e.type === Vi.SUBAGENT_STARTED && this.stoppedSubagentIds.delete(n), n && this.stoppedSubagentIds.has(n)) {
7220
+ if (n && e.type === Ui.SUBAGENT_STARTED && this.stoppedSubagentIds.delete(n), n && this.stoppedSubagentIds.has(n)) {
7221
7221
  this.updateRunLifecycle(e), this.resolveJoinedRun(e);
7222
7222
  return;
7223
7223
  }
7224
7224
  this.processor.processChunk(e), this.syncSubagentHandles(), this.updateRunLifecycle(e), this.observeInterruptState(e), t?.defer !== !1 && (typeof document > "u" || !document.hidden) && await new Promise((e) => setTimeout(e, 0)), this.resolveJoinedRun(e);
7225
7225
  }
7226
7226
  isActiveInterruptSubmissionFailure(e) {
7227
- let t = this.activeInterruptSubmission, n = Q(e)?.interruptErrors;
7227
+ let t = this.activeInterruptSubmission, n = X(e)?.interruptErrors;
7228
7228
  if (!t || !Array.isArray(n) || n.length === 0) return !1;
7229
7229
  let r = Xs(e);
7230
7230
  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);
@@ -7340,7 +7340,7 @@ var Il = class {
7340
7340
  }
7341
7341
  async append(e) {
7342
7342
  if (this.mountDevtools(), this.hasPendingInterrupts()) throw Error("ChatClient: cannot append normal input while pending interrupts exist. Use resumeInterrupts() instead.");
7343
- let t = Mo(e, No);
7343
+ let t = No(e, Po);
7344
7344
  if (t.role === "system") return;
7345
7345
  let n = t;
7346
7346
  this.events.messageAppended(n);
@@ -7385,7 +7385,7 @@ var Il = class {
7385
7385
  clientTools: Array.from(u.values()).map((e) => ({
7386
7386
  name: e.name,
7387
7387
  description: e.description,
7388
- parameters: e.inputSchema ? pa(e.inputSchema) : { type: "object" }
7388
+ parameters: e.inputSchema ? ha(e.inputSchema) : { type: "object" }
7389
7389
  })),
7390
7390
  forwardedProps: { ...f },
7391
7391
  ...r ? { resume: r } : {},
@@ -7459,7 +7459,7 @@ var Il = class {
7459
7459
  }
7460
7460
  }
7461
7461
  validateClientToolOutput(e, t) {
7462
- return e.outputSchema && ca(e.outputSchema) ? ha(e.outputSchema, t) : t;
7462
+ return e.outputSchema && ua(e.outputSchema) ? _a(e.outputSchema, t) : t;
7463
7463
  }
7464
7464
  async addToolApprovalResponse(e) {
7465
7465
  if (this.processor.addToolApprovalResponse(e.id, e.approved), this.devtoolsBridge.emitSnapshot(), this.interruptManager.resolveToolApprovalDecision(e.id, e.approved)) return;
@@ -7553,7 +7553,7 @@ var Il = class {
7553
7553
  stopSubagent(e) {
7554
7554
  let t = this.subagentHandles.get(e);
7555
7555
  t && t.status === "running" && (this.stoppedSubagentIds.add(e), this.processor.processChunk({
7556
- type: Vi.SUBAGENT_ERROR,
7556
+ type: Ui.SUBAGENT_ERROR,
7557
7557
  subagentRunId: e,
7558
7558
  message: "Stopped",
7559
7559
  timestamp: Date.now()
@@ -7770,21 +7770,21 @@ var Ul = class {
7770
7770
  this.options = e;
7771
7771
  }
7772
7772
  emitRegistered() {
7773
- this.prepareForMountEmit() && (this.registered = !0, fs("hook:registered", {
7773
+ this.prepareForMountEmit() && (this.registered = !0, $("hook:registered", {
7774
7774
  ...this.createEnvelope("hook:registered"),
7775
7775
  ...this.createMetadataPayload(),
7776
7776
  lifecycle: "mounted"
7777
7777
  }));
7778
7778
  }
7779
7779
  emitUpdated() {
7780
- this.prepareForEmit() && fs("hook:updated", {
7780
+ this.prepareForEmit() && $("hook:updated", {
7781
7781
  ...this.createEnvelope("hook:updated"),
7782
7782
  ...this.createMetadataPayload(),
7783
7783
  lifecycle: "active"
7784
7784
  });
7785
7785
  }
7786
7786
  emitSnapshot() {
7787
- this.prepareForEmit() && fs("hook:state-snapshot", {
7787
+ this.prepareForEmit() && $("hook:state-snapshot", {
7788
7788
  ...this.createEnvelope("hook:state-snapshot"),
7789
7789
  ...this.createMetadataPayload(),
7790
7790
  state: this.options.getSnapshot()
@@ -7795,19 +7795,19 @@ var Ul = class {
7795
7795
  let e = this.options.getTools ? Array.from(this.options.getTools()).map((e) => ({
7796
7796
  name: e.name,
7797
7797
  description: e.description,
7798
- inputSchema: e.inputSchema ? pa(e.inputSchema) : { type: "object" },
7799
- outputSchema: e.outputSchema ? pa(e.outputSchema) : void 0,
7798
+ inputSchema: e.inputSchema ? ha(e.inputSchema) : { type: "object" },
7799
+ outputSchema: e.outputSchema ? ha(e.outputSchema) : void 0,
7800
7800
  needsApproval: e.needsApproval,
7801
7801
  metadata: e.metadata
7802
7802
  })) : [];
7803
- fs("tools:registered", {
7803
+ $("tools:registered", {
7804
7804
  ...this.createEnvelope("tools:registered"),
7805
7805
  ...this.createMetadataPayload(),
7806
7806
  tools: e
7807
7807
  });
7808
7808
  }
7809
7809
  emitRunLifecycle(e, t, n, r = {}) {
7810
- this.prepareForEmit() && fs(e, {
7810
+ this.prepareForEmit() && $(e, {
7811
7811
  ...this.createEnvelope(e, "client-state", { runId: t }),
7812
7812
  runId: t,
7813
7813
  status: n,
@@ -7832,7 +7832,7 @@ var Ul = class {
7832
7832
  this.deactivate();
7833
7833
  return;
7834
7834
  }
7835
- fs("hook:unregistered", {
7835
+ $("hook:unregistered", {
7836
7836
  ...this.createEnvelope("hook:unregistered"),
7837
7837
  ...this.createMetadataPayload(),
7838
7838
  reason: "disposed"
@@ -7848,9 +7848,9 @@ var Ul = class {
7848
7848
  activate() {
7849
7849
  if (this.disposed) return;
7850
7850
  let e = Vl(), t = e.get(this.options.hookId);
7851
- t && t !== this && (typeof t.supersede == "function" ? t.supersede() : t.deactivate()), e.set(this.options.hookId, this), !(this.unsubscribers.length > 0) && (this.unsubscribers.push(ds.on("devtools:request-state", (e) => {
7851
+ t && t !== this && (typeof t.supersede == "function" ? t.supersede() : t.deactivate()), e.set(this.options.hookId, this), !(this.unsubscribers.length > 0) && (this.unsubscribers.push(fs.on("devtools:request-state", (e) => {
7852
7852
  this.handleRequestState(e);
7853
- })), this.options.applyToolFixture && this.unsubscribers.push(ds.on("devtools:tool-fixture:apply", (e) => {
7853
+ })), this.options.applyToolFixture && this.unsubscribers.push(fs.on("devtools:tool-fixture:apply", (e) => {
7854
7854
  this.handleToolFixtureApply(e);
7855
7855
  })));
7856
7856
  }
@@ -7868,7 +7868,7 @@ var Ul = class {
7868
7868
  return !e.hookId && !e.threadId ? !1 : e.hookId ? e.hookId === this.options.hookId : !e.threadId || !!this.options.threadId && e.threadId === this.options.threadId;
7869
7869
  }
7870
7870
  createEnvelope(e, t = "client-state", n = {}) {
7871
- return os({
7871
+ return ss({
7872
7872
  eventType: e,
7873
7873
  source: "client",
7874
7874
  visibility: t,
@@ -7956,12 +7956,12 @@ var Ul = class {
7956
7956
  let t = e, n = t.scope, r = t.adapter;
7957
7957
  if (!n || typeof r != "string") return;
7958
7958
  let i = this.currentRunId ? { runId: this.currentRunId } : {};
7959
- fs("memory:retrieve:started", {
7959
+ $("memory:retrieve:started", {
7960
7960
  ...this.createEnvelope("memory:retrieve:started", "client-state", i),
7961
7961
  scope: n,
7962
7962
  adapter: r,
7963
7963
  query: t.query ?? ""
7964
- }), t.recall && fs("memory:retrieve:completed", {
7964
+ }), t.recall && $("memory:retrieve:completed", {
7965
7965
  ...this.createEnvelope("memory:retrieve:completed", "client-state", i),
7966
7966
  scope: n,
7967
7967
  adapter: r,
@@ -7969,7 +7969,7 @@ var Ul = class {
7969
7969
  hasTools: !!t.recall.hasTools,
7970
7970
  systemPromptChars: t.recall.systemPromptChars ?? 0,
7971
7971
  durationMs: t.recall.durationMs ?? 0
7972
- }), t.snapshot && fs("memory:snapshot", {
7972
+ }), t.snapshot && $("memory:snapshot", {
7973
7973
  ...this.createEnvelope("memory:snapshot", "client-state", i),
7974
7974
  scope: n,
7975
7975
  adapter: r,
@@ -7991,7 +7991,7 @@ var Ul = class {
7991
7991
  let n = this.currentRunId ? { runId: this.currentRunId } : {};
7992
7992
  if (e === "compaction:started") {
7993
7993
  let e = Ll(t);
7994
- fs("compaction:started", {
7994
+ $("compaction:started", {
7995
7995
  ...this.createEnvelope("compaction:started", "client-state", n),
7996
7996
  ...e
7997
7997
  });
@@ -7999,7 +7999,7 @@ var Ul = class {
7999
7999
  }
8000
8000
  if (e === "compaction:ended") {
8001
8001
  let e = Ll(t);
8002
- fs("compaction:ended", {
8002
+ $("compaction:ended", {
8003
8003
  ...this.createEnvelope("compaction:ended", "client-state", n),
8004
8004
  ...e
8005
8005
  });
@@ -8008,7 +8008,7 @@ var Ul = class {
8008
8008
  if (e === "compaction:state") {
8009
8009
  let e = zl(t);
8010
8010
  if (!e) return;
8011
- fs("compaction:state", {
8011
+ $("compaction:state", {
8012
8012
  ...this.createEnvelope("compaction:state", "client-state", n),
8013
8013
  ...e
8014
8014
  });
@@ -8017,7 +8017,7 @@ var Ul = class {
8017
8017
  emitSkillsState(e) {
8018
8018
  if (!e || typeof e != "object") return;
8019
8019
  let t = e, n = Array.isArray(t.catalog) ? t.catalog : [], r = Array.isArray(t.activated) ? t.activated : [], i = this.currentRunId ? { runId: this.currentRunId } : {};
8020
- fs("skills:snapshot", {
8020
+ $("skills:snapshot", {
8021
8021
  ...this.createEnvelope("skills:snapshot", "client-state", i),
8022
8022
  catalog: n,
8023
8023
  activated: r
@@ -8533,14 +8533,14 @@ function iu(e) {
8533
8533
  }
8534
8534
  async function au(e, t) {
8535
8535
  let n = new Headers(t?.headers ?? {});
8536
- for (let [e, t] of Object.entries(await me())) n.set(e, t);
8536
+ for (let [e, t] of Object.entries(await G())) n.set(e, t);
8537
8537
  return n.set("X-Cui-Timezone", Intl.DateTimeFormat().resolvedOptions().timeZone), fetch(e, {
8538
8538
  ...t,
8539
8539
  headers: n
8540
8540
  });
8541
8541
  }
8542
8542
  function ou() {
8543
- return `${(de().target.value?.endpoint.url ?? window.location.origin).replace(/\/+$/, "")}/api/assistant/chat`;
8543
+ return `${(me().target.value?.endpoint.url ?? window.location.origin).replace(/\/+$/, "")}/api/assistant/chat`;
8544
8544
  }
8545
8545
  function su(e, t) {
8546
8546
  try {
@@ -8577,7 +8577,7 @@ async function cu(e, t, n, r) {
8577
8577
  }
8578
8578
  case "open_camview": return su(e, "/camview");
8579
8579
  case "open_page": {
8580
- let t = Se[String(r.page ?? "")];
8580
+ let t = we[String(r.page ?? "")];
8581
8581
  return t ? su(e, t.path) : {
8582
8582
  ok: !1,
8583
8583
  message: "unknown page"
@@ -8619,12 +8619,12 @@ async function cu(e, t, n, r) {
8619
8619
  }
8620
8620
  }
8621
8621
  function lu(e) {
8622
- let { t } = Ee(), n = ie(), r = pt(), i = [...(e.approvalTools ?? []).filter((e) => e.approval && e.inputSchema).map((e) => ps({
8622
+ let { t } = Oe(), n = q(), r = ht(), i = [...(e.approvalTools ?? []).filter((e) => e.approval && e.inputSchema).map((e) => ps({
8623
8623
  name: e.name,
8624
8624
  description: e.description,
8625
8625
  inputSchema: e.inputSchema,
8626
8626
  needsApproval: !0
8627
- })), ...we.map((e) => ps({
8627
+ })), ...Ee.map((e) => ps({
8628
8628
  name: e.name,
8629
8629
  description: e.description,
8630
8630
  inputSchema: e.inputSchema
@@ -8647,7 +8647,7 @@ function lu(e) {
8647
8647
  connection: {
8648
8648
  ...Tc(ou, { fetchClient: au }),
8649
8649
  hydrate: async (e) => {
8650
- let n = await Re(e).catch(() => {
8650
+ let n = await Be(e).catch(() => {
8651
8651
  throw Error(t("views.assistant.thread_load_failed"));
8652
8652
  });
8653
8653
  return m(n.attachments), n;
@@ -8655,7 +8655,7 @@ function lu(e) {
8655
8655
  },
8656
8656
  persistence: !0,
8657
8657
  tools: i,
8658
- interrupts: [Ce],
8658
+ interrupts: [Te],
8659
8659
  queue: {
8660
8660
  whenBusy: "queue",
8661
8661
  maxSize: 5
@@ -8728,12 +8728,12 @@ function lu(e) {
8728
8728
  }
8729
8729
  function C() {
8730
8730
  let e = h.runId.value;
8731
- e && He(e).catch(() => void 0), h.stop();
8731
+ e && We(e).catch(() => void 0), h.stop();
8732
8732
  let t = h.messages.value.at(-1);
8733
8733
  f.value = t?.role === "assistant" ? t.id : null;
8734
8734
  }
8735
8735
  async function w() {
8736
- await x(qn);
8736
+ await x(Yn);
8737
8737
  }
8738
8738
  function T(e, t) {
8739
8739
  m(t), h.setMessages(e);
@@ -8784,7 +8784,7 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
8784
8784
  }, Ou = { class: "relative shrink-0" }, ku = {
8785
8785
  key: 0,
8786
8786
  class: "cui-assistant-badge"
8787
- }, Au = { class: "mt-2 text-center text-[11.5px] text-muted" }, ju = /*#__PURE__*/ q(/* @__PURE__ */ P({
8787
+ }, Au = { class: "mt-2 text-center text-[11.5px] text-muted" }, ju = /*#__PURE__*/ U(/* @__PURE__ */ P({
8788
8788
  __name: "CuiAssistantConversation",
8789
8789
  props: {
8790
8790
  threadId: {},
@@ -8806,22 +8806,22 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
8806
8806
  "emptied"
8807
8807
  ],
8808
8808
  setup(e, { expose: r, emit: c }) {
8809
- let u = new Ue(), f = e, p = c, { t: m, locale: v } = Ee(), S = pe(), O = xe("(pointer: coarse)"), { keyboardInset: M } = dt(), { data: N } = u.memoryQuery(), { data: P } = u.getAssistantInfoQuery(), R = D("scrollRef"), B = D("contentRef"), V = D("composerRef"), H = D("welcomeRef"), U = D("bottomRef"), W = F(!0), G = F([]), te = F(""), ne = F(null), K = F(null), q = D("rootRef"), re = F(!0), ie, J = 0, { top: ae } = ye(q), { top: oe } = ye(b(() => V.value?.$el)), se = F(f.initialModelId ?? null), Y = lu({
8809
+ let u = new Ge(), f = e, p = c, { t: m, locale: v } = Oe(), S = te(), O = Ce("(pointer: coarse)"), { keyboardInset: M } = pt(), { data: N } = u.memoryQuery(), { data: P } = u.getAssistantInfoQuery(), R = D("scrollRef"), B = D("contentRef"), V = D("composerRef"), H = D("welcomeRef"), U = D("bottomRef"), W = F(!0), G = F([]), K = F(""), ne = F(null), q = F(null), re = D("rootRef"), ie = F(!0), ae, oe = 0, { top: se } = xe(re), { top: ce } = xe(b(() => V.value?.$el)), le = F(f.initialModelId ?? null), J = lu({
8810
8810
  threadId: b(() => f.threadId),
8811
8811
  initialMessages: f.initialMessages,
8812
8812
  initialAttachments: f.initialAttachments,
8813
8813
  language: v,
8814
8814
  disabledGroups: G,
8815
- instructions: te,
8816
- modelId: se,
8815
+ instructions: K,
8816
+ modelId: le,
8817
8817
  approvalTools: f.approvalTools,
8818
8818
  onFinish: () => p("finished"),
8819
- onError: Je
8820
- }), X = b(() => Y.messages.value.length === 0), ce = b(() => Math.max(160, Math.round(oe.value - ae.value - 12))), Z = b(() => P.value?.settings.models ?? []), le = b(() => P.value ? $e(P.value.settings) : void 0), ue = b(() => Z.value.find((e) => e._id === se.value) ?? le.value), de = b(() => ue.value?.capabilities?.vision === !1 ? ue.value.name : void 0), fe = b(() => Y.busy.value && !Y.approvals.value.length && !Y.questions.value.length && !Y.pausedElsewhere.value), me = b(() => fe.value && Y.messages.value.at(-1)?.role !== "assistant"), he = b(() => {
8821
- let e = Y.messages.value, t = [];
8819
+ onError: Xe
8820
+ }), ue = b(() => J.messages.value.length === 0), Y = b(() => Math.max(160, Math.round(ce.value - se.value - 12))), de = b(() => P.value?.settings.models ?? []), fe = b(() => P.value ? tt(P.value.settings) : void 0), pe = b(() => de.value.find((e) => e._id === le.value) ?? fe.value), me = b(() => pe.value?.capabilities?.vision === !1 ? pe.value.name : void 0), he = b(() => J.busy.value && !J.approvals.value.length && !J.questions.value.length && !J.pausedElsewhere.value), ge = b(() => he.value && J.messages.value.at(-1)?.role !== "assistant"), _e = b(() => {
8821
+ let e = J.messages.value, t = [];
8822
8822
  return e.forEach((n, r) => {
8823
- if (Yn(n)) return;
8824
- let i = n.role === "assistant" && Yn(e[r - 1]), a = t[t.length - 1];
8823
+ if (Zn(n)) return;
8824
+ let i = n.role === "assistant" && Zn(e[r - 1]), a = t[t.length - 1];
8825
8825
  if (n.role === "assistant" && !i && a?.message.role === "assistant" && !a.continuation && a.lastIndex === r - 1) {
8826
8826
  a.message = {
8827
8827
  ...a.message,
@@ -8837,7 +8837,7 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
8837
8837
  continuation: i
8838
8838
  });
8839
8839
  }), t;
8840
- }), ge = b(() => {
8840
+ }), ve = b(() => {
8841
8841
  let e = /* @__PURE__ */ new Map();
8842
8842
  for (let t of f.tools) {
8843
8843
  let n = t.group === "core" ? m("views.assistant.tool_group_core") : t.group === "docs" ? m("views.assistant.tool_group_docs") : t.group === "terminal" ? m("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) ?? {
@@ -8849,99 +8849,99 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
8849
8849
  }
8850
8850
  let t = (e) => e === "core" ? 0 : e === "docs" ? 1 : e.startsWith("plugin:") ? 2 : 3;
8851
8851
  return Array.from(e.values()).sort((e, n) => t(e.id) - t(n.id) || e.label.localeCompare(n.label));
8852
- }), ve = b({
8853
- get: () => ge.value.filter((e) => !G.value.includes(e.id)).map((e) => e.id),
8852
+ }), be = b({
8853
+ get: () => ve.value.filter((e) => !G.value.includes(e.id)).map((e) => e.id),
8854
8854
  set: (e) => {
8855
- G.value = ge.value.filter((t) => !e.includes(t.id)).map((e) => e.id);
8855
+ G.value = ve.value.filter((t) => !e.includes(t.id)).map((e) => e.id);
8856
8856
  }
8857
- }), be = b(() => {
8857
+ }), Se = b(() => {
8858
8858
  let e = (/* @__PURE__ */ new Date()).getHours();
8859
8859
  return m(e < 5 ? "views.assistant.greeting_night" : e < 11 ? "views.assistant.greeting_morning" : e < 18 ? "views.assistant.greeting_day" : "views.assistant.greeting_evening");
8860
8860
  });
8861
- function Se(e) {
8862
- for (let t of e.ids) if (Y.usage.value[t]) return Y.usage.value[t];
8861
+ function we(e) {
8862
+ for (let t of e.ids) if (J.usage.value[t]) return J.usage.value[t];
8863
8863
  }
8864
- function Ce() {
8864
+ function Te() {
8865
8865
  let e = R.value;
8866
- e && !J && (W.value = e.scrollHeight - e.scrollTop - e.clientHeight < 120, Te());
8866
+ e && !oe && (W.value = e.scrollHeight - e.scrollTop - e.clientHeight < 120, De());
8867
8867
  }
8868
- function we(e) {
8869
- K.value = K.value === e ? null : e;
8868
+ function Ee(e) {
8869
+ q.value = q.value === e ? null : e;
8870
8870
  }
8871
- function Te() {
8871
+ function De() {
8872
8872
  let e = R.value;
8873
- e && !J && (re.value = e.scrollHeight - e.scrollTop - e.clientHeight < 8);
8873
+ e && !oe && (ie.value = e.scrollHeight - e.scrollTop - e.clientHeight < 8);
8874
8874
  }
8875
- function Oe() {
8875
+ function Ae() {
8876
8876
  let e = R.value, t = H.value;
8877
8877
  if (e && t) return t.getBoundingClientRect().top - e.getBoundingClientRect().top + e.scrollTop;
8878
8878
  }
8879
- function ke() {
8879
+ function je() {
8880
8880
  let e = R.value, t = H.value, n = V.value?.$el;
8881
8881
  if (!e || !t || !n) return;
8882
- if (!M.value || ie === void 0) {
8882
+ if (!M.value || ae === void 0) {
8883
8883
  t.style.removeProperty("margin-top");
8884
8884
  return;
8885
8885
  }
8886
8886
  let r = n.getBoundingClientRect().bottom - t.getBoundingClientRect().top, i = e.clientHeight - r - 12;
8887
- t.style.marginTop = `${Math.max(0, Math.min(ie, i))}px`, e.scrollTop = 0;
8887
+ t.style.marginTop = `${Math.max(0, Math.min(ae, i))}px`, e.scrollTop = 0;
8888
8888
  }
8889
- function je() {
8889
+ function Ne() {
8890
8890
  let e = [
8891
8891
  H.value,
8892
8892
  U.value,
8893
8893
  B.value
8894
8894
  ].filter((e) => !!e), t = e.map((e) => e.getBoundingClientRect().top);
8895
- return M.value || (ie = Oe()), () => {
8896
- X.value ? ke() : W.value && Ne();
8895
+ return M.value || (ae = Ae()), () => {
8896
+ ue.value ? je() : W.value && Fe();
8897
8897
  let n = e.flatMap((e, n) => {
8898
8898
  let r = t[n] - e.getBoundingClientRect().top;
8899
8899
  return Math.abs(r) < 1 ? [] : [e.animate([{ transform: `translateY(${r}px)` }, { transform: "translateY(0)" }], {
8900
8900
  duration: 280,
8901
- easing: zi
8901
+ easing: Vi
8902
8902
  }).finished.catch(() => void 0)];
8903
8903
  });
8904
- n.length && (J++, Promise.all(n).then(() => {
8905
- J--, W.value && !X.value && Ne(), Te();
8904
+ n.length && (oe++, Promise.all(n).then(() => {
8905
+ oe--, W.value && !ue.value && Fe(), De();
8906
8906
  }));
8907
8907
  };
8908
8908
  }
8909
- function Me() {
8910
- W.value = !0, Ne(), Te();
8909
+ function Pe() {
8910
+ W.value = !0, Fe(), De();
8911
8911
  }
8912
- function Ne() {
8912
+ function Fe() {
8913
8913
  let e = R.value;
8914
- e && !J && (e.scrollTop = e.scrollHeight);
8914
+ e && !oe && (e.scrollTop = e.scrollHeight);
8915
8915
  }
8916
- function Fe(e) {
8917
- let t = Y.messages.value, n = e + 1;
8918
- for (; n < t.length && (t[n].role !== "user" || Yn(t[n]));) n++;
8916
+ function Le(e) {
8917
+ let t = J.messages.value, n = e + 1;
8918
+ for (; n < t.length && (t[n].role !== "user" || Zn(t[n]));) n++;
8919
8919
  return n;
8920
8920
  }
8921
- function Le(e) {
8922
- let t = Y.messages.value, n = e;
8923
- for (; n > 0 && (t[n].role !== "user" || Yn(t[n]));) n--;
8921
+ function ze(e) {
8922
+ let t = J.messages.value, n = e;
8923
+ for (; n > 0 && (t[n].role !== "user" || Zn(t[n]));) n--;
8924
8924
  return n;
8925
8925
  }
8926
- async function Re(e) {
8927
- W.value = !0, Y.setMessages(Y.messages.value.slice(0, e)), await Y.reload();
8926
+ async function Be(e) {
8927
+ W.value = !0, J.setMessages(J.messages.value.slice(0, e)), await J.reload();
8928
8928
  }
8929
- async function He(e, t) {
8929
+ async function We(e, t) {
8930
8930
  W.value = !0;
8931
- let n = Y.messages.value[e].parts.filter((e) => e.type === "image" || e.type === "audio" || e.type === "video");
8932
- Y.setMessages(Y.messages.value.slice(0, e)), n.length ? await Y.sendMessage({ content: [{
8931
+ let n = J.messages.value[e].parts.filter((e) => e.type === "image" || e.type === "audio" || e.type === "video");
8932
+ J.setMessages(J.messages.value.slice(0, e)), n.length ? await J.sendMessage({ content: [{
8933
8933
  type: "text",
8934
8934
  content: t
8935
- }, ...n] }) : await Y.sendMessage(t);
8935
+ }, ...n] }) : await J.sendMessage(t);
8936
8936
  }
8937
- async function We(e) {
8938
- let t = Y.messages.value, n = [...t.slice(0, Le(e)), ...t.slice(Fe(e))];
8939
- if (Y.setMessages(n), !n.length) {
8937
+ async function Ke(e) {
8938
+ let t = J.messages.value, n = [...t.slice(0, ze(e)), ...t.slice(Le(e))];
8939
+ if (J.setMessages(n), !n.length) {
8940
8940
  p("emptied");
8941
8941
  return;
8942
8942
  }
8943
8943
  try {
8944
- await Ve(f.threadId, n);
8944
+ await Ue(f.threadId, n);
8945
8945
  } catch (e) {
8946
8946
  e?.response?.status !== 404 && S.add({
8947
8947
  severity: "error",
@@ -8950,9 +8950,9 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
8950
8950
  });
8951
8951
  }
8952
8952
  }
8953
- async function Ge(e) {
8953
+ async function qe(e) {
8954
8954
  try {
8955
- let t = await Be(f.threadId, Fe(e) - 1);
8955
+ let t = await He(f.threadId, Le(e) - 1);
8956
8956
  p("branched", t);
8957
8957
  } catch (e) {
8958
8958
  S.add({
@@ -8962,9 +8962,9 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
8962
8962
  });
8963
8963
  }
8964
8964
  }
8965
- async function Ke(e) {
8965
+ async function Je(e) {
8966
8966
  if (W.value = !0, !e.attachments.length) {
8967
- await Y.sendMessage(e.text);
8967
+ await J.sendMessage(e.text);
8968
8968
  return;
8969
8969
  }
8970
8970
  let t = e.text ? [{
@@ -8979,11 +8979,11 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
8979
8979
  mimeType: n.mimeType
8980
8980
  }
8981
8981
  });
8982
- await Y.sendMessage({ content: t });
8982
+ await J.sendMessage({ content: t });
8983
8983
  }
8984
- function Je(e) {
8984
+ function Xe(e) {
8985
8985
  if (e.message.includes("status: 409")) {
8986
- Ye();
8986
+ Ze();
8987
8987
  return;
8988
8988
  }
8989
8989
  S.add({
@@ -8992,89 +8992,89 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
8992
8992
  life: 5e3
8993
8993
  });
8994
8994
  }
8995
- async function Ye() {
8996
- let e = await ze(f.threadId).catch(() => void 0);
8997
- e && (Y.replaceFromStore(e.messages, e.attachments), S.add({
8995
+ async function Ze() {
8996
+ let e = await Ve(f.threadId).catch(() => void 0);
8997
+ e && (J.replaceFromStore(e.messages, e.attachments), S.add({
8998
8998
  severity: "info",
8999
8999
  detail: m("views.assistant.thread_reloaded"),
9000
9000
  life: 5e3
9001
9001
  }));
9002
9002
  }
9003
- function Xe(e) {
9004
- return !Y.busy.value && (Y.replaceFromStore(e.messages, e.attachments), !0);
9005
- }
9006
- return C(() => Y.messages.value, async () => {
9007
- W.value && (await l(), Ne());
9008
- }, { deep: !0 }), C(() => Y.approvals.value.length + Y.questions.value.length, async (e, t) => {
9009
- e <= t || (W.value = !0, await l(), Ne());
9010
- }), C(X, async (e) => {
9011
- e || (ie = void 0), !O.value && (await l(), V.value?.focus());
9012
- }), _e([
9003
+ function Qe(e) {
9004
+ return !J.busy.value && (J.replaceFromStore(e.messages, e.attachments), !0);
9005
+ }
9006
+ return C(() => J.messages.value, async () => {
9007
+ W.value && (await l(), Fe());
9008
+ }, { deep: !0 }), C(() => J.approvals.value.length + J.questions.value.length, async (e, t) => {
9009
+ e <= t || (W.value = !0, await l(), Fe());
9010
+ }), C(ue, async (e) => {
9011
+ e || (ae = void 0), !O.value && (await l(), V.value?.focus());
9012
+ }), ye([
9013
9013
  R,
9014
9014
  B,
9015
9015
  H
9016
9016
  ], () => {
9017
- X.value ? ke() : W.value && Ne(), Te();
9018
- }), o(ut(je)), L(async () => {
9019
- await l(), Ne(), O.value || V.value?.focus(), f.initialPrompt && await Ke({
9017
+ ue.value ? je() : W.value && Fe(), De();
9018
+ }), o(ft(Ne)), L(async () => {
9019
+ await l(), Fe(), O.value || V.value?.focus(), f.initialPrompt && await Je({
9020
9020
  text: f.initialPrompt,
9021
9021
  attachments: []
9022
9022
  });
9023
- }), r({ refreshFromStore: Xe }), (r, o) => {
9024
- let c = De, l = $t, u = Ri, f = ei, p = Ae, m = qe, v = Zr, b = Dr, S = Pt, C = Tt, D = Ie, O = Pe, M = z, P = ee;
9023
+ }), r({ refreshFromStore: Qe }), (r, o) => {
9024
+ let c = ke, l = tn, u = Bi, f = ni, p = Me, m = Ye, v = $r, b = kr, S = It, C = Dt, D = Re, O = Ie, M = z, P = ee;
9025
9025
  return a(), w("div", {
9026
9026
  ref_key: "rootRef",
9027
- ref: q,
9027
+ ref: re,
9028
9028
  class: "relative flex h-full min-h-0 flex-col"
9029
9029
  }, [k("div", {
9030
9030
  ref_key: "scrollRef",
9031
9031
  ref: R,
9032
- class: d(["flex-1 min-h-0 overflow-y-auto px-4", { "flex flex-col pb-[8vh]": y(X) }]),
9033
- onScrollPassive: Ce
9034
- }, [y(X) ? (a(), w("div", {
9032
+ class: d(["flex-1 min-h-0 overflow-y-auto px-4", { "flex flex-col pb-[8vh]": y(ue) }]),
9033
+ onScrollPassive: Te
9034
+ }, [y(ue) ? (a(), w("div", {
9035
9035
  key: 0,
9036
9036
  ref_key: "welcomeRef",
9037
9037
  ref: H,
9038
9038
  class: "m-auto w-full max-w-2xl py-6"
9039
9039
  }, [
9040
- k("div", uu, [k("div", du, [I(c, { class: "w-6 h-6 text-color" })]), k("h1", fu, [j(s(y(be)) + " ", 1), k("span", pu, s(r.$t("views.assistant.greeting_sub")), 1)])]),
9041
- y(ue)?.capabilities?.toolCalling === !1 ? (a(), h(l, {
9040
+ k("div", uu, [k("div", du, [I(c, { class: "w-6 h-6 text-color" })]), k("h1", fu, [j(s(y(Se)) + " ", 1), k("span", pu, s(r.$t("views.assistant.greeting_sub")), 1)])]),
9041
+ y(pe)?.capabilities?.toolCalling === !1 ? (a(), h(l, {
9042
9042
  key: 0,
9043
9043
  class: "mb-4",
9044
- title: r.$t("views.assistant.notice_tools_title", { model: y(ue).name }),
9044
+ title: r.$t("views.assistant.notice_tools_title", { model: y(pe).name }),
9045
9045
  text: r.$t("views.assistant.notice_tools_text")
9046
9046
  }, null, 8, ["title", "text"])) : g("", !0),
9047
9047
  I(v, {
9048
9048
  ref_key: "composerRef",
9049
9049
  ref: V,
9050
- busy: y(Y).busy.value,
9051
- "vision-missing": y(de),
9050
+ busy: y(J).busy.value,
9051
+ "vision-missing": y(me),
9052
9052
  compact: e.compact,
9053
9053
  placeholder: r.$t("views.assistant.composer_placeholder"),
9054
- "tray-open": !!y(K),
9055
- style: T({ "--cui-tray-max": `${y(ce)}px` }),
9056
- onSend: Ke,
9057
- onStop: o[8] ||= (e) => y(Y).stop()
9054
+ "tray-open": !!y(q),
9055
+ style: T({ "--cui-tray-max": `${y(Y)}px` }),
9056
+ onSend: Je,
9057
+ onStop: o[8] ||= (e) => y(J).stop()
9058
9058
  }, {
9059
9059
  tray: x(() => [I(t, {
9060
9060
  name: "cui-assistant-tray",
9061
9061
  duration: 220
9062
9062
  }, {
9063
- default: x(() => [y(K) ? (a(), h(u, {
9063
+ default: x(() => [y(q) ? (a(), h(u, {
9064
9064
  key: 0,
9065
- instructions: y(te),
9066
- "onUpdate:instructions": o[0] ||= (e) => _(te) ? te.value = e : null,
9065
+ instructions: y(K),
9066
+ "onUpdate:instructions": o[0] ||= (e) => _(K) ? K.value = e : null,
9067
9067
  "disabled-groups": y(G),
9068
9068
  "onUpdate:disabledGroups": o[1] ||= (e) => _(G) ? G.value = e : null,
9069
- "model-id": y(se),
9070
- "onUpdate:modelId": o[2] ||= (e) => _(se) ? se.value = e : null,
9069
+ "model-id": y(le),
9070
+ "onUpdate:modelId": o[2] ||= (e) => _(le) ? le.value = e : null,
9071
9071
  "profile-id": y(ne),
9072
9072
  "onUpdate:profileId": o[3] ||= (e) => _(ne) ? ne.value = e : null,
9073
- panel: y(K),
9074
- groups: y(ge),
9075
- models: y(Z),
9076
- "default-model-id": y(le)?._id,
9077
- onClose: o[4] ||= (e) => K.value = null,
9073
+ panel: y(q),
9074
+ groups: y(ve),
9075
+ models: y(de),
9076
+ "default-model-id": y(fe)?._id,
9077
+ onClose: o[4] ||= (e) => q.value = null,
9078
9078
  onRefocus: o[5] ||= (e) => y(V)?.focus()
9079
9079
  }, null, 8, [
9080
9080
  "instructions",
@@ -9093,8 +9093,8 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9093
9093
  severity: "secondary",
9094
9094
  text: "",
9095
9095
  rounded: "",
9096
- disabled: y(Y).busy.value,
9097
- onClick: o[6] ||= (e) => we("tools")
9096
+ disabled: y(J).busy.value,
9097
+ onClick: o[6] ||= (e) => Ee("tools")
9098
9098
  }, {
9099
9099
  icon: x(() => [I(f, { class: "w-4 h-4" })]),
9100
9100
  _: 1
@@ -9103,12 +9103,12 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9103
9103
  { value: r.$t("views.assistant.tools_title") },
9104
9104
  void 0,
9105
9105
  { top: !0 }
9106
- ]]), y(G).length ? (a(), w("span", hu, s(y(ve).length), 1)) : g("", !0)]), k("span", gu, [A((a(), h(p, {
9106
+ ]]), y(G).length ? (a(), w("span", hu, s(y(be).length), 1)) : g("", !0)]), k("span", gu, [A((a(), h(p, {
9107
9107
  type: "button",
9108
9108
  severity: "secondary",
9109
9109
  text: "",
9110
9110
  rounded: "",
9111
- onClick: o[7] ||= (e) => we("memory")
9111
+ onClick: o[7] ||= (e) => Ee("memory")
9112
9112
  }, {
9113
9113
  icon: x(() => [I(m, { class: "w-4 h-4" })]),
9114
9114
  _: 1
@@ -9131,7 +9131,7 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9131
9131
  key: e,
9132
9132
  type: "button",
9133
9133
  class: "cui-assistant-chip cursor-pointer rounded-full px-3.5 py-1.5 text-[13px]",
9134
- onClick: (t) => Ke({
9134
+ onClick: (t) => Je({
9135
9135
  text: e,
9136
9136
  attachments: []
9137
9137
  })
@@ -9142,27 +9142,27 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9142
9142
  ref: B,
9143
9143
  class: "mx-auto flex w-full max-w-[720px] flex-col gap-7 pt-6 pb-4"
9144
9144
  }, [
9145
- (a(!0), w(E, null, i(y(he), (e) => (a(), h(b, {
9145
+ (a(!0), w(E, null, i(y(_e), (e) => (a(), h(b, {
9146
9146
  key: e.message.id,
9147
9147
  message: e.message,
9148
- streaming: y(Y).isLoading.value && e.lastIndex === y(Y).messages.value.length - 1 && e.message.role === "assistant",
9149
- working: y(fe) && e.lastIndex === y(Y).messages.value.length - 1 && e.message.role === "assistant",
9150
- busy: y(Y).busy.value,
9148
+ streaming: y(J).isLoading.value && e.lastIndex === y(J).messages.value.length - 1 && e.message.role === "assistant",
9149
+ working: y(he) && e.lastIndex === y(J).messages.value.length - 1 && e.message.role === "assistant",
9150
+ busy: y(J).busy.value,
9151
9151
  continuation: e.continuation,
9152
- stopped: e.ids.includes(y(Y).stoppedId.value ?? ""),
9153
- "tool-images": y(Y).toolImages.value,
9154
- "tool-references": y(Y).toolReferences.value,
9155
- "tool-cards": y(Y).toolCards.value,
9156
- "tool-settings": y(Y).toolSettings.value,
9157
- "tool-notices": y(Y).toolNotices.value,
9158
- "model-id": y(ue)?._id,
9159
- usage: Se(e),
9152
+ stopped: e.ids.includes(y(J).stoppedId.value ?? ""),
9153
+ "tool-images": y(J).toolImages.value,
9154
+ "tool-references": y(J).toolReferences.value,
9155
+ "tool-cards": y(J).toolCards.value,
9156
+ "tool-settings": y(J).toolSettings.value,
9157
+ "tool-notices": y(J).toolNotices.value,
9158
+ "model-id": y(pe)?._id,
9159
+ usage: we(e),
9160
9160
  class: d({ "-mt-5": e.continuation }),
9161
- onRegenerate: (t) => Re(e.index),
9162
- onEdit: (t) => He(e.index, t),
9163
- onDelete: (t) => We(e.index),
9164
- onBranch: (t) => Ge(e.index),
9165
- onContinue: o[9] ||= (e) => y(Y).continueAnswer()
9161
+ onRegenerate: (t) => Be(e.index),
9162
+ onEdit: (t) => We(e.index, t),
9163
+ onDelete: (t) => Ke(e.index),
9164
+ onBranch: (t) => qe(e.index),
9165
+ onContinue: o[9] ||= (e) => y(J).continueAnswer()
9166
9166
  }, null, 8, [
9167
9167
  "message",
9168
9168
  "streaming",
@@ -9183,24 +9183,24 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9183
9183
  "onDelete",
9184
9184
  "onBranch"
9185
9185
  ]))), 128)),
9186
- y(me) ? (a(), h(b, {
9186
+ y(ge) ? (a(), h(b, {
9187
9187
  key: 0,
9188
- message: y(Bi),
9188
+ message: y(Hi),
9189
9189
  working: "",
9190
9190
  busy: "",
9191
- continuation: y(Yn)(y(Y).messages.value.at(-1)),
9192
- class: d({ "-mt-5": y(Yn)(y(Y).messages.value.at(-1)) })
9191
+ continuation: y(Zn)(y(J).messages.value.at(-1)),
9192
+ class: d({ "-mt-5": y(Zn)(y(J).messages.value.at(-1)) })
9193
9193
  }, null, 8, [
9194
9194
  "message",
9195
9195
  "continuation",
9196
9196
  "class"
9197
9197
  ])) : g("", !0),
9198
- (a(!0), w(E, null, i(y(Y).approvals.value, (e) => (a(), h(S, {
9198
+ (a(!0), w(E, null, i(y(J).approvals.value, (e) => (a(), h(S, {
9199
9199
  key: e.id,
9200
9200
  "tool-name": e.toolName,
9201
9201
  args: e.originalArgs,
9202
9202
  "can-resolve": e.canResolve,
9203
- busy: y(Y).resuming.value,
9203
+ busy: y(J).resuming.value,
9204
9204
  onApprove: (t) => t ? e.resolveInterrupt(!0, { editedArgs: t }) : e.resolveInterrupt(!0),
9205
9205
  onReject: (t) => e.resolveInterrupt(!1)
9206
9206
  }, null, 8, [
@@ -9211,7 +9211,7 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9211
9211
  "onApprove",
9212
9212
  "onReject"
9213
9213
  ]))), 128)),
9214
- (a(!0), w(E, null, i(y(Y).questions.value, (e) => (a(), h(C, {
9214
+ (a(!0), w(E, null, i(y(J).questions.value, (e) => (a(), h(C, {
9215
9215
  key: e.id,
9216
9216
  question: e.payload ?? {
9217
9217
  toolCallId: e.id,
@@ -9219,7 +9219,7 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9219
9219
  kind: "text"
9220
9220
  },
9221
9221
  "can-resolve": e.canResolve,
9222
- busy: y(Y).resuming.value,
9222
+ busy: y(J).resuming.value,
9223
9223
  onAnswer: (t) => e.resolveInterrupt({ answer: t }),
9224
9224
  onSkip: (t) => e.cancel()
9225
9225
  }, null, 8, [
@@ -9229,15 +9229,15 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9229
9229
  "onAnswer",
9230
9230
  "onSkip"
9231
9231
  ]))), 128)),
9232
- y(Y).pausedElsewhere.value ? (a(), w("div", bu, s(r.$t("views.assistant.paused_elsewhere")), 1)) : g("", !0),
9233
- y(Y).error.value ? (a(), w("div", xu, [k("strong", Su, s(y(Y).error.value.message), 1)])) : g("", !0)
9234
- ], 512))], 34), y(X) ? g("", !0) : (a(), w("div", {
9232
+ y(J).pausedElsewhere.value ? (a(), w("div", bu, s(r.$t("views.assistant.paused_elsewhere")), 1)) : g("", !0),
9233
+ y(J).error.value ? (a(), w("div", xu, [k("strong", Su, s(y(J).error.value.message), 1)])) : g("", !0)
9234
+ ], 512))], 34), y(ue) ? g("", !0) : (a(), w("div", {
9235
9235
  key: 0,
9236
9236
  ref_key: "bottomRef",
9237
9237
  ref: U,
9238
- class: "relative px-4 pb-3 pt-6"
9238
+ class: "relative px-4 pt-6 pb-[var(--cui-bottom-gap,max(8px,var(--safe-area-inset-bottom)))]"
9239
9239
  }, [k("div", Cu, [
9240
- y(Y).queue.value.length ? (a(), w("div", wu, [(a(!0), w(E, null, i(y(Y).queue.value, (e) => (a(), w("div", {
9240
+ y(J).queue.value.length ? (a(), w("div", wu, [(a(!0), w(E, null, i(y(J).queue.value, (e) => (a(), w("div", {
9241
9241
  key: e.id,
9242
9242
  class: "cui-assistant-queued flex items-center gap-2 rounded-lg px-3 py-1.5 text-[13px] text-muted"
9243
9243
  }, [
@@ -9249,7 +9249,7 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9249
9249
  text: "",
9250
9250
  rounded: "",
9251
9251
  class: "cui-icon-md shrink-0",
9252
- onClick: (t) => y(Y).cancelQueued(e.id)
9252
+ onClick: (t) => y(J).cancelQueued(e.id)
9253
9253
  }, {
9254
9254
  icon: x(() => [I(O, { class: "w-3.5 h-3.5" })]),
9255
9255
  _: 1
@@ -9263,17 +9263,17 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9263
9263
  I(v, {
9264
9264
  ref_key: "composerRef",
9265
9265
  ref: V,
9266
- busy: y(Y).busy.value,
9267
- "vision-missing": y(de),
9266
+ busy: y(J).busy.value,
9267
+ "vision-missing": y(me),
9268
9268
  compact: e.compact,
9269
9269
  placeholder: r.$t("views.assistant.composer_placeholder"),
9270
- "tray-open": !!y(K),
9271
- style: T({ "--cui-tray-max": `${y(ce)}px` }),
9272
- onSend: Ke,
9273
- onStop: o[20] ||= (e) => y(Y).stop()
9270
+ "tray-open": !!y(q),
9271
+ style: T({ "--cui-tray-max": `${y(Y)}px` }),
9272
+ onSend: Je,
9273
+ onStop: o[20] ||= (e) => y(J).stop()
9274
9274
  }, {
9275
9275
  above: x(() => [I(t, { name: "cui-assistant-fade" }, {
9276
- default: x(() => [!y(re) && !y(K) ? A((a(), h(p, {
9276
+ default: x(() => [!y(ie) && !y(q) ? A((a(), h(p, {
9277
9277
  key: 0,
9278
9278
  type: "button",
9279
9279
  rounded: "",
@@ -9282,7 +9282,7 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9282
9282
  "data-keep-keyboard": "",
9283
9283
  onPointerdown: o[10] ||= n(() => {}, ["prevent"]),
9284
9284
  onMousedown: o[11] ||= n(() => {}, ["prevent"]),
9285
- onClick: Me
9285
+ onClick: Pe
9286
9286
  }, {
9287
9287
  icon: x(() => [I(M, { class: "w-4 h-4" })]),
9288
9288
  _: 1
@@ -9298,21 +9298,21 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9298
9298
  name: "cui-assistant-tray",
9299
9299
  duration: 220
9300
9300
  }, {
9301
- default: x(() => [y(K) ? (a(), h(u, {
9301
+ default: x(() => [y(q) ? (a(), h(u, {
9302
9302
  key: 0,
9303
- instructions: y(te),
9304
- "onUpdate:instructions": o[12] ||= (e) => _(te) ? te.value = e : null,
9303
+ instructions: y(K),
9304
+ "onUpdate:instructions": o[12] ||= (e) => _(K) ? K.value = e : null,
9305
9305
  "disabled-groups": y(G),
9306
9306
  "onUpdate:disabledGroups": o[13] ||= (e) => _(G) ? G.value = e : null,
9307
- "model-id": y(se),
9308
- "onUpdate:modelId": o[14] ||= (e) => _(se) ? se.value = e : null,
9307
+ "model-id": y(le),
9308
+ "onUpdate:modelId": o[14] ||= (e) => _(le) ? le.value = e : null,
9309
9309
  "profile-id": y(ne),
9310
9310
  "onUpdate:profileId": o[15] ||= (e) => _(ne) ? ne.value = e : null,
9311
- panel: y(K),
9312
- groups: y(ge),
9313
- models: y(Z),
9314
- "default-model-id": y(le)?._id,
9315
- onClose: o[16] ||= (e) => K.value = null,
9311
+ panel: y(q),
9312
+ groups: y(ve),
9313
+ models: y(de),
9314
+ "default-model-id": y(fe)?._id,
9315
+ onClose: o[16] ||= (e) => q.value = null,
9316
9316
  onRefocus: o[17] ||= (e) => y(V)?.focus()
9317
9317
  }, null, 8, [
9318
9318
  "instructions",
@@ -9331,8 +9331,8 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9331
9331
  severity: "secondary",
9332
9332
  text: "",
9333
9333
  rounded: "",
9334
- disabled: y(Y).busy.value,
9335
- onClick: o[18] ||= (e) => we("tools")
9334
+ disabled: y(J).busy.value,
9335
+ onClick: o[18] ||= (e) => Ee("tools")
9336
9336
  }, {
9337
9337
  icon: x(() => [I(f, { class: "w-4 h-4" })]),
9338
9338
  _: 1
@@ -9341,12 +9341,12 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9341
9341
  { value: r.$t("views.assistant.tools_title") },
9342
9342
  void 0,
9343
9343
  { top: !0 }
9344
- ]]), y(G).length ? (a(), w("span", Du, s(y(ve).length), 1)) : g("", !0)]), k("span", Ou, [A((a(), h(p, {
9344
+ ]]), y(G).length ? (a(), w("span", Du, s(y(be).length), 1)) : g("", !0)]), k("span", Ou, [A((a(), h(p, {
9345
9345
  type: "button",
9346
9346
  severity: "secondary",
9347
9347
  text: "",
9348
9348
  rounded: "",
9349
- onClick: o[19] ||= (e) => we("memory")
9349
+ onClick: o[19] ||= (e) => Ee("memory")
9350
9350
  }, {
9351
9351
  icon: x(() => [I(m, { class: "w-4 h-4" })]),
9352
9352
  _: 1
@@ -9369,7 +9369,7 @@ var uu = { class: "mb-7 flex flex-col items-center gap-3 text-center" }, du = {
9369
9369
  ])], 512))], 512);
9370
9370
  };
9371
9371
  }
9372
- }), [["__scopeId", "data-v-868dcc17"]]), Mu = {
9372
+ }), [["__scopeId", "data-v-cd6424e5"]]), Mu = {
9373
9373
  viewBox: "0 0 24 24",
9374
9374
  width: "1.2em",
9375
9375
  height: "1.2em"
@@ -9394,8 +9394,8 @@ var Pu = p({
9394
9394
  class: "flex min-h-0 flex-1 flex-col overflow-y-auto px-2 pb-3"
9395
9395
  }, Bu = { class: "cui-assistant-group px-2 pt-3.5 pb-1 text-[11.5px] font-medium text-muted" }, Vu = ["onClick"], Hu = { class: "min-w-0 flex-1 truncate" }, Uu = {
9396
9396
  key: 3,
9397
- class: "cui-assistant-sidebar-foot px-3 py-2"
9398
- }, Wu = /*#__PURE__*/ q(/* @__PURE__ */ P({
9397
+ class: "cui-assistant-sidebar-foot px-3 pt-2"
9398
+ }, Wu = /*#__PURE__*/ U(/* @__PURE__ */ P({
9399
9399
  __name: "CuiAssistantSidebar",
9400
9400
  props: {
9401
9401
  threads: {},
@@ -9419,8 +9419,8 @@ var Pu = p({
9419
9419
  "close"
9420
9420
  ],
9421
9421
  setup(e, { emit: t }) {
9422
- let r = e, o = t, { topbarOffset: c, bottombarHeight: l } = K(), u = D("sidebarRef"), f = F(""), p = b(() => r.isOpen ? 288 : 0), m = b(() => {
9423
- let e = f.value.trim().toLowerCase(), t = r.threads.filter((t) => !e || t.title.toLowerCase().includes(e)).sort((e, t) => t.updatedAt - e.updatedAt), n = [
9422
+ let r = e, o = t, { topbarOffset: c } = K(), l = D("sidebarRef"), u = F(""), f = b(() => r.isOpen ? 288 : 0), p = b(() => {
9423
+ let e = u.value.trim().toLowerCase(), t = r.threads.filter((t) => !e || t.title.toLowerCase().includes(e)).sort((e, t) => t.updatedAt - e.updatedAt), n = [
9424
9424
  "today",
9425
9425
  "yesterday",
9426
9426
  "week",
@@ -9428,7 +9428,7 @@ var Pu = p({
9428
9428
  "older"
9429
9429
  ], i = /* @__PURE__ */ new Map();
9430
9430
  for (let e of t) {
9431
- let t = v(e.updatedAt);
9431
+ let t = m(e.updatedAt);
9432
9432
  i.set(t, [...i.get(t) ?? [], e]);
9433
9433
  }
9434
9434
  return n.filter((e) => i.has(e)).map((e) => ({
@@ -9436,28 +9436,28 @@ var Pu = p({
9436
9436
  threads: i.get(e)
9437
9437
  }));
9438
9438
  });
9439
- function v(e) {
9439
+ function m(e) {
9440
9440
  let t = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), n = Math.round((t(/* @__PURE__ */ new Date()) - t(new Date(e))) / 864e5);
9441
9441
  return n <= 0 ? "today" : n === 1 ? "yesterday" : n <= 7 ? "week" : n <= 30 ? "month" : "older";
9442
9442
  }
9443
- return be(u, (e) => {
9443
+ return Se(l, (e) => {
9444
9444
  r.isOpen && r.isOverlay && (e.target.closest("#assistant-sidebar-toggle") || o("close"));
9445
9445
  }), (t, r) => {
9446
- let v = Pu, b = Ae, S = Je, C = We, D = Me, O = Ne, M = je, N = G, P = U, F = ee;
9446
+ let m = Pu, v = Me, b = Xe, S = Ke, C = Pe, D = Fe, O = Ne, M = ie, N = W, P = ee;
9447
9447
  return a(), w("nav", {
9448
9448
  ref_key: "sidebarRef",
9449
- ref: u,
9450
- class: "cui-assistant-sidebar fixed transition-all duration-200 overflow-hidden md:!pl-0 pl-safe pb-safe flex flex-col z-4",
9449
+ ref: l,
9450
+ class: "cui-assistant-sidebar fixed transition-all duration-200 overflow-hidden md:!pl-0 pl-safe flex flex-col z-4",
9451
9451
  style: T({
9452
- width: `${y(p)}px`,
9452
+ width: `${y(f)}px`,
9453
9453
  borderRightWidth: e.isOpen ? "1px" : "0px",
9454
- paddingBottom: `calc(var(--safe-area-inset-top) + var(--safe-area-inset-bottom) + ${y(l)}px + ${y(c)}px)`
9454
+ paddingBottom: `calc(var(--safe-area-inset-top) + ${y(c)}px + var(--cui-bottom-bar) + var(--cui-bottom-gap))`
9455
9455
  })
9456
9456
  }, [k("div", {
9457
9457
  class: "flex h-full min-h-0 flex-col",
9458
9458
  style: T({ width: `${y(288)}px` })
9459
9459
  }, [
9460
- k("div", Fu, [k("span", Iu, s(t.$t("views.assistant.conversations")), 1), e.collapsible ? A((a(), h(b, {
9460
+ k("div", Fu, [k("span", Iu, s(t.$t("views.assistant.conversations")), 1), e.collapsible ? A((a(), h(v, {
9461
9461
  key: 0,
9462
9462
  type: "button",
9463
9463
  severity: "secondary",
@@ -9466,13 +9466,13 @@ var Pu = p({
9466
9466
  class: "cui-icon-md ml-auto shrink-0",
9467
9467
  onClick: r[0] ||= (e) => o("close")
9468
9468
  }, {
9469
- icon: x(() => [I(v, {
9469
+ icon: x(() => [I(m, {
9470
9470
  width: "100%",
9471
9471
  height: "100%"
9472
9472
  })]),
9473
9473
  _: 1
9474
9474
  })), [[
9475
- F,
9475
+ P,
9476
9476
  { value: t.$t("views.assistant.hide_sidebar") },
9477
9477
  void 0,
9478
9478
  { bottom: !0 }
@@ -9481,27 +9481,27 @@ var Pu = p({
9481
9481
  type: "button",
9482
9482
  class: "cui-assistant-new mx-3 my-2 flex cursor-pointer items-center gap-2 rounded-[10px] px-3 py-2 text-sm font-medium text-color",
9483
9483
  onClick: r[1] ||= (e) => o("create")
9484
- }, [I(S, { class: "w-4 h-4 text-primary" }), j(" " + s(t.$t("views.assistant.new_conversation")), 1)]),
9485
- I(M, { class: "mx-3 mb-1" }, {
9486
- default: x(() => [I(D, null, {
9487
- default: x(() => [I(C, { class: "w-4 h-4" })]),
9484
+ }, [I(b, { class: "w-4 h-4 text-primary" }), j(" " + s(t.$t("views.assistant.new_conversation")), 1)]),
9485
+ I(O, { class: "mx-3 mb-1" }, {
9486
+ default: x(() => [I(C, null, {
9487
+ default: x(() => [I(S, { class: "w-4 h-4" })]),
9488
9488
  _: 1
9489
- }), I(O, {
9490
- modelValue: y(f),
9491
- "onUpdate:modelValue": r[2] ||= (e) => _(f) ? f.value = e : null,
9489
+ }), I(D, {
9490
+ modelValue: y(u),
9491
+ "onUpdate:modelValue": r[2] ||= (e) => _(u) ? u.value = e : null,
9492
9492
  placeholder: t.$t("views.assistant.search_placeholder"),
9493
9493
  class: "cui-assistant-search w-full text-sm"
9494
9494
  }, null, 8, ["modelValue", "placeholder"])]),
9495
9495
  _: 1
9496
9496
  }),
9497
- e.loading ? (a(), w("div", Lu, [I(N, {
9497
+ e.loading ? (a(), w("div", Lu, [I(M, {
9498
9498
  class: "w-[24px] h-[24px] m-0",
9499
9499
  "stroke-width": "5"
9500
- })])) : y(m).length ? (a(), w("div", zu, [(a(!0), w(E, null, i(y(m), (r) => (a(), w(E, { key: r.key }, [k("span", Bu, s(t.$t(`views.assistant.group_${r.key}`)), 1), (a(!0), w(E, null, i(r.threads, (r) => (a(), w("div", {
9500
+ })])) : y(p).length ? (a(), w("div", zu, [(a(!0), w(E, null, i(y(p), (r) => (a(), w(E, { key: r.key }, [k("span", Bu, s(t.$t(`views.assistant.group_${r.key}`)), 1), (a(!0), w(E, null, i(r.threads, (r) => (a(), w("div", {
9501
9501
  key: r.id,
9502
9502
  class: d(["cui-assistant-item group relative flex items-center gap-2 rounded-md py-1.5 pl-3 pr-2 text-[13.5px] cursor-pointer select-none", { active: r.id === e.activeId }]),
9503
9503
  onClick: (e) => o("select", r.id)
9504
- }, [k("span", Hu, s(r.title), 1), A((a(), h(b, {
9504
+ }, [k("span", Hu, s(r.title), 1), A((a(), h(v, {
9505
9505
  type: "button",
9506
9506
  severity: "secondary",
9507
9507
  text: "",
@@ -9509,18 +9509,18 @@ var Pu = p({
9509
9509
  class: "cui-assistant-item-delete cui-icon-sm shrink-0 opacity-0 group-hover:opacity-100 focus:opacity-100",
9510
9510
  onClick: n((e) => o("delete", r.id), ["stop"])
9511
9511
  }, {
9512
- icon: x(() => [I(P, {
9512
+ icon: x(() => [I(N, {
9513
9513
  width: "100%",
9514
9514
  height: "100%"
9515
9515
  })]),
9516
9516
  _: 1
9517
9517
  }, 8, ["onClick"])), [[
9518
- F,
9518
+ P,
9519
9519
  { value: t.$t("views.assistant.delete_conversation") },
9520
9520
  void 0,
9521
9521
  { left: !0 }
9522
- ]])], 10, Vu))), 128))], 64))), 128))])) : (a(), w("div", Ru, s(y(f) ? t.$t("views.assistant.no_matches") : t.$t("views.assistant.no_conversations")), 1)),
9523
- e.threads.length ? (a(), w("div", Uu, [I(b, {
9522
+ ]])], 10, Vu))), 128))], 64))), 128))])) : (a(), w("div", Ru, s(y(u) ? t.$t("views.assistant.no_matches") : t.$t("views.assistant.no_conversations")), 1)),
9523
+ e.threads.length ? (a(), w("div", Uu, [I(v, {
9524
9524
  type: "button",
9525
9525
  severity: "danger",
9526
9526
  text: "",
@@ -9531,8 +9531,8 @@ var Pu = p({
9531
9531
  ], 4)], 4);
9532
9532
  };
9533
9533
  }
9534
- }), [["__scopeId", "data-v-90cac378"]]), Gu = ge(() => {
9535
- let e = ve("cui-assistant-drawer-open", !1), t = ve("cui-assistant-drawer-mini", !1), n = ve("cui-assistant-drawer-thread", Z()), { smBreakpoint: r } = ne();
9534
+ }), [["__scopeId", "data-v-c3b7f26f"]]), Gu = ve(() => {
9535
+ let e = be("cui-assistant-drawer-open", !1), t = be("cui-assistant-drawer-mini", !1), n = be("cui-assistant-drawer-thread", Y()), { smBreakpoint: r } = ae();
9536
9536
  (!t.value || r.value) && (e.value = !1);
9537
9537
  let i = F([]), a = F({}), o = F(null), s = F();
9538
9538
  function c(t) {
@@ -9545,7 +9545,7 @@ var Pu = p({
9545
9545
  e.value = !e.value;
9546
9546
  }
9547
9547
  function d() {
9548
- s.value = void 0, i.value = [], a.value = {}, o.value = null, n.value = Z();
9548
+ s.value = void 0, i.value = [], a.value = {}, o.value = null, n.value = Y();
9549
9549
  }
9550
9550
  function f(e) {
9551
9551
  s.value = void 0, i.value = e.messages, a.value = e.attachments, o.value = e.modelId ?? null, n.value = e._id;
@@ -9572,56 +9572,56 @@ var Pu = p({
9572
9572
  class: "relative z-2 ml-3 truncate text-[13.5px] text-muted max-w-[46ch]"
9573
9573
  }, Zu = {
9574
9574
  key: 1,
9575
- class: "fixed right-0 z-10 h-[calc(40px+1rem)] py-2 pr-2 flex items-center"
9575
+ class: "fixed right-0 z-10 h-[calc(40px+1rem)] py-2 pr-safe-offset-2 flex items-center"
9576
9576
  }, Qu = {
9577
9577
  key: 0,
9578
9578
  class: "flex flex-1 items-center justify-center"
9579
9579
  }, $u = {
9580
9580
  key: 1,
9581
9581
  class: "flex flex-1 flex-col items-center justify-center gap-5 px-6 text-center"
9582
- }, ed = { class: "cui-assistant-hero-icon flex h-16 w-16 items-center justify-center rounded-full" }, td = { class: "max-w-md" }, nd = { class: "text-lg font-semibold text-color" }, rd = { class: "mt-1 text-sm text-muted" }, id = /*#__PURE__*/ q(/* @__PURE__ */ P({
9582
+ }, ed = { class: "cui-assistant-hero-icon flex h-16 w-16 items-center justify-center rounded-full" }, td = { class: "max-w-md" }, nd = { class: "text-lg font-semibold text-color" }, rd = { class: "mt-1 text-sm text-muted" }, id = /*#__PURE__*/ U(/* @__PURE__ */ P({
9583
9583
  __name: "Assistant",
9584
9584
  setup(e) {
9585
- let t = new Ue(), n = re(), r = ie(), { t: i } = Ee(), { smBreakpoint: o, mdBreakpoint: c, xlBreakpoint: u } = ne(), { openTextDialog: f } = X(), p = ce("/notifications"), m = Gu(), _ = Y(), { user: v } = Te(_), { data: E, isLoading: O } = t.getAssistantInfoQuery(), { data: j, isLoading: M } = t.listThreadsQuery(), N = t.deleteThreadMutation(), P = t.deleteAllThreadsMutation(), R = D("conversationRef"), z = F(he()), B = F([]), H = F({}), U = F(null), W = F(typeof n.query.prompt == "string" ? n.query.prompt : void 0), te = F(!1), K = F(u.value ? "opened" : "closed"), q = F(!1), J = b(() => E.value?.status.state ?? "disabled"), ae = b(() => !E.value && O.value), oe = b(() => v.value?.role === "admin" || v.value?.role === "master"), se = b(() => (E.value?.tools ?? []).filter((e) => e.approval)), ue = b(() => K.value === "opened"), de = b(() => j.value?.find((e) => e.id === z.value)?.title ?? ""), fe = b(() => c.value), pe = b(() => c.value || J.value !== "ready" ? "0px" : ue.value ? "288px" : "0px"), me = b(() => [
9585
+ let t = new Ge(), n = ne(), r = q(), { t: i } = Oe(), { smBreakpoint: o, mdBreakpoint: c, xlBreakpoint: u } = ae(), { openTextDialog: f } = ge(), p = J("/notifications"), m = Gu(), _ = le(), { user: v } = De(_), { data: E, isLoading: O } = t.getAssistantInfoQuery(), { data: j, isLoading: M } = t.listThreadsQuery(), N = t.deleteThreadMutation(), P = t.deleteAllThreadsMutation(), R = D("conversationRef"), z = F(_e()), B = F([]), H = F({}), U = F(null), W = F(typeof n.query.prompt == "string" ? n.query.prompt : void 0), te = F(!1), G = F(u.value ? "opened" : "closed"), K = F(!1), re = b(() => E.value?.status.state ?? "disabled"), oe = b(() => !E.value && O.value), se = b(() => v.value?.role === "admin" || v.value?.role === "master"), ce = b(() => (E.value?.tools ?? []).filter((e) => e.approval)), ue = b(() => G.value === "opened"), de = b(() => j.value?.find((e) => e.id === z.value)?.title ?? ""), pe = b(() => c.value), me = b(() => c.value || re.value !== "ready" ? "0px" : ue.value ? "288px" : "0px"), he = b(() => [
9586
9586
  i("views.assistant.suggestion_today"),
9587
9587
  i("views.assistant.suggestion_week"),
9588
9588
  i("views.assistant.suggestion_offline"),
9589
9589
  i("views.assistant.suggestion_sensors"),
9590
9590
  i("views.assistant.suggestion_tools")
9591
9591
  ]);
9592
- function he() {
9593
- return Z();
9594
- }
9595
- function ge() {
9596
- K.value = K.value === "opened" ? "closed" : "opened";
9597
- }
9598
9592
  function _e() {
9599
- K.value = "closed";
9593
+ return Y();
9600
9594
  }
9601
9595
  function ve() {
9602
- B.value = [], H.value = {}, U.value = null, W.value = void 0, z.value = he(), fe.value && _e();
9596
+ G.value = G.value === "opened" ? "closed" : "opened";
9597
+ }
9598
+ function ye() {
9599
+ G.value = "closed";
9600
+ }
9601
+ function be() {
9602
+ B.value = [], H.value = {}, U.value = null, W.value = void 0, z.value = _e(), pe.value && ye();
9603
9603
  }
9604
- async function ye(e) {
9605
- if (fe.value && _e(), e !== z.value) {
9604
+ async function xe(e) {
9605
+ if (pe.value && ye(), e !== z.value) {
9606
9606
  te.value = !0;
9607
9607
  try {
9608
- let t = await ze(e);
9608
+ let t = await Ve(e);
9609
9609
  B.value = t.messages, H.value = t.attachments, U.value = t.modelId ?? null, W.value = void 0, z.value = e;
9610
9610
  } finally {
9611
9611
  te.value = !1;
9612
9612
  }
9613
9613
  }
9614
9614
  }
9615
- async function be(e) {
9616
- await N.mutateAsync(e).catch(() => void 0), e === z.value && ve();
9615
+ async function Se(e) {
9616
+ await N.mutateAsync(e).catch(() => void 0), e === z.value && be();
9617
9617
  }
9618
- async function xe(e) {
9618
+ async function Ce(e) {
9619
9619
  B.value = e.messages, H.value = e.attachments, U.value = e.modelId ?? null, W.value = void 0, z.value = e._id, await t.queryClient.refetchQueries({
9620
9620
  queryKey: ["assistant", "threads"],
9621
9621
  exact: !0
9622
9622
  });
9623
9623
  }
9624
- function Se() {
9624
+ function we() {
9625
9625
  f({
9626
9626
  data: {
9627
9627
  title: i("views.assistant.delete_all_conversations"),
@@ -9630,47 +9630,47 @@ var Pu = p({
9630
9630
  confirmButtonProps: { severity: "danger" }
9631
9631
  },
9632
9632
  onConfirm: async () => {
9633
- await P.mutateAsync(), ve();
9633
+ await P.mutateAsync(), be();
9634
9634
  }
9635
9635
  });
9636
9636
  }
9637
- async function Ce(e) {
9637
+ async function Te(e) {
9638
9638
  try {
9639
- await ye(e);
9639
+ await xe(e);
9640
9640
  } catch {
9641
9641
  z.value = e;
9642
9642
  }
9643
9643
  }
9644
- async function we() {
9644
+ async function Ee() {
9645
9645
  await t.queryClient.refetchQueries({
9646
9646
  queryKey: ["assistant", "threads"],
9647
9647
  exact: !0
9648
9648
  });
9649
9649
  }
9650
- async function Oe(e) {
9650
+ async function Ae(e) {
9651
9651
  if (await t.queryClient.refetchQueries({
9652
9652
  queryKey: ["assistant", "threads"],
9653
9653
  exact: !0
9654
9654
  }), e.threadId !== z.value) return;
9655
- let n = await ze(e.threadId).catch(() => void 0);
9655
+ let n = await Ve(e.threadId).catch(() => void 0);
9656
9656
  n && R.value?.refreshFromStore(n);
9657
9657
  }
9658
- function ke() {
9658
+ function je() {
9659
9659
  let e = j.value?.some((e) => e.id === z.value), t = {
9660
9660
  ...n.query,
9661
9661
  thread: e ? z.value : void 0
9662
9662
  };
9663
9663
  t.thread !== n.query.thread && r.replace({ query: t });
9664
9664
  }
9665
- return C([z, j], ke), L(async () => {
9666
- m.close(), p.on("assistant-thread", (e) => Oe(e));
9665
+ return C([z, j], je), L(async () => {
9666
+ m.close(), p.on("assistant-thread", (e) => Ae(e));
9667
9667
  let e = typeof n.query.thread == "string" ? n.query.thread : void 0;
9668
9668
  n.query.prompt !== void 0 && r.replace({ query: {
9669
9669
  ...n.query,
9670
9670
  prompt: void 0
9671
- } }), e && !W.value && await Ce(e), await l(), q.value = !0;
9671
+ } }), e && !W.value && await Te(e), await l(), K.value = !0;
9672
9672
  }), (e, t) => {
9673
- let n = le, r = it, i = Ae, c = V, l = Je, u = Wu, f = Pu, p = G, m = De, _ = ju, v = ee;
9673
+ let n = fe, r = ot, i = Me, c = V, l = Xe, u = Wu, f = Pu, p = ie, m = ke, _ = ju, v = ee;
9674
9674
  return a(), w("div", null, [
9675
9675
  I(n, { position: "center" }, {
9676
9676
  default: x(() => [k("span", Ku, s(e.$t("views.assistant.title")), 1)]),
@@ -9691,7 +9691,7 @@ var Pu = p({
9691
9691
  class: "cui-button p-2 text-color",
9692
9692
  text: "",
9693
9693
  rounded: "",
9694
- onClick: ge
9694
+ onClick: ve
9695
9695
  }, {
9696
9696
  icon: x(() => [I(c, {
9697
9697
  width: "100%",
@@ -9707,8 +9707,8 @@ var Pu = p({
9707
9707
  class: "cui-button p-2 text-color",
9708
9708
  text: "",
9709
9709
  rounded: "",
9710
- disabled: y(J) !== "ready",
9711
- onClick: ve
9710
+ disabled: y(re) !== "ready",
9711
+ onClick: be
9712
9712
  }, {
9713
9713
  icon: x(() => [I(l, {
9714
9714
  width: "100%",
@@ -9718,18 +9718,18 @@ var Pu = p({
9718
9718
  }, 8, ["disabled"])]),
9719
9719
  _: 1
9720
9720
  }),
9721
- y(J) === "ready" ? (a(), h(u, {
9721
+ y(re) === "ready" ? (a(), h(u, {
9722
9722
  key: 0,
9723
9723
  threads: y(j) ?? [],
9724
9724
  "active-id": y(z),
9725
9725
  loading: y(M),
9726
9726
  "is-open": y(ue),
9727
- "is-overlay": y(fe),
9728
- onSelect: ye,
9729
- onCreate: ve,
9730
- onDelete: be,
9731
- onDeleteAll: Se,
9732
- onClose: _e
9727
+ "is-overlay": y(pe),
9728
+ onSelect: xe,
9729
+ onCreate: be,
9730
+ onDelete: Se,
9731
+ onDeleteAll: we,
9732
+ onClose: ye
9733
9733
  }, null, 8, [
9734
9734
  "threads",
9735
9735
  "active-id",
@@ -9740,28 +9740,28 @@ var Pu = p({
9740
9740
  (a(), h(S, {
9741
9741
  to: "#container",
9742
9742
  defer: ""
9743
- }, [y(ue) && y(fe) ? (a(), w("div", {
9743
+ }, [y(ue) && y(pe) ? (a(), w("div", {
9744
9744
  key: 0,
9745
9745
  class: "fixed top-0 left-0 right-0 bottom-0 w-full h-full bg-black/50 z-1",
9746
- onClick: _e
9746
+ onClick: ye
9747
9747
  })) : g("", !0)])),
9748
9748
  k("main", {
9749
9749
  class: "relative w-full h-full",
9750
9750
  style: T({
9751
- paddingLeft: y(pe),
9752
- transition: y(q) ? "padding-left 200ms" : void 0
9751
+ paddingLeft: y(me),
9752
+ transition: y(K) ? "padding-left 200ms" : void 0
9753
9753
  })
9754
9754
  }, [k("div", qu, [
9755
9755
  y(o) ? g("", !0) : (a(), w("div", Ju, [
9756
9756
  t[3] ||= k("div", { class: "ml-2" }, null, -1),
9757
- !y(ue) && y(J) === "ready" ? A((a(), h(i, {
9757
+ !y(ue) && y(re) === "ready" ? A((a(), h(i, {
9758
9758
  key: 0,
9759
9759
  id: "assistant-sidebar-toggle",
9760
9760
  severity: "secondary",
9761
9761
  class: "mr-2 cui-icon-lg relative z-2",
9762
9762
  text: "",
9763
9763
  rounded: "",
9764
- onClick: ge
9764
+ onClick: ve
9765
9765
  }, {
9766
9766
  icon: x(() => [I(f, {
9767
9767
  width: "100%",
@@ -9785,12 +9785,12 @@ var Pu = p({
9785
9785
  k("div")
9786
9786
  ], -1)
9787
9787
  ])),
9788
- !y(o) && y(J) === "ready" ? (a(), w("div", Zu, [A((a(), h(i, {
9788
+ !y(o) && y(re) === "ready" ? (a(), w("div", Zu, [A((a(), h(i, {
9789
9789
  severity: "secondary",
9790
9790
  text: "",
9791
9791
  rounded: "",
9792
9792
  class: "cui-icon-lg relative z-2",
9793
- onClick: ve
9793
+ onClick: be
9794
9794
  }, {
9795
9795
  icon: x(() => [I(l, {
9796
9796
  width: "100%",
@@ -9806,10 +9806,10 @@ var Pu = p({
9806
9806
  k("div", { class: d(["h-full w-full flex flex-col", {
9807
9807
  "pt-2": y(o),
9808
9808
  "pt-[calc(40px+2rem)]": !y(o)
9809
- }]) }, [y(ae) || y(te) ? (a(), w("div", Qu, [I(p, {
9809
+ }]) }, [y(oe) || y(te) ? (a(), w("div", Qu, [I(p, {
9810
9810
  class: "w-[30px] h-[30px] m-0",
9811
9811
  "stroke-width": "5"
9812
- })])) : y(J) === "ready" ? (a(), h(_, {
9812
+ })])) : y(re) === "ready" ? (a(), h(_, {
9813
9813
  ref_key: "conversationRef",
9814
9814
  ref: R,
9815
9815
  key: y(z),
@@ -9818,13 +9818,13 @@ var Pu = p({
9818
9818
  "initial-attachments": y(H),
9819
9819
  "initial-model-id": y(U),
9820
9820
  "initial-prompt": y(W),
9821
- suggestions: y(me),
9822
- "approval-tools": y(se),
9821
+ suggestions: y(he),
9822
+ "approval-tools": y(ce),
9823
9823
  tools: y(E)?.tools ?? [],
9824
9824
  class: "flex-1 min-h-0",
9825
- onFinished: we,
9826
- onBranched: xe,
9827
- onEmptied: t[2] ||= (e) => be(y(z))
9825
+ onFinished: Ee,
9826
+ onBranched: Ce,
9827
+ onEmptied: t[2] ||= (e) => Se(y(z))
9828
9828
  }, null, 8, [
9829
9829
  "thread-id",
9830
9830
  "initial-messages",
@@ -9836,8 +9836,8 @@ var Pu = p({
9836
9836
  "tools"
9837
9837
  ])) : (a(), w("div", $u, [
9838
9838
  k("div", ed, [I(m, { class: "w-8 h-8 text-muted" })]),
9839
- k("div", td, [k("div", nd, s(e.$t(y(J) === "disabled" ? "views.assistant.disabled_title" : "views.assistant.unconfigured_title")), 1), k("div", rd, s(e.$t(y(oe) ? "views.assistant.setup_hint_admin" : "views.assistant.setup_hint_user")), 1)]),
9840
- y(oe) ? (a(), h(i, {
9839
+ k("div", td, [k("div", nd, s(e.$t(y(re) === "disabled" ? "views.assistant.disabled_title" : "views.assistant.unconfigured_title")), 1), k("div", rd, s(e.$t(y(se) ? "views.assistant.setup_hint_admin" : "views.assistant.setup_hint_user")), 1)]),
9840
+ y(se) ? (a(), h(i, {
9841
9841
  key: 0,
9842
9842
  class: "cui-button-medium",
9843
9843
  label: e.$t("views.assistant.open_settings"),
@@ -9848,6 +9848,6 @@ var Pu = p({
9848
9848
  ]);
9849
9849
  };
9850
9850
  }
9851
- }), [["__scopeId", "data-v-1e95e1d1"]]);
9851
+ }), [["__scopeId", "data-v-681e7aa2"]]);
9852
9852
  //#endregion
9853
9853
  export { id as default };