@camera.ui/server 2.2.5-beta.2 → 2.2.5-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (420) hide show
  1. package/dist/interface/assets/{404-BDvtK1qR.js → 404-YZOLos9r.js} +1 -1
  2. package/dist/interface/assets/{About-B4A35rRx.js → About-HtxMc8JZ.js} +1 -1
  3. package/dist/interface/assets/Assistant-bB8RBo-m.js +1 -0
  4. package/dist/interface/assets/Automation-D3DcUyui.js +3 -0
  5. package/dist/interface/assets/{AutomationImport-CEJdhE_d.js → AutomationImport-Dp_hT6hQ.js} +2 -2
  6. package/dist/interface/assets/AutomationStore-BKR7GXMk.js +2 -0
  7. package/dist/interface/assets/{AutomationStoreDetail-BenRMMtV.js → AutomationStoreDetail-B9yh51WQ.js} +2 -2
  8. package/dist/interface/assets/Automations-BdZZW2eN.js +2 -0
  9. package/dist/interface/assets/Camera-Ct7ndOxr.js +2 -0
  10. package/dist/interface/assets/{CameraConsole-D24yXOQn.js → CameraConsole-BI93OaRt.js} +2 -2
  11. package/dist/interface/assets/Cameras-Ctub8sVt.js +651 -0
  12. package/dist/interface/assets/Camview-BjQdTHNh.js +1 -0
  13. package/dist/interface/assets/{CertificateUpload-26LAL4MY.js → CertificateUpload-xW55NA1Q.js} +1 -1
  14. package/dist/interface/assets/Config-CBTbYd5v.js +2 -0
  15. package/dist/interface/assets/{ConfigActionAssistant-Cl_kr3hp.js → ConfigActionAssistant-B488rOp5.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionCameraControl-CL4vXcNe.js → ConfigActionCameraControl-ZMUuBxOs.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionDelay-DtPgmqWh.js → ConfigActionDelay-BJ11xvOW.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionHttp-DnkZTP5l.js → ConfigActionHttp-DOUo69OR.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionImageInput-3svn6YP9.js → ConfigActionImageInput-BMzuVZW9.js} +1 -1
  20. package/dist/interface/assets/{ConfigActionMqtt-BTsFTLgm.js → ConfigActionMqtt-Co_uksca.js} +1 -1
  21. package/dist/interface/assets/{ConfigActionNotification-Cr4xJrZp.js → ConfigActionNotification-CcZkstYx.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionNotificationControl-Cxkb_g8p.js → ConfigActionNotificationControl--VeucoTw.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionOutput-WTr7FGf_.js → ConfigActionOutput-CyDa1LGA.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionPlugin-BpcJepbD.js → ConfigActionPlugin-Kfg3ZEQF.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionSensor-BgD_F-hD.js → ConfigActionSensor-DhAF0HPw.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionSnapshot-DjR-Z08N.js → ConfigActionSnapshot-zMe3SPvW.js} +1 -1
  27. package/dist/interface/assets/{ConfigActionVariable-gPuPbjpm.js → ConfigActionVariable-BE5q3NwY.js} +1 -1
  28. package/dist/interface/assets/{ConfigConditionIfElse-CUHKJmPx.js → ConfigConditionIfElse-BNIRtSVD.js} +1 -1
  29. package/dist/interface/assets/{ConfigConditionSensorState-D-gPRqMu.js → ConfigConditionSensorState-DTNd-SzI.js} +1 -1
  30. package/dist/interface/assets/{ConfigConditionSwitch-BRf1T5tJ.js → ConfigConditionSwitch-BU5wWMU1.js} +1 -1
  31. package/dist/interface/assets/{ConfigConditionTime-BC0n6sWO.js → ConfigConditionTime-KXTCIVIV.js} +1 -1
  32. package/dist/interface/assets/{ConfigSensorValueInput-BUHapx4M.js → ConfigSensorValueInput-BC1FpMm-.js} +1 -1
  33. package/dist/interface/assets/{ConfigTriggerDetection-Byd6SLGg.js → ConfigTriggerDetection-hIN1hi53.js} +1 -1
  34. package/dist/interface/assets/ConfigTriggerGeofence-Bl2ZacbY.js +1 -0
  35. package/dist/interface/assets/{ConfigTriggerManual-B2dWcFrl.js → ConfigTriggerManual-C5vwxS-e.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerMqtt-B_aUDBu4.js → ConfigTriggerMqtt-B4PtWC3E.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerSchedule-DAZo1PLj.js → ConfigTriggerSchedule-BZzUdGBa.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerSensor-BCqAiPu4.js → ConfigTriggerSensor-D18nwMsj.js} +1 -1
  39. package/dist/interface/assets/{ConfigTriggerSystem-DuBydCiq.js → ConfigTriggerSystem-BhygWLB4.js} +1 -1
  40. package/dist/interface/assets/{ConfigTriggerWebhook-DDsnpwJr.js → ConfigTriggerWebhook-yyuBuhLD.js} +1 -1
  41. package/dist/interface/assets/Console-Cfk9MA9m.js +1 -0
  42. package/dist/interface/assets/CuiAssistantConversation-BHK_i56I.js +5 -0
  43. package/dist/interface/assets/CuiAssistantConversation-lkpZg3ML.css +1 -0
  44. package/dist/interface/assets/{CuiAutomationRunsDialog-C_sMg7E1.js → CuiAutomationRunsDialog-B0ohEHw0.js} +1 -1
  45. package/dist/interface/assets/{CuiBottomSheet-D_0LrjA_.js → CuiBottomSheet-DWefGWK2.js} +1 -1
  46. package/dist/interface/assets/CuiBottomSheet-NgX7VFao.js +1 -0
  47. package/dist/interface/assets/CuiCameraPipCard-C2qaGJlH.js +1 -0
  48. package/dist/interface/assets/CuiCameraRecordings-BTD-CQAg.js +1 -0
  49. package/dist/interface/assets/{CuiCameraShares-BIUB1xMa.js → CuiCameraShares-DcqOcePX.js} +1 -1
  50. package/dist/interface/assets/{CuiCameraTable-D-UhqHk4.js → CuiCameraTable-BOkfp_5M.js} +2 -2
  51. package/dist/interface/assets/CuiCameraTable-KPk46Xcl.js +1 -0
  52. package/dist/interface/assets/{CuiChartTable-CSK4Mzn3.js → CuiChartTable-DP38uBwK.js} +1 -1
  53. package/dist/interface/assets/{CuiConsole-DAbJXJBq.js → CuiConsole-C7xE_nQg.js} +2 -2
  54. package/dist/interface/assets/{CuiDataTable-DgcJsG-K.js → CuiDataTable-CsqH-RB1.js} +1 -1
  55. package/dist/interface/assets/CuiLightControl-ChGYpQAK.js +1 -0
  56. package/dist/interface/assets/{CuiLightControl-DFrZm_sv.css → CuiLightControl-D9sm8NZb.css} +1 -1
  57. package/dist/interface/assets/{CuiList-HdsA9vV1.js → CuiList-DJp0__mV.js} +1 -1
  58. package/dist/interface/assets/CuiPluginCard-CWImTZ6l.js +2 -0
  59. package/dist/interface/assets/{CuiPluginCategoryChip-C7R1jP7r.js → CuiPluginCategoryChip-Ch_upS6Y.js} +1 -1
  60. package/dist/interface/assets/{CuiPluginOAuthButton-BJJw0IaC.js → CuiPluginOAuthButton-DEQ9xILN.js} +2 -2
  61. package/dist/interface/assets/{CuiPluginTrustBadge-Bmm1qYdC.js → CuiPluginTrustBadge-sVWdvHcM.js} +1 -1
  62. package/dist/interface/assets/{CuiQRCode-DTSEFMBt.js → CuiQRCode-DqSF4SkD.js} +1 -1
  63. package/dist/interface/assets/CuiSchema-ytExUVhI.js +1 -0
  64. package/dist/interface/assets/CuiTopNavbarItem-B_KWykgq.js +1 -0
  65. package/dist/interface/assets/Faces-Cb6XMxDC.js +1 -0
  66. package/dist/interface/assets/FirstSteps-QNYTkEJo.js +1 -0
  67. package/dist/interface/assets/Floorplan-DbqADtN1.js +1 -0
  68. package/dist/interface/assets/Instances-DrMzPD65.js +1 -0
  69. package/dist/interface/assets/{Logs-BjcfuMQV.js → Logs-BSPT80vP.js} +2 -2
  70. package/dist/interface/assets/{Menu-BjjnSgdP.js → Menu-HHtuhIS2.js} +1 -1
  71. package/dist/interface/assets/Metrics-CqhUnVRA.js +12 -0
  72. package/dist/interface/assets/{OAuthDeviceFlow-9v-Czy_u.js → OAuthDeviceFlow-Bn1nlWNa.js} +1 -1
  73. package/dist/interface/assets/Plugin-DyOg_fbg.js +1 -0
  74. package/dist/interface/assets/{PluginConsole-C7sO42RG.js → PluginConsole-Cv-uhnPY.js} +2 -2
  75. package/dist/interface/assets/PluginDetail-cpOz7FkA.js +2 -0
  76. package/dist/interface/assets/{PluginSchema-D0eL9H-b.js → PluginSchema-DW3TGeTM.js} +1 -1
  77. package/dist/interface/assets/PluginSearch-BgecD9Ob.js +2 -0
  78. package/dist/interface/assets/PluginSearch-C8xHKikH.js +1 -0
  79. package/dist/interface/assets/{PluginUpdateProgress--MM9D8hs.js → PluginUpdateProgress-n6q6vzyd.js} +1 -1
  80. package/dist/interface/assets/Plugins-CuujWEtM.js +1 -0
  81. package/dist/interface/assets/{RecentEventsFilter-CvIJS8Se.js → RecentEventsFilter-CTR5JK_P.js} +1 -1
  82. package/dist/interface/assets/Recordings-ths9khZr.js +1 -0
  83. package/dist/interface/assets/SensorEdit-BzoIH7QC.js +1 -0
  84. package/dist/interface/assets/{SensorHistory-Efw0bZ-X.js → SensorHistory-9CdOpCPs.js} +1 -1
  85. package/dist/interface/assets/Sensors-CK5uExfU.js +2 -0
  86. package/dist/interface/assets/Settings-DN5hFtw_.js +1 -0
  87. package/dist/interface/assets/SettingsAccount-BCrmon5O.js +1 -0
  88. package/dist/interface/assets/SettingsAccount-CSy1BAIH.js +1 -0
  89. package/dist/interface/assets/{SettingsAccount-si-6gWl5.css → SettingsAccount-CY8YE_cy.css} +1 -1
  90. package/dist/interface/assets/SettingsAppearance-BY1xQMx4.js +1 -0
  91. package/dist/interface/assets/SettingsAppearance-h_XPZfQl.js +1 -0
  92. package/dist/interface/assets/SettingsAssistant-D8FmVbUL.js +1 -0
  93. package/dist/interface/assets/{SettingsBackup-BqKBKis5.js → SettingsBackup-D_weokqu.js} +1 -1
  94. package/dist/interface/assets/{SettingsList-BU191rmt.js → SettingsList-Bq24WTDU.js} +1 -1
  95. package/dist/interface/assets/SettingsMqtt-DCkLIYpF.js +1 -0
  96. package/dist/interface/assets/SettingsNotifications-8TZOUxg2.js +1 -0
  97. package/dist/interface/assets/{SettingsPermissions-sI64FPZG.js → SettingsPermissions-M8u_jrN0.js} +1 -1
  98. package/dist/interface/assets/{SettingsRecordings-CghrKErw.js → SettingsRecordings-C1Kp5xW_.js} +1 -1
  99. package/dist/interface/assets/SettingsRemote-DXlQKwlT.js +2 -0
  100. package/dist/interface/assets/{SettingsSystem-DP1p1Xns.js → SettingsSystem-Cetu2faJ.js} +2 -2
  101. package/dist/interface/assets/{SettingsUsers-Dpej-he1.js → SettingsUsers-CDwtQLdV.js} +1 -1
  102. package/dist/interface/assets/{Terminal-DPRPXCSt.js → Terminal-Dl-aAZME.js} +2 -2
  103. package/dist/interface/assets/{Training-Dwf5rXyC.css → Training-B1oQjAr8.css} +1 -1
  104. package/dist/interface/assets/Training-DdZjXgt1.js +1 -0
  105. package/dist/interface/assets/{Updates-QTvCp1aS.js → Updates-CkB1lXuo.js} +1 -1
  106. package/dist/interface/assets/{VariableInput-DhusSZPw.js → VariableInput-BxPj5wo6.js} +1 -1
  107. package/dist/interface/assets/{VariableSuggestions-Bkzz4Mv3.js → VariableSuggestions-CbizvAkz.js} +1 -1
  108. package/dist/interface/assets/{VersionsHandler-DjNSpSYy.js → VersionsHandler-CePyEUVO.js} +2 -2
  109. package/dist/interface/assets/{VirtualSensorCreate-soGT6h2c.js → VirtualSensorCreate-D_GVoeL7.js} +1 -1
  110. package/dist/interface/assets/Workers-7yiebNkl.js +2 -0
  111. package/dist/interface/assets/api-DK2Bav9D.js +4 -0
  112. package/dist/interface/assets/api-DTCqDA-h.css +2 -0
  113. package/dist/interface/assets/{api-CK2tonlH.js → api-DW2niHRN.js} +1 -1
  114. package/dist/interface/assets/{assistant-BEe1ExZL.js → assistant-BJ6xKcw_.js} +1 -1
  115. package/dist/interface/assets/{auth-QEpUGkWd.js → auth-Dc8bUpc-.js} +1 -1
  116. package/dist/interface/assets/{automations-BBIBV4Uu.js → automations-DXrjbArj.js} +1 -1
  117. package/dist/interface/assets/{cameraSources-Cm18cW9L.js → cameraSources-QJfUDOQJ.js} +1 -1
  118. package/dist/interface/assets/cloudHandoff-DtlquYGZ.js +1 -0
  119. package/dist/interface/assets/{config-vwkU8aqP.js → config-CiQDwB4t.js} +1 -1
  120. package/dist/interface/assets/{flowSchema-rzBroL0H.js → flowSchema-BRTZHQ1w.js} +1 -1
  121. package/dist/interface/assets/{intercomService-Du8V_HxF.js → intercomService-BnA-FQ0Q.js} +1 -1
  122. package/dist/interface/assets/{main-XHFrBKKz.css → main-BoGhBedC.css} +1 -1
  123. package/dist/interface/assets/main-D74mRIxc.js +3 -0
  124. package/dist/interface/assets/mqtt-iD9XHYO_.js +1 -0
  125. package/dist/interface/assets/{notifications-CN6eTJb_.js → notifications-CbAJX7RF.js} +1 -1
  126. package/dist/interface/assets/{plugins-DKtX7zQp.js → plugins-eIUrXNeM.js} +1 -1
  127. package/dist/interface/assets/rooms-BqPyo8jc.js +1 -0
  128. package/dist/interface/assets/{sensorIcons-ztqlMLDc.js → sensorIcons-DQVgryYP.js} +1 -1
  129. package/dist/interface/assets/{sensorSlots-D-uxjuv3.js → sensorSlots-BZCXtnb6.js} +1 -1
  130. package/dist/interface/assets/{sensors-DV2Z0IJt.js → sensors-DttBNEEt.js} +1 -1
  131. package/dist/interface/assets/{server-CfZnIVzn.js → server-DUFhf2c_.js} +1 -1
  132. package/dist/interface/assets/{theme-Bi7qdjBK.js → theme-BMmjtQ4w.js} +1 -1
  133. package/dist/interface/assets/{types-CNLAvgyw.js → types-5rE8Tz0_.js} +1 -1
  134. package/dist/interface/assets/{types-DwbeYXvn.js → types-CXw7CEzu.js} +1 -1
  135. package/dist/interface/assets/{types-DuwD8xp5.js → types-DWTSNJ79.js} +1 -1
  136. package/dist/interface/assets/ungrouped-D56FGIrg.js +1 -0
  137. package/dist/interface/assets/ungrouped-DHMJ9Rg1.css +1 -0
  138. package/dist/interface/assets/{updates-BqCH6Vr8.js → updates-TIPWXKzL.js} +1 -1
  139. package/dist/interface/assets/{useAppVersion-B-rmq3Bb.js → useAppVersion-BIz44Bg4.js} +1 -1
  140. package/dist/interface/assets/{useAssistantActions-Kf-5ijVf.js → useAssistantActions-CLkkw9kB.js} +1 -1
  141. package/dist/interface/assets/useBackupRestore-Crfd592q.js +1 -0
  142. package/dist/interface/assets/{useCameraOptions-Dt2J8sP_.js → useCameraOptions-A97teAIr.js} +1 -1
  143. package/dist/interface/assets/{useKeyboardInset-DtD3I2WC.js → useKeyboardInset-DXVi1dLG.js} +1 -1
  144. package/dist/interface/assets/{useLogsSocket-CEhUQdiY.js → useLogsSocket-BlFxVXjF.js} +1 -1
  145. package/dist/interface/assets/{useNavLayout-CtpYjS5W.js → useNavLayout-C5obaCNv.js} +1 -1
  146. package/dist/interface/assets/{usePermissions-CJzuagwD.js → usePermissions-C8hB_pG1.js} +1 -1
  147. package/dist/interface/assets/{usePluginUpdates-BwoWN5yb.js → usePluginUpdates-DO0-Gk4Q.js} +1 -1
  148. package/dist/interface/assets/{usePushRegistration-ANx4BS6_.js → usePushRegistration-BUttCraQ.js} +1 -1
  149. package/dist/interface/assets/{useServerRestart-7edyD8M0.js → useServerRestart-Cz9eVHUE.js} +1 -1
  150. package/dist/interface/assets/{useStreamStatus-DCSWHdbW.js → useStreamStatus-BhS_MCCB.js} +1 -1
  151. package/dist/interface/assets/{useTabSwipe-DfS3R3uP.js → useTabSwipe-D4k8lm1M.js} +1 -1
  152. package/dist/interface/assets/{useUpdateChannel-Cr9mSIRC.js → useUpdateChannel-D9lhfW0y.js} +1 -1
  153. package/dist/interface/assets/{useUpdatesSocket-B5Rm9syb.js → useUpdatesSocket-DnH9sON5.js} +1 -1
  154. package/dist/interface/assets/{useUserOptions-CJjImz8V.js → useUserOptions-BTRBUuE2.js} +1 -1
  155. package/dist/interface/assets/{vendor-cameraui-BbGOMenD.js → vendor-cameraui-QXD8jkcj.js} +26 -26
  156. package/dist/interface/assets/{vendor-core-tgH2YubJ.js → vendor-core-CnhnyKDl.js} +1 -1
  157. package/dist/interface/assets/{vendor-primevue-DNJJiEZl.js → vendor-primevue-CCUqY55W.js} +207 -207
  158. package/dist/interface/ha/{404-Dl6JtQWv.js → 404-DLhJqxRl.js} +1 -1
  159. package/dist/interface/ha/{About-wjv4kCO3.js → About-DC0i1iE4.js} +3 -3
  160. package/dist/interface/ha/{Assistant-Dpb4IsDC.js → Assistant-BmazMPIg.js} +821 -825
  161. package/dist/interface/ha/{Automation-CqTPjCUh.js → Automation-gabF9YzQ.js} +336 -336
  162. package/dist/interface/ha/{AutomationImport-CvdeneoU.js → AutomationImport-DaqZNs9s.js} +8 -8
  163. package/dist/interface/ha/{AutomationStore-bVPE68io.js → AutomationStore-DzM4huo5.js} +54 -54
  164. package/dist/interface/ha/{AutomationStoreDetail-BYaNUjoH.js → AutomationStoreDetail-CpzQMt_D.js} +7 -7
  165. package/dist/interface/ha/{Automations-BfsYh2A_.js → Automations-Dcm4Us50.js} +81 -81
  166. package/dist/interface/ha/{Camera-C70onr_O.js → Camera-CNK3QR7l.js} +198 -198
  167. package/dist/interface/ha/{CameraConsole-Dg3lV-wq.js → CameraConsole-CpcF0411.js} +5 -5
  168. package/dist/interface/ha/{Cameras-DpM6gt3G.js → Cameras-Cf9rwRyf.js} +293 -294
  169. package/dist/interface/ha/{Camview-CO_bHntH.js → Camview-BFKR2t6C.js} +87 -87
  170. package/dist/interface/ha/{Config-D-cpocuH.js → Config-1XH3zfr2.js} +11 -11
  171. package/dist/interface/ha/{ConfigActionAssistant-DVVVfVvT.js → ConfigActionAssistant-C0-NFoTB.js} +5 -5
  172. package/dist/interface/ha/{ConfigActionCameraControl-BPpzE9-F.js → ConfigActionCameraControl-DNSKZPSZ.js} +5 -5
  173. package/dist/interface/ha/{ConfigActionDelay-zU6H75hY.js → ConfigActionDelay-iZ3lPGzw.js} +1 -1
  174. package/dist/interface/ha/{ConfigActionHttp-BsNy03j4.js → ConfigActionHttp-DVJAcGkl.js} +3 -3
  175. package/dist/interface/ha/{ConfigActionImageInput-JUvNYn0w.js → ConfigActionImageInput-VVbHHHZs.js} +3 -3
  176. package/dist/interface/ha/{ConfigActionMqtt-PZqAKfTo.js → ConfigActionMqtt-N5OUJDzM.js} +4 -4
  177. package/dist/interface/ha/{ConfigActionNotification-DIL7abEm.js → ConfigActionNotification-s142tQoU.js} +6 -6
  178. package/dist/interface/ha/{ConfigActionNotificationControl-BQ2w5yeg.js → ConfigActionNotificationControl-Dh7kaKVP.js} +3 -3
  179. package/dist/interface/ha/{ConfigActionOutput-DVilKhPV.js → ConfigActionOutput-B4HHTg5C.js} +1 -1
  180. package/dist/interface/ha/{ConfigActionPlugin-BUfTEJQ_.js → ConfigActionPlugin-D20G2Dqf.js} +5 -5
  181. package/dist/interface/ha/{ConfigActionSensor-Dzp16VyX.js → ConfigActionSensor-BS3jrFaG.js} +6 -6
  182. package/dist/interface/ha/{ConfigActionSnapshot-CRjD5AMC.js → ConfigActionSnapshot-CInLAcwK.js} +3 -3
  183. package/dist/interface/ha/{ConfigActionVariable-CR8g7gEh.js → ConfigActionVariable-C5vADGNF.js} +2 -2
  184. package/dist/interface/ha/{ConfigConditionIfElse-CHoSgzXF.js → ConfigConditionIfElse-CPeWDD31.js} +4 -4
  185. package/dist/interface/ha/{ConfigConditionSensorState-Dn8_OhQe.js → ConfigConditionSensorState-BM5GmpN6.js} +6 -6
  186. package/dist/interface/ha/{ConfigConditionSwitch-Ds-nqWeU.js → ConfigConditionSwitch-Dmz9FduJ.js} +4 -4
  187. package/dist/interface/ha/{ConfigConditionTime-DWNfEluj.js → ConfigConditionTime-DF6llIJq.js} +2 -2
  188. package/dist/interface/ha/{ConfigSensorValueInput-DwXM9wP1.js → ConfigSensorValueInput-Ch5njvtv.js} +7 -7
  189. package/dist/interface/ha/{ConfigTriggerDetection-D37OkR_u.js → ConfigTriggerDetection-BR2QWNyO.js} +5 -5
  190. package/dist/interface/ha/{ConfigTriggerGeofence-EbXy_y3Q.js → ConfigTriggerGeofence-CaImOjyW.js} +9 -9
  191. package/dist/interface/ha/{ConfigTriggerMqtt-BX6uNEZy.js → ConfigTriggerMqtt-DWz1XwZQ.js} +2 -2
  192. package/dist/interface/ha/{ConfigTriggerSensor-BFGEtBVF.js → ConfigTriggerSensor-lfnhz0im.js} +3 -3
  193. package/dist/interface/ha/{ConfigTriggerSystem-fRnAgUGR.js → ConfigTriggerSystem-CwUhyFAj.js} +3 -3
  194. package/dist/interface/ha/{ConfigTriggerWebhook-DegifRdj.js → ConfigTriggerWebhook-J6Xts7GQ.js} +2 -2
  195. package/dist/interface/ha/{Console-Bo6S5psN.js → Console-BSdKFm6Y.js} +8 -8
  196. package/dist/interface/ha/{CuiAutomationRunsDialog-DXpNJqDE.js → CuiAutomationRunsDialog-BU8sympp.js} +3 -3
  197. package/dist/interface/ha/{CuiBottomSheet-DLkC2OmT.js → CuiBottomSheet-Bnp7ta7V.js} +1 -1
  198. package/dist/interface/ha/{CuiCameraRecordings-9tdkxXiT.js → CuiCameraRecordings-E-mMqKSs.js} +18 -19
  199. package/dist/interface/ha/{CuiCameraShares-BbqY_2b7.js → CuiCameraShares-DcNwd2OC.js} +8 -8
  200. package/dist/interface/ha/{CuiCameraTable-BmH1yAgl.js → CuiCameraTable-DNW9Vm_A.js} +6 -6
  201. package/dist/interface/ha/{CuiChartTable-BjBBI7Fo.js → CuiChartTable-muC7jL2H.js} +6 -6
  202. package/dist/interface/ha/{CuiConsole-By3m4UbE.js → CuiConsole-ND8bcuTg.js} +2 -2
  203. package/dist/interface/ha/{CuiDataTable-C_ndu5My.js → CuiDataTable-CN4T8DgP.js} +13 -13
  204. package/dist/interface/ha/{CuiPluginCard-BLQ1galy.js → CuiPluginCard-nIQiyQvH.js} +31 -31
  205. package/dist/interface/ha/{CuiPluginOAuthButton-BDghklSy.js → CuiPluginOAuthButton-FJ49NfUh.js} +3 -3
  206. package/dist/interface/ha/{CuiPluginTrustBadge-DolANNao.js → CuiPluginTrustBadge-D6eanMyI.js} +2 -2
  207. package/dist/interface/ha/{CuiQRCode-CcjPngXI.js → CuiQRCode-BdJzeeoE.js} +2 -2
  208. package/dist/interface/ha/{CuiSchema-D9JFf0dp.js → CuiSchema-DY0V-8xP.js} +67 -67
  209. package/dist/interface/ha/{CuiTopNavbarItem-DcUEq-4e.js → CuiTopNavbarItem-DT5pAKHp.js} +7 -8
  210. package/dist/interface/ha/{Faces-DjXHzr77.js → Faces-C_svyTrr.js} +92 -92
  211. package/dist/interface/ha/{FirstSteps-CQAP9Siw.js → FirstSteps-yS2M2cor.js} +9 -9
  212. package/dist/interface/ha/{Floorplan-DyaPzlQO.js → Floorplan-DSOeScjI.js} +194 -194
  213. package/dist/interface/ha/{Instances-DWjaU5gj.js → Instances-B4h5EKpF.js} +20 -20
  214. package/dist/interface/ha/{Logs-Dlx-X1NS.js → Logs-BH0Lxvs6.js} +12 -12
  215. package/dist/interface/ha/{Menu-iqEe01qO.js → Menu-COH7QXuE.js} +13 -13
  216. package/dist/interface/ha/{Metrics-Br2Dyvzh.js → Metrics-BtnRqL_I.js} +136 -136
  217. package/dist/interface/ha/{OAuthDeviceFlow-CIGk92FD.js → OAuthDeviceFlow-D2QJ9MnP.js} +8 -8
  218. package/dist/interface/ha/{Plugin-DklIr7j2.js → Plugin-EfUSqwyh.js} +85 -85
  219. package/dist/interface/ha/{PluginConsole-DCfxPtGU.js → PluginConsole-hh_o15f7.js} +4 -4
  220. package/dist/interface/ha/PluginDetail-DFiXGkrY.js +805 -0
  221. package/dist/interface/ha/{PluginSearch-BTKBnjxb.js → PluginSearch-Cdrfubrj.js} +54 -54
  222. package/dist/interface/ha/{PluginUpdateProgress-Dej5AcCt.js → PluginUpdateProgress-BD2g2kVj.js} +3 -3
  223. package/dist/interface/ha/{Plugins-C2fONspm.js → Plugins-qFiHW-Nk.js} +45 -45
  224. package/dist/interface/ha/{RecentEventsFilter-ylgjiDo8.js → RecentEventsFilter-UWrXnvfq.js} +1 -1
  225. package/dist/interface/ha/{Recordings-w39I43cc.js → Recordings-BzeC6tOz.js} +437 -419
  226. package/dist/interface/ha/{SensorEdit-BkKi1l-A.js → SensorEdit-BSgy7lkZ.js} +360 -360
  227. package/dist/interface/ha/{SensorHistory-BGJjMlc3.js → SensorHistory-IDvP8LKH.js} +2 -2
  228. package/dist/interface/ha/{Sensors-D_Wi9XPa.js → Sensors-Diqp4oZ0.js} +96 -97
  229. package/dist/interface/ha/{Settings-Bn7WLWf0.js → Settings-BgDsxAlx.js} +11 -11
  230. package/dist/interface/ha/{SettingsAccount-CRTex-1j.js → SettingsAccount-DBXMQPYk.js} +159 -159
  231. package/dist/interface/ha/{SettingsAppearance-B1qmJnYk.js → SettingsAppearance-VmbjnT3o.js} +6 -6
  232. package/dist/interface/ha/{SettingsAssistant-DDd1X0BC.js → SettingsAssistant-C2R4ZetE.js} +133 -133
  233. package/dist/interface/ha/{SettingsBackup-DZbhSB13.js → SettingsBackup-BqY9TwYn.js} +20 -20
  234. package/dist/interface/ha/{SettingsList-BQdyPe0H.js → SettingsList-CzHcfo2N.js} +4 -4
  235. package/dist/interface/ha/{SettingsMqtt-CSZcY6ht.js → SettingsMqtt-DqV3h3Ow.js} +149 -149
  236. package/dist/interface/ha/{SettingsNotifications-CfEhl0-y.js → SettingsNotifications-yn5fIR_7.js} +6 -6
  237. package/dist/interface/ha/{SettingsRecordings-BnAGDvcH.js → SettingsRecordings-DDs1lyfY.js} +8 -8
  238. package/dist/interface/ha/{SettingsRemote-w86TQVUA.js → SettingsRemote-jBw3l5E0.js} +172 -172
  239. package/dist/interface/ha/{SettingsSystem-CENjHL3k.js → SettingsSystem-BOv9hNlk.js} +9 -9
  240. package/dist/interface/ha/{SettingsUsers-CqSHRklV.js → SettingsUsers-Biv-2F4C.js} +90 -90
  241. package/dist/interface/ha/{Terminal-WsuxG3k-.js → Terminal-CmcrGEV0.js} +4 -4
  242. package/dist/interface/ha/Training-BEzPiXZg.js +1512 -0
  243. package/dist/interface/ha/{Updates-Dl_lLLR2.js → Updates-DJAcmDQJ.js} +12 -12
  244. package/dist/interface/ha/{VariableInput-C8Q81GUt.js → VariableInput-DlYg7t0m.js} +2 -2
  245. package/dist/interface/ha/{VersionsHandler-BOvjesvp.js → VersionsHandler-UnrAWn-b.js} +11 -11
  246. package/dist/interface/ha/{VirtualSensorCreate-sgwATaky.js → VirtualSensorCreate-CssxeaCC.js} +2 -2
  247. package/dist/interface/ha/{Workers-CkDuQ9NG.js → Workers-CLpqLugC.js} +14 -14
  248. package/dist/interface/ha/{accordion-Xem2SzgR.js → accordion-BylV-jUK.js} +2 -2
  249. package/dist/interface/ha/{api-BmYisoxj.js → api-BP7mlzjP.js} +11181 -11736
  250. package/dist/interface/ha/{api-oqpIZTkx.js → api-B_tDa73J.js} +1 -1
  251. package/dist/interface/ha/{assistant-0jE4C19U.js → assistant-Cb6ACguQ.js} +1 -1
  252. package/dist/interface/ha/{auth-B4Msg7R-.js → auth-DOYDRgFm.js} +1 -1
  253. package/dist/interface/ha/{autocomplete-B94Amei3.js → autocomplete-Cp3u2Ywa.js} +4 -4
  254. package/dist/interface/ha/{automationBlueprint-C-12Yjl7.js → automationBlueprint-CbbG_ku4.js} +1 -1
  255. package/dist/interface/ha/cameraui-cards.js +1 -1
  256. package/dist/interface/ha/{cards-BrOcoiQJ.js → cards-BpBP1zVW.js} +1206 -1198
  257. package/dist/interface/ha/{config-IG56wp6m.js → config-DroY1HBs.js} +1 -1
  258. package/dist/interface/ha/{datepicker-B4Azs5zr.js → datepicker-DXk97lTw.js} +4 -4
  259. package/dist/interface/ha/{mqtt-pl13wSmG.js → mqtt-NJTVdd53.js} +1 -1
  260. package/dist/interface/ha/{multiselect-Dp4XDBRR.js → multiselect-BOb4ScAZ.js} +4 -4
  261. package/dist/interface/ha/{notifications-B6wxSmou.js → notifications-BPTvvgvv.js} +1 -1
  262. package/dist/interface/ha/{plugins-BwwaWxye.js → plugins-B29K3nQP.js} +1 -1
  263. package/dist/interface/ha/{rooms-NIzjFYAd.js → rooms-DLw0WUy_.js} +1 -1
  264. package/dist/interface/ha/{select-UR3ZRDew.js → select-DV7p2EDj.js} +4 -4
  265. package/dist/interface/ha/{server-YOLwDVAW.js → server-B4b5_Ecu.js} +1 -1
  266. package/dist/interface/ha/{speeddial-LCbl5g8p.js → speeddial-B5p0fuqL.js} +1 -1
  267. package/dist/interface/ha/{tooltip-Z7VN-E1u.js → tooltip-BDrlgLof.js} +1 -1
  268. package/dist/interface/ha/{types-B8B9MqK0.js → types-DJHHL7nn.js} +1 -1
  269. package/dist/interface/ha/{ungrouped-DttNEB62.js → ungrouped-xyK1QrsM.js} +344 -376
  270. package/dist/interface/ha/{updates-DVhiQhMM.js → updates-XFSu9Tfm.js} +5 -5
  271. package/dist/interface/ha/{useAppVersion-CG4D44Aa.js → useAppVersion-BH3rU1zz.js} +1 -1
  272. package/dist/interface/ha/{useLogsSocket-PKsRDttg.js → useLogsSocket-CaTRzvgU.js} +1 -1
  273. package/dist/interface/ha/{useNavLayout-DoEcPx9Z.js → useNavLayout-DV0_OQx0.js} +1 -1
  274. package/dist/interface/ha/{useServerRestart-CMl589qX.js → useServerRestart-C8tynLUf.js} +1 -1
  275. package/dist/interface/ha/{useTabSwipe-Cmqdn0J5.js → useTabSwipe-CFoLDp3j.js} +1 -1
  276. package/dist/interface/ha/{useUpdateChannel-BBW2EX7N.js → useUpdateChannel-DSG2RTPe.js} +2 -2
  277. package/dist/interface/ha/{useUpdatesSocket-B6ICpKKC.js → useUpdatesSocket-CSQ0g7-6.js} +1 -1
  278. package/dist/interface/ha/{useUserOptions-CzclRfar.js → useUserOptions-CFaCy6L1.js} +1 -1
  279. package/dist/interface/ha/{virtualscroller-C5j7FXj4.js → virtualscroller-B-UQZDMJ.js} +88 -88
  280. package/dist/interface/index.html +34 -34
  281. package/dist/interface/sw.js +1 -1
  282. package/dist/server/package.json +22 -20
  283. package/dist/server/requirements.txt +1 -1
  284. package/dist/server/src/api/controllers/auth.controller.js +5 -6
  285. package/dist/server/src/api/controllers/auth.controller.js.map +1 -1
  286. package/dist/server/src/api/controllers/plugins.controller.js +5 -5
  287. package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
  288. package/dist/server/src/api/database/checks.js +20 -8
  289. package/dist/server/src/api/database/checks.js.map +1 -1
  290. package/dist/server/src/api/database/selfcheck.js +2 -2
  291. package/dist/server/src/api/database/selfcheck.js.map +1 -1
  292. package/dist/server/src/api/index.js +8 -6
  293. package/dist/server/src/api/index.js.map +1 -1
  294. package/dist/server/src/api/plugins/logger.plugin.js +11 -11
  295. package/dist/server/src/api/plugins/logger.plugin.js.map +1 -1
  296. package/dist/server/src/api/services/twoFactor.service.d.ts +4 -5
  297. package/dist/server/src/api/services/twoFactor.service.js +16 -17
  298. package/dist/server/src/api/services/twoFactor.service.js.map +1 -1
  299. package/dist/server/src/api/types/index.d.ts +0 -1
  300. package/dist/server/src/api/utils/cert.js +128 -135
  301. package/dist/server/src/api/utils/cert.js.map +1 -1
  302. package/dist/server/src/api/utils/form-body.d.ts +2 -0
  303. package/dist/server/src/api/utils/form-body.js +22 -0
  304. package/dist/server/src/api/utils/form-body.js.map +1 -0
  305. package/dist/server/src/api/utils/install-logger.js +12 -12
  306. package/dist/server/src/api/utils/install-logger.js.map +1 -1
  307. package/dist/server/src/api/websocket/nsp/logs.d.ts +7 -3
  308. package/dist/server/src/api/websocket/nsp/logs.js +76 -62
  309. package/dist/server/src/api/websocket/nsp/logs.js.map +1 -1
  310. package/dist/server/src/assistant/history.d.ts +2 -0
  311. package/dist/server/src/assistant/history.js +46 -0
  312. package/dist/server/src/assistant/history.js.map +1 -0
  313. package/dist/server/src/assistant/manager.js +2 -1
  314. package/dist/server/src/assistant/manager.js.map +1 -1
  315. package/dist/server/src/camera/controller.d.ts +1 -0
  316. package/dist/server/src/camera/controller.js +23 -18
  317. package/dist/server/src/camera/controller.js.map +1 -1
  318. package/dist/server/src/camera/decoder/worker.d.ts +3 -0
  319. package/dist/server/src/camera/decoder/worker.js +42 -5
  320. package/dist/server/src/camera/decoder/worker.js.map +1 -1
  321. package/dist/server/src/go2rtc/index.js +2 -2
  322. package/dist/server/src/go2rtc/index.js.map +1 -1
  323. package/dist/server/src/main.js +5 -5
  324. package/dist/server/src/main.js.map +1 -1
  325. package/dist/server/src/manager/discoveryManager.js +2 -2
  326. package/dist/server/src/manager/discoveryManager.js.map +1 -1
  327. package/dist/server/src/remote/services/cloudflare-managed.js +6 -3
  328. package/dist/server/src/remote/services/cloudflare-managed.js.map +1 -1
  329. package/dist/server/src/remote/services/cloudflare.d.ts +0 -1
  330. package/dist/server/src/remote/services/cloudflare.js +9 -20
  331. package/dist/server/src/remote/services/cloudflare.js.map +1 -1
  332. package/dist/server/src/remote/services/cloudflaredBinary.d.ts +3 -2
  333. package/dist/server/src/remote/services/cloudflaredBinary.js +9 -16
  334. package/dist/server/src/remote/services/cloudflaredBinary.js.map +1 -1
  335. package/dist/server/src/rpc/server.js +2 -2
  336. package/dist/server/src/rpc/server.js.map +1 -1
  337. package/dist/server/src/utils/automation-registry/index.js +3 -3
  338. package/dist/server/src/utils/automation-registry/index.js.map +1 -1
  339. package/dist/server/src/utils/colors.d.ts +2 -0
  340. package/dist/server/src/utils/colors.js +8 -0
  341. package/dist/server/src/utils/colors.js.map +1 -0
  342. package/dist/server/src/utils/npm/auth.d.ts +3 -2
  343. package/dist/server/src/utils/npm/auth.js +1 -1
  344. package/dist/server/src/utils/npm/auth.js.map +1 -1
  345. package/dist/server/src/utils/npm/index.d.ts +3 -15
  346. package/dist/server/src/utils/npm/index.js +26 -17
  347. package/dist/server/src/utils/npm/index.js.map +1 -1
  348. package/dist/server/src/utils/npm/registry.d.ts +69 -0
  349. package/dist/server/src/utils/npm/registry.js +240 -0
  350. package/dist/server/src/utils/npm/registry.js.map +1 -0
  351. package/dist/server/src/utils/plugin-registry/index.js +3 -3
  352. package/dist/server/src/utils/plugin-registry/index.js.map +1 -1
  353. package/dist/server/src/utils/process.d.ts +10 -0
  354. package/dist/server/src/utils/process.js +112 -0
  355. package/dist/server/src/utils/process.js.map +1 -0
  356. package/dist/server/src/utils/totp.d.ts +12 -0
  357. package/dist/server/src/utils/totp.js +71 -0
  358. package/dist/server/src/utils/totp.js.map +1 -0
  359. package/dist/server/src/utils/ttl-cache.d.ts +20 -0
  360. package/dist/server/src/utils/ttl-cache.js +63 -0
  361. package/dist/server/src/utils/ttl-cache.js.map +1 -0
  362. package/npm-shrinkwrap.json +6427 -0
  363. package/package.json +22 -20
  364. package/dist/interface/assets/Assistant-BKxssfw-.js +0 -1
  365. package/dist/interface/assets/Automation-CP59cgP7.js +0 -3
  366. package/dist/interface/assets/AutomationStore-BZGR_5Xl.js +0 -2
  367. package/dist/interface/assets/Automations-BpXorYAS.js +0 -2
  368. package/dist/interface/assets/Camera-UBUfaR5a.js +0 -2
  369. package/dist/interface/assets/Cameras-B21Y8MdQ.js +0 -651
  370. package/dist/interface/assets/Camview-BySyPtU5.js +0 -1
  371. package/dist/interface/assets/Config-BGyGmukb.js +0 -2
  372. package/dist/interface/assets/ConfigTriggerGeofence-CkzTFEZn.js +0 -1
  373. package/dist/interface/assets/Console-HXmKYaK_.js +0 -1
  374. package/dist/interface/assets/CuiAssistantConversation-2qrRCsgw.js +0 -5
  375. package/dist/interface/assets/CuiAssistantConversation-DmSdiv1b.css +0 -1
  376. package/dist/interface/assets/CuiBottomSheet-CTr-KHC8.js +0 -1
  377. package/dist/interface/assets/CuiCameraPipCard-BZCayhy_.js +0 -1
  378. package/dist/interface/assets/CuiCameraRecordings-BbaEL2ST.js +0 -1
  379. package/dist/interface/assets/CuiCameraTable-C5tQHs63.js +0 -1
  380. package/dist/interface/assets/CuiLightControl-v6k9hVGl.js +0 -1
  381. package/dist/interface/assets/CuiPluginCard-5MRYJcF2.js +0 -2
  382. package/dist/interface/assets/CuiSchema-BDXeXora.js +0 -1
  383. package/dist/interface/assets/CuiTopNavbarItem-BVknLbRO.js +0 -1
  384. package/dist/interface/assets/Faces-BEpYvbB0.js +0 -1
  385. package/dist/interface/assets/FirstSteps-U93RDOcP.js +0 -1
  386. package/dist/interface/assets/Floorplan-D8XoCNOB.js +0 -1
  387. package/dist/interface/assets/Instances-CFwZotvU.js +0 -1
  388. package/dist/interface/assets/Metrics-Ca_d5CbP.js +0 -12
  389. package/dist/interface/assets/Plugin-BjLw46Sw.js +0 -1
  390. package/dist/interface/assets/PluginDetail-BuLW4lkN.js +0 -2
  391. package/dist/interface/assets/PluginSearch--LLMEeyx.js +0 -2
  392. package/dist/interface/assets/PluginSearch-0akjE0ef.js +0 -1
  393. package/dist/interface/assets/Plugins-26O511gf.js +0 -1
  394. package/dist/interface/assets/Recordings-DQOGeSFm.js +0 -1
  395. package/dist/interface/assets/SensorEdit-DEW5D80x.js +0 -1
  396. package/dist/interface/assets/Sensors-C8yOyAwo.js +0 -2
  397. package/dist/interface/assets/Settings-B-RgMeVm.js +0 -1
  398. package/dist/interface/assets/SettingsAccount-B6aXFx3F.js +0 -1
  399. package/dist/interface/assets/SettingsAccount-_0ccrXYU.js +0 -1
  400. package/dist/interface/assets/SettingsAppearance-CkDwzx6f.js +0 -1
  401. package/dist/interface/assets/SettingsAppearance-DBFE3uVH.js +0 -1
  402. package/dist/interface/assets/SettingsAssistant-DN5OUJqt.js +0 -1
  403. package/dist/interface/assets/SettingsMqtt-hsKZkU-o.js +0 -1
  404. package/dist/interface/assets/SettingsNotifications-DIeiUEAk.js +0 -1
  405. package/dist/interface/assets/SettingsRemote-Doa0aBMC.js +0 -2
  406. package/dist/interface/assets/Training-DYlefOX1.js +0 -1
  407. package/dist/interface/assets/Workers-CUVvTuts.js +0 -2
  408. package/dist/interface/assets/api-B0wYDGQj.css +0 -2
  409. package/dist/interface/assets/api-BNrZVfeD.js +0 -4
  410. package/dist/interface/assets/cloudHandoff-Dnndt2el.js +0 -1
  411. package/dist/interface/assets/main-CRlC4FBY.js +0 -3
  412. package/dist/interface/assets/mqtt-BY6-Hrbv.js +0 -1
  413. package/dist/interface/assets/ring-resize-DyqCo2UN.js +0 -1
  414. package/dist/interface/assets/rooms-BHP4q6yf.js +0 -1
  415. package/dist/interface/assets/ungrouped-DBRZ-Ori.css +0 -1
  416. package/dist/interface/assets/ungrouped-DHLAmt__.js +0 -1
  417. package/dist/interface/assets/useBackupRestore-Dj-ZXODq.js +0 -1
  418. package/dist/interface/ha/PluginDetail-BFfRnkdG.js +0 -230
  419. package/dist/interface/ha/Training-hu_XOYBk.js +0 -1505
  420. package/dist/interface/ha/ring-resize-Dr2PxWIg.js +0 -16
