@openhands/agent-canvas 1.0.0-alpha.7 → 1.0.0-alpha.9

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 (745) hide show
  1. package/README.md +25 -23
  2. package/bin/agent-canvas.mjs +27 -1
  3. package/build/assets/{QueryClientProvider-DITRCGAK.js → QueryClientProvider-B7kl84Kj.js} +1 -1
  4. package/build/assets/{Trans-D43bd3yR.js → Trans-1j65oy9O.js} +1 -1
  5. package/build/assets/{acp-providers-SCPK1BIU.js → acp-providers-DauuOsW9.js} +1 -1
  6. package/build/assets/{acp-route-guard-IWlFmS6x.js → acp-route-guard-CQTmeJwM.js} +1 -1
  7. package/build/assets/{active-backend-context-CkP3ZEJs.js → active-backend-context-TVbjnvmP.js} +1 -1
  8. package/build/assets/add-backend-modal-FsnpTTgO.js +1 -0
  9. package/build/assets/{agent-server-client-options-8OJSXbm8.js → agent-server-client-options-DT2GP6VJ.js} +1 -1
  10. package/build/assets/{agent-server-compatibility-DvKtnXHw.js → agent-server-compatibility-2aOx5iWd.js} +1 -1
  11. package/build/assets/agent-server-conversation-service.api-BZmUqtiO.js +5 -0
  12. package/build/assets/{agent-settings-DdisD2Xx.js → agent-settings-B247S9G3.js} +2 -2
  13. package/build/assets/{alert-banner-CvTYN73l.js → alert-banner-BWoqueRw.js} +1 -1
  14. package/build/assets/{analytics-consent-form-modal-BKgT9i2w.js → analytics-consent-form-modal-C7sXfxRh.js} +1 -1
  15. package/build/assets/{app-settings-DcYXtxGP.js → app-settings-BVeSaty9.js} +1 -1
  16. package/build/assets/{automation-detail-D7GEU0vR.js → automation-detail-R-99FUce.js} +1 -1
  17. package/build/assets/{automations-list-CkVNsgzm.js → automations-list-Dfu2c-_D.js} +1 -1
  18. package/build/assets/backend-form-modal-DxYjqqAK.js +1 -0
  19. package/build/assets/{backend-synced-settings-badge-BFy2HylT.js → backend-synced-settings-badge-nAfiUWvM.js} +1 -1
  20. package/build/assets/{base-modal-B4HvlFHE.js → base-modal-CQRvRHu1.js} +1 -1
  21. package/build/assets/{brand-button-8fVVei4i.js → brand-button-C2nEKopC.js} +1 -1
  22. package/build/assets/browser-HrYc5Gce.js +5 -0
  23. package/build/assets/{browser-tab-DTM6RyoV.js → browser-tab-B_BuTvrO.js} +1 -1
  24. package/build/assets/{checkmark-BcvXE9bf.js → checkmark-BJJrZUF8.js} +1 -1
  25. package/build/assets/{chevron-left-small-BqSkXTeq.js → chevron-left-small-CSh-sE9L.js} +1 -1
  26. package/build/assets/{circle-plus-check-toggle-DRvuu-RD.js → circle-plus-check-toggle-qs8Va1cC.js} +1 -1
  27. package/build/assets/{clock-DfoVUZVq.js → clock-ZR4Kn-_Y.js} +1 -1
  28. package/build/assets/{close-SnIy2eLD.js → close-BdmyeRqS.js} +1 -1
  29. package/build/assets/{combobox-caret-BMsz5mQX.js → combobox-caret-B53O9Hsq.js} +1 -1
  30. package/build/assets/{condenser-settings-DduLQcpV.js → condenser-settings-A35V3yng.js} +1 -1
  31. package/build/assets/{confirmation-modal-B-DOYMUH.js → confirmation-modal-C9-La0h3.js} +1 -1
  32. package/build/assets/{context-menu-list-item-DzjPB8aC.js → context-menu-list-item-Buu9nc0q.js} +1 -1
  33. package/build/assets/conversation--ldUK72N.js +19 -0
  34. package/build/assets/conversation-eNrhH94O.js +1 -0
  35. package/build/assets/conversation-panel-B49Jpqpb.js +1 -0
  36. package/build/assets/{conversation-service.api-YTGTw0pz.js → conversation-service.api--f8WglOC.js} +1 -1
  37. package/build/assets/{conversation-tab-empty-state-BtFDbyTe.js → conversation-tab-empty-state-D8dNvo-V.js} +1 -1
  38. package/build/assets/conversation-websocket-context-BW68-J8o.js +3 -0
  39. package/build/assets/{copy-BxgbrjDT.js → copy-C7Ti2d8C.js} +1 -1
  40. package/build/assets/{custom-toast-handlers-BYxhSr3t.js → custom-toast-handlers-BOc3qeQ7.js} +1 -1
  41. package/build/assets/declaration-D378OjpZ.js +1 -0
  42. package/build/assets/{device-verify-CTbXX9CQ.js → device-verify-CMusn8nX.js} +1 -1
  43. package/build/assets/edit-automation-modal-Dnjxbjn7.js +1 -0
  44. package/build/assets/{ellipsis-button-BoU2-xlG.js → ellipsis-button-ugUATsNo.js} +1 -1
  45. package/build/assets/{entry.client-DU7-q4ZU.js → entry.client-CqqXOSvd.js} +2 -2
  46. package/build/assets/{enum-filter-dropdown-BJt-NplD.js → enum-filter-dropdown-1vpOGySB.js} +1 -1
  47. package/build/assets/{environment-switch-overlay-DQ1n6Iu6.js → environment-switch-overlay-CTCTQikP.js} +1 -1
  48. package/build/assets/{extensions-hub-BW1FAKFJ.js → extensions-hub-BSUseHVF.js} +1 -1
  49. package/build/assets/{extensions-navigation-CbPMhSML.js → extensions-navigation-CT1kc1u_.js} +1 -1
  50. package/build/assets/files-tab-CQHdWpQt.js +1 -0
  51. package/build/assets/{folder-CerIk8uG.js → folder-0WSMImNX.js} +1 -1
  52. package/build/assets/git-control-bar-branch-button-C8u5rzjc.js +27 -0
  53. package/build/assets/{git-provider-icon-D8RE4unY.js → git-provider-icon-D-a-rcLm.js} +1 -1
  54. package/build/assets/{home-DR11ejqB.js → home-DD0GroCu.js} +1 -1
  55. package/build/assets/{i18n-DkYgs32x.js → i18n-DjAGhTis.js} +1 -1
  56. package/build/assets/install-server-modal-z5VaHeXd.js +1 -0
  57. package/build/assets/{launch-DKCU9uJH.js → launch-B2mbfOSm.js} +1 -1
  58. package/build/assets/{lesson-plan-CmkRbe6Z.js → lesson-plan-DRYG5SLI.js} +1 -1
  59. package/build/assets/{link-external-CvxB0BmI.js → link-external-C9d6Fo3x.js} +1 -1
  60. package/build/assets/{llm-client-BpIfxETv.js → llm-client-ChQzg4wX.js} +1 -1
  61. package/build/assets/llm-settings-BEyqixPI.js +1 -0
  62. package/build/assets/{llm-settings-BOJC4vD-.js → llm-settings-BdiaGFbg.js} +1 -1
  63. package/build/assets/{loading-spinner-91b5FiMQ.js → loading-spinner-C04FGh14.js} +1 -1
  64. package/build/assets/{manage-backends-modal-DqpzcxdI.js → manage-backends-modal-s22zCdEW.js} +1 -1
  65. package/build/assets/{manage-workspaces-modal-eG6XgAvw.js → manage-workspaces-modal-C5EuW8m1.js} +1 -1
  66. package/build/assets/manifest-9d1c34fb.js +1 -0
  67. package/build/assets/{markdown-renderer-wZnLDbA1.js → markdown-renderer-CEX4Becj.js} +1 -1
  68. package/build/assets/mcp-C06YssEI.js +9 -0
  69. package/build/assets/messages-6aOyUu3r.js +36 -0
  70. package/build/assets/{modal-backdrop-B04pVYAD.js → modal-backdrop-DTYGVmOR.js} +1 -1
  71. package/build/assets/{modal-body-CgUoFQA1.js → modal-body-YElmM1dV.js} +1 -1
  72. package/build/assets/{modal-close-button-SM_WXzDY.js → modal-close-button-C_GpQt9F.js} +1 -1
  73. package/build/assets/{model-selector-7id-Uirf.js → model-selector-DeMmw-Xa.js} +1 -1
  74. package/build/assets/{navigation-context-BFjstyH6.js → navigation-context-DeIPtGPp.js} +1 -1
  75. package/build/assets/{navigation-link-DFQ7YcWq.js → navigation-link-C9JD4PYD.js} +1 -1
  76. package/build/assets/{openhands-logo-DkDp75rC.js → openhands-logo-CI5Fhn1W.js} +1 -1
  77. package/build/assets/{option-service.api-DN0ZcGjw.js → option-service.api-DsI1UW7N.js} +1 -1
  78. package/build/assets/{organization-service.api-Ct2dZF8M.js → organization-service.api-COwMPFg5.js} +1 -1
  79. package/build/assets/{path-utils-D1ZtqFC7.js → path-utils-BVbe598W.js} +1 -1
  80. package/build/assets/{plan-components-gOm-daR3.js → plan-components-DEjMuDDG.js} +1 -1
  81. package/build/assets/{planner-tab-yubfN-6U.js → planner-tab-bN6r1G-1.js} +1 -1
  82. package/build/assets/{profiles-client-D4twHRVf.js → profiles-client-BGkKEV9j.js} +1 -1
  83. package/build/assets/{providers-C2T07PM3.js → providers-DXvCAN_u.js} +1 -1
  84. package/build/assets/{proxy-BMZyC45G.js → proxy-CurRmrqf.js} +1 -1
  85. package/build/assets/{query-client-config-CiK0GJJO.js → query-client-config-Ba7qAAoO.js} +1 -1
  86. package/build/assets/recommended-automations-launcher-mJhK6Atl.js +52 -0
  87. package/build/assets/root-3t9rxEpE.js +2 -0
  88. package/build/assets/root-DHeCXo9N.css +1 -0
  89. package/build/assets/{root-layout-B4QioBS6.js → root-layout-BjVwHmta.js} +2 -2
  90. package/build/assets/{sdk-section-page-03k88tIR.js → sdk-section-page-CJW0G04-.js} +1 -1
  91. package/build/assets/{sdk-settings-schema-BY8dOy3a.js → sdk-settings-schema-QBYH-ONX.js} +1 -1
  92. package/build/assets/{search-BCAF9EDS.js → search-Cq_cFrDt.js} +1 -1
  93. package/build/assets/{secrets-service-Z3qtRb_G.js → secrets-service-Bwd5DeUs.js} +1 -1
  94. package/build/assets/{secrets-settings-BnlByuMZ.js → secrets-settings-MLXqOtX2.js} +1 -1
  95. package/build/assets/{server-client-CG1zHqph.js → server-client-C3mC8Hl3.js} +1 -1
  96. package/build/assets/{settings-DyzGLF_d.js → settings-D7E2U5tK.js} +1 -1
  97. package/build/assets/{settings-client-CkXDJwIY.js → settings-client-CwjfwoiB.js} +1 -1
  98. package/build/assets/{settings-dropdown-input-CAQWQgx-.js → settings-dropdown-input-VwAXNrOb.js} +1 -1
  99. package/build/assets/{settings-gear-D4ZkEDGb.js → settings-gear-BJwWR1ej.js} +1 -1
  100. package/build/assets/{settings-index-KtTw49xL.js → settings-index-J-3BNR0W.js} +1 -1
  101. package/build/assets/{settings-input-BWCZt9g2.js → settings-input-DBywAnA7.js} +1 -1
  102. package/build/assets/{settings-list-classes-xMleGkTC.js → settings-list-classes-BOS092DR.js} +1 -1
  103. package/build/assets/{settings-modal-Cv2YWSUY.js → settings-modal-B8vgWDTe.js} +1 -1
  104. package/build/assets/{settings-section-header-context-1wfkgjZZ.js → settings-section-header-context-32x6WTyL.js} +1 -1
  105. package/build/assets/settings-service.api-FvJGK45W.js +1 -0
  106. package/build/assets/{settings-switch-CGap2LtG.js → settings-switch-DTKmHC8F.js} +1 -1
  107. package/build/assets/{settings-utils-BBozxqqi.js → settings-utils-BsvSU3OM.js} +1 -1
  108. package/build/assets/{shared-conversation-DQlzwdpo.js → shared-conversation-EZV0FRIf.js} +1 -1
  109. package/build/assets/{sidebar-mobile-menu-toggle-DXplko7u.js → sidebar-mobile-menu-toggle-BnbzzpQl.js} +1 -1
  110. package/build/assets/{sidebar-nav-link-B4h8naZ7.js → sidebar-nav-link-CnWoZcwc.js} +1 -1
  111. package/build/assets/{skill-card-pill-row-D0oTWx-a.js → skill-card-pill-row-tZ599jli.js} +1 -1
  112. package/build/assets/{skills-BN8atjgW.js → skills-ZyAO5dyK.js} +1 -1
  113. package/build/assets/{skills-plugins-BTnp7QcQ.js → skills-plugins-BSRz041I.js} +1 -1
  114. package/build/assets/{skills-settings-CbOQvzkR.js → skills-settings-CG2hu34D.js} +2 -2
  115. package/build/assets/{status-DDL-ipIP.js → status-CsatcFbK.js} +1 -1
  116. package/build/assets/{styled-tooltip-Awq4HMw3.js → styled-tooltip-CS3mB_1X.js} +1 -1
  117. package/build/assets/{switch-skeleton-Bv21RGWd.js → switch-skeleton-C-CfhYYV.js} +1 -1
  118. package/build/assets/{task-list-tab-B45ktzHM.js → task-list-tab-465DDju0.js} +1 -1
  119. package/build/assets/{terminal-D5pzR9Ru.js → terminal-CcgBEVnC.js} +1 -1
  120. package/build/assets/{terminal-DGuR4559.js → terminal-LNa-iU5c.js} +1 -1
  121. package/build/assets/{toggle-switch-gj6T-wsU.js → toggle-switch-k-IZCDbt.js} +1 -1
  122. package/build/assets/{typography-BbaUAC4V.js → typography-vVUMoNUg.js} +1 -1
  123. package/build/assets/{u-check-circle-DHGiAi-w.js → u-check-circle-DplbarS5.js} +1 -1
  124. package/build/assets/{u-check-circle-half-BPcWtWwv.js → u-check-circle-half-yDuiSZHC.js} +1 -1
  125. package/build/assets/{u-circuit-B_nK9hOu.js → u-circuit-C9tYkpeK.js} +1 -1
  126. package/build/assets/{u-edit-BPFJBd34.js → u-edit-KAUlufD8.js} +1 -1
  127. package/build/assets/{use-active-conversation-Bu5J9iLy.js → use-active-conversation-DS5j9R4q.js} +1 -1
  128. package/build/assets/{use-agent-settings-schema-BbtOsR7P.js → use-agent-settings-schema-Bvp5UzV8.js} +1 -1
  129. package/build/assets/{use-agent-state-DN9Nc5pP.js → use-agent-state-D2C9SeGw.js} +1 -1
  130. package/build/assets/{use-cloud-current-user-id-B_rMUiu8.js → use-cloud-current-user-id-DWVar4st.js} +1 -1
  131. package/build/assets/{use-config-Bcz2JL2t.js → use-config-BSu_53GL.js} +1 -1
  132. package/build/assets/{use-conversation-id-BOaaZahn.js → use-conversation-id-DajhCn2A.js} +1 -1
  133. package/build/assets/{use-create-conversation-BWFA_FId.js → use-create-conversation-BEZg__Vv.js} +1 -1
  134. package/build/assets/{use-event-store-CQZCcVz-.js → use-event-store-BT_gV3ut.js} +1 -1
  135. package/build/assets/{use-handle-plan-click-CgrCGmT1.js → use-handle-plan-click-uOpew2LO.js} +1 -1
  136. package/build/assets/use-is-authed-hXC8vxgT.js +1 -0
  137. package/build/assets/{use-is-creating-conversation-DhoM7UAB.js → use-is-creating-conversation-DhDeeWfA.js} +1 -1
  138. package/build/assets/{use-launch-skill-in-chat-DOyQsXFO.js → use-launch-skill-in-chat-DVGPFrbI.js} +1 -1
  139. package/build/assets/{use-llm-profiles-CAIzHJDX.js → use-llm-profiles-O4a9V6RC.js} +1 -1
  140. package/build/assets/use-runtime-is-ready-pGSbPddC.js +1 -0
  141. package/build/assets/{use-save-settings-5m3w89Ph.js → use-save-settings-CEEKSTWG.js} +1 -1
  142. package/build/assets/{use-settings-DzG0C3vO.js → use-settings-DQ7Oo1Hj.js} +1 -1
  143. package/build/assets/{use-settings-nav-items-BIsKeX52.js → use-settings-nav-items-YmrXrjn9.js} +2 -2
  144. package/build/assets/use-skills-BIvlWblA.js +1 -0
  145. package/build/assets/{use-task-list-Bs90uF2N.js → use-task-list-DDeNHprj.js} +1 -1
  146. package/build/assets/{use-unified-vscode-url-C5iI-Z5A.js → use-unified-vscode-url-wAMzv8Sn.js} +1 -1
  147. package/build/assets/use-user-conversation-B_zDoSeh.js +1 -0
  148. package/build/assets/{useMutation-CRJwk4cR.js → useMutation-B4OUESdw.js} +1 -1
  149. package/build/assets/{useTranslation-01pF7z10.js → useTranslation-CpIcQBq6.js} +1 -1
  150. package/build/assets/{utils-Czcl6buL.js → utils-D-HX7JCe.js} +1 -1
  151. package/build/assets/{vendor~conversation-panel~conversation-CbjvWBSu.js → vendor~conversation-panel~conversation-BlCIz9XQ.js} +1 -1
  152. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CofhIDpd.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Ds9quNZ9.js} +1 -1
  153. package/build/assets/vendor~home~mcp~automations-list-C5PoHCy6.js +1 -0
  154. package/build/assets/{vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-BQPOygpY.js → vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-CGlZoBKa.js} +1 -1
  155. package/build/assets/{vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-CyYIBiBk.js → vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-DE11mPxp.js} +1 -1
  156. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-CuGq_cxH.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-8b8V5bfO.js} +1 -1
  157. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-CFpDeb9o.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-Dy7L6fMG.js} +1 -1
  158. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-C1p8-pMr.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-D40EXhZx.js} +1 -1
  159. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-CHrEOFl6.js +48 -0
  160. package/build/assets/{vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js → vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-CyUbhpbm.js} +1 -1
  161. package/build/assets/{verification-settings-DbziMp4K.js → verification-settings-BtlTiHP8.js} +1 -1
  162. package/build/assets/{vscode-tab-BVhQR2rt.js → vscode-tab-B0vdh9gU.js} +1 -1
  163. package/build/assets/{waiting-for-runtime-message-JotSOBdC.js → waiting-for-runtime-message-DWPl_Yby.js} +1 -1
  164. package/build/assets/{x-mark-CZ57VvRX.js → x-mark-CWI0f9yI.js} +1 -1
  165. package/build/favicon.svg +1 -0
  166. package/build/index.html +4 -4
  167. package/build/locales/ar/openhands.json +8 -0
  168. package/build/locales/ca/openhands.json +8 -0
  169. package/build/locales/de/openhands.json +8 -0
  170. package/build/locales/en/openhands.json +8 -0
  171. package/build/locales/es/openhands.json +8 -0
  172. package/build/locales/fr/openhands.json +8 -0
  173. package/build/locales/it/openhands.json +8 -0
  174. package/build/locales/ja/openhands.json +8 -0
  175. package/build/locales/ko-KR/openhands.json +8 -0
  176. package/build/locales/no/openhands.json +8 -0
  177. package/build/locales/pt/openhands.json +8 -0
  178. package/build/locales/tr/openhands.json +8 -0
  179. package/build/locales/uk/openhands.json +8 -0
  180. package/build/locales/zh-CN/openhands.json +8 -0
  181. package/build/locales/zh-TW/openhands.json +8 -0
  182. package/config/defaults.json +1 -1
  183. package/dist/api/agent-server-adapter.cjs +1 -1
  184. package/dist/api/agent-server-adapter.cjs.map +1 -1
  185. package/dist/api/agent-server-adapter.js +1 -0
  186. package/dist/api/agent-server-adapter.js.map +1 -1
  187. package/dist/api/agent-server-config.cjs +1 -1
  188. package/dist/api/agent-server-config.cjs.map +1 -1
  189. package/dist/api/agent-server-config.d.ts +1 -1
  190. package/dist/api/agent-server-config.js +1 -1
  191. package/dist/api/agent-server-config.js.map +1 -1
  192. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  193. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  194. package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +12 -0
  195. package/dist/api/conversation-service/agent-server-conversation-service.api.js +4 -0
  196. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  197. package/dist/api/mcp-service/mcp-service.api.cjs +2 -0
  198. package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -0
  199. package/dist/api/mcp-service/mcp-service.api.d.ts +6 -0
  200. package/dist/api/mcp-service/mcp-service.api.js +36 -0
  201. package/dist/api/mcp-service/mcp-service.api.js.map +1 -0
  202. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  203. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  204. package/dist/api/settings-service/settings-service.api.d.ts +1 -0
  205. package/dist/api/settings-service/settings-service.api.js +59 -41
  206. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  207. package/dist/api/skills-service.cjs +1 -1
  208. package/dist/api/skills-service.cjs.map +1 -1
  209. package/dist/api/skills-service.d.ts +1 -1
  210. package/dist/api/skills-service.js +2 -2
  211. package/dist/api/skills-service.js.map +1 -1
  212. package/dist/components/features/automations/detail/activity-log-item.d.ts +1 -1
  213. package/dist/components/features/automations/recommended-automations-launcher.d.ts +1 -1
  214. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  215. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  216. package/dist/components/features/backends/backend-form-modal.js +149 -142
  217. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  218. package/dist/components/features/chat/change-agent-button.cjs +1 -1
  219. package/dist/components/features/chat/change-agent-button.cjs.map +1 -1
  220. package/dist/components/features/chat/change-agent-button.js +65 -59
  221. package/dist/components/features/chat/change-agent-button.js.map +1 -1
  222. package/dist/components/features/chat/chat-interface.cjs +2 -2
  223. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  224. package/dist/components/features/chat/chat-interface.js +15 -14
  225. package/dist/components/features/chat/chat-interface.js.map +1 -1
  226. package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
  227. package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
  228. package/dist/components/features/chat/components/chat-input-actions.js +127 -149
  229. package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
  230. package/dist/components/features/chat/components/chat-input-model.cjs +1 -1
  231. package/dist/components/features/chat/components/chat-input-model.cjs.map +1 -1
  232. package/dist/components/features/chat/components/chat-input-model.d.ts +10 -0
  233. package/dist/components/features/chat/components/chat-input-model.js +95 -60
  234. package/dist/components/features/chat/components/chat-input-model.js.map +1 -1
  235. package/dist/components/features/chat/git-control-bar.cjs +1 -1
  236. package/dist/components/features/chat/git-control-bar.cjs.map +1 -1
  237. package/dist/components/features/chat/git-control-bar.js +60 -59
  238. package/dist/components/features/chat/git-control-bar.js.map +1 -1
  239. package/dist/components/features/conversation/conversation-name-with-status.cjs +1 -1
  240. package/dist/components/features/conversation/conversation-name-with-status.cjs.map +1 -1
  241. package/dist/components/features/conversation/conversation-name-with-status.js +2 -2
  242. package/dist/components/features/conversation/conversation-name-with-status.js.map +1 -1
  243. package/dist/components/features/conversation/conversation-name.cjs +1 -1
  244. package/dist/components/features/conversation/conversation-name.cjs.map +1 -1
  245. package/dist/components/features/conversation/conversation-name.js +3 -3
  246. package/dist/components/features/conversation/conversation-name.js.map +1 -1
  247. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
  248. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
  249. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +1 -1
  250. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
  251. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
  252. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
  253. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +16 -16
  254. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
  255. package/dist/components/features/conversation-panel/skills-modal.cjs +1 -1
  256. package/dist/components/features/conversation-panel/skills-modal.cjs.map +1 -1
  257. package/dist/components/features/conversation-panel/skills-modal.js +1 -1
  258. package/dist/components/features/conversation-panel/skills-modal.js.map +1 -1
  259. package/dist/components/features/mcp-logo-badge.cjs +1 -1
  260. package/dist/components/features/mcp-logo-badge.cjs.map +1 -1
  261. package/dist/components/features/mcp-logo-badge.d.ts +2 -2
  262. package/dist/components/features/mcp-logo-badge.js +1 -1
  263. package/dist/components/features/mcp-logo-badge.js.map +1 -1
  264. package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
  265. package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
  266. package/dist/components/features/mcp-page/custom-server-editor.js +64 -41
  267. package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
  268. package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
  269. package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
  270. package/dist/components/features/mcp-page/install-server-modal.d.ts +1 -1
  271. package/dist/components/features/mcp-page/install-server-modal.js +126 -102
  272. package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
  273. package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
  274. package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
  275. package/dist/components/features/mcp-page/installed-server-card.js +1 -1
  276. package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
  277. package/dist/components/features/mcp-page/marketplace-card.cjs +1 -1
  278. package/dist/components/features/mcp-page/marketplace-card.cjs.map +1 -1
  279. package/dist/components/features/mcp-page/marketplace-card.d.ts +1 -1
  280. package/dist/components/features/mcp-page/marketplace-card.js +27 -25
  281. package/dist/components/features/mcp-page/marketplace-card.js.map +1 -1
  282. package/dist/components/features/mcp-page/marketplace-section.cjs +1 -1
  283. package/dist/components/features/mcp-page/marketplace-section.cjs.map +1 -1
  284. package/dist/components/features/mcp-page/marketplace-section.d.ts +1 -1
  285. package/dist/components/features/mcp-page/marketplace-section.js +1 -1
  286. package/dist/components/features/mcp-page/marketplace-section.js.map +1 -1
  287. package/dist/components/features/mcp-page/mcp-logo-stack-badge.d.ts +2 -2
  288. package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +7 -7
  289. package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
  290. package/dist/components/features/settings/mcp-settings/mcp-server-form.d.ts +8 -12
  291. package/dist/components/features/settings/mcp-settings/mcp-server-form.js +114 -87
  292. package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
  293. package/dist/context/scroll-context.cjs +1 -1
  294. package/dist/context/scroll-context.cjs.map +1 -1
  295. package/dist/context/scroll-context.d.ts +1 -0
  296. package/dist/context/scroll-context.js +4 -1
  297. package/dist/context/scroll-context.js.map +1 -1
  298. package/dist/contexts/conversation-websocket-context.cjs +3 -3
  299. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  300. package/dist/contexts/conversation-websocket-context.js +97 -89
  301. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  302. package/dist/favicon.svg +1 -0
  303. package/dist/hooks/chat/use-slash-command.cjs +1 -1
  304. package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
  305. package/dist/hooks/chat/use-slash-command.js +1 -1
  306. package/dist/hooks/chat/use-slash-command.js.map +1 -1
  307. package/dist/hooks/mutation/use-switch-acp-model.cjs +2 -0
  308. package/dist/hooks/mutation/use-switch-acp-model.cjs.map +1 -0
  309. package/dist/hooks/mutation/use-switch-acp-model.d.ts +23 -0
  310. package/dist/hooks/mutation/use-switch-acp-model.js +26 -0
  311. package/dist/hooks/mutation/use-switch-acp-model.js.map +1 -0
  312. package/dist/hooks/mutation/use-test-mcp-server.cjs +2 -0
  313. package/dist/hooks/mutation/use-test-mcp-server.cjs.map +1 -0
  314. package/dist/hooks/mutation/use-test-mcp-server.d.ts +2 -0
  315. package/dist/hooks/mutation/use-test-mcp-server.js +10 -0
  316. package/dist/hooks/mutation/use-test-mcp-server.js.map +1 -0
  317. package/dist/hooks/query/use-automation-detail.d.ts +3 -2
  318. package/dist/hooks/query/use-conversation-skills.cjs +2 -0
  319. package/dist/hooks/query/use-conversation-skills.cjs.map +1 -0
  320. package/dist/hooks/query/use-conversation-skills.d.ts +7 -0
  321. package/dist/hooks/query/use-conversation-skills.js +8 -0
  322. package/dist/hooks/query/use-conversation-skills.js.map +1 -0
  323. package/dist/hooks/query/use-skills.cjs +1 -1
  324. package/dist/hooks/query/use-skills.cjs.map +1 -1
  325. package/dist/hooks/query/use-skills.d.ts +6 -1
  326. package/dist/hooks/query/use-skills.js +3 -3
  327. package/dist/hooks/query/use-skills.js.map +1 -1
  328. package/dist/hooks/use-acp-model-context.cjs.map +1 -1
  329. package/dist/hooks/use-acp-model-context.d.ts +3 -4
  330. package/dist/hooks/use-acp-model-context.js.map +1 -1
  331. package/dist/hooks/use-chat-input-model-state.cjs +2 -0
  332. package/dist/hooks/use-chat-input-model-state.cjs.map +1 -0
  333. package/dist/hooks/use-chat-input-model-state.d.ts +12 -0
  334. package/dist/hooks/use-chat-input-model-state.js +29 -0
  335. package/dist/hooks/use-chat-input-model-state.js.map +1 -0
  336. package/dist/i18n/declaration.cjs +1 -1
  337. package/dist/i18n/declaration.cjs.map +1 -1
  338. package/dist/i18n/declaration.d.ts +8 -0
  339. package/dist/i18n/declaration.js +1 -1
  340. package/dist/i18n/declaration.js.map +1 -1
  341. package/dist/i18n/translation.cjs +2 -2
  342. package/dist/i18n/translation.cjs.map +1 -1
  343. package/dist/i18n/translation.js +136 -0
  344. package/dist/i18n/translation.js.map +1 -1
  345. package/dist/locales/ar/openhands.json +8 -0
  346. package/dist/locales/ca/openhands.json +8 -0
  347. package/dist/locales/de/openhands.json +8 -0
  348. package/dist/locales/en/openhands.json +8 -0
  349. package/dist/locales/es/openhands.json +8 -0
  350. package/dist/locales/fr/openhands.json +8 -0
  351. package/dist/locales/it/openhands.json +8 -0
  352. package/dist/locales/ja/openhands.json +8 -0
  353. package/dist/locales/ko-KR/openhands.json +8 -0
  354. package/dist/locales/no/openhands.json +8 -0
  355. package/dist/locales/pt/openhands.json +8 -0
  356. package/dist/locales/tr/openhands.json +8 -0
  357. package/dist/locales/uk/openhands.json +8 -0
  358. package/dist/locales/zh-CN/openhands.json +8 -0
  359. package/dist/locales/zh-TW/openhands.json +8 -0
  360. package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.cjs +2 -0
  361. package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.cjs.map +1 -0
  362. package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.js +37 -0
  363. package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.js.map +1 -0
  364. package/dist/node_modules/@openhands/extensions/integrations/catalog/apify.cjs +2 -0
  365. package/dist/node_modules/@openhands/extensions/integrations/catalog/apify.cjs.map +1 -0
  366. package/dist/node_modules/@openhands/extensions/integrations/catalog/apify.js +36 -0
  367. package/dist/node_modules/@openhands/extensions/integrations/catalog/apify.js.map +1 -0
  368. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/atlassian.cjs +1 -1
  369. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs.map +1 -0
  370. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/atlassian.js +15 -5
  371. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js.map +1 -0
  372. package/dist/node_modules/@openhands/extensions/integrations/catalog/brave-search.cjs +2 -0
  373. package/dist/node_modules/@openhands/extensions/integrations/catalog/brave-search.cjs.map +1 -0
  374. package/dist/node_modules/@openhands/extensions/integrations/catalog/brave-search.js +36 -0
  375. package/dist/node_modules/@openhands/extensions/integrations/catalog/brave-search.js.map +1 -0
  376. package/dist/node_modules/@openhands/extensions/integrations/catalog/browser-mcp.cjs +2 -0
  377. package/dist/node_modules/@openhands/extensions/integrations/catalog/browser-mcp.cjs.map +1 -0
  378. package/dist/node_modules/@openhands/extensions/integrations/catalog/browser-mcp.js +31 -0
  379. package/dist/node_modules/@openhands/extensions/integrations/catalog/browser-mcp.js.map +1 -0
  380. package/dist/node_modules/@openhands/extensions/integrations/catalog/clickhouse.cjs +2 -0
  381. package/dist/node_modules/@openhands/extensions/integrations/catalog/clickhouse.cjs.map +1 -0
  382. package/dist/node_modules/@openhands/extensions/integrations/catalog/clickhouse.js +52 -0
  383. package/dist/node_modules/@openhands/extensions/integrations/catalog/clickhouse.js.map +1 -0
  384. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/cloudflare-bindings.cjs +1 -1
  385. package/dist/node_modules/@openhands/extensions/integrations/catalog/cloudflare-bindings.cjs.map +1 -0
  386. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/cloudflare-bindings.js +15 -5
  387. package/dist/node_modules/@openhands/extensions/integrations/catalog/cloudflare-bindings.js.map +1 -0
  388. package/dist/node_modules/@openhands/extensions/integrations/catalog/cloudflare-browser-rendering.cjs +2 -0
  389. package/dist/node_modules/@openhands/extensions/integrations/catalog/cloudflare-browser-rendering.cjs.map +1 -0
  390. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/cloudflare-browser-rendering.js +15 -5
  391. package/dist/node_modules/@openhands/extensions/integrations/catalog/cloudflare-browser-rendering.js.map +1 -0
  392. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/cloudflare-builds.cjs +1 -1
  393. package/dist/node_modules/@openhands/extensions/integrations/catalog/cloudflare-builds.cjs.map +1 -0
  394. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/cloudflare-builds.js +15 -5
  395. package/dist/node_modules/@openhands/extensions/integrations/catalog/cloudflare-builds.js.map +1 -0
  396. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/cloudflare-docs.cjs +1 -1
  397. package/dist/node_modules/@openhands/extensions/integrations/catalog/cloudflare-docs.cjs.map +1 -0
  398. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/cloudflare-docs.js +15 -5
  399. package/dist/node_modules/@openhands/extensions/integrations/catalog/cloudflare-docs.js.map +1 -0
  400. package/dist/node_modules/@openhands/extensions/integrations/catalog/cloudflare-observability.cjs +2 -0
  401. package/dist/node_modules/@openhands/extensions/integrations/catalog/cloudflare-observability.cjs.map +1 -0
  402. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/cloudflare-observability.js +15 -5
  403. package/dist/node_modules/@openhands/extensions/integrations/catalog/cloudflare-observability.js.map +1 -0
  404. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/deepwiki.cjs +1 -1
  405. package/dist/node_modules/@openhands/extensions/integrations/catalog/deepwiki.cjs.map +1 -0
  406. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/deepwiki.js +15 -5
  407. package/dist/node_modules/@openhands/extensions/integrations/catalog/deepwiki.js.map +1 -0
  408. package/dist/node_modules/@openhands/extensions/integrations/catalog/elevenlabs.cjs +2 -0
  409. package/dist/node_modules/@openhands/extensions/integrations/catalog/elevenlabs.cjs.map +1 -0
  410. package/dist/node_modules/@openhands/extensions/integrations/catalog/elevenlabs.js +36 -0
  411. package/dist/node_modules/@openhands/extensions/integrations/catalog/elevenlabs.js.map +1 -0
  412. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/everything.cjs +1 -1
  413. package/dist/node_modules/@openhands/extensions/integrations/catalog/everything.cjs.map +1 -0
  414. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/everything.js +13 -6
  415. package/dist/node_modules/@openhands/extensions/integrations/catalog/everything.js.map +1 -0
  416. package/dist/node_modules/@openhands/extensions/integrations/catalog/exa.cjs +2 -0
  417. package/dist/node_modules/@openhands/extensions/integrations/catalog/exa.cjs.map +1 -0
  418. package/dist/node_modules/@openhands/extensions/integrations/catalog/exa.js +36 -0
  419. package/dist/node_modules/@openhands/extensions/integrations/catalog/exa.js.map +1 -0
  420. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/fetch.cjs +1 -1
  421. package/dist/node_modules/@openhands/extensions/integrations/catalog/fetch.cjs.map +1 -0
  422. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/fetch.js +13 -6
  423. package/dist/node_modules/@openhands/extensions/integrations/catalog/fetch.js.map +1 -0
  424. package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.cjs +2 -0
  425. package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.cjs.map +1 -0
  426. package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.js +40 -0
  427. package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.js.map +1 -0
  428. package/dist/node_modules/@openhands/extensions/integrations/catalog/filesystem.cjs +2 -0
  429. package/dist/node_modules/@openhands/extensions/integrations/catalog/filesystem.cjs.map +1 -0
  430. package/dist/node_modules/@openhands/extensions/integrations/catalog/filesystem.js +39 -0
  431. package/dist/node_modules/@openhands/extensions/integrations/catalog/filesystem.js.map +1 -0
  432. package/dist/node_modules/@openhands/extensions/integrations/catalog/firecrawl.cjs +2 -0
  433. package/dist/node_modules/@openhands/extensions/integrations/catalog/firecrawl.cjs.map +1 -0
  434. package/dist/node_modules/@openhands/extensions/integrations/catalog/firecrawl.js +36 -0
  435. package/dist/node_modules/@openhands/extensions/integrations/catalog/firecrawl.js.map +1 -0
  436. package/dist/node_modules/@openhands/extensions/integrations/catalog/git.cjs +2 -0
  437. package/dist/node_modules/@openhands/extensions/integrations/catalog/git.cjs.map +1 -0
  438. package/dist/node_modules/@openhands/extensions/integrations/catalog/git.js +40 -0
  439. package/dist/node_modules/@openhands/extensions/integrations/catalog/git.js.map +1 -0
  440. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +2 -0
  441. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -0
  442. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +47 -0
  443. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -0
  444. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/huggingface.cjs +1 -1
  445. package/dist/node_modules/@openhands/extensions/integrations/catalog/huggingface.cjs.map +1 -0
  446. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/huggingface.js +15 -5
  447. package/dist/node_modules/@openhands/extensions/integrations/catalog/huggingface.js.map +1 -0
  448. package/dist/node_modules/@openhands/extensions/integrations/catalog/kagi.cjs +2 -0
  449. package/dist/node_modules/@openhands/extensions/integrations/catalog/kagi.cjs.map +1 -0
  450. package/dist/node_modules/@openhands/extensions/integrations/catalog/kagi.js +36 -0
  451. package/dist/node_modules/@openhands/extensions/integrations/catalog/kagi.js.map +1 -0
  452. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/linear.cjs +1 -1
  453. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs.map +1 -0
  454. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/linear.js +15 -5
  455. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js.map +1 -0
  456. package/dist/node_modules/@openhands/extensions/integrations/catalog/memory.cjs +2 -0
  457. package/dist/node_modules/@openhands/extensions/integrations/catalog/memory.cjs.map +1 -0
  458. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/memory.js +13 -6
  459. package/dist/node_modules/@openhands/extensions/integrations/catalog/memory.js.map +1 -0
  460. package/dist/node_modules/@openhands/extensions/integrations/catalog/mongodb.cjs +2 -0
  461. package/dist/node_modules/@openhands/extensions/integrations/catalog/mongodb.cjs.map +1 -0
  462. package/dist/node_modules/@openhands/extensions/integrations/catalog/mongodb.js +36 -0
  463. package/dist/node_modules/@openhands/extensions/integrations/catalog/mongodb.js.map +1 -0
  464. package/dist/node_modules/@openhands/extensions/integrations/catalog/neon.cjs +2 -0
  465. package/dist/node_modules/@openhands/extensions/integrations/catalog/neon.cjs.map +1 -0
  466. package/dist/node_modules/@openhands/extensions/integrations/catalog/neon.js +40 -0
  467. package/dist/node_modules/@openhands/extensions/integrations/catalog/neon.js.map +1 -0
  468. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +2 -0
  469. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -0
  470. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +39 -0
  471. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -0
  472. package/dist/node_modules/@openhands/extensions/integrations/catalog/obsidian.cjs +2 -0
  473. package/dist/node_modules/@openhands/extensions/integrations/catalog/obsidian.cjs.map +1 -0
  474. package/dist/node_modules/@openhands/extensions/integrations/catalog/obsidian.js +38 -0
  475. package/dist/node_modules/@openhands/extensions/integrations/catalog/obsidian.js.map +1 -0
  476. package/dist/node_modules/@openhands/extensions/integrations/catalog/paypal.cjs +2 -0
  477. package/dist/node_modules/@openhands/extensions/integrations/catalog/paypal.cjs.map +1 -0
  478. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/paypal.js +15 -5
  479. package/dist/node_modules/@openhands/extensions/integrations/catalog/paypal.js.map +1 -0
  480. package/dist/node_modules/@openhands/extensions/integrations/catalog/playwright.cjs +2 -0
  481. package/dist/node_modules/@openhands/extensions/integrations/catalog/playwright.cjs.map +1 -0
  482. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/playwright.js +13 -6
  483. package/dist/node_modules/@openhands/extensions/integrations/catalog/playwright.js.map +1 -0
  484. package/dist/node_modules/@openhands/extensions/integrations/catalog/redis.cjs +2 -0
  485. package/dist/node_modules/@openhands/extensions/integrations/catalog/redis.cjs.map +1 -0
  486. package/dist/node_modules/@openhands/extensions/integrations/catalog/redis.js +43 -0
  487. package/dist/node_modules/@openhands/extensions/integrations/catalog/redis.js.map +1 -0
  488. package/dist/node_modules/@openhands/extensions/integrations/catalog/resend.cjs +2 -0
  489. package/dist/node_modules/@openhands/extensions/integrations/catalog/resend.cjs.map +1 -0
  490. package/dist/node_modules/@openhands/extensions/integrations/catalog/resend.js +41 -0
  491. package/dist/node_modules/@openhands/extensions/integrations/catalog/resend.js.map +1 -0
  492. package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.cjs +2 -0
  493. package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.cjs.map +1 -0
  494. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/sentry.js +15 -5
  495. package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.js.map +1 -0
  496. package/dist/node_modules/@openhands/extensions/integrations/catalog/sequential-thinking.cjs +2 -0
  497. package/dist/node_modules/@openhands/extensions/integrations/catalog/sequential-thinking.cjs.map +1 -0
  498. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/sequential-thinking.js +13 -6
  499. package/dist/node_modules/@openhands/extensions/integrations/catalog/sequential-thinking.js.map +1 -0
  500. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs +2 -0
  501. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs.map +1 -0
  502. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js +45 -0
  503. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js.map +1 -0
  504. package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.cjs +2 -0
  505. package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.cjs.map +1 -0
  506. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/stripe.js +15 -5
  507. package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.js.map +1 -0
  508. package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.cjs +2 -0
  509. package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.cjs.map +1 -0
  510. package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.js +37 -0
  511. package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.js.map +1 -0
  512. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/tavily.cjs +1 -1
  513. package/dist/node_modules/@openhands/extensions/integrations/catalog/tavily.cjs.map +1 -0
  514. package/dist/node_modules/@openhands/extensions/integrations/catalog/tavily.js +39 -0
  515. package/dist/node_modules/@openhands/extensions/integrations/catalog/tavily.js.map +1 -0
  516. package/dist/node_modules/@openhands/extensions/integrations/catalog/time.cjs +2 -0
  517. package/dist/node_modules/@openhands/extensions/integrations/catalog/time.cjs.map +1 -0
  518. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/catalog/time.js +13 -6
  519. package/dist/node_modules/@openhands/extensions/integrations/catalog/time.js.map +1 -0
  520. package/dist/node_modules/@openhands/extensions/integrations/index.cjs +2 -0
  521. package/dist/node_modules/@openhands/extensions/integrations/index.cjs.map +1 -0
  522. package/dist/node_modules/@openhands/extensions/integrations/index.js +175 -0
  523. package/dist/node_modules/@openhands/extensions/integrations/index.js.map +1 -0
  524. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/logos.cjs +1 -1
  525. package/dist/node_modules/@openhands/extensions/integrations/logos.cjs.map +1 -0
  526. package/dist/node_modules/@openhands/extensions/{mcps → integrations}/logos.js +2 -2
  527. package/dist/node_modules/@openhands/extensions/integrations/logos.js.map +1 -0
  528. package/dist/node_modules/@openhands/extensions/integrations/oauth-provider-catalog.cjs +2 -0
  529. package/dist/node_modules/@openhands/extensions/integrations/oauth-provider-catalog.cjs.map +1 -0
  530. package/dist/node_modules/@openhands/extensions/integrations/oauth-provider-catalog.js +548 -0
  531. package/dist/node_modules/@openhands/extensions/integrations/oauth-provider-catalog.js.map +1 -0
  532. package/dist/node_modules/@openhands/extensions/integrations/oauth-provider-registration-defaults.cjs +2 -0
  533. package/dist/node_modules/@openhands/extensions/integrations/oauth-provider-registration-defaults.cjs.map +1 -0
  534. package/dist/node_modules/@openhands/extensions/integrations/oauth-provider-registration-defaults.js +482 -0
  535. package/dist/node_modules/@openhands/extensions/integrations/oauth-provider-registration-defaults.js.map +1 -0
  536. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs +1 -1
  537. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs.map +1 -1
  538. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js +3 -0
  539. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js.map +1 -1
  540. package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.cjs +2 -0
  541. package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.cjs.map +1 -0
  542. package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.js +22 -0
  543. package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.js.map +1 -0
  544. package/dist/node_modules/@openhands/typescript-client/dist/index.cjs +1 -1
  545. package/dist/node_modules/@openhands/typescript-client/dist/index.js +1 -0
  546. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
  547. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
  548. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +3 -0
  549. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
  550. package/dist/package.cjs +1 -1
  551. package/dist/package.cjs.map +1 -1
  552. package/dist/package.js +6 -4
  553. package/dist/package.js.map +1 -1
  554. package/dist/routes/conversation.cjs +1 -1
  555. package/dist/routes/conversation.cjs.map +1 -1
  556. package/dist/routes/conversation.js +61 -63
  557. package/dist/routes/conversation.js.map +1 -1
  558. package/dist/routes/mcp.cjs +1 -1
  559. package/dist/routes/mcp.cjs.map +1 -1
  560. package/dist/routes/mcp.js +1 -1
  561. package/dist/routes/mcp.js.map +1 -1
  562. package/dist/stores/use-event-store.cjs +1 -1
  563. package/dist/stores/use-event-store.cjs.map +1 -1
  564. package/dist/stores/use-event-store.d.ts +22 -0
  565. package/dist/stores/use-event-store.js +9 -1
  566. package/dist/stores/use-event-store.js.map +1 -1
  567. package/dist/ui/context-menu.d.ts +1 -1
  568. package/dist/ui/help-link.d.ts +1 -1
  569. package/dist/utils/mcp-marketplace-utils.cjs +1 -1
  570. package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
  571. package/dist/utils/mcp-marketplace-utils.d.ts +21 -1
  572. package/dist/utils/mcp-marketplace-utils.js +23 -13
  573. package/dist/utils/mcp-marketplace-utils.js.map +1 -1
  574. package/dist/utils/settings-utils.cjs.map +1 -1
  575. package/dist/utils/settings-utils.js.map +1 -1
  576. package/package.json +6 -4
  577. package/scripts/check-sdk-version-sync.mjs +6 -6
  578. package/scripts/dev-safe.mjs +60 -24
  579. package/scripts/dev-with-automation.mjs +30 -50
  580. package/tools/canvas_ui_tool.py +129 -0
  581. package/build/assets/add-backend-modal-CqjNjGqY.js +0 -1
  582. package/build/assets/agent-server-conversation-service.api-BdEre_71.js +0 -5
  583. package/build/assets/backend-form-modal-KudhWUX8.js +0 -1
  584. package/build/assets/browser-vYpdU3CR.js +0 -5
  585. package/build/assets/conversation-COZAKz_K.js +0 -1
  586. package/build/assets/conversation-DWcvnmds.js +0 -19
  587. package/build/assets/conversation-panel-CZDStT0b.js +0 -1
  588. package/build/assets/conversation-websocket-context-DulnrIHh.js +0 -3
  589. package/build/assets/declaration-C9nuq2Dj.js +0 -1
  590. package/build/assets/edit-automation-modal-C3bFxS2f.js +0 -1
  591. package/build/assets/files-tab-CbJ4s7Ik.js +0 -1
  592. package/build/assets/git-control-bar-branch-button-Bm6rzSpo.js +0 -27
  593. package/build/assets/install-server-modal-VB5hOBpW.js +0 -1
  594. package/build/assets/llm-settings-CIdxmimN.js +0 -1
  595. package/build/assets/manifest-f041e61a.js +0 -1
  596. package/build/assets/mcp-BdfyCW1l.js +0 -9
  597. package/build/assets/messages-v-q35ObG.js +0 -36
  598. package/build/assets/recommended-automations-launcher-Cx7svuGE.js +0 -52
  599. package/build/assets/root-D2PVd51i.js +0 -2
  600. package/build/assets/root-DEotKI6b.css +0 -1
  601. package/build/assets/settings-service.api-Z6x0l0GU.js +0 -1
  602. package/build/assets/use-is-authed-BFoh8Ogh.js +0 -1
  603. package/build/assets/use-runtime-is-ready-BQWLEyqa.js +0 -1
  604. package/build/assets/use-skills-Cn-78xP1.js +0 -1
  605. package/build/assets/use-user-conversation-BCYpbPT1.js +0 -1
  606. package/build/assets/vendor~home~mcp~automations-list-DRfWZRnF.js +0 -1
  607. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-BJm2mGIp.js +0 -48
  608. package/dist/node_modules/@openhands/extensions/mcps/catalog/airtable.cjs +0 -2
  609. package/dist/node_modules/@openhands/extensions/mcps/catalog/airtable.cjs.map +0 -1
  610. package/dist/node_modules/@openhands/extensions/mcps/catalog/airtable.js +0 -30
  611. package/dist/node_modules/@openhands/extensions/mcps/catalog/airtable.js.map +0 -1
  612. package/dist/node_modules/@openhands/extensions/mcps/catalog/apify.cjs +0 -2
  613. package/dist/node_modules/@openhands/extensions/mcps/catalog/apify.cjs.map +0 -1
  614. package/dist/node_modules/@openhands/extensions/mcps/catalog/apify.js +0 -29
  615. package/dist/node_modules/@openhands/extensions/mcps/catalog/apify.js.map +0 -1
  616. package/dist/node_modules/@openhands/extensions/mcps/catalog/atlassian.cjs.map +0 -1
  617. package/dist/node_modules/@openhands/extensions/mcps/catalog/atlassian.js.map +0 -1
  618. package/dist/node_modules/@openhands/extensions/mcps/catalog/brave-search.cjs +0 -2
  619. package/dist/node_modules/@openhands/extensions/mcps/catalog/brave-search.cjs.map +0 -1
  620. package/dist/node_modules/@openhands/extensions/mcps/catalog/brave-search.js +0 -29
  621. package/dist/node_modules/@openhands/extensions/mcps/catalog/brave-search.js.map +0 -1
  622. package/dist/node_modules/@openhands/extensions/mcps/catalog/browser-mcp.cjs +0 -2
  623. package/dist/node_modules/@openhands/extensions/mcps/catalog/browser-mcp.cjs.map +0 -1
  624. package/dist/node_modules/@openhands/extensions/mcps/catalog/browser-mcp.js +0 -24
  625. package/dist/node_modules/@openhands/extensions/mcps/catalog/browser-mcp.js.map +0 -1
  626. package/dist/node_modules/@openhands/extensions/mcps/catalog/clickhouse.cjs +0 -2
  627. package/dist/node_modules/@openhands/extensions/mcps/catalog/clickhouse.cjs.map +0 -1
  628. package/dist/node_modules/@openhands/extensions/mcps/catalog/clickhouse.js +0 -45
  629. package/dist/node_modules/@openhands/extensions/mcps/catalog/clickhouse.js.map +0 -1
  630. package/dist/node_modules/@openhands/extensions/mcps/catalog/cloudflare-bindings.cjs.map +0 -1
  631. package/dist/node_modules/@openhands/extensions/mcps/catalog/cloudflare-bindings.js.map +0 -1
  632. package/dist/node_modules/@openhands/extensions/mcps/catalog/cloudflare-browser-rendering.cjs +0 -2
  633. package/dist/node_modules/@openhands/extensions/mcps/catalog/cloudflare-browser-rendering.cjs.map +0 -1
  634. package/dist/node_modules/@openhands/extensions/mcps/catalog/cloudflare-browser-rendering.js.map +0 -1
  635. package/dist/node_modules/@openhands/extensions/mcps/catalog/cloudflare-builds.cjs.map +0 -1
  636. package/dist/node_modules/@openhands/extensions/mcps/catalog/cloudflare-builds.js.map +0 -1
  637. package/dist/node_modules/@openhands/extensions/mcps/catalog/cloudflare-docs.cjs.map +0 -1
  638. package/dist/node_modules/@openhands/extensions/mcps/catalog/cloudflare-docs.js.map +0 -1
  639. package/dist/node_modules/@openhands/extensions/mcps/catalog/cloudflare-observability.cjs +0 -2
  640. package/dist/node_modules/@openhands/extensions/mcps/catalog/cloudflare-observability.cjs.map +0 -1
  641. package/dist/node_modules/@openhands/extensions/mcps/catalog/cloudflare-observability.js.map +0 -1
  642. package/dist/node_modules/@openhands/extensions/mcps/catalog/deepwiki.cjs.map +0 -1
  643. package/dist/node_modules/@openhands/extensions/mcps/catalog/deepwiki.js.map +0 -1
  644. package/dist/node_modules/@openhands/extensions/mcps/catalog/elevenlabs.cjs +0 -2
  645. package/dist/node_modules/@openhands/extensions/mcps/catalog/elevenlabs.cjs.map +0 -1
  646. package/dist/node_modules/@openhands/extensions/mcps/catalog/elevenlabs.js +0 -29
  647. package/dist/node_modules/@openhands/extensions/mcps/catalog/elevenlabs.js.map +0 -1
  648. package/dist/node_modules/@openhands/extensions/mcps/catalog/everything.cjs.map +0 -1
  649. package/dist/node_modules/@openhands/extensions/mcps/catalog/everything.js.map +0 -1
  650. package/dist/node_modules/@openhands/extensions/mcps/catalog/exa.cjs +0 -2
  651. package/dist/node_modules/@openhands/extensions/mcps/catalog/exa.cjs.map +0 -1
  652. package/dist/node_modules/@openhands/extensions/mcps/catalog/exa.js +0 -29
  653. package/dist/node_modules/@openhands/extensions/mcps/catalog/exa.js.map +0 -1
  654. package/dist/node_modules/@openhands/extensions/mcps/catalog/fetch.cjs.map +0 -1
  655. package/dist/node_modules/@openhands/extensions/mcps/catalog/fetch.js.map +0 -1
  656. package/dist/node_modules/@openhands/extensions/mcps/catalog/figma.cjs +0 -2
  657. package/dist/node_modules/@openhands/extensions/mcps/catalog/figma.cjs.map +0 -1
  658. package/dist/node_modules/@openhands/extensions/mcps/catalog/figma.js +0 -33
  659. package/dist/node_modules/@openhands/extensions/mcps/catalog/figma.js.map +0 -1
  660. package/dist/node_modules/@openhands/extensions/mcps/catalog/filesystem.cjs +0 -2
  661. package/dist/node_modules/@openhands/extensions/mcps/catalog/filesystem.cjs.map +0 -1
  662. package/dist/node_modules/@openhands/extensions/mcps/catalog/filesystem.js +0 -32
  663. package/dist/node_modules/@openhands/extensions/mcps/catalog/filesystem.js.map +0 -1
  664. package/dist/node_modules/@openhands/extensions/mcps/catalog/firecrawl.cjs +0 -2
  665. package/dist/node_modules/@openhands/extensions/mcps/catalog/firecrawl.cjs.map +0 -1
  666. package/dist/node_modules/@openhands/extensions/mcps/catalog/firecrawl.js +0 -29
  667. package/dist/node_modules/@openhands/extensions/mcps/catalog/firecrawl.js.map +0 -1
  668. package/dist/node_modules/@openhands/extensions/mcps/catalog/git.cjs +0 -2
  669. package/dist/node_modules/@openhands/extensions/mcps/catalog/git.cjs.map +0 -1
  670. package/dist/node_modules/@openhands/extensions/mcps/catalog/git.js +0 -33
  671. package/dist/node_modules/@openhands/extensions/mcps/catalog/git.js.map +0 -1
  672. package/dist/node_modules/@openhands/extensions/mcps/catalog/github.cjs +0 -2
  673. package/dist/node_modules/@openhands/extensions/mcps/catalog/github.cjs.map +0 -1
  674. package/dist/node_modules/@openhands/extensions/mcps/catalog/github.js +0 -40
  675. package/dist/node_modules/@openhands/extensions/mcps/catalog/github.js.map +0 -1
  676. package/dist/node_modules/@openhands/extensions/mcps/catalog/huggingface.cjs.map +0 -1
  677. package/dist/node_modules/@openhands/extensions/mcps/catalog/huggingface.js.map +0 -1
  678. package/dist/node_modules/@openhands/extensions/mcps/catalog/kagi.cjs +0 -2
  679. package/dist/node_modules/@openhands/extensions/mcps/catalog/kagi.cjs.map +0 -1
  680. package/dist/node_modules/@openhands/extensions/mcps/catalog/kagi.js +0 -29
  681. package/dist/node_modules/@openhands/extensions/mcps/catalog/kagi.js.map +0 -1
  682. package/dist/node_modules/@openhands/extensions/mcps/catalog/linear.cjs.map +0 -1
  683. package/dist/node_modules/@openhands/extensions/mcps/catalog/linear.js.map +0 -1
  684. package/dist/node_modules/@openhands/extensions/mcps/catalog/memory.cjs +0 -2
  685. package/dist/node_modules/@openhands/extensions/mcps/catalog/memory.cjs.map +0 -1
  686. package/dist/node_modules/@openhands/extensions/mcps/catalog/memory.js.map +0 -1
  687. package/dist/node_modules/@openhands/extensions/mcps/catalog/mongodb.cjs +0 -2
  688. package/dist/node_modules/@openhands/extensions/mcps/catalog/mongodb.cjs.map +0 -1
  689. package/dist/node_modules/@openhands/extensions/mcps/catalog/mongodb.js +0 -29
  690. package/dist/node_modules/@openhands/extensions/mcps/catalog/mongodb.js.map +0 -1
  691. package/dist/node_modules/@openhands/extensions/mcps/catalog/neon.cjs +0 -2
  692. package/dist/node_modules/@openhands/extensions/mcps/catalog/neon.cjs.map +0 -1
  693. package/dist/node_modules/@openhands/extensions/mcps/catalog/neon.js +0 -33
  694. package/dist/node_modules/@openhands/extensions/mcps/catalog/neon.js.map +0 -1
  695. package/dist/node_modules/@openhands/extensions/mcps/catalog/notion.cjs +0 -2
  696. package/dist/node_modules/@openhands/extensions/mcps/catalog/notion.cjs.map +0 -1
  697. package/dist/node_modules/@openhands/extensions/mcps/catalog/notion.js +0 -32
  698. package/dist/node_modules/@openhands/extensions/mcps/catalog/notion.js.map +0 -1
  699. package/dist/node_modules/@openhands/extensions/mcps/catalog/obsidian.cjs +0 -2
  700. package/dist/node_modules/@openhands/extensions/mcps/catalog/obsidian.cjs.map +0 -1
  701. package/dist/node_modules/@openhands/extensions/mcps/catalog/obsidian.js +0 -31
  702. package/dist/node_modules/@openhands/extensions/mcps/catalog/obsidian.js.map +0 -1
  703. package/dist/node_modules/@openhands/extensions/mcps/catalog/paypal.cjs +0 -2
  704. package/dist/node_modules/@openhands/extensions/mcps/catalog/paypal.cjs.map +0 -1
  705. package/dist/node_modules/@openhands/extensions/mcps/catalog/paypal.js.map +0 -1
  706. package/dist/node_modules/@openhands/extensions/mcps/catalog/playwright.cjs +0 -2
  707. package/dist/node_modules/@openhands/extensions/mcps/catalog/playwright.cjs.map +0 -1
  708. package/dist/node_modules/@openhands/extensions/mcps/catalog/playwright.js.map +0 -1
  709. package/dist/node_modules/@openhands/extensions/mcps/catalog/redis.cjs +0 -2
  710. package/dist/node_modules/@openhands/extensions/mcps/catalog/redis.cjs.map +0 -1
  711. package/dist/node_modules/@openhands/extensions/mcps/catalog/redis.js +0 -36
  712. package/dist/node_modules/@openhands/extensions/mcps/catalog/redis.js.map +0 -1
  713. package/dist/node_modules/@openhands/extensions/mcps/catalog/resend.cjs +0 -2
  714. package/dist/node_modules/@openhands/extensions/mcps/catalog/resend.cjs.map +0 -1
  715. package/dist/node_modules/@openhands/extensions/mcps/catalog/resend.js +0 -34
  716. package/dist/node_modules/@openhands/extensions/mcps/catalog/resend.js.map +0 -1
  717. package/dist/node_modules/@openhands/extensions/mcps/catalog/sentry.cjs +0 -2
  718. package/dist/node_modules/@openhands/extensions/mcps/catalog/sentry.cjs.map +0 -1
  719. package/dist/node_modules/@openhands/extensions/mcps/catalog/sentry.js.map +0 -1
  720. package/dist/node_modules/@openhands/extensions/mcps/catalog/sequential-thinking.cjs +0 -2
  721. package/dist/node_modules/@openhands/extensions/mcps/catalog/sequential-thinking.cjs.map +0 -1
  722. package/dist/node_modules/@openhands/extensions/mcps/catalog/sequential-thinking.js.map +0 -1
  723. package/dist/node_modules/@openhands/extensions/mcps/catalog/slack.cjs +0 -2
  724. package/dist/node_modules/@openhands/extensions/mcps/catalog/slack.cjs.map +0 -1
  725. package/dist/node_modules/@openhands/extensions/mcps/catalog/slack.js +0 -38
  726. package/dist/node_modules/@openhands/extensions/mcps/catalog/slack.js.map +0 -1
  727. package/dist/node_modules/@openhands/extensions/mcps/catalog/stripe.cjs +0 -2
  728. package/dist/node_modules/@openhands/extensions/mcps/catalog/stripe.cjs.map +0 -1
  729. package/dist/node_modules/@openhands/extensions/mcps/catalog/stripe.js.map +0 -1
  730. package/dist/node_modules/@openhands/extensions/mcps/catalog/supabase.cjs +0 -2
  731. package/dist/node_modules/@openhands/extensions/mcps/catalog/supabase.cjs.map +0 -1
  732. package/dist/node_modules/@openhands/extensions/mcps/catalog/supabase.js +0 -30
  733. package/dist/node_modules/@openhands/extensions/mcps/catalog/supabase.js.map +0 -1
  734. package/dist/node_modules/@openhands/extensions/mcps/catalog/tavily.cjs.map +0 -1
  735. package/dist/node_modules/@openhands/extensions/mcps/catalog/tavily.js +0 -32
  736. package/dist/node_modules/@openhands/extensions/mcps/catalog/tavily.js.map +0 -1
  737. package/dist/node_modules/@openhands/extensions/mcps/catalog/time.cjs +0 -2
  738. package/dist/node_modules/@openhands/extensions/mcps/catalog/time.cjs.map +0 -1
  739. package/dist/node_modules/@openhands/extensions/mcps/catalog/time.js.map +0 -1
  740. package/dist/node_modules/@openhands/extensions/mcps/index.cjs +0 -2
  741. package/dist/node_modules/@openhands/extensions/mcps/index.cjs.map +0 -1
  742. package/dist/node_modules/@openhands/extensions/mcps/index.js +0 -87
  743. package/dist/node_modules/@openhands/extensions/mcps/index.js.map +0 -1
  744. package/dist/node_modules/@openhands/extensions/mcps/logos.cjs.map +0 -1
  745. package/dist/node_modules/@openhands/extensions/mcps/logos.js.map +0 -1