@@ -1,66 +1,66 @@
1
1
  import { t as e } from "./rolldown-runtime-CEFd7nDs.js";
2
2
  import { m as t, p as n } from "./ripple-ZDATPc2w.js";
3
3
  import { G as r, H as i, I as a, Jt as o, K as s, N as c, Wt as l, Y as u, _t as d, bt as f, d as p, f as m, gt as h, kt as g, l as _, lt as v, o as y, ot as b, p as x, qt as S, r as C, rt as w, u as T, ut as E, v as D, vt as O, wt as k, x as A, xt as j, y as M, z as ee } from "./runtime-core.esm-bundler-_TfE0DWz.js";
4
- import { t as te } from "./tooltip-Z7VN-E1u.js";
4
+ import { t as te } from "./tooltip-BDrlgLof.js";
5
5
  import { t as N } from "./message-D6dIy_hz.js";
6
6
  import { t as ne } from "./chevron-down-BNj8w2js.js";
7
7
  import { t as P } from "./tag-mchuCAPR.js";
8
8
  import { t as F } from "./history-XMyO_cLc.js";
9
- import { $i as I, Br as L, Dt as R, Et as z, Hn as B, J as re, On as V, Or as ie, Q as ae, Tt as H, V as oe, Xt as U, at as se, bi as ce, br as W, g as le, gr as G, hr as K, ht as ue, ir as de, kr as fe, or as q, p as J, r as pe, ui as me, yr as Y, zr as he } from "./api-BmYisoxj.js";
10
- import { A as ge, b as _e, u as ve } from "./intercomService-B7HkLs6z.js";
11
- import { G as ye, U as be, W as xe, r as Se } from "./pinia-C6gt7A_Q.js";
12
- import { n as Ce } from "./vue-i18n-D5EAy78K.js";
13
- import { i as we } from "./alert-outline-FcLLjoOK.js";
14
- import { p as Te, s as Ee } from "./eventIcons-BFNUgeGr.js";
15
- import { t as De } from "./button-BouAFgf5.js";
16
- import { n as Oe, t as ke } from "./inputicon-1w06U-Jl.js";
17
- import { t as Ae } from "./inputtext-C_ygnPrC.js";
18
- import { t as je } from "./close-CxFbonhd.js";
19
- import { t as Me } from "./select-UR3ZRDew.js";
20
- import { t as Ne } from "./multiselect-Dp4XDBRR.js";
21
- import { t as Pe } from "./textarea-ByXnzJzx.js";
22
- import { t as Fe } from "./clock-outline-DNStdM39.js";
23
- import { t as Ie } from "./source-branch-C2kcmBcO.js";
24
- import { a as Le, i as Re, n as ze, o as Be, r as Ve, t as He } from "./assistant-0jE4C19U.js";
25
- import { t as Ue } from "./search-BViwEHdF.js";
26
- import { t as We } from "./content-copy-CHPYjxRC.js";
27
- import { t as Ge } from "./CuiMarkdownContent-CrkZwv5j.js";
28
- import { t as Ke } from "./brain-BiKXGva0.js";
29
- import { u as qe } from "./cards-BrOcoiQJ.js";
30
- import { c as Je, d as Ye, i as Xe, l as Ze, n as Qe, r as $e, t as et, u as tt } from "./types-XqA3YJPD.js";
31
- import { t as nt } from "./pencil-outline-SN9ingm5.js";
32
- import { t as rt } from "./back-filled-CaxrZv0Q.js";
33
- import { t as it } from "./help-circle-outline-BniRuJRv.js";
34
- import { t as at } from "./refresh-CpjKkasY.js";
35
- import { t as ot } from "./check-circle-outline-DS7eEinv.js";
36
- import { t as st } from "./chevron-up-DDKj43BW.js";
37
- import { t as ct } from "./microphone-C4oQPpzp.js";
38
- import { t as lt } from "./useAssistantActions-S1FrNe9b.js";
9
+ import { $i as I, Br as L, Dt as R, J as re, Or as z, Ot as ie, Q as B, Qt as ae, Sr as oe, V as se, _t as ce, bi as le, br as ue, g as V, jn as H, kr as U, kt as de, ot as W, p as fe, qn as pe, r as G, sr as me, ui as K, ur as he, wr as q, yr as ge, zr as _e } from "./api-BP7mlzjP.js";
10
+ import { A as ve, b as ye, u as be } from "./intercomService-B7HkLs6z.js";
11
+ import { G as xe, U as Se, W as Ce, r as we } from "./pinia-C6gt7A_Q.js";
12
+ import { n as Te } from "./vue-i18n-D5EAy78K.js";
13
+ import { i as Ee } from "./alert-outline-FcLLjoOK.js";
14
+ import { p as De, s as Oe } from "./eventIcons-BFNUgeGr.js";
15
+ import { t as ke } from "./button-BouAFgf5.js";
16
+ import { n as Ae, t as je } from "./inputicon-1w06U-Jl.js";
17
+ import { t as Me } from "./inputtext-C_ygnPrC.js";
18
+ import { t as Ne } from "./close-CxFbonhd.js";
19
+ import { t as Pe } from "./select-DV7p2EDj.js";
20
+ import { t as Fe } from "./multiselect-BOb4ScAZ.js";
21
+ import { t as Ie } from "./textarea-ByXnzJzx.js";
22
+ import { t as Le } from "./clock-outline-DNStdM39.js";
23
+ import { t as Re } from "./source-branch-C2kcmBcO.js";
24
+ import { a as ze, i as Be, n as Ve, o as He, r as Ue, t as J } from "./assistant-Cb6ACguQ.js";
25
+ import { t as We } from "./search-BViwEHdF.js";
26
+ import { t as Ge } from "./content-copy-CHPYjxRC.js";
27
+ import { t as Ke } from "./CuiMarkdownContent-CrkZwv5j.js";
28
+ import { t as qe } from "./brain-BiKXGva0.js";
29
+ import { u as Je } from "./cards-BpBP1zVW.js";
30
+ import { c as Ye, d as Xe, i as Ze, l as Qe, n as $e, r as et, t as tt, u as nt } from "./types-XqA3YJPD.js";
31
+ import { t as rt } from "./pencil-outline-SN9ingm5.js";
32
+ import { t as it } from "./back-filled-CaxrZv0Q.js";
33
+ import { t as at } from "./help-circle-outline-BniRuJRv.js";
34
+ import { t as ot } from "./refresh-CpjKkasY.js";
35
+ import { t as st } from "./check-circle-outline-DS7eEinv.js";
36
+ import { t as ct } from "./chevron-up-DDKj43BW.js";
37
+ import { t as lt } from "./microphone-C4oQPpzp.js";
38
+ import { t as ut } from "./useAssistantActions-S1FrNe9b.js";
39
39
  //#region ~icons/mdi/content-save-outline
40
- var ut = {
40
+ var dt = {
41
41
  viewBox: "0 0 24 24",
42
42
  width: "1.2em",
43
43
  height: "1.2em"
44
44
  };
45
- function dt(e, t) {
46
- return i(), x("svg", ut, [...t[0] ||= [T("path", {
45
+ function ft(e, t) {
46
+ return i(), x("svg", dt, [...t[0] ||= [T("path", {
47
47
  fill: "currentColor",
48
48
  d: "M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7zm2 16H5V5h11.17L19 7.83zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3s3-1.34 3-3s-1.34-3-3-3M6 6h9v4H6z"
49
49
  }, null, -1)]]);
50
50
  }
51
- var ft = d({
51
+ var pt = d({
52
52
  name: "mdi-content-save-outline",
53
- render: dt
54
- }), pt = { class: "cui-assistant-question rounded-xl px-4 py-3 text-sm flex flex-col gap-3" }, mt = { class: "flex items-start gap-2" }, ht = { class: "min-w-0 flex-1 font-medium text-color" }, gt = {
53
+ render: ft
54
+ }), 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 = {
55
55
  key: 0,
56
56
  class: "flex flex-wrap gap-2"
57
- }, _t = {
57
+ }, vt = {
58
58
  key: 1,
59
59
  class: "flex flex-col sm:flex-row gap-2"
60
- }, vt = { class: "flex flex-1 flex-col gap-1" }, yt = ["for"], bt = { class: "flex flex-1 flex-col gap-1" }, xt = ["for"], St = { class: "flex items-center gap-2" }, Ct = {
60
+ }, 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 = {
61
61
  key: 1,
62
62
  class: "flex-1"
63
- }, wt = /*#__PURE__*/ Y(/* @__PURE__ */ A({
63
+ }, Tt = /*#__PURE__*/ q(/* @__PURE__ */ A({
64
64
  __name: "CuiAssistantQuestion",
65
65
  props: {
66
66
  question: {},
@@ -78,10 +78,10 @@ var ft = d({
78
78
  v.value && c("answer", v.value);
79
79
  }
80
80
  return (a, s) => {
81
- let _ = it, y = De, S = Ae;
82
- return i(), x("div", pt, [
83
- T("div", mt, [M(_, { class: "w-5 h-5 shrink-0 text-muted mt-0.5" }), T("div", ht, o(e.question.question), 1)]),
84
- g(f).length ? (i(), x("div", gt, [(i(!0), x(C, null, r(g(f), (t) => (i(), p(y, {
81
+ let _ = at, y = ke, S = Me;
82
+ return i(), x("div", mt, [
83
+ T("div", ht, [M(_, { class: "w-5 h-5 shrink-0 text-muted mt-0.5" }), T("div", gt, o(e.question.question), 1)]),
84
+ g(f).length ? (i(), x("div", _t, [(i(!0), x(C, null, r(g(f), (t) => (i(), p(y, {
85
85
  key: t,
86
86
  type: "button",
87
87
  severity: "secondary",
@@ -95,20 +95,20 @@ var ft = d({
95
95
  "label",
96
96
  "onClick"
97
97
  ]))), 128))])) : m("", !0),
98
- e.question.kind === "time_range" ? (i(), x("div", _t, [T("div", vt, [T("label", {
98
+ e.question.kind === "time_range" ? (i(), x("div", vt, [T("div", yt, [T("label", {
99
99
  for: `question-from-${e.question.toolCallId}`,
100
100
  class: "text-xs text-muted"
101
- }, o(a.$t("views.assistant.question_from")), 9, yt), M(S, {
101
+ }, o(a.$t("views.assistant.question_from")), 9, bt), M(S, {
102
102
  id: `question-from-${e.question.toolCallId}`,
103
103
  modelValue: g(u),
104
104
  "onUpdate:modelValue": s[0] ||= (e) => h(u) ? u.value = e : null,
105
105
  type: "datetime-local",
106
106
  fluid: "",
107
107
  size: "small"
108
- }, null, 8, ["id", "modelValue"])]), T("div", bt, [T("label", {
108
+ }, null, 8, ["id", "modelValue"])]), T("div", xt, [T("label", {
109
109
  for: `question-to-${e.question.toolCallId}`,
110
110
  class: "text-xs text-muted"
111
- }, o(a.$t("views.assistant.question_to")), 9, xt), M(S, {
111
+ }, o(a.$t("views.assistant.question_to")), 9, St), M(S, {
112
112
  id: `question-to-${e.question.toolCallId}`,
113
113
  modelValue: g(d),
114
114
  "onUpdate:modelValue": s[1] ||= (e) => h(d) ? d.value = e : null,
@@ -116,8 +116,8 @@ var ft = d({
116
116
  fluid: "",
117
117
  size: "small"
118
118
  }, null, 8, ["id", "modelValue"])])])) : m("", !0),
119
- T("div", St, [
120
- e.question.kind === "time_range" ? (i(), x("span", Ct)) : (i(), p(S, {
119
+ T("div", Ct, [
120
+ e.question.kind === "time_range" ? (i(), x("span", wt)) : (i(), p(S, {
121
121
  key: 0,
122
122
  modelValue: g(l),
123
123
  "onUpdate:modelValue": s[2] ||= (e) => h(l) ? l.value = e : null,
@@ -155,13 +155,13 @@ var ft = d({
155
155
  ]);
156
156
  };
157
157
  }
158
- }), [["__scopeId", "data-v-49502a42"]]), Tt = { class: "cui-assistant-approval rounded-xl px-4 py-3 text-sm flex flex-col gap-3" }, Et = { class: "flex items-start gap-2" }, Dt = { class: "min-w-0 flex-1" }, Ot = { class: "font-medium text-color" }, kt = { class: "text-muted" }, At = {
158
+ }), [["__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 = {
159
159
  key: 0,
160
160
  class: "cui-assistant-pre mt-2 max-h-40 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono"
161
- }, jt = {
161
+ }, Mt = {
162
162
  key: 1,
163
163
  class: "mt-2 flex flex-col gap-1"
164
- }, Mt = { class: "flex justify-end gap-2" }, Nt = /*#__PURE__*/ Y(/* @__PURE__ */ A({
164
+ }, Nt = { class: "flex justify-end gap-2" }, Pt = /*#__PURE__*/ q(/* @__PURE__ */ A({
165
165
  __name: "CuiAssistantApproval",
166
166
  props: {
167
167
  toolName: {},
@@ -171,7 +171,7 @@ var ft = d({
171
171
  },
172
172
  emits: ["approve", "reject"],
173
173
  setup(e, { emit: t }) {
174
- let n = e, r = t, a = j(!1), s = j(""), c = _(() => Xe(n.toolName)), l = _(() => {
174
+ let n = e, r = t, a = j(!1), s = j(""), c = _(() => Ze(n.toolName)), l = _(() => {
175
175
  if (n.args === void 0 || n.args === null || typeof n.args == "object" && Object.keys(n.args).length === 0) return "";
176
176
  try {
177
177
  return JSON.stringify(n.args, null, 2);
@@ -200,12 +200,12 @@ var ft = d({
200
200
  r("approve", l.value === s.value ? void 0 : e);
201
201
  }
202
202
  return (t, n) => {
203
- let _ = Ee, y = Pe, b = N, S = De;
204
- return i(), x("div", Tt, [T("div", Et, [M(_, { class: "w-5 h-5 shrink-0 text-warning mt-0.5" }), T("div", Dt, [
205
- T("div", Ot, o(t.$t("views.assistant.approval_title", { tool: g(c) })), 1),
206
- T("div", kt, o(t.$t("views.assistant.approval_hint")), 1),
207
- g(l) && !g(a) ? (i(), x("pre", At, o(g(l)), 1)) : m("", !0),
208
- g(a) ? (i(), x("div", jt, [M(y, {
203
+ let _ = Oe, y = Ie, b = N, S = ke;
204
+ return i(), x("div", Et, [T("div", Dt, [M(_, { class: "w-5 h-5 shrink-0 text-warning mt-0.5" }), T("div", Ot, [
205
+ T("div", kt, o(t.$t("views.assistant.approval_title", { tool: g(c) })), 1),
206
+ T("div", At, o(t.$t("views.assistant.approval_hint")), 1),
207
+ g(l) && !g(a) ? (i(), x("pre", jt, o(g(l)), 1)) : m("", !0),
208
+ g(a) ? (i(), x("div", Mt, [M(y, {
209
209
  modelValue: g(s),
210
210
  "onUpdate:modelValue": n[0] ||= (e) => h(s) ? s.value = e : null,
211
211
  "auto-resize": "",
@@ -228,7 +228,7 @@ var ft = d({
228
228
  default: v(() => [D(o(t.$t("views.assistant.approval_edit_hint")), 1)]),
229
229
  _: 1
230
230
  }))])) : m("", !0)
231
- ])]), T("div", Mt, [
231
+ ])]), T("div", Nt, [
232
232
  g(l) ? (i(), p(S, {
233
233
  key: 0,
234
234
  type: "button",
@@ -263,55 +263,55 @@ var ft = d({
263
263
  ])]);
264
264
  };
265
265
  }
266
- }), [["__scopeId", "data-v-f3109818"]]), Pt = {
266
+ }), [["__scopeId", "data-v-f3109818"]]), Ft = {
267
267
  viewBox: "0 0 24 24",
268
268
  width: "1.2em",
269
269
  height: "1.2em"
270
270
  };
271
- function Ft(e, t) {
272
- return i(), x("svg", Pt, [...t[0] ||= [T("path", {
271
+ function It(e, t) {
272
+ return i(), x("svg", Ft, [...t[0] ||= [T("path", {
273
273
  fill: "currentColor",
274
274
  d: "M12 20c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-18A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m-2 14.5l6-4.5l-6-4.5z"
275
275
  }, null, -1)]]);
276
276
  }
277
- var It = d({
277
+ var Lt = d({
278
278
  name: "mdi-play-circle-outline",
279
- render: Ft
280
- }), Lt = {
279
+ render: It
280
+ }), Rt = {
281
281
  viewBox: "0 0 24 24",
282
282
  width: "1.2em",
283
283
  height: "1.2em"
284
284
  };
285
- function Rt(e, t) {
286
- return i(), x("svg", Lt, [...t[0] ||= [T("path", {
285
+ function zt(e, t) {
286
+ return i(), x("svg", Rt, [...t[0] ||= [T("path", {
287
287
  fill: "currentColor",
288
288
  d: "M13 5v6h1.17L12 13.17L9.83 11H11V5zm2-2H9v6H5l7 7l7-7h-4zm4 15H5v2h14z"
289
289
  }, null, -1)]]);
290
290
  }
291
- var zt = d({
291
+ var Bt = d({
292
292
  name: "mdi-download-outline",
293
- render: Rt
294
- }), Bt = {
293
+ render: zt
294
+ }), Vt = {
295
295
  viewBox: "0 0 24 24",
296
296
  width: "1.2em",
297
297
  height: "1.2em"
298
298
  };
299
- function Vt(e, t) {
300
- return i(), x("svg", Bt, [...t[0] ||= [T("path", {
299
+ function Ht(e, t) {
300
+ return i(), x("svg", Vt, [...t[0] ||= [T("path", {
301
301
  fill: "currentColor",
302
302
  d: "M15 8v8H5V8zm1-2H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3.5l4 4v-11l-4 4V7a1 1 0 0 0-1-1"
303
303
  }, null, -1)]]);
304
304
  }
305
- var Ht = d({
305
+ var Ut = d({
306
306
  name: "mdi-video-outline",
307
- render: Vt
307
+ render: Ht
308
308
  });
309
309
  //#endregion
310
310
  //#region src/composables/useAssistantReferences.ts
311
- function Ut() {
312
- let e = L(), { t } = Ce(), n = ce(), r = ue(), { openEpisodePlayer: i } = ae(), a = B("@camera.ui/camera-ui-nvr"), { download: o } = K(), s = j(null);
311
+ function Wt() {
312
+ let e = L(), { t } = Te(), n = le(), r = ce(), { openEpisodePlayer: i } = B(), a = pe("@camera.ui/camera-ui-nvr"), { download: o } = ge(), s = j(null);
313
313
  async function c() {
314
- let e = await U({
314
+ let e = await ae({
315
315
  parameter: {
316
316
  page: 1,
317
317
  pageSize: -1
@@ -321,7 +321,7 @@ function Ut() {
321
321
  return new Map(e.result.map((e) => [e._id, e]));
322
322
  }
323
323
  function l(e, t) {
324
- r.openComponentDialog(se, {
324
+ r.openComponentDialog(W, {
325
325
  data: {
326
326
  title: e.name,
327
327
  dedupeKey: `camera-event:${e._id}:${t}`,
@@ -390,17 +390,17 @@ function Ut() {
390
390
  }
391
391
  //#endregion
392
392
  //#region src/components/CuiAssistantReferences/CuiAssistantReferences.vue?vue&type=script&setup=true&lang.ts
393
- var Wt = { class: "flex flex-wrap gap-1.5" }, Gt = ["disabled", "onClick"], Kt = { class: "truncate max-w-[16rem]" }, qt = /*#__PURE__*/ Y(/* @__PURE__ */ A({
393
+ var Gt = { class: "flex flex-wrap gap-1.5" }, Kt = ["disabled", "onClick"], qt = { class: "truncate max-w-[16rem]" }, Jt = /*#__PURE__*/ q(/* @__PURE__ */ A({
394
394
  __name: "CuiAssistantReferences",
395
395
  props: { references: {} },
396
396
  setup(e) {
397
- let { t } = Ce(), { busy: n, open: a } = Ut();
397
+ let { t } = Te(), { busy: n, open: a } = Wt();
398
398
  function s(e) {
399
399
  return e.kind === "camera" ? t("views.assistant.open_camera") : e.kind === "episode" ? t("views.assistant.open_episode") : e.kind === "download" ? t("views.assistant.download_clip") : t("views.assistant.open_recording");
400
400
  }
401
401
  return (t, c) => {
402
- let l = Ht, u = zt, d = It;
403
- return i(), x("div", Wt, [(i(!0), x(C, null, r(e.references, (e, t) => (i(), x("button", {
402
+ let l = Ut, u = Bt, d = Lt;
403
+ return i(), x("div", Gt, [(i(!0), x(C, null, r(e.references, (e, t) => (i(), x("button", {
404
404
  key: `${e.kind}:${e.id}:${t}`,
405
405
  type: "button",
406
406
  class: "cui-assistant-ref flex cursor-pointer items-center gap-1.5 rounded-lg px-2.5 py-1 text-xs",
@@ -415,10 +415,10 @@ var Wt = { class: "flex flex-wrap gap-1.5" }, Gt = ["disabled", "onClick"], Kt =
415
415
  })) : (i(), p(d, {
416
416
  key: 2,
417
417
  class: "w-3.5 h-3.5 shrink-0"
418
- })), T("span", Kt, o(e.label || s(e)), 1)], 8, Gt))), 128))]);
418
+ })), T("span", qt, o(e.label || s(e)), 1)], 8, Kt))), 128))]);
419
419
  };
420
420
  }
421
- }), [["__scopeId", "data-v-aae1a6dd"]]), Jt = { class: "flex items-center gap-3" }, Yt = { class: "flex min-w-0 flex-1 flex-col" }, Xt = { class: "text-sm font-medium" }, Zt = { class: "text-xs" }, Qt = /*#__PURE__*/ Y(/* @__PURE__ */ A({
421
+ }), [["__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__ */ A({
422
422
  __name: "CuiAssistantNotice",
423
423
  props: {
424
424
  title: {},
@@ -433,19 +433,19 @@ var Wt = { class: "flex flex-wrap gap-1.5" }, Gt = ["disabled", "onClick"], Kt =
433
433
  size: "small",
434
434
  class: "cui-assistant-notice"
435
435
  }, {
436
- default: v(() => [T("div", Jt, [T("div", Yt, [T("span", Xt, o(e.title), 1), T("span", Zt, o(e.text), 1)]), s(t.$slots, "default", {}, void 0, !0)])]),
436
+ default: v(() => [T("div", Yt, [T("div", Xt, [T("span", Zt, o(e.title), 1), T("span", Qt, o(e.text), 1)]), s(t.$slots, "default", {}, void 0, !0)])]),
437
437
  _: 3
438
438
  }, 8, ["severity"]);
439
439
  };
440
440
  }
441
- }), [["__scopeId", "data-v-1dc28011"]]), $t = /* @__PURE__ */ A({
441
+ }), [["__scopeId", "data-v-1dc28011"]]), en = /* @__PURE__ */ A({
442
442
  __name: "CuiAssistantSetting",
443
443
  props: {
444
444
  setting: {},
445
445
  modelId: {}
446
446
  },
447
447
  setup(e) {
448
- let t = new He(), n = e, r = le(), { user: a } = Se(r), { data: o } = t.getAssistantInfoQuery(), s = t.patchAssistantInfoMutation(), c = _(() => a.value?.role === "admin" || a.value?.role === "master"), l = _(() => o.value?.settings.models ?? []), u = _(() => l.value.find((e) => e._id === n.modelId) ?? (o.value ? Ze(o.value.settings) : void 0)), d = _(() => n.setting === "sendImages" ? u.value?.sendImages === !0 : o.value?.settings[n.setting] === !0);
448
+ let t = new J(), n = e, r = V(), { user: a } = we(r), { data: o } = t.getAssistantInfoQuery(), s = t.patchAssistantInfoMutation(), c = _(() => a.value?.role === "admin" || a.value?.role === "master"), l = _(() => o.value?.settings.models ?? []), u = _(() => l.value.find((e) => e._id === n.modelId) ?? (o.value ? Qe(o.value.settings) : void 0)), d = _(() => n.setting === "sendImages" ? u.value?.sendImages === !0 : o.value?.settings[n.setting] === !0);
449
449
  async function f(e) {
450
450
  if (n.setting !== "sendImages") {
451
451
  await s.mutateAsync({ [n.setting]: e });
@@ -453,12 +453,12 @@ var Wt = { class: "flex flex-wrap gap-1.5" }, Gt = ["disabled", "onClick"], Kt =
453
453
  }
454
454
  let t = u.value;
455
455
  t && await s.mutateAsync({ models: l.value.map((n) => ({
456
- ...tt(n),
456
+ ...nt(n),
457
457
  ...n._id === t._id ? { sendImages: e } : {}
458
458
  })) });
459
459
  }
460
460
  return (t, n) => {
461
- let r = V, a = Qt;
461
+ let r = H, a = $t;
462
462
  return i(), p(a, {
463
463
  severity: g(d) ? "success" : "warn",
464
464
  title: t.$t(`views.assistant.setting_${e.setting}_title`),
@@ -479,71 +479,71 @@ var Wt = { class: "flex flex-wrap gap-1.5" }, Gt = ["disabled", "onClick"], Kt =
479
479
  ]);
480
480
  };
481
481
  }
482
- }), en = {
482
+ }), tn = {
483
483
  viewBox: "0 0 24 24",
484
484
  width: "1.2em",
485
485
  height: "1.2em"
486
486
  };
487
- function tn(e, t) {
488
- return i(), x("svg", en, [...t[0] ||= [T("path", {
487
+ function nn(e, t) {
488
+ return i(), x("svg", tn, [...t[0] ||= [T("path", {
489
489
  fill: "currentColor",
490
490
  d: "M7 5h14v2H7zm0 8v-2h14v2zM4 4.5A1.5 1.5 0 0 1 5.5 6A1.5 1.5 0 0 1 4 7.5A1.5 1.5 0 0 1 2.5 6A1.5 1.5 0 0 1 4 4.5m0 6A1.5 1.5 0 0 1 5.5 12A1.5 1.5 0 0 1 4 13.5A1.5 1.5 0 0 1 2.5 12A1.5 1.5 0 0 1 4 10.5M7 19v-2h14v2zm-3-2.5A1.5 1.5 0 0 1 5.5 18A1.5 1.5 0 0 1 4 19.5A1.5 1.5 0 0 1 2.5 18A1.5 1.5 0 0 1 4 16.5"
491
491
  }, null, -1)]]);
492
492
  }
493
- var nn = d({
493
+ var rn = d({
494
494
  name: "mdi-format-list-bulleted",
495
- render: tn
496
- }), rn = {
495
+ render: nn
496
+ }), an = {
497
497
  viewBox: "0 0 24 24",
498
498
  width: "1.2em",
499
499
  height: "1.2em"
500
500
  };
501
- function an(e, t) {
502
- return i(), x("svg", rn, [...t[0] ||= [T("path", {
501
+ function on(e, t) {
502
+ return i(), x("svg", an, [...t[0] ||= [T("path", {
503
503
  fill: "currentColor",
504
504
  d: "M7 10h5v5H7m12 4H5V8h14m0-5h-1V1h-2v2H8V1H6v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2"
505
505
  }, null, -1)]]);
506
506
  }
507
- var on = d({
507
+ var sn = d({
508
508
  name: "mdi-calendar-today",
509
- render: an
510
- }), sn = {
509
+ render: on
510
+ }), cn = {
511
511
  viewBox: "0 0 24 24",
512
512
  width: "1.2em",
513
513
  height: "1.2em"
514
514
  };
515
- function cn(e, t) {
516
- return i(), x("svg", sn, [...t[0] ||= [T("path", {
515
+ function ln(e, t) {
516
+ return i(), x("svg", cn, [...t[0] ||= [T("path", {
517
517
  fill: "currentColor",
518
518
  d: "M7.5 4A5.5 5.5 0 0 0 2 9.5c0 .5.09 1 .22 1.5H6.3l1.27-3.37c.3-.8 1.48-.88 1.86 0L11.5 13l.59-1.42c.13-.33.48-.58.91-.58h8.78c.13-.5.22-1 .22-1.5A5.5 5.5 0 0 0 16.5 4c-1.86 0-3.5.93-4.5 2.34C11 4.93 9.36 4 7.5 4M3 12.5a1 1 0 0 0-1 1a1 1 0 0 0 1 1h2.44L11 20c1 .9 1 .9 2 0l5.56-5.5H21a1 1 0 0 0 1-1a1 1 0 0 0-1-1h-7.6l-.93 2.3c-.4 1.01-1.55.87-1.92.03L8.5 9.5l-.96 2.33c-.15.38-.49.67-.94.67z"
519
519
  }, null, -1)]]);
520
520
  }
521
- var ln = d({
521
+ var un = d({
522
522
  name: "mdi-heart-pulse",
523
- render: cn
524
- }), un = { class: "cui-assistant-card rounded-xl px-4 py-3 text-sm" }, dn = { class: "flex items-start gap-2" }, fn = { class: "min-w-0 flex-1" }, pn = { class: "font-medium text-color" }, mn = {
523
+ render: ln
524
+ }), 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 = {
525
525
  key: 0,
526
526
  class: "text-xs text-muted"
527
- }, hn = { class: "mt-3 flex flex-col gap-2" }, gn = { class: "min-w-0 flex-1 truncate text-color" }, _n = {
527
+ }, gn = { class: "mt-3 flex flex-col gap-2" }, _n = { class: "min-w-0 flex-1 truncate text-color" }, vn = {
528
528
  key: 0,
529
529
  class: "shrink-0 font-medium tabular-nums text-color"
530
- }, vn = {
530
+ }, yn = {
531
531
  key: 0,
532
532
  class: "cui-assistant-card-bar ml-4 h-1 overflow-hidden rounded-full"
533
- }, yn = {
533
+ }, bn = {
534
534
  key: 1,
535
535
  class: "ml-4 text-xs text-muted"
536
- }, bn = {
536
+ }, xn = {
537
537
  key: 0,
538
538
  class: "mt-3 text-xs text-muted"
539
- }, xn = /*#__PURE__*/ Y(/* @__PURE__ */ A({
539
+ }, Sn = /*#__PURE__*/ q(/* @__PURE__ */ A({
540
540
  __name: "CuiAssistantCard",
541
541
  props: {
542
542
  card: {},
543
543
  references: {}
544
544
  },
545
545
  setup(e) {
546
- let t = e, { busy: n, open: a } = Ut();
546
+ let t = e, { busy: n, open: a } = Wt();
547
547
  function s(e) {
548
548
  if (e.episodeId) return t.references?.find((t) => t.kind === "episode" && t.id === e.episodeId) ?? {
549
549
  kind: "episode",
@@ -555,9 +555,9 @@ var ln = d({
555
555
  return e === "ok" ? "bg-success" : e === "warn" ? "bg-warning" : e === "error" ? "bg-danger" : "cui-assistant-card-dot-plain";
556
556
  }
557
557
  return (t, d) => {
558
- let f = ln, h = on, _ = nn, y = q;
559
- return i(), x("div", un, [
560
- T("div", dn, [e.card.kind === "system_health" ? (i(), p(f, {
558
+ let f = un, h = sn, _ = rn, y = he;
559
+ return i(), x("div", dn, [
560
+ T("div", fn, [e.card.kind === "system_health" ? (i(), p(f, {
561
561
  key: 0,
562
562
  class: "w-5 h-5 shrink-0 text-muted mt-0.5"
563
563
  })) : e.card.kind === "day_recap" ? (i(), p(h, {
@@ -566,8 +566,8 @@ var ln = d({
566
566
  })) : (i(), p(_, {
567
567
  key: 2,
568
568
  class: "w-5 h-5 shrink-0 text-muted mt-0.5"
569
- })), T("div", fn, [T("div", pn, o(e.card.title), 1), e.card.subtitle ? (i(), x("div", mn, o(e.card.subtitle), 1)) : m("", !0)])]),
570
- T("div", hn, [(i(!0), x(C, null, r(e.card.items, (e, t) => (i(), x("div", {
569
+ })), T("div", pn, [T("div", mn, o(e.card.title), 1), e.card.subtitle ? (i(), x("div", hn, o(e.card.subtitle), 1)) : m("", !0)])]),
570
+ T("div", gn, [(i(!0), x(C, null, r(e.card.items, (e, t) => (i(), x("div", {
571
571
  key: t,
572
572
  class: "flex flex-col gap-1"
573
573
  }, [
@@ -579,8 +579,8 @@ var ln = d({
579
579
  }, {
580
580
  default: v(() => [
581
581
  T("span", { class: l(["cui-assistant-card-dot h-2 w-2 shrink-0 self-center rounded-full", c(e.severity)]) }, null, 2),
582
- T("span", gn, o(e.label), 1),
583
- e.value ? (i(), x("span", _n, o(e.value), 1)) : m("", !0),
582
+ T("span", _n, o(e.label), 1),
583
+ e.value ? (i(), x("span", vn, o(e.value), 1)) : m("", !0),
584
584
  s(e) ? (i(), p(y, {
585
585
  key: 1,
586
586
  class: "h-4 w-4 shrink-0 self-center text-muted"
@@ -593,46 +593,46 @@ var ln = d({
593
593
  "disabled",
594
594
  "onClick"
595
595
  ])),
596
- e.share === void 0 ? m("", !0) : (i(), x("div", vn, [T("div", {
596
+ e.share === void 0 ? m("", !0) : (i(), x("div", yn, [T("div", {
597
597
  class: "cui-assistant-card-fill h-full rounded-full",
598
598
  style: S({ width: `${Math.round(Math.min(1, Math.max(0, e.share)) * 100)}%` })
599
599
  }, null, 4)])),
600
- e.note ? (i(), x("div", yn, o(e.note), 1)) : m("", !0)
600
+ e.note ? (i(), x("div", bn, o(e.note), 1)) : m("", !0)
601
601
  ]))), 128))]),
602
- e.card.footer ? (i(), x("div", bn, o(e.card.footer), 1)) : m("", !0)
602
+ e.card.footer ? (i(), x("div", xn, o(e.card.footer), 1)) : m("", !0)
603
603
  ]);
604
604
  };
605
605
  }
606
- }), [["__scopeId", "data-v-02b66e4e"]]), Sn = {
606
+ }), [["__scopeId", "data-v-02b66e4e"]]), Cn = {
607
607
  viewBox: "0 0 24 24",
608
608
  width: "1.2em",
609
609
  height: "1.2em"
610
610
  };
611
- function Cn(e, t) {
612
- return i(), x("svg", Sn, [...t[0] ||= [T("path", {
611
+ function wn(e, t) {
612
+ return i(), x("svg", Cn, [...t[0] ||= [T("path", {
613
613
  fill: "currentColor",
614
614
  d: "M12 20c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-18C6.47 2 2 6.47 2 12s4.47 10 10 10s10-4.47 10-10S17.53 2 12 2m2.59 6L12 10.59L9.41 8L8 9.41L10.59 12L8 14.59L9.41 16L12 13.41L14.59 16L16 14.59L13.41 12L16 9.41z"
615
615
  }, null, -1)]]);
616
616
  }
617
- var wn = d({
617
+ var Tn = d({
618
618
  name: "mdi-close-circle-outline",
619
- render: Cn
620
- }), Tn = { class: "cui-assistant-tool rounded-xl text-sm" }, En = { class: "font-medium truncate text-color" }, Dn = { class: "text-muted truncate" }, On = { class: "ml-auto shrink-0 text-muted" }, kn = {
619
+ render: wn
620
+ }), 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 = {
621
621
  key: 0,
622
622
  class: "flex flex-wrap gap-2 px-3 pb-2"
623
- }, An = ["onClick"], jn = ["src", "alt"], Mn = {
623
+ }, jn = ["onClick"], Mn = ["src", "alt"], Nn = {
624
624
  key: 1,
625
625
  class: "flex flex-col gap-2 px-3 pb-2"
626
- }, Nn = {
626
+ }, Pn = {
627
627
  key: 2,
628
628
  class: "flex flex-col gap-2 px-3 pb-2"
629
- }, Pn = {
629
+ }, Fn = {
630
630
  key: 3,
631
631
  class: "px-3 pb-2"
632
- }, Fn = {
632
+ }, In = {
633
633
  key: 4,
634
634
  class: "cui-assistant-tool-details px-3 py-2 flex flex-col gap-2"
635
- }, In = { key: 0 }, Ln = { class: "text-xs uppercase tracking-wide text-muted" }, Rn = { class: "cui-assistant-pre mt-1 max-h-64 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono" }, zn = { key: 1 }, Bn = { class: "text-xs uppercase tracking-wide text-muted" }, Vn = { class: "cui-assistant-pre mt-1 max-h-64 overflow-auto rounded-lg p-2 text-xs whitespace-pre-wrap break-words font-mono" }, Hn = /*#__PURE__*/ Y(/* @__PURE__ */ A({
635
+ }, 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__ */ A({
636
636
  __name: "CuiAssistantToolCall",
637
637
  props: {
638
638
  part: {},
@@ -653,19 +653,19 @@ var wn = d({
653
653
  }
654
654
  },
655
655
  setup(e) {
656
- let t = e, { t: n } = Ce(), { openImageDialog: a } = ue(), s = j(!1), c = _(() => Xe(t.part.name)), l = _(() => [
656
+ let t = e, { t: n } = Te(), { openImageDialog: a } = ce(), s = j(!1), c = _(() => Ze(t.part.name)), l = _(() => [
657
657
  "awaiting-input",
658
658
  "input-streaming",
659
659
  "input-complete",
660
660
  "approval-responded"
661
661
  ].includes(t.part.state) && !t.result), u = _(() => l.value && t.busy), d = _(() => l.value && !t.busy), f = _(() => t.part.state === "approval-requested"), h = _(() => t.part.approval?.needsApproval === !0 && t.part.approval.approved === !1), v = _(() => t.part.state === "error" || t.result?.state === "error" || !!t.result?.error), y = _(() => u.value ? n("views.assistant.tool_running") : d.value ? n("views.assistant.tool_unfinished") : f.value ? n("views.assistant.tool_waiting_approval") : h.value ? n("views.assistant.tool_rejected") : v.value ? n("views.assistant.tool_failed") : ""), b = _(() => {
662
- let e = t.part.input ?? $e(t.part.arguments);
662
+ let e = t.part.input ?? et(t.part.arguments);
663
663
  return e == null || typeof e == "object" && Object.keys(e).length === 0 ? "" : D(e);
664
- }), S = _(() => et(t.result)), w = _(() => {
664
+ }), S = _(() => tt(t.result)), w = _(() => {
665
665
  if (t.result?.error) return t.result.error;
666
666
  let e = t.result?.content;
667
- return e === void 0 ? "" : typeof e == "string" && !S.value ? D($e(e) ?? e) : (S.value ?? []).filter((e) => e.type === "text").map((e) => e.type === "text" ? e.content : "").join("\n");
668
- }), E = _(() => [...t.extraImages ?? [], ...Qe(S.value, c.value)]);
667
+ return e === void 0 ? "" : typeof e == "string" && !S.value ? D(et(e) ?? e) : (S.value ?? []).filter((e) => e.type === "text").map((e) => e.type === "text" ? e.content : "").join("\n");
668
+ }), E = _(() => [...t.extraImages ?? [], ...$e(S.value, c.value)]);
669
669
  function D(e) {
670
670
  if (typeof e == "string") return e;
671
671
  try {
@@ -677,14 +677,12 @@ var wn = d({
677
677
  function O(e) {
678
678
  a({ data: {
679
679
  title: c.value,
680
- src: e.src,
681
- hideConfirmButton: !0,
682
- hideCancelButton: !0
680
+ src: e.src
683
681
  } });
684
682
  }
685
683
  return (t, n) => {
686
- let a = W, l = Te, _ = Ee, S = wn, D = ot, k = st, A = ne, j = xn, ee = $t, te = Qt, N = qt;
687
- return i(), x("div", Tn, [
684
+ let a = oe, l = De, _ = Oe, S = Tn, D = st, k = ct, A = ne, j = Sn, ee = en, te = $t, N = Jt;
685
+ return i(), x("div", En, [
688
686
  T("button", {
689
687
  type: "button",
690
688
  class: "flex w-full cursor-pointer items-center gap-2 px-3 py-2 text-left",
@@ -707,9 +705,9 @@ var wn = d({
707
705
  key: 4,
708
706
  class: "w-4 h-4 shrink-0 text-success"
709
707
  })),
710
- T("span", En, o(g(c)), 1),
711
- T("span", Dn, o(g(y)), 1),
712
- T("span", On, [g(s) ? (i(), p(k, {
708
+ T("span", Dn, o(g(c)), 1),
709
+ T("span", On, o(g(y)), 1),
710
+ T("span", kn, [g(s) ? (i(), p(k, {
713
711
  key: 0,
714
712
  class: "w-4 h-4"
715
713
  })) : (i(), p(A, {
@@ -717,7 +715,7 @@ var wn = d({
717
715
  class: "w-4 h-4"
718
716
  }))])
719
717
  ]),
720
- e.inlineAttachments && g(E).length ? (i(), x("div", kn, [(i(!0), x(C, null, r(g(E), (e) => (i(), x("button", {
718
+ e.inlineAttachments && g(E).length ? (i(), x("div", An, [(i(!0), x(C, null, r(g(E), (e) => (i(), x("button", {
721
719
  key: e.src,
722
720
  type: "button",
723
721
  class: "cui-assistant-thumb cursor-pointer overflow-hidden rounded-lg",
@@ -727,13 +725,13 @@ var wn = d({
727
725
  alt: e.alt,
728
726
  class: "h-24 w-auto object-cover",
729
727
  loading: "lazy"
730
- }, null, 8, jn)], 8, An))), 128))])) : m("", !0),
731
- e.inlineAttachments && e.cards?.length ? (i(), x("div", Mn, [(i(!0), x(C, null, r(e.cards, (t, n) => (i(), p(j, {
728
+ }, null, 8, Mn)], 8, jn))), 128))])) : m("", !0),
729
+ e.inlineAttachments && e.cards?.length ? (i(), x("div", Nn, [(i(!0), x(C, null, r(e.cards, (t, n) => (i(), p(j, {
732
730
  key: n,
733
731
  card: t,
734
732
  references: e.references
735
733
  }, null, 8, ["card", "references"]))), 128))])) : m("", !0),
736
- e.inlineAttachments && (e.settings?.length || e.notices?.length) ? (i(), x("div", Nn, [(i(!0), x(C, null, r(e.settings, (t) => (i(), p(ee, {
734
+ e.inlineAttachments && (e.settings?.length || e.notices?.length) ? (i(), x("div", Pn, [(i(!0), x(C, null, r(e.settings, (t) => (i(), p(ee, {
737
735
  key: t,
738
736
  setting: t,
739
737
  "model-id": e.modelId
@@ -742,86 +740,86 @@ var wn = d({
742
740
  title: t.$t(`views.assistant.notice_${e.capability}_title`, { model: e.model }),
743
741
  text: t.$t(`views.assistant.notice_${e.capability}_text`)
744
742
  }, null, 8, ["title", "text"]))), 128))])) : m("", !0),
745
- e.inlineAttachments && e.references?.length ? (i(), x("div", Pn, [M(N, { references: e.references }, null, 8, ["references"])])) : m("", !0),
746
- g(s) ? (i(), x("div", Fn, [g(b) ? (i(), x("div", In, [T("span", Ln, o(t.$t("views.assistant.tool_arguments")), 1), T("pre", Rn, o(g(b)), 1)])) : m("", !0), g(w) ? (i(), x("div", zn, [T("span", Bn, o(t.$t("views.assistant.tool_result")), 1), T("pre", Vn, o(g(w)), 1)])) : m("", !0)])) : m("", !0)
743
+ e.inlineAttachments && e.references?.length ? (i(), x("div", Fn, [M(N, { references: e.references }, null, 8, ["references"])])) : m("", !0),
744
+ g(s) ? (i(), x("div", In, [g(b) ? (i(), x("div", Ln, [T("span", Rn, o(t.$t("views.assistant.tool_arguments")), 1), T("pre", zn, o(g(b)), 1)])) : m("", !0), g(w) ? (i(), x("div", Bn, [T("span", Vn, o(t.$t("views.assistant.tool_result")), 1), T("pre", Hn, o(g(w)), 1)])) : m("", !0)])) : m("", !0)
747
745
  ]);
748
746
  };
749
747
  }
750
- }), [["__scopeId", "data-v-cf2f40da"]]), Un = {
748
+ }), [["__scopeId", "data-v-661dfb47"]]), Wn = {
751
749
  viewBox: "0 0 24 24",
752
750
  width: "1.2em",
753
751
  height: "1.2em"
754
752
  };
755
- function Wn(e, t) {
756
- return i(), x("svg", Un, [...t[0] ||= [T("path", {
753
+ function Gn(e, t) {
754
+ return i(), x("svg", Wn, [...t[0] ||= [T("path", {
757
755
  fill: "currentColor",
758
756
  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"
759
757
  }, null, -1)]]);
760
758
  }
761
- var Gn = d({
759
+ var Kn = d({
762
760
  name: "mdi-music-note",
763
- render: Wn
764
- }), Kn = "[continue]";
765
- function qn(e) {
761
+ render: Gn
762
+ }), qn = "[continue]";
763
+ function Jn(e) {
766
764
  return e.parts.filter((e) => e.type === "text").map((e) => e.type === "text" ? e.content : "").join("\n").trim();
767
765
  }
768
- function Jn(e) {
769
- return e?.role === "user" && qn(e) === "[continue]";
766
+ function Yn(e) {
767
+ return e?.role === "user" && Jn(e) === "[continue]";
770
768
  }
771
769
  //#endregion
772
770
  //#region src/components/CuiAssistantMessage/CuiAssistantMessage.vue?vue&type=script&setup=true&lang.ts
773
- var Yn = {
771
+ var Xn = {
774
772
  key: 0,
775
773
  class: "group flex flex-col items-end"
776
- }, Xn = {
774
+ }, Zn = {
777
775
  key: 0,
778
776
  class: "w-full max-w-[min(82%,54ch)]"
779
- }, Zn = { class: "mt-1.5 flex justify-end gap-1" }, Qn = {
777
+ }, Qn = { class: "mt-1.5 flex justify-end gap-1" }, $n = {
780
778
  key: 1,
781
779
  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"
782
- }, $n = {
780
+ }, er = {
783
781
  key: 0,
784
782
  class: "mt-2 flex flex-wrap gap-2"
785
- }, er = ["src"], tr = {
783
+ }, tr = ["src"], nr = {
786
784
  key: 1,
787
785
  class: "mt-2 flex flex-wrap gap-2"
788
- }, nr = {
789
- key: 2,
790
- class: "mt-1 flex gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100"
791
786
  }, rr = {
787
+ key: 2,
788
+ class: "message-actions mt-1 flex gap-0.5"
789
+ }, ir = {
792
790
  key: 1,
793
791
  class: "cui-assistant-answer group flex flex-col"
794
- }, ir = {
792
+ }, ar = {
795
793
  key: 0,
796
794
  class: "mb-1.5 flex items-center gap-2 text-[12.5px] text-muted"
797
- }, ar = { class: "flex min-w-0 flex-col gap-2.5" }, or = {
795
+ }, or = { class: "flex min-w-0 flex-col gap-2.5" }, sr = {
798
796
  key: 0,
799
797
  class: "text-[15px] leading-relaxed text-color break-words"
800
- }, sr = {
798
+ }, cr = {
801
799
  key: 0,
802
800
  class: "cui-assistant-caret"
803
- }, cr = ["open"], lr = { class: "flex cursor-pointer select-none items-center gap-2 px-3 py-2" }, ur = { class: "shrink-0 font-medium text-color" }, dr = { class: "truncate text-muted" }, fr = { class: "flex flex-col gap-2 px-2 pb-2" }, pr = {
801
+ }, 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 = {
804
802
  key: 3,
805
803
  class: "text-xs text-muted"
806
- }, mr = { class: "cursor-pointer select-none" }, hr = { class: "mt-1 whitespace-pre-wrap break-words" }, gr = {
804
+ }, hr = { class: "cursor-pointer select-none" }, gr = { class: "mt-1 whitespace-pre-wrap break-words" }, _r = {
807
805
  key: 0,
808
806
  class: "flex items-center gap-2 text-[13.5px] text-muted"
809
- }, _r = {
807
+ }, vr = {
810
808
  class: "cui-assistant-pulse flex items-center gap-1",
811
809
  "aria-hidden": "true"
812
- }, vr = {
810
+ }, yr = {
813
811
  key: 0,
814
812
  class: "flex flex-wrap gap-2"
815
- }, yr = ["onClick"], br = ["src", "alt"], xr = {
813
+ }, br = ["onClick"], xr = ["src", "alt"], Sr = {
816
814
  key: 1,
817
815
  class: "mt-2 flex items-center gap-2 text-[12.5px] text-muted"
818
- }, Sr = {
819
- key: 2,
820
- class: "mt-2 flex items-center gap-2"
821
816
  }, Cr = {
817
+ key: 2,
818
+ class: "answer-footer mt-2 flex items-center gap-2"
819
+ }, wr = {
822
820
  key: 0,
823
821
  class: "cui-assistant-usage text-[11px] tabular-nums text-muted"
824
- }, wr = { class: "flex gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100" }, Tr = 6, Er = /*#__PURE__*/ Y(/* @__PURE__ */ A({
822
+ }, Tr = { class: "message-actions flex gap-0.5" }, Er = 6, Dr = /*#__PURE__*/ q(/* @__PURE__ */ A({
825
823
  __name: "CuiAssistantMessage",
826
824
  props: {
827
825
  message: {},
@@ -846,12 +844,12 @@ var Yn = {
846
844
  "continue"
847
845
  ],
848
846
  setup(e, { emit: a }) {
849
- let s = e, u = a, { t: d } = Ce(), { openImageDialog: f } = ue(), y = [
847
+ let s = e, u = a, { t: d } = Te(), { openImageDialog: f } = ce(), y = [
850
848
  "awaiting-input",
851
849
  "input-streaming",
852
850
  "input-complete",
853
851
  "approval-responded"
854
- ], b = w("editRef"), S = j(!1), O = j(""), k = _(() => qn(s.message)), A = _(() => s.message.parts.filter((e) => e.type === "image").map((e) => e.type === "image" ? e.source.type === "url" ? e.source.value.startsWith("attachment:") ? s.toolImages?.[e.source.value.slice(11)]?.[0]?.src ?? "" : e.source.value : `data:${e.source.mimeType ?? "image/jpeg"};base64,${e.source.value}` : "").filter(Boolean)), ee = _(() => s.message.parts.filter((e) => e.type === "audio" || e.type === "video").map((e) => ({ kind: e.type }))), N = _(() => {
852
+ ], b = w("editRef"), S = j(!1), O = j(""), k = _(() => Jn(s.message)), A = _(() => s.message.parts.filter((e) => e.type === "image").map((e) => e.type === "image" ? e.source.type === "url" ? e.source.value.startsWith("attachment:") ? s.toolImages?.[e.source.value.slice(11)]?.[0]?.src ?? "" : e.source.value : `data:${e.source.mimeType ?? "image/jpeg"};base64,${e.source.value}` : "").filter(Boolean)), ee = _(() => s.message.parts.filter((e) => e.type === "audio" || e.type === "video").map((e) => ({ kind: e.type }))), N = _(() => {
855
853
  let e = /* @__PURE__ */ new Map();
856
854
  for (let t of s.message.parts) t.type === "tool-result" && e.set(t.toolCallId, t);
857
855
  let t = [];
@@ -885,7 +883,7 @@ var Yn = {
885
883
  let e = [], t = [], n = [], r = [], i = [], a = /* @__PURE__ */ new Set();
886
884
  for (let o of N.value) {
887
885
  if (o.kind !== "tool") continue;
888
- let c = [...s.toolImages?.[o.part.id] ?? [], ...Qe(et(o.result), Xe(o.part.name))];
886
+ let c = [...s.toolImages?.[o.part.id] ?? [], ...$e(tt(o.result), Ze(o.part.name))];
889
887
  for (let t of c) !a.has(t.src) && a.add(t.src) && e.push(t);
890
888
  t.push(...s.toolCards?.[o.part.id] ?? []);
891
889
  for (let e of s.toolSettings?.[o.part.id] ?? []) r.includes(e) || r.push(e);
@@ -895,7 +893,7 @@ var Yn = {
895
893
  !a.has(t) && a.add(t) && n.push(e);
896
894
  }
897
895
  }
898
- let o = new Set(t.flatMap((e) => e.items.flatMap((e) => [e.episodeId, e.eventId].filter(Boolean)))), c = [...n.filter((e) => e.kind === "download"), ...n.filter((e) => e.kind !== "download" && !o.has(e.id)).slice(0, Tr)];
896
+ let o = new Set(t.flatMap((e) => e.items.flatMap((e) => [e.episodeId, e.eventId].filter(Boolean)))), c = [...n.filter((e) => e.kind === "download"), ...n.filter((e) => e.kind !== "download" && !o.has(e.id)).slice(0, Er)];
899
897
  return e.length || t.length || c.length || r.length || i.length ? {
900
898
  images: e,
901
899
  cards: t,
@@ -914,8 +912,8 @@ var Yn = {
914
912
  input: z(e.promptTokens),
915
913
  output: z(e.completionTokens)
916
914
  }), `${t.toFixed(1)} s`];
917
- return e.completionTokens && t > 0 && n.push(d("views.assistant.usage_speed", { n: Math.round(e.completionTokens / t) })), e.costUsd !== null && n.push(d("views.assistant.usage_cost", { cost: B(e.costUsd) })), n.join(" · ");
918
- }), R = _(() => {
915
+ return e.completionTokens && t > 0 && n.push(d("views.assistant.usage_speed", { n: Math.round(e.completionTokens / t) })), e.costUsd !== null && n.push(d("views.assistant.usage_cost", { cost: ie(e.costUsd) })), n.join(" · ");
916
+ }), re = _(() => {
919
917
  let e = s.usage;
920
918
  return e ? d("views.assistant.usage_details", {
921
919
  model: e.model,
@@ -928,33 +926,31 @@ var Yn = {
928
926
  function z(e) {
929
927
  return e < 1e3 ? String(e) : `${(e / 1e3).toFixed(+(e < 1e4))}k`;
930
928
  }
931
- function B(e) {
929
+ function ie(e) {
932
930
  return `$${e.toFixed(e < .01 ? 4 : 3)}`;
933
931
  }
934
- function re(e) {
932
+ function B(e) {
935
933
  return !!s.busy && e.items.some((e) => !e.result && y.includes(e.part.state));
936
934
  }
937
- async function V() {
935
+ async function ae() {
938
936
  O.value = k.value, S.value = !0, await c(), b.value?.$el.focus();
939
937
  }
940
- function ie() {
938
+ function le() {
941
939
  let e = O.value.trim();
942
940
  e && (S.value = !1, e !== k.value && u("edit", e));
943
941
  }
944
- function ae(e) {
942
+ function ue(e) {
945
943
  f({ data: {
946
944
  title: e.alt,
947
- src: e.src,
948
- hideConfirmButton: !0,
949
- hideCancelButton: !0
945
+ src: e.src
950
946
  } });
951
947
  }
952
- async function U() {
953
- await pe(P.value);
948
+ async function V() {
949
+ await G(P.value);
954
950
  }
955
951
  return (a, s) => {
956
- let c = Pe, d = De, f = Gn, _ = Ht, y = nt, w = Ie, j = oe, N = Ge, z = Hn, B = W, se = ot, ce = xn, le = $t, G = Qt, K = qt, ue = Ye, de = H, fe = at, q = te;
957
- return e.message.role === "user" ? (i(), x("div", Yn, [g(S) ? (i(), x("div", Xn, [M(c, {
952
+ let c = Ie, d = ke, f = Kn, _ = Ut, y = rt, w = Re, j = se, N = Ke, z = Un, ie = oe, ce = st, H = Sn, U = en, de = $t, W = Jt, fe = Xe, pe = R, G = ot, me = te;
953
+ return e.message.role === "user" ? (i(), x("div", Xn, [g(S) ? (i(), x("div", Zn, [M(c, {
958
954
  ref_key: "editRef",
959
955
  ref: b,
960
956
  modelValue: g(O),
@@ -962,8 +958,8 @@ var Yn = {
962
958
  "auto-resize": "",
963
959
  rows: "2",
964
960
  class: "w-full text-[15px] leading-relaxed",
965
- onKeydown: [n(t(ie, ["exact", "prevent"]), ["enter"]), s[1] ||= n(t((e) => S.value = !1, ["prevent"]), ["esc"])]
966
- }, null, 8, ["modelValue", "onKeydown"]), T("div", Zn, [M(d, {
961
+ onKeydown: [n(t(le, ["exact", "prevent"]), ["enter"]), s[1] ||= n(t((e) => S.value = !1, ["prevent"]), ["esc"])]
962
+ }, null, 8, ["modelValue", "onKeydown"]), T("div", Qn, [M(d, {
967
963
  type: "button",
968
964
  size: "small",
969
965
  severity: "secondary",
@@ -975,16 +971,16 @@ var Yn = {
975
971
  size: "small",
976
972
  label: a.$t("views.assistant.edit_send"),
977
973
  disabled: !g(O).trim(),
978
- onClick: ie
979
- }, null, 8, ["label", "disabled"])])])) : (i(), x("div", Qn, [
974
+ onClick: le
975
+ }, null, 8, ["label", "disabled"])])])) : (i(), x("div", $n, [
980
976
  D(o(g(k)) + " ", 1),
981
- g(A).length ? (i(), x("div", $n, [(i(!0), x(C, null, r(g(A), (e) => (i(), x("img", {
977
+ g(A).length ? (i(), x("div", er, [(i(!0), x(C, null, r(g(A), (e) => (i(), x("img", {
982
978
  key: e,
983
979
  src: e,
984
980
  class: "h-24 rounded-lg",
985
981
  alt: ""
986
- }, null, 8, er))), 128))])) : m("", !0),
987
- g(ee).length ? (i(), x("div", tr, [(i(!0), x(C, null, r(g(ee), (e, t) => (i(), x("span", {
982
+ }, null, 8, tr))), 128))])) : m("", !0),
983
+ g(ee).length ? (i(), x("div", nr, [(i(!0), x(C, null, r(g(ee), (e, t) => (i(), x("span", {
988
984
  key: t,
989
985
  class: "cui-assistant-media inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-muted"
990
986
  }, [e.kind === "audio" ? (i(), p(f, {
@@ -994,19 +990,19 @@ var Yn = {
994
990
  key: 1,
995
991
  class: "w-3.5 h-3.5"
996
992
  })), D(" " + o(e.kind === "audio" ? a.$t("views.assistant.attachment_audio") : a.$t("views.assistant.attachment_video")), 1)]))), 128))])) : m("", !0)
997
- ])), !g(S) && !e.busy ? (i(), x("div", nr, [
993
+ ])), !g(S) && !e.busy ? (i(), x("div", rr, [
998
994
  E((i(), p(d, {
999
995
  type: "button",
1000
996
  severity: "secondary",
1001
997
  text: "",
1002
998
  rounded: "",
1003
999
  class: "cui-icon-md text-muted",
1004
- onClick: V
1000
+ onClick: ae
1005
1001
  }, {
1006
1002
  icon: v(() => [M(y, { class: "w-3.5 h-3.5" })]),
1007
1003
  _: 1
1008
1004
  })), [[
1009
- q,
1005
+ me,
1010
1006
  { value: a.$t("views.assistant.edit_message") },
1011
1007
  void 0,
1012
1008
  { top: !0 }
@@ -1022,7 +1018,7 @@ var Yn = {
1022
1018
  icon: v(() => [M(w, { class: "w-3.5 h-3.5" })]),
1023
1019
  _: 1
1024
1020
  })), [[
1025
- q,
1021
+ me,
1026
1022
  { value: a.$t("views.assistant.branch_here") },
1027
1023
  void 0,
1028
1024
  { top: !0 }
@@ -1038,18 +1034,18 @@ var Yn = {
1038
1034
  icon: v(() => [M(j, { class: "w-3.5 h-3.5" })]),
1039
1035
  _: 1
1040
1036
  })), [[
1041
- q,
1037
+ me,
1042
1038
  { value: a.$t("views.assistant.delete_exchange") },
1043
1039
  void 0,
1044
1040
  { top: !0 }
1045
1041
  ]])
1046
- ])) : m("", !0)])) : (i(), x("div", rr, [
1047
- e.continuation ? m("", !0) : (i(), x("div", ir, [T("span", { class: l(["cui-assistant-dot h-1.5 w-1.5 shrink-0 rounded-full", { "cui-assistant-dot-live": e.working }]) }, null, 2), T("span", null, o(a.$t("views.assistant.title")), 1)])),
1048
- T("div", ar, [
1049
- (i(!0), x(C, null, r(g(ne), (t, n) => (i(), x(C, { key: n }, [t.kind === "text" ? (i(), x("div", or, [M(N, {
1042
+ ])) : m("", !0)])) : (i(), x("div", ir, [
1043
+ e.continuation ? m("", !0) : (i(), x("div", ar, [T("span", { class: l(["cui-assistant-dot h-1.5 w-1.5 shrink-0 rounded-full", { "cui-assistant-dot-live": e.working }]) }, null, 2), T("span", null, o(a.$t("views.assistant.title")), 1)])),
1044
+ T("div", or, [
1045
+ (i(!0), x(C, null, r(g(ne), (t, n) => (i(), x(C, { key: n }, [t.kind === "text" ? (i(), x("div", sr, [M(N, {
1050
1046
  content: t.text,
1051
1047
  class: "cui-assistant-markdown"
1052
- }, null, 8, ["content"]), e.working && n === g(ne).length - 1 ? (i(), x("span", sr)) : m("", !0)])) : t.kind === "tool" ? (i(), p(z, {
1048
+ }, null, 8, ["content"]), e.working && n === g(ne).length - 1 ? (i(), x("span", cr)) : m("", !0)])) : t.kind === "tool" ? (i(), p(z, {
1053
1049
  key: 1,
1054
1050
  part: t.part,
1055
1051
  result: t.result,
@@ -1076,18 +1072,18 @@ var Yn = {
1076
1072
  key: 2,
1077
1073
  class: "cui-assistant-steps rounded-xl text-sm",
1078
1074
  open: e.streaming
1079
- }, [T("summary", lr, [
1080
- re(t) ? (i(), p(B, {
1075
+ }, [T("summary", ur, [
1076
+ B(t) ? (i(), p(ie, {
1081
1077
  key: 0,
1082
1078
  class: "w-4 h-4 m-0 shrink-0",
1083
1079
  "stroke-width": "6"
1084
- })) : (i(), p(se, {
1080
+ })) : (i(), p(ce, {
1085
1081
  key: 1,
1086
1082
  class: "w-4 h-4 shrink-0 text-success"
1087
1083
  })),
1088
- T("span", ur, o(a.$t("views.assistant.steps", { n: t.items.length })), 1),
1089
- T("span", dr, o(t.items.map((e) => g(Xe)(e.part.name)).join(", ")), 1)
1090
- ]), T("div", fr, [(i(!0), x(C, null, r(t.items, (t) => (i(), p(z, {
1084
+ T("span", dr, o(a.$t("views.assistant.steps", { n: t.items.length })), 1),
1085
+ T("span", fr, o(t.items.map((e) => g(Ze)(e.part.name)).join(", ")), 1)
1086
+ ]), T("div", pr, [(i(!0), x(C, null, r(t.items, (t) => (i(), p(z, {
1091
1087
  key: t.part.id,
1092
1088
  part: t.part,
1093
1089
  result: t.result,
@@ -1110,45 +1106,45 @@ var Yn = {
1110
1106
  "model-id",
1111
1107
  "inline-attachments",
1112
1108
  "busy"
1113
- ]))), 128))])], 8, cr)) : t.kind === "thinking" ? (i(), x("details", pr, [T("summary", mr, o(a.$t("views.assistant.thinking")), 1), T("pre", hr, o(t.text), 1)])) : m("", !0)], 64))), 128)),
1114
- e.working && g(ne).at(-1)?.kind !== "text" ? (i(), x("span", gr, [T("span", _r, [(i(), x(C, null, r(3, (e) => T("span", {
1109
+ ]))), 128))])], 8, lr)) : t.kind === "thinking" ? (i(), x("details", mr, [T("summary", hr, o(a.$t("views.assistant.thinking")), 1), T("pre", gr, o(t.text), 1)])) : m("", !0)], 64))), 128)),
1110
+ e.working && g(ne).at(-1)?.kind !== "text" ? (i(), x("span", _r, [T("span", vr, [(i(), x(C, null, r(3, (e) => T("span", {
1115
1111
  key: e,
1116
1112
  class: "h-1.5 w-1.5 rounded-full"
1117
1113
  })), 64))]), D(" " + o(g(I)), 1)])) : m("", !0),
1118
1114
  g(F) ? (i(), x(C, { key: 1 }, [
1119
- g(F).images.length ? (i(), x("div", vr, [(i(!0), x(C, null, r(g(F).images, (e) => (i(), x("button", {
1115
+ g(F).images.length ? (i(), x("div", yr, [(i(!0), x(C, null, r(g(F).images, (e) => (i(), x("button", {
1120
1116
  key: e.src,
1121
1117
  type: "button",
1122
1118
  class: "cui-assistant-thumb cursor-pointer overflow-hidden rounded-lg",
1123
- onClick: (t) => ae(e)
1119
+ onClick: (t) => ue(e)
1124
1120
  }, [T("img", {
1125
1121
  src: e.src,
1126
1122
  alt: e.alt,
1127
1123
  class: "h-32 w-auto object-cover",
1128
1124
  loading: "lazy"
1129
- }, null, 8, br)], 8, yr))), 128))])) : m("", !0),
1130
- (i(!0), x(C, null, r(g(F).cards, (e, t) => (i(), p(ce, {
1125
+ }, null, 8, xr)], 8, br))), 128))])) : m("", !0),
1126
+ (i(!0), x(C, null, r(g(F).cards, (e, t) => (i(), p(H, {
1131
1127
  key: t,
1132
1128
  card: e,
1133
1129
  references: g(F).all
1134
1130
  }, null, 8, ["card", "references"]))), 128)),
1135
- (i(!0), x(C, null, r(g(F).settings, (t) => (i(), p(le, {
1131
+ (i(!0), x(C, null, r(g(F).settings, (t) => (i(), p(U, {
1136
1132
  key: t,
1137
1133
  setting: t,
1138
1134
  "model-id": e.modelId
1139
1135
  }, null, 8, ["setting", "model-id"]))), 128)),
1140
- (i(!0), x(C, null, r(g(F).notices, (e) => (i(), p(G, {
1136
+ (i(!0), x(C, null, r(g(F).notices, (e) => (i(), p(de, {
1141
1137
  key: `${e.capability}:${e.model}`,
1142
1138
  title: a.$t(`views.assistant.notice_${e.capability}_title`, { model: e.model }),
1143
1139
  text: a.$t(`views.assistant.notice_${e.capability}_text`)
1144
1140
  }, null, 8, ["title", "text"]))), 128)),
1145
- g(F).references.length ? (i(), p(K, {
1141
+ g(F).references.length ? (i(), p(W, {
1146
1142
  key: 1,
1147
1143
  references: g(F).references
1148
1144
  }, null, 8, ["references"])) : m("", !0)
1149
1145
  ], 64)) : m("", !0)
1150
1146
  ]),
1151
- e.stopped && !e.streaming ? (i(), x("div", xr, [T("span", null, o(a.$t("views.assistant.answer_stopped")), 1), M(d, {
1147
+ e.stopped && !e.streaming ? (i(), x("div", Sr, [T("span", null, o(a.$t("views.assistant.answer_stopped")), 1), M(d, {
1152
1148
  type: "button",
1153
1149
  size: "small",
1154
1150
  severity: "secondary",
@@ -1157,19 +1153,19 @@ var Yn = {
1157
1153
  disabled: e.busy,
1158
1154
  onClick: s[5] ||= (e) => u("continue")
1159
1155
  }, {
1160
- icon: v(() => [M(ue, { class: "w-3.5 h-3.5" })]),
1156
+ icon: v(() => [M(fe, { class: "w-3.5 h-3.5" })]),
1161
1157
  _: 1
1162
1158
  }, 8, ["label", "disabled"])])) : m("", !0),
1163
- !e.streaming && (g(P) || e.stopped) ? (i(), x("div", Sr, [g(L) ? E((i(), x("span", Cr, [D(o(g(L)), 1)])), [[
1164
- q,
1165
- { value: g(R) },
1159
+ !e.streaming && (g(P) || e.stopped) ? (i(), x("div", Cr, [g(L) ? E((i(), x("span", wr, [D(o(g(L)), 1)])), [[
1160
+ me,
1161
+ { value: g(re) },
1166
1162
  void 0,
1167
1163
  { top: !0 }
1168
- ]]) : m("", !0), T("div", wr, [
1169
- g(P) ? E((i(), p(de, {
1164
+ ]]) : m("", !0), T("div", Tr, [
1165
+ g(P) ? E((i(), p(pe, {
1170
1166
  key: 0,
1171
1167
  "action-text": a.$t("views.assistant.copied"),
1172
- icon: g(We),
1168
+ icon: g(Ge),
1173
1169
  "icon-class": "w-3.5 h-3.5",
1174
1170
  "button-props": {
1175
1171
  severity: "secondary",
@@ -1177,9 +1173,9 @@ var Yn = {
1177
1173
  rounded: !0,
1178
1174
  class: "cui-icon-md text-muted"
1179
1175
  },
1180
- onAction: U
1176
+ onAction: V
1181
1177
  }, null, 8, ["action-text", "icon"])), [[
1182
- q,
1178
+ me,
1183
1179
  { value: a.$t("views.assistant.copy_answer") },
1184
1180
  void 0,
1185
1181
  { top: !0 }
@@ -1193,10 +1189,10 @@ var Yn = {
1193
1189
  disabled: e.busy,
1194
1190
  onClick: s[6] ||= (e) => u("regenerate")
1195
1191
  }, {
1196
- icon: v(() => [M(fe, { class: "w-3.5 h-3.5" })]),
1192
+ icon: v(() => [M(G, { class: "w-3.5 h-3.5" })]),
1197
1193
  _: 1
1198
1194
  }, 8, ["disabled"])), [[
1199
- q,
1195
+ me,
1200
1196
  { value: a.$t("views.assistant.regenerate") },
1201
1197
  void 0,
1202
1198
  { top: !0 }
@@ -1213,7 +1209,7 @@ var Yn = {
1213
1209
  icon: v(() => [M(w, { class: "w-3.5 h-3.5" })]),
1214
1210
  _: 1
1215
1211
  }, 8, ["disabled"])), [[
1216
- q,
1212
+ me,
1217
1213
  { value: a.$t("views.assistant.branch_here") },
1218
1214
  void 0,
1219
1215
  { top: !0 }
@@ -1230,7 +1226,7 @@ var Yn = {
1230
1226
  icon: v(() => [M(j, { class: "w-3.5 h-3.5" })]),
1231
1227
  _: 1
1232
1228
  }, 8, ["disabled"])), [[
1233
- q,
1229
+ me,
1234
1230
  { value: a.$t("views.assistant.delete_exchange") },
1235
1231
  void 0,
1236
1232
  { top: !0 }
@@ -1239,53 +1235,53 @@ var Yn = {
1239
1235
  ]));
1240
1236
  };
1241
1237
  }
1242
- }), [["__scopeId", "data-v-0132c9a8"]]), Dr = {
1238
+ }), [["__scopeId", "data-v-88ef583b"]]), Or = {
1243
1239
  viewBox: "0 0 24 24",
1244
1240
  width: "1.2em",
1245
1241
  height: "1.2em"
1246
1242
  };
1247
- function Or(e, t) {
1248
- return i(), x("svg", Dr, [...t[0] ||= [T("path", {
1243
+ function kr(e, t) {
1244
+ return i(), x("svg", Or, [...t[0] ||= [T("path", {
1249
1245
  fill: "currentColor",
1250
1246
  d: "M13 20h-2V8l-5.5 5.5l-1.42-1.42L12 4.16l7.92 7.92l-1.42 1.42L13 8z"
1251
1247
  }, null, -1)]]);
1252
1248
  }
1253
- var kr = d({
1249
+ var Ar = d({
1254
1250
  name: "mdi-arrow-up",
1255
- render: Or
1256
- }), Ar = {
1251
+ render: kr
1252
+ }), jr = {
1257
1253
  viewBox: "0 0 24 24",
1258
1254
  width: "1.2em",
1259
1255
  height: "1.2em"
1260
1256
  };
1261
- function jr(e, t) {
1262
- return i(), x("svg", Ar, [...t[0] ||= [T("path", {
1257
+ function Mr(e, t) {
1258
+ return i(), x("svg", jr, [...t[0] ||= [T("path", {
1263
1259
  fill: "currentColor",
1264
1260
  d: "M18 18H6V6h12z"
1265
1261
  }, null, -1)]]);
1266
1262
  }
1267
- var Mr = d({
1263
+ var Nr = d({
1268
1264
  name: "mdi-stop",
1269
- render: jr
1270
- }), Nr = {
1265
+ render: Mr
1266
+ }), Pr = {
1271
1267
  viewBox: "0 0 24 24",
1272
1268
  width: "1.2em",
1273
1269
  height: "1.2em"
1274
1270
  };
1275
- function Pr(e, t) {
1276
- return i(), x("svg", Nr, [...t[0] ||= [T("path", {
1271
+ function Fr(e, t) {
1272
+ return i(), x("svg", Pr, [...t[0] ||= [T("path", {
1277
1273
  fill: "currentColor",
1278
1274
  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"
1279
1275
  }, null, -1)]]);
1280
1276
  }
1281
- var Fr = d({
1277
+ var Ir = d({
1282
1278
  name: "mdi-paperclip",
1283
- render: Pr
1284
- }), Ir = {
1279
+ render: Fr
1280
+ }), Lr = {
1285
1281
  image: 12582912,
1286
1282
  audio: 26214400,
1287
1283
  video: 62914560
1288
- }, Lr = "image/*,audio/*,video/*", Rr = {
1284
+ }, Rr = "image/*,audio/*,video/*", zr = {
1289
1285
  de: "de-DE",
1290
1286
  en: "en-US",
1291
1287
  fr: "fr-FR",
@@ -1298,22 +1294,22 @@ var Fr = d({
1298
1294
  ru: "ru-RU",
1299
1295
  zh: "zh-CN",
1300
1296
  ja: "ja-JP"
1301
- }, zr = { class: "cui-assistant-composer rounded-2xl" }, Br = {
1297
+ }, Br = { class: "cui-assistant-composer rounded-2xl" }, Vr = {
1302
1298
  key: 0,
1303
1299
  class: "px-3 pb-2"
1304
- }, Vr = {
1300
+ }, Hr = {
1305
1301
  key: 1,
1306
1302
  class: "flex flex-wrap gap-2 px-3 pb-1"
1307
- }, Hr = ["src"], Ur = {
1303
+ }, Ur = ["src"], Wr = {
1308
1304
  key: 1,
1309
1305
  class: "flex items-center gap-1.5 px-2.5 py-2"
1310
- }, Wr = { class: "max-w-40 truncate" }, Gr = { class: "text-muted" }, Kr = ["accept"], qr = {
1306
+ }, Gr = { class: "max-w-40 truncate" }, Kr = { class: "text-muted" }, qr = ["accept"], Jr = {
1311
1307
  key: 1,
1312
1308
  class: "ml-auto flex items-center gap-1.5 text-[11.5px] text-muted"
1313
- }, Jr = {
1309
+ }, Yr = {
1314
1310
  key: 2,
1315
1311
  class: "ml-auto"
1316
- }, Yr = /*#__PURE__*/ Y(/* @__PURE__ */ A({
1312
+ }, Xr = /*#__PURE__*/ q(/* @__PURE__ */ A({
1317
1313
  __name: "CuiAssistantComposer",
1318
1314
  props: {
1319
1315
  busy: {
@@ -1333,59 +1329,59 @@ var Fr = d({
1333
1329
  },
1334
1330
  emits: ["send", "stop"],
1335
1331
  setup(e, { expose: u, emit: d }) {
1336
- let f = e, _ = d, { smBreakpoint: y } = ie(), { t: S, locale: O } = Ce(), k = window.SpeechRecognition ?? window.webkitSpeechRecognition, A = !!k && window.isSecureContext, ee = w("inputRef"), ne = w("fileInput"), P = j(""), F = j(!1), I = j([]), L = j(""), R = null, z;
1337
- function B() {
1332
+ let f = e, _ = d, { smBreakpoint: y } = z(), { t: S, locale: O } = Te(), k = window.SpeechRecognition ?? window.webkitSpeechRecognition, A = !!k && window.isSecureContext, ee = w("inputRef"), ne = w("fileInput"), P = j(""), F = j(!1), I = j([]), L = j(""), R = null, re;
1333
+ function ie() {
1338
1334
  let e = ee.value?.$el;
1339
1335
  return e?.tagName === "TEXTAREA" ? e : e?.querySelector("textarea");
1340
1336
  }
1341
- function re() {
1342
- B()?.focus();
1337
+ function B() {
1338
+ ie()?.focus();
1343
1339
  }
1344
- function V() {
1345
- let e = B();
1340
+ function ae() {
1341
+ let e = ie();
1346
1342
  e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
1347
1343
  }
1348
- function ae() {
1344
+ function oe() {
1349
1345
  let e = P.value.trim();
1350
1346
  !e && !I.value.length || f.disabled || (_("send", {
1351
1347
  text: e,
1352
1348
  attachments: I.value
1353
1349
  }), P.value = "", I.value = []);
1354
1350
  }
1355
- function H(e) {
1356
- L.value = e, clearTimeout(z), z = setTimeout(() => L.value = "", 4e3);
1351
+ function se(e) {
1352
+ L.value = e, clearTimeout(re), re = setTimeout(() => L.value = "", 4e3);
1357
1353
  }
1358
- function oe(e) {
1354
+ function ce(e) {
1359
1355
  let t = e.type.split("/")[0];
1360
1356
  return t === "image" || t === "audio" || t === "video" ? t : void 0;
1361
1357
  }
1362
- function U(e) {
1358
+ function le(e) {
1363
1359
  return e >= 1048576 ? `${(e / 1024 / 1024).toFixed(1)} MB` : `${Math.max(1, Math.round(e / 1024))} KB`;
1364
1360
  }
1365
- function se(e) {
1361
+ function ue(e) {
1366
1362
  return new Promise((t, n) => {
1367
1363
  let r = new FileReader();
1368
1364
  r.onload = () => t(String(r.result)), r.onerror = () => n(r.error), r.readAsDataURL(e);
1369
1365
  });
1370
1366
  }
1371
- async function ce(e) {
1367
+ async function V(e) {
1372
1368
  for (let t of e) {
1373
- let e = oe(t);
1369
+ let e = ce(t);
1374
1370
  if (!e) {
1375
- H(S("views.assistant.attach_unsupported"));
1371
+ se(S("views.assistant.attach_unsupported"));
1376
1372
  continue;
1377
1373
  }
1378
- if (t.size > Ir[e]) {
1379
- H(S("views.assistant.attach_too_large", { max: Math.round(Ir[e] / 1024 / 1024) }));
1374
+ if (t.size > Lr[e]) {
1375
+ se(S("views.assistant.attach_too_large", { max: Math.round(Lr[e] / 1024 / 1024) }));
1380
1376
  continue;
1381
1377
  }
1382
1378
  if (I.value.length >= 8) {
1383
- H(S("views.assistant.attach_too_many", { max: 8 }));
1379
+ se(S("views.assistant.attach_too_many", { max: 8 }));
1384
1380
  break;
1385
1381
  }
1386
- let n = await se(t);
1382
+ let n = await ue(t);
1387
1383
  I.value.push({
1388
- id: J(),
1384
+ id: fe(),
1389
1385
  name: t.name || e,
1390
1386
  kind: e,
1391
1387
  mimeType: t.type,
@@ -1395,39 +1391,39 @@ var Fr = d({
1395
1391
  });
1396
1392
  }
1397
1393
  }
1398
- async function W(e) {
1394
+ async function H(e) {
1399
1395
  let t = e.target;
1400
- t.files?.length && await ce(Array.from(t.files)), t.value = "";
1396
+ t.files?.length && await V(Array.from(t.files)), t.value = "";
1401
1397
  }
1402
- async function le(e) {
1398
+ async function U(e) {
1403
1399
  let t = Array.from(e.clipboardData?.files ?? []);
1404
- t.length && (e.preventDefault(), await ce(t));
1400
+ t.length && (e.preventDefault(), await V(t));
1405
1401
  }
1406
- function G(e) {
1402
+ function de(e) {
1407
1403
  I.value = I.value.filter((t) => t.id !== e);
1408
1404
  }
1409
- function K() {
1405
+ function W() {
1410
1406
  if (F.value) {
1411
1407
  R?.stop();
1412
1408
  return;
1413
1409
  }
1414
1410
  if (!k) return;
1415
1411
  let e = P.value.trim(), t = new k();
1416
- t.lang = Rr[O.value] ?? O.value, t.interimResults = !0, t.continuous = !1, t.onresult = (t) => {
1412
+ t.lang = zr[O.value] ?? O.value, t.interimResults = !0, t.continuous = !1, t.onresult = (t) => {
1417
1413
  let n = "";
1418
1414
  for (let e = 0; e < t.results.length; e += 1) n += t.results[e][0]?.transcript ?? "";
1419
1415
  P.value = e ? `${e} ${n.trim()}` : n.trim();
1420
1416
  }, t.onend = () => {
1421
- F.value = !1, R = null, re();
1417
+ F.value = !1, R = null, B();
1422
1418
  }, t.onerror = (e) => {
1423
- F.value = !1, R = null, e.error !== "no-speech" && e.error !== "aborted" && H(e.error === "not-allowed" || e.error === "service-not-allowed" ? S("views.assistant.voice_denied") : S("views.assistant.voice_failed", { error: e.error }));
1419
+ F.value = !1, R = null, e.error !== "no-speech" && e.error !== "aborted" && se(e.error === "not-allowed" || e.error === "service-not-allowed" ? S("views.assistant.voice_denied") : S("views.assistant.voice_failed", { error: e.error }));
1424
1420
  }, R = t, F.value = !0, t.start();
1425
1421
  }
1426
- return b(P, () => c(V)), a(() => {
1427
- R?.abort(), clearTimeout(z);
1428
- }), u({ focus: re }), (a, c) => {
1429
- let u = Pe, d = Qt, f = Gn, b = Ht, S = je, w = De, O = N, k = Fr, j = ct, R = Mr, z = kr, B = te;
1430
- return i(), x("div", zr, [
1422
+ return b(P, () => c(ae)), a(() => {
1423
+ R?.abort(), clearTimeout(re);
1424
+ }), u({ focus: B }), (a, c) => {
1425
+ let u = Ie, d = $t, f = Kn, b = Ut, S = Ne, w = ke, O = N, k = Ir, j = lt, R = Nr, re = Ar, z = te;
1426
+ return i(), x("div", Br, [
1431
1427
  M(u, {
1432
1428
  ref_key: "inputRef",
1433
1429
  ref: ee,
@@ -1438,19 +1434,19 @@ var Fr = d({
1438
1434
  "auto-resize": "",
1439
1435
  rows: "1",
1440
1436
  class: "cui-assistant-input block w-full max-h-52 resize-none px-4 pt-3.5 pb-1 text-[15px] leading-relaxed",
1441
- onKeydown: n(t(ae, ["exact", "prevent"]), ["enter"]),
1442
- onPaste: le
1437
+ onKeydown: n(t(oe, ["exact", "prevent"]), ["enter"]),
1438
+ onPaste: U
1443
1439
  }, null, 8, [
1444
1440
  "modelValue",
1445
1441
  "placeholder",
1446
1442
  "disabled",
1447
1443
  "onKeydown"
1448
1444
  ]),
1449
- e.visionMissing && g(I).some((e) => e.kind === "image") ? (i(), x("div", Br, [M(d, {
1445
+ e.visionMissing && g(I).some((e) => e.kind === "image") ? (i(), x("div", Vr, [M(d, {
1450
1446
  title: a.$t("views.assistant.notice_vision_title", { model: e.visionMissing }),
1451
1447
  text: a.$t("views.assistant.notice_vision_attach")
1452
1448
  }, null, 8, ["title", "text"])])) : m("", !0),
1453
- g(I).length ? (i(), x("div", Vr, [(i(!0), x(C, null, r(g(I), (e) => (i(), x("div", {
1449
+ g(I).length ? (i(), x("div", Hr, [(i(!0), x(C, null, r(g(I), (e) => (i(), x("div", {
1454
1450
  key: e.id,
1455
1451
  class: "cui-assistant-attachment relative flex items-center rounded-lg text-xs text-color"
1456
1452
  }, [e.kind === "image" ? (i(), x("img", {
@@ -1458,7 +1454,7 @@ var Fr = d({
1458
1454
  src: e.preview,
1459
1455
  class: "h-14 w-14 rounded-lg object-cover",
1460
1456
  alt: ""
1461
- }, null, 8, Hr)) : (i(), x("span", Ur, [
1457
+ }, null, 8, Ur)) : (i(), x("span", Wr, [
1462
1458
  e.kind === "audio" ? (i(), p(f, {
1463
1459
  key: 0,
1464
1460
  class: "w-4 h-4 text-muted"
@@ -1466,19 +1462,19 @@ var Fr = d({
1466
1462
  key: 1,
1467
1463
  class: "w-4 h-4 text-muted"
1468
1464
  })),
1469
- T("span", Wr, o(e.name), 1),
1470
- T("span", Gr, o(U(e.size)), 1)
1465
+ T("span", Gr, o(e.name), 1),
1466
+ T("span", Kr, o(le(e.size)), 1)
1471
1467
  ])), E((i(), p(w, {
1472
1468
  type: "button",
1473
1469
  severity: "secondary",
1474
1470
  rounded: "",
1475
1471
  class: "cui-assistant-attachment-remove cui-icon-sm absolute -top-1.5 -right-1.5",
1476
- onClick: (t) => G(e.id)
1472
+ onClick: (t) => de(e.id)
1477
1473
  }, {
1478
1474
  icon: v(() => [M(S, { class: "w-3 h-3" })]),
1479
1475
  _: 1
1480
1476
  }, 8, ["onClick"])), [[
1481
- B,
1477
+ z,
1482
1478
  { value: a.$t("views.assistant.attach_remove") },
1483
1479
  void 0,
1484
1480
  { top: !0 }
@@ -1507,7 +1503,7 @@ var Fr = d({
1507
1503
  icon: v(() => [M(k, { class: "w-4 h-4" })]),
1508
1504
  _: 1
1509
1505
  }, 8, ["disabled"])), [[
1510
- B,
1506
+ z,
1511
1507
  { value: a.$t("views.assistant.attach") },
1512
1508
  void 0,
1513
1509
  { top: !0 }
@@ -1518,9 +1514,9 @@ var Fr = d({
1518
1514
  type: "file",
1519
1515
  class: "hidden",
1520
1516
  multiple: "",
1521
- accept: g(Lr),
1522
- onChange: W
1523
- }, null, 40, Kr),
1517
+ accept: g(Rr),
1518
+ onChange: H
1519
+ }, null, 40, qr),
1524
1520
  g(A) ? E((i(), p(w, {
1525
1521
  key: 0,
1526
1522
  type: "button",
@@ -1529,22 +1525,22 @@ var Fr = d({
1529
1525
  rounded: "",
1530
1526
  class: l(["cui-assistant-voice shrink-0", { "cui-assistant-voice-active": g(F) }]),
1531
1527
  disabled: e.disabled || e.busy,
1532
- onClick: K
1528
+ onClick: W
1533
1529
  }, {
1534
1530
  icon: v(() => [M(j, { class: "w-4 h-4" })]),
1535
1531
  _: 1
1536
1532
  }, 8, ["class", "disabled"])), [[
1537
- B,
1533
+ z,
1538
1534
  { value: g(F) ? a.$t("views.assistant.voice_stop") : a.$t("views.assistant.voice_start") },
1539
1535
  void 0,
1540
1536
  { top: !0 }
1541
1537
  ]]) : m("", !0),
1542
- !g(y) && !e.compact ? (i(), x("span", qr, [
1538
+ !g(y) && !e.compact ? (i(), x("span", Jr, [
1543
1539
  c[3] ||= T("kbd", { class: "cui-assistant-kbd" }, "↵", -1),
1544
1540
  D(" " + o(a.$t("views.assistant.hint_send")) + " · ", 1),
1545
1541
  c[4] ||= T("kbd", { class: "cui-assistant-kbd" }, "⇧↵", -1),
1546
1542
  D(" " + o(a.$t("views.assistant.hint_newline")), 1)
1547
- ])) : (i(), x("span", Jr)),
1543
+ ])) : (i(), x("span", Yr)),
1548
1544
  e.busy ? E((i(), p(w, {
1549
1545
  key: 3,
1550
1546
  type: "button",
@@ -1556,7 +1552,7 @@ var Fr = d({
1556
1552
  icon: v(() => [M(R, { class: "w-4 h-4" })]),
1557
1553
  _: 1
1558
1554
  })), [[
1559
- B,
1555
+ z,
1560
1556
  { value: a.$t("views.assistant.stop") },
1561
1557
  void 0,
1562
1558
  { top: !0 }
@@ -1565,54 +1561,54 @@ var Fr = d({
1565
1561
  type: "button",
1566
1562
  class: "cui-assistant-send shrink-0",
1567
1563
  disabled: e.disabled || !g(P).trim() && !g(I).length,
1568
- onClick: ae
1564
+ onClick: oe
1569
1565
  }, {
1570
- icon: v(() => [M(z, { class: "w-4 h-4" })]),
1566
+ icon: v(() => [M(re, { class: "w-4 h-4" })]),
1571
1567
  _: 1
1572
1568
  }, 8, ["disabled"])
1573
1569
  ], 2)
1574
1570
  ]);
1575
1571
  };
1576
1572
  }
1577
- }), [["__scopeId", "data-v-1b2f48d6"]]), Xr = {
1573
+ }), [["__scopeId", "data-v-1b2f48d6"]]), Zr = {
1578
1574
  viewBox: "0 0 24 24",
1579
1575
  width: "1.2em",
1580
1576
  height: "1.2em"
1581
1577
  };
1582
- function Zr(e, t) {
1583
- return i(), x("svg", Xr, [...t[0] ||= [T("path", {
1578
+ function Qr(e, t) {
1579
+ return i(), x("svg", Zr, [...t[0] ||= [T("path", {
1584
1580
  fill: "currentColor",
1585
1581
  d: "M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"
1586
1582
  }, null, -1)]]);
1587
1583
  }
1588
- var Qr = d({
1584
+ var $r = d({
1589
1585
  name: "mdi-tune",
1590
- render: Zr
1591
- }), $r = {
1586
+ render: Qr
1587
+ }), ei = {
1592
1588
  id: "pending-answer",
1593
1589
  role: "assistant",
1594
1590
  parts: []
1595
- }, ei = /* @__PURE__ */ function(e) {
1591
+ }, ti = /* @__PURE__ */ function(e) {
1596
1592
  return e.TEXT_MESSAGE_START = "TEXT_MESSAGE_START", e.TEXT_MESSAGE_CONTENT = "TEXT_MESSAGE_CONTENT", e.TEXT_MESSAGE_END = "TEXT_MESSAGE_END", e.TEXT_MESSAGE_CHUNK = "TEXT_MESSAGE_CHUNK", e.TOOL_CALL_START = "TOOL_CALL_START", e.TOOL_CALL_ARGS = "TOOL_CALL_ARGS", e.TOOL_CALL_END = "TOOL_CALL_END", e.TOOL_CALL_CHUNK = "TOOL_CALL_CHUNK", e.TOOL_CALL_RESULT = "TOOL_CALL_RESULT", e.THINKING_START = "THINKING_START", e.THINKING_END = "THINKING_END", e.THINKING_TEXT_MESSAGE_START = "THINKING_TEXT_MESSAGE_START", e.THINKING_TEXT_MESSAGE_CONTENT = "THINKING_TEXT_MESSAGE_CONTENT", e.THINKING_TEXT_MESSAGE_END = "THINKING_TEXT_MESSAGE_END", e.STATE_SNAPSHOT = "STATE_SNAPSHOT", e.STATE_DELTA = "STATE_DELTA", e.MESSAGES_SNAPSHOT = "MESSAGES_SNAPSHOT", e.ACTIVITY_SNAPSHOT = "ACTIVITY_SNAPSHOT", e.ACTIVITY_DELTA = "ACTIVITY_DELTA", e.RAW = "RAW", e.CUSTOM = "CUSTOM", e.RUN_STARTED = "RUN_STARTED", e.RUN_FINISHED = "RUN_FINISHED", e.RUN_ERROR = "RUN_ERROR", e.STEP_STARTED = "STEP_STARTED", e.STEP_FINISHED = "STEP_FINISHED", e.REASONING_START = "REASONING_START", e.REASONING_MESSAGE_START = "REASONING_MESSAGE_START", e.REASONING_MESSAGE_CONTENT = "REASONING_MESSAGE_CONTENT", e.REASONING_MESSAGE_END = "REASONING_MESSAGE_END", e.REASONING_MESSAGE_CHUNK = "REASONING_MESSAGE_CHUNK", e.REASONING_END = "REASONING_END", e.REASONING_ENCRYPTED_VALUE = "REASONING_ENCRYPTED_VALUE", e;
1597
1593
  }({});
1598
1594
  //#endregion
1599
1595
  //#region node_modules/@tanstack/ai/dist/esm/utilities/ag-ui-usage.js
1600
- function ti(e) {
1596
+ function ni(e) {
1601
1597
  return Object.keys(e).length > 0 ? e : void 0;
1602
1598
  }
1603
- function ni(e) {
1599
+ function ri(e) {
1604
1600
  return typeof e == "object" && !!e && !Array.isArray(e) && "promptTokens" in e;
1605
1601
  }
1606
- function ri(e, t) {
1607
- return ni(e) ? e : ii(Array.isArray(e) ? e : void 0, t);
1608
- }
1609
1602
  function ii(e, t) {
1603
+ return ri(e) ? e : ai(Array.isArray(e) ? e : void 0, t);
1604
+ }
1605
+ function ai(e, t) {
1610
1606
  let n = e?.[0];
1611
1607
  if (n == null && t == null) return;
1612
- let { promptTokensDetails: r, completionTokensDetails: i, ...a } = t ?? {}, o = ti({
1608
+ let { promptTokensDetails: r, completionTokensDetails: i, ...a } = t ?? {}, o = ni({
1613
1609
  ...n?.cachedInputTokens === void 0 ? {} : { cachedTokens: n.cachedInputTokens },
1614
1610
  ...r
1615
- }), s = ti({
1611
+ }), s = ni({
1616
1612
  ...n?.reasoningTokens === void 0 ? {} : { reasoningTokens: n.reasoningTokens },
1617
1613
  ...i
1618
1614
  });
@@ -1627,28 +1623,28 @@ function ii(e, t) {
1627
1623
  }
1628
1624
  //#endregion
1629
1625
  //#region node_modules/@tanstack/ai/dist/esm/utilities/merge-metadata.js
1630
- function ai(e) {
1626
+ function oi(e) {
1631
1627
  return typeof e == "object" && !!e && !Array.isArray(e);
1632
1628
  }
1633
- function oi(e, t) {
1629
+ function si(e, t) {
1634
1630
  if (t == null) return e;
1635
1631
  if (e == null) return { ...t };
1636
1632
  let n = {
1637
1633
  ...e,
1638
1634
  ...t
1639
1635
  };
1640
- return ai(e.tanstack) && ai(t.tanstack) && (n.tanstack = {
1636
+ return oi(e.tanstack) && oi(t.tanstack) && (n.tanstack = {
1641
1637
  ...e.tanstack,
1642
1638
  ...t.tanstack
1643
1639
  }), n;
1644
1640
  }
1645
- function X(e) {
1641
+ function Y(e) {
1646
1642
  if (e == null) return;
1647
1643
  let t = "metadata" in e ? e.metadata : void 0, n = (typeof t == "object" && t && !Array.isArray(t) ? t : e).tanstack;
1648
1644
  if (typeof n == "object" && n && !Array.isArray(n)) return n;
1649
1645
  }
1650
- function si(e, t) {
1651
- let n = e.metadata, r = X(e) ?? {};
1646
+ function ci(e, t) {
1647
+ let n = e.metadata, r = Y(e) ?? {};
1652
1648
  return {
1653
1649
  ...e,
1654
1650
  metadata: {
@@ -1662,13 +1658,13 @@ function si(e, t) {
1662
1658
  }
1663
1659
  //#endregion
1664
1660
  //#region node_modules/@tanstack/ai/dist/esm/utilities/errors.js
1665
- function ci(e) {
1661
+ function li(e) {
1666
1662
  let t = Error(e.message || e.error?.message || "An error occurred"), n = e.code ?? e.error?.code;
1667
1663
  return n !== void 0 && Object.assign(t, { code: n }), e.rawEvent !== void 0 && Object.assign(t, { rawEvent: e.rawEvent }), t;
1668
1664
  }
1669
1665
  //#endregion
1670
1666
  //#region node_modules/@tanstack/ai/dist/esm/interrupt-serialization.js
1671
- var li = new Uint32Array([
1667
+ var ui = new Uint32Array([
1672
1668
  1116352408,
1673
1669
  1899447441,
1674
1670
  3049323471,
@@ -1734,10 +1730,10 @@ var li = new Uint32Array([
1734
1730
  3204031479,
1735
1731
  3329325298
1736
1732
  ]);
1737
- function ui(e, t) {
1733
+ function di(e, t) {
1738
1734
  return e >>> t | e << 32 - t;
1739
1735
  }
1740
- function di(e) {
1736
+ function fi(e) {
1741
1737
  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);
1742
1738
  a.set(t), a[t.length] = 128;
1743
1739
  let o = new DataView(a.buffer);
@@ -1746,12 +1742,12 @@ function di(e) {
1746
1742
  for (let e = 0; e < i; e += 64) {
1747
1743
  for (let t = 0; t < 16; t++) h[t] = o.getUint32(e + t * 4);
1748
1744
  for (let e = 16; e < 64; e++) {
1749
- let t = h[e - 15] ?? 0, n = h[e - 2] ?? 0, r = ui(t, 7) ^ ui(t, 18) ^ t >>> 3, i = ui(n, 17) ^ ui(n, 19) ^ n >>> 10;
1745
+ let t = h[e - 15] ?? 0, n = h[e - 2] ?? 0, r = di(t, 7) ^ di(t, 18) ^ t >>> 3, i = di(n, 17) ^ di(n, 19) ^ n >>> 10;
1750
1746
  h[e] = (h[e - 16] ?? 0) + r + (h[e - 7] ?? 0) + i >>> 0;
1751
1747
  }
1752
1748
  let t = s, n = c, r = l, i = u, a = d, g = f, _ = p, v = m;
1753
1749
  for (let e = 0; e < 64; e++) {
1754
- let o = ui(a, 6) ^ ui(a, 11) ^ ui(a, 25), s = a & g ^ ~a & _, c = v + o + s + (li[e] ?? 0) + (h[e] ?? 0) >>> 0, l = (ui(t, 2) ^ ui(t, 13) ^ ui(t, 22)) + (t & n ^ t & r ^ n & r) >>> 0;
1750
+ let o = di(a, 6) ^ di(a, 11) ^ di(a, 25), s = a & g ^ ~a & _, c = v + o + s + (ui[e] ?? 0) + (h[e] ?? 0) >>> 0, l = (di(t, 2) ^ di(t, 13) ^ di(t, 22)) + (t & n ^ t & r ^ n & r) >>> 0;
1755
1751
  v = _, _ = g, g = a, a = i + c >>> 0, i = r, r = n, n = t, t = c + l >>> 0;
1756
1752
  }
1757
1753
  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;
@@ -1759,10 +1755,10 @@ function di(e) {
1759
1755
  let g = (e) => (e >>> 0).toString(16).padStart(8, "0");
1760
1756
  return g(s) + g(c) + g(l) + g(u) + g(d) + g(f) + g(p) + g(m);
1761
1757
  }
1762
- function fi(e) {
1763
- return `sha256:${di(e)}`;
1758
+ function pi(e) {
1759
+ return `sha256:${fi(e)}`;
1764
1760
  }
1765
- function pi(e, t) {
1761
+ function mi(e, t) {
1766
1762
  if (e === null) return "null";
1767
1763
  if (typeof e == "string" || typeof e == "boolean" || typeof e == "number" && Number.isFinite(e)) return JSON.stringify(e);
1768
1764
  if (typeof e != "object") throw TypeError("Interrupt values must be JSON-compatible.");
@@ -1772,74 +1768,74 @@ function pi(e, t) {
1772
1768
  let n;
1773
1769
  if (Array.isArray(e)) {
1774
1770
  let r = [];
1775
- for (let n = 0; n < e.length; n++) r.push(pi(e[n], t));
1771
+ for (let n = 0; n < e.length; n++) r.push(mi(e[n], t));
1776
1772
  n = `[${r.join(",")}]`;
1777
1773
  } else {
1778
1774
  let r = e;
1779
- n = `{${Object.keys(r).sort().map((e) => `${JSON.stringify(e)}:${pi(r[e], t)}`).join(",")}}`;
1775
+ n = `{${Object.keys(r).sort().map((e) => `${JSON.stringify(e)}:${mi(r[e], t)}`).join(",")}}`;
1780
1776
  }
1781
1777
  return t.delete(e), n;
1782
1778
  }
1783
- function mi(e) {
1784
- return pi(e, /* @__PURE__ */ new WeakSet());
1779
+ function hi(e) {
1780
+ return mi(e, /* @__PURE__ */ new WeakSet());
1785
1781
  }
1786
- function hi(e, t = fi) {
1782
+ function gi(e, t = pi) {
1787
1783
  if (typeof e != "string") throw TypeError("Interrupt digests require canonical JSON text.");
1788
1784
  return t(e);
1789
1785
  }
1790
- function gi(e) {
1791
- typeof e == "object" && e && !Object.isFrozen(e) && (Object.values(e).forEach(gi), Object.freeze(e));
1786
+ function _i(e) {
1787
+ typeof e == "object" && e && !Object.isFrozen(e) && (Object.values(e).forEach(_i), Object.freeze(e));
1792
1788
  }
1793
- function Z(e) {
1794
- let t = JSON.parse(mi(e));
1795
- return gi(t), t;
1789
+ function X(e) {
1790
+ let t = JSON.parse(hi(e));
1791
+ return _i(t), t;
1796
1792
  }
1797
1793
  //#endregion
1798
1794
  //#region node_modules/@tanstack/ai/dist/esm/interrupts.js
1799
- function _i(e) {
1800
- let t = Z([...e].sort((e, t) => e.interruptId.localeCompare(t.interruptId))), n = mi(t);
1795
+ function vi(e) {
1796
+ let t = X([...e].sort((e, t) => e.interruptId.localeCompare(t.interruptId))), n = hi(t);
1801
1797
  return Object.freeze({
1802
1798
  resolutions: t,
1803
1799
  canonicalResolutions: n,
1804
- fingerprint: hi(n)
1800
+ fingerprint: gi(n)
1805
1801
  });
1806
1802
  }
1807
1803
  //#endregion
1808
1804
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/tools/schema-converter.js
1809
- function vi(e) {
1805
+ function yi(e) {
1810
1806
  let t = {};
1811
1807
  for (let [n, r] of Object.entries(e)) n !== "$schema" && (t[n] = r);
1812
1808
  return t;
1813
1809
  }
1814
- function yi(e) {
1810
+ function bi(e) {
1815
1811
  return (typeof e == "object" || typeof e == "function") && e !== null;
1816
1812
  }
1817
- function bi(e) {
1818
- if (!yi(e) || !("~standard" in e)) return !1;
1813
+ function xi(e) {
1814
+ if (!bi(e) || !("~standard" in e)) return !1;
1819
1815
  let t = e["~standard"];
1820
1816
  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";
1821
1817
  }
1822
- function xi(e) {
1823
- return yi(e) && "~standard" in e && typeof e["~standard"] == "object" && e["~standard"] !== null && "version" in e["~standard"] && e["~standard"].version === 1 && "validate" in e["~standard"] && typeof e["~standard"].validate == "function";
1824
- }
1825
1818
  function Si(e) {
1826
- return Object.keys(e).length > 0 ? e : void 0;
1819
+ return bi(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";
1827
1820
  }
1828
1821
  function Ci(e) {
1822
+ return Object.keys(e).length > 0 ? e : void 0;
1823
+ }
1824
+ function wi(e) {
1829
1825
  if (Array.isArray(e)) {
1830
- let t = e.map((e) => wi(e, e.required || [])), n = t.map((e) => e.nullWidening ?? {});
1826
+ let t = e.map((e) => Ti(e, e.required || [])), n = t.map((e) => e.nullWidening ?? {});
1831
1827
  return {
1832
1828
  schema: t.map((e) => e.schema),
1833
1829
  itemMap: n.some((e) => Object.keys(e).length > 0) ? n : void 0
1834
1830
  };
1835
1831
  }
1836
- let t = wi(e, e.required || []);
1832
+ let t = Ti(e, e.required || []);
1837
1833
  return {
1838
1834
  schema: t.schema,
1839
1835
  itemMap: t.nullWidening
1840
1836
  };
1841
1837
  }
1842
- function wi(e, t = []) {
1838
+ function Ti(e, t = []) {
1843
1839
  let n = { ...e }, r = {};
1844
1840
  if (n.type === "object" && n.properties) {
1845
1841
  let e = { ...n.properties }, i = Object.keys(e), a = {};
@@ -1848,13 +1844,13 @@ function wi(e, t = []) {
1848
1844
  if (!r) continue;
1849
1845
  let i = !t.includes(n), o = !1, s;
1850
1846
  if (r.type === "object" && r.properties) {
1851
- let t = wi(r, r.required || []);
1847
+ let t = Ti(r, r.required || []);
1852
1848
  e[n] = i ? {
1853
1849
  ...t.schema,
1854
1850
  type: ["object", "null"]
1855
1851
  } : t.schema, o = i, s = t.nullWidening;
1856
1852
  } else if (r.type === "array" && r.items) {
1857
- let t = Ci(r.items);
1853
+ let t = wi(r.items);
1858
1854
  e[n] = {
1859
1855
  ...r,
1860
1856
  items: t.schema,
@@ -1875,46 +1871,46 @@ function wi(e, t = []) {
1875
1871
  n.properties = e, n.required = i, n.additionalProperties = !1, Object.keys(a).length > 0 && (r.properties = a);
1876
1872
  }
1877
1873
  if (n.type === "array" && n.items) {
1878
- let e = Ci(n.items);
1874
+ let e = wi(n.items);
1879
1875
  n.items = e.schema, e.itemMap && (r.items = e.itemMap);
1880
1876
  }
1881
1877
  return {
1882
1878
  schema: n,
1883
- nullWidening: Si(r)
1879
+ nullWidening: Ci(r)
1884
1880
  };
1885
1881
  }
1886
- function Ti(e) {
1887
- if (bi(e)) {
1888
- let t = vi(e["~standard"].jsonSchema.input({ target: "draft-07" }));
1882
+ function Ei(e) {
1883
+ if (xi(e)) {
1884
+ let t = yi(e["~standard"].jsonSchema.input({ target: "draft-07" }));
1889
1885
  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;
1890
1886
  }
1891
- if (xi(e)) throw Error("Schema is a Standard Schema validator but does not expose a JSON Schema converter on `~standard.jsonSchema`. Use Zod v4.2+, ArkType v2.1.28+, or wrap a Valibot schema with `toStandardJsonSchema()` from `@valibot/to-json-schema` before passing it as `outputSchema`.");
1892
- return typeof e == "object" ? vi(e) : e;
1887
+ if (Si(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`.");
1888
+ return typeof e == "object" ? yi(e) : e;
1893
1889
  }
1894
- function Ei(e, t = {}) {
1890
+ function Di(e, t = {}) {
1895
1891
  if (!e) return;
1896
1892
  let { forStructuredOutput: n = !1 } = t;
1897
- if (!n && !bi(e) && !xi(e)) return e;
1898
- let r = Ti(e);
1899
- return !r || typeof r != "object" || !n ? r : wi(r, r.required || []).schema;
1893
+ if (!n && !xi(e) && !Si(e)) return e;
1894
+ let r = Ei(e);
1895
+ return !r || typeof r != "object" || !n ? r : Ti(r, r.required || []).schema;
1900
1896
  }
1901
- var Di = class extends Error {
1897
+ var Oi = class extends Error {
1902
1898
  name = "StandardSchemaValidationError";
1903
1899
  issues;
1904
1900
  constructor(e) {
1905
1901
  super(`Validation failed: ${e.map((e) => e.message || "Validation failed").join(", ")}`), this.issues = e;
1906
1902
  }
1907
1903
  };
1908
- function Oi(e, t) {
1909
- if (!xi(e)) return t;
1904
+ function ki(e, t) {
1905
+ if (!Si(e)) return t;
1910
1906
  let n = e["~standard"].validate(t);
1911
1907
  if (n instanceof Promise) throw Error("Schema validation returned a Promise. Use validateWithStandardSchema for async validation.");
1912
1908
  if (!n.issues) return n.value;
1913
- throw new Di(n.issues);
1909
+ throw new Oi(n.issues);
1914
1910
  }
1915
1911
  //#endregion
1916
1912
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/tools/approval-schema.js
1917
- var ki = /* @__PURE__ */ new Set([
1913
+ var Ai = /* @__PURE__ */ new Set([
1918
1914
  "$schema",
1919
1915
  "$id",
1920
1916
  "$ref",
@@ -1936,41 +1932,41 @@ var ki = /* @__PURE__ */ new Set([
1936
1932
  "maxLength",
1937
1933
  "pattern"
1938
1934
  ]);
1939
- function Ai(e) {
1940
- return typeof e == "object" && !!e && !Array.isArray(e) && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null);
1941
- }
1942
1935
  function ji(e) {
1943
- return Ai(e) && Object.keys(e).some((e) => ki.has(e));
1936
+ return typeof e == "object" && !!e && !Array.isArray(e) && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null);
1944
1937
  }
1945
1938
  function Mi(e) {
1946
- return xi(e) || bi(e) || ji(e);
1939
+ return ji(e) && Object.keys(e).some((e) => Ai.has(e));
1947
1940
  }
1948
1941
  function Ni(e) {
1949
- if (!Ai(e)) return !1;
1950
- let t = Object.keys(e);
1951
- return t.length > 0 && t.every((e) => e === "approve" || e === "reject") && t.every((t) => Mi(e[t]));
1942
+ return Si(e) || xi(e) || Mi(e);
1952
1943
  }
1953
1944
  function Pi(e) {
1945
+ if (!ji(e)) return !1;
1946
+ let t = Object.keys(e);
1947
+ return t.length > 0 && t.every((e) => e === "approve" || e === "reject") && t.every((t) => Ni(e[t]));
1948
+ }
1949
+ function Fi(e) {
1954
1950
  let t = {};
1955
1951
  for (let [n, r] of Object.entries(e)) t[n] = r;
1956
1952
  return t;
1957
1953
  }
1958
- function Fi(e) {
1959
- if (xi(e)) {
1960
- let t = bi(e) ? Pi(e["~standard"].jsonSchema.input({ target: "draft-2020-12" })) : void 0;
1954
+ function Ii(e) {
1955
+ if (Si(e)) {
1956
+ let t = xi(e) ? Fi(e["~standard"].jsonSchema.input({ target: "draft-2020-12" })) : void 0;
1961
1957
  return {
1962
1958
  source: e,
1963
1959
  validator: e,
1964
1960
  ...t !== void 0 && { jsonSchema: t }
1965
1961
  };
1966
1962
  }
1967
- if (ji(e)) return {
1963
+ if (Mi(e)) return {
1968
1964
  source: e,
1969
1965
  jsonSchema: e
1970
1966
  };
1971
1967
  throw TypeError("Expected a supported SchemaInput.");
1972
1968
  }
1973
- function Ii(e) {
1969
+ function Li(e) {
1974
1970
  let t = { approved: { const: e.approved } }, n = ["approved"];
1975
1971
  return e.approved && e.inputSchema && (t.editedArgs = e.inputSchema.jsonSchema ?? {}), e.payload && (t.payload = e.payload.jsonSchema ?? {}, n.push("payload")), {
1976
1972
  type: "object",
@@ -1979,22 +1975,22 @@ function Ii(e) {
1979
1975
  additionalProperties: !1
1980
1976
  };
1981
1977
  }
1982
- function Li(e, t) {
1983
- let n = t === void 0 ? null : Fi(t), r = null, i = null;
1978
+ function Ri(e, t) {
1979
+ let n = t === void 0 ? null : Ii(t), r = null, i = null;
1984
1980
  if (e !== void 0) {
1985
- if (xi(e) || ji(e)) r = Fi(e), i = r;
1986
- else if (Ni(e)) r = e.approve === void 0 ? null : Fi(e.approve), i = e.reject === void 0 ? null : Fi(e.reject);
1981
+ if (Si(e) || Mi(e)) r = Ii(e), i = r;
1982
+ else if (Pi(e)) r = e.approve === void 0 ? null : Ii(e.approve), i = e.reject === void 0 ? null : Ii(e.reject);
1987
1983
  else throw TypeError("approvalSchema must be a SchemaInput or a nonempty map containing approve or reject.");
1988
1984
  }
1989
- let a = { oneOf: [Ii({
1985
+ let a = { oneOf: [Li({
1990
1986
  approved: !0,
1991
1987
  payload: r,
1992
1988
  inputSchema: n
1993
- }), Ii({
1989
+ }), Li({
1994
1990
  approved: !1,
1995
1991
  payload: i,
1996
1992
  inputSchema: null
1997
- })] }, o = mi(a), s = mi({
1993
+ })] }, o = hi(a), s = hi({
1998
1994
  approve: r?.jsonSchema ?? null,
1999
1995
  reject: i?.jsonSchema ?? null
2000
1996
  });
@@ -2004,33 +2000,33 @@ function Li(e, t) {
2004
2000
  reject: i
2005
2001
  },
2006
2002
  responseSchema: a,
2007
- responseSchemaHash: hi(o),
2008
- approvalSchemaHash: hi(s)
2003
+ responseSchemaHash: gi(o),
2004
+ approvalSchemaHash: gi(s)
2009
2005
  };
2010
2006
  }
2011
- function Ri(e) {
2012
- return hi(e === void 0 ? "undefined" : mi(Fi(e).jsonSchema ?? { standardValidator: "unserialized" }));
2007
+ function zi(e) {
2008
+ return gi(e === void 0 ? "undefined" : hi(Ii(e).jsonSchema ?? { standardValidator: "unserialized" }));
2013
2009
  }
2014
2010
  //#endregion
2015
2011
  //#region node_modules/@tanstack/ai/dist/esm/interrupt-resume.js
2016
- var zi = "tanstack:interruptBinding", Bi = zi;
2017
- function Vi(e) {
2012
+ var Bi = "tanstack:interruptBinding", Vi = Bi;
2013
+ function Hi(e) {
2018
2014
  return e && typeof e == "object" ? e : null;
2019
2015
  }
2020
- function Q(e, t) {
2016
+ function Z(e, t) {
2021
2017
  return typeof e[t] == "string" ? e[t] : void 0;
2022
2018
  }
2023
- function Hi(e) {
2019
+ function Ui(e) {
2024
2020
  let t = e.v;
2025
2021
  return t === void 0 || t === 1;
2026
2022
  }
2027
- function Ui(e) {
2028
- let t = Vi(e.metadata), n = t ? Vi(t[Bi]) : null;
2029
- if (!n || Q(n, "interruptId") !== e.id || !Hi(n)) return;
2030
- let r = Q(n, "kind"), i = Q(n, "interruptId"), a = Q(n, "responseSchemaHash"), o = Q(n, "expiresAt");
2023
+ function Wi(e) {
2024
+ let t = Hi(e.metadata), n = t ? Hi(t[Vi]) : null;
2025
+ if (!n || Z(n, "interruptId") !== e.id || !Ui(n)) return;
2026
+ let r = Z(n, "kind"), i = Z(n, "interruptId"), a = Z(n, "responseSchemaHash"), o = Z(n, "expiresAt");
2031
2027
  if (!i || a === "" || o !== void 0 && !Number.isFinite(Date.parse(o))) return;
2032
2028
  if (r === "generic") {
2033
- let e = Q(n, "definitionId"), t = Q(n, "key"), s = n.batchIndex, c = Q(n, "payloadSchemaHash");
2029
+ let e = Z(n, "definitionId"), t = Z(n, "key"), s = n.batchIndex, c = Z(n, "payloadSchemaHash");
2034
2030
  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 : {
2035
2031
  v: 1,
2036
2032
  kind: r,
@@ -2044,10 +2040,10 @@ function Ui(e) {
2044
2040
  };
2045
2041
  }
2046
2042
  if (!a) return;
2047
- let s = Q(n, "toolName"), c = Q(n, "toolCallId");
2043
+ let s = Z(n, "toolName"), c = Z(n, "toolCallId");
2048
2044
  if (s && c) {
2049
2045
  if (r === "client-tool-execution") {
2050
- let e = Q(n, "outputSchemaHash");
2046
+ let e = Z(n, "outputSchemaHash");
2051
2047
  return e ? {
2052
2048
  v: 1,
2053
2049
  kind: r,
@@ -2060,7 +2056,7 @@ function Ui(e) {
2060
2056
  } : void 0;
2061
2057
  }
2062
2058
  if (r === "tool-approval") {
2063
- let e = Q(n, "inputSchemaHash"), t = Q(n, "approvalSchemaHash");
2059
+ let e = Z(n, "inputSchemaHash"), t = Z(n, "approvalSchemaHash");
2064
2060
  return !e || !t ? void 0 : {
2065
2061
  v: 1,
2066
2062
  kind: r,
@@ -2076,12 +2072,12 @@ function Ui(e) {
2076
2072
  }
2077
2073
  }
2078
2074
  }
2079
- function Wi(e) {
2080
- let t = Ui(e);
2075
+ function Gi(e) {
2076
+ let t = Wi(e);
2081
2077
  if (!t) return;
2082
- let n = Vi(e.metadata), r = n ? Vi(n[Bi]) : null;
2078
+ let n = Hi(e.metadata), r = n ? Hi(n[Vi]) : null;
2083
2079
  if (!r) return;
2084
- let i = Q(r, "interruptedRunId"), a = r.generation;
2080
+ let i = Z(r, "interruptedRunId"), a = r.generation;
2085
2081
  if (!(!i || typeof a != "number" || !Number.isInteger(a) || a < 0)) return {
2086
2082
  ...t,
2087
2083
  interruptedRunId: i,
@@ -2090,9 +2086,9 @@ function Wi(e) {
2090
2086
  }
2091
2087
  //#endregion
2092
2088
  //#region node_modules/@tanstack/ai/dist/esm/interrupt-definition.js
2093
- var Gi = "tanstack:interruptPayload";
2094
- function Ki(e, t) {
2095
- if (!bi(e)) throw TypeError(`${t} must be a Standard Schema with a JSON Schema converter.`);
2089
+ var Ki = "tanstack:interruptPayload";
2090
+ function qi(e, t) {
2091
+ if (!xi(e)) throw TypeError(`${t} must be a Standard Schema with a JSON Schema converter.`);
2096
2092
  try {
2097
2093
  let t = e["~standard"].jsonSchema.input({ target: "draft-07" });
2098
2094
  if (t === void 0) throw TypeError("The exported schema is undefined.");
@@ -2102,28 +2098,28 @@ function Ki(e, t) {
2102
2098
  for (let [e, r] of Object.entries(t)) e !== "$schema" && (n[e] = r);
2103
2099
  return {
2104
2100
  json: n,
2105
- canonicalJson: mi(n)
2101
+ canonicalJson: hi(n)
2106
2102
  };
2107
2103
  } catch (e) {
2108
2104
  throw TypeError(`${t} could not export compatible JSON Schema: ${e instanceof Error ? e.message : String(e)}`);
2109
2105
  }
2110
2106
  }
2111
- function qi(e) {
2112
- return hi(Ki(e, "Interrupt schema").canonicalJson);
2107
+ function Ji(e) {
2108
+ return gi(qi(e, "Interrupt schema").canonicalJson);
2113
2109
  }
2114
2110
  //#endregion
2115
2111
  //#region node_modules/@tanstack/ai/dist/esm/generic-interrupt-continuation.js
2116
- var Ji = "tanstack:interruptContinuation";
2117
- function Yi(e) {
2118
- return typeof e == "object" && !!e && !Array.isArray(e);
2119
- }
2112
+ var Yi = "tanstack:interruptContinuation";
2120
2113
  function Xi(e) {
2121
- return { [Ji]: e };
2114
+ return typeof e == "object" && !!e && !Array.isArray(e);
2122
2115
  }
2123
2116
  function Zi(e) {
2124
- let t = Ui(e);
2117
+ return { [Yi]: e };
2118
+ }
2119
+ function Qi(e) {
2120
+ let t = Wi(e);
2125
2121
  if (t?.kind !== "generic" || t.definitionId === void 0 || t.key === void 0 || t.batchIndex === void 0) return;
2126
- let n = Yi(e.metadata) ? e.metadata : void 0, r = n !== void 0 && Object.prototype.hasOwnProperty.call(n, "tanstack:interruptPayload");
2122
+ let n = Xi(e.metadata) ? e.metadata : void 0, r = n !== void 0 && Object.prototype.hasOwnProperty.call(n, "tanstack:interruptPayload");
2127
2123
  return {
2128
2124
  v: 1,
2129
2125
  definitionId: t.definitionId,
@@ -2134,98 +2130,98 @@ function Zi(e) {
2134
2130
  ...e.expiresAt === void 0 ? {} : { expiresAt: e.expiresAt },
2135
2131
  ...t.responseSchemaHash === void 0 ? {} : { responseSchemaHash: t.responseSchemaHash },
2136
2132
  ...t.payloadSchemaHash === void 0 ? {} : { payloadSchemaHash: t.payloadSchemaHash },
2137
- ...r ? { payload: n[Gi] } : {}
2133
+ ...r ? { payload: n[Ki] } : {}
2138
2134
  };
2139
2135
  }
2140
2136
  //#endregion
2141
2137
  //#region node_modules/@tanstack/ai/dist/esm/utilities/tool-result.js
2142
- var Qi = /* @__PURE__ */ new Set([
2138
+ var $i = /* @__PURE__ */ new Set([
2143
2139
  "text",
2144
2140
  "image",
2145
2141
  "audio",
2146
2142
  "video",
2147
2143
  "document"
2148
2144
  ]);
2149
- function $i(e) {
2145
+ function ea(e) {
2150
2146
  if (typeof e != "object" || !e) return !1;
2151
2147
  let t = e;
2152
- if (typeof t.type != "string" || !Qi.has(t.type)) return !1;
2148
+ if (typeof t.type != "string" || !$i.has(t.type)) return !1;
2153
2149
  if (t.type === "text") return typeof t.content == "string";
2154
2150
  let n = t.source;
2155
2151
  if (typeof n != "object" || !n) return !1;
2156
2152
  let r = n;
2157
2153
  return typeof r.value == "string" ? r.type === "data" ? typeof r.mimeType == "string" : r.type === "url" : !1;
2158
2154
  }
2159
- function ea(e) {
2160
- return Array.isArray(e) && e.length > 0 && e.every($i);
2161
- }
2162
2155
  function ta(e) {
2163
- return typeof e == "string" || ea(e) ? e : JSON.stringify(e);
2156
+ return Array.isArray(e) && e.length > 0 && e.every(ea);
2157
+ }
2158
+ function na(e) {
2159
+ return typeof e == "string" || ta(e) ? e : JSON.stringify(e);
2164
2160
  }
2165
2161
  //#endregion
2166
2162
  //#region node_modules/@tanstack/ai/dist/esm/utilities/provider-executed.js
2167
- function na(e) {
2163
+ function ra(e) {
2168
2164
  let t = e?.metadata;
2169
2165
  return typeof t == "object" && t && t.providerExecuted === !0 ? t : null;
2170
2166
  }
2171
- function ra(e) {
2172
- return na(e) !== null;
2167
+ function ia(e) {
2168
+ return ra(e) !== null;
2173
2169
  }
2174
2170
  //#endregion
2175
2171
  //#region node_modules/@tanstack/ai/dist/esm/activities/chat/messages.js
2176
- function ia(e) {
2172
+ function aa(e) {
2177
2173
  return typeof e == "object" && !!e && !Array.isArray(e);
2178
2174
  }
2179
- function aa(e) {
2175
+ function oa(e) {
2180
2176
  return e.type === "text" || e.type === "image" || e.type === "audio" || e.type === "video" || e.type === "document";
2181
2177
  }
2182
- function oa(e) {
2178
+ function sa(e) {
2183
2179
  try {
2184
2180
  return JSON.stringify(e) ?? "";
2185
2181
  } catch {
2186
2182
  return "";
2187
2183
  }
2188
2184
  }
2189
- function sa(e) {
2185
+ function ca(e) {
2190
2186
  return typeof e == "string" && e !== "" ? e : void 0;
2191
2187
  }
2192
- function ca(e) {
2188
+ function la(e) {
2193
2189
  if ("encryptedValue" in e) {
2194
- let t = sa(e.encryptedValue);
2190
+ let t = ca(e.encryptedValue);
2195
2191
  if (t !== void 0) return t;
2196
2192
  }
2197
- return sa(X(e)?.signature);
2198
- }
2199
- function la(e) {
2200
- return e.length === 0 ? null : e.every((e) => e.type === "text") ? e.map((e) => e.content).join("") || null : e;
2193
+ return ca(Y(e)?.signature);
2201
2194
  }
2202
2195
  function ua(e) {
2203
- return e == null ? "" : typeof e == "string" ? e : e.filter((e) => e.type === "text").map((e) => e.content).join("");
2196
+ return e.length === 0 ? null : e.every((e) => e.type === "text") ? e.map((e) => e.content).join("") || null : e;
2204
2197
  }
2205
2198
  function da(e) {
2206
- return Array.isArray(e) ? e : ua(e);
2199
+ return e == null ? "" : typeof e == "string" ? e : e.filter((e) => e.type === "text").map((e) => e.content).join("");
2207
2200
  }
2208
2201
  function fa(e) {
2202
+ return Array.isArray(e) ? e : da(e);
2203
+ }
2204
+ function pa(e) {
2209
2205
  if (!("role" in e) || e.role !== "tool") return e;
2210
- let t = e, n = X(t)?.toolResult;
2211
- if (!ia(n) || "content" in n && !ea(n.content)) return e;
2206
+ let t = e, n = Y(t)?.toolResult;
2207
+ if (!aa(n) || "content" in n && !ta(n.content)) return e;
2212
2208
  let r = { ...e };
2213
2209
  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") {
2214
- let e = pa(n.createdAt);
2210
+ let e = Q(n.createdAt);
2215
2211
  e && Reflect.set(r, "createdAt", e);
2216
2212
  }
2217
- ea(n.content) && Reflect.set(r, "content", n.content);
2213
+ ta(n.content) && Reflect.set(r, "content", n.content);
2218
2214
  let i = Reflect.get(t, "metadata");
2219
- if (ia(i)) {
2215
+ if (aa(i)) {
2220
2216
  let e = i.tanstack;
2221
- if (ia(e)) {
2217
+ if (aa(e)) {
2222
2218
  let { toolResult: t, ...n } = e, a = { ...i };
2223
2219
  Object.keys(n).length ? a.tanstack = n : delete a.tanstack, Object.keys(a).length ? Reflect.set(r, "metadata", a) : Reflect.deleteProperty(r, "metadata");
2224
2220
  }
2225
2221
  }
2226
2222
  return r;
2227
2223
  }
2228
- function pa(e) {
2224
+ function Q(e) {
2229
2225
  if (e instanceof Date) return Number.isNaN(e.getTime()) ? void 0 : e;
2230
2226
  if (typeof e != "string") return;
2231
2227
  let t = new Date(e);
@@ -2233,17 +2229,17 @@ function pa(e) {
2233
2229
  }
2234
2230
  function ma(e) {
2235
2231
  if (e.type !== "tool-result") return e;
2236
- let t = pa(e.createdAt), { createdAt: n, ...r } = e;
2232
+ let t = Q(e.createdAt), { createdAt: n, ...r } = e;
2237
2233
  return t === void 0 ? r : {
2238
2234
  ...r,
2239
2235
  createdAt: t
2240
2236
  };
2241
2237
  }
2242
2238
  function ha(e) {
2243
- return pa(X(e)?.createdAt);
2239
+ return Q(Y(e)?.createdAt);
2244
2240
  }
2245
2241
  function ga(e) {
2246
- let t = pa(e.createdAt);
2242
+ let t = Q(e.createdAt);
2247
2243
  return t === void 0 ? {} : { createdAt: t };
2248
2244
  }
2249
2245
  function _a(e) {
@@ -2266,7 +2262,7 @@ function ba(e, t) {
2266
2262
  };
2267
2263
  }
2268
2264
  function xa(e) {
2269
- let t = e.parts.filter(va), n = e.metadata ?? {}, r = X(e), i = {};
2265
+ let t = e.parts.filter(va), n = e.metadata ?? {}, r = Y(e), i = {};
2270
2266
  r?.model !== void 0 && (i.model = r.model), r?.signature !== void 0 && (i.signature = r.signature), t.length > 0 && (i.uiResources = t);
2271
2267
  let a = { ...n };
2272
2268
  return Object.keys(i).length > 0 ? a.tanstack = i : delete a.tanstack, Object.keys(a).length > 0 ? a : void 0;
@@ -2276,11 +2272,11 @@ function Sa(e) {
2276
2272
  }
2277
2273
  function Ca(e) {
2278
2274
  let t = [];
2279
- for (let n of e.parts) aa(n) && t.push(n);
2275
+ for (let n of e.parts) oa(n) && t.push(n);
2280
2276
  return {
2281
2277
  id: e.id,
2282
2278
  role: e.role,
2283
- content: la(t),
2279
+ content: ua(t),
2284
2280
  ..._a(e),
2285
2281
  ...ga(e),
2286
2282
  ...e.metadata !== void 0 && { metadata: e.metadata }
@@ -2305,7 +2301,7 @@ function Ea(e) {
2305
2301
  ...o !== void 0 && { metadata: o }
2306
2302
  };
2307
2303
  function c(e = !1) {
2308
- let i = la(n.contentParts), a = i !== null, o = n.toolCalls.length > 0, c = r.length > 0;
2304
+ let i = ua(n.contentParts), a = i !== null, o = n.toolCalls.length > 0, c = r.length > 0;
2309
2305
  (e || a || o || c) && (t.push({
2310
2306
  ...s,
2311
2307
  role: "assistant",
@@ -2347,13 +2343,13 @@ function Ea(e) {
2347
2343
  }), i.add(a.toolCallId));
2348
2344
  break;
2349
2345
  case "thinking":
2350
- (a.content || a.signature) && (n.toolCalls.some(ra) && c(), r.push({
2346
+ (a.content || a.signature) && (n.toolCalls.some(ia) && c(), r.push({
2351
2347
  content: a.content,
2352
2348
  ...a.signature && { signature: a.signature }
2353
2349
  }));
2354
2350
  break;
2355
2351
  case "structured-output": if (a.status === "complete") {
2356
- let e = a.raw === "" ? a.data === void 0 ? "" : oa(a.data) : a.raw;
2352
+ let e = a.raw === "" ? a.data === void 0 ? "" : sa(a.data) : a.raw;
2357
2353
  e !== "" && (n.contentParts.push({
2358
2354
  type: "text",
2359
2355
  content: e
@@ -2363,7 +2359,7 @@ function Ea(e) {
2363
2359
  c();
2364
2360
  for (let n of e.parts) if (n.type === "tool-call" && (n.output !== void 0 && !i.has(n.id) && (t.push({
2365
2361
  role: "tool",
2366
- content: ta(n.output),
2362
+ content: na(n.output),
2367
2363
  toolCallId: n.id
2368
2364
  }), i.add(n.id)), n.output === void 0 && n.state === "approval-responded" && n.approval?.approved !== void 0 && !i.has(n.id))) {
2369
2365
  let e = n.approval.approved;
@@ -2384,13 +2380,13 @@ function Ea(e) {
2384
2380
  }), t;
2385
2381
  }
2386
2382
  function Da(e, t) {
2387
- let n = [], r = pa(e.createdAt);
2383
+ let n = [], r = Q(e.createdAt);
2388
2384
  if (e.role === "assistant" && e.thinking?.length) for (let t of e.thinking) (t.content || t.signature) && n.push({
2389
2385
  type: "thinking",
2390
2386
  content: t.content,
2391
2387
  ...t.signature && { signature: t.signature }
2392
2388
  });
2393
- let i = e.structuredOutput ?? Aa(X(e)?.structuredOutput);
2389
+ let i = e.structuredOutput ?? Aa(Y(e)?.structuredOutput);
2394
2390
  if (e.role === "assistant" && i) {
2395
2391
  if (typeof e.content == "string" && e.content && e.content !== i.raw) {
2396
2392
  let t = i.raw, r = t !== "" && e.content.endsWith(t) ? e.content.slice(0, -t.length) : e.content;
@@ -2403,7 +2399,7 @@ function Da(e, t) {
2403
2399
  } else if (e.role === "tool" && e.toolCallId) n.push({
2404
2400
  type: "tool-result",
2405
2401
  toolCallId: e.toolCallId,
2406
- content: da(e.content),
2402
+ content: fa(e.content),
2407
2403
  state: e.error === void 0 ? "complete" : "error",
2408
2404
  ...e.id !== void 0 && { id: e.id },
2409
2405
  ...e.name !== void 0 && { name: e.name },
@@ -2413,7 +2409,7 @@ function Da(e, t) {
2413
2409
  });
2414
2410
  else if (Array.isArray(e.content)) for (let t of e.content) n.push(t);
2415
2411
  else {
2416
- let t = ua(e.content);
2412
+ let t = da(e.content);
2417
2413
  t && n.push({
2418
2414
  type: "text",
2419
2415
  content: t
@@ -2443,7 +2439,7 @@ function Da(e, t) {
2443
2439
  ..._a(e),
2444
2440
  ...r !== void 0 && { createdAt: r },
2445
2441
  ...e.metadata !== void 0 && { metadata: e.metadata }
2446
- }, o = X(e)?.uiResources;
2442
+ }, o = Y(e)?.uiResources;
2447
2443
  return ba(a, Array.isArray(o) ? o.filter(va) : []);
2448
2444
  }
2449
2445
  function Oa(e) {
@@ -2459,7 +2455,7 @@ function Oa(e) {
2459
2455
  parts: ja(e.content)
2460
2456
  });
2461
2457
  case "assistant": {
2462
- let n = X(e), r = n?.toolCallMetadata, i = Aa(n?.structuredOutput), a = e.toolCalls?.map((e) => {
2458
+ let n = Y(e), r = n?.toolCallMetadata, i = Aa(n?.structuredOutput), a = e.toolCalls?.map((e) => {
2463
2459
  let t = typeof r == "object" && r ? r[e.id] : void 0;
2464
2460
  return t === void 0 ? e : {
2465
2461
  ...e,
@@ -2475,8 +2471,8 @@ function Oa(e) {
2475
2471
  }, t));
2476
2472
  }
2477
2473
  case "tool": {
2478
- e = fa(e);
2479
- let n = pa("createdAt" in e ? e.createdAt : void 0) ?? ha(e);
2474
+ e = pa(e);
2475
+ let n = Q("createdAt" in e ? e.createdAt : void 0) ?? ha(e);
2480
2476
  return ka(e, Da({
2481
2477
  role: "tool",
2482
2478
  content: e.content,
@@ -2498,7 +2494,7 @@ function Oa(e) {
2498
2494
  }] : []
2499
2495
  });
2500
2496
  case "reasoning": {
2501
- let n = ca(e), r = typeof e.content == "string" ? e.content : "";
2497
+ let n = la(e), r = typeof e.content == "string" ? e.content : "";
2502
2498
  return ka(e, {
2503
2499
  id: t,
2504
2500
  role: "assistant",
@@ -2533,7 +2529,7 @@ function ka(e, t) {
2533
2529
  metadata: a
2534
2530
  });
2535
2531
  }
2536
- let o = pa(i.createdAt) ?? (a === void 0 ? void 0 : ha(a));
2532
+ let o = Q(i.createdAt) ?? (a === void 0 ? void 0 : ha(a));
2537
2533
  if (o !== void 0 && !Object.is(o, i.createdAt)) i = {
2538
2534
  ...i,
2539
2535
  createdAt: o
@@ -2542,7 +2538,7 @@ function ka(e, t) {
2542
2538
  let { createdAt: e, ...t } = i;
2543
2539
  i = t;
2544
2540
  }
2545
- let s = X(a)?.uiResources, c = Array.isArray(s) ? s.filter(va) : [];
2541
+ let s = Y(a)?.uiResources, c = Array.isArray(s) ? s.filter(va) : [];
2546
2542
  return ba(i, c);
2547
2543
  }
2548
2544
  function Aa(e) {
@@ -2575,12 +2571,12 @@ function Ma(e, t) {
2575
2571
  ...e,
2576
2572
  parts: n,
2577
2573
  id: e.id || t(),
2578
- createdAt: pa(e.createdAt) ?? /* @__PURE__ */ new Date()
2574
+ createdAt: Q(e.createdAt) ?? /* @__PURE__ */ new Date()
2579
2575
  };
2580
2576
  }
2581
2577
  return {
2582
2578
  ...Da(e, t()),
2583
- createdAt: pa(e.createdAt) ?? /* @__PURE__ */ new Date()
2579
+ createdAt: Q(e.createdAt) ?? /* @__PURE__ */ new Date()
2584
2580
  };
2585
2581
  }
2586
2582
  function Na() {
@@ -2594,7 +2590,7 @@ function Pa(e) {
2594
2590
  function Fa(e, t, n, r, i = !1) {
2595
2591
  let a = Pa(e) ? e : {}, o = Pa(a.tanstack) ? { ...a.tanstack } : {};
2596
2592
  i && delete o.uiResources;
2597
- let s = pa(t), c = {
2593
+ let s = Q(t), c = {
2598
2594
  ...n === void 0 ? {} : { id: n },
2599
2595
  ...s && { createdAt: s.toISOString() },
2600
2596
  ...Array.isArray(r) && { content: r }
@@ -2665,7 +2661,7 @@ function Ia(e, t) {
2665
2661
  approved: t,
2666
2662
  ...t && { pendingExecution: !0 },
2667
2663
  message: t ? "User approved this action" : "User denied this action"
2668
- }) : ta(e.output), a = typeof i == "string" ? i : JSON.stringify(i);
2664
+ }) : na(e.output), a = typeof i == "string" ? i : JSON.stringify(i);
2669
2665
  n.push({
2670
2666
  role: "tool",
2671
2667
  id: qa(Ka(e.id), r),
@@ -2699,9 +2695,9 @@ function La(e, t, n, r, i) {
2699
2695
  };
2700
2696
  }
2701
2697
  function Ra(e, t, n) {
2702
- let r = { ...e.metadata ?? {} }, i = X(e), a = {};
2698
+ let r = { ...e.metadata ?? {} }, i = Y(e), a = {};
2703
2699
  i?.model !== void 0 && (a.model = i.model), i?.signature !== void 0 && (a.signature = i.signature);
2704
- let o = pa(e.createdAt);
2700
+ let o = Q(e.createdAt);
2705
2701
  o !== void 0 && (a.createdAt = o.toISOString());
2706
2702
  let s = za(t, n);
2707
2703
  s && (a.structuredOutput = s);
@@ -2787,19 +2783,19 @@ function Xa(e) {
2787
2783
  //#endregion
2788
2784
  //#region node_modules/@tanstack/ai/dist/esm/utilities/restore-inbound-chunk.js
2789
2785
  function Za(e) {
2790
- if ((e.type === ei.RUN_FINISHED || e.type === ei.RUN_ERROR) && (Array.isArray(e.usage) || ni(e.usage))) {
2791
- let t = ri(e.usage, X(e)?.usage);
2786
+ if ((e.type === ti.RUN_FINISHED || e.type === ti.RUN_ERROR) && (Array.isArray(e.usage) || ri(e.usage))) {
2787
+ let t = ii(e.usage, Y(e)?.usage);
2792
2788
  t !== void 0 && (e.usage = t);
2793
2789
  }
2794
- if (e.type === ei.TOOL_CALL_START && e.toolName === void 0 && e.toolCallName && (e.toolName = e.toolCallName), e.type === ei.TOOL_CALL_END && e.input === void 0) {
2795
- let t = X(e)?.input;
2790
+ if (e.type === ti.TOOL_CALL_START && e.toolName === void 0 && e.toolCallName && (e.toolName = e.toolCallName), e.type === ti.TOOL_CALL_END && e.input === void 0) {
2791
+ let t = Y(e)?.input;
2796
2792
  t !== void 0 && (e.input = t);
2797
2793
  }
2798
2794
  return e;
2799
2795
  }
2800
2796
  function Qa(e) {
2801
2797
  Za(e);
2802
- let t = X(e), n = e;
2798
+ let t = Y(e), n = e;
2803
2799
  if (t == null) return n;
2804
2800
  for (let [e, r] of Object.entries(t)) e !== "usage" && e !== "interruptErrors" && n[e] === void 0 && r !== void 0 && (n[e] = r);
2805
2801
  return t.interruptErrors !== void 0 && (n["tanstack:interruptErrors"] = t.interruptErrors), n;
@@ -3025,7 +3021,7 @@ function po(e) {
3025
3021
  let t = fo(e.runId);
3026
3022
  if (t !== void 0) return t;
3027
3023
  }
3028
- return fo(X(e)?.runId);
3024
+ return fo(Y(e)?.runId);
3029
3025
  }
3030
3026
  //#endregion
3031
3027
  //#region node_modules/partial-json/dist/options.js
@@ -3374,7 +3370,7 @@ function Ao(e) {
3374
3370
  return e.some((e) => {
3375
3371
  let t = e.metadata;
3376
3372
  if (!t || typeof t != "object" || Array.isArray(t)) return !1;
3377
- let n = t[zi];
3373
+ let n = t[Bi];
3378
3374
  return typeof n == "object" && !!n && !Array.isArray(n) && n.kind === "generic";
3379
3375
  });
3380
3376
  }
@@ -3441,7 +3437,7 @@ var jo = class e {
3441
3437
  console.warn(`[StreamProcessor] Could not find message with tool call ${e}`);
3442
3438
  return;
3443
3439
  }
3444
- let i = Co(this.messages, e, t, n ? "error" : void 0, n), a = ta(t), o = n ? "error" : "complete";
3440
+ let i = Co(this.messages, e, t, n ? "error" : void 0, n), a = na(t), o = n ? "error" : "complete";
3445
3441
  i = xo(i, r.id, e, a, o, n), this.messages = i, this.emitMessagesChange();
3446
3442
  }
3447
3443
  addToolApprovalResponse(e, t) {
@@ -3461,7 +3457,7 @@ var jo = class e {
3461
3457
  let t = e.parts.filter((e) => e.type === "tool-call");
3462
3458
  if (t.length === 0) return !0;
3463
3459
  let n = new Set(e.parts.filter((e) => e.type === "tool-result").map((e) => e.toolCallId));
3464
- return t.every((e) => e.state === "complete" || e.state === "approval-responded" || e.output !== void 0 && !e.approval || n.has(e.id) || ra(e));
3460
+ return t.every((e) => e.state === "complete" || e.state === "approval-responded" || e.output !== void 0 && !e.approval || n.has(e.id) || ia(e));
3465
3461
  }
3466
3462
  removeMessagesAfter(e) {
3467
3463
  let t = new Set(this.messages.slice(0, e + 1).map((e) => e.id));
@@ -3622,10 +3618,10 @@ var jo = class e {
3622
3618
  if (typeof t != "object" || !t || Array.isArray(t)) return;
3623
3619
  let n = this.messages.find((t) => t.id === e);
3624
3620
  if (!n) return;
3625
- let r = t, i = X(r), a = i != null && ("content" in i || "args" in i) ? {
3621
+ let r = t, i = Y(r), a = i != null && ("content" in i || "args" in i) ? {
3626
3622
  ...r,
3627
3623
  tanstack: Object.fromEntries(Object.entries(i).filter(([e]) => e !== "content" && e !== "args"))
3628
- } : r, o = oi(n.metadata, a), s = pa(X(r)?.createdAt), c = s !== void 0;
3624
+ } : r, o = si(n.metadata, a), s = Q(Y(r)?.createdAt), c = s !== void 0;
3629
3625
  this.messages = this.messages.map((t) => t.id === e ? {
3630
3626
  ...t,
3631
3627
  ...o === void 0 ? {} : { metadata: o },
@@ -3820,7 +3816,7 @@ var jo = class e {
3820
3816
  if (!t) return;
3821
3817
  let n = this.getMessageState(t);
3822
3818
  if (!n) return;
3823
- let r = e.input === void 0 ? X(e)?.input : e.input, i = n.toolCalls.get(e.toolCallId);
3819
+ let r = e.input === void 0 ? Y(e)?.input : e.input, i = n.toolCalls.get(e.toolCallId);
3824
3820
  if (i && i.state !== "input-complete") {
3825
3821
  if (r !== void 0 && !i.arguments) try {
3826
3822
  i.arguments = JSON.stringify(r);
@@ -3842,7 +3838,7 @@ var jo = class e {
3842
3838
  handleToolCallResultEvent(e) {
3843
3839
  let t = this.toolCallToMessage.get(e.toolCallId) ?? this.messages.find((t) => t.parts.some((t) => t.type === "tool-call" && t.id === e.toolCallId))?.id;
3844
3840
  if (!t) return;
3845
- let n = e.state === "output-error" || X(e)?.state === "output-error", r;
3841
+ let n = e.state === "output-error" || Y(e)?.state === "output-error", r;
3846
3842
  try {
3847
3843
  r = JSON.parse(e.content);
3848
3844
  } catch {
@@ -3857,7 +3853,7 @@ var jo = class e {
3857
3853
  }
3858
3854
  handleRunFinishedEvent(e) {
3859
3855
  let t = e;
3860
- 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) {
3856
+ if (this.finishReason = t.finishReason === void 0 ? Y(e)?.finishReason ?? null : t.finishReason, this.activeRuns.delete(e.runId), e.outcome?.type === "interrupt" && this.handleInterrupts(e.outcome.interrupts), this.activeRuns.size === 0) {
3861
3857
  if (this.completeAllToolCalls(), this.finishReason === "tool_calls" && e.outcome?.type !== "interrupt") return;
3862
3858
  this.isDone = !0, this.finalizeStream();
3863
3859
  }
@@ -3900,7 +3896,7 @@ var jo = class e {
3900
3896
  let t = po(e);
3901
3897
  t ? this.activeRuns.delete(t) : this.activeRuns.clear();
3902
3898
  let { messageId: n } = this.ensureAssistantMessage(), r = e.message || "An error occurred";
3903
- e.message || console.error("[StreamProcessor] RUN_ERROR with no message; original chunk:", e), this.structuredMessageIds.has(n) && (this.flushStructuredOutputUpdate(n), this.messages = Do(this.messages, n, r), this.structuredMessageIds.delete(n), this.emitStructuredOutputChange(n, "error"), this.emitMessagesChange()), this.events.onError?.(ci(e));
3899
+ e.message || console.error("[StreamProcessor] RUN_ERROR with no message; original chunk:", e), this.structuredMessageIds.has(n) && (this.flushStructuredOutputUpdate(n), this.messages = Do(this.messages, n, r), this.structuredMessageIds.delete(n), this.emitStructuredOutputChange(n, "error"), this.emitMessagesChange()), this.events.onError?.(li(e));
3904
3900
  }
3905
3901
  handleStepStartedEvent(e) {
3906
3902
  let t = e.stepName || Na(), n = this.getActiveAssistantMessageId();
@@ -4383,7 +4379,7 @@ function us(e) {
4383
4379
  return Qa(e);
4384
4380
  }
4385
4381
  function ds(e) {
4386
- let t = X(e)?.model;
4382
+ let t = Y(e)?.model;
4387
4383
  if (typeof t == "string") return t;
4388
4384
  let n = "usage" in e ? e.usage : void 0;
4389
4385
  if (Array.isArray(n)) {
@@ -4402,7 +4398,7 @@ async function* fs(e, t) {
4402
4398
  if (o.startsWith(":") || o.startsWith("event:") || o.startsWith("retry:")) continue;
4403
4399
  let e = Ro(o);
4404
4400
  if (e === "[DONE]") {
4405
- yield { chunk: si({
4401
+ yield { chunk: ci({
4406
4402
  type: No.RUN_FINISHED,
4407
4403
  threadId: n ?? t?.threadId ?? "",
4408
4404
  runId: r ?? t?.runId ?? "",
@@ -4592,7 +4588,7 @@ function Ss(e) {
4592
4588
  try {
4593
4589
  let c = e.connect(t, n, r, i);
4594
4590
  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);
4595
- !r?.aborted && !a && s(si({
4591
+ !r?.aborted && !a && s(ci({
4596
4592
  type: No.RUN_FINISHED,
4597
4593
  threadId: is(o ?? i?.threadId, "threadId"),
4598
4594
  runId: is(l ?? i?.runId, "runId"),
@@ -4724,10 +4720,10 @@ function Ds(e) {
4724
4720
  return e.resumable;
4725
4721
  }
4726
4722
  function Os(e, t) {
4727
- let n = Zi(e.descriptor);
4723
+ let n = Qi(e.descriptor);
4728
4724
  return n ? {
4729
4725
  ...t,
4730
- metadata: Xi(n)
4726
+ metadata: Zi(n)
4731
4727
  } : t;
4732
4728
  }
4733
4729
  function ks(e) {
@@ -4772,16 +4768,16 @@ function Fs(e) {
4772
4768
  return Ns(e.metadata) || Ps(e.metadata);
4773
4769
  }
4774
4770
  function Is(e) {
4775
- return Wi(e);
4771
+ return Gi(e);
4776
4772
  }
4777
4773
  function Ls(e) {
4778
4774
  if (!Ms(e.metadata)) return !1;
4779
- let t = e.metadata[zi];
4775
+ let t = e.metadata[Bi];
4780
4776
  return !Ms(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;
4781
4777
  }
4782
4778
  function Rs(e) {
4783
4779
  if (!Ms(e.metadata)) return !1;
4784
- let t = e.metadata[zi];
4780
+ let t = e.metadata[Bi];
4785
4781
  return !Ms(t) || t.kind !== "generic" ? !1 : "definitionId" in t || "key" in t || "batchIndex" in t || "payloadSchemaHash" in t;
4786
4782
  }
4787
4783
  function zs(e) {
@@ -4792,14 +4788,14 @@ function Bs(e) {
4792
4788
  }
4793
4789
  function Vs(e) {
4794
4790
  if (e.responseSchema !== void 0) try {
4795
- return hi(mi(e.responseSchema));
4791
+ return gi(hi(e.responseSchema));
4796
4792
  } catch {
4797
4793
  return;
4798
4794
  }
4799
4795
  }
4800
4796
  function Hs(e) {
4801
4797
  if (e !== void 0) try {
4802
- return qi(e);
4798
+ return Ji(e);
4803
4799
  } catch {
4804
4800
  return;
4805
4801
  }
@@ -4812,7 +4808,7 @@ function Ws(e, t, n) {
4812
4808
  valid: !0,
4813
4809
  payload: t
4814
4810
  };
4815
- if (xi(e)) {
4811
+ if (Si(e)) {
4816
4812
  let r = e["~standard"].validate(t), i = (e) => e.issues ? {
4817
4813
  code: n,
4818
4814
  message: e.issues[0]?.message ?? "Schema validation failed."
@@ -4865,7 +4861,7 @@ function Qs(e, t) {
4865
4861
  }
4866
4862
  function $s(e, t, n) {
4867
4863
  let r = Vs(e) ?? n?.responseSchemaHash;
4868
- return Z({
4864
+ return X({
4869
4865
  v: 1,
4870
4866
  kind: "generic",
4871
4867
  interruptId: e.id,
@@ -4876,7 +4872,7 @@ function $s(e, t, n) {
4876
4872
  });
4877
4873
  }
4878
4874
  function ec(e, t) {
4879
- let n = Z(e.descriptor), r = e.error === void 0 ? Object.freeze([]) : Object.freeze([Z(e.error)]), i = r[0];
4875
+ let n = X(e.descriptor), r = e.error === void 0 ? Object.freeze([]) : Object.freeze([X(e.error)]), i = r[0];
4880
4876
  return {
4881
4877
  id: n.id,
4882
4878
  interruptId: n.id,
@@ -4930,7 +4926,7 @@ var tc = class {
4930
4926
  threadId: e.threadId,
4931
4927
  interruptedRunId: e.interruptedRunId,
4932
4928
  generation: e.generation,
4933
- interrupts: Z(e.interrupts)
4929
+ interrupts: X(e.interrupts)
4934
4930
  };
4935
4931
  let n = /* @__PURE__ */ new Map();
4936
4932
  for (let t of e.interrupts) {
@@ -4998,7 +4994,7 @@ var tc = class {
4998
4994
  return n ? (this.resolveItem(n.descriptor.id, { approved: t }), !0) : !1;
4999
4995
  }
5000
4996
  hydrateInterrupt(e, t, n) {
5001
- let r = Z(e), i = Is(r), a = i === void 0 && Fs(r);
4997
+ let r = X(e), i = Is(r), a = i === void 0 && Fs(r);
5002
4998
  if (i === void 0 && !a) return Ls(r) ? {
5003
4999
  descriptor: r,
5004
5000
  binding: $s(r, t, void 0),
@@ -5031,10 +5027,10 @@ var tc = class {
5031
5027
  if (s && i.kind === "tool-approval") {
5032
5028
  let e = this.tools?.find((e) => e.name === i.toolName);
5033
5029
  if (e?.needsApproval === !0 && r.toolCallId === i.toolCallId) try {
5034
- let t = Li(e.approvalSchema, e.inputSchema);
5035
- if (Ri(e.inputSchema) === i.inputSchemaHash && t.approvalSchemaHash === i.approvalSchemaHash && t.responseSchemaHash === i.responseSchemaHash) return {
5030
+ let t = Ri(e.approvalSchema, e.inputSchema);
5031
+ if (zi(e.inputSchema) === i.inputSchemaHash && t.approvalSchemaHash === i.approvalSchemaHash && t.responseSchemaHash === i.responseSchemaHash) return {
5036
5032
  descriptor: r,
5037
- binding: Z(i),
5033
+ binding: X(i),
5038
5034
  kind: "tool-approval",
5039
5035
  status: "pending",
5040
5036
  canResolve: !0,
@@ -5046,9 +5042,9 @@ var tc = class {
5046
5042
  }
5047
5043
  if (s && i.kind === "client-tool-execution") {
5048
5044
  let e = this.tools?.find((e) => e.name === i.toolName);
5049
- if (e !== void 0 && r.toolCallId === i.toolCallId && Ri(e.outputSchema) === i.outputSchemaHash) return {
5045
+ if (e !== void 0 && r.toolCallId === i.toolCallId && zi(e.outputSchema) === i.outputSchemaHash) return {
5050
5046
  descriptor: r,
5051
- binding: Z(i),
5047
+ binding: X(i),
5052
5048
  kind: "client-tool-execution",
5053
5049
  status: "pending",
5054
5050
  canResolve: !0,
@@ -5059,7 +5055,7 @@ var tc = class {
5059
5055
  }
5060
5056
  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 {
5061
5057
  descriptor: r,
5062
- binding: Z(i),
5058
+ binding: X(i),
5063
5059
  kind: "generic",
5064
5060
  status: "error",
5065
5061
  canResolve: !1,
@@ -5073,13 +5069,13 @@ var tc = class {
5073
5069
  let t = zs(r);
5074
5070
  return {
5075
5071
  descriptor: r,
5076
- binding: Z(i),
5072
+ binding: X(i),
5077
5073
  definition: e,
5078
5074
  kind: "generic",
5079
5075
  status: "pending",
5080
5076
  canResolve: !0,
5081
5077
  resumable: !0,
5082
- ...t === void 0 ? {} : { payload: Z(t) },
5078
+ ...t === void 0 ? {} : { payload: X(t) },
5083
5079
  validationGeneration: 0
5084
5080
  };
5085
5081
  }
@@ -5107,13 +5103,13 @@ var tc = class {
5107
5103
  return Object.freeze(e);
5108
5104
  }
5109
5105
  if (n.kind === "tool-approval" && n.binding.kind === "tool-approval") {
5110
- let t = Z(n.binding), i = {
5106
+ let t = X(n.binding), i = {
5111
5107
  ...r,
5112
5108
  kind: "tool-approval",
5113
5109
  binding: t,
5114
5110
  toolName: n.binding.toolName,
5115
5111
  toolCallId: n.binding.toolCallId,
5116
- originalArgs: Z(n.binding.originalArgs),
5112
+ originalArgs: X(n.binding.originalArgs),
5117
5113
  cancel: () => this.cancelItem(n.descriptor.id, e),
5118
5114
  clearResolution: () => this.clearItem(n.descriptor.id, e),
5119
5115
  resolveInterrupt: (t, r) => {
@@ -5127,7 +5123,7 @@ var tc = class {
5127
5123
  };
5128
5124
  return Object.freeze(i);
5129
5125
  }
5130
- let i = n.binding.kind === "generic" ? Z(n.binding) : Z({
5126
+ let i = n.binding.kind === "generic" ? X(n.binding) : X({
5131
5127
  v: 1,
5132
5128
  kind: "generic",
5133
5129
  interruptId: n.descriptor.id,
@@ -5215,7 +5211,7 @@ var tc = class {
5215
5211
  maybeSubmit() {
5216
5212
  let e = this.items.some((e) => e.kind === "generic"), t = this.items.filter((t) => Ds(t) && !(e && t.kind === "client-tool-execution"));
5217
5213
  if (t.length === 0 || t.some((e) => e.resolution === void 0 || e.status !== "staged")) return;
5218
- let n = this.requireHydration(), r = _i(t.map((e) => e.resolution).filter((e) => e !== void 0)), i = Object.freeze({
5214
+ let n = this.requireHydration(), r = vi(t.map((e) => e.resolution).filter((e) => e !== void 0)), i = Object.freeze({
5219
5215
  threadId: n.threadId,
5220
5216
  interruptedRunId: n.interruptedRunId,
5221
5217
  generation: n.generation,
@@ -5242,7 +5238,7 @@ var tc = class {
5242
5238
  })])), n || this.publish();
5243
5239
  return;
5244
5240
  }
5245
- e.resolution = Z(Os(e, {
5241
+ e.resolution = X(Os(e, {
5246
5242
  interruptId: e.descriptor.id,
5247
5243
  status: "resolved",
5248
5244
  payload: t.payload
@@ -5310,7 +5306,7 @@ var tc = class {
5310
5306
  return;
5311
5307
  }
5312
5308
  this.invalidateRetry();
5313
- for (let n of t) n.validationGeneration++, n.resolution = Z({
5309
+ for (let n of t) n.validationGeneration++, n.resolution = X({
5314
5310
  interruptId: n.descriptor.id,
5315
5311
  status: "resolved",
5316
5312
  payload: { approved: e }
@@ -5401,8 +5397,8 @@ var tc = class {
5401
5397
  let i = !1, a = !1, o = [];
5402
5398
  for (let e of r) if ((e.code === "stale" || e.code === "expired" || e.code === "conflict") && (i = !0), a ||= e.retryable, e.scope === "item") {
5403
5399
  let t = this.items.find((t) => Ds(t) && t.descriptor.id === e.interruptId);
5404
- t && (t.status = "error", t.error = Z(e));
5405
- } else o.push(Z(e));
5400
+ t && (t.status = "error", t.error = X(e));
5401
+ } else o.push(X(e));
5406
5402
  let s = Zs(this.rootErrors, this.submissionRootErrors, o);
5407
5403
  this.rootErrors = s.rootErrors, this.submissionRootErrors = s.submissionRootErrors;
5408
5404
  for (let e of this.items) Ds(e) && e.status === "submitting" && (e.status = "error");
@@ -5889,7 +5885,7 @@ function Sc(e) {
5889
5885
  function Cc(e) {
5890
5886
  if (e.type !== "RUN_FINISHED" || e.outcome?.type === "interrupt") return !1;
5891
5887
  let t = e;
5892
- return t.finishReason === void 0 ? X(e)?.finishReason === "tool_calls" : t.finishReason === "tool_calls";
5888
+ return t.finishReason === void 0 ? Y(e)?.finishReason === "tool_calls" : t.finishReason === "tool_calls";
5893
5889
  }
5894
5890
  function wc(e) {
5895
5891
  let t = {
@@ -5937,7 +5933,7 @@ function Tc(e) {
5937
5933
  typeof t.content.content == "string" ? r.push({
5938
5934
  type: "text",
5939
5935
  content: t.content.content
5940
- }) : r.push(...t.content.content), i = oi(i, t.content.metadata);
5936
+ }) : r.push(...t.content.content), i = si(i, t.content.metadata);
5941
5937
  }
5942
5938
  return {
5943
5939
  content: {
@@ -6518,7 +6514,7 @@ var Oc = 2e3, kc = /* @__PURE__ */ new Set([
6518
6514
  }
6519
6515
  async processIncomingChunk(e, t) {
6520
6516
  if (e = Qa(e), e.type === "RUN_ERROR" && this.isActiveInterruptSubmissionFailure(e)) {
6521
- let t = X(e)?.interruptErrors;
6517
+ let t = Y(e)?.interruptErrors;
6522
6518
  this.interruptSubmissionFailure = { errors: Array.isArray(t) ? t : [] };
6523
6519
  }
6524
6520
  if (this.connectionStatus === "connecting" && this.setConnectionStatus("connected"), this.clearedStreamTracker.shouldIgnoreChunk(e)) {
@@ -6528,7 +6524,7 @@ var Oc = 2e3, kc = /* @__PURE__ */ new Set([
6528
6524
  this.callbacksRef.current.onChunk(e), this.devtoolsBridge.observeChunk(e), this.processor.processChunk(e), this.updateRunLifecycle(e), this.observeInterruptState(e), t?.defer !== !1 && (typeof document > "u" || !document.hidden) && await new Promise((e) => setTimeout(e, 0)), this.resolveJoinedRun(e);
6529
6525
  }
6530
6526
  isActiveInterruptSubmissionFailure(e) {
6531
- let t = this.activeInterruptSubmission, n = X(e)?.interruptErrors;
6527
+ let t = this.activeInterruptSubmission, n = Y(e)?.interruptErrors;
6532
6528
  if (!t || !Array.isArray(n) || n.length === 0) return !1;
6533
6529
  let r = Yo(e);
6534
6530
  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);
@@ -6689,7 +6685,7 @@ var Oc = 2e3, kc = /* @__PURE__ */ new Set([
6689
6685
  clientTools: Array.from(u.values()).map((e) => ({
6690
6686
  name: e.name,
6691
6687
  description: e.description,
6692
- parameters: e.inputSchema ? Ei(e.inputSchema) : { type: "object" }
6688
+ parameters: e.inputSchema ? Di(e.inputSchema) : { type: "object" }
6693
6689
  })),
6694
6690
  forwardedProps: { ...f },
6695
6691
  ...r ? { resume: r } : {},
@@ -6763,7 +6759,7 @@ var Oc = 2e3, kc = /* @__PURE__ */ new Set([
6763
6759
  }
6764
6760
  }
6765
6761
  validateClientToolOutput(e, t) {
6766
- return e.outputSchema && xi(e.outputSchema) ? Oi(e.outputSchema, t) : t;
6762
+ return e.outputSchema && Si(e.outputSchema) ? ki(e.outputSchema, t) : t;
6767
6763
  }
6768
6764
  async addToolApprovalResponse(e) {
6769
6765
  if (this.processor.addToolApprovalResponse(e.id, e.approved), this.devtoolsBridge.emitSnapshot(), this.interruptManager.resolveToolApprovalDecision(e.id, e.approved)) return;
@@ -7060,8 +7056,8 @@ var Rc = class {
7060
7056
  let e = this.options.getTools ? Array.from(this.options.getTools()).map((e) => ({
7061
7057
  name: e.name,
7062
7058
  description: e.description,
7063
- inputSchema: e.inputSchema ? Ei(e.inputSchema) : { type: "object" },
7064
- outputSchema: e.outputSchema ? Ei(e.outputSchema) : void 0,
7059
+ inputSchema: e.inputSchema ? Di(e.inputSchema) : { type: "object" },
7060
+ outputSchema: e.outputSchema ? Di(e.outputSchema) : void 0,
7065
7061
  needsApproval: e.needsApproval,
7066
7062
  metadata: e.metadata
7067
7063
  })) : [];
@@ -7796,7 +7792,7 @@ function $c(e) {
7796
7792
  }
7797
7793
  async function el(e, t) {
7798
7794
  let n = new Headers(t?.headers ?? {});
7799
- for (let [e, t] of Object.entries(await G())) n.set(e, t);
7795
+ for (let [e, t] of Object.entries(await ue())) n.set(e, t);
7800
7796
  return n.set("X-Cui-Timezone", Intl.DateTimeFormat().resolvedOptions().timeZone), fetch(e, {
7801
7797
  ...t,
7802
7798
  headers: n
@@ -7840,7 +7836,7 @@ async function rl(e, t, n, r) {
7840
7836
  }
7841
7837
  case "open_camview": return nl(e, "/camview");
7842
7838
  case "open_page": {
7843
- let t = ye[String(r.page ?? "")];
7839
+ let t = xe[String(r.page ?? "")];
7844
7840
  return t ? nl(e, t.path) : {
7845
7841
  ok: !1,
7846
7842
  message: "unknown page"
@@ -7882,12 +7878,12 @@ async function rl(e, t, n, r) {
7882
7878
  }
7883
7879
  }
7884
7880
  function il(e) {
7885
- let t = L(), n = lt(), r = [...(e.approvalTools ?? []).filter((e) => e.approval && e.inputSchema).map((e) => uo({
7881
+ let t = L(), n = ut(), r = [...(e.approvalTools ?? []).filter((e) => e.approval && e.inputSchema).map((e) => uo({
7886
7882
  name: e.name,
7887
7883
  description: e.description,
7888
7884
  inputSchema: e.inputSchema,
7889
7885
  needsApproval: !0
7890
- })), ...xe.map((e) => uo({
7886
+ })), ...Ce.map((e) => uo({
7891
7887
  name: e.name,
7892
7888
  description: e.description,
7893
7889
  inputSchema: e.inputSchema
@@ -7910,13 +7906,13 @@ function il(e) {
7910
7906
  connection: {
7911
7907
  ...ws(tl, { fetchClient: el }),
7912
7908
  hydrate: async (e) => {
7913
- let t = await Le(e);
7909
+ let t = await ze(e);
7914
7910
  return p(t.attachments), t;
7915
7911
  }
7916
7912
  },
7917
7913
  persistence: !0,
7918
7914
  tools: r,
7919
- interrupts: [be],
7915
+ interrupts: [Se],
7920
7916
  queue: {
7921
7917
  whenBusy: "queue",
7922
7918
  maxSize: 5
@@ -7989,12 +7985,12 @@ function il(e) {
7989
7985
  }
7990
7986
  function S() {
7991
7987
  let e = m.runId.value;
7992
- e && Ve(e).catch(() => void 0), m.stop();
7988
+ e && Ue(e).catch(() => void 0), m.stop();
7993
7989
  let t = m.messages.value.at(-1);
7994
7990
  d.value = t?.role === "assistant" ? t.id : null;
7995
7991
  }
7996
7992
  async function C() {
7997
- await b(Kn);
7993
+ await b(qn);
7998
7994
  }
7999
7995
  function w(e, t) {
8000
7996
  p(t), m.setMessages(e);
@@ -8078,7 +8074,7 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8078
8074
  }, eu = {
8079
8075
  key: 1,
8080
8076
  class: "flex max-h-64 flex-col overflow-y-auto"
8081
- }, tu = { class: "min-w-0 flex-1 leading-snug" }, nu = /*#__PURE__*/ Y(/* @__PURE__ */ A({
8077
+ }, tu = { class: "min-w-0 flex-1 leading-snug" }, nu = /*#__PURE__*/ q(/* @__PURE__ */ A({
8082
8078
  __name: "CuiAssistantConversation",
8083
8079
  props: {
8084
8080
  threadId: {},
@@ -8099,22 +8095,22 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8099
8095
  "emptied"
8100
8096
  ],
8101
8097
  setup(e, { expose: a, emit: s }) {
8102
- let u = new He(), d = e, f = s, { t: y, locale: S } = Ce(), O = ce(), { data: k } = u.listProfilesQuery(), A = u.createProfileMutation(), N = u.patchProfileMutation(), F = u.deleteProfileMutation(), { data: I, refetch: L } = u.memoryQuery(), B = u.deleteMemoryFactMutation(), re = u.deleteMemoryMutation(), { data: V } = u.getAssistantInfoQuery(), ie = w("scrollRef"), ae = w("contentRef"), H = w("composerRef"), U = w("toolsPopover"), se = w("memoryPopover"), W = j(!0), le = j([]), G = j(""), K = j(null), ue = j(!1), fe = j(""), q = j(null), J = il({
8098
+ let u = new J(), d = e, f = s, { t: y, locale: S } = Te(), O = le(), { data: k } = u.listProfilesQuery(), A = u.createProfileMutation(), N = u.patchProfileMutation(), F = u.deleteProfileMutation(), { data: I, refetch: L } = u.memoryQuery(), R = u.deleteMemoryFactMutation(), re = u.deleteMemoryMutation(), { data: z } = u.getAssistantInfoQuery(), B = w("scrollRef"), ae = w("contentRef"), oe = w("composerRef"), ce = w("toolsPopover"), ue = w("memoryPopover"), V = j(!0), H = j([]), U = j(""), W = j(null), fe = j(!1), pe = j(""), G = j(null), K = il({
8103
8099
  threadId: _(() => d.threadId),
8104
8100
  initialMessages: d.initialMessages,
8105
8101
  initialAttachments: d.initialAttachments,
8106
8102
  language: S,
8107
- disabledGroups: le,
8108
- instructions: G,
8109
- modelId: q,
8103
+ disabledGroups: H,
8104
+ instructions: U,
8105
+ modelId: G,
8110
8106
  approvalTools: d.approvalTools,
8111
8107
  onFinish: () => f("finished"),
8112
- onError: ot
8113
- }), pe = _(() => J.messages.value.length === 0), me = _(() => V.value?.settings.models ?? []), Y = _(() => V.value ? Ze(V.value.settings) : void 0), he = _(() => me.value.find((e) => e._id === q.value) ?? Y.value), ve = _(() => he.value?.capabilities?.vision === !1 ? he.value.name : void 0), ye = _(() => J.busy.value && !J.approvals.value.length && !J.questions.value.length && !J.pausedElsewhere.value), be = _(() => ye.value && J.messages.value.at(-1)?.role !== "assistant"), xe = _(() => {
8114
- let e = J.messages.value, t = [];
8108
+ onError: st
8109
+ }), he = _(() => K.messages.value.length === 0), q = _(() => z.value?.settings.models ?? []), ge = _(() => z.value ? Qe(z.value.settings) : void 0), _e = _(() => q.value.find((e) => e._id === G.value) ?? ge.value), be = _(() => _e.value?.capabilities?.vision === !1 ? _e.value.name : void 0), xe = _(() => K.busy.value && !K.approvals.value.length && !K.questions.value.length && !K.pausedElsewhere.value), Se = _(() => xe.value && K.messages.value.at(-1)?.role !== "assistant"), Ce = _(() => {
8110
+ let e = K.messages.value, t = [];
8115
8111
  return e.forEach((n, r) => {
8116
- if (Jn(n)) return;
8117
- let i = n.role === "assistant" && Jn(e[r - 1]), a = t[t.length - 1];
8112
+ if (Yn(n)) return;
8113
+ let i = n.role === "assistant" && Yn(e[r - 1]), a = t[t.length - 1];
8118
8114
  if (n.role === "assistant" && !i && a?.message.role === "assistant" && !a.continuation && a.lastIndex === r - 1) {
8119
8115
  a.message = {
8120
8116
  ...a.message,
@@ -8130,7 +8126,7 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8130
8126
  continuation: i
8131
8127
  });
8132
8128
  }), t;
8133
- }), Se = _(() => {
8129
+ }), we = _(() => {
8134
8130
  let e = /* @__PURE__ */ new Map();
8135
8131
  for (let t of d.tools) {
8136
8132
  let n = t.group === "core" ? y("views.assistant.tool_group_core") : t.group === "docs" ? y("views.assistant.tool_group_docs") : t.group === "terminal" ? y("views.assistant.tool_group_terminal") : t.source.kind === "plugin" ? t.source.pluginName : t.source.kind === "external" ? t.source.serverName : t.group, r = e.get(t.group) ?? {
@@ -8142,98 +8138,98 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8142
8138
  }
8143
8139
  let t = (e) => e === "core" ? 0 : e === "docs" ? 1 : e.startsWith("plugin:") ? 2 : 3;
8144
8140
  return Array.from(e.values()).sort((e, n) => t(e.id) - t(n.id) || e.label.localeCompare(n.label));
8145
- }), Te = _({
8146
- get: () => Se.value.filter((e) => !le.value.includes(e.id)).map((e) => e.id),
8141
+ }), De = _({
8142
+ get: () => we.value.filter((e) => !H.value.includes(e.id)).map((e) => e.id),
8147
8143
  set: (e) => {
8148
- le.value = Se.value.filter((t) => !e.includes(t.id)).map((e) => e.id);
8144
+ H.value = we.value.filter((t) => !e.includes(t.id)).map((e) => e.id);
8149
8145
  }
8150
- }), Ee = _(() => {
8146
+ }), Oe = _(() => {
8151
8147
  let e = (/* @__PURE__ */ new Date()).getHours();
8152
8148
  return y(e < 5 ? "views.assistant.greeting_night" : e < 11 ? "views.assistant.greeting_morning" : e < 18 ? "views.assistant.greeting_day" : "views.assistant.greeting_evening");
8153
8149
  });
8154
- function Oe(e) {
8155
- for (let t of e.ids) if (J.usage.value[t]) return J.usage.value[t];
8150
+ function Ae(e) {
8151
+ for (let t of e.ids) if (K.usage.value[t]) return K.usage.value[t];
8156
8152
  }
8157
- function ke() {
8158
- let e = ie.value;
8159
- e && (W.value = e.scrollHeight - e.scrollTop - e.clientHeight < 120);
8153
+ function je() {
8154
+ let e = B.value;
8155
+ e && (V.value = e.scrollHeight - e.scrollTop - e.clientHeight < 120);
8160
8156
  }
8161
- function Ie() {
8162
- W.value = !0, Le();
8157
+ function Re() {
8158
+ V.value = !0, ze();
8163
8159
  }
8164
- function Le() {
8165
- let e = ie.value;
8160
+ function ze() {
8161
+ let e = B.value;
8166
8162
  e && (e.scrollTop = e.scrollHeight);
8167
8163
  }
8168
- function Ve(e) {
8169
- se.value?.toggle(e), L();
8170
- }
8171
8164
  function Ue(e) {
8172
- let t = k.value?.find((t) => t._id === e);
8173
- t && (le.value = [...t.disabledGroups], G.value = t.instructions, q.value = me.value.some((e) => e._id === t.modelId) ? t.modelId : null);
8165
+ ue.value?.toggle(e), L();
8174
8166
  }
8175
8167
  function We(e) {
8176
- return me.value.find((t) => t._id === e.modelId) ?? Y.value;
8168
+ let t = k.value?.find((t) => t._id === e);
8169
+ t && (H.value = [...t.disabledGroups], U.value = t.instructions, G.value = q.value.some((e) => e._id === t.modelId) ? t.modelId : null);
8177
8170
  }
8178
8171
  function Ge(e) {
8179
- return e ? Je(e).filter((e) => e.severity !== "success") : [];
8172
+ return q.value.find((t) => t._id === e.modelId) ?? ge.value;
8180
8173
  }
8181
- async function qe() {
8182
- let e = fe.value.trim();
8174
+ function Ke(e) {
8175
+ return e ? Ye(e).filter((e) => e.severity !== "success") : [];
8176
+ }
8177
+ async function Je() {
8178
+ let e = pe.value.trim();
8183
8179
  if (!e) return;
8184
8180
  let t = await A.mutateAsync({
8185
8181
  name: e,
8186
- modelId: he.value?._id ?? "",
8187
- disabledGroups: [...le.value],
8188
- instructions: G.value.trim()
8182
+ modelId: _e.value?._id ?? "",
8183
+ disabledGroups: [...H.value],
8184
+ instructions: U.value.trim()
8189
8185
  });
8190
- K.value = t._id, ue.value = !1, fe.value = "";
8186
+ W.value = t._id, fe.value = !1, pe.value = "";
8191
8187
  }
8192
- async function Ye() {
8193
- K.value && await N.mutateAsync({
8194
- profileId: K.value,
8188
+ async function Xe() {
8189
+ W.value && await N.mutateAsync({
8190
+ profileId: W.value,
8195
8191
  patch: {
8196
- modelId: he.value?._id ?? "",
8197
- disabledGroups: [...le.value],
8198
- instructions: G.value.trim()
8192
+ modelId: _e.value?._id ?? "",
8193
+ disabledGroups: [...H.value],
8194
+ instructions: U.value.trim()
8199
8195
  }
8200
8196
  });
8201
8197
  }
8202
- async function Xe() {
8203
- K.value &&= (await F.mutateAsync(K.value), null);
8198
+ async function Ze() {
8199
+ W.value &&= (await F.mutateAsync(W.value), null);
8204
8200
  }
8205
- function Qe() {
8206
- for (let e of [U.value, se.value]) e?.visible && e.alignOverlay();
8201
+ function $e() {
8202
+ for (let e of [ce.value, ue.value]) e?.visible && e.alignOverlay();
8207
8203
  }
8208
- function $e(e) {
8209
- let t = J.messages.value, n = e + 1;
8210
- for (; n < t.length && (t[n].role !== "user" || Jn(t[n]));) n++;
8204
+ function et(e) {
8205
+ let t = K.messages.value, n = e + 1;
8206
+ for (; n < t.length && (t[n].role !== "user" || Yn(t[n]));) n++;
8211
8207
  return n;
8212
8208
  }
8213
- function et(e) {
8214
- let t = J.messages.value, n = e;
8215
- for (; n > 0 && (t[n].role !== "user" || Jn(t[n]));) n--;
8209
+ function tt(e) {
8210
+ let t = K.messages.value, n = e;
8211
+ for (; n > 0 && (t[n].role !== "user" || Yn(t[n]));) n--;
8216
8212
  return n;
8217
8213
  }
8218
- async function tt(e) {
8219
- W.value = !0, J.setMessages(J.messages.value.slice(0, e)), await J.reload();
8214
+ async function nt(e) {
8215
+ V.value = !0, K.setMessages(K.messages.value.slice(0, e)), await K.reload();
8220
8216
  }
8221
- async function nt(e, t) {
8222
- W.value = !0;
8223
- let n = J.messages.value[e].parts.filter((e) => e.type === "image" || e.type === "audio" || e.type === "video");
8224
- J.setMessages(J.messages.value.slice(0, e)), n.length ? await J.sendMessage({ content: [{
8217
+ async function rt(e, t) {
8218
+ V.value = !0;
8219
+ let n = K.messages.value[e].parts.filter((e) => e.type === "image" || e.type === "audio" || e.type === "video");
8220
+ K.setMessages(K.messages.value.slice(0, e)), n.length ? await K.sendMessage({ content: [{
8225
8221
  type: "text",
8226
8222
  content: t
8227
- }, ...n] }) : await J.sendMessage(t);
8223
+ }, ...n] }) : await K.sendMessage(t);
8228
8224
  }
8229
- async function rt(e) {
8230
- let t = J.messages.value, n = [...t.slice(0, et(e)), ...t.slice($e(e))];
8231
- if (J.setMessages(n), !n.length) {
8225
+ async function it(e) {
8226
+ let t = K.messages.value, n = [...t.slice(0, tt(e)), ...t.slice(et(e))];
8227
+ if (K.setMessages(n), !n.length) {
8232
8228
  f("emptied");
8233
8229
  return;
8234
8230
  }
8235
8231
  try {
8236
- await Be(d.threadId, n);
8232
+ await He(d.threadId, n);
8237
8233
  } catch (e) {
8238
8234
  e?.response?.status !== 404 && O.add({
8239
8235
  severity: "error",
@@ -8242,9 +8238,9 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8242
8238
  });
8243
8239
  }
8244
8240
  }
8245
- async function it(e) {
8241
+ async function at(e) {
8246
8242
  try {
8247
- let t = await ze(d.threadId, $e(e) - 1);
8243
+ let t = await Ve(d.threadId, et(e) - 1);
8248
8244
  f("branched", t);
8249
8245
  } catch (e) {
8250
8246
  O.add({
@@ -8254,9 +8250,9 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8254
8250
  });
8255
8251
  }
8256
8252
  }
8257
- async function at(e) {
8258
- if (W.value = !0, !e.attachments.length) {
8259
- await J.sendMessage(e.text);
8253
+ async function ot(e) {
8254
+ if (V.value = !0, !e.attachments.length) {
8255
+ await K.sendMessage(e.text);
8260
8256
  return;
8261
8257
  }
8262
8258
  let t = e.text ? [{
@@ -8271,11 +8267,11 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8271
8267
  mimeType: n.mimeType
8272
8268
  }
8273
8269
  });
8274
- await J.sendMessage({ content: t });
8270
+ await K.sendMessage({ content: t });
8275
8271
  }
8276
- function ot(e) {
8272
+ function st(e) {
8277
8273
  if (e.message.includes("status: 409")) {
8278
- st();
8274
+ ct();
8279
8275
  return;
8280
8276
  }
8281
8277
  O.add({
@@ -8284,85 +8280,85 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8284
8280
  life: 5e3
8285
8281
  });
8286
8282
  }
8287
- async function st() {
8288
- let e = await Re(d.threadId).catch(() => void 0);
8289
- e && (J.replaceFromStore(e.messages, e.attachments), O.add({
8283
+ async function ct() {
8284
+ let e = await Be(d.threadId).catch(() => void 0);
8285
+ e && (K.replaceFromStore(e.messages, e.attachments), O.add({
8290
8286
  severity: "info",
8291
8287
  detail: y("views.assistant.thread_reloaded"),
8292
8288
  life: 5e3
8293
8289
  }));
8294
8290
  }
8295
- function ct(e) {
8296
- return !J.busy.value && (J.replaceFromStore(e.messages, e.attachments), !0);
8291
+ function lt(e) {
8292
+ return !K.busy.value && (K.replaceFromStore(e.messages, e.attachments), !0);
8297
8293
  }
8298
- return b(() => J.messages.value, async () => {
8299
- W.value && (await c(), Le());
8300
- }, { deep: !0 }), b(() => J.approvals.value.length + J.questions.value.length, async (e, t) => {
8301
- e <= t || (W.value = !0, await c(), Le());
8302
- }), b(pe, async () => {
8303
- await c(), H.value?.focus();
8304
- }), _e(window, "scroll", Qe, {
8294
+ return b(() => K.messages.value, async () => {
8295
+ V.value && (await c(), ze());
8296
+ }, { deep: !0 }), b(() => K.approvals.value.length + K.questions.value.length, async (e, t) => {
8297
+ e <= t || (V.value = !0, await c(), ze());
8298
+ }), b(he, async () => {
8299
+ await c(), oe.value?.focus();
8300
+ }), ye(window, "scroll", $e, {
8305
8301
  capture: !0,
8306
8302
  passive: !0
8307
- }), ge([ie, ae], () => {
8308
- W.value && Le();
8303
+ }), ve([B, ae], () => {
8304
+ V.value && ze();
8309
8305
  }), ee(async () => {
8310
- await c(), Le(), H.value?.focus(), d.initialPrompt && await at({
8306
+ await c(), ze(), oe.value?.focus(), d.initialPrompt && await ot({
8311
8307
  text: d.initialPrompt,
8312
8308
  attachments: []
8313
8309
  });
8314
- }), a({ refreshFromStore: ct }), (a, s) => {
8315
- let c = we, u = Qt, d = Qr, f = De, _ = Ke, y = Yr, b = Er, S = Nt, w = wt, O = ne, j = Fe, ee = je, L = Pe, V = Ne, ce = P, ge = Me, _e = ft, Ce = z, Le = oe, Re = R, ze = Ae, Be = de, He = te;
8310
+ }), a({ refreshFromStore: lt }), (a, s) => {
8311
+ let c = Ee, u = $t, d = $r, f = ke, _ = qe, y = Xr, b = Dr, S = Pt, w = Tt, O = ne, j = Le, ee = Ne, L = Ie, z = Fe, le = P, ve = Pe, ye = pt, Te = ie, ze = se, Be = de, Ve = Me, He = me, J = te;
8316
8312
  return i(), x("div", al, [
8317
8313
  T("div", {
8318
8314
  ref_key: "scrollRef",
8319
- ref: ie,
8320
- class: l(["flex-1 min-h-0 overflow-y-auto px-4", { "flex items-center justify-center pb-[8vh]": g(pe) }]),
8321
- onScrollPassive: ke
8322
- }, [g(pe) ? (i(), x("div", ol, [
8323
- T("div", sl, [T("div", cl, [M(c, { class: "w-6 h-6 text-color" })]), T("h1", ll, [D(o(g(Ee)) + " ", 1), T("span", ul, o(a.$t("views.assistant.greeting_sub")), 1)])]),
8324
- g(he)?.capabilities?.toolCalling === !1 ? (i(), p(u, {
8315
+ ref: B,
8316
+ class: l(["flex-1 min-h-0 overflow-y-auto px-4", { "flex items-center justify-center pb-[8vh]": g(he) }]),
8317
+ onScrollPassive: je
8318
+ }, [g(he) ? (i(), x("div", ol, [
8319
+ T("div", sl, [T("div", cl, [M(c, { class: "w-6 h-6 text-color" })]), T("h1", ll, [D(o(g(Oe)) + " ", 1), T("span", ul, o(a.$t("views.assistant.greeting_sub")), 1)])]),
8320
+ g(_e)?.capabilities?.toolCalling === !1 ? (i(), p(u, {
8325
8321
  key: 0,
8326
8322
  class: "mb-4",
8327
- title: a.$t("views.assistant.notice_tools_title", { model: g(he).name }),
8323
+ title: a.$t("views.assistant.notice_tools_title", { model: g(_e).name }),
8328
8324
  text: a.$t("views.assistant.notice_tools_text")
8329
8325
  }, null, 8, ["title", "text"])) : m("", !0),
8330
8326
  M(y, {
8331
8327
  ref_key: "composerRef",
8332
- ref: H,
8333
- busy: g(J).busy.value,
8334
- "vision-missing": g(ve),
8328
+ ref: oe,
8329
+ busy: g(K).busy.value,
8330
+ "vision-missing": g(be),
8335
8331
  compact: e.compact,
8336
8332
  placeholder: a.$t("views.assistant.composer_placeholder"),
8337
- onSend: at,
8338
- onStop: s[2] ||= (e) => g(J).stop()
8333
+ onSend: ot,
8334
+ onStop: s[2] ||= (e) => g(K).stop()
8339
8335
  }, {
8340
8336
  tools: v(() => [T("span", dl, [E((i(), p(f, {
8341
8337
  type: "button",
8342
8338
  severity: "secondary",
8343
8339
  text: "",
8344
8340
  rounded: "",
8345
- disabled: g(J).busy.value,
8346
- onClick: s[0] ||= (e) => g(U)?.toggle(e)
8341
+ disabled: g(K).busy.value,
8342
+ onClick: s[0] ||= (e) => g(ce)?.toggle(e)
8347
8343
  }, {
8348
8344
  icon: v(() => [M(d, { class: "w-4 h-4" })]),
8349
8345
  _: 1
8350
8346
  }, 8, ["disabled"])), [[
8351
- He,
8347
+ J,
8352
8348
  { value: a.$t("views.assistant.tools_title") },
8353
8349
  void 0,
8354
8350
  { top: !0 }
8355
- ]]), g(le).length ? (i(), x("span", fl, o(g(Te).length), 1)) : m("", !0)]), T("span", pl, [E((i(), p(f, {
8351
+ ]]), g(H).length ? (i(), x("span", fl, o(g(De).length), 1)) : m("", !0)]), T("span", pl, [E((i(), p(f, {
8356
8352
  type: "button",
8357
8353
  severity: "secondary",
8358
8354
  text: "",
8359
8355
  rounded: "",
8360
- onClick: s[1] ||= (e) => Ve(e)
8356
+ onClick: s[1] ||= (e) => Ue(e)
8361
8357
  }, {
8362
8358
  icon: v(() => [M(_, { class: "w-4 h-4" })]),
8363
8359
  _: 1
8364
8360
  })), [[
8365
- He,
8361
+ J,
8366
8362
  { value: a.$t("views.assistant.memory_title") },
8367
8363
  void 0,
8368
8364
  { top: !0 }
@@ -8378,7 +8374,7 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8378
8374
  key: e,
8379
8375
  type: "button",
8380
8376
  class: "cui-assistant-chip cursor-pointer rounded-full px-3.5 py-1.5 text-[13px]",
8381
- onClick: (t) => at({
8377
+ onClick: (t) => ot({
8382
8378
  text: e,
8383
8379
  attachments: []
8384
8380
  })
@@ -8389,27 +8385,27 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8389
8385
  ref: ae,
8390
8386
  class: "mx-auto flex w-full max-w-[720px] flex-col gap-7 pt-6 pb-4"
8391
8387
  }, [
8392
- (i(!0), x(C, null, r(g(xe), (e) => (i(), p(b, {
8388
+ (i(!0), x(C, null, r(g(Ce), (e) => (i(), p(b, {
8393
8389
  key: e.message.id,
8394
8390
  message: e.message,
8395
- streaming: g(J).isLoading.value && e.lastIndex === g(J).messages.value.length - 1 && e.message.role === "assistant",
8396
- working: g(ye) && e.lastIndex === g(J).messages.value.length - 1 && e.message.role === "assistant",
8397
- busy: g(J).busy.value,
8391
+ streaming: g(K).isLoading.value && e.lastIndex === g(K).messages.value.length - 1 && e.message.role === "assistant",
8392
+ working: g(xe) && e.lastIndex === g(K).messages.value.length - 1 && e.message.role === "assistant",
8393
+ busy: g(K).busy.value,
8398
8394
  continuation: e.continuation,
8399
- stopped: e.ids.includes(g(J).stoppedId.value ?? ""),
8400
- "tool-images": g(J).toolImages.value,
8401
- "tool-references": g(J).toolReferences.value,
8402
- "tool-cards": g(J).toolCards.value,
8403
- "tool-settings": g(J).toolSettings.value,
8404
- "tool-notices": g(J).toolNotices.value,
8405
- "model-id": g(he)?._id,
8406
- usage: Oe(e),
8395
+ stopped: e.ids.includes(g(K).stoppedId.value ?? ""),
8396
+ "tool-images": g(K).toolImages.value,
8397
+ "tool-references": g(K).toolReferences.value,
8398
+ "tool-cards": g(K).toolCards.value,
8399
+ "tool-settings": g(K).toolSettings.value,
8400
+ "tool-notices": g(K).toolNotices.value,
8401
+ "model-id": g(_e)?._id,
8402
+ usage: Ae(e),
8407
8403
  class: l({ "-mt-5": e.continuation }),
8408
- onRegenerate: (t) => tt(e.index),
8409
- onEdit: (t) => nt(e.index, t),
8410
- onDelete: (t) => rt(e.index),
8411
- onBranch: (t) => it(e.index),
8412
- onContinue: s[3] ||= (e) => g(J).continueAnswer()
8404
+ onRegenerate: (t) => nt(e.index),
8405
+ onEdit: (t) => rt(e.index, t),
8406
+ onDelete: (t) => it(e.index),
8407
+ onBranch: (t) => at(e.index),
8408
+ onContinue: s[3] ||= (e) => g(K).continueAnswer()
8413
8409
  }, null, 8, [
8414
8410
  "message",
8415
8411
  "streaming",
@@ -8430,24 +8426,24 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8430
8426
  "onDelete",
8431
8427
  "onBranch"
8432
8428
  ]))), 128)),
8433
- g(be) ? (i(), p(b, {
8429
+ g(Se) ? (i(), p(b, {
8434
8430
  key: 0,
8435
- message: g($r),
8431
+ message: g(ei),
8436
8432
  working: "",
8437
8433
  busy: "",
8438
- continuation: g(Jn)(g(J).messages.value.at(-1)),
8439
- class: l({ "-mt-5": g(Jn)(g(J).messages.value.at(-1)) })
8434
+ continuation: g(Yn)(g(K).messages.value.at(-1)),
8435
+ class: l({ "-mt-5": g(Yn)(g(K).messages.value.at(-1)) })
8440
8436
  }, null, 8, [
8441
8437
  "message",
8442
8438
  "continuation",
8443
8439
  "class"
8444
8440
  ])) : m("", !0),
8445
- (i(!0), x(C, null, r(g(J).approvals.value, (e) => (i(), p(S, {
8441
+ (i(!0), x(C, null, r(g(K).approvals.value, (e) => (i(), p(S, {
8446
8442
  key: e.id,
8447
8443
  "tool-name": e.toolName,
8448
8444
  args: e.originalArgs,
8449
8445
  "can-resolve": e.canResolve,
8450
- busy: g(J).resuming.value,
8446
+ busy: g(K).resuming.value,
8451
8447
  onApprove: (t) => t ? e.resolveInterrupt(!0, { editedArgs: t }) : e.resolveInterrupt(!0),
8452
8448
  onReject: (t) => e.resolveInterrupt(!1)
8453
8449
  }, null, 8, [
@@ -8458,7 +8454,7 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8458
8454
  "onApprove",
8459
8455
  "onReject"
8460
8456
  ]))), 128)),
8461
- (i(!0), x(C, null, r(g(J).questions.value, (e) => (i(), p(w, {
8457
+ (i(!0), x(C, null, r(g(K).questions.value, (e) => (i(), p(w, {
8462
8458
  key: e.id,
8463
8459
  question: e.payload ?? {
8464
8460
  toolCallId: e.id,
@@ -8466,7 +8462,7 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8466
8462
  kind: "text"
8467
8463
  },
8468
8464
  "can-resolve": e.canResolve,
8469
- busy: g(J).resuming.value,
8465
+ busy: g(K).resuming.value,
8470
8466
  onAnswer: (t) => e.resolveInterrupt({ answer: t }),
8471
8467
  onSkip: (t) => e.cancel()
8472
8468
  }, null, 8, [
@@ -8476,26 +8472,26 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8476
8472
  "onAnswer",
8477
8473
  "onSkip"
8478
8474
  ]))), 128)),
8479
- g(J).pausedElsewhere.value ? (i(), x("div", _l, o(a.$t("views.assistant.paused_elsewhere")), 1)) : m("", !0),
8480
- g(J).error.value ? (i(), x("div", vl, [T("strong", yl, o(g(J).error.value.message), 1)])) : m("", !0)
8475
+ g(K).pausedElsewhere.value ? (i(), x("div", _l, o(a.$t("views.assistant.paused_elsewhere")), 1)) : m("", !0),
8476
+ g(K).error.value ? (i(), x("div", vl, [T("strong", yl, o(g(K).error.value.message), 1)])) : m("", !0)
8481
8477
  ], 512))], 34),
8482
- g(pe) ? m("", !0) : (i(), x("div", bl, [g(W) ? m("", !0) : E((i(), p(f, {
8478
+ g(he) ? m("", !0) : (i(), x("div", bl, [g(V) ? m("", !0) : E((i(), p(f, {
8483
8479
  key: 0,
8484
8480
  type: "button",
8485
8481
  rounded: "",
8486
8482
  severity: "secondary",
8487
8483
  class: "cui-assistant-jump absolute left-1/2 top-0 z-[2] -translate-x-1/2 -translate-y-1/2",
8488
- onClick: Ie
8484
+ onClick: Re
8489
8485
  }, {
8490
8486
  icon: v(() => [M(O, { class: "w-4 h-4" })]),
8491
8487
  _: 1
8492
8488
  })), [[
8493
- He,
8489
+ J,
8494
8490
  { value: a.$t("views.assistant.scroll_to_latest") },
8495
8491
  void 0,
8496
8492
  { top: !0 }
8497
8493
  ]]), T("div", xl, [
8498
- g(J).queue.value.length ? (i(), x("div", Sl, [(i(!0), x(C, null, r(g(J).queue.value, (e) => (i(), x("div", {
8494
+ g(K).queue.value.length ? (i(), x("div", Sl, [(i(!0), x(C, null, r(g(K).queue.value, (e) => (i(), x("div", {
8499
8495
  key: e.id,
8500
8496
  class: "cui-assistant-queued flex items-center gap-2 rounded-lg px-3 py-1.5 text-[13px] text-muted"
8501
8497
  }, [
@@ -8507,12 +8503,12 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8507
8503
  text: "",
8508
8504
  rounded: "",
8509
8505
  class: "cui-icon-md shrink-0",
8510
- onClick: (t) => g(J).cancelQueued(e.id)
8506
+ onClick: (t) => g(K).cancelQueued(e.id)
8511
8507
  }, {
8512
8508
  icon: v(() => [M(ee, { class: "w-3.5 h-3.5" })]),
8513
8509
  _: 1
8514
8510
  }, 8, ["onClick"])), [[
8515
- He,
8511
+ J,
8516
8512
  { value: a.$t("views.assistant.queue_cancel") },
8517
8513
  void 0,
8518
8514
  { top: !0 }
@@ -8520,40 +8516,40 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8520
8516
  ]))), 128))])) : m("", !0),
8521
8517
  M(y, {
8522
8518
  ref_key: "composerRef",
8523
- ref: H,
8524
- busy: g(J).busy.value,
8525
- "vision-missing": g(ve),
8519
+ ref: oe,
8520
+ busy: g(K).busy.value,
8521
+ "vision-missing": g(be),
8526
8522
  compact: e.compact,
8527
8523
  placeholder: a.$t("views.assistant.composer_placeholder"),
8528
- onSend: at,
8529
- onStop: s[6] ||= (e) => g(J).stop()
8524
+ onSend: ot,
8525
+ onStop: s[6] ||= (e) => g(K).stop()
8530
8526
  }, {
8531
8527
  tools: v(() => [T("span", wl, [E((i(), p(f, {
8532
8528
  type: "button",
8533
8529
  severity: "secondary",
8534
8530
  text: "",
8535
8531
  rounded: "",
8536
- disabled: g(J).busy.value,
8537
- onClick: s[4] ||= (e) => g(U)?.toggle(e)
8532
+ disabled: g(K).busy.value,
8533
+ onClick: s[4] ||= (e) => g(ce)?.toggle(e)
8538
8534
  }, {
8539
8535
  icon: v(() => [M(d, { class: "w-4 h-4" })]),
8540
8536
  _: 1
8541
8537
  }, 8, ["disabled"])), [[
8542
- He,
8538
+ J,
8543
8539
  { value: a.$t("views.assistant.tools_title") },
8544
8540
  void 0,
8545
8541
  { top: !0 }
8546
- ]]), g(le).length ? (i(), x("span", Tl, o(g(Te).length), 1)) : m("", !0)]), T("span", El, [E((i(), p(f, {
8542
+ ]]), g(H).length ? (i(), x("span", Tl, o(g(De).length), 1)) : m("", !0)]), T("span", El, [E((i(), p(f, {
8547
8543
  type: "button",
8548
8544
  severity: "secondary",
8549
8545
  text: "",
8550
8546
  rounded: "",
8551
- onClick: s[5] ||= (e) => Ve(e)
8547
+ onClick: s[5] ||= (e) => Ue(e)
8552
8548
  }, {
8553
8549
  icon: v(() => [M(_, { class: "w-4 h-4" })]),
8554
8550
  _: 1
8555
8551
  })), [[
8556
- He,
8552
+ J,
8557
8553
  { value: a.$t("views.assistant.memory_title") },
8558
8554
  void 0,
8559
8555
  { top: !0 }
@@ -8567,30 +8563,30 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8567
8563
  ]),
8568
8564
  T("div", Ol, o(a.$t("views.assistant.disclaimer")), 1)
8569
8565
  ])])),
8570
- M(Be, {
8566
+ M(He, {
8571
8567
  ref_key: "toolsPopover",
8572
- ref: U
8568
+ ref: ce
8573
8569
  }, {
8574
8570
  default: v(() => [T("div", kl, [
8575
8571
  T("span", Al, o(a.$t("views.assistant.tools_title")), 1),
8576
8572
  T("div", jl, [T("label", Ml, o(a.$t("views.assistant.instructions_label")), 1), M(L, {
8577
8573
  id: "assistantInstructions",
8578
- modelValue: g(G),
8579
- "onUpdate:modelValue": s[7] ||= (e) => h(G) ? G.value = e : null,
8574
+ modelValue: g(U),
8575
+ "onUpdate:modelValue": s[7] ||= (e) => h(U) ? U.value = e : null,
8580
8576
  rows: "2",
8581
8577
  "auto-resize": "",
8582
8578
  class: "text-sm",
8583
8579
  placeholder: a.$t("views.assistant.instructions_placeholder")
8584
8580
  }, null, 8, ["modelValue", "placeholder"])]),
8585
- T("div", Nl, [T("label", Pl, o(a.$t("views.assistant.tools_label")), 1), M(V, {
8586
- modelValue: g(Te),
8587
- "onUpdate:modelValue": s[8] ||= (e) => h(Te) ? Te.value = e : null,
8581
+ T("div", Nl, [T("label", Pl, o(a.$t("views.assistant.tools_label")), 1), M(z, {
8582
+ modelValue: g(De),
8583
+ "onUpdate:modelValue": s[8] ||= (e) => h(De) ? De.value = e : null,
8588
8584
  "input-id": "assistantTools",
8589
- options: g(Se),
8585
+ options: g(we),
8590
8586
  "option-label": "label",
8591
8587
  "option-value": "id",
8592
8588
  "max-selected-labels": 2,
8593
- "selected-items-label": a.$t("views.assistant.tools_selected", { n: g(Te).length }),
8589
+ "selected-items-label": a.$t("views.assistant.tools_selected", { n: g(De).length }),
8594
8590
  placeholder: a.$t("views.assistant.tools_none"),
8595
8591
  class: "min-w-0"
8596
8592
  }, {
@@ -8602,17 +8598,17 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8602
8598
  "selected-items-label",
8603
8599
  "placeholder"
8604
8600
  ])]),
8605
- g(me).length > 1 ? (i(), x("div", Rl, [T("label", zl, o(a.$t("views.assistant.model_label")), 1), M(ge, {
8606
- modelValue: g(q),
8607
- "onUpdate:modelValue": s[9] ||= (e) => h(q) ? q.value = e : null,
8601
+ g(q).length > 1 ? (i(), x("div", Rl, [T("label", zl, o(a.$t("views.assistant.model_label")), 1), M(ve, {
8602
+ modelValue: g(G),
8603
+ "onUpdate:modelValue": s[9] ||= (e) => h(G) ? G.value = e : null,
8608
8604
  "input-id": "assistantModel",
8609
- options: g(me),
8605
+ options: g(q),
8610
8606
  "option-label": "name",
8611
8607
  "option-value": "_id",
8612
8608
  class: "min-w-0",
8613
- placeholder: g(Y)?.name
8609
+ placeholder: g(ge)?.name
8614
8610
  }, {
8615
- option: v(({ option: e }) => [T("div", Bl, [T("span", Vl, o(e.name), 1), T("span", Hl, [(i(!0), x(C, null, r(Ge(e), (e) => (i(), p(ce, {
8611
+ option: v(({ option: e }) => [T("div", Bl, [T("span", Vl, o(e.name), 1), T("span", Hl, [(i(!0), x(C, null, r(Ke(e), (e) => (i(), p(le, {
8616
8612
  key: e.key,
8617
8613
  severity: e.severity,
8618
8614
  value: a.$t(`views.settings.assistant_capability_${e.key}`),
@@ -8626,11 +8622,11 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8626
8622
  ])])) : m("", !0),
8627
8623
  T("div", Ul, [
8628
8624
  T("label", Wl, o(a.$t("views.assistant.profiles_label")), 1),
8629
- M(Re, null, {
8625
+ M(Be, null, {
8630
8626
  default: v(() => [
8631
- M(ge, {
8632
- modelValue: g(K),
8633
- "onUpdate:modelValue": [s[10] ||= (e) => h(K) ? K.value = e : null, Ue],
8627
+ M(ve, {
8628
+ modelValue: g(W),
8629
+ "onUpdate:modelValue": [s[10] ||= (e) => h(W) ? W.value = e : null, We],
8634
8630
  "input-id": "assistantProfile",
8635
8631
  options: g(k) ?? [],
8636
8632
  "option-label": "name",
@@ -8639,7 +8635,7 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8639
8635
  class: "min-w-0",
8640
8636
  placeholder: a.$t("views.assistant.profile_none")
8641
8637
  }, {
8642
- option: v(({ option: e }) => [T("div", Gl, [T("span", Kl, o(e.name), 1), T("span", ql, [(i(!0), x(C, null, r(Ge(We(e)), (e) => (i(), p(ce, {
8638
+ option: v(({ option: e }) => [T("div", Gl, [T("span", Kl, o(e.name), 1), T("span", ql, [(i(!0), x(C, null, r(Ke(Ge(e)), (e) => (i(), p(le, {
8643
8639
  key: e.key,
8644
8640
  severity: e.severity,
8645
8641
  value: a.$t(`views.settings.assistant_capability_${e.key}`),
@@ -8651,26 +8647,26 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8651
8647
  "options",
8652
8648
  "placeholder"
8653
8649
  ]),
8654
- M(Ce, { class: "!p-0" }, {
8650
+ M(Te, { class: "!p-0" }, {
8655
8651
  default: v(() => [E((i(), p(f, {
8656
8652
  type: "button",
8657
8653
  severity: "secondary",
8658
8654
  text: "",
8659
8655
  class: "h-full rounded-none",
8660
8656
  loading: g(A).isPending.value || g(N).isPending.value,
8661
- onClick: s[11] ||= (e) => g(K) ? Ye() : ue.value = !0
8657
+ onClick: s[11] ||= (e) => g(W) ? Xe() : fe.value = !0
8662
8658
  }, {
8663
- icon: v(() => [M(_e, { class: "w-4 h-4" })]),
8659
+ icon: v(() => [M(ye, { class: "w-4 h-4" })]),
8664
8660
  _: 1
8665
8661
  }, 8, ["loading"])), [[
8666
- He,
8667
- { value: g(K) ? a.$t("views.assistant.profile_update") : a.$t("views.assistant.profile_save") },
8662
+ J,
8663
+ { value: g(W) ? a.$t("views.assistant.profile_update") : a.$t("views.assistant.profile_save") },
8668
8664
  void 0,
8669
8665
  { top: !0 }
8670
8666
  ]])]),
8671
8667
  _: 1
8672
8668
  }),
8673
- g(K) ? (i(), p(Ce, {
8669
+ g(W) ? (i(), p(Te, {
8674
8670
  key: 0,
8675
8671
  class: "!p-0"
8676
8672
  }, {
@@ -8680,12 +8676,12 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8680
8676
  text: "",
8681
8677
  class: "h-full rounded-none",
8682
8678
  loading: g(F).isPending.value,
8683
- onClick: Xe
8679
+ onClick: Ze
8684
8680
  }, {
8685
- icon: v(() => [M(Le, { class: "w-4 h-4" })]),
8681
+ icon: v(() => [M(ze, { class: "w-4 h-4" })]),
8686
8682
  _: 1
8687
8683
  }, 8, ["loading"])), [[
8688
- He,
8684
+ J,
8689
8685
  { value: a.$t("views.assistant.profile_delete") },
8690
8686
  void 0,
8691
8687
  { top: !0 }
@@ -8695,13 +8691,13 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8695
8691
  ]),
8696
8692
  _: 1
8697
8693
  }),
8698
- g(ue) ? (i(), x("div", Jl, [M(ze, {
8699
- modelValue: g(fe),
8700
- "onUpdate:modelValue": s[12] ||= (e) => h(fe) ? fe.value = e : null,
8694
+ g(fe) ? (i(), x("div", Jl, [M(Ve, {
8695
+ modelValue: g(pe),
8696
+ "onUpdate:modelValue": s[12] ||= (e) => h(pe) ? pe.value = e : null,
8701
8697
  class: "flex-1 min-w-0",
8702
8698
  size: "small",
8703
8699
  placeholder: a.$t("views.assistant.profile_name_placeholder"),
8704
- onKeydown: [n(t(qe, ["prevent"]), ["enter"]), s[13] ||= n((e) => ue.value = !1, ["esc"])]
8700
+ onKeydown: [n(t(Je, ["prevent"]), ["enter"]), s[13] ||= n((e) => fe.value = !1, ["esc"])]
8705
8701
  }, null, 8, [
8706
8702
  "modelValue",
8707
8703
  "placeholder",
@@ -8710,16 +8706,16 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8710
8706
  type: "button",
8711
8707
  size: "small",
8712
8708
  label: a.$t("components.form.button.save"),
8713
- disabled: !g(fe).trim(),
8714
- onClick: qe
8709
+ disabled: !g(pe).trim(),
8710
+ onClick: Je
8715
8711
  }, null, 8, ["label", "disabled"])])) : m("", !0)
8716
8712
  ])
8717
8713
  ])]),
8718
8714
  _: 1
8719
8715
  }, 512),
8720
- M(Be, {
8716
+ M(He, {
8721
8717
  ref_key: "memoryPopover",
8722
- ref: se
8718
+ ref: ue
8723
8719
  }, {
8724
8720
  default: v(() => [T("div", Yl, [
8725
8721
  T("div", Xl, [T("span", Zl, o(a.$t("views.assistant.memory_title")), 1), g(I)?.length ? (i(), x("span", Ql, o(g(I).length), 1)) : m("", !0)]),
@@ -8732,13 +8728,13 @@ var al = { class: "relative flex h-full min-h-0 flex-col" }, ol = {
8732
8728
  text: "",
8733
8729
  rounded: "",
8734
8730
  class: "cui-icon-md shrink-0 text-muted",
8735
- loading: g(B).isPending.value,
8736
- onClick: (t) => g(B).mutate(e._id)
8731
+ loading: g(R).isPending.value,
8732
+ onClick: (t) => g(R).mutate(e._id)
8737
8733
  }, {
8738
8734
  icon: v(() => [M(ee, { class: "w-3 h-3" })]),
8739
8735
  _: 1
8740
8736
  }, 8, ["loading", "onClick"])), [[
8741
- He,
8737
+ J,
8742
8738
  { value: a.$t("views.assistant.memory_forget") },
8743
8739
  void 0,
8744
8740
  { top: !0 }
@@ -8786,7 +8782,7 @@ var au = d({
8786
8782
  }, du = { class: "cui-assistant-group px-2 pt-3.5 pb-1 text-[11.5px] font-medium text-muted" }, fu = ["onClick"], pu = { class: "min-w-0 flex-1 truncate" }, mu = {
8787
8783
  key: 3,
8788
8784
  class: "cui-assistant-sidebar-foot px-3 py-2"
8789
- }, hu = /*#__PURE__*/ Y(/* @__PURE__ */ A({
8785
+ }, hu = /*#__PURE__*/ q(/* @__PURE__ */ A({
8790
8786
  __name: "CuiAssistantSidebar",
8791
8787
  props: {
8792
8788
  threads: {},
@@ -8810,7 +8806,7 @@ var au = d({
8810
8806
  "close"
8811
8807
  ],
8812
8808
  setup(e, { emit: n }) {
8813
- let a = e, s = n, { topbarOffset: c, bottombarHeight: u } = fe(), d = w("sidebarRef"), f = j(""), y = _(() => a.isOpen ? 288 : 0), b = _(() => {
8809
+ let a = e, s = n, { topbarOffset: c, bottombarHeight: u } = U(), d = w("sidebarRef"), f = j(""), y = _(() => a.isOpen ? 288 : 0), b = _(() => {
8814
8810
  let e = f.value.trim().toLowerCase(), t = a.threads.filter((t) => !e || t.title.toLowerCase().includes(e)).sort((e, t) => t.updatedAt - e.updatedAt), n = [
8815
8811
  "today",
8816
8812
  "yesterday",
@@ -8831,10 +8827,10 @@ var au = d({
8831
8827
  let t = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), n = Math.round((t(/* @__PURE__ */ new Date()) - t(new Date(e))) / 864e5);
8832
8828
  return n <= 0 ? "today" : n === 1 ? "yesterday" : n <= 7 ? "week" : n <= 30 ? "month" : "older";
8833
8829
  }
8834
- return ve(d, (e) => {
8830
+ return be(d, (e) => {
8835
8831
  a.isOpen && a.isOverlay && (e.target.closest("#assistant-sidebar-toggle") || s("close"));
8836
8832
  }), (n, a) => {
8837
- let _ = au, w = De, O = qe, k = Ue, A = ke, j = Ae, ee = Oe, N = W, ne = oe, P = te;
8833
+ let _ = au, w = ke, O = Je, k = We, A = je, j = Me, ee = Ae, N = oe, ne = se, P = te;
8838
8834
  return i(), x("nav", {
8839
8835
  ref_key: "sidebarRef",
8840
8836
  ref: d,
@@ -8937,49 +8933,49 @@ var au = d({
8937
8933
  }, Cu = {
8938
8934
  key: 1,
8939
8935
  class: "flex flex-1 flex-col items-center justify-center gap-5 px-6 text-center"
8940
- }, wu = { class: "cui-assistant-hero-icon flex h-16 w-16 items-center justify-center rounded-full" }, Tu = { class: "max-w-md" }, Eu = { class: "text-lg font-semibold text-color" }, Du = { class: "mt-1 text-sm text-muted" }, Ou = /*#__PURE__*/ Y(/* @__PURE__ */ A({
8936
+ }, wu = { class: "cui-assistant-hero-icon flex h-16 w-16 items-center justify-center rounded-full" }, Tu = { class: "max-w-md" }, Eu = { class: "text-lg font-semibold text-color" }, Du = { class: "mt-1 text-sm text-muted" }, Ou = /*#__PURE__*/ q(/* @__PURE__ */ A({
8941
8937
  __name: "Assistant",
8942
8938
  setup(e) {
8943
- let t = new He(), n = he(), r = L(), { t: a } = Ce(), { smBreakpoint: s, mdBreakpoint: u, xlBreakpoint: d } = ie(), { openTextDialog: f } = ue(), h = me("/notifications"), C = le(), { user: D } = Se(C), { data: O, isLoading: k } = t.getAssistantInfoQuery(), { data: A, isLoading: N } = t.listThreadsQuery(), ne = t.deleteThreadMutation(), P = t.deleteAllThreadsMutation(), I = w("conversationRef"), R = j(pe()), z = j([]), B = j({}), V = j(typeof n.query.prompt == "string" ? n.query.prompt : void 0), ae = j(!1), H = j(d.value ? "opened" : "closed"), oe = j(!1), U = _(() => O.value?.status.state ?? "disabled"), se = _(() => D.value?.role === "admin" || D.value?.role === "master"), ce = _(() => (O.value?.tools ?? []).filter((e) => e.approval)), G = _(() => H.value === "opened"), K = _(() => A.value?.find((e) => e.id === R.value)?.title ?? ""), de = _(() => u.value), fe = _(() => u.value || U.value !== "ready" ? "0px" : G.value ? "288px" : "0px"), q = _(() => [
8939
+ let t = new J(), n = _e(), r = L(), { t: a } = Te(), { smBreakpoint: s, mdBreakpoint: u, xlBreakpoint: d } = z(), { openTextDialog: f } = ce(), h = K("/notifications"), C = V(), { user: D } = we(C), { data: O, isLoading: k } = t.getAssistantInfoQuery(), { data: A, isLoading: N } = t.listThreadsQuery(), ne = t.deleteThreadMutation(), P = t.deleteAllThreadsMutation(), I = w("conversationRef"), R = j(q()), ie = j([]), B = j({}), ae = j(typeof n.query.prompt == "string" ? n.query.prompt : void 0), se = j(!1), le = j(d.value ? "opened" : "closed"), ue = j(!1), H = _(() => O.value?.status.state ?? "disabled"), U = _(() => D.value?.role === "admin" || D.value?.role === "master"), de = _(() => (O.value?.tools ?? []).filter((e) => e.approval)), W = _(() => le.value === "opened"), pe = _(() => A.value?.find((e) => e.id === R.value)?.title ?? ""), G = _(() => u.value), me = _(() => u.value || H.value !== "ready" ? "0px" : W.value ? "288px" : "0px"), he = _(() => [
8944
8940
  a("views.assistant.suggestion_today"),
8945
8941
  a("views.assistant.suggestion_week"),
8946
8942
  a("views.assistant.suggestion_offline"),
8947
8943
  a("views.assistant.suggestion_sensors"),
8948
8944
  a("views.assistant.suggestion_tools")
8949
8945
  ]);
8950
- function pe() {
8951
- return J();
8952
- }
8953
- function Y() {
8954
- H.value = H.value === "opened" ? "closed" : "opened";
8946
+ function q() {
8947
+ return fe();
8955
8948
  }
8956
8949
  function ge() {
8957
- H.value = "closed";
8950
+ le.value = le.value === "opened" ? "closed" : "opened";
8958
8951
  }
8959
- function _e() {
8960
- z.value = [], B.value = {}, V.value = void 0, R.value = pe(), de.value && ge();
8952
+ function ve() {
8953
+ le.value = "closed";
8961
8954
  }
8962
- async function ve(e) {
8963
- if (de.value && ge(), e !== R.value) {
8964
- ae.value = !0;
8955
+ function ye() {
8956
+ ie.value = [], B.value = {}, ae.value = void 0, R.value = q(), G.value && ve();
8957
+ }
8958
+ async function be(e) {
8959
+ if (G.value && ve(), e !== R.value) {
8960
+ se.value = !0;
8965
8961
  try {
8966
- let t = await Re(e);
8967
- z.value = t.messages, B.value = t.attachments, V.value = void 0, R.value = e;
8962
+ let t = await Be(e);
8963
+ ie.value = t.messages, B.value = t.attachments, ae.value = void 0, R.value = e;
8968
8964
  } finally {
8969
- ae.value = !1;
8965
+ se.value = !1;
8970
8966
  }
8971
8967
  }
8972
8968
  }
8973
- async function ye(e) {
8974
- await ne.mutateAsync(e).catch(() => void 0), e === R.value && _e();
8969
+ async function xe(e) {
8970
+ await ne.mutateAsync(e).catch(() => void 0), e === R.value && ye();
8975
8971
  }
8976
- async function be(e) {
8977
- z.value = e.messages, B.value = e.attachments, V.value = void 0, R.value = e._id, await t.queryClient.refetchQueries({
8972
+ async function Se(e) {
8973
+ ie.value = e.messages, B.value = e.attachments, ae.value = void 0, R.value = e._id, await t.queryClient.refetchQueries({
8978
8974
  queryKey: ["assistant", "threads"],
8979
8975
  exact: !0
8980
8976
  });
8981
8977
  }
8982
- function xe() {
8978
+ function Ce() {
8983
8979
  f({
8984
8980
  data: {
8985
8981
  title: a("views.assistant.delete_all_conversations"),
@@ -8988,47 +8984,47 @@ var au = d({
8988
8984
  confirmButtonProps: { severity: "danger" }
8989
8985
  },
8990
8986
  onConfirm: async () => {
8991
- await P.mutateAsync(), _e();
8987
+ await P.mutateAsync(), ye();
8992
8988
  }
8993
8989
  });
8994
8990
  }
8995
- async function Te(e) {
8991
+ async function De(e) {
8996
8992
  try {
8997
- await ve(e);
8993
+ await be(e);
8998
8994
  } catch {
8999
8995
  R.value = e;
9000
8996
  }
9001
8997
  }
9002
- async function Ee() {
8998
+ async function Oe() {
9003
8999
  await t.queryClient.refetchQueries({
9004
9000
  queryKey: ["assistant", "threads"],
9005
9001
  exact: !0
9006
9002
  });
9007
9003
  }
9008
- async function Oe(e) {
9004
+ async function Ae(e) {
9009
9005
  if (await t.queryClient.refetchQueries({
9010
9006
  queryKey: ["assistant", "threads"],
9011
9007
  exact: !0
9012
9008
  }), e.threadId !== R.value) return;
9013
- let n = await Re(e.threadId).catch(() => void 0);
9009
+ let n = await Be(e.threadId).catch(() => void 0);
9014
9010
  n && I.value?.refreshFromStore(n);
9015
9011
  }
9016
- function ke() {
9012
+ function je() {
9017
9013
  let e = A.value?.some((e) => e.id === R.value), t = {
9018
9014
  ...n.query,
9019
9015
  thread: e ? R.value : void 0
9020
9016
  };
9021
9017
  t.thread !== n.query.thread && r.replace({ query: t });
9022
9018
  }
9023
- return b([R, A], ke), ee(async () => {
9024
- h.on("assistant-thread", (e) => Oe(e));
9019
+ return b([R, A], je), ee(async () => {
9020
+ h.on("assistant-thread", (e) => Ae(e));
9025
9021
  let e = typeof n.query.thread == "string" ? n.query.thread : void 0;
9026
9022
  n.query.prompt !== void 0 && r.replace({ query: {
9027
9023
  ...n.query,
9028
9024
  prompt: void 0
9029
- } }), e && !V.value && await Te(e), await c(), oe.value = !0;
9025
+ } }), e && !ae.value && await De(e), await c(), ue.value = !0;
9030
9026
  }), (e, t) => {
9031
- let n = re, r = rt, a = De, c = F, u = qe, d = hu, f = au, h = W, _ = we, b = nu, C = te;
9027
+ let n = re, r = it, a = ke, c = F, u = Je, d = hu, f = au, h = oe, _ = Ee, b = nu, C = te;
9032
9028
  return i(), x("div", null, [
9033
9029
  M(n, { position: "center" }, {
9034
9030
  default: v(() => [T("span", gu, o(e.$t("views.assistant.title")), 1)]),
@@ -9049,7 +9045,7 @@ var au = d({
9049
9045
  class: "cui-button p-2 text-color",
9050
9046
  text: "",
9051
9047
  rounded: "",
9052
- onClick: Y
9048
+ onClick: ge
9053
9049
  }, {
9054
9050
  icon: v(() => [M(c, {
9055
9051
  width: "100%",
@@ -9065,8 +9061,8 @@ var au = d({
9065
9061
  class: "cui-button p-2 text-color",
9066
9062
  text: "",
9067
9063
  rounded: "",
9068
- disabled: g(U) !== "ready",
9069
- onClick: _e
9064
+ disabled: g(H) !== "ready",
9065
+ onClick: ye
9070
9066
  }, {
9071
9067
  icon: v(() => [M(u, {
9072
9068
  width: "100%",
@@ -9076,18 +9072,18 @@ var au = d({
9076
9072
  }, 8, ["disabled"])]),
9077
9073
  _: 1
9078
9074
  }),
9079
- g(U) === "ready" ? (i(), p(d, {
9075
+ g(H) === "ready" ? (i(), p(d, {
9080
9076
  key: 0,
9081
9077
  threads: g(A) ?? [],
9082
9078
  "active-id": g(R),
9083
9079
  loading: g(N),
9084
- "is-open": g(G),
9085
- "is-overlay": g(de),
9086
- onSelect: ve,
9087
- onCreate: _e,
9088
- onDelete: ye,
9089
- onDeleteAll: xe,
9090
- onClose: ge
9080
+ "is-open": g(W),
9081
+ "is-overlay": g(G),
9082
+ onSelect: be,
9083
+ onCreate: ye,
9084
+ onDelete: xe,
9085
+ onDeleteAll: Ce,
9086
+ onClose: ve
9091
9087
  }, null, 8, [
9092
9088
  "threads",
9093
9089
  "active-id",
@@ -9098,28 +9094,28 @@ var au = d({
9098
9094
  (i(), p(y, {
9099
9095
  to: "#container",
9100
9096
  defer: ""
9101
- }, [g(G) && g(de) ? (i(), x("div", {
9097
+ }, [g(W) && g(G) ? (i(), x("div", {
9102
9098
  key: 0,
9103
9099
  class: "fixed top-0 left-0 right-0 bottom-0 w-full h-full bg-black/50 z-1",
9104
- onClick: ge
9100
+ onClick: ve
9105
9101
  })) : m("", !0)])),
9106
9102
  T("main", {
9107
9103
  class: "relative w-full h-full",
9108
9104
  style: S({
9109
- paddingLeft: g(fe),
9110
- transition: g(oe) ? "padding-left 200ms" : void 0
9105
+ paddingLeft: g(me),
9106
+ transition: g(ue) ? "padding-left 200ms" : void 0
9111
9107
  })
9112
9108
  }, [T("div", _u, [
9113
9109
  g(s) ? m("", !0) : (i(), x("div", vu, [
9114
9110
  t[3] ||= T("div", { class: "ml-2" }, null, -1),
9115
- !g(G) && g(U) === "ready" ? E((i(), p(a, {
9111
+ !g(W) && g(H) === "ready" ? E((i(), p(a, {
9116
9112
  key: 0,
9117
9113
  id: "assistant-sidebar-toggle",
9118
9114
  severity: "secondary",
9119
9115
  class: "mr-2 cui-icon-lg relative z-2",
9120
9116
  text: "",
9121
9117
  rounded: "",
9122
- onClick: Y
9118
+ onClick: ge
9123
9119
  }, {
9124
9120
  icon: v(() => [M(f, {
9125
9121
  width: "100%",
@@ -9133,7 +9129,7 @@ var au = d({
9133
9129
  { bottom: !0 }
9134
9130
  ]]) : m("", !0),
9135
9131
  T("h1", yu, o(e.$t("views.assistant.title")), 1),
9136
- g(K) ? (i(), x("span", bu, o(g(K)), 1)) : m("", !0),
9132
+ g(pe) ? (i(), x("span", bu, o(g(pe)), 1)) : m("", !0),
9137
9133
  t[4] ||= T("div", { class: "gradient-blur rotate-180 !h-[70px]" }, [
9138
9134
  T("div"),
9139
9135
  T("div"),
@@ -9143,12 +9139,12 @@ var au = d({
9143
9139
  T("div")
9144
9140
  ], -1)
9145
9141
  ])),
9146
- !g(s) && g(U) === "ready" ? (i(), x("div", xu, [E((i(), p(a, {
9142
+ !g(s) && g(H) === "ready" ? (i(), x("div", xu, [E((i(), p(a, {
9147
9143
  severity: "secondary",
9148
9144
  text: "",
9149
9145
  rounded: "",
9150
9146
  class: "cui-icon-lg relative z-2",
9151
- onClick: _e
9147
+ onClick: ye
9152
9148
  }, {
9153
9149
  icon: v(() => [M(u, {
9154
9150
  width: "100%",
@@ -9164,24 +9160,24 @@ var au = d({
9164
9160
  T("div", { class: l(["h-full w-full flex flex-col", {
9165
9161
  "pt-2": g(s),
9166
9162
  "pt-[calc(40px+2rem)]": !g(s)
9167
- }]) }, [g(k) || g(ae) ? (i(), x("div", Su, [M(h, {
9163
+ }]) }, [g(k) || g(se) ? (i(), x("div", Su, [M(h, {
9168
9164
  class: "w-[30px] h-[30px] m-0",
9169
9165
  "stroke-width": "5"
9170
- })])) : g(U) === "ready" ? (i(), p(b, {
9166
+ })])) : g(H) === "ready" ? (i(), p(b, {
9171
9167
  ref_key: "conversationRef",
9172
9168
  ref: I,
9173
9169
  key: g(R),
9174
9170
  "thread-id": g(R),
9175
- "initial-messages": g(z),
9171
+ "initial-messages": g(ie),
9176
9172
  "initial-attachments": g(B),
9177
- "initial-prompt": g(V),
9178
- suggestions: g(q),
9179
- "approval-tools": g(ce),
9173
+ "initial-prompt": g(ae),
9174
+ suggestions: g(he),
9175
+ "approval-tools": g(de),
9180
9176
  tools: g(O)?.tools ?? [],
9181
9177
  class: "flex-1 min-h-0",
9182
- onFinished: Ee,
9183
- onBranched: be,
9184
- onEmptied: t[2] ||= (e) => ye(g(R))
9178
+ onFinished: Oe,
9179
+ onBranched: Se,
9180
+ onEmptied: t[2] ||= (e) => xe(g(R))
9185
9181
  }, null, 8, [
9186
9182
  "thread-id",
9187
9183
  "initial-messages",
@@ -9192,8 +9188,8 @@ var au = d({
9192
9188
  "tools"
9193
9189
  ])) : (i(), x("div", Cu, [
9194
9190
  T("div", wu, [M(_, { class: "w-8 h-8 text-muted" })]),
9195
- T("div", Tu, [T("div", Eu, o(e.$t(g(U) === "disabled" ? "views.assistant.disabled_title" : "views.assistant.unconfigured_title")), 1), T("div", Du, o(e.$t(g(se) ? "views.assistant.setup_hint_admin" : "views.assistant.setup_hint_user")), 1)]),
9196
- g(se) ? (i(), p(a, {
9191
+ T("div", Tu, [T("div", Eu, o(e.$t(g(H) === "disabled" ? "views.assistant.disabled_title" : "views.assistant.unconfigured_title")), 1), T("div", Du, o(e.$t(g(U) ? "views.assistant.setup_hint_admin" : "views.assistant.setup_hint_user")), 1)]),
9192
+ g(U) ? (i(), p(a, {
9197
9193
  key: 0,
9198
9194
  class: "cui-button-medium",
9199
9195
  label: e.$t("views.assistant.open_settings"),