package/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # agent-canvas
2
2
 
3
3
  > [!WARNING]
4
- > This project is in alpha phase. It may be vibecoded, untested, or out of date. [Learn more](https://github.com/OpenHands/incubator-program).
4
+ > This project is in the **Beta** phase. It may be vibecoded, untested, or out of date. OpenHands takes no responsibility for the code or its support. [Learn more](https://github.com/OpenHands/incubator-program).
5
+
6
+ [![Project Status: Beta](https://img.shields.io/badge/status-beta-blue)](https://github.com/OpenHands/incubator-program)
5
7
 
6
8
  OpenHands is a platform for orchestrating coding agents across different environments. You can:
7
9
 
@@ -21,10 +23,16 @@ The same Agent Canvas frontend can swap between each of these environments, so y
21
23
  OpenHands works with any agent harness (e.g. Claude Code, Codex)
22
24
  or connect directly to an LLM (e.g. Anthropic, OpenAI, Gemini, Mistral, Minimax, Kimi).
23
25
 
24
- If you have questions or feedback, please open a GitHub issue or join the [#proj-agent-canvas channel in Slack](https://openhands.dev/joinslack)
26
+ If you have questions or feedback, please open a GitHub issue or join the [#proj-agent-canvas channel in Slack](https://openhands.dev/joinslack).
25
27
 
26
28
  <img width="1509" height="826" alt="Screenshot 2026-05-11 at 10 13 19 AM" src="https://github.com/user-attachments/assets/71ef41ae-8f6d-4fbf-990f-d672175d93d1" />
27
29
 
30
+ ## Project ownership and support
31
+
32
+ - **Current status**: Beta.
33
+ - **Support channel**: [#proj-agent-canvas](https://openhands.dev/joinslack).
34
+ - **Support level**: Best effort while the project remains in Beta.
35
+
28
36
  ## Quickstart
29
37
 
30
38
  You can install OpenHands to run agents on any machine: on your laptop, on a dedicated computer like a Mac Mini,
@@ -32,50 +40,41 @@ or on a server in the cloud.
32
40
 
33
41
  The most powerful way to run OpenHands is on a server in the cloud. This allows your agents to continue running
34
42
  even when your laptop is shut, and makes it easier to trigger your agents through third-party services
35
- like Slack, GitHub, and Datadog. See [SELF_HOSTING.md](SELF_HOSTING.md) for details, especially with respect to security hardening.
43
+ like Slack, GitHub, and Datadog. See [SELF_HOSTING.md](docs/SELF_HOSTING.md) for details, especially with respect to security hardening.
36
44
 
37
45
  Notably, you can run the backend in _multiple different environments_, and switch between
38
46
  them from the same Agent Canvas frontend. E.g. you can share an Agent Server with your team for agents doing
39
47
  code review and dependency updates, then have your personal agents running on your laptop.
40
48
 
49
+ ### Option 1: Without a Sandbox
50
+
41
51
  > [!WARNING]
42
52
  > This runs the agent-server directly on the machine you're installing on — the agent will have full access to your filesystem!
43
53
 
44
- ### Option 1: Docker
54
+ **Prerequisites**: Node.js 22.12.x or later, `uv`
45
55
 
46
56
  ```sh
47
- docker pull ghcr.io/openhands/agent-canvas:1.0.0-alpha.6
57
+ npm install -g @openhands/agent-canvas
58
+ agent-canvas
48
59
  ```
49
60
 
61
+ ### Option 2: With a Docker Sandbox
62
+
50
63
  ```sh
64
+ docker pull ghcr.io/openhands/agent-canvas:1.0.0-alpha.9
65
+
51
66
  export PROJECTS_PATH=~/projects # directory containing your project folders
52
- ```
53
67
 
54
- ```sh
55
68
  docker run -it --rm \
56
69
  -p 8000:8000 \
57
70
  -v ~/.openhands:/home/openhands/.openhands \
58
71
  -v ${PROJECTS_PATH}:/projects \
59
- ghcr.io/openhands/agent-canvas:1.0.0-alpha.6
72
+ ghcr.io/openhands/agent-canvas:1.0.0-alpha.9
60
73
  ```
61
74
 
62
75
  The agent will be able to access any project under `PROJECTS_PATH`.
63
76
 
64
- ### Option 2: NPM
65
-
66
- **Prerequisites**: Node.js 22.12.x or later, `uv`
67
-
68
- ```sh
69
- npm install -g @openhands/agent-canvas
70
- ```
71
-
72
- ```sh
73
- export PROJECTS_PATH=~/projects # directory containing your project folders
74
- ```
75
77
 
76
- ```sh
77
- agent-canvas
78
- ```
79
78
 
80
79
  ### Option 3: From Source
81
80
 
@@ -109,4 +108,7 @@ The Agent Server is often paired with an [Automation Server](https://github.com/
109
108
 
110
109
  ## More documentation
111
110
 
112
- For contributor and developer workflows, including frontend-only mode, mock mode, environment variables, and build/test commands, see [DEVELOPMENT.md](./DEVELOPMENT.md).
111
+ - [Documentation index](./docs/README.md)
112
+ - [Architecture overview](./docs/architecture.md)
113
+ - [Development guide](./docs/DEVELOPMENT.md)
114
+ - [Self-hosting guide](./docs/SELF_HOSTING.md)
@@ -20,13 +20,35 @@ const PKG_JSON = join(__dirname, "..", "package.json");
20
20
  // Build output is in build/ (not build/client/) - see react-router.config.ts unpackClientDirectory
21
21
  const BUILD_DIR = join(__dirname, "..", "build");
22
22
 
23
- // Check for version/help flags first
23
+ const DEFAULTS_JSON = join(__dirname, "..", "config", "defaults.json");
24
+
25
+ // Check for version/help/info flags first
24
26
  const args = process.argv.slice(2);
25
27
  if (args.includes("-v") || args.includes("--version")) {
26
28
  const { version } = JSON.parse(readFileSync(PKG_JSON, "utf-8"));
27
29
  console.log(version);
28
30
  process.exit(0);
29
31
  }
32
+ if (args.includes("--info")) {
33
+ const { version } = JSON.parse(readFileSync(PKG_JSON, "utf-8"));
34
+ const defaults = JSON.parse(readFileSync(DEFAULTS_JSON, "utf-8"));
35
+ console.log(`@openhands/agent-canvas ${version}
36
+
37
+ Default stack versions:
38
+ agent-server: ${defaults.versions.agentServer}
39
+ automation: ${defaults.versions.automation}
40
+ automation-sdk: ${defaults.versions.automationSdk}
41
+
42
+ Default ports:
43
+ ingress: ${defaults.ports.proxy}
44
+ agent-server: ${defaults.ports.agentServer}
45
+ automation: ${defaults.ports.automation}
46
+
47
+ Override versions via environment variables:
48
+ OH_AGENT_SERVER_VERSION, OH_AGENT_SERVER_GIT_REF, OH_AGENT_SERVER_LOCAL_PATH
49
+ OH_AUTOMATION_VERSION, OH_AUTOMATION_GIT_REF`);
50
+ process.exit(0);
51
+ }
30
52
  if (args.includes("-h") || args.includes("--help")) {
31
53
  console.log(`
32
54
  @openhands/agent-canvas - Run the Agent Canvas UI with agent-server
@@ -40,6 +62,7 @@ USAGE:
40
62
  OPTIONS:
41
63
  -p, --port <port> Ingress port (default: 8000)
42
64
  -v, --version Show version number
65
+ --info Show version and default stack configuration
43
66
  -h, --help Show this help message
44
67
 
45
68
  ENVIRONMENT VARIABLES:
@@ -58,6 +81,9 @@ EXAMPLES:
58
81
  # Use a specific port
59
82
  npx @openhands/agent-canvas --port 3000
60
83
 
84
+ # Show default stack versions and ports
85
+ npx @openhands/agent-canvas --info
86
+
61
87
  # Use local SDK checkout for development
62
88
  OH_AGENT_SERVER_LOCAL_PATH=/path/to/sdk npx @openhands/agent-canvas
63
89
  `);
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-C9nuq2Dj.js";var r=e(t(),1),i=n(),a=r.createContext(void 0),o=e=>{let t=r.useContext(a);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},s=({client:e,children:t})=>(r.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,i.jsx)(a.Provider,{value:e,children:t}));export{o as n,s as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-D378OjpZ.js";var r=e(t(),1),i=n(),a=r.createContext(void 0),o=e=>{let t=r.useContext(a);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},s=({client:e,children:t})=>(r.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,i.jsx)(a.Provider,{value:e,children:t}));export{o as n,s as t};
@@ -1 +1 @@
1
- import{a as e,t}from"./rolldown-runtime-BFRubm34.js";import{t as n}from"./react-CM_dJw1Z.js";import{a as r,i,r as a}from"./declaration-C9nuq2Dj.js";import{i as o}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~skills-settings~m~o9nrx3fm-D44TR8hL.js";import{a as s,i as c,n as l,r as u}from"./useTranslation-01pF7z10.js";import{t as d}from"./context-CEQZwATj.js";var f=t(((e,t)=>{t.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}})),p=e(n()),m=e(f()),h=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function g(e){var t={type:`tag`,name:``,voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(m.default[n[1]]||e.charAt(e.length-2)===`/`)&&(t.voidElement=!0),t.name.startsWith(`!--`))){var r=e.indexOf(`-->`);return{type:`comment`,comment:r===-1?``:e.slice(4,r)}}for(var i=new RegExp(h),a=null;(a=i.exec(e))!==null;)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,``];o.indexOf(`=`)>-1&&(s=o.split(`=`)),t.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(t.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return t}var _=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,v=/^\s*$/,y=Object.create(null);function b(e,t){switch(t.type){case`text`:return e+t.content;case`tag`:return e+=`<`+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+`="`+e[n]+`"`);return t.length?` `+t.join(` `):``}(t.attrs):``)+(t.voidElement?`/>`:`>`),t.voidElement?e:e+t.children.reduce(b,``)+`</`+t.name+`>`;case`comment`:return e+`<!--`+t.comment+`-->`}}var x={parse:function(e,t){t||={},t.components||=y;var n,r=[],i=[],a=-1,o=!1;if(e.indexOf(`<`)!==0){var s=e.indexOf(`<`);r.push({type:`text`,content:s===-1?e:e.substring(0,s)})}return e.replace(_,function(s,c){if(o){if(s!==`</`+n.name+`>`)return;o=!1}var l,u=s.charAt(1)!==`/`,d=s.startsWith(`<!--`),f=c+s.length,p=e.charAt(f);if(d){var m=g(s);return a<0?(r.push(m),r):((l=i[a]).children.push(m),r)}if(u&&(a++,(n=g(s)).type===`tag`&&t.components[n.name]&&(n.type=`component`,o=!0),n.voidElement||o||!p||p===`<`||n.children.push({type:`text`,content:e.slice(f,e.indexOf(`<`,f))}),a===0&&r.push(n),(l=i[a-1])&&l.children.push(n),i[a]=n),(!u||n.voidElement)&&(a>-1&&(n.voidElement||n.name===s.slice(2,-1))&&(a--,n=a===-1?r:i[a]),!o&&p!==`<`&&p)){l=a===-1?r:i[a].children;var h=e.indexOf(`<`,f),_=e.slice(f,h===-1?void 0:h);v.test(_)&&(_=` `),(h>-1&&a+l.length>=0||_!==` `)&&l.push({type:`text`,content:_})}}),r},stringify:function(e){return e.reduce(function(e,t){return e+b(``,t)},``)}},S=(e,t)=>{if(!e)return!1;let n=e.props?.children??e.children;return t?n.length>0:!!n},C=e=>{if(!e)return[];let t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?T(t):t},w=e=>Array.isArray(e)&&e.every(p.isValidElement),T=e=>Array.isArray(e)?e:[e],E=(e,t)=>{let n={...t};return n.props={...t.props,...e.props},n},D=e=>{let t={};if(!e)return t;let n=e=>{T(e).forEach(e=>{u(e)||(S(e)?n(C(e)):l(e)&&!(0,p.isValidElement)(e)&&Object.assign(t,e))})};return n(e),t},O=(e,t,n,r)=>{if(!e)return``;let i=``,a=T(e),o=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return a.forEach((e,a)=>{if(u(e)){i+=`${e}`;return}if((0,p.isValidElement)(e)){let{props:s,type:c}=e,l=Object.keys(s).length,d=o.indexOf(c)>-1,f=s.children;if(!f&&d&&!l){i+=`<${c}/>`;return}if(!f&&(!d||l)||s.i18nIsDynamicList){i+=`<${a}></${a}>`;return}if(d&&l<=1){let e=u(f)?f:O(f,t,n,r);i+=`<${c}>${e}</${c}>`;return}let p=O(f,t,n,r);i+=`<${a}>${p}</${a}>`;return}if(e===null){c(n,`TRANS_NULL_VALUE`,`Passed in a null value as child`,{i18nKey:r});return}if(l(e)){let{format:t,...a}=e,o=Object.keys(a);if(o.length===1){let e=t?`${o[0]}, ${t}`:o[0];i+=`{{${e}}}`;return}c(n,`TRANS_INVALID_OBJ`,`Invalid child - Object should only have keys {{ value, format }} (format is optional).`,{i18nKey:r,child:e});return}c(n,`TRANS_INVALID_VAR`,`Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`,{i18nKey:r,child:e})}),i},k=(e,t=[],n={})=>{if(!e)return e;let r=Object.keys(n),i=[...t,...r],a=``,o=0;for(;o<e.length;)if(e[o]===`<`){let t=!1,n=e.slice(o).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(n){let e=n[1];(/^\d+$/.test(e)||i.includes(e))&&(t=!0,a+=n[0],o+=n[0].length)}if(!t){let n=e.slice(o).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(n){let e=n[1];(/^\d+$/.test(e)||i.includes(e))&&(t=!0,a+=n[0],o+=n[0].length)}}t||(a+=`&lt;`,o+=1)}else a+=e[o],o+=1;return a},A=(e,t,n,a,o,s,c)=>{if(n===``)return[];let d=o.transKeepBasicHtmlNodesFor||[],f=n&&new RegExp(d.map(e=>`<${e}`).join(`|`)).test(n);if(!e&&!t&&!f&&!c)return[n];let m=t??{},h=e=>{T(e).forEach(e=>{u(e)||(S(e)?h(C(e)):l(e)&&!(0,p.isValidElement)(e)&&Object.assign(m,e))})};h(e);let g=k(n,d,m),_=x.parse(`<0>${g}</0>`),v={...m,...s},y=(e,t,n)=>{let r=C(e),i=D(r,t.children,n);return w(r)&&i.length===0||e.props?.i18nIsDynamicList?r:i},b=(e,t,n,r,i)=>{e.dummy?(e.children=t,n.push((0,p.cloneElement)(e,{key:r},i?void 0:t))):n.push(...p.Children.map([e],e=>{if(e.type===p.Fragment||e.props?.i18nIsDynamicList!==void 0){let n={key:r};return e&&e.props&&Object.keys(e.props).forEach(t=>{t===`children`||t===`i18nIsDynamicList`||(n[t]=e.props[t])}),(0,p.createElement)(e.type,n,i?null:t)}let n={key:r};return e&&e.props&&Object.keys(e.props).forEach(t=>{t===`ref`||t===`children`||(n[t]=e.props[t])}),(0,p.cloneElement)(e,n,i?null:t)}))},D=(e,n,s)=>{let m=T(e),h=T(n),g={};return h.reduce((e,n,h)=>{let _=n.children?.[0]?.content&&a.services.interpolator.interpolate(n.children[0].content,v,a.language);if(n.type===`tag`){let i=m[parseInt(n.name,10)];!i&&t&&(i=t[n.name]),s.length===1&&!i&&(i=s[0][n.name]),i||={};let x={...n.attrs};c&&Object.keys(x).forEach(e=>{let t=x[e];u(t)&&(x[e]=r(t))});let w=Object.keys(x).length===0?i:E({props:x},i),O=(0,p.isValidElement)(w),k=O&&S(n,!0)&&!n.voidElement,A=f&&l(w)&&w.dummy&&!O,j=l(t)&&Object.hasOwnProperty.call(t,n.name);if(u(w)){let t=a.services.interpolator.interpolate(w,v,a.language);e.push(t)}else if(S(w)||k)b(w,y(w,n,s),e,h);else if(A)b(w,D(m,n.children,s),e,h);else if(Number.isNaN(parseFloat(n.name)))if(j)b(w,y(w,n,s),e,h,n.voidElement);else if(o.transSupportBasicHtmlNodes&&d.indexOf(n.name)>-1)if(n.voidElement)e.push((0,p.createElement)(n.name,{key:`${n.name}-${h}`}));else{let t=g[n.name]||0;g[n.name]=t+1;let r,i=0;for(let e=0;e<m.length;e+=1){let a=m[e];if((0,p.isValidElement)(a)&&a.type===n.name){if(i===t){r=a;break}i+=1}}let a=D(r?T(C(r)):m,n.children,s);e.push((0,p.createElement)(n.name,{key:`${n.name}-${h}`},a))}else if(n.voidElement)e.push(`<${n.name} />`);else{let t=D(m,n.children,s);e.push(`<${n.name}>${t}</${n.name}>`)}else if(l(w)&&!O){let t=n.children[0]?_:null;t&&e.push(t)}else b(w,_,e,h,n.children.length!==1||!_)}else if(n.type===`text`){let t=o.transWrapTextNodes,r=typeof o.unescape==`function`?o.unescape:i().unescape,s=c?r(a.services.interpolator.interpolate(n.content,v,a.language)):a.services.interpolator.interpolate(n.content,v,a.language);t?e.push((0,p.createElement)(t,{key:`${n.name}-${h}`},s)):e.push(s)}return e},[])};return C(D([{dummy:!0,children:e||[]}],_,T(e||[]))[0])},j=(e,t,n)=>{let r=e.key||t,i=(0,p.cloneElement)(e,{key:r});if(!i.props||!i.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0)return i;function a(){return(0,p.createElement)(p.Fragment,null,i)}return(0,p.createElement)(a,{key:r})},M=(e,t)=>e.map((e,n)=>j(e,n,t)),N=(e,t)=>{let n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:j(e[r],r,t)})}),n},P=(e,t,n,r)=>e?Array.isArray(e)?M(e,t):l(e)?N(e,t):(s(n,`TRANS_INVALID_COMPONENTS`,`<Trans /> "components" prop expects an object or array`,{i18nKey:r}),null):null,F=e=>!l(e)||Array.isArray(e)?!1:Object.keys(e).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function I({children:e,count:t,parent:n,i18nKey:r,context:c,tOptions:l={},values:d,defaults:f,components:m,ns:h,i18n:g,t:_,shouldUnescape:v,...y}){let b=g||a();if(!b)return s(b,`NO_I18NEXT_INSTANCE`,`Trans: You need to pass in an i18next instance using i18nextReactModule`,{i18nKey:r}),e;let x=_||b.t.bind(b)||(e=>e),S={...i(),...b.options?.react},C=h||x.ns||b.options?.defaultNS;C=u(C)?[C]:C||[`translation`];let{transDefaultProps:w}=S,T=w?.tOptions?{...w.tOptions,...l}:l,E=v??w?.shouldUnescape,k=w?.values?{...w.values,...d}:d,j=w?.components?{...w.components,...m}:m,M=O(e,S,b,r),N=f||T?.defaultValue||M||S.transEmptyNodeValue||(typeof r==`function`?o(r):r),{hashTransKey:I}=S,L=r||(I?I(M||N):M||N);d=b.options?.interpolation?.defaultVariables?k&&Object.keys(k).length>0?{...k,...b.options.interpolation.defaultVariables}:{...b.options.interpolation.defaultVariables}:k;let R=D(e);R&&typeof R.count==`number`&&t===void 0&&(t=R.count);let z=d||t!==void 0&&!b.options?.interpolation?.alwaysFormat||!e?T.interpolation:{interpolation:{...T.interpolation,prefix:`#$?`,suffix:`?$#`}},B={...T,context:c||T.context,count:t,...d,...z,defaultValue:N,ns:C},V=L?x(L,B):N;V===L&&N&&(V=N);let H=P(j,V,b,r),U=H||e,W=null;F(H)&&(W=H,U=e);let G=A(U,W,V,b,S,B,E),K=n??S.defaultTransParent;return K?(0,p.createElement)(K,y,G):G}function L({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:o={},values:s,defaults:c,components:l,ns:u,i18n:f,t:m,shouldUnescape:h,...g}){let{i18n:_,defaultNS:v}=(0,p.useContext)(d)||{},y=f||_||a(),b=m||y?.t.bind(y);return I({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:o,values:s,defaults:c,components:l,ns:u||b?.ns||v||y?.options?.defaultNS,i18n:y,t:m,shouldUnescape:h,...g})}export{L as t};
1
+ import{a as e,t}from"./rolldown-runtime-BFRubm34.js";import{t as n}from"./react-CM_dJw1Z.js";import{a as r,i,r as a}from"./declaration-D378OjpZ.js";import{i as o}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~skills-settings~m~o9nrx3fm-D44TR8hL.js";import{a as s,i as c,n as l,r as u}from"./useTranslation-CpIcQBq6.js";import{t as d}from"./context-CEQZwATj.js";var f=t(((e,t)=>{t.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}})),p=e(n()),m=e(f()),h=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function g(e){var t={type:`tag`,name:``,voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(m.default[n[1]]||e.charAt(e.length-2)===`/`)&&(t.voidElement=!0),t.name.startsWith(`!--`))){var r=e.indexOf(`-->`);return{type:`comment`,comment:r===-1?``:e.slice(4,r)}}for(var i=new RegExp(h),a=null;(a=i.exec(e))!==null;)if(a[0].trim())if(a[1]){var o=a[1].trim(),s=[o,``];o.indexOf(`=`)>-1&&(s=o.split(`=`)),t.attrs[s[0]]=s[1],i.lastIndex--}else a[2]&&(t.attrs[a[2]]=a[3].trim().substring(1,a[3].length-1));return t}var _=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,v=/^\s*$/,y=Object.create(null);function b(e,t){switch(t.type){case`text`:return e+t.content;case`tag`:return e+=`<`+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+`="`+e[n]+`"`);return t.length?` `+t.join(` `):``}(t.attrs):``)+(t.voidElement?`/>`:`>`),t.voidElement?e:e+t.children.reduce(b,``)+`</`+t.name+`>`;case`comment`:return e+`<!--`+t.comment+`-->`}}var x={parse:function(e,t){t||={},t.components||=y;var n,r=[],i=[],a=-1,o=!1;if(e.indexOf(`<`)!==0){var s=e.indexOf(`<`);r.push({type:`text`,content:s===-1?e:e.substring(0,s)})}return e.replace(_,function(s,c){if(o){if(s!==`</`+n.name+`>`)return;o=!1}var l,u=s.charAt(1)!==`/`,d=s.startsWith(`<!--`),f=c+s.length,p=e.charAt(f);if(d){var m=g(s);return a<0?(r.push(m),r):((l=i[a]).children.push(m),r)}if(u&&(a++,(n=g(s)).type===`tag`&&t.components[n.name]&&(n.type=`component`,o=!0),n.voidElement||o||!p||p===`<`||n.children.push({type:`text`,content:e.slice(f,e.indexOf(`<`,f))}),a===0&&r.push(n),(l=i[a-1])&&l.children.push(n),i[a]=n),(!u||n.voidElement)&&(a>-1&&(n.voidElement||n.name===s.slice(2,-1))&&(a--,n=a===-1?r:i[a]),!o&&p!==`<`&&p)){l=a===-1?r:i[a].children;var h=e.indexOf(`<`,f),_=e.slice(f,h===-1?void 0:h);v.test(_)&&(_=` `),(h>-1&&a+l.length>=0||_!==` `)&&l.push({type:`text`,content:_})}}),r},stringify:function(e){return e.reduce(function(e,t){return e+b(``,t)},``)}},S=(e,t)=>{if(!e)return!1;let n=e.props?.children??e.children;return t?n.length>0:!!n},C=e=>{if(!e)return[];let t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?T(t):t},w=e=>Array.isArray(e)&&e.every(p.isValidElement),T=e=>Array.isArray(e)?e:[e],E=(e,t)=>{let n={...t};return n.props={...t.props,...e.props},n},D=e=>{let t={};if(!e)return t;let n=e=>{T(e).forEach(e=>{u(e)||(S(e)?n(C(e)):l(e)&&!(0,p.isValidElement)(e)&&Object.assign(t,e))})};return n(e),t},O=(e,t,n,r)=>{if(!e)return``;let i=``,a=T(e),o=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return a.forEach((e,a)=>{if(u(e)){i+=`${e}`;return}if((0,p.isValidElement)(e)){let{props:s,type:c}=e,l=Object.keys(s).length,d=o.indexOf(c)>-1,f=s.children;if(!f&&d&&!l){i+=`<${c}/>`;return}if(!f&&(!d||l)||s.i18nIsDynamicList){i+=`<${a}></${a}>`;return}if(d&&l<=1){let e=u(f)?f:O(f,t,n,r);i+=`<${c}>${e}</${c}>`;return}let p=O(f,t,n,r);i+=`<${a}>${p}</${a}>`;return}if(e===null){c(n,`TRANS_NULL_VALUE`,`Passed in a null value as child`,{i18nKey:r});return}if(l(e)){let{format:t,...a}=e,o=Object.keys(a);if(o.length===1){let e=t?`${o[0]}, ${t}`:o[0];i+=`{{${e}}}`;return}c(n,`TRANS_INVALID_OBJ`,`Invalid child - Object should only have keys {{ value, format }} (format is optional).`,{i18nKey:r,child:e});return}c(n,`TRANS_INVALID_VAR`,`Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`,{i18nKey:r,child:e})}),i},k=(e,t=[],n={})=>{if(!e)return e;let r=Object.keys(n),i=[...t,...r],a=``,o=0;for(;o<e.length;)if(e[o]===`<`){let t=!1,n=e.slice(o).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(n){let e=n[1];(/^\d+$/.test(e)||i.includes(e))&&(t=!0,a+=n[0],o+=n[0].length)}if(!t){let n=e.slice(o).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(n){let e=n[1];(/^\d+$/.test(e)||i.includes(e))&&(t=!0,a+=n[0],o+=n[0].length)}}t||(a+=`&lt;`,o+=1)}else a+=e[o],o+=1;return a},A=(e,t,n,a,o,s,c)=>{if(n===``)return[];let d=o.transKeepBasicHtmlNodesFor||[],f=n&&new RegExp(d.map(e=>`<${e}`).join(`|`)).test(n);if(!e&&!t&&!f&&!c)return[n];let m=t??{},h=e=>{T(e).forEach(e=>{u(e)||(S(e)?h(C(e)):l(e)&&!(0,p.isValidElement)(e)&&Object.assign(m,e))})};h(e);let g=k(n,d,m),_=x.parse(`<0>${g}</0>`),v={...m,...s},y=(e,t,n)=>{let r=C(e),i=D(r,t.children,n);return w(r)&&i.length===0||e.props?.i18nIsDynamicList?r:i},b=(e,t,n,r,i)=>{e.dummy?(e.children=t,n.push((0,p.cloneElement)(e,{key:r},i?void 0:t))):n.push(...p.Children.map([e],e=>{if(e.type===p.Fragment||e.props?.i18nIsDynamicList!==void 0){let n={key:r};return e&&e.props&&Object.keys(e.props).forEach(t=>{t===`children`||t===`i18nIsDynamicList`||(n[t]=e.props[t])}),(0,p.createElement)(e.type,n,i?null:t)}let n={key:r};return e&&e.props&&Object.keys(e.props).forEach(t=>{t===`ref`||t===`children`||(n[t]=e.props[t])}),(0,p.cloneElement)(e,n,i?null:t)}))},D=(e,n,s)=>{let m=T(e),h=T(n),g={};return h.reduce((e,n,h)=>{let _=n.children?.[0]?.content&&a.services.interpolator.interpolate(n.children[0].content,v,a.language);if(n.type===`tag`){let i=m[parseInt(n.name,10)];!i&&t&&(i=t[n.name]),s.length===1&&!i&&(i=s[0][n.name]),i||={};let x={...n.attrs};c&&Object.keys(x).forEach(e=>{let t=x[e];u(t)&&(x[e]=r(t))});let w=Object.keys(x).length===0?i:E({props:x},i),O=(0,p.isValidElement)(w),k=O&&S(n,!0)&&!n.voidElement,A=f&&l(w)&&w.dummy&&!O,j=l(t)&&Object.hasOwnProperty.call(t,n.name);if(u(w)){let t=a.services.interpolator.interpolate(w,v,a.language);e.push(t)}else if(S(w)||k)b(w,y(w,n,s),e,h);else if(A)b(w,D(m,n.children,s),e,h);else if(Number.isNaN(parseFloat(n.name)))if(j)b(w,y(w,n,s),e,h,n.voidElement);else if(o.transSupportBasicHtmlNodes&&d.indexOf(n.name)>-1)if(n.voidElement)e.push((0,p.createElement)(n.name,{key:`${n.name}-${h}`}));else{let t=g[n.name]||0;g[n.name]=t+1;let r,i=0;for(let e=0;e<m.length;e+=1){let a=m[e];if((0,p.isValidElement)(a)&&a.type===n.name){if(i===t){r=a;break}i+=1}}let a=D(r?T(C(r)):m,n.children,s);e.push((0,p.createElement)(n.name,{key:`${n.name}-${h}`},a))}else if(n.voidElement)e.push(`<${n.name} />`);else{let t=D(m,n.children,s);e.push(`<${n.name}>${t}</${n.name}>`)}else if(l(w)&&!O){let t=n.children[0]?_:null;t&&e.push(t)}else b(w,_,e,h,n.children.length!==1||!_)}else if(n.type===`text`){let t=o.transWrapTextNodes,r=typeof o.unescape==`function`?o.unescape:i().unescape,s=c?r(a.services.interpolator.interpolate(n.content,v,a.language)):a.services.interpolator.interpolate(n.content,v,a.language);t?e.push((0,p.createElement)(t,{key:`${n.name}-${h}`},s)):e.push(s)}return e},[])};return C(D([{dummy:!0,children:e||[]}],_,T(e||[]))[0])},j=(e,t,n)=>{let r=e.key||t,i=(0,p.cloneElement)(e,{key:r});if(!i.props||!i.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0)return i;function a(){return(0,p.createElement)(p.Fragment,null,i)}return(0,p.createElement)(a,{key:r})},M=(e,t)=>e.map((e,n)=>j(e,n,t)),N=(e,t)=>{let n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:j(e[r],r,t)})}),n},P=(e,t,n,r)=>e?Array.isArray(e)?M(e,t):l(e)?N(e,t):(s(n,`TRANS_INVALID_COMPONENTS`,`<Trans /> "components" prop expects an object or array`,{i18nKey:r}),null):null,F=e=>!l(e)||Array.isArray(e)?!1:Object.keys(e).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function I({children:e,count:t,parent:n,i18nKey:r,context:c,tOptions:l={},values:d,defaults:f,components:m,ns:h,i18n:g,t:_,shouldUnescape:v,...y}){let b=g||a();if(!b)return s(b,`NO_I18NEXT_INSTANCE`,`Trans: You need to pass in an i18next instance using i18nextReactModule`,{i18nKey:r}),e;let x=_||b.t.bind(b)||(e=>e),S={...i(),...b.options?.react},C=h||x.ns||b.options?.defaultNS;C=u(C)?[C]:C||[`translation`];let{transDefaultProps:w}=S,T=w?.tOptions?{...w.tOptions,...l}:l,E=v??w?.shouldUnescape,k=w?.values?{...w.values,...d}:d,j=w?.components?{...w.components,...m}:m,M=O(e,S,b,r),N=f||T?.defaultValue||M||S.transEmptyNodeValue||(typeof r==`function`?o(r):r),{hashTransKey:I}=S,L=r||(I?I(M||N):M||N);d=b.options?.interpolation?.defaultVariables?k&&Object.keys(k).length>0?{...k,...b.options.interpolation.defaultVariables}:{...b.options.interpolation.defaultVariables}:k;let R=D(e);R&&typeof R.count==`number`&&t===void 0&&(t=R.count);let z=d||t!==void 0&&!b.options?.interpolation?.alwaysFormat||!e?T.interpolation:{interpolation:{...T.interpolation,prefix:`#$?`,suffix:`?$#`}},B={...T,context:c||T.context,count:t,...d,...z,defaultValue:N,ns:C},V=L?x(L,B):N;V===L&&N&&(V=N);let H=P(j,V,b,r),U=H||e,W=null;F(H)&&(W=H,U=e);let G=A(U,W,V,b,S,B,E),K=n??S.defaultTransParent;return K?(0,p.createElement)(K,y,G):G}function L({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:o={},values:s,defaults:c,components:l,ns:u,i18n:f,t:m,shouldUnescape:h,...g}){let{i18n:_,defaultNS:v}=(0,p.useContext)(d)||{},y=f||_||a(),b=m||y?.t.bind(y);return I({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:o,values:s,defaults:c,components:l,ns:u||b?.ns||v||y?.options?.defaultNS,i18n:y,t:m,shouldUnescape:h,...g})}export{L as t};
@@ -1 +1 @@
1
- import{t as e}from"./declaration-C9nuq2Dj.js";import{t}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-BJm2mGIp.js";var n=`cli-generic`,r=new Set([`default`,`default (recommended)`]);function i(e){if(typeof e!=`string`)return null;let t=e.trim();return!t||r.has(t.toLowerCase())||t===`acp-managed`?null:t}function a(e){for(let t of[e.runtimeName,e.runtimeId,e.configured,e.sdkLlm]){let e=i(t);if(e)return e}return e.providerDefault??null}var o={"claude-code":{icon:`claude-code`,description_key:e.ONBOARDING$AGENT_CLAUDE_CODE_DESCRIPTION},codex:{icon:`codex`,description_key:e.ONBOARDING$AGENT_CODEX_DESCRIPTION},"gemini-cli":{icon:`gemini`,description_key:e.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION}},s=Object.entries(o).map(([e,n])=>{let r=t(e);return{key:e,display_name:r?.display_name??e,default_command:r?[...r.default_command]:[],available_models:r?.available_models?.map(e=>({id:e.id,label:e.label})),default_model:r?.default_model??void 0,description_key:n.description_key,icon:n.icon}}),c=`custom`;function l(e){if(e)return s.find(t=>t.key===e)}function u(e){let t=l(e);return t?t.display_name:null}function d(e){return l(e)?.icon??`cli-generic`}function f(e,t){return t?l(e)?.available_models?.find(e=>e.id===t)?.label??t:null}function p(e,t={}){if(e===`openhands`)return{agent_kind:`openhands`};let n=e===c,r=n?void 0:l(e);if(!n&&!r&&!t.allowUnknownServer)return null;let i=t.model===void 0?r?.default_model??null:t.model;return{agent_kind:`acp`,acp_server:e,acp_command:t.command??[],acp_args:[],acp_model:i??null}}export{l as a,d as c,p as i,a as l,s as n,u as o,n as r,f as s,c as t};
1
+ import{t as e}from"./declaration-D378OjpZ.js";import{t}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-CHrEOFl6.js";var n=`cli-generic`,r=new Set([`default`,`default (recommended)`]);function i(e){if(typeof e!=`string`)return null;let t=e.trim();return!t||r.has(t.toLowerCase())||t===`acp-managed`?null:t}function a(e){for(let t of[e.runtimeName,e.runtimeId,e.configured,e.sdkLlm]){let e=i(t);if(e)return e}return e.providerDefault??null}var o={"claude-code":{icon:`claude-code`,description_key:e.ONBOARDING$AGENT_CLAUDE_CODE_DESCRIPTION},codex:{icon:`codex`,description_key:e.ONBOARDING$AGENT_CODEX_DESCRIPTION},"gemini-cli":{icon:`gemini`,description_key:e.ONBOARDING$AGENT_GEMINI_CLI_DESCRIPTION}},s=Object.entries(o).map(([e,n])=>{let r=t(e);return{key:e,display_name:r?.display_name??e,default_command:r?[...r.default_command]:[],available_models:r?.available_models?.map(e=>({id:e.id,label:e.label})),default_model:r?.default_model??void 0,description_key:n.description_key,icon:n.icon}}),c=`custom`;function l(e){if(e)return s.find(t=>t.key===e)}function u(e){let t=l(e);return t?t.display_name:null}function d(e){return l(e)?.icon??`cli-generic`}function f(e,t){return t?l(e)?.available_models?.find(e=>e.id===t)?.label??t:null}function p(e,t={}){if(e===`openhands`)return{agent_kind:`openhands`};let n=e===c,r=n?void 0:l(e);if(!n&&!r&&!t.allowUnknownServer)return null;let i=t.model===void 0?r?.default_model??null:t.model;return{agent_kind:`acp`,acp_server:e,acp_command:t.command??[],acp_args:[],acp_model:i??null}}export{l as a,d as c,p as i,a as l,s as n,u as o,n as r,f as s,c as t};
@@ -1 +1 @@
1
- import{E as e}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{r as t}from"./query-client-config-CiK0GJJO.js";import{c as n}from"./agent-server-client-options-8OJSXbm8.js";import{a as r}from"./query-keys-tAsQcc_9.js";import{n as i}from"./use-settings-DzG0C3vO.js";async function a(){try{let a=n();if((await t.fetchQuery({queryKey:[...r.byScope(`personal`),a.backend.id,a.orgId],queryFn:()=>i(`personal`),staleTime:0}))?.agent_settings?.agent_kind===`acp`)return e(`/settings/agent`)}catch{}return null}export{a as t};
1
+ import{E as e}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{r as t}from"./query-client-config-Ba7qAAoO.js";import{c as n}from"./agent-server-client-options-DT2GP6VJ.js";import{a as r}from"./query-keys-tAsQcc_9.js";import{n as i}from"./use-settings-DQ7Oo1Hj.js";async function a(){try{let a=n();if((await t.fetchQuery({queryKey:[...r.byScope(`personal`),a.backend.id,a.orgId],queryFn:()=>i(`personal`),staleTime:0}))?.agent_settings?.agent_kind===`acp`)return e(`/settings/agent`)}catch{}return null}export{a as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-C9nuq2Dj.js";import{a as r,t as i}from"./health-store-BDC2rM-X.js";import{_ as a,d as o,f as s,h as c,l,m as u,p as d}from"./agent-server-client-options-8OJSXbm8.js";var f=e(t(),1),p=n(),m=f.createContext(null);function h(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`backend-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function g({children:e}){let t=f.useSyncExternalStore(c,s,s),n=f.useCallback((e,t)=>{let n=l()?.backendId??null,r=l()?.orgId??null,i=t??null;e===n&&i===r||d({backendId:e,orgId:i})},[]),a=f.useCallback(e=>{let t={...e,id:h()};return u([...o(),t]),d({backendId:t.id}),t},[]),g=f.useCallback((e,t)=>{let n=o().find(t=>t.id===e);u(o().map(n=>n.id===e?{...n,...t}:n));let i=t.host!==void 0&&n!==void 0&&t.host!==n.host,a=t.apiKey!==void 0&&n!==void 0&&t.apiKey!==n.apiKey;(i||a)&&r(e)},[]),_=f.useCallback(e=>{u(o().filter(t=>t.id!==e)),i(e)},[]),v=f.useMemo(()=>({backends:t.backends,active:t.active,setActive:n,addBackend:a,updateBackend:g,removeBackend:_}),[t,n,a,g,_]);return(0,p.jsx)(m.Provider,{value:v,children:e})}function _(){let e=f.useContext(m);if(!e)throw Error(`useActiveBackendContext must be used inside <ActiveBackendProvider>`);return e}function v(){let e=f.useContext(m);return e?e.active:{backend:a(),orgId:null}}export{v as n,_ as r,g as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-D378OjpZ.js";import{a as r,t as i}from"./health-store-BDC2rM-X.js";import{_ as a,d as o,f as s,h as c,l,m as u,p as d}from"./agent-server-client-options-DT2GP6VJ.js";var f=e(t(),1),p=n(),m=f.createContext(null);function h(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`backend-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function g({children:e}){let t=f.useSyncExternalStore(c,s,s),n=f.useCallback((e,t)=>{let n=l()?.backendId??null,r=l()?.orgId??null,i=t??null;e===n&&i===r||d({backendId:e,orgId:i})},[]),a=f.useCallback(e=>{let t={...e,id:h()};return u([...o(),t]),d({backendId:t.id}),t},[]),g=f.useCallback((e,t)=>{let n=o().find(t=>t.id===e);u(o().map(n=>n.id===e?{...n,...t}:n));let i=t.host!==void 0&&n!==void 0&&t.host!==n.host,a=t.apiKey!==void 0&&n!==void 0&&t.apiKey!==n.apiKey;(i||a)&&r(e)},[]),_=f.useCallback(e=>{u(o().filter(t=>t.id!==e)),i(e)},[]),v=f.useMemo(()=>({backends:t.backends,active:t.active,setActive:n,addBackend:a,updateBackend:g,removeBackend:_}),[t,n,a,g,_]);return(0,p.jsx)(m.Provider,{value:v,children:e})}function _(){let e=f.useContext(m);if(!e)throw Error(`useActiveBackendContext must be used inside <ActiveBackendProvider>`);return e}function v(){let e=f.useContext(m);return e?e.active:{backend:a(),orgId:null}}export{v as n,_ as r,g as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-BFRubm34.js";import{o as t}from"./declaration-D378OjpZ.js";import{n}from"./backend-form-modal-DxYjqqAK.js";var r=e({AddBackendModal:()=>a}),i=t();function a({onClose:e}){return(0,i.jsx)(n,{mode:`add`,onClose:e})}export{r as n,a as t};
@@ -1 +1 @@
1
- var e=`openhands-agent-server-config`,t=`workspace/project`;function n(){if(typeof window>`u`)return{};try{let t=window.localStorage.getItem(e);return t?JSON.parse(t)??{}:{}}catch{return{}}}function r(e){return e?.trim()||null}function i(e){if(!e)return null;let t=e.trim().replace(/\/$/,``);return t?/^https?:\/\//i.test(t)?t:typeof window<`u`?`${window.location.protocol}//${t}`:`http://${t}`:null}function a(){return i(n().baseUrl)||i(void 0)}function o(){return r(n().sessionApiKey)||r(void 0)}function s(e){if(typeof window>`u`)return!1;try{let t=new URL(e),n=new Set([`127.0.0.1`,`localhost`,`0.0.0.0`]),r=window.location.hostname;return n.has(t.hostname)&&!n.has(r)}catch{return!1}}function c(e){return e?s(e)?window.location.origin:e:null}function l(){return c(a())||(typeof window<`u`?window.location.origin:`http://127.0.0.1:8000`)}function u(){return o()}function d(){return(void 0)?.trim()||n().workingDir?.trim()||t}function f(e){return`${d().replace(/\/+$/,``)}/${e.replace(/-/g,``)}`}function p(){let e=u();return e?{"X-Session-API-Key":e}:{}}function m(){return!1}var h=`default-local`,g=`Local`;function _(){return{id:h,name:g,host:l(),apiKey:u()??``,kind:`local`}}var v=`openhands-backends`,y=`openhands-active-backend`;function b(e){return e===`local`||e===`cloud`}function x(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.id==`string`&&t.id.length>0&&typeof t.name==`string`&&typeof t.host==`string`&&typeof t.apiKey==`string`&&b(t.kind)}function S(e){try{return new URL(e).origin}catch{return e.replace(/\/+$/,``)}}function C(e){let t=_();return e.id!==t.id||e.kind!==`local`||!t.apiKey||S(e.host)!==S(t.host)||e.apiKey===t.apiKey?e:{...e,apiKey:t.apiKey}}function w(e){if(!(typeof window>`u`))try{window.localStorage.setItem(v,JSON.stringify(e))}catch{}}function T(){if(typeof window>`u`)return[];try{let e=window.localStorage.getItem(v);if(e===null){let e=[_()];return w(e),e}let t=JSON.parse(e);if(!Array.isArray(t))return[];let n=t.filter(x);if(n.length===0){let e=[_()];return w(e),e}let r=n.map(C);return r.some((e,t)=>e!==n[t])&&w(r),r}catch{return[]}}function E(){if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(y);if(!e)return null;let t=JSON.parse(e);if(typeof t!=`object`||!t||typeof t.backendId!=`string`)return null;let n=t.orgId;return{backendId:t.backendId,orgId:typeof n==`string`&&n.length>0?n:null}}catch{return null}}function D(e){if(!(typeof window>`u`))try{if(!e){window.localStorage.removeItem(y);return}window.localStorage.setItem(y,JSON.stringify({backendId:e.backendId,orgId:e.orgId??null}))}catch{}}function O(e){return e.find(e=>e.kind===`local`)??_()}function k(e,t){let n=null,r=null;if(t){let i=e.find(e=>e.id===t.backendId);i&&(n=i,r=t.orgId??null)}return n||(n=O(e),r=null),{backends:e,selection:t,active:{backend:n,orgId:r}}}var A=k(T(),E()),j=new Set;function M(){j.forEach(e=>e())}function N(){return A.active}function P(){let e=A.active.backend;return e.kind===`local`?e:O(A.backends)}function F(){return A.backends}function I(){return A.selection}function L(){return A}function R(e){D(e),A=k(A.backends,e),M()}function z(e){w(e);let t=A.selection;t&&!e.some(e=>e.id===t.backendId)&&(t=null,D(null)),A=k(e,t),M()}function B(e){return j.add(e),()=>{j.delete(e)}}var V=class extends Error{constructor(e,t,n,r){super(r||`HTTP ${e}: ${t}`),this.status=e,this.statusText=t,this.response=n,this.name=`HttpError`}},H=class{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,``),this.apiKey=e.apiKey,this.timeout=e.timeout||6e4}async request(e){let t=e.url.startsWith(`/`)?e.url.slice(1):e.url,n=new URL(t,this.baseUrl+`/`);e.params&&Object.entries(e.params).forEach(([e,t])=>{t!=null&&(Array.isArray(t)?t.forEach(t=>n.searchParams.append(e,String(t))):n.searchParams.append(e,String(t)))});let r={"Content-Type":`application/json`,...e.headers};this.apiKey&&(r[`X-Session-API-Key`]=this.apiKey);let i={method:e.method,headers:r,signal:AbortSignal.timeout(e.timeout||this.timeout)};e.credentials&&(i.credentials=e.credentials),e.data&&e.method!==`GET`&&(e.data instanceof FormData?(delete r[`Content-Type`],i.body=e.data):i.body=JSON.stringify(e.data));try{let t=await fetch(n.toString(),i);if(!(e.acceptableStatusCodes?.has(t.status)||!e.acceptableStatusCodes&&t.ok)){let e;try{e=t.headers.get(`content-type`)?.includes(`application/json`)?await t.json():await t.text()}catch{e=null}throw new V(t.status,t.statusText,e,`HTTP request failed (${t.status} ${t.statusText}): ${JSON.stringify(e)}`)}let r=await this.parseResponse(t,e.responseType||`auto`),a={};return t.headers.forEach((e,t)=>{a[t]=e}),{data:r,status:t.status,statusText:t.statusText,headers:a}}catch(t){throw t instanceof V?t:t instanceof Error?t.name===`AbortError`?Error(`Request timeout after ${e.timeout||this.timeout}ms`,{cause:t}):Error(`Request failed: ${t.message}`,{cause:t}):Error(`Unknown request error`,{cause:t})}}async parseResponse(e,t){return t===`json`?await e.json():t===`text`?await e.text():t===`blob`?await e.blob():t===`arrayBuffer`?await e.arrayBuffer():e.headers.get(`content-type`)?.includes(`application/json`)?await e.json():await e.text()}async get(e,t){return this.request({method:`GET`,url:e,...t})}async post(e,t,n){return this.request({method:`POST`,url:e,data:t,...n})}async put(e,t,n){return this.request({method:`PUT`,url:e,data:t,...n})}async patch(e,t,n){return this.request({method:`PATCH`,url:e,data:t,...n})}async delete(e,t){return this.request({method:`DELETE`,url:e,...t})}close(){}};function U(e){if(e&&!e.startsWith(`/`))try{let t=new URL(e),n=t.hostname,r=window.location.hostname??window.location.host?.split(`:`)[0];return r&&(n===`localhost`||n===`127.0.0.1`)&&r!==`localhost`&&r!==`127.0.0.1`?`${r}:${t.port}`:t.host}catch{return window.location.host}return window.location.host}function W(e){if(e&&!e.startsWith(`/`))try{return(new URL(e).pathname.split(`/api/conversations`)[0]||``).replace(/\/$/,``)}catch{return``}return``}function G(e){let t=U(e),n=W(e);return`${window.location.protocol===`https:`?`https:`:`http:`}//${t}${n}`}function K(e){if(!e||e.startsWith(`/`))return null;try{return new URL(e).protocol}catch{return null}}function q(e,t){let n=U(e),r=W(e),i=window.location.protocol===`https:`,a=K(e)===`https:`,o=`${i||a?`wss:`:`ws:`}//${n}${r}/sockets/bash-events`;return t?`${o}?session_api_key=${encodeURIComponent(t)}`:o}function J(e,t){if(!e)return null;let n=U(t),r=W(t),i=window.location.protocol===`https:`,a=K(t)===`https:`;return`${i||a?`wss:`:`ws:`}//${n}${r}/sockets/events/${e}`}function Y(e){return e.replace(/\/+$/,``)}function X(e,t){return e.host?Y(e.host):e.conversationUrl?Y(G(e.conversationUrl)):Y(t.host)}function Z(e={}){let t=P(),n=u(),r=t.id===`default-local`?n:null,i=e.sessionApiKey??e.apiKey??r??t.apiKey??void 0;return{host:X(e,t),...i?{apiKey:i}:{},workingDir:e.workingDir??d(),...e.timeout===void 0?{}:{timeout:e.timeout}}}function Q(e){let{host:t,apiKey:n,timeout:r}=Z(e);return{baseUrl:t,...n?{apiKey:n}:{},timeout:r??6e4}}export{m as C,d as S,_,J as a,p as b,N as c,F as d,L as f,h as g,B as h,G as i,I as l,z as m,Q as n,H as o,R as p,q as r,V as s,Z as t,P as u,t as v,u as x,f as y};
1
+ var e=`openhands-agent-server-config`,t=`workspace/project`;function n(){if(typeof window>`u`)return{};try{let t=window.localStorage.getItem(e);return t?JSON.parse(t)??{}:{}}catch{return{}}}function r(e){return e?.trim()||null}function i(e){if(!e)return null;let t=e.trim().replace(/\/$/,``);return t?/^https?:\/\//i.test(t)?t:typeof window<`u`?`${window.location.protocol}//${t}`:`http://${t}`:null}function a(){return i(n().baseUrl)||i(void 0)}function o(){return r(n().sessionApiKey)||r(void 0)}function s(e){if(typeof window>`u`)return!1;try{let t=new URL(e),n=new Set([`127.0.0.1`,`localhost`,`0.0.0.0`]),r=window.location.hostname;return n.has(t.hostname)&&!n.has(r)}catch{return!1}}function c(e){return e?s(e)?window.location.origin:e:null}function l(){return c(a())||(typeof window<`u`?window.location.origin:`http://127.0.0.1:8000`)}function u(){return o()}function d(){return(void 0)?.trim()||n().workingDir?.trim()||t}function f(e){return`${d().replace(/\/+$/,``)}/${e.replace(/-/g,``)}`}function p(){let e=u();return e?{"X-Session-API-Key":e}:{}}function m(){return!0}var h=`default-local`,g=`Local`;function _(){return{id:h,name:g,host:l(),apiKey:u()??``,kind:`local`}}var v=`openhands-backends`,y=`openhands-active-backend`;function b(e){return e===`local`||e===`cloud`}function x(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.id==`string`&&t.id.length>0&&typeof t.name==`string`&&typeof t.host==`string`&&typeof t.apiKey==`string`&&b(t.kind)}function S(e){try{return new URL(e).origin}catch{return e.replace(/\/+$/,``)}}function C(e){let t=_();return e.id!==t.id||e.kind!==`local`||!t.apiKey||S(e.host)!==S(t.host)||e.apiKey===t.apiKey?e:{...e,apiKey:t.apiKey}}function w(e){if(!(typeof window>`u`))try{window.localStorage.setItem(v,JSON.stringify(e))}catch{}}function T(){if(typeof window>`u`)return[];try{let e=window.localStorage.getItem(v);if(e===null){let e=[_()];return w(e),e}let t=JSON.parse(e);if(!Array.isArray(t))return[];let n=t.filter(x);if(n.length===0){let e=[_()];return w(e),e}let r=n.map(C);return r.some((e,t)=>e!==n[t])&&w(r),r}catch{return[]}}function E(){if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(y);if(!e)return null;let t=JSON.parse(e);if(typeof t!=`object`||!t||typeof t.backendId!=`string`)return null;let n=t.orgId;return{backendId:t.backendId,orgId:typeof n==`string`&&n.length>0?n:null}}catch{return null}}function D(e){if(!(typeof window>`u`))try{if(!e){window.localStorage.removeItem(y);return}window.localStorage.setItem(y,JSON.stringify({backendId:e.backendId,orgId:e.orgId??null}))}catch{}}function O(e){return e.find(e=>e.kind===`local`)??_()}function k(e,t){let n=null,r=null;if(t){let i=e.find(e=>e.id===t.backendId);i&&(n=i,r=t.orgId??null)}return n||(n=O(e),r=null),{backends:e,selection:t,active:{backend:n,orgId:r}}}var A=k(T(),E()),j=new Set;function M(){j.forEach(e=>e())}function N(){return A.active}function P(){let e=A.active.backend;return e.kind===`local`?e:O(A.backends)}function F(){return A.backends}function I(){return A.selection}function L(){return A}function R(e){D(e),A=k(A.backends,e),M()}function z(e){w(e);let t=A.selection;t&&!e.some(e=>e.id===t.backendId)&&(t=null,D(null)),A=k(e,t),M()}function B(e){return j.add(e),()=>{j.delete(e)}}var V=class extends Error{constructor(e,t,n,r){super(r||`HTTP ${e}: ${t}`),this.status=e,this.statusText=t,this.response=n,this.name=`HttpError`}},H=class{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,``),this.apiKey=e.apiKey,this.timeout=e.timeout||6e4}async request(e){let t=e.url.startsWith(`/`)?e.url.slice(1):e.url,n=new URL(t,this.baseUrl+`/`);e.params&&Object.entries(e.params).forEach(([e,t])=>{t!=null&&(Array.isArray(t)?t.forEach(t=>n.searchParams.append(e,String(t))):n.searchParams.append(e,String(t)))});let r={"Content-Type":`application/json`,...e.headers};this.apiKey&&(r[`X-Session-API-Key`]=this.apiKey);let i={method:e.method,headers:r,signal:AbortSignal.timeout(e.timeout||this.timeout)};e.credentials&&(i.credentials=e.credentials),e.data&&e.method!==`GET`&&(e.data instanceof FormData?(delete r[`Content-Type`],i.body=e.data):i.body=JSON.stringify(e.data));try{let t=await fetch(n.toString(),i);if(!(e.acceptableStatusCodes?.has(t.status)||!e.acceptableStatusCodes&&t.ok)){let e;try{e=t.headers.get(`content-type`)?.includes(`application/json`)?await t.json():await t.text()}catch{e=null}throw new V(t.status,t.statusText,e,`HTTP request failed (${t.status} ${t.statusText}): ${JSON.stringify(e)}`)}let r=await this.parseResponse(t,e.responseType||`auto`),a={};return t.headers.forEach((e,t)=>{a[t]=e}),{data:r,status:t.status,statusText:t.statusText,headers:a}}catch(t){throw t instanceof V?t:t instanceof Error?t.name===`AbortError`?Error(`Request timeout after ${e.timeout||this.timeout}ms`,{cause:t}):Error(`Request failed: ${t.message}`,{cause:t}):Error(`Unknown request error`,{cause:t})}}async parseResponse(e,t){return t===`json`?await e.json():t===`text`?await e.text():t===`blob`?await e.blob():t===`arrayBuffer`?await e.arrayBuffer():e.headers.get(`content-type`)?.includes(`application/json`)?await e.json():await e.text()}async get(e,t){return this.request({method:`GET`,url:e,...t})}async post(e,t,n){return this.request({method:`POST`,url:e,data:t,...n})}async put(e,t,n){return this.request({method:`PUT`,url:e,data:t,...n})}async patch(e,t,n){return this.request({method:`PATCH`,url:e,data:t,...n})}async delete(e,t){return this.request({method:`DELETE`,url:e,...t})}close(){}};function U(e){if(e&&!e.startsWith(`/`))try{let t=new URL(e),n=t.hostname,r=window.location.hostname??window.location.host?.split(`:`)[0];return r&&(n===`localhost`||n===`127.0.0.1`)&&r!==`localhost`&&r!==`127.0.0.1`?`${r}:${t.port}`:t.host}catch{return window.location.host}return window.location.host}function W(e){if(e&&!e.startsWith(`/`))try{return(new URL(e).pathname.split(`/api/conversations`)[0]||``).replace(/\/$/,``)}catch{return``}return``}function G(e){let t=U(e),n=W(e);return`${window.location.protocol===`https:`?`https:`:`http:`}//${t}${n}`}function K(e){if(!e||e.startsWith(`/`))return null;try{return new URL(e).protocol}catch{return null}}function q(e,t){let n=U(e),r=W(e),i=window.location.protocol===`https:`,a=K(e)===`https:`,o=`${i||a?`wss:`:`ws:`}//${n}${r}/sockets/bash-events`;return t?`${o}?session_api_key=${encodeURIComponent(t)}`:o}function J(e,t){if(!e)return null;let n=U(t),r=W(t),i=window.location.protocol===`https:`,a=K(t)===`https:`;return`${i||a?`wss:`:`ws:`}//${n}${r}/sockets/events/${e}`}function Y(e){return e.replace(/\/+$/,``)}function X(e,t){return e.host?Y(e.host):e.conversationUrl?Y(G(e.conversationUrl)):Y(t.host)}function Z(e={}){let t=P(),n=u(),r=t.id===`default-local`?n:null,i=e.sessionApiKey??e.apiKey??r??t.apiKey??void 0;return{host:X(e,t),...i?{apiKey:i}:{},workingDir:e.workingDir??d(),...e.timeout===void 0?{}:{timeout:e.timeout}}}function Q(e){let{host:t,apiKey:n,timeout:r}=Z(e);return{baseUrl:t,...n?{apiKey:n}:{},timeout:r??6e4}}export{m as C,d as S,_,J as a,p as b,N as c,F as d,L as f,h as g,B as h,G as i,I as l,z as m,Q as n,H as o,R as p,q as r,V as s,Z as t,P as u,t as v,u as x,f as y};
@@ -1 +1 @@
1
- import{t as e,u as t}from"./agent-server-client-options-8OJSXbm8.js";import{t as n}from"./server-client-CG1zHqph.js";var r=5e3,i=null,a=e=>Array.isArray(e?.usable_tools)?e.usable_tools:null,o=class extends Error{details;constructor(e){super(`Agent server not found. Could not connect to the configured agent server. Start a compatible agent server and reload the page.`),this.name=`AgentServerUnavailableError`,this.details=e??null}},s=e=>e instanceof o||typeof e==`object`&&!!e&&`name`in e&&e.name===`AgentServerUnavailableError`;function c(){i=null}function l(e){let t=a(i);return Array.isArray(t)?t.includes(e):!0}function u(e){return e instanceof Error&&e.name===`HttpError`&&`status`in e&&typeof e.status==`number`}async function d(){let a=t(),s;try{s=await new n(e({host:a.host,sessionApiKey:a.apiKey||null,timeout:r})).getServerInfo()}catch(e){throw c(),u(e)?e:new o(e instanceof Error?e.message:null)}return i=s,s}export{s as n,d as r,l as t};
1
+ import{t as e,u as t}from"./agent-server-client-options-DT2GP6VJ.js";import{t as n}from"./server-client-C3mC8Hl3.js";var r=5e3,i=null,a=e=>Array.isArray(e?.usable_tools)?e.usable_tools:null,o=class extends Error{details;constructor(e){super(`Agent server not found. Could not connect to the configured agent server. Start a compatible agent server and reload the page.`),this.name=`AgentServerUnavailableError`,this.details=e??null}},s=e=>e instanceof o||typeof e==`object`&&!!e&&`name`in e&&e.name===`AgentServerUnavailableError`;function c(){i=null}function l(e){let t=a(i);return Array.isArray(t)?t.includes(e):!0}function u(e){return e instanceof Error&&e.name===`HttpError`&&`status`in e&&typeof e.status==`number`}async function d(){let a=t(),s;try{s=await new n(e({host:a.host,sessionApiKey:a.apiKey||null,timeout:r})).getServerInfo()}catch(e){throw c(),u(e)?e:new o(e instanceof Error?e.message:null)}return i=s,s}export{s as n,d as r,l as t};
@@ -0,0 +1,5 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/secrets-service-Bwd5DeUs.js","assets/rolldown-runtime-BFRubm34.js","assets/agent-server-client-options-DT2GP6VJ.js","assets/settings-client-CwjfwoiB.js","assets/proxy-CurRmrqf.js","assets/vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-zhv9fooy.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./preload-helper-CT1Z6Pdu.js";import{C as t,S as n,c as r,i,o as a,s as o,t as s,u as c,y as l}from"./agent-server-client-options-DT2GP6VJ.js";import{n as u,s as d,u as f}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-CHrEOFl6.js";import{t as p}from"./profiles-client-BGkKEV9j.js";import{t as m}from"./agent-server-compatibility-2aOx5iWd.js";import{n as h,t as g}from"./proxy-CurRmrqf.js";import{t as _}from"./settings-D5am1n6X.js";import{t as ee}from"./common-SMkEaBSr.js";import{a as v,l as y}from"./acp-providers-DauuOsW9.js";import{t as b}from"./settings-service.api-FvJGK45W.js";var x=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new a({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async createConversation(e){return(await this.client.post(`/api/conversations`,e)).data}async searchConversations(e={}){return(await this.client.get(`/api/conversations/search`,{params:e})).data}async countConversations(e={}){return(await this.client.get(`/api/conversations/count`,{params:e})).data}async getConversations(e){return(await this.client.get(`/api/conversations`,{params:{ids:e}})).data}async getConversation(e){return(await this.client.get(`/api/conversations/${e}`)).data}async searchEvents(e,t={}){return(await this.client.get(`/api/conversations/${e}/events/search`,{params:t})).data}async getEvent(e,t){return(await this.client.get(`/api/conversations/${e}/events/${t}`)).data}async getEvents(e,t){return Promise.all(t.map(async t=>{try{return await this.getEvent(e,t)}catch(e){if(e instanceof o&&e.status===404)return null;throw e}}))}async sendEvent(e,t,n={}){await this.client.post(`/api/conversations/${e}/events`,{...t,...n.run===void 0?{}:{run:n.run}})}async pauseConversation(e){return(await this.client.post(`/api/conversations/${e}/pause`,{})).data}async interruptConversation(e){return(await this.client.post(`/api/conversations/${e}/interrupt`,{})).data}async runConversation(e){return(await this.client.post(`/api/conversations/${e}/run`,{})).data}async askAgent(e,t){return(await this.client.post(`/api/conversations/${e}/ask_agent`,{question:t})).data}async getEventCount(e,t={}){return(await this.client.get(`/api/conversations/${e}/events/count`,{params:t})).data}async respondToConfirmation(e,t){return(await this.client.post(`/api/conversations/${e}/events/respond_to_confirmation`,t)).data}async getAgentFinalResponse(e){return(await this.client.get(`/api/conversations/${e}/agent_final_response`)).data}async setConfirmationPolicy(e,t){let n=`policy`in t?t:{policy:t};return(await this.client.post(`/api/conversations/${e}/confirmation_policy`,n)).data}async condenseConversation(e){return(await this.client.post(`/api/conversations/${e}/condense`,{})).data}async setSecurityAnalyzer(e,t){let n=te(t)?t:{security_analyzer:t};return(await this.client.post(`/api/conversations/${e}/security_analyzer`,n)).data}async updateSecrets(e,t){return(await this.client.post(`/api/conversations/${e}/secrets`,t)).data}async forkConversation(e,t={},n={}){return(await this.client.post(`/api/conversations/${e}/fork`,t,{params:n.includeSkills===void 0?void 0:{include_skills:n.includeSkills}})).data}async switchProfile(e,t){await this.client.post(`/api/conversations/${e}/switch_profile`,{profile_name:t})}async switchLLM(e,t){await this.client.post(`/api/conversations/${e}/switch_llm`,{llm:t})}async switchAcpModel(e,t){await this.client.post(`/api/conversations/${e}/switch_acp_model`,{model:t})}async deleteConversation(e){await this.client.delete(`/api/conversations/${e}`)}async updateConversation(e,t){return(await this.client.patch(`/api/conversations/${e}`,t)).data}close(){this.client.close()}};function te(e){return typeof e==`object`&&!!e&&`security_analyzer`in e}var S=[];for(let e=0;e<256;++e)S.push((e+256).toString(16).slice(1));function ne(e,t=0){return(S[e[t+0]]+S[e[t+1]]+S[e[t+2]]+S[e[t+3]]+`-`+S[e[t+4]]+S[e[t+5]]+`-`+S[e[t+6]]+S[e[t+7]]+`-`+S[e[t+8]]+S[e[t+9]]+`-`+S[e[t+10]]+S[e[t+11]]+S[e[t+12]]+S[e[t+13]]+S[e[t+14]]+S[e[t+15]]).toLowerCase()}var re=new Uint8Array(16);function ie(){return crypto.getRandomValues(re)}function ae(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():oe(e,t,n)}function oe(e,t,n){e||={};let r=e.random??e.rng?.()??ie();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return ne(r)}var C=`openhands-agent-server-conversation-metadata`,w=()=>{if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(C);if(!e)return{};let t=JSON.parse(e);return!t||typeof t!=`object`?{}:t}catch{return{}}},T=e=>{if(!(typeof window>`u`)){if(Object.keys(e).length===0){window.localStorage.removeItem(C);return}window.localStorage.setItem(C,JSON.stringify(e))}},E=e=>w()[e]??null,D=(e,t)=>{let n=w();n[e]=t,T(n)},O=e=>{let t=w();e in t&&(delete t[e],T(t))};function k(e){if(!e?.id)return e;let t=E(e.id);return t?{...e,selected_repository:e.selected_repository??t.selected_repository??null,selected_branch:e.selected_branch??t.selected_branch??null,git_provider:e.git_provider??t.git_provider??null,selected_workspace:e.selected_workspace??t.selected_workspace??null}:e}function A(){let e=r().backend;if(e.kind!==`cloud`)throw Error(`Cloud conversations call requires a cloud backend.`);return e}async function se(e=20,t){let n=A(),r=new URLSearchParams;r.set(`limit`,String(e)),t&&r.set(`page_id`,t),r.set(`sort_order`,`UPDATED_AT_DESC`);let i=await g({backend:n,method:`GET`,path:`/api/v1/app-conversations/search?${r.toString()}`});return{items:(i?.items??[]).map(e=>k(e)),next_page_id:i?.next_page_id??null}}async function j(e){if(e.length===0)return[];let t=A(),n=new URLSearchParams;for(let t of e)n.append(`ids`,t);return(await g({backend:t,method:`GET`,path:`/api/v1/app-conversations?${n.toString()}`})??[]).map(k)}async function ce(e){return await g({backend:A(),method:`POST`,path:`/api/v1/app-conversations`,body:e})}async function le(e){return g({backend:A(),method:`GET`,path:`/api/v1/app-conversations/${e}/download`,responseType:`blob`})}async function ue(e){await g({backend:A(),method:`DELETE`,path:`/api/v1/app-conversations/${e}`})}async function de(e,t){return await g({backend:A(),method:`PATCH`,path:`/api/v1/app-conversations/${e}`,body:{public:t}})}async function fe(e){await g({backend:A(),method:`POST`,path:`/api/v1/sandboxes/${e}/pause`})}async function pe(e){await g({backend:A(),method:`POST`,path:`/api/v1/sandboxes/${e}/resume`})}async function me(e,t){let n=A(),r=new URLSearchParams;return r.append(`file_path`,t),await g({backend:n,method:`GET`,path:`/api/v1/app-conversations/${e}/file?${r.toString()}`})??``}async function he(e){let t=A(),n=new URLSearchParams;return n.set(`ids`,e),(await g({backend:t,method:`GET`,path:`/api/v1/app-conversations/start-tasks?${n.toString()}`}))?.[0]??null}var M=`canvas_ui`,ge=`canvas_ui_tool`,_e=[`terminal`,`file_editor`,`task_tracker`,M],N=`browser_tool_set`,P=`task_tool_set`;function ve(){return!0}function ye(){let e=(void 0)?.trim();if(!e)return null;try{let t=JSON.parse(e);return!t||typeof t!=`object`?null:t}catch{return null}}function be(){let e=ye();if(!e?.services)return;let t=[];t.push(`<RUNTIME_SERVICES>`),e.mode?t.push(`You are running inside an agent-canvas dev stack started in '${e.mode}' mode.`):t.push(`You are running inside an agent-canvas dev stack.`),t.push(`The following services are reachable from your sandbox. URLs are written`,`from your point of view (i.e., as you should curl/fetch them).`,``);let{agent_server:n,ingress:r,automation:i}=e.services,a=e.services.frontend??e.services.vite;n?.url_from_agent&&t.push(`* Agent Server (you): ${n.url_from_agent}`,` ${n.description??`The agent-server hosting your tool calls.`}`),r?.url_from_agent&&t.push(`* Ingress: ${r.url_from_agent}`,` ${r.description??`Unified entry point for browser-facing traffic.`}`),a?.url_from_agent&&t.push(`* Frontend: ${a.url_from_agent}`,` ${a.description??`Frontend dev server.`}`),i?.url_from_agent?(t.push(`* Automation backend: ${i.url_from_agent}`,` ${i.description??`OpenHands Automations service.`}`),i.docs_url&&t.push(` Docs: ${i.docs_url}`),i.openapi_url&&t.push(` OpenAPI: ${i.openapi_url}`),i.auth_env_var&&t.push(` Auth: header 'X-API-Key: $${i.auth_env_var}'`)):t.push(`* Automation backend: not running in this dev mode (skip /api/automation calls).`);let o=n?.url_from_agent;return t.push(``,`Trust this block over guessing: do not assume any other URLs are running.`),o&&t.push(`In particular, ${o} inside your sandbox is the Agent Server`,`you are running inside of — NOT the automation backend.`),t.push(`</RUNTIME_SERVICES>`),t.join(`
3
+ `)}function xe(e){let{host:t}=s();return`${t}/api/conversations/${e}`}function F(e){return`Conversation ${e.slice(0,5)}`}function I(e){let t=E(e.id),r=e.agent?.kind===`ACPAgent`,i=r?e.tags?.acpserver??null:null;return{id:e.id,created_by_user_id:null,selected_repository:t?.selected_repository??null,selected_branch:t?.selected_branch??null,git_provider:t?.git_provider??null,selected_workspace:t?.selected_workspace??null,title:e.title?.trim()?e.title:F(e.id),trigger:null,pr_number:[],agent_kind:r?`acp`:`openhands`,acp_server:i,llm_model:r?y({runtimeName:e.current_model_name,runtimeId:e.current_model_id,configured:e.agent?.acp_model,sdkLlm:e.agent?.llm?.model}):e.agent?.llm?.model??_.llm_model,metrics:e.metrics?{accumulated_cost:e.metrics.accumulated_cost??null,max_budget_per_task:e.metrics.max_budget_per_task??null,accumulated_token_usage:e.metrics.accumulated_token_usage?{prompt_tokens:e.metrics.accumulated_token_usage.prompt_tokens??0,completion_tokens:e.metrics.accumulated_token_usage.completion_tokens??0,cache_read_tokens:e.metrics.accumulated_token_usage.cache_read_tokens??0,cache_write_tokens:e.metrics.accumulated_token_usage.cache_write_tokens??0,context_window:e.metrics.accumulated_token_usage.context_window??0,per_turn_token:e.metrics.accumulated_token_usage.per_turn_token??0}:null}:null,created_at:e.created_at,updated_at:e.updated_at,execution_status:e.execution_status??ee.IDLE,sandbox_status:e.sandbox_status??null,conversation_url:xe(e.id),session_api_key:s().apiKey??null,sandbox_id:null,workspace:{working_dir:e.workspace?.working_dir??n()},public:!1,sub_conversation_ids:[]}}function Se(e){return{items:e.items.map(I),next_page_id:e.next_page_id??null}}var L=[`acp_command`,`acp_args`,`acp_env`,`acp_model`,`acp_session_mode`,`acp_prompt_timeout`],Ce=`acpserver`,we=new Set([`schema_version`,`agent_settings`,`workspace`,`conversation_id`,`initial_message`,`plugins`]);function R(e){return!e||typeof e!=`object`||Array.isArray(e)?{}:structuredClone(e)}function z(e){if(typeof e!=`string`)return;let t=e.trim();return t.length>0?t:void 0}function Te(e){return e.confirmation_mode===!0?e.security_analyzer===`llm`?{kind:`ConfirmRisky`,threshold:`HIGH`,confirm_unknown:!0}:{kind:`AlwaysConfirm`}:{kind:`NeverConfirm`}}function Ee(e){switch(e.security_analyzer){case`llm`:return{kind:`LLMSecurityAnalyzer`};case`pattern`:return{kind:`PatternSecurityAnalyzer`};case`policy_rail`:return{kind:`PolicyRailSecurityAnalyzer`};default:return}}function De(e){return!!e&&typeof e==`object`&&!Array.isArray(e)&&typeof e.name==`string`}function B(e,t){return e===N?ve()&&m(e):e===P?t.enable_sub_agents===!0&&m(e):!0}function Oe(e){let t=new Map;for(let e of _e)t.set(e,{name:e,params:{}});for(let n of[N,P])B(n,e)&&t.set(n,{name:n,params:{}});let n=e.tools;if(Array.isArray(n)&&n.every(e=>De(e)))for(let r of n)B(r.name,e)&&t.set(r.name,{name:r.name,params:R(r.params)});return Array.from(t.values())}function ke(e,t){let n=[e?.trim(),t?.trim()].filter(Boolean);return n.length===0?null:{role:`user`,content:[{type:`text`,text:n.join(`
4
+
5
+ `)}],run:!0}}function V(e){let n=be();return{...R(e.agent_context),load_public_skills:t(),load_user_skills:!0,load_project_skills:!0,...n?{system_message_suffix:n}:{}}}function H(e){return R(e.agent_settings).agent_kind===`acp`}function Ae(e){let t=R(e.agent_settings).acp_server;return typeof t==`string`&&t.length>0?t:void 0}function je(e){let t=e.acp_command;if(!(Array.isArray(t)&&t.length===0)&&t!==void 0)return t;let n=v(typeof e.acp_server==`string`?e.acp_server:void 0);return n?[...n.default_command]:t}function Me(e){let t=R(e.agent_settings),n={agent_kind:`acp`,agent_context:V(t)};for(let e of L){if(e===`acp_model`)continue;let r=e===`acp_command`?je(t):t[e];r!=null&&(n[e]=r)}let r=v(typeof t.acp_server==`string`?t.acp_server:void 0),i=y({configured:t.acp_model,providerDefault:r?.default_model});return i&&(n.acp_model=i),n}function Ne(e){let t=R(e.agent_settings),n=R(t.llm);n.model=typeof n.model==`string`?n.model:_.llm_model;let r=z(n.api_key);r?n.api_key=r:delete n.api_key;let i=z(n.base_url);i?n.base_url=i:delete n.base_url;let a=R(t.mcp_config);(Object.keys(a).length===0||!(`mcpServers`in a))&&delete t.mcp_config,delete t.acp_server;for(let e of L)delete t[e];return{...t,llm:n,agent_context:V(t),tools:Oe(t)}}function Pe(e){return H(e)?Me(e):Ne(e)}function Fe(e){let{settings:t,query:r,conversationInstructions:i,plugins:a,workingDir:o}=e,s=R(t.conversation_settings),c=ke(r,i);return we.forEach(e=>delete s[e]),{...s,workspace:{kind:`LocalWorkspace`,working_dir:o??n()},...c?{initial_message:c}:{},...a?.length?{plugins:a.map(e=>({source:e.source,...e.ref?{ref:e.ref}:{},...e.repo_path?{repo_path:e.repo_path}:{}}))}:{}}}function Ie(e){let t=e.encryptedAgentSettings?{...e.settings,agent_settings:e.encryptedAgentSettings}:e.settings,n=H(t),r=Pe(t),i=n?Ae(t):void 0,a=Fe(e.encryptedConversationSettings?{...e,settings:{...e.settings,conversation_settings:e.encryptedConversationSettings}}:e),o={agent_settings:r,workspace:a.workspace,confirmation_policy:Te(a),max_iterations:typeof a.max_iterations==`number`?a.max_iterations:500,stuck_detection:!0,autotitle:!0,worktree:!0};i&&(o.tags={[Ce]:i}),e.secretsEncrypted&&(o.secrets_encrypted=!0),e.conversationId&&(o.conversation_id=e.conversationId);let s=Ee(a);if(s&&(o.security_analyzer=s),a.initial_message&&(o.initial_message=a.initial_message),a.plugins&&(o.plugins=a.plugins),a.hook_config&&(o.hook_config=a.hook_config),o.tool_module_qualnames={[M]:ge,...a.tool_module_qualnames??{}},a.agent_definitions&&(o.agent_definitions=a.agent_definitions),e.customSecrets&&e.customSecrets.length>0){let t=h(c()),r={};for(let n of e.customSecrets){let e={kind:`LookupSecret`,url:`/api/settings/secrets/${encodeURIComponent(n.name)}`,description:n.description};Object.keys(t).length>0&&(e.headers=t),r[n.name]=e}o.secrets=r,n&&(o.agent_settings.agent_context={...o.agent_settings.agent_context,secrets:r})}return o}async function Le(t){let{SecretsService:n}=await e(async()=>{let{SecretsService:e}=await import(`./secrets-service-Bwd5DeUs.js`).then(e=>e.n);return{SecretsService:e}},__vite__mapDeps([0,1,2,3,4,5])),[r,i]=await Promise.all([b.getSettingsForConversation(),n.getSecrets()]),{agentSettings:a,conversationSettings:o,secretsEncrypted:s}=r;return Ie({...t,encryptedAgentSettings:a,encryptedConversationSettings:o,secretsEncrypted:s,customSecrets:i})}function Re(){return{hooks:[]}}var ze=`1970-01-01T00:00:00.000Z`,Be=`Unable to load conversations because the selected agent server returned data this UI does not understand. Check the backend URL/session key and update the agent server if needed.`,Ve=`Unable to switch LLM profiles because the selected agent server returned profile data this UI does not understand. Check the backend URL/session key and update the agent server if needed.`;function U(){return Error(Be)}function W(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function He(e){return W(e)&&typeof e.model==`string`}function G(e){return typeof e==`number`?e:null}function K(e){return typeof e==`number`?e:0}function q(e){return typeof e==`string`?e:null}function J(e,t,n){let r=e[t]??e[n];return typeof r==`string`&&r.trim()?r:ze}function Ue(e){return W(e)?{prompt_tokens:K(e.prompt_tokens),completion_tokens:K(e.completion_tokens),cache_read_tokens:K(e.cache_read_tokens),cache_write_tokens:K(e.cache_write_tokens),context_window:K(e.context_window),per_turn_token:K(e.per_turn_token)}:null}function Y(e){return W(e)?{accumulated_cost:G(e.accumulated_cost),max_budget_per_task:G(e.max_budget_per_task),accumulated_token_usage:Ue(e.accumulated_token_usage)}:null}function We(e){if(!W(e))return null;let t=W(e.llm)?{model:q(e.llm.model)}:null;return{kind:q(e.kind),acp_model:q(e.acp_model),llm:t}}function Ge(e){return W(e)?{working_dir:q(e.working_dir)}:null}function Ke(e){if(!W(e))return null;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&(t[n]=r);return t}function X(e){if(!e.startsWith(`/`))return null;let t=[];for(let n of e.split(`/`))if(n&&n!==`.`)if(n===`..`){if(!t.length)return null;t.pop()}else t.push(n);return`/${t.join(`/`)}`}function Z(e,t){let n=X(e),r=X(t);if(!n||!r||n!==r&&!n.startsWith(`${r}/`))throw Error(`Conversation file path must stay inside the workspace`);return n}function Q(e){if(!W(e)||typeof e.id!=`string`||!e.id.trim())throw U();return{id:e.id.trim(),title:q(e.title),created_at:J(e,`created_at`,`createdAt`),updated_at:J(e,`updated_at`,`updatedAt`),execution_status:q(e.execution_status),sandbox_status:q(e.sandbox_status),metrics:Y(e.metrics),agent:We(e.agent),workspace:Ge(e.workspace),tags:Ke(e.tags),current_model_id:q(e.current_model_id),current_model_name:q(e.current_model_name)}}function $(e){if(!Array.isArray(e))throw U();return e.map(Q)}function qe(e){if(Array.isArray(e))return{items:$(e),next_page_id:null};if(!W(e))throw U();return{items:$(e.items),next_page_id:typeof e.next_page_id==`string`?e.next_page_id:null}}var Je=new Set([`idle`,`running`,`paused`,`waiting_for_confirmation`,`finished`,`error`,`stuck`]);function Ye(e){let t=e??`idle`;return Je.has(t)?t:`idle`}function Xe(e,t){if(!e)throw Error(`Conversation ${t} was not found`);return e}var Ze=class{static async sendMessage(e,t,n){let a=r().backend,o=n?.conversationUrl??null,c=n?.sessionApiKey??null;if(a.kind===`cloud`){if(!o||!c){let[t]=await j([e]);o=t?.conversation_url?.trim()??null,c=t?.session_api_key?.trim()??null}if(!o||!c)throw Error(`Conversation sandbox is still starting. Wait for it to finish, then try again.`);return await g({backend:a,method:`POST`,hostOverride:i(o),path:`/api/conversations/${e}/events`,body:{...t,run:!0},authMode:`session-api-key`,sessionApiKey:c}),t}return await new x(s({conversationUrl:o,sessionApiKey:c})).sendEvent(e,t,{run:!0}),t}static async createConversation(e,t,n,i,a,o,u,d){if(r().backend.kind===`cloud`)return ce({initial_message:e?{role:`user`,content:[{type:`text`,text:e}]}:null,title:t??null,selected_repository:i?.selected_repository??null,selected_branch:i?.selected_branch??null,git_provider:i?.git_provider??null,plugins:n??null,parent_conversation_id:o??null,agent_type:u,sandbox_id:d??null});let f=await b.getSettings(),p=ae(),m=await Le({settings:f,query:e,conversationInstructions:t,plugins:n,conversationId:p,workingDir:a??l(p)}),h=await new x(s()).createConversation(m);return(i?.selected_repository||a)&&D(h.id,{selected_repository:i?.selected_repository??null,selected_branch:i?.selected_branch??null,git_provider:i?.git_provider??null,selected_workspace:a??null}),{id:h.id,created_by_user_id:null,status:`READY`,detail:null,app_conversation_id:h.id,agent_server_url:c().host,request:{initial_message:m.initial_message,plugins:n??null},created_at:h.created_at,updated_at:h.updated_at}}static async getStartTask(e){return r().backend.kind===`cloud`?he(e):null}static async getVSCodeUrl(e,t,n){let r=await this.resolveConversationWorkingDir(e);return{vscode_url:await new d(s({conversationUrl:t,sessionApiKey:n})).getUrl({baseUrl:typeof window<`u`?window.location.origin:void 0,workspaceDir:r})}}static async resolveConversationWorkingDir(e){let[t]=await this.batchGetAppConversations([e]);return t?.workspace?.working_dir??n()}static async batchGetAppConversations(e){return e.length===0?[]:r().backend.kind===`cloud`?j(e):$(await new x(s()).getConversations(e)).map(e=>I(e))}static async updateConversationPublicFlag(e,t){if(r().backend.kind!==`cloud`)throw Error(`Public sharing requires a cloud backend.`);return de(e,t)}static async updateConversationRepository(e,t,n,r){t?D(e,{...E(e)??{},selected_repository:t,selected_branch:n??null,git_provider:r??null}):O(e);let[i]=await this.batchGetAppConversations([e]);return Xe(i,e)}static async readConversationFile(e,t){if(r().backend.kind===`cloud`)return me(e,Z(t??`/workspace/project/.agents_tmp/PLAN.md`,`/workspace/project`));let n=await this.resolveConversationWorkingDir(e),i=Z(t??`${n}/.agents_tmp/PLAN.md`,n);return new f(s()).downloadTextFile(i)}static async downloadConversation(e){return r().backend.kind===`cloud`?le(e):new f(s()).downloadTrajectory(e)}static async getHooks(e){return Re()}static async getRuntimeConversation(e,t,n){let a=r().backend,o=a.kind===`cloud`&&t?await g({backend:a,method:`GET`,hostOverride:i(t),path:`/api/conversations/${e}`,authMode:`session-api-key`,sessionApiKey:n}):await new x(s({conversationUrl:t,sessionApiKey:n})).getConversation(e),c=Q(o),l=W(o)?o.stats:null;return{id:c.id,title:c.title?.trim()?c.title:F(c.id),metrics:Y(c.metrics),created_at:c.created_at,updated_at:c.updated_at,status:Ye(c.execution_status),stats:W(l)?l:{usage_to_metrics:{}}}}static async searchConversations(e=20,t){return r().backend.kind===`cloud`?se(e,t):Se(qe(await new x(s()).searchConversations({limit:e,page_id:t,sort_order:u.UPDATED_AT_DESC})))}static async deleteConversation(e){r().backend.kind===`cloud`?await ue(e):await new x(s()).deleteConversation(e),O(e)}static async updateConversationTitle(e,t){await new x(s()).updateConversation(e,{title:t});let[n]=await this.batchGetAppConversations([e]);return Xe(n,e)}static async switchProfile(e,t){if(r().backend.kind===`cloud`)throw Error(`LLM profile switching is only supported for local agent-server backends.`);let n=new p(s());if(!e){await n.activateProfile(t);return}let i=await n.getProfile(t,{exposeSecrets:`encrypted`});if(!He(i.config))throw Error(Ve);await new x(s()).switchLLM(e,i.config)}static async switchAcpModel(e,t){if(r().backend.kind===`cloud`)throw Error(`ACP model switching is only supported for local agent-server backends.`);await new x(s()).switchAcpModel(e,t)}};export{E as a,pe as i,j as n,ae as o,fe as r,x as s,Ze as t};
@@ -1,2 +1,2 @@
1
- import{a as e,t}from"./rolldown-runtime-BFRubm34.js";import{t as n}from"./react-CM_dJw1Z.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{o as i,t as a}from"./declaration-C9nuq2Dj.js";import{t as o}from"./useTranslation-01pF7z10.js";import{t as s}from"./retrieve-axios-error-message-BY-yIkIq.js";import{n as c,r as l}from"./custom-toast-handlers-BYxhSr3t.js";import{t as u}from"./utils-Czcl6buL.js";import{t as d}from"./brand-button-8fVVei4i.js";import{t as f}from"./settings-input-BWCZt9g2.js";import{a as p,i as m,n as h,t as g}from"./acp-providers-SCPK1BIU.js";import{r as _}from"./use-settings-DzG0C3vO.js";import{t as v}from"./use-save-settings-5m3w89Ph.js";import{r as y}from"./typography-BbaUAC4V.js";import{t as ee}from"./use-agent-settings-schema-BbtOsR7P.js";import{i as te,r as ne}from"./sdk-settings-field-metadata-CBPmeqYa.js";import{t as b}from"./settings-dropdown-input-CAQWQgx-.js";import{t as re}from"./settings-switch-CGap2LtG.js";var x=t(((e,t)=>{t.exports=function(e){return e.map(function(e){return e===``?`''`:e&&typeof e==`object`?e.op.replace(/(.)/g,`\\$1`):/["\s\\]/.test(e)&&!/'/.test(e)?`'`+e.replace(/(['])/g,`\\$1`)+`'`:/["'\s]/.test(e)?`"`+e.replace(/(["\\$`!])/g,`\\$1`)+`"`:String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,`$1\\$2`)}).join(` `)}})),S=t(((e,t)=>{for(var n=`(?:`+[`\\|\\|`,`\\&\\&`,`;;`,`\\|\\&`,`\\<\\(`,`\\<\\<\\<`,`>>`,`>\\&`,`<\\&`,`[&;()|<>]`].join(`|`)+`)`,r=RegExp(`^`+n+`$`),i=`|&;()<> \\t`,a=`"((\\\\"|[^"])*?)"`,o=`'((\\\\'|[^'])*?)'`,s=/^#$/,c=`'`,l=`"`,u=`$`,d=``,f=4294967296,p=0;p<4;p++)d+=(f*Math.random()).toString(16);var m=RegExp(`^`+d);function h(e,t){for(var n=t.lastIndex,r=[],i;i=t.exec(e);)r.push(i),t.lastIndex===i.index&&(t.lastIndex+=1);return t.lastIndex=n,r}function g(e,t,n){var r=typeof e==`function`?e(n):e[n];return r===void 0&&n!=``?r=``:r===void 0&&(r=`$`),typeof r==`object`?t+d+JSON.stringify(r)+d:t+r}function _(e,t,d){d||={};var f=d.escape||`\\`,p=`(\\`+f+`['"`+i+`]|[^\\s'"`+i+`])+`,m=h(e,new RegExp([`(`+n+`)`,`(`+p+`|`+a+`|`+o+`)+`].join(`|`),`g`));if(m.length===0)return[];t||={};var _=!1;return m.map(function(n){var i=n[0];if(!i||_)return;if(r.test(i))return{op:i};var a=!1,o=!1,d=``,p=!1,m;function h(){m+=1;var e,n,r=i.charAt(m);if(r===`{`){if(m+=1,i.charAt(m)===`}`)throw Error(`Bad substitution: `+i.slice(m-2,m+1));if(e=i.indexOf(`}`,m),e<0)throw Error(`Bad substitution: `+i.slice(m));n=i.slice(m,e),m=e}else if(/[*@#?$!_-]/.test(r))n=r,m+=1;else{var a=i.slice(m);e=a.match(/[^\w\d_]/),e?(n=a.slice(0,e.index),m+=e.index-1):(n=a,m=i.length)}return g(t,``,n)}for(m=0;m<i.length;m++){var v=i.charAt(m);if(p||=!a&&(v===`*`||v===`?`),o)d+=v,o=!1;else if(a)v===a?a=!1:a==c?d+=v:v===f?(m+=1,v=i.charAt(m),v===l||v===f||v===u?d+=v:d+=f+v):v===u?d+=h():d+=v;else if(v===l||v===c)a=v;else if(r.test(v))return{op:i};else if(s.test(v)){_=!0;var y={comment:e.slice(n.index+m+1)};return d.length?[d,y]:[y]}else v===f?o=!0:v===u?d+=h():d+=v}return p?{op:`glob`,pattern:d}:d}).reduce(function(e,t){return t===void 0?e:e.concat(t)},[])}t.exports=function(e,t,n){var r=_(e,t,n);return typeof t==`function`?r.reduce(function(e,t){if(typeof t==`object`)return e.concat(t);var n=t.split(RegExp(`(`+d+`.*?`+d+`)`,`g`));return n.length===1?e.concat(n[0]):e.concat(n.filter(Boolean).map(function(e){return m.test(e)?JSON.parse(e.split(d)[1]):e}))},[]):r}})),C=t((e=>{e.quote=x(),e.parse=S()})),w=e(n(),1),{quote:T}=e(C(),1);function E(e){let t=[],n=0,r=``,i=!1;for(;n<e.length;){let a=e[n];if(a===` `||a===` `||a===`
2
- `||a===`\r`){i&&=(t.push(r),r=``,!1),n+=1;continue}if(a===`'`){for(i=!0,n+=1;n<e.length&&e[n]!==`'`;)r+=e[n],n+=1;n<e.length&&(n+=1);continue}if(a===`"`){for(i=!0,n+=1;n<e.length&&e[n]!==`"`;){if(e[n]===`\\`&&n+1<e.length){let t=e[n+1];if(t===`"`||t===`\\`){r+=t,n+=2;continue}}r+=e[n],n+=1}n<e.length&&(n+=1);continue}if(a===`\\`&&n+1<e.length){i=!0,r+=e[n+1],n+=2;continue}i=!0,r+=a,n+=1}return i&&t.push(r),t}var D=/[\s"'\\$`&|;<>(){}*?#!~[\]]/;function O(e){return e.map(e=>D.test(e)||e===``?T([e]):e).join(` `)}var k=i(),A={hideTitle:!0},j=`enable_sub_agents`,ie=`npx -y <package-name>`,M=`__custom_model__`;function N(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function P(e,t){let n=E(e).join(` `);for(let e of t)if(n===e.default_command.join(` `))return e.key;return g}function ae(e){return e?.find(e=>e.key===j)}function oe(e,t){return typeof e==`boolean`?e:t?.default===!0}function F(e,t){return e?.available_models?.some(({id:e})=>e===t.trim())??!1}function I(){let{t:e}=o(`openhands`),{data:t,isLoading:n}=_(),{mutate:r,isPending:i}=v(),{data:x}=ee(t?.agent_settings_schema),S=ae(w.useMemo(()=>x?.sections.flatMap(e=>e.fields),[x])),C=w.useMemo(()=>oe(t?.agent_settings?.[j],S),[S,t?.agent_settings]),[T,D]=(0,w.useState)(C),[A,I]=(0,w.useState)(`openhands`),[L,R]=(0,w.useState)(``),[z,B]=(0,w.useState)(``),[se,V]=(0,w.useState)(!1),[ce,H]=(0,w.useState)(!1),U=(0,w.useRef)(null),W=(0,w.useRef)(null),G=(0,w.useRef)(``);if((0,w.useEffect)(()=>{if(t&&U.current!==t){if(U.current=t,t.agent_settings?.agent_kind===`acp`){I(`acp`);let e=t.agent_settings?.acp_server,n=typeof e==`string`?e:void 0,r=p(n),i=N(t.agent_settings?.acp_command),a=[...i.length>0?i:r?.default_command??[],...N(t.agent_settings?.acp_args)],o=a.length>0?O(a):``;R(o),W.current=n??null,G.current=o;let s=t.agent_settings?.acp_model,c=typeof s==`string`?s.trim():``;B(c||r?.default_model||``),V(!!c&&(!r||!F(r,c)))}else I(`openhands`),R(``),B(``),W.current=null,G.current=``,V(!1);H(!1)}},[t]),(0,w.useEffect)(()=>{D(C)},[C]),n)return null;let K=A===`acp`,q=E(L),le=K&&q.length===0,J=P(L,h),Y=p(J),X=Y?.available_models??[],Z=X.length>0,ue=F(Y,z),Q=se||!ue?M:z,$=!!Y&&q.join(` `)===Y.default_command.join(` `),de=O(h[0]?.default_command??[])||ie,fe=ce||!K&&T!==C,pe=()=>{if(K){let t=!!(Y&&$),n=W.current,i=L===G.current,o=!!n&&n!==`custom`&&!h.some(e=>e.key===n),u=K&&i&&o,d=m(u?n:Y&&$?Y.key:g,{command:t?[]:q,model:z.trim()||void 0,allowUnknownServer:u});if(!d)return;r({agent_settings_diff:d},{onError:t=>{c(s(t)||e(a.ERROR$GENERIC))},onSuccess:()=>{l(e(a.SETTINGS$SAVED)),H(!1)}})}else r({agent_settings_diff:{agent_kind:`openhands`,enable_sub_agents:T}},{onError:t=>{c(s(t)||e(a.ERROR$GENERIC))},onSuccess:()=>{l(e(a.SETTINGS$SAVED)),H(!1)}})},me=S?te(e,S.key,S.label):e(a.SCHEMA$ENABLE_SUB_AGENTS$LABEL),he=S?ne(e,S.key,S.description):e(a.SCHEMA$ENABLE_SUB_AGENTS$DESCRIPTION);return(0,k.jsxs)(`div`,{"data-testid":`agent-settings-screen`,className:`flex flex-col gap-6 pb-8 max-w-2xl`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(y.H2,{className:`mb-2`,children:e(a.SETTINGS$NAV_AGENT)}),(0,k.jsx)(y.Paragraph,{className:`text-sm text-[#A3A3A3]`,children:e(a.SETTINGS$AGENT_PAGE_DESCRIPTION)})]}),(0,k.jsx)(b,{testId:`agent-type-selector`,name:`agent-type`,label:e(a.SETTINGS$NAV_AGENT),items:[{key:`openhands`,label:e(a.SETTINGS$AGENT_TYPE_OPENHANDS)},{key:`acp`,label:e(a.SETTINGS$AGENT_TYPE_ACP)}],selectedKey:A,onSelectionChange:e=>{if(!e)return;let t=e;if(I(t),t===`acp`&&!L){let e=h[0];e&&(R(O(e.default_command)),B(e.default_model??``),V(!1))}else t===`openhands`&&V(!1);H(!0)}}),!K&&(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(re,{testId:`agent-settings-enable-sub-agents`,isToggled:T,onToggle:e=>{D(e)},children:me}),he?(0,k.jsx)(y.Paragraph,{className:u(`pl-12`,`text-tertiary-alt text-xs leading-5`),children:he}):null]}),K&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(b,{testId:`agent-preset-selector`,name:`agent-preset`,label:e(a.SETTINGS$AGENT_PRESET),items:[...h.map(e=>({key:e.key,label:e.display_name})),{key:`custom`,label:e(a.SETTINGS$AGENT_PRESET_CUSTOM)}],selectedKey:J,onSelectionChange:e=>{if(!e)return;let t=String(e),n=p(t);n?(R(O(n.default_command)),B(n.default_model??``),V(!1)):t===`custom`&&(B(``),V(!0)),H(!0)}}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,k.jsx)(y.Text,{className:`text-sm`,children:e(a.SETTINGS$AGENT_COMMAND)}),(0,k.jsx)(`textarea`,{"data-testid":`agent-command-input`,className:`bg-tertiary border border-[#717888] rounded-sm p-2 text-sm font-mono text-white placeholder:text-[#717888] min-h-[60px] resize-y focus:outline-none focus:border-white`,value:L,placeholder:de,onChange:e=>{let t=e.target.value,n=P(L,h),r=P(t,h);r!==n&&(B(p(r)?.default_model??``),V(!1)),R(t),H(!0)}}),(0,k.jsx)(y.Text,{className:`text-xs text-[#717888]`,children:e(a.SETTINGS$AGENT_COMMAND_HINT)})]}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[Z&&(0,k.jsx)(b,{testId:`agent-model-selector`,name:`agent-model`,label:e(a.SETTINGS$AGENT_MODEL),items:[...X.map(e=>({key:e.id,label:e.label})),{key:M,label:e(a.SETTINGS$AGENT_PRESET_CUSTOM)}],selectedKey:Q,onSelectionChange:e=>{if(!e)return;let t=String(e);t===M?(V(!0),B(``)):(V(!1),B(t)),H(!0)}}),Q===M&&(0,k.jsx)(f,{testId:`agent-model-input`,label:e(Z?a.SETTINGS$AGENT_CUSTOM_MODEL:a.SETTINGS$AGENT_MODEL),type:`text`,className:`w-full`,value:z,showOptionalTag:!0,onChange:e=>{B(e),H(!0)}}),(0,k.jsx)(y.Text,{className:`text-xs text-[#717888]`,children:e(a.SETTINGS$AGENT_MODEL_HINT)})]})]}),(0,k.jsx)(`div`,{children:(0,k.jsx)(d,{testId:`agent-save-button`,type:`button`,variant:`primary`,isDisabled:i||!fe||le,onClick:pe,children:e(i?a.SETTINGS$SAVING:a.SETTINGS$SAVE_CHANGES)})})]})}var L=r(I);export{L as default,A as handle};
1
+ import{a as e,t}from"./rolldown-runtime-BFRubm34.js";import{t as n}from"./react-CM_dJw1Z.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{o as i,t as a}from"./declaration-D378OjpZ.js";import{t as o}from"./useTranslation-CpIcQBq6.js";import{t as s}from"./retrieve-axios-error-message-BY-yIkIq.js";import{n as c,r as l}from"./custom-toast-handlers-BOc3qeQ7.js";import{t as u}from"./utils-D-HX7JCe.js";import{t as d}from"./brand-button-C2nEKopC.js";import{t as f}from"./settings-input-DBywAnA7.js";import{a as p,i as m,n as h,t as g}from"./acp-providers-DauuOsW9.js";import{r as _}from"./use-settings-DQ7Oo1Hj.js";import{t as v}from"./use-save-settings-CEEKSTWG.js";import{r as y}from"./typography-vVUMoNUg.js";import{t as ee}from"./use-agent-settings-schema-Bvp5UzV8.js";import{i as te,r as ne}from"./sdk-settings-field-metadata-CBPmeqYa.js";import{t as b}from"./settings-dropdown-input-VwAXNrOb.js";import{t as re}from"./settings-switch-DTKmHC8F.js";var x=t(((e,t)=>{t.exports=function(e){return e.map(function(e){return e===``?`''`:e&&typeof e==`object`?e.op.replace(/(.)/g,`\\$1`):/["\s\\]/.test(e)&&!/'/.test(e)?`'`+e.replace(/(['])/g,`\\$1`)+`'`:/["'\s]/.test(e)?`"`+e.replace(/(["\\$`!])/g,`\\$1`)+`"`:String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,`$1\\$2`)}).join(` `)}})),S=t(((e,t)=>{for(var n=`(?:`+[`\\|\\|`,`\\&\\&`,`;;`,`\\|\\&`,`\\<\\(`,`\\<\\<\\<`,`>>`,`>\\&`,`<\\&`,`[&;()|<>]`].join(`|`)+`)`,r=RegExp(`^`+n+`$`),i=`|&;()<> \\t`,a=`"((\\\\"|[^"])*?)"`,o=`'((\\\\'|[^'])*?)'`,s=/^#$/,c=`'`,l=`"`,u=`$`,d=``,f=4294967296,p=0;p<4;p++)d+=(f*Math.random()).toString(16);var m=RegExp(`^`+d);function h(e,t){for(var n=t.lastIndex,r=[],i;i=t.exec(e);)r.push(i),t.lastIndex===i.index&&(t.lastIndex+=1);return t.lastIndex=n,r}function g(e,t,n){var r=typeof e==`function`?e(n):e[n];return r===void 0&&n!=``?r=``:r===void 0&&(r=`$`),typeof r==`object`?t+d+JSON.stringify(r)+d:t+r}function _(e,t,d){d||={};var f=d.escape||`\\`,p=`(\\`+f+`['"`+i+`]|[^\\s'"`+i+`])+`,m=h(e,new RegExp([`(`+n+`)`,`(`+p+`|`+a+`|`+o+`)+`].join(`|`),`g`));if(m.length===0)return[];t||={};var _=!1;return m.map(function(n){var i=n[0];if(!i||_)return;if(r.test(i))return{op:i};var a=!1,o=!1,d=``,p=!1,m;function h(){m+=1;var e,n,r=i.charAt(m);if(r===`{`){if(m+=1,i.charAt(m)===`}`)throw Error(`Bad substitution: `+i.slice(m-2,m+1));if(e=i.indexOf(`}`,m),e<0)throw Error(`Bad substitution: `+i.slice(m));n=i.slice(m,e),m=e}else if(/[*@#?$!_-]/.test(r))n=r,m+=1;else{var a=i.slice(m);e=a.match(/[^\w\d_]/),e?(n=a.slice(0,e.index),m+=e.index-1):(n=a,m=i.length)}return g(t,``,n)}for(m=0;m<i.length;m++){var v=i.charAt(m);if(p||=!a&&(v===`*`||v===`?`),o)d+=v,o=!1;else if(a)v===a?a=!1:a==c?d+=v:v===f?(m+=1,v=i.charAt(m),v===l||v===f||v===u?d+=v:d+=f+v):v===u?d+=h():d+=v;else if(v===l||v===c)a=v;else if(r.test(v))return{op:i};else if(s.test(v)){_=!0;var y={comment:e.slice(n.index+m+1)};return d.length?[d,y]:[y]}else v===f?o=!0:v===u?d+=h():d+=v}return p?{op:`glob`,pattern:d}:d}).reduce(function(e,t){return t===void 0?e:e.concat(t)},[])}t.exports=function(e,t,n){var r=_(e,t,n);return typeof t==`function`?r.reduce(function(e,t){if(typeof t==`object`)return e.concat(t);var n=t.split(RegExp(`(`+d+`.*?`+d+`)`,`g`));return n.length===1?e.concat(n[0]):e.concat(n.filter(Boolean).map(function(e){return m.test(e)?JSON.parse(e.split(d)[1]):e}))},[]):r}})),C=t((e=>{e.quote=x(),e.parse=S()})),w=e(n(),1),{quote:T}=e(C(),1);function E(e){let t=[],n=0,r=``,i=!1;for(;n<e.length;){let a=e[n];if(a===` `||a===` `||a===`
2
+ `||a===`\r`){i&&=(t.push(r),r=``,!1),n+=1;continue}if(a===`'`){for(i=!0,n+=1;n<e.length&&e[n]!==`'`;)r+=e[n],n+=1;n<e.length&&(n+=1);continue}if(a===`"`){for(i=!0,n+=1;n<e.length&&e[n]!==`"`;){if(e[n]===`\\`&&n+1<e.length){let t=e[n+1];if(t===`"`||t===`\\`){r+=t,n+=2;continue}}r+=e[n],n+=1}n<e.length&&(n+=1);continue}if(a===`\\`&&n+1<e.length){i=!0,r+=e[n+1],n+=2;continue}i=!0,r+=a,n+=1}return i&&t.push(r),t}var D=/[\s"'\\$`&|;<>(){}*?#!~[\]]/;function O(e){return e.map(e=>D.test(e)||e===``?T([e]):e).join(` `)}var k=i(),A={hideTitle:!0},j=`enable_sub_agents`,ie=`npx -y <package-name>`,M=`__custom_model__`;function N(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function P(e,t){let n=E(e).join(` `);for(let e of t)if(n===e.default_command.join(` `))return e.key;return g}function ae(e){return e?.find(e=>e.key===j)}function oe(e,t){return typeof e==`boolean`?e:t?.default===!0}function F(e,t){return e?.available_models?.some(({id:e})=>e===t.trim())??!1}function I(){let{t:e}=o(`openhands`),{data:t,isLoading:n}=_(),{mutate:r,isPending:i}=v(),{data:x}=ee(t?.agent_settings_schema),S=ae(w.useMemo(()=>x?.sections.flatMap(e=>e.fields),[x])),C=w.useMemo(()=>oe(t?.agent_settings?.[j],S),[S,t?.agent_settings]),[T,D]=(0,w.useState)(C),[A,I]=(0,w.useState)(`openhands`),[L,R]=(0,w.useState)(``),[z,B]=(0,w.useState)(``),[se,V]=(0,w.useState)(!1),[ce,H]=(0,w.useState)(!1),U=(0,w.useRef)(null),W=(0,w.useRef)(null),G=(0,w.useRef)(``);if((0,w.useEffect)(()=>{if(t&&U.current!==t){if(U.current=t,t.agent_settings?.agent_kind===`acp`){I(`acp`);let e=t.agent_settings?.acp_server,n=typeof e==`string`?e:void 0,r=p(n),i=N(t.agent_settings?.acp_command),a=[...i.length>0?i:r?.default_command??[],...N(t.agent_settings?.acp_args)],o=a.length>0?O(a):``;R(o),W.current=n??null,G.current=o;let s=t.agent_settings?.acp_model,c=typeof s==`string`?s.trim():``;B(c||r?.default_model||``),V(!!c&&(!r||!F(r,c)))}else I(`openhands`),R(``),B(``),W.current=null,G.current=``,V(!1);H(!1)}},[t]),(0,w.useEffect)(()=>{D(C)},[C]),n)return null;let K=A===`acp`,q=E(L),le=K&&q.length===0,J=P(L,h),Y=p(J),X=Y?.available_models??[],Z=X.length>0,ue=F(Y,z),Q=se||!ue?M:z,$=!!Y&&q.join(` `)===Y.default_command.join(` `),de=O(h[0]?.default_command??[])||ie,fe=ce||!K&&T!==C,pe=()=>{if(K){let t=!!(Y&&$),n=W.current,i=L===G.current,o=!!n&&n!==`custom`&&!h.some(e=>e.key===n),u=K&&i&&o,d=m(u?n:Y&&$?Y.key:g,{command:t?[]:q,model:z.trim()||void 0,allowUnknownServer:u});if(!d)return;r({agent_settings_diff:d},{onError:t=>{c(s(t)||e(a.ERROR$GENERIC))},onSuccess:()=>{l(e(a.SETTINGS$SAVED)),H(!1)}})}else r({agent_settings_diff:{agent_kind:`openhands`,enable_sub_agents:T}},{onError:t=>{c(s(t)||e(a.ERROR$GENERIC))},onSuccess:()=>{l(e(a.SETTINGS$SAVED)),H(!1)}})},me=S?te(e,S.key,S.label):e(a.SCHEMA$ENABLE_SUB_AGENTS$LABEL),he=S?ne(e,S.key,S.description):e(a.SCHEMA$ENABLE_SUB_AGENTS$DESCRIPTION);return(0,k.jsxs)(`div`,{"data-testid":`agent-settings-screen`,className:`flex flex-col gap-6 pb-8 max-w-2xl`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(y.H2,{className:`mb-2`,children:e(a.SETTINGS$NAV_AGENT)}),(0,k.jsx)(y.Paragraph,{className:`text-sm text-[#A3A3A3]`,children:e(a.SETTINGS$AGENT_PAGE_DESCRIPTION)})]}),(0,k.jsx)(b,{testId:`agent-type-selector`,name:`agent-type`,label:e(a.SETTINGS$NAV_AGENT),items:[{key:`openhands`,label:e(a.SETTINGS$AGENT_TYPE_OPENHANDS)},{key:`acp`,label:e(a.SETTINGS$AGENT_TYPE_ACP)}],selectedKey:A,onSelectionChange:e=>{if(!e)return;let t=e;if(I(t),t===`acp`&&!L){let e=h[0];e&&(R(O(e.default_command)),B(e.default_model??``),V(!1))}else t===`openhands`&&V(!1);H(!0)}}),!K&&(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(re,{testId:`agent-settings-enable-sub-agents`,isToggled:T,onToggle:e=>{D(e)},children:me}),he?(0,k.jsx)(y.Paragraph,{className:u(`pl-12`,`text-tertiary-alt text-xs leading-5`),children:he}):null]}),K&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(b,{testId:`agent-preset-selector`,name:`agent-preset`,label:e(a.SETTINGS$AGENT_PRESET),items:[...h.map(e=>({key:e.key,label:e.display_name})),{key:`custom`,label:e(a.SETTINGS$AGENT_PRESET_CUSTOM)}],selectedKey:J,onSelectionChange:e=>{if(!e)return;let t=String(e),n=p(t);n?(R(O(n.default_command)),B(n.default_model??``),V(!1)):t===`custom`&&(R(``),B(``),V(!0)),H(!0)}}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,k.jsx)(y.Text,{className:`text-sm`,children:e(a.SETTINGS$AGENT_COMMAND)}),(0,k.jsx)(`textarea`,{"data-testid":`agent-command-input`,className:`bg-tertiary border border-[#717888] rounded-sm p-2 text-sm font-mono text-white placeholder:text-[#717888] min-h-[60px] resize-y focus:outline-none focus:border-white`,value:L,placeholder:de,onChange:e=>{let t=e.target.value,n=P(L,h),r=P(t,h);r!==n&&(B(p(r)?.default_model??``),V(!1)),R(t),H(!0)}}),(0,k.jsx)(y.Text,{className:`text-xs text-[#717888]`,children:e(a.SETTINGS$AGENT_COMMAND_HINT)})]}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[Z&&(0,k.jsx)(b,{testId:`agent-model-selector`,name:`agent-model`,label:e(a.SETTINGS$AGENT_MODEL),items:[...X.map(e=>({key:e.id,label:e.label})),{key:M,label:e(a.SETTINGS$AGENT_PRESET_CUSTOM)}],selectedKey:Q,onSelectionChange:e=>{if(!e)return;let t=String(e);t===M?(V(!0),B(``)):(V(!1),B(t)),H(!0)}}),Q===M&&(0,k.jsx)(f,{testId:`agent-model-input`,label:e(Z?a.SETTINGS$AGENT_CUSTOM_MODEL:a.SETTINGS$AGENT_MODEL),type:`text`,className:`w-full`,value:z,showOptionalTag:!0,onChange:e=>{B(e),H(!0)}}),(0,k.jsx)(y.Text,{className:`text-xs text-[#717888]`,children:e(a.SETTINGS$AGENT_MODEL_HINT)})]})]}),(0,k.jsx)(`div`,{children:(0,k.jsx)(d,{testId:`agent-save-button`,type:`button`,variant:`primary`,isDisabled:i||!fe||le,onClick:pe,children:e(i?a.SETTINGS$SAVING:a.SETTINGS$SAVE_CHANGES)})})]})}var L=r(I);export{L as default,A as handle};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-C9nuq2Dj.js";import{t as i}from"./useTranslation-01pF7z10.js";import{t as a}from"./utils-Czcl6buL.js";import{n as o}from"./navigation-context-BFjstyH6.js";import{l as s}from"./vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-BP1SKG0F.js";import{t as c}from"./close-SnIy2eLD.js";import{r as l}from"./typography-BbaUAC4V.js";import{t as u}from"./vendor~conversation-panel~conversation~alert-banner-Df7_G0zR.js";var d=e(t(),1),f=n();function p({maintenanceStartTime:e,faultyModels:t,errorMessage:n,updatedAt:p}){let{t:m}=i(`openhands`),[h,g]=u(`alert_banner_dismissed_at`,null),{currentPath:_}=o(),v=e?(e=>new Date(e).toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,timeZoneName:`short`}))(e):null,y=!!e,b=t&&t.length>0,x=n&&n.trim().length>0,S=y||b||x,C=(0,d.useMemo)(()=>S?h!==p:!1,[h,p,S]),w=(0,d.useMemo)(()=>{if(!n)return null;let e=m(n);return e===n?n:e},[n,m]);return C?(0,f.jsxs)(`div`,{"data-testid":`alert-banner`,className:a(`bg-base border border-primary text-white p-4 rounded`,`flex flex-row items-center justify-between m-1`,_===`/`&&`mt-3 mr-3`),children:[(0,f.jsxs)(`div`,{className:`flex items-center`,children:[(0,f.jsx)(`div`,{className:`flex-shrink-0`,children:(0,f.jsx)(s,{className:`text-primary align-middle`})}),(0,f.jsx)(`div`,{className:`ml-3 flex flex-col gap-1`,children:(()=>{let e=[];return y&&v&&e.push((0,f.jsx)(l.Paragraph,{className:`text-sm font-medium`,children:m(r.MAINTENANCE$SCHEDULED_MESSAGE,{time:v})},`maintenance`)),b&&e.push((0,f.jsxs)(l.Paragraph,{className:`text-sm font-medium`,children:[m(r.ALERT$FAULTY_MODELS_MESSAGE),` `,t.join(`, `)]},`faulty-models`)),x&&w&&e.push((0,f.jsx)(l.Paragraph,{className:`text-sm font-medium`,children:w},`error-message`)),e})()})]}),(0,f.jsx)(`button`,{type:`button`,"data-testid":`dismiss-button`,onClick:()=>g(p),className:a(`bg-base rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`),children:(0,f.jsx)(c,{})})]}):null}export{p as AlertBanner};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-D378OjpZ.js";import{t as i}from"./useTranslation-CpIcQBq6.js";import{t as a}from"./utils-D-HX7JCe.js";import{n as o}from"./navigation-context-DeIPtGPp.js";import{l as s}from"./vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-BP1SKG0F.js";import{t as c}from"./close-BdmyeRqS.js";import{r as l}from"./typography-vVUMoNUg.js";import{t as u}from"./vendor~conversation-panel~conversation~alert-banner-Df7_G0zR.js";var d=e(t(),1),f=n();function p({maintenanceStartTime:e,faultyModels:t,errorMessage:n,updatedAt:p}){let{t:m}=i(`openhands`),[h,g]=u(`alert_banner_dismissed_at`,null),{currentPath:_}=o(),v=e?(e=>new Date(e).toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,timeZoneName:`short`}))(e):null,y=!!e,b=t&&t.length>0,x=n&&n.trim().length>0,S=y||b||x,C=(0,d.useMemo)(()=>S?h!==p:!1,[h,p,S]),w=(0,d.useMemo)(()=>{if(!n)return null;let e=m(n);return e===n?n:e},[n,m]);return C?(0,f.jsxs)(`div`,{"data-testid":`alert-banner`,className:a(`bg-base border border-primary text-white p-4 rounded`,`flex flex-row items-center justify-between m-1`,_===`/`&&`mt-3 mr-3`),children:[(0,f.jsxs)(`div`,{className:`flex items-center`,children:[(0,f.jsx)(`div`,{className:`flex-shrink-0`,children:(0,f.jsx)(s,{className:`text-primary align-middle`})}),(0,f.jsx)(`div`,{className:`ml-3 flex flex-col gap-1`,children:(()=>{let e=[];return y&&v&&e.push((0,f.jsx)(l.Paragraph,{className:`text-sm font-medium`,children:m(r.MAINTENANCE$SCHEDULED_MESSAGE,{time:v})},`maintenance`)),b&&e.push((0,f.jsxs)(l.Paragraph,{className:`text-sm font-medium`,children:[m(r.ALERT$FAULTY_MODELS_MESSAGE),` `,t.join(`, `)]},`faulty-models`)),x&&w&&e.push((0,f.jsx)(l.Paragraph,{className:`text-sm font-medium`,children:w},`error-message`)),e})()})]}),(0,f.jsx)(`button`,{type:`button`,"data-testid":`dismiss-button`,onClick:()=>g(p),className:a(`bg-base rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`),children:(0,f.jsx)(c,{})})]}):null}export{p as AlertBanner};
@@ -1 +1 @@
1
- import{o as e,t}from"./declaration-C9nuq2Dj.js";import{t as n}from"./useTranslation-01pF7z10.js";import{n as r}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-VnmIZrq3.js";import{t as i}from"./modal-backdrop-B04pVYAD.js";import{n as a}from"./modal-body-CgUoFQA1.js";import{n as o,r as s}from"./base-modal-B4HvlFHE.js";import{t as c}from"./brand-button-8fVVei4i.js";import{t as l}from"./handle-capture-consent-BfZATzpI.js";import{t as u}from"./use-save-settings-5m3w89Ph.js";var d=e();function f({onClose:e}){let f=r(),{t:p}=n(`openhands`),{mutate:m}=u();return(0,d.jsx)(i,{children:(0,d.jsx)(`form`,{"data-testid":`user-capture-consent-form`,onSubmit:async t=>{t.preventDefault();let n=new FormData(t.currentTarget).get(`analytics`)===`on`;m({user_consents_to_analytics:n},{onSuccess:()=>{l(f,n),e()}})},className:`flex flex-col gap-2`,children:(0,d.jsxs)(a,{className:`border border-[var(--oh-border)]`,children:[(0,d.jsx)(s,{title:p(t.ANALYTICS$TITLE)}),(0,d.jsx)(o,{children:p(t.ANALYTICS$DESCRIPTION)}),(0,d.jsxs)(`label`,{className:`flex gap-2 items-center self-start text-sm`,children:[(0,d.jsx)(`input`,{name:`analytics`,type:`checkbox`,defaultChecked:!0}),p(t.ANALYTICS$SEND_ANONYMOUS_DATA)]}),(0,d.jsx)(c,{testId:`confirm-preferences`,type:`submit`,variant:`primary`,className:`w-full`,children:p(t.ANALYTICS$CONFIRM_PREFERENCES)})]})})})}export{f as AnalyticsConsentFormModal};
1
+ import{o as e,t}from"./declaration-D378OjpZ.js";import{t as n}from"./useTranslation-CpIcQBq6.js";import{n as r}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-VnmIZrq3.js";import{t as i}from"./modal-backdrop-DTYGVmOR.js";import{n as a}from"./modal-body-YElmM1dV.js";import{n as o,r as s}from"./base-modal-CQRvRHu1.js";import{t as c}from"./brand-button-C2nEKopC.js";import{t as l}from"./handle-capture-consent-BfZATzpI.js";import{t as u}from"./use-save-settings-CEEKSTWG.js";var d=e();function f({onClose:e}){let f=r(),{t:p}=n(`openhands`),{mutate:m}=u();return(0,d.jsx)(i,{children:(0,d.jsx)(`form`,{"data-testid":`user-capture-consent-form`,onSubmit:async t=>{t.preventDefault();let n=new FormData(t.currentTarget).get(`analytics`)===`on`;m({user_consents_to_analytics:n},{onSuccess:()=>{l(f,n),e()}})},className:`flex flex-col gap-2`,children:(0,d.jsxs)(a,{className:`border border-[var(--oh-border)]`,children:[(0,d.jsx)(s,{title:p(t.ANALYTICS$TITLE)}),(0,d.jsx)(o,{children:p(t.ANALYTICS$DESCRIPTION)}),(0,d.jsxs)(`label`,{className:`flex gap-2 items-center self-start text-sm`,children:[(0,d.jsx)(`input`,{name:`analytics`,type:`checkbox`,defaultChecked:!0}),p(t.ANALYTICS$SEND_ANONYMOUS_DATA)]}),(0,d.jsx)(c,{testId:`confirm-preferences`,type:`submit`,variant:`primary`,className:`w-full`,children:p(t.ANALYTICS$CONFIRM_PREFERENCES)})]})})})}export{f as AnalyticsConsentFormModal};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{o as r,t as i}from"./declaration-C9nuq2Dj.js";import{t as a}from"./useTranslation-01pF7z10.js";import{t as o}from"./i18n-DkYgs32x.js";import{t as s}from"./retrieve-axios-error-message-BY-yIkIq.js";import{n as c,r as l}from"./custom-toast-handlers-BYxhSr3t.js";import{n as u}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-VnmIZrq3.js";import{t as d}from"./brand-button-8fVVei4i.js";import{i as f,n as p,r as m,t as h}from"./color-themes-DSaoIL6A.js";import{t as g}from"./settings-input-BWCZt9g2.js";import{t as _}from"./settings-D5am1n6X.js";import{r as v}from"./use-settings-DzG0C3vO.js";import{t as y}from"./handle-capture-consent-BfZATzpI.js";import{t as b}from"./use-save-settings-5m3w89Ph.js";import{n as x,t as S}from"./switch-skeleton-Bv21RGWd.js";import{t as C}from"./settings-dropdown-input-CAQWQgx-.js";import{t as w}from"./settings-switch-CGap2LtG.js";var T=e(t(),1),E=r();function D({defaultKey:e,onChange:t,name:n}){let{t:r}=a(`openhands`);return(0,E.jsx)(C,{testId:n,name:n,onInputChange:t,label:r(i.SETTINGS$LANGUAGE),items:o.map(e=>({key:e.value,label:e.label})),defaultSelectedKey:e,isClearable:!1,wrapperClassName:`w-full min-w-0`})}function O(){let{t:e}=a(`openhands`),t=T.useCallback(e=>{if(!e)return;let t=e;p(t),m(t)},[]);return(0,E.jsx)(C,{testId:`color-theme-input`,name:`color-theme-input`,label:e(i.SETTINGS$COLOR_THEME),items:h.map(e=>({key:e.key,label:e.label})),defaultSelectedKey:f(),onSelectionChange:t,isClearable:!1,wrapperClassName:`w-full min-w-0`})}function k(){return(0,E.jsxs)(`div`,{"data-testid":`app-settings-skeleton`,className:`px-11 py-9 flex flex-col gap-6`,children:[(0,E.jsx)(x,{}),(0,E.jsx)(S,{}),(0,E.jsx)(S,{})]})}function A(){let e=u(),{t}=a(`openhands`),{mutate:n,isPending:r}=b(),{data:f,isLoading:p}=v(),[m,h]=T.useState(!1),[x,S]=T.useState(!1),[C,A]=T.useState(!1),[j,M]=T.useState(!1),[N,P]=T.useState(!1),F=r=>{let a=r.get(`language-input`)?.toString(),u=o.find(({label:e})=>e===a)?.value||_.language,d=r.get(`enable-analytics-switch`)?.toString()===`on`;n({language:u,user_consents_to_analytics:d,enable_sound_notifications:r.get(`enable-sound-notifications-switch`)?.toString()===`on`,git_user_name:r.get(`git-user-name-input`)?.toString()||_.git_user_name,git_user_email:r.get(`git-user-email-input`)?.toString()||_.git_user_email},{onSuccess:()=>{y(e,d),l(t(i.SETTINGS$SAVED))},onError:e=>{c(s(e)||t(i.ERROR$GENERIC))},onSettled:()=>{h(!1),S(!1),A(!1),M(!1),P(!1)}})},I=e=>{let t=o.find(({label:t})=>t===e)?.label,n=o.find(({value:e})=>e===f?.language)?.label;h(t!==n)},L=e=>{S(e!==(f?.user_consents_to_analytics??!0))},R=e=>{A(e!==!!f?.enable_sound_notifications)},z=e=>{let t=f?.git_user_name;M(e!==t)},B=e=>{let t=f?.git_user_email;P(e!==t)},V=!m&&!x&&!C&&!j&&!N,H=!f||p||r;return(0,E.jsxs)(`form`,{"data-testid":`app-settings-screen`,action:F,className:`flex flex-col gap-6`,children:[H&&(0,E.jsx)(k,{}),!H&&(0,E.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,E.jsx)(D,{name:`language-input`,defaultKey:f.language,onChange:I}),(0,E.jsx)(O,{}),(0,E.jsx)(w,{testId:`enable-analytics-switch`,name:`enable-analytics-switch`,defaultIsToggled:f.user_consents_to_analytics??!0,onToggle:L,children:t(i.ANALYTICS$SEND_ANONYMOUS_DATA)}),(0,E.jsx)(w,{testId:`enable-sound-notifications-switch`,name:`enable-sound-notifications-switch`,defaultIsToggled:!!f.enable_sound_notifications,onToggle:R,children:t(i.SETTINGS$SOUND_NOTIFICATIONS)}),(0,E.jsxs)(`div`,{className:`border-t border-[var(--oh-border)] pt-6 mt-2`,children:[(0,E.jsx)(`h3`,{className:`text-lg font-medium mb-2`,children:t(i.SETTINGS$GIT_SETTINGS)}),(0,E.jsx)(`p`,{className:`mb-4 text-sm leading-5 text-tertiary-light`,children:t(i.SETTINGS$GIT_SETTINGS_DESCRIPTION)}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,E.jsx)(g,{testId:`git-user-name-input`,name:`git-user-name-input`,type:`text`,label:t(i.SETTINGS$GIT_USERNAME),defaultValue:f.git_user_name||``,onChange:z,placeholder:t(i.SETTINGS$GIT_USERNAME_PLACEHOLDER),className:`w-full min-w-0`}),(0,E.jsx)(g,{testId:`git-user-email-input`,name:`git-user-email-input`,type:`email`,label:t(i.SETTINGS$GIT_EMAIL),defaultValue:f.git_user_email||``,onChange:B,placeholder:t(i.SETTINGS$GIT_EMAIL_PLACEHOLDER),className:`w-full min-w-0`})]}),(0,E.jsx)(`div`,{className:`flex justify-start pt-4`,children:(0,E.jsxs)(d,{testId:`submit-button`,variant:`primary`,type:`submit`,isDisabled:r||V,children:[!r&&t(`SETTINGS$SAVE_CHANGES`),r&&t(`SETTINGS$SAVING`)]})})]})]})]})}var j=n(A);export{j as default};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{o as r,t as i}from"./declaration-D378OjpZ.js";import{t as a}from"./useTranslation-CpIcQBq6.js";import{t as o}from"./i18n-DjAGhTis.js";import{t as s}from"./retrieve-axios-error-message-BY-yIkIq.js";import{n as c,r as l}from"./custom-toast-handlers-BOc3qeQ7.js";import{n as u}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-VnmIZrq3.js";import{t as d}from"./brand-button-C2nEKopC.js";import{i as f,n as p,r as m,t as h}from"./color-themes-DSaoIL6A.js";import{t as g}from"./settings-input-DBywAnA7.js";import{t as _}from"./settings-D5am1n6X.js";import{r as v}from"./use-settings-DQ7Oo1Hj.js";import{t as y}from"./handle-capture-consent-BfZATzpI.js";import{t as b}from"./use-save-settings-CEEKSTWG.js";import{n as x,t as S}from"./switch-skeleton-C-CfhYYV.js";import{t as C}from"./settings-dropdown-input-VwAXNrOb.js";import{t as w}from"./settings-switch-DTKmHC8F.js";var T=e(t(),1),E=r();function D({defaultKey:e,onChange:t,name:n}){let{t:r}=a(`openhands`);return(0,E.jsx)(C,{testId:n,name:n,onInputChange:t,label:r(i.SETTINGS$LANGUAGE),items:o.map(e=>({key:e.value,label:e.label})),defaultSelectedKey:e,isClearable:!1,wrapperClassName:`w-full min-w-0`})}function O(){let{t:e}=a(`openhands`),t=T.useCallback(e=>{if(!e)return;let t=e;p(t),m(t)},[]);return(0,E.jsx)(C,{testId:`color-theme-input`,name:`color-theme-input`,label:e(i.SETTINGS$COLOR_THEME),items:h.map(e=>({key:e.key,label:e.label})),defaultSelectedKey:f(),onSelectionChange:t,isClearable:!1,wrapperClassName:`w-full min-w-0`})}function k(){return(0,E.jsxs)(`div`,{"data-testid":`app-settings-skeleton`,className:`px-11 py-9 flex flex-col gap-6`,children:[(0,E.jsx)(x,{}),(0,E.jsx)(S,{}),(0,E.jsx)(S,{})]})}function A(){let e=u(),{t}=a(`openhands`),{mutate:n,isPending:r}=b(),{data:f,isLoading:p}=v(),[m,h]=T.useState(!1),[x,S]=T.useState(!1),[C,A]=T.useState(!1),[j,M]=T.useState(!1),[N,P]=T.useState(!1),F=r=>{let a=r.get(`language-input`)?.toString(),u=o.find(({label:e})=>e===a)?.value||_.language,d=r.get(`enable-analytics-switch`)?.toString()===`on`;n({language:u,user_consents_to_analytics:d,enable_sound_notifications:r.get(`enable-sound-notifications-switch`)?.toString()===`on`,git_user_name:r.get(`git-user-name-input`)?.toString()||_.git_user_name,git_user_email:r.get(`git-user-email-input`)?.toString()||_.git_user_email},{onSuccess:()=>{y(e,d),l(t(i.SETTINGS$SAVED))},onError:e=>{c(s(e)||t(i.ERROR$GENERIC))},onSettled:()=>{h(!1),S(!1),A(!1),M(!1),P(!1)}})},I=e=>{let t=o.find(({label:t})=>t===e)?.label,n=o.find(({value:e})=>e===f?.language)?.label;h(t!==n)},L=e=>{S(e!==(f?.user_consents_to_analytics??!0))},R=e=>{A(e!==!!f?.enable_sound_notifications)},z=e=>{let t=f?.git_user_name;M(e!==t)},B=e=>{let t=f?.git_user_email;P(e!==t)},V=!m&&!x&&!C&&!j&&!N,H=!f||p||r;return(0,E.jsxs)(`form`,{"data-testid":`app-settings-screen`,action:F,className:`flex flex-col gap-6`,children:[H&&(0,E.jsx)(k,{}),!H&&(0,E.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,E.jsx)(D,{name:`language-input`,defaultKey:f.language,onChange:I}),(0,E.jsx)(O,{}),(0,E.jsx)(w,{testId:`enable-analytics-switch`,name:`enable-analytics-switch`,defaultIsToggled:f.user_consents_to_analytics??!0,onToggle:L,children:t(i.ANALYTICS$SEND_ANONYMOUS_DATA)}),(0,E.jsx)(w,{testId:`enable-sound-notifications-switch`,name:`enable-sound-notifications-switch`,defaultIsToggled:!!f.enable_sound_notifications,onToggle:R,children:t(i.SETTINGS$SOUND_NOTIFICATIONS)}),(0,E.jsxs)(`div`,{className:`border-t border-[var(--oh-border)] pt-6 mt-2`,children:[(0,E.jsx)(`h3`,{className:`text-lg font-medium mb-2`,children:t(i.SETTINGS$GIT_SETTINGS)}),(0,E.jsx)(`p`,{className:`mb-4 text-sm leading-5 text-tertiary-light`,children:t(i.SETTINGS$GIT_SETTINGS_DESCRIPTION)}),(0,E.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,E.jsx)(g,{testId:`git-user-name-input`,name:`git-user-name-input`,type:`text`,label:t(i.SETTINGS$GIT_USERNAME),defaultValue:f.git_user_name||``,onChange:z,placeholder:t(i.SETTINGS$GIT_USERNAME_PLACEHOLDER),className:`w-full min-w-0`}),(0,E.jsx)(g,{testId:`git-user-email-input`,name:`git-user-email-input`,type:`email`,label:t(i.SETTINGS$GIT_EMAIL),defaultValue:f.git_user_email||``,onChange:B,placeholder:t(i.SETTINGS$GIT_EMAIL_PLACEHOLDER),className:`w-full min-w-0`})]}),(0,E.jsx)(`div`,{className:`flex justify-start pt-4`,children:(0,E.jsxs)(d,{testId:`submit-button`,variant:`primary`,type:`submit`,isDisabled:r||V,children:[!r&&t(`SETTINGS$SAVE_CHANGES`),r&&t(`SETTINGS$SAVING`)]})})]})]})]})}var j=n(A);export{j as default};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n,P as r}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{t as i}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{o as a,t as o}from"./declaration-C9nuq2Dj.js";import{t as s}from"./useTranslation-01pF7z10.js";import{n as c,r as l}from"./custom-toast-handlers-BYxhSr3t.js";import{t as u}from"./utils-Czcl6buL.js";import{c as d,i as f,t as p}from"./agent-server-client-options-8OJSXbm8.js";import{n as m}from"./active-backend-context-CkP3ZEJs.js";import{d as h}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-BJm2mGIp.js";import{n as g}from"./navigation-context-BFjstyH6.js";import{t as _}from"./navigation-link-DFQ7YcWq.js";import{n as v,r as y}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-zhv9fooy.js";import{t as b}from"./proxy-BMZyC45G.js";import{t as x}from"./u-edit-BPFJBd34.js";import{t as S}from"./terminal-DGuR4559.js";import{t as C}from"./use-user-conversation-BCYpbPT1.js";import{t as w}from"./toggle-switch-gj6T-wsU.js";import{t as T}from"./x-mark-CZ57VvRX.js";import{t as E}from"./clock-DfoVUZVq.js";import{_ as ee,a as D,b as O,c as k,g as te,h as A,i as ne,l as j,n as re,o as M,p as ie,r as ae,s as N,t as oe,u as P,v as se,y as ce}from"./edit-automation-modal-C3bFxS2f.js";import{t as F}from"./automation-XLxhq3I8.js";var I=e(t()),L=a(),le=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M15.75 19.5 8.25 12l7.5-7.5`})});function R(){let{t:e}=s(`openhands`);return(0,L.jsxs)(_,{to:`/automations`,className:`inline-flex items-center gap-1.5 text-sm text-muted hover:text-foreground`,children:[(0,L.jsx)(le,{className:`size-4`}),e(o.AUTOMATIONS$DETAIL$BACK_TO_LIST)]})}var ue=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3`})});function z({active:e}){let{t}=s(`openhands`);return(0,L.jsx)(`span`,{"data-testid":e?`active-status-badge-active`:`active-status-badge-inactive`,className:u(`inline-flex items-center rounded-full px-3 py-1 text-xs font-medium`,e?`bg-[var(--oh-success)]/15 text-[var(--oh-success)]`:`bg-surface-raised text-muted`),children:t(e?o.AUTOMATIONS$DETAIL$ACTIVE:o.AUTOMATIONS$DETAIL$INACTIVE)})}function B({automation:e,onToggle:t,onEdit:n,onDelete:r,onRunNow:i,isRunningNow:a=!1}){let{t:c}=s(`openhands`),l=j(`manage_automations`),u=[...n?[{label:c(o.AUTOMATIONS$EDIT),icon:(0,L.jsx)(x,{className:`size-4`}),onClick:n}]:[],{label:e.enabled?c(o.AUTOMATIONS$TURN_OFF):c(o.AUTOMATIONS$TURN_ON),icon:(0,L.jsx)(N,{className:`size-4`}),onClick:t},{label:c(o.AUTOMATIONS$DOWNLOAD_TARBALL),icon:(0,L.jsx)(ue,{className:`size-4`}),onClick:()=>{O.downloadTarball(e.id,e.name)}},{label:c(o.AUTOMATIONS$DELETE),icon:(0,L.jsx)(M,{className:`size-4`}),onClick:r}];return(0,L.jsx)(`div`,{className:`flex flex-col gap-4`,children:(0,L.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(`h1`,{className:`text-xl font-medium text-content`,children:e.name}),(0,L.jsx)(z,{active:e.enabled})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l&&i&&(0,L.jsx)(`button`,{type:`button`,className:`rounded-md border border-[var(--oh-border)] px-3 py-1.5 text-sm font-medium text-content transition-colors hover:bg-surface-raised disabled:cursor-not-allowed disabled:opacity-60`,disabled:a||!e.enabled,onClick:i,children:a?`Starting…`:`Run now`}),l&&(0,L.jsx)(w,{enabled:e.enabled,label:e.enabled?c(o.AUTOMATIONS$TURN_OFF):c(o.AUTOMATIONS$TURN_ON),onToggle:t}),l&&(0,L.jsx)(P,{items:u})]})]})})}function V({icon:e,title:t,children:n}){return(0,L.jsxs)(`div`,{className:`rounded-2xl border border-[var(--oh-border)] bg-[var(--oh-surface)]`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-[var(--oh-border)] px-5 py-3`,children:[(0,L.jsx)(`span`,{className:`size-4 text-muted`,children:e}),(0,L.jsx)(`h3`,{className:`text-sm font-medium text-content`,children:t})]}),(0,L.jsx)(`div`,{className:`px-5 py-5`,children:n})]})}function H({prompt:e}){let{t}=s(`openhands`);return(0,L.jsx)(V,{icon:(0,L.jsx)(S,{className:`size-4`}),title:t(o.AUTOMATIONS$DETAIL$PROMPT),children:(0,L.jsx)(`p`,{className:`whitespace-pre-wrap text-sm leading-6 text-content`,children:e})})}var U=e=>(0,L.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:[(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.56.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.893.149c-.425.07-.765.383-.93.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.204-.107-.397.165-.71.505-.78.929l-.15.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.273-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z`}),(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z`})]}),de=e=>(0,L.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:[(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6 3v12m0 0a3 3 0 1 0 3 3M6 15a3 3 0 0 1 3-3h6a3 3 0 0 0 3-3V3m0 0a3 3 0 1 0 0 0`}),(0,L.jsx)(`circle`,{cx:6,cy:3,r:2}),(0,L.jsx)(`circle`,{cx:18,cy:3,r:2}),(0,L.jsx)(`circle`,{cx:9,cy:18,r:2})]}),W=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})}),G=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5`})}),fe=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0`})});function K({icon:e,label:t,children:n}){return(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`size-3.5 text-muted`,children:e}),(0,L.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:t})]}),(0,L.jsx)(`div`,{className:`text-sm text-content`,children:n})]})}function pe({branch:e}){return(0,L.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-[var(--oh-border)] bg-surface-raised px-2.5 py-0.5 text-xs text-muted`,children:e})}function me({automation:e}){let{t}=s(`openhands`),n=e.trigger.schedule??``;e.trigger.schedule_human&&(n=e.timezone?`${e.trigger.schedule_human} (${e.timezone})`:e.trigger.schedule_human);let r=e.trigger.type===`cron`?`Schedule`:e.trigger.type;return(0,L.jsx)(V,{icon:(0,L.jsx)(U,{className:`size-4`}),title:t(o.AUTOMATIONS$DETAIL$CONFIGURATION),children:(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-5`,children:[e.repository&&(0,L.jsx)(K,{icon:(0,L.jsx)(de,{className:`size-3.5`}),label:t(o.AUTOMATIONS$DETAIL$REPOSITORIES),children:(0,L.jsxs)(`span`,{className:`flex items-center gap-1`,children:[e.repository,e.branch&&(0,L.jsx)(pe,{branch:e.branch})]})}),(0,L.jsx)(K,{icon:(0,L.jsx)(W,{className:`size-3.5`}),label:t(o.AUTOMATIONS$DETAIL$TRIGGER),children:r}),(0,L.jsx)(K,{icon:(0,L.jsx)(G,{className:`size-3.5`}),label:t(o.AUTOMATIONS$DETAIL$SCHEDULE),children:n}),(0,L.jsx)(K,{icon:(0,L.jsx)(k,{className:`size-3.5`}),label:t(o.AUTOMATIONS$DETAIL$MODEL),children:e.model??`Active profile`}),e.notification&&(0,L.jsx)(K,{icon:(0,L.jsx)(fe,{className:`size-3.5`}),label:t(o.AUTOMATIONS$DETAIL$NOTIFICATION),children:e.notification})]})})}var he=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z`})});function q({name:e}){return(0,L.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-[var(--oh-border)] bg-[var(--oh-surface-deep)] px-3.5 py-1.5 text-sm text-content`,children:e})}function ge({plugins:e}){let{t}=s(`openhands`);return(0,L.jsx)(V,{icon:(0,L.jsx)(he,{className:`size-4`}),title:t(o.AUTOMATIONS$DETAIL$PLUGINS),children:(0,L.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.map(e=>(0,L.jsx)(q,{name:e},e))})})}var J=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182`})});function Y(e,t){return new Date(e).toLocaleDateString(t,{year:`numeric`,month:`short`,day:`numeric`})}function _e(e,t,n){let r=Date.now()-new Date(e).getTime(),i=Math.floor(r/6e4),a=Math.floor(r/36e5),s=Math.floor(r/864e5);return i<1?n(o.AUTOMATIONS$DETAIL$TIME_JUST_NOW):i<60?n(o.AUTOMATIONS$DETAIL$TIME_MINUTES_AGO,{count:i}):a<24?n(o.AUTOMATIONS$DETAIL$TIME_HOURS_AGO,{count:a}):s===1?n(o.AUTOMATIONS$DETAIL$TIME_YESTERDAY):s<7?n(o.AUTOMATIONS$DETAIL$TIME_DAYS_AGO,{count:s}):Y(e,t)}function ve({createdAt:e,lastRunAt:t}){let{t:n,i18n:r}=s(`openhands`),i=r.language;return(0,L.jsx)(V,{icon:(0,L.jsx)(J,{className:`size-4`}),title:n(o.AUTOMATIONS$DETAIL$ACTIVITY),children:(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4`,children:[(0,L.jsx)(K,{icon:(0,L.jsx)(G,{className:`size-3.5`}),label:n(o.AUTOMATIONS$DETAIL$CREATED),children:Y(e,i)}),(0,L.jsx)(K,{icon:(0,L.jsx)(E,{className:`size-3.5`}),label:n(o.AUTOMATIONS$DETAIL$LAST_RUN),children:t?_e(t,i,n):n(o.AUTOMATIONS$DETAIL$TIME_NEVER)})]})})}var ye=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})}),be={[F.COMPLETED]:{label:o.AUTOMATIONS$DETAIL$SUCCESSFUL,style:`border-[var(--oh-success)]/50 bg-[var(--oh-success)]/10 text-[var(--oh-success)]`},[F.FAILED]:{label:o.AUTOMATIONS$DETAIL$FAILED,style:`border-[var(--oh-danger)]/50 bg-[var(--oh-danger)]/10 text-danger`},[F.PENDING]:{label:o.AUTOMATIONS$DETAIL$PENDING,style:`border-[var(--oh-border)] bg-surface-raised text-muted`},[F.RUNNING]:{label:o.AUTOMATIONS$DETAIL$RUNNING,style:`border-[var(--oh-border)] bg-surface-raised text-muted`}};function xe({status:e}){switch(e){case F.COMPLETED:return(0,L.jsx)(W,{"data-testid":`run-status-icon-completed`,className:`size-3.5`});case F.FAILED:return(0,L.jsx)(ye,{"data-testid":`run-status-icon-failed`,className:`size-3.5`});default:return(0,L.jsx)(E,{"data-testid":`run-status-icon-pending`,className:`size-3.5`})}}function Se({status:e}){let{t}=s(`openhands`),n=be[e];return(0,L.jsxs)(`span`,{className:u(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium`,n.style),children:[(0,L.jsx)(xe,{status:e}),t(n.label)]})}var Ce=20;function we(e){return e.kind===`BashOutput`}var Te=class e{static async listOutputs(t,n,r){let i=[],a;for(let o=0;o<Ce;o+=1){let o=await e.searchEvents(t,n,{kind__eq:`BashOutput`,command_id__eq:r,sort_order:`TIMESTAMP`,...a?{page_id:a}:{}});if(o.items.forEach(e=>{we(e)&&i.push(e)}),!o.next_page_id)break;a=o.next_page_id}return i}static async searchEvents(e,t,n){let r=d().backend;if(r.kind===`cloud`){if(!e)throw Error(`BashService.listOutputs requires a conversation URL on cloud backends`);let i=new URLSearchParams;return Object.entries(n).forEach(([e,t])=>{t!=null&&i.set(e,String(t))}),b({backend:r,method:`GET`,hostOverride:f(e),path:`/api/bash/bash_events/search?${i.toString()}`,authMode:`session-api-key`,sessionApiKey:t})}return new h(p({...e?{conversationUrl:e}:{},sessionApiKey:t})).searchEvents(n)}},Ee=[`bash-command-logs`];function De(e){switch(e){case`MISSING`:return`missing`;case`PAUSED`:return`paused`;case`STARTING`:return`starting`;case`ERROR`:return`errored`;case`RUNNING`:case null:case void 0:default:return null}}function Oe(e){if(!y.isAxiosError(e))return null;if(!e.response)return`unreachable`;let t=e.response.status;return t===404||t>=500?`unreachable`:null}function ke(e){let{conversationId:t,bashCommandId:n,enabled:r=!0}=e,a=m(),o=C(t??null),s=o.data,c=s?.conversation_url??null,l=s?.session_api_key??null,u=a.backend.kind===`cloud`,d=o.isFetched,f=null,p=!1;u&&d&&(s?f=De(s.sandbox_status)??(s.conversation_url?null:`missing`):p=!0);let h=r&&!!n&&(u?!!c:!0)&&!f&&!p,g=i({queryKey:[...Ee,n,c,l,a.backend.id,a.orgId],queryFn:()=>Te.listOutputs(c,l,n),enabled:h,staleTime:60*1e3,gcTime:300*1e3,retry:!1}),_=u?Oe(g.error):null,v=f??_;return{data:g.data,error:_?null:g.error,isFetching:g.isFetching,isPending:g.isPending,isResolvingConversation:u&&o.isPending,conversationMissing:p,sandboxIssue:v}}var Ae={missing:o.AUTOMATIONS$DETAIL$LOGS_SANDBOX_MISSING,paused:o.AUTOMATIONS$DETAIL$LOGS_SANDBOX_PAUSED,starting:o.AUTOMATIONS$DETAIL$LOGS_SANDBOX_STARTING,errored:o.AUTOMATIONS$DETAIL$LOGS_SANDBOX_ERROR,unreachable:o.AUTOMATIONS$DETAIL$LOGS_SANDBOX_UNREACHABLE};function X(e,t){return[...e].sort((e,t)=>{let n=e.timestamp.localeCompare(t.timestamp);return n===0?(e.order??0)-(t.order??0):n}).map(e=>e[t]??``).join(``)}function je({conversationId:e,bashCommandId:t,isOpen:n,onClose:r}){let{t:i}=s(`openhands`),[a,c]=(0,I.useState)(`stdout`),{data:l,isFetching:u,isResolvingConversation:d,sandboxIssue:f,conversationMissing:p,error:m}=ke({conversationId:e,bashCommandId:t,enabled:n});(0,I.useEffect)(()=>{n&&c(`stdout`)},[n,t]),(0,I.useEffect)(()=>{if(!n)return;let e=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,r]);let{stdout:h,stderr:g}=(0,I.useMemo)(()=>l?{stdout:X(l,`stdout`),stderr:X(l,`stderr`)}:{stdout:``,stderr:``},[l]);if(!n)return null;let _=d||u&&!l,v=!t,y=a===`stdout`?h:g,b=`border-b-2 px-3 py-2 text-sm font-normal transition-colors focus:outline-none`,x=`border-[var(--oh-primary)] text-white`,S=`border-transparent text-muted hover:text-content`;return(0,L.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4`,role:`dialog`,"aria-modal":`true`,"aria-label":i(o.AUTOMATIONS$DETAIL$LOGS_TITLE),children:[(0,L.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:r,onKeyDown:e=>{e.key===`Escape`&&r()},role:`presentation`}),(0,L.jsxs)(`div`,{className:`relative flex max-h-[80vh] w-full max-w-3xl flex-col rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:r,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":i(o.AUTOMATIONS$CANCEL),children:(0,L.jsx)(T,{className:`size-5`})}),(0,L.jsx)(`h2`,{className:`pr-8 text-lg font-medium text-white`,children:i(o.AUTOMATIONS$DETAIL$LOGS_TITLE)}),(0,L.jsxs)(`div`,{role:`tablist`,"aria-label":i(o.AUTOMATIONS$DETAIL$LOGS_TITLE),className:`mt-4 flex gap-1 border-b border-[var(--oh-border)]`,children:[(0,L.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":a===`stdout`,"aria-controls":`run-logs-panel-stdout`,id:`run-logs-tab-stdout`,tabIndex:a===`stdout`?0:-1,onClick:()=>c(`stdout`),className:`${b} ${a===`stdout`?x:S}`,children:i(o.AUTOMATIONS$DETAIL$LOGS_TAB_OUTPUT)}),(0,L.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":a===`stderr`,"aria-controls":`run-logs-panel-stderr`,id:`run-logs-tab-stderr`,tabIndex:a===`stderr`?0:-1,onClick:()=>c(`stderr`),className:`${b} ${a===`stderr`?x:S}`,children:i(o.AUTOMATIONS$DETAIL$LOGS_TAB_ERROR)})]}),(0,L.jsxs)(`div`,{role:`tabpanel`,id:`run-logs-panel-${a}`,"aria-labelledby":`run-logs-tab-${a}`,className:`mt-3 min-h-[12rem] flex-1 overflow-auto rounded-lg border border-[var(--oh-border)] bg-black/40 p-4 font-mono text-xs`,children:[v&&(0,L.jsx)(`p`,{className:`text-muted italic`,children:i(o.AUTOMATIONS$DETAIL$LOGS_NO_COMMAND)}),!v&&p&&(0,L.jsx)(`p`,{className:`text-muted italic`,children:i(o.AUTOMATIONS$DETAIL$LOGS_CONVERSATION_MISSING)}),!v&&!p&&f&&(0,L.jsx)(`p`,{"data-testid":`run-logs-sandbox-issue-${f}`,className:`text-muted italic`,children:i(Ae[f])}),!v&&!p&&!f&&_&&(0,L.jsx)(`p`,{className:`text-muted italic`,children:i(o.AUTOMATIONS$DETAIL$LOGS_LOADING)}),!v&&!p&&!f&&!_&&m&&!l&&(0,L.jsxs)(`p`,{className:`text-danger`,children:[i(o.AUTOMATIONS$DETAIL$LOGS_ERROR),`: `,String(m)]}),!_&&!f&&l&&(0,L.jsx)(`pre`,{"data-testid":`run-logs-output-${a}`,className:`whitespace-pre-wrap break-words ${a===`stderr`?`text-danger`:`text-content`}`,children:y.length>0?y:(0,L.jsx)(`span`,{className:`text-muted italic`,children:i(o.AUTOMATIONS$DETAIL$LOGS_EMPTY)})})]})]})]})}function Me(e,t){return new Date(e).toLocaleDateString(t,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}function Ne(e){if(!e)return!0;let t=new Date(e).getTime();return Number.isNaN(t)||t===0}function Pe(e){return`/conversations/${e}`}function Fe({run:e}){let{t,i18n:n}=s(`openhands`),r=!!e.conversation_id,i=!!e.bash_command_id,[a,c]=(0,I.useState)(!1),[l]=(0,I.useState)(()=>new Date().toISOString()),u=Me(Ne(e.started_at)?l:e.started_at,n.language),d=i?(0,L.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),e.preventDefault(),c(!0)},className:`rounded-md p-1 text-muted hover:bg-surface-raised hover:text-foreground focus:bg-surface-raised focus:outline-none`,"aria-label":t(o.AUTOMATIONS$DETAIL$LOGS_VIEW,{timestamp:u}),title:t(o.AUTOMATIONS$DETAIL$LOGS_VIEW_SHORT),children:(0,L.jsx)(S,{className:`size-4`})}):null,f=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(`span`,{className:`text-sm text-content`,children:u}),!r&&(0,L.jsxs)(`span`,{className:`text-xs text-muted italic`,children:[`(`,t(o.AUTOMATIONS$DETAIL$NO_CONVERSATION),`)`]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[d,(0,L.jsx)(Se,{status:e.status})]})]});return(0,L.jsxs)(L.Fragment,{children:[r&&e.conversation_id?(0,L.jsx)(`a`,{href:Pe(e.conversation_id),className:`flex items-center justify-between px-5 py-3 transition-colors cursor-pointer hover:bg-surface-raised focus:bg-surface-raised focus:outline-none`,"aria-label":`View conversation for run at ${u}`,children:f}):(0,L.jsx)(`div`,{className:`flex items-center justify-between px-5 py-3 cursor-default`,children:f}),i&&(0,L.jsx)(je,{conversationId:e.conversation_id,bashCommandId:e.bash_command_id,isOpen:a,onClose:()=>c(!1)})]})}var Z=20;function Ie({automationId:e}){let{t}=s(`openhands`),[n,r]=(0,I.useState)(Z),{data:i,isLoading:a}=ce({id:e,limit:n,offset:0}),c=i?i.total>i.runs.length:!1;return(0,L.jsxs)(`div`,{className:`rounded-2xl border border-[var(--oh-border)] bg-[var(--oh-surface)]`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-[var(--oh-border)] px-5 py-3`,children:[(0,L.jsx)(`span`,{className:`size-4 text-muted`,children:(0,L.jsx)(J,{className:`size-4`})}),(0,L.jsx)(`h3`,{className:`text-sm font-medium text-content`,children:t(o.AUTOMATIONS$DETAIL$ACTIVITY_LOG)})]}),a&&(0,L.jsx)(`div`,{className:`space-y-1 p-5`,children:Array.from({length:3}).map((e,t)=>(0,L.jsxs)(`div`,{className:`flex items-center justify-between py-3`,children:[(0,L.jsx)(`div`,{className:`h-5 w-64 animate-pulse rounded bg-surface-raised`}),(0,L.jsx)(`div`,{className:`h-6 w-24 animate-pulse rounded-full bg-surface-raised`})]},`skeleton-${t}`))}),!a&&i?.runs.length===0&&(0,L.jsx)(`p`,{className:`px-5 py-8 text-center text-sm text-muted`,children:t(o.AUTOMATIONS$DETAIL$NO_RUNS)}),!a&&i&&i.runs.length>0&&(0,L.jsxs)(`div`,{children:[i.runs.map((e,t)=>(0,L.jsx)(`div`,{className:t>0?`border-t border-[var(--oh-border)]`:``,children:(0,L.jsx)(Fe,{run:e})},e.id)),c&&(0,L.jsx)(`div`,{className:`border-t border-[var(--oh-border)] px-5 py-3`,children:(0,L.jsx)(`button`,{type:`button`,onClick:()=>r(e=>e+Z),className:`text-sm text-muted hover:text-foreground`,children:t(o.AUTOMATIONS$DETAIL$LOAD_MORE_RUNS)})})]})]})}function Q({className:e}){return(0,L.jsx)(`div`,{className:u(`animate-pulse rounded bg-surface-raised`,e)})}function $(){return(0,L.jsxs)(`div`,{className:`flex flex-col gap-4`,"data-testid":`detail-skeleton`,children:[(0,L.jsx)(Q,{className:`h-5 w-40`}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(Q,{className:`h-6 w-48`}),(0,L.jsx)(Q,{className:`h-6 w-16 rounded-full`})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(Q,{className:`h-6 w-11 rounded-full`}),(0,L.jsx)(Q,{className:`h-8 w-8`})]})]}),(0,L.jsx)(Q,{className:`h-5 w-96`}),(0,L.jsx)(Q,{className:`h-36 w-full rounded-2xl`}),(0,L.jsx)(Q,{className:`h-72 w-full rounded-2xl`}),(0,L.jsx)(Q,{className:`h-32 w-full rounded-2xl`}),(0,L.jsx)(Q,{className:`h-40 w-full rounded-2xl`})]})}function Le(){let{t:e}=s(`openhands`);return(0,L.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20`,children:[(0,L.jsx)(D,{className:`size-12 text-muted`}),(0,L.jsx)(`p`,{className:`mt-4 text-sm font-medium text-content`,children:e(o.AUTOMATIONS$DETAIL$NOT_FOUND_TITLE)}),(0,L.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:e(o.AUTOMATIONS$DETAIL$NOT_FOUND_MESSAGE)}),(0,L.jsx)(`div`,{className:`mt-6`,children:(0,L.jsx)(R,{})})]})}var Re=n(function(){let{t:e}=s(`openhands`),{automationId:t}=r(),{navigate:n}=g(),[i,a]=(0,I.useState)(!1),[u,d]=(0,I.useState)(!1),{data:f,isLoading:p,refetch:h}=ie(),_=f?.status===`ok`,y=m(),b=(0,I.useRef)(y.backend.id).current!==y.backend.id,{data:x,isLoading:S,isError:C,error:w,refetch:T}=se({id:t??``,enabled:_&&!b}),E=ee(),D=A(),O=te(),k=C&&v(w)&&w.response?.status===404;if(p)return(0,L.jsx)(`div`,{className:`min-h-full`,children:(0,L.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,L.jsx)($,{})})});if(!_)return(0,L.jsx)(`div`,{className:`min-h-full`,children:(0,L.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,L.jsx)(ae,{onRetry:h})})});if(S)return(0,L.jsx)(`div`,{className:`min-h-full`,children:(0,L.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,L.jsx)($,{})})});if(k)return(0,L.jsx)(`div`,{className:`min-h-full`,children:(0,L.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,L.jsx)(Le,{})})});if(C||!x)return(0,L.jsx)(`div`,{className:`min-h-full`,children:(0,L.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,L.jsx)(ne,{onRetry:()=>T()})})});let j=()=>{E.mutate({id:x.id,enabled:!x.enabled})},M=()=>{D.mutate(x.id,{onSuccess:()=>{n?.(`/automations`)}})},N=()=>{O.mutate(x.id,{onSuccess:()=>{l(e(o.AUTOMATIONS$RUN_NOW_SUCCESS))},onError:t=>{c(v(t)?t.response?.data?.message||t.message||e(o.AUTOMATIONS$RUN_NOW_ERROR):t.message||e(o.AUTOMATIONS$RUN_NOW_ERROR))}})},P=y.backend.kind===`local`;return(0,L.jsx)(`div`,{className:`min-h-full`,children:(0,L.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,L.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,L.jsx)(R,{}),(0,L.jsx)(B,{automation:x,onToggle:j,onEdit:P?()=>d(!0):void 0,onDelete:()=>a(!0),onRunNow:N,isRunningNow:O.isPending}),x.prompt&&(0,L.jsx)(H,{prompt:x.prompt}),(0,L.jsx)(me,{automation:x}),x.plugins&&x.plugins.length>0&&(0,L.jsx)(ge,{plugins:x.plugins}),(0,L.jsx)(ve,{createdAt:x.created_at,lastRunAt:x.last_triggered_at}),(0,L.jsx)(Ie,{automationId:x.id}),(0,L.jsx)(re,{automationName:x.name,isOpen:i,onConfirm:M,onCancel:()=>a(!1)}),P&&(0,L.jsx)(oe,{automation:x,isOpen:u,onClose:()=>d(!1)})]})})})});export{Re as default};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n,P as r}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{t as i}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-CyUbhpbm.js";import{o as a,t as o}from"./declaration-D378OjpZ.js";import{t as s}from"./useTranslation-CpIcQBq6.js";import{n as c,r as l}from"./custom-toast-handlers-BOc3qeQ7.js";import{t as u}from"./utils-D-HX7JCe.js";import{c as d,i as f,t as p}from"./agent-server-client-options-DT2GP6VJ.js";import{n as m}from"./active-backend-context-TVbjnvmP.js";import{f as h}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-CHrEOFl6.js";import{n as g}from"./navigation-context-DeIPtGPp.js";import{t as _}from"./navigation-link-C9JD4PYD.js";import{n as v,r as y}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-zhv9fooy.js";import{t as b}from"./proxy-CurRmrqf.js";import{t as x}from"./u-edit-KAUlufD8.js";import{t as S}from"./terminal-LNa-iU5c.js";import{t as C}from"./use-user-conversation-B_zDoSeh.js";import{t as w}from"./toggle-switch-k-IZCDbt.js";import{t as T}from"./x-mark-CWI0f9yI.js";import{t as E}from"./clock-ZR4Kn-_Y.js";import{_ as ee,a as D,b as O,c as k,g as te,h as A,i as ne,l as j,n as re,o as M,p as ie,r as ae,s as N,t as oe,u as P,v as se,y as ce}from"./edit-automation-modal-Dnjxbjn7.js";import{t as F}from"./automation-XLxhq3I8.js";var I=e(t()),L=a(),le=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M15.75 19.5 8.25 12l7.5-7.5`})});function R(){let{t:e}=s(`openhands`);return(0,L.jsxs)(_,{to:`/automations`,className:`inline-flex items-center gap-1.5 text-sm text-muted hover:text-foreground`,children:[(0,L.jsx)(le,{className:`size-4`}),e(o.AUTOMATIONS$DETAIL$BACK_TO_LIST)]})}var ue=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3`})});function z({active:e}){let{t}=s(`openhands`);return(0,L.jsx)(`span`,{"data-testid":e?`active-status-badge-active`:`active-status-badge-inactive`,className:u(`inline-flex items-center rounded-full px-3 py-1 text-xs font-medium`,e?`bg-[var(--oh-success)]/15 text-[var(--oh-success)]`:`bg-surface-raised text-muted`),children:t(e?o.AUTOMATIONS$DETAIL$ACTIVE:o.AUTOMATIONS$DETAIL$INACTIVE)})}function B({automation:e,onToggle:t,onEdit:n,onDelete:r,onRunNow:i,isRunningNow:a=!1}){let{t:c}=s(`openhands`),l=j(`manage_automations`),u=[...n?[{label:c(o.AUTOMATIONS$EDIT),icon:(0,L.jsx)(x,{className:`size-4`}),onClick:n}]:[],{label:e.enabled?c(o.AUTOMATIONS$TURN_OFF):c(o.AUTOMATIONS$TURN_ON),icon:(0,L.jsx)(N,{className:`size-4`}),onClick:t},{label:c(o.AUTOMATIONS$DOWNLOAD_TARBALL),icon:(0,L.jsx)(ue,{className:`size-4`}),onClick:()=>{O.downloadTarball(e.id,e.name)}},{label:c(o.AUTOMATIONS$DELETE),icon:(0,L.jsx)(M,{className:`size-4`}),onClick:r}];return(0,L.jsx)(`div`,{className:`flex flex-col gap-4`,children:(0,L.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(`h1`,{className:`text-xl font-medium text-content`,children:e.name}),(0,L.jsx)(z,{active:e.enabled})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l&&i&&(0,L.jsx)(`button`,{type:`button`,className:`rounded-md border border-[var(--oh-border)] px-3 py-1.5 text-sm font-medium text-content transition-colors hover:bg-surface-raised disabled:cursor-not-allowed disabled:opacity-60`,disabled:a||!e.enabled,onClick:i,children:a?`Starting…`:`Run now`}),l&&(0,L.jsx)(w,{enabled:e.enabled,label:e.enabled?c(o.AUTOMATIONS$TURN_OFF):c(o.AUTOMATIONS$TURN_ON),onToggle:t}),l&&(0,L.jsx)(P,{items:u})]})]})})}function V({icon:e,title:t,children:n}){return(0,L.jsxs)(`div`,{className:`rounded-2xl border border-[var(--oh-border)] bg-[var(--oh-surface)]`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-[var(--oh-border)] px-5 py-3`,children:[(0,L.jsx)(`span`,{className:`size-4 text-muted`,children:e}),(0,L.jsx)(`h3`,{className:`text-sm font-medium text-content`,children:t})]}),(0,L.jsx)(`div`,{className:`px-5 py-5`,children:n})]})}function H({prompt:e}){let{t}=s(`openhands`);return(0,L.jsx)(V,{icon:(0,L.jsx)(S,{className:`size-4`}),title:t(o.AUTOMATIONS$DETAIL$PROMPT),children:(0,L.jsx)(`p`,{className:`whitespace-pre-wrap text-sm leading-6 text-content`,children:e})})}var U=e=>(0,L.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:[(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.56.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.893.149c-.425.07-.765.383-.93.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.204-.107-.397.165-.71.505-.78.929l-.15.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.273-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z`}),(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z`})]}),de=e=>(0,L.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:[(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6 3v12m0 0a3 3 0 1 0 3 3M6 15a3 3 0 0 1 3-3h6a3 3 0 0 0 3-3V3m0 0a3 3 0 1 0 0 0`}),(0,L.jsx)(`circle`,{cx:6,cy:3,r:2}),(0,L.jsx)(`circle`,{cx:18,cy:3,r:2}),(0,L.jsx)(`circle`,{cx:9,cy:18,r:2})]}),W=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})}),G=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5`})}),fe=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0`})});function K({icon:e,label:t,children:n}){return(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`size-3.5 text-muted`,children:e}),(0,L.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:t})]}),(0,L.jsx)(`div`,{className:`text-sm text-content`,children:n})]})}function pe({branch:e}){return(0,L.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-[var(--oh-border)] bg-surface-raised px-2.5 py-0.5 text-xs text-muted`,children:e})}function me({automation:e}){let{t}=s(`openhands`),n=e.trigger.schedule??``;e.trigger.schedule_human&&(n=e.timezone?`${e.trigger.schedule_human} (${e.timezone})`:e.trigger.schedule_human);let r=e.trigger.type===`cron`?`Schedule`:e.trigger.type;return(0,L.jsx)(V,{icon:(0,L.jsx)(U,{className:`size-4`}),title:t(o.AUTOMATIONS$DETAIL$CONFIGURATION),children:(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-5`,children:[e.repository&&(0,L.jsx)(K,{icon:(0,L.jsx)(de,{className:`size-3.5`}),label:t(o.AUTOMATIONS$DETAIL$REPOSITORIES),children:(0,L.jsxs)(`span`,{className:`flex items-center gap-1`,children:[e.repository,e.branch&&(0,L.jsx)(pe,{branch:e.branch})]})}),(0,L.jsx)(K,{icon:(0,L.jsx)(W,{className:`size-3.5`}),label:t(o.AUTOMATIONS$DETAIL$TRIGGER),children:r}),(0,L.jsx)(K,{icon:(0,L.jsx)(G,{className:`size-3.5`}),label:t(o.AUTOMATIONS$DETAIL$SCHEDULE),children:n}),(0,L.jsx)(K,{icon:(0,L.jsx)(k,{className:`size-3.5`}),label:t(o.AUTOMATIONS$DETAIL$MODEL),children:e.model??`Active profile`}),e.notification&&(0,L.jsx)(K,{icon:(0,L.jsx)(fe,{className:`size-3.5`}),label:t(o.AUTOMATIONS$DETAIL$NOTIFICATION),children:e.notification})]})})}var he=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z`})});function q({name:e}){return(0,L.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-[var(--oh-border)] bg-[var(--oh-surface-deep)] px-3.5 py-1.5 text-sm text-content`,children:e})}function ge({plugins:e}){let{t}=s(`openhands`);return(0,L.jsx)(V,{icon:(0,L.jsx)(he,{className:`size-4`}),title:t(o.AUTOMATIONS$DETAIL$PLUGINS),children:(0,L.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.map(e=>(0,L.jsx)(q,{name:e},e))})})}var J=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182`})});function Y(e,t){return new Date(e).toLocaleDateString(t,{year:`numeric`,month:`short`,day:`numeric`})}function _e(e,t,n){let r=Date.now()-new Date(e).getTime(),i=Math.floor(r/6e4),a=Math.floor(r/36e5),s=Math.floor(r/864e5);return i<1?n(o.AUTOMATIONS$DETAIL$TIME_JUST_NOW):i<60?n(o.AUTOMATIONS$DETAIL$TIME_MINUTES_AGO,{count:i}):a<24?n(o.AUTOMATIONS$DETAIL$TIME_HOURS_AGO,{count:a}):s===1?n(o.AUTOMATIONS$DETAIL$TIME_YESTERDAY):s<7?n(o.AUTOMATIONS$DETAIL$TIME_DAYS_AGO,{count:s}):Y(e,t)}function ve({createdAt:e,lastRunAt:t}){let{t:n,i18n:r}=s(`openhands`),i=r.language;return(0,L.jsx)(V,{icon:(0,L.jsx)(J,{className:`size-4`}),title:n(o.AUTOMATIONS$DETAIL$ACTIVITY),children:(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4`,children:[(0,L.jsx)(K,{icon:(0,L.jsx)(G,{className:`size-3.5`}),label:n(o.AUTOMATIONS$DETAIL$CREATED),children:Y(e,i)}),(0,L.jsx)(K,{icon:(0,L.jsx)(E,{className:`size-3.5`}),label:n(o.AUTOMATIONS$DETAIL$LAST_RUN),children:t?_e(t,i,n):n(o.AUTOMATIONS$DETAIL$TIME_NEVER)})]})})}var ye=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,L.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})}),be={[F.COMPLETED]:{label:o.AUTOMATIONS$DETAIL$SUCCESSFUL,style:`border-[var(--oh-success)]/50 bg-[var(--oh-success)]/10 text-[var(--oh-success)]`},[F.FAILED]:{label:o.AUTOMATIONS$DETAIL$FAILED,style:`border-[var(--oh-danger)]/50 bg-[var(--oh-danger)]/10 text-danger`},[F.PENDING]:{label:o.AUTOMATIONS$DETAIL$PENDING,style:`border-[var(--oh-border)] bg-surface-raised text-muted`},[F.RUNNING]:{label:o.AUTOMATIONS$DETAIL$RUNNING,style:`border-[var(--oh-border)] bg-surface-raised text-muted`}};function xe({status:e}){switch(e){case F.COMPLETED:return(0,L.jsx)(W,{"data-testid":`run-status-icon-completed`,className:`size-3.5`});case F.FAILED:return(0,L.jsx)(ye,{"data-testid":`run-status-icon-failed`,className:`size-3.5`});default:return(0,L.jsx)(E,{"data-testid":`run-status-icon-pending`,className:`size-3.5`})}}function Se({status:e}){let{t}=s(`openhands`),n=be[e];return(0,L.jsxs)(`span`,{className:u(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium`,n.style),children:[(0,L.jsx)(xe,{status:e}),t(n.label)]})}var Ce=20;function we(e){return e.kind===`BashOutput`}var Te=class e{static async listOutputs(t,n,r){let i=[],a;for(let o=0;o<Ce;o+=1){let o=await e.searchEvents(t,n,{kind__eq:`BashOutput`,command_id__eq:r,sort_order:`TIMESTAMP`,...a?{page_id:a}:{}});if(o.items.forEach(e=>{we(e)&&i.push(e)}),!o.next_page_id)break;a=o.next_page_id}return i}static async searchEvents(e,t,n){let r=d().backend;if(r.kind===`cloud`){if(!e)throw Error(`BashService.listOutputs requires a conversation URL on cloud backends`);let i=new URLSearchParams;return Object.entries(n).forEach(([e,t])=>{t!=null&&i.set(e,String(t))}),b({backend:r,method:`GET`,hostOverride:f(e),path:`/api/bash/bash_events/search?${i.toString()}`,authMode:`session-api-key`,sessionApiKey:t})}return new h(p({...e?{conversationUrl:e}:{},sessionApiKey:t})).searchEvents(n)}},Ee=[`bash-command-logs`];function De(e){switch(e){case`MISSING`:return`missing`;case`PAUSED`:return`paused`;case`STARTING`:return`starting`;case`ERROR`:return`errored`;case`RUNNING`:case null:case void 0:default:return null}}function Oe(e){if(!y.isAxiosError(e))return null;if(!e.response)return`unreachable`;let t=e.response.status;return t===404||t>=500?`unreachable`:null}function ke(e){let{conversationId:t,bashCommandId:n,enabled:r=!0}=e,a=m(),o=C(r?t??null:null),s=o.data,c=s?.conversation_url??null,l=s?.session_api_key??null,u=a.backend.kind===`cloud`,d=o.isFetched,f=null,p=!1;u&&d&&(s?f=De(s.sandbox_status)??(s.conversation_url?null:`missing`):p=!0);let h=r&&!!n&&(u?!!c:!0)&&!f&&!p,g=i({queryKey:[...Ee,n,c,l,a.backend.id,a.orgId],queryFn:()=>Te.listOutputs(c,l,n),enabled:h,staleTime:60*1e3,gcTime:300*1e3,retry:!1}),_=u?Oe(g.error):null,v=f??_;return{data:g.data,error:_?null:g.error,isFetching:g.isFetching,isPending:g.isPending,isResolvingConversation:u&&o.isPending,conversationMissing:p,sandboxIssue:v}}var Ae={missing:o.AUTOMATIONS$DETAIL$LOGS_SANDBOX_MISSING,paused:o.AUTOMATIONS$DETAIL$LOGS_SANDBOX_PAUSED,starting:o.AUTOMATIONS$DETAIL$LOGS_SANDBOX_STARTING,errored:o.AUTOMATIONS$DETAIL$LOGS_SANDBOX_ERROR,unreachable:o.AUTOMATIONS$DETAIL$LOGS_SANDBOX_UNREACHABLE};function X(e,t){return[...e].sort((e,t)=>{let n=e.timestamp.localeCompare(t.timestamp);return n===0?(e.order??0)-(t.order??0):n}).map(e=>e[t]??``).join(``)}function je({conversationId:e,bashCommandId:t,isOpen:n,onClose:r}){let{t:i}=s(`openhands`),[a,c]=(0,I.useState)(`stdout`),{data:l,isFetching:u,isResolvingConversation:d,sandboxIssue:f,conversationMissing:p,error:m}=ke({conversationId:e,bashCommandId:t,enabled:n});(0,I.useEffect)(()=>{n&&c(`stdout`)},[n,t]),(0,I.useEffect)(()=>{if(!n)return;let e=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,r]);let{stdout:h,stderr:g}=(0,I.useMemo)(()=>l?{stdout:X(l,`stdout`),stderr:X(l,`stderr`)}:{stdout:``,stderr:``},[l]);if(!n)return null;let _=d||u&&!l,v=!t,y=a===`stdout`?h:g,b=`border-b-2 px-3 py-2 text-sm font-normal transition-colors focus:outline-none`,x=`border-[var(--oh-primary)] text-white`,S=`border-transparent text-muted hover:text-content`;return(0,L.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center p-4`,role:`dialog`,"aria-modal":`true`,"aria-label":i(o.AUTOMATIONS$DETAIL$LOGS_TITLE),children:[(0,L.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:r,onKeyDown:e=>{e.key===`Escape`&&r()},role:`presentation`}),(0,L.jsxs)(`div`,{className:`relative flex max-h-[80vh] w-full max-w-3xl flex-col rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:r,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":i(o.AUTOMATIONS$CANCEL),children:(0,L.jsx)(T,{className:`size-5`})}),(0,L.jsx)(`h2`,{className:`pr-8 text-lg font-medium text-white`,children:i(o.AUTOMATIONS$DETAIL$LOGS_TITLE)}),(0,L.jsxs)(`div`,{role:`tablist`,"aria-label":i(o.AUTOMATIONS$DETAIL$LOGS_TITLE),className:`mt-4 flex gap-1 border-b border-[var(--oh-border)]`,children:[(0,L.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":a===`stdout`,"aria-controls":`run-logs-panel-stdout`,id:`run-logs-tab-stdout`,tabIndex:a===`stdout`?0:-1,onClick:()=>c(`stdout`),className:`${b} ${a===`stdout`?x:S}`,children:i(o.AUTOMATIONS$DETAIL$LOGS_TAB_OUTPUT)}),(0,L.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":a===`stderr`,"aria-controls":`run-logs-panel-stderr`,id:`run-logs-tab-stderr`,tabIndex:a===`stderr`?0:-1,onClick:()=>c(`stderr`),className:`${b} ${a===`stderr`?x:S}`,children:i(o.AUTOMATIONS$DETAIL$LOGS_TAB_ERROR)})]}),(0,L.jsxs)(`div`,{role:`tabpanel`,id:`run-logs-panel-${a}`,"aria-labelledby":`run-logs-tab-${a}`,className:`mt-3 min-h-[12rem] flex-1 overflow-auto rounded-lg border border-[var(--oh-border)] bg-black/40 p-4 font-mono text-xs`,children:[v&&(0,L.jsx)(`p`,{className:`text-muted italic`,children:i(o.AUTOMATIONS$DETAIL$LOGS_NO_COMMAND)}),!v&&p&&(0,L.jsx)(`p`,{className:`text-muted italic`,children:i(o.AUTOMATIONS$DETAIL$LOGS_CONVERSATION_MISSING)}),!v&&!p&&f&&(0,L.jsx)(`p`,{"data-testid":`run-logs-sandbox-issue-${f}`,className:`text-muted italic`,children:i(Ae[f])}),!v&&!p&&!f&&_&&(0,L.jsx)(`p`,{className:`text-muted italic`,children:i(o.AUTOMATIONS$DETAIL$LOGS_LOADING)}),!v&&!p&&!f&&!_&&m&&!l&&(0,L.jsxs)(`p`,{className:`text-danger`,children:[i(o.AUTOMATIONS$DETAIL$LOGS_ERROR),`: `,String(m)]}),!_&&!f&&l&&(0,L.jsx)(`pre`,{"data-testid":`run-logs-output-${a}`,className:`whitespace-pre-wrap break-words ${a===`stderr`?`text-danger`:`text-content`}`,children:y.length>0?y:(0,L.jsx)(`span`,{className:`text-muted italic`,children:i(o.AUTOMATIONS$DETAIL$LOGS_EMPTY)})})]})]})]})}function Me(e,t){return new Date(e).toLocaleDateString(t,{weekday:`long`,year:`numeric`,month:`long`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}function Ne(e){if(!e)return!0;let t=new Date(e).getTime();return Number.isNaN(t)||t===0}function Pe(e){return`/conversations/${e}`}function Fe({run:e}){let{t,i18n:n}=s(`openhands`),r=!!e.conversation_id,i=!!e.bash_command_id,a=e.status===F.COMPLETED||e.status===F.FAILED,c=!r&&a,[l,u]=(0,I.useState)(!1),[d]=(0,I.useState)(()=>new Date().toISOString()),f=Me(Ne(e.started_at)?d:e.started_at,n.language),p=i?(0,L.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),e.preventDefault(),u(!0)},className:`rounded-md p-1 text-muted hover:bg-surface-raised hover:text-foreground focus:bg-surface-raised focus:outline-none`,"aria-label":t(o.AUTOMATIONS$DETAIL$LOGS_VIEW,{timestamp:f}),title:t(o.AUTOMATIONS$DETAIL$LOGS_VIEW_SHORT),children:(0,L.jsx)(S,{className:`size-4`})}):null,m=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(`span`,{className:`text-sm text-content`,children:f}),c&&(0,L.jsxs)(`span`,{className:`text-xs text-muted italic`,children:[`(`,t(o.AUTOMATIONS$DETAIL$NO_CONVERSATION),`)`]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p,(0,L.jsx)(Se,{status:e.status})]})]});return(0,L.jsxs)(L.Fragment,{children:[r&&e.conversation_id?(0,L.jsx)(`a`,{href:Pe(e.conversation_id),className:`flex items-center justify-between px-5 py-3 transition-colors cursor-pointer hover:bg-surface-raised focus:bg-surface-raised focus:outline-none`,"aria-label":`View conversation for run at ${f}`,children:m}):(0,L.jsx)(`div`,{className:`flex items-center justify-between px-5 py-3 cursor-default`,children:m}),i&&(0,L.jsx)(je,{conversationId:e.conversation_id,bashCommandId:e.bash_command_id,isOpen:l,onClose:()=>u(!1)})]})}var Z=20;function Ie({automationId:e}){let{t}=s(`openhands`),[n,r]=(0,I.useState)(Z),{data:i,isLoading:a}=ce({id:e,limit:n,offset:0}),c=i?i.total>i.runs.length:!1;return(0,L.jsxs)(`div`,{className:`rounded-2xl border border-[var(--oh-border)] bg-[var(--oh-surface)]`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-[var(--oh-border)] px-5 py-3`,children:[(0,L.jsx)(`span`,{className:`size-4 text-muted`,children:(0,L.jsx)(J,{className:`size-4`})}),(0,L.jsx)(`h3`,{className:`text-sm font-medium text-content`,children:t(o.AUTOMATIONS$DETAIL$ACTIVITY_LOG)})]}),a&&(0,L.jsx)(`div`,{className:`space-y-1 p-5`,children:Array.from({length:3}).map((e,t)=>(0,L.jsxs)(`div`,{className:`flex items-center justify-between py-3`,children:[(0,L.jsx)(`div`,{className:`h-5 w-64 animate-pulse rounded bg-surface-raised`}),(0,L.jsx)(`div`,{className:`h-6 w-24 animate-pulse rounded-full bg-surface-raised`})]},`skeleton-${t}`))}),!a&&i?.runs.length===0&&(0,L.jsx)(`p`,{className:`px-5 py-8 text-center text-sm text-muted`,children:t(o.AUTOMATIONS$DETAIL$NO_RUNS)}),!a&&i&&i.runs.length>0&&(0,L.jsxs)(`div`,{children:[i.runs.map((e,t)=>(0,L.jsx)(`div`,{className:t>0?`border-t border-[var(--oh-border)]`:``,children:(0,L.jsx)(Fe,{run:e})},e.id)),c&&(0,L.jsx)(`div`,{className:`border-t border-[var(--oh-border)] px-5 py-3`,children:(0,L.jsx)(`button`,{type:`button`,onClick:()=>r(e=>e+Z),className:`text-sm text-muted hover:text-foreground`,children:t(o.AUTOMATIONS$DETAIL$LOAD_MORE_RUNS)})})]})]})}function Q({className:e}){return(0,L.jsx)(`div`,{className:u(`animate-pulse rounded bg-surface-raised`,e)})}function $(){return(0,L.jsxs)(`div`,{className:`flex flex-col gap-4`,"data-testid":`detail-skeleton`,children:[(0,L.jsx)(Q,{className:`h-5 w-40`}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(Q,{className:`h-6 w-48`}),(0,L.jsx)(Q,{className:`h-6 w-16 rounded-full`})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(Q,{className:`h-6 w-11 rounded-full`}),(0,L.jsx)(Q,{className:`h-8 w-8`})]})]}),(0,L.jsx)(Q,{className:`h-5 w-96`}),(0,L.jsx)(Q,{className:`h-36 w-full rounded-2xl`}),(0,L.jsx)(Q,{className:`h-72 w-full rounded-2xl`}),(0,L.jsx)(Q,{className:`h-32 w-full rounded-2xl`}),(0,L.jsx)(Q,{className:`h-40 w-full rounded-2xl`})]})}function Le(){let{t:e}=s(`openhands`);return(0,L.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20`,children:[(0,L.jsx)(D,{className:`size-12 text-muted`}),(0,L.jsx)(`p`,{className:`mt-4 text-sm font-medium text-content`,children:e(o.AUTOMATIONS$DETAIL$NOT_FOUND_TITLE)}),(0,L.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:e(o.AUTOMATIONS$DETAIL$NOT_FOUND_MESSAGE)}),(0,L.jsx)(`div`,{className:`mt-6`,children:(0,L.jsx)(R,{})})]})}var Re=n(function(){let{t:e}=s(`openhands`),{automationId:t}=r(),{navigate:n}=g(),[i,a]=(0,I.useState)(!1),[u,d]=(0,I.useState)(!1),{data:f,isLoading:p,refetch:h}=ie(),_=f?.status===`ok`,y=m(),b=(0,I.useRef)(y.backend.id).current!==y.backend.id,{data:x,isLoading:S,isError:C,error:w,refetch:T}=se({id:t??``,enabled:_&&!b}),E=ee(),D=A(),O=te(),k=C&&v(w)&&w.response?.status===404;if(p)return(0,L.jsx)(`div`,{className:`min-h-full`,children:(0,L.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,L.jsx)($,{})})});if(!_)return(0,L.jsx)(`div`,{className:`min-h-full`,children:(0,L.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,L.jsx)(ae,{onRetry:h})})});if(S)return(0,L.jsx)(`div`,{className:`min-h-full`,children:(0,L.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,L.jsx)($,{})})});if(k)return(0,L.jsx)(`div`,{className:`min-h-full`,children:(0,L.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,L.jsx)(Le,{})})});if(C||!x)return(0,L.jsx)(`div`,{className:`min-h-full`,children:(0,L.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,L.jsx)(ne,{onRetry:()=>T()})})});let j=()=>{E.mutate({id:x.id,enabled:!x.enabled})},M=()=>{D.mutate(x.id,{onSuccess:()=>{n?.(`/automations`)}})},N=()=>{O.mutate(x.id,{onSuccess:()=>{l(e(o.AUTOMATIONS$RUN_NOW_SUCCESS))},onError:t=>{c(v(t)?t.response?.data?.message||t.message||e(o.AUTOMATIONS$RUN_NOW_ERROR):t.message||e(o.AUTOMATIONS$RUN_NOW_ERROR))}})},P=y.backend.kind===`local`;return(0,L.jsx)(`div`,{className:`min-h-full`,children:(0,L.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:(0,L.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,L.jsx)(R,{}),(0,L.jsx)(B,{automation:x,onToggle:j,onEdit:P?()=>d(!0):void 0,onDelete:()=>a(!0),onRunNow:N,isRunningNow:O.isPending}),x.prompt&&(0,L.jsx)(H,{prompt:x.prompt}),(0,L.jsx)(me,{automation:x}),x.plugins&&x.plugins.length>0&&(0,L.jsx)(ge,{plugins:x.plugins}),(0,L.jsx)(ve,{createdAt:x.created_at,lastRunAt:x.last_triggered_at}),(0,L.jsx)(Ie,{automationId:x.id}),(0,L.jsx)(re,{automationName:x.name,isOpen:i,onConfirm:M,onCancel:()=>a(!1)}),P&&(0,L.jsx)(oe,{automation:x,isOpen:u,onClose:()=>d(!1)})]})})})});export{Re as default};