@openhands/agent-canvas 1.16.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1093) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{acp-providers-CX3Lh9gj.js → acp-providers-DcY_mKYa.js} +1 -1
  4. package/build/assets/active-backend-context-BnH4-L8h.js +2 -0
  5. package/build/assets/{agent-context-settings-DSZlXrLj.js → agent-context-settings-D3peZkjX.js} +1 -1
  6. package/build/assets/agent-profiles-service.api-DkeZaqIl.js +1 -0
  7. package/build/assets/agent-profiles-settings-7yMWYjGF.js +1 -0
  8. package/build/assets/agent-server-client-options-EHB23gyx.js +1 -0
  9. package/build/assets/agent-server-config-C_x8Otd9.js +1 -0
  10. package/build/assets/agent-server-conversation-service.api-jiCopc2E.js +88 -0
  11. package/build/assets/agent-settings-BF8hM6wb.js +2 -0
  12. package/build/assets/agent-settings-YPutBAeR.js +1 -0
  13. package/build/assets/alert-banner-eYyqvHL3.js +1 -0
  14. package/build/assets/{api-error-message-B-XdSk3b.js → api-error-message-BXo0lCI5.js} +1 -1
  15. package/build/assets/api-key-entry-screen-CCBvBD8u.js +1 -0
  16. package/build/assets/app-settings-BtYDs-Be.js +1 -0
  17. package/build/assets/automation-detail-BxXhb_m2.js +3 -0
  18. package/build/assets/{automation-export-D3a3of4G.js → automation-export-BJsfi7n2.js} +1 -1
  19. package/build/assets/automation-git-sync-B7o_Nbl-.js +1 -0
  20. package/build/assets/automation-setup-route-qaJ6lLCf.js +3 -0
  21. package/build/assets/{automation-templates-BRppNh99.js → automation-templates-Bb98r-kx.js} +1 -1
  22. package/build/assets/automations-list-DEPVNud3.js +1 -0
  23. package/build/assets/{back-nav-button-Cjl_hoxq.js → back-nav-button-B2yBiVMB.js} +1 -1
  24. package/build/assets/backend-form-modal-DxisQV_6.js +1 -0
  25. package/build/assets/backend-synced-settings-badge-DLEp6cq7.js +1 -0
  26. package/build/assets/badge-ehL-kgeO.js +1 -0
  27. package/build/assets/{base-modal-D_L0oEbG.js → base-modal-C1a0TsSx.js} +1 -1
  28. package/build/assets/bot-ByolqPEr.js +1 -0
  29. package/build/assets/{brand-button-BAfk4wGP.js → brand-button-CUMfjb99.js} +1 -1
  30. package/build/assets/browser-SE24Tk8g.js +46 -0
  31. package/build/assets/browser-tab-HjJxHA0V.js +1 -0
  32. package/build/assets/canvas-extension-page-BsUGBb1T.js +1 -0
  33. package/build/assets/canvas-extensions-C9Tm6s_E.js +1 -0
  34. package/build/assets/{canvas-extensions-runtime-2_x5Ezmi.js → canvas-extensions-runtime-B8kxM4rO.js} +1 -1
  35. package/build/assets/{chat-send-button-MUQqCZCS.js → chat-send-button-CGvc2wpE.js} +1 -1
  36. package/build/assets/check-Bo8s5Ylg.js +1 -0
  37. package/build/assets/chevron-down-Cr6Fn_wS.js +1 -0
  38. package/build/assets/chevron-right-CfdfRn-8.js +1 -0
  39. package/build/assets/circle-check-5pH3qCji.js +1 -0
  40. package/build/assets/circle-plus-check-toggle-BDX_ctNs.js +1 -0
  41. package/build/assets/{cloud-funnel-analytics-CztBCCPp.js → cloud-funnel-analytics-D5uJ_4JE.js} +1 -1
  42. package/build/assets/{cog-D-MPQW6G.js → cog-CAEugqtV.js} +1 -1
  43. package/build/assets/command-menu-CQxs4mtX.js +1 -0
  44. package/build/assets/commits-tab-D0xgjipP.js +1 -0
  45. package/build/assets/{condenser-settings-DmEOje-7.js → condenser-settings-D63NJRBT.js} +1 -1
  46. package/build/assets/confirmation-modal-78sd9Vny.js +1 -0
  47. package/build/assets/{context-menu-list-item-I86vKcmM.js → context-menu-list-item-Cm7-7Y-7.js} +1 -1
  48. package/build/assets/conversation-B_nweu5p.js +93 -0
  49. package/build/assets/conversation-edjzrv5w.js +1 -0
  50. package/build/assets/conversation-panel-edjzrv5w.js +1 -0
  51. package/build/assets/conversation-state-store-9D_3P7q4.js +1 -0
  52. package/build/assets/conversation-store-DC-JlJuq.js +6 -0
  53. package/build/assets/{conversation-tab-empty-state-FIbh_lc8.js → conversation-tab-empty-state-B3dpJXX0.js} +1 -1
  54. package/build/assets/copy-to-clipboard-button-B1ljgNxO.js +1 -0
  55. package/build/assets/device-verify-D5QRIS_x.js +1 -0
  56. package/build/assets/{dropdown-classes-Bc1djN0-.js → dropdown-classes-BGvOvW2_.js} +1 -1
  57. package/build/assets/edit-automation-modal-D_JWSmxT.js +1 -0
  58. package/build/assets/empty-state-FK_s1B60.js +1 -0
  59. package/build/assets/{entry.client-CqyPPjOq.js → entry.client-BMafTpjO.js} +2 -2
  60. package/build/assets/enum-filter-dropdown-UNaom12H.js +1 -0
  61. package/build/assets/environment-switch-overlay-COibRUA-.js +1 -0
  62. package/build/assets/error-state-Cf8LRuuY.js +1 -0
  63. package/build/assets/extensions-hub-C_6ahIua.js +1 -0
  64. package/build/assets/extensions-navigation-C5GfpzFe.js +1 -0
  65. package/build/assets/external-link-Bd7Tga-1.js +1 -0
  66. package/build/assets/files-tab-D5PPIWI1.js +1 -0
  67. package/build/assets/{form-control-classes-Bkh5FGrD.js → form-control-classes-Dbq-7YP_.js} +1 -1
  68. package/build/assets/format-model-name-Dfh9Udrx.js +1 -0
  69. package/build/assets/get-git-path-jU2zjqIB.js +1 -0
  70. package/build/assets/git-repo-dropdown-BoDDWXfX.js +1 -0
  71. package/build/assets/git-repo-dropdown-uxlFw2gn.js +1 -0
  72. package/build/assets/highlighted-source-view-C7pAXrT0.js +1 -0
  73. package/build/assets/home-BM5_Wz_R.js +1 -0
  74. package/build/assets/home-Ivfm7KC4.js +1 -0
  75. package/build/assets/home-automation-run-tooltip-B1N2uO9p.js +1 -0
  76. package/build/assets/home-store-DCbei3DX.js +1 -0
  77. package/build/assets/hooks-service-Dnmhqc0Z.js +1 -0
  78. package/build/assets/index-home-td9BN2T3.js +1 -0
  79. package/build/assets/info-BcajzHn1.js +1 -0
  80. package/build/assets/install-server-modal-B81I-5OE.js +1 -0
  81. package/build/assets/kebab-menu-item-content-SCJBwZnp.js +1 -0
  82. package/build/assets/{key-BmVyxs-2.js → key-O84CMFHb.js} +1 -1
  83. package/build/assets/launch-ZLxI4opd.js +1 -0
  84. package/build/assets/list-filter-B8PQk3RA.js +1 -0
  85. package/build/assets/{list-todo-apgLVjMw.js → list-todo-Caa8E1X_.js} +1 -1
  86. package/build/assets/llm-not-configured-banner-Dh_ajcM8.js +27 -0
  87. package/build/assets/llm-settings-CODhjQzy.js +1 -0
  88. package/build/assets/llm-settings-CZaXYgtw.js +1 -0
  89. package/build/assets/llm-subscription-service-CgIDc38n.js +1 -0
  90. package/build/assets/loader-circle-BxJgk73D.js +1 -0
  91. package/build/assets/{loading-spinner-BY9N3pOe.js → loading-spinner-BeLV0IXf.js} +1 -1
  92. package/build/assets/manage-backends-modal-cMXqCb-B.js +1 -0
  93. package/build/assets/manifest-bfeccb98.js +1 -0
  94. package/build/assets/manifest-subpage-layout-CVZgVKoY.js +1 -0
  95. package/build/assets/{map-provider-Cu3Zgumb.js → map-provider-iRs80q_6.js} +1 -1
  96. package/build/assets/markdown-renderer-DyFl9-mL.js +8 -0
  97. package/build/assets/mcp-CraxoXQv.js +1 -0
  98. package/build/assets/{mcp-marketplace-utils-AIBzzHTO.js → mcp-marketplace-utils-C7PYr293.js} +1 -1
  99. package/build/assets/mcp-page-CteH_K0N.js +9 -0
  100. package/build/assets/messages-Bk1xhbU2.js +41 -0
  101. package/build/assets/{modal-body-BxZjsju9.js → modal-body-C24WsdFb.js} +1 -1
  102. package/build/assets/{modal-classes-C8eycCwG.js → modal-classes-B0b9eiL8.js} +1 -1
  103. package/build/assets/modal-close-button-DfqfB2Nj.js +1 -0
  104. package/build/assets/{mouse-pointer-click-Co2uyaPA.js → mouse-pointer-click-BXlRN92t.js} +1 -1
  105. package/build/assets/onboarding-DXFBRqEy.js +1 -0
  106. package/build/assets/onboarding-modal-BT3Gx_sZ.js +1 -0
  107. package/build/assets/organization-service.api-B5CvmnYQ.js +1 -0
  108. package/build/assets/pencil-q-ihqDYv.js +1 -0
  109. package/build/assets/pin-BdroVQdN.js +1 -0
  110. package/build/assets/planner-tab-CstoOlAB.js +1 -0
  111. package/build/assets/plug-7ACOEbMs.js +1 -0
  112. package/build/assets/plugins-management-service-5rqVPEGN.js +1 -0
  113. package/build/assets/plus-C2e21TFC.js +1 -0
  114. package/build/assets/profiles-service.api-D1XKMgr0.js +1 -0
  115. package/build/assets/providers-XmZ9HM4Q.js +1 -0
  116. package/build/assets/proxy-XP6U1Dhv.js +1 -0
  117. package/build/assets/{puzzle-JM_QaRm0.js → puzzle-LJYnuxKe.js} +1 -1
  118. package/build/assets/react-BX7IV650.js +1 -0
  119. package/build/assets/recommended-automations-launcher-DEHRKIAg.js +1 -0
  120. package/build/assets/refresh-cw-BtdC3T8P.js +1 -0
  121. package/build/assets/root-CM6IZHlg.css +1 -0
  122. package/build/assets/root-DdFkodKW.js +2 -0
  123. package/build/assets/root-layout-DUquNZTU.js +2 -0
  124. package/build/assets/schema-field-Y3F8JvXd.js +1 -0
  125. package/build/assets/scroll-fade-state-Dt_fx2kf.js +1 -0
  126. package/build/assets/sdk-section-page-CNZTLwH9.js +1 -0
  127. package/build/assets/secret-form-9-BoGA40.js +1 -0
  128. package/build/assets/secrets-service-BOIsfD9j.js +1 -0
  129. package/build/assets/secrets-settings-CBJgFr42.js +1 -0
  130. package/build/assets/settings-D4hdToD4.js +1 -0
  131. package/build/assets/settings-dropdown-input-DBvsZ7-Q.js +1 -0
  132. package/build/assets/settings-index-DeQphyBK.js +1 -0
  133. package/build/assets/settings-input-dVuzapBA.js +1 -0
  134. package/build/assets/{settings-list-classes-BzeSZbF2.js → settings-list-classes-DhAPuXm6.js} +1 -1
  135. package/build/assets/settings-modal-tHiJ8iYV.js +1 -0
  136. package/build/assets/settings-nav-GAQjW1a-.js +16 -0
  137. package/build/assets/settings-service.api-C1vZH9Vh.js +1 -0
  138. package/build/assets/settings-switch-DDd1cQ8t.js +1 -0
  139. package/build/assets/{settings-utils-UYpEdPuD.js → settings-utils-BTaaRhLZ.js} +1 -1
  140. package/build/assets/shared-conversation-Cyg7m7ns.js +1 -0
  141. package/build/assets/shield-check-C3Rl0NF8.js +1 -0
  142. package/build/assets/{sidebar-layout-D6fS8-Gl.js → sidebar-layout-DH0E-5KW.js} +1 -1
  143. package/build/assets/sidebar-mobile-menu-toggle-CQ4iky__.js +1 -0
  144. package/build/assets/{sidebar-nav-link-DQQcMf1A.js → sidebar-nav-link-oLQiKUBu.js} +1 -1
  145. package/build/assets/{sidebar-onboarding-checklist-storage-BBkeI6Bp.js → sidebar-onboarding-checklist-storage-TfvNNnnr.js} +1 -1
  146. package/build/assets/sidebar-store-DAZVH-DR.js +1 -0
  147. package/build/assets/skill-card-pill-row-DfjIfj0K.js +1 -0
  148. package/build/assets/{skill-filter-w__3UCEE.js → skill-filter-DsNLmn76.js} +2 -2
  149. package/build/assets/{skill-icon-badge-RQkq8wvl.js → skill-icon-badge-0MK_68Nc.js} +1 -1
  150. package/build/assets/skill-scope-BE-H9TSZ.js +1 -0
  151. package/build/assets/skills-plugins-vzSdxSk_.js +1 -0
  152. package/build/assets/skills-settings-BiPOH9H9.js +1 -0
  153. package/build/assets/styled-tooltip-CejG0rqv.js +1 -0
  154. package/build/assets/task-list-tab-OkZSqnTp.js +1 -0
  155. package/build/assets/{terminal-CNElN42a.js → terminal-Dph60VFZ.js} +2 -2
  156. package/build/assets/toggle-switch-B2uXaAUS.js +1 -0
  157. package/build/assets/trash-2-Bb40zQzs.js +1 -0
  158. package/build/assets/trash-Ckh7yCaB.js +1 -0
  159. package/build/assets/triangle-alert-DEdu-b_L.js +1 -0
  160. package/build/assets/{typography-v1KN0tzi.js → typography-DgcLGdHk.js} +1 -1
  161. package/build/assets/usage-tab-MCmNRAnR.js +1 -0
  162. package/build/assets/use-acp-credential-form-ychoGqjC.js +1 -0
  163. package/build/assets/use-activate-agent-profile-8L8Xdghy.js +1 -0
  164. package/build/assets/use-agent-profiles-Bi8hSkze.js +1 -0
  165. package/build/assets/{use-automation-health-E6NZi9rb.js → use-automation-health-U99vvHxx.js} +1 -1
  166. package/build/assets/use-automation-permissions-Buus0R6h.js +1 -0
  167. package/build/assets/{use-automations-xijQKIl9.js → use-automations-Bq5hVuv0.js} +1 -1
  168. package/build/assets/{use-can-manage-org-profiles-CrJP5262.js → use-can-manage-org-profiles-MzIeEV8F.js} +1 -1
  169. package/build/assets/use-canvas-extensions-Ca9KoVEm.js +1 -0
  170. package/build/assets/{use-cloud-current-user-id-CDfAHpPX.js → use-cloud-current-user-id-B4ZLUZSa.js} +1 -1
  171. package/build/assets/use-config-l5tkDHyD.js +1 -0
  172. package/build/assets/use-create-conversation-i_PdFdIs.js +1 -0
  173. package/build/assets/use-create-secret-CjWq0J4O.js +1 -0
  174. package/build/assets/use-free-models-gCsJ5BV0.js +1 -0
  175. package/build/assets/{use-get-secrets-K3jmk-LH.js → use-get-secrets-CMTuWEp_.js} +1 -1
  176. package/build/assets/use-is-authed-A2Yinlt0.js +1 -0
  177. package/build/assets/{use-launch-skill-in-chat-BYjYihBP.js → use-launch-skill-in-chat-QbXDhiHr.js} +1 -1
  178. package/build/assets/use-llm-configured-Dl4zg8ht.js +1 -0
  179. package/build/assets/use-llm-profiles-SWsuFmFu.js +1 -0
  180. package/build/assets/use-manifest-capabilities-CdqYfUAC.js +1 -0
  181. package/build/assets/use-onboarding-completion-Xl63ZvzQ.js +1 -0
  182. package/build/assets/use-pinned-home-route-BXDIUaxQ.js +1 -0
  183. package/build/assets/use-plugins-marketplace-BIIaPiaB.js +1 -0
  184. package/build/assets/use-save-agent-profile-D-ZHHE94.js +1 -0
  185. package/build/assets/{use-save-settings-DYqkKv7T.js → use-save-settings-Dapkf4cC.js} +1 -1
  186. package/build/assets/use-settings-C2KKQKVC.js +1 -0
  187. package/build/assets/use-settings-nav-items-TOc0Rsfd.js +1 -0
  188. package/build/assets/use-tracking-j4uo9VEW.js +3 -0
  189. package/build/assets/{use-user-conversation-B9Gebw_g.js → use-user-conversation-5UFqMoO4.js} +1 -1
  190. package/build/assets/{useInfiniteQuery-C926xzY4.js → useInfiniteQuery-CtSRG7uW.js} +1 -1
  191. package/build/assets/{useMutation-B-qc391N.js → useMutation-Cszf8mKy.js} +1 -1
  192. package/build/assets/useQueries-pUohFMSP.js +1 -0
  193. package/build/assets/useQuery-DAAacS7O.js +1 -0
  194. package/build/assets/useTranslation-CCgUjPJF.js +1 -0
  195. package/build/assets/utils-BgLSZdyy.js +1 -0
  196. package/build/assets/{vendor~conversation-panel~conversation-C8Fn4XOf.js → vendor~conversation-panel~conversation-C22sJuWZ.js} +1 -1
  197. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js +2 -0
  198. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js +185 -0
  199. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js +1 -0
  200. package/build/assets/{vendor~index-home~home~conversation-panel~conversation-hWywRBaR.js → vendor~index-home~home~conversation-panel~conversation-UTl7gUo9.js} +1 -1
  201. package/build/assets/vendor~root-layout-CcdIqs-C.js +1 -0
  202. package/build/assets/{vendor~root-layout~conversation-panel~conversation-BMbMgaGu.js → vendor~root-layout~conversation-panel~conversation-C3EBV3kp.js} +1 -1
  203. package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BCe0JJVy.js +1 -0
  204. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-j5MFqfSy.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BGGbPcYh.js} +1 -1
  205. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-CxhwKuAd.js +1 -0
  206. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~nj1hli3r-DP9wmsjo.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js} +1 -1
  207. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-CUmIwQCN.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js} +12 -6
  208. package/build/assets/{verification-settings-gw_q6vkL.js → verification-settings-DdBpaVPz.js} +1 -1
  209. package/build/assets/{wrench-CUEI1krB.js → wrench-B8Wg_nbp.js} +1 -1
  210. package/build/assets/x-CX8lVGwm.js +1 -0
  211. package/build/index.html +4 -4
  212. package/build/locales/ar/openhands.json +79 -22
  213. package/build/locales/ca/openhands.json +79 -22
  214. package/build/locales/de/openhands.json +79 -22
  215. package/build/locales/en/openhands.json +79 -22
  216. package/build/locales/es/openhands.json +79 -22
  217. package/build/locales/fr/openhands.json +79 -22
  218. package/build/locales/it/openhands.json +79 -22
  219. package/build/locales/ja/openhands.json +79 -22
  220. package/build/locales/ko-KR/openhands.json +79 -22
  221. package/build/locales/no/openhands.json +79 -22
  222. package/build/locales/pt/openhands.json +79 -22
  223. package/build/locales/tr/openhands.json +79 -22
  224. package/build/locales/uk/openhands.json +79 -22
  225. package/build/locales/zh-CN/openhands.json +79 -22
  226. package/build/locales/zh-TW/openhands.json +79 -22
  227. package/config/defaults.json +3 -3
  228. package/dist/api/agent-server-adapter.cjs +3 -3
  229. package/dist/api/agent-server-adapter.cjs.map +1 -1
  230. package/dist/api/agent-server-adapter.d.ts +72 -12
  231. package/dist/api/agent-server-adapter.js +234 -132
  232. package/dist/api/agent-server-adapter.js.map +1 -1
  233. package/dist/api/agent-server-config.cjs +1 -1
  234. package/dist/api/agent-server-config.cjs.map +1 -1
  235. package/dist/api/agent-server-config.d.ts +6 -0
  236. package/dist/api/agent-server-config.js +6 -3
  237. package/dist/api/agent-server-config.js.map +1 -1
  238. package/dist/api/automation-service/automation-service.api.cjs +1 -1
  239. package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
  240. package/dist/api/automation-service/automation-service.api.d.ts +2 -2
  241. package/dist/api/automation-service/automation-service.api.js +7 -7
  242. package/dist/api/automation-service/automation-service.api.js.map +1 -1
  243. package/dist/api/cloud/organization-service.api.cjs.map +1 -1
  244. package/dist/api/cloud/organization-service.api.d.ts +9 -1
  245. package/dist/api/cloud/organization-service.api.js.map +1 -1
  246. package/dist/api/cloud/provider-connections-service.api.cjs +2 -0
  247. package/dist/api/cloud/provider-connections-service.api.cjs.map +1 -0
  248. package/dist/api/cloud/provider-connections-service.api.d.ts +5 -0
  249. package/dist/api/cloud/provider-connections-service.api.js +50 -0
  250. package/dist/api/cloud/provider-connections-service.api.js.map +1 -0
  251. package/dist/api/cloud/skills-service.api.cjs +1 -1
  252. package/dist/api/cloud/skills-service.api.cjs.map +1 -1
  253. package/dist/api/cloud/skills-service.api.d.ts +10 -0
  254. package/dist/api/cloud/skills-service.api.js +11 -1
  255. package/dist/api/cloud/skills-service.api.js.map +1 -1
  256. package/dist/api/config-service/config-service.api.cjs +1 -1
  257. package/dist/api/config-service/config-service.api.cjs.map +1 -1
  258. package/dist/api/config-service/config-service.api.js +6 -2
  259. package/dist/api/config-service/config-service.api.js.map +1 -1
  260. package/dist/api/config-service/config-service.types.d.ts +13 -0
  261. package/dist/api/conversation-metadata-store.cjs +1 -1
  262. package/dist/api/conversation-metadata-store.cjs.map +1 -1
  263. package/dist/api/conversation-metadata-store.d.ts +24 -0
  264. package/dist/api/conversation-metadata-store.js +10 -2
  265. package/dist/api/conversation-metadata-store.js.map +1 -1
  266. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  267. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  268. package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +20 -0
  269. package/dist/api/conversation-service/agent-server-conversation-service.api.js +126 -77
  270. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  271. package/dist/api/hooks-service.cjs +2 -0
  272. package/dist/api/hooks-service.cjs.map +1 -0
  273. package/dist/api/hooks-service.d.ts +13 -0
  274. package/dist/api/hooks-service.js +20 -0
  275. package/dist/api/hooks-service.js.map +1 -0
  276. package/dist/api/provider-connections-service/provider-connections-service.api.cjs +1 -1
  277. package/dist/api/provider-connections-service/provider-connections-service.api.cjs.map +1 -1
  278. package/dist/api/provider-connections-service/provider-connections-service.api.js +25 -16
  279. package/dist/api/provider-connections-service/provider-connections-service.api.js.map +1 -1
  280. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  281. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  282. package/dist/api/settings-service/settings-service.api.d.ts +2 -0
  283. package/dist/api/settings-service/settings-service.api.js +18 -10
  284. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  285. package/dist/api/skills-service.cjs +1 -1
  286. package/dist/api/skills-service.cjs.map +1 -1
  287. package/dist/api/skills-service.d.ts +7 -0
  288. package/dist/api/skills-service.js +11 -8
  289. package/dist/api/skills-service.js.map +1 -1
  290. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
  291. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
  292. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs +1 -1
  293. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs.map +1 -1
  294. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js +2 -1
  295. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js.map +1 -1
  296. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs +1 -1
  297. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs.map +1 -1
  298. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
  299. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js +28 -28
  300. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js.map +1 -1
  301. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs +1 -1
  302. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs.map +1 -1
  303. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js +2 -1
  304. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js.map +1 -1
  305. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs +1 -1
  306. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs.map +1 -1
  307. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +1 -1
  308. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js +37 -37
  309. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js.map +1 -1
  310. package/dist/components/conversation-events/chat/event-message.cjs +2 -2
  311. package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
  312. package/dist/components/conversation-events/chat/event-message.js +79 -70
  313. package/dist/components/conversation-events/chat/event-message.js.map +1 -1
  314. package/dist/components/conversation-events/chat/messages.cjs +1 -1
  315. package/dist/components/conversation-events/chat/messages.cjs.map +1 -1
  316. package/dist/components/conversation-events/chat/messages.js +28 -27
  317. package/dist/components/conversation-events/chat/messages.js.map +1 -1
  318. package/dist/components/features/automations/automation-card.cjs +1 -1
  319. package/dist/components/features/automations/automation-card.cjs.map +1 -1
  320. package/dist/components/features/automations/automation-card.js +104 -97
  321. package/dist/components/features/automations/automation-card.js.map +1 -1
  322. package/dist/components/features/automations/automation-list-row.cjs +1 -1
  323. package/dist/components/features/automations/automation-list-row.cjs.map +1 -1
  324. package/dist/components/features/automations/automation-list-row.js +89 -77
  325. package/dist/components/features/automations/automation-list-row.js.map +1 -1
  326. package/dist/components/features/automations/build-automation-menu-items.cjs +1 -1
  327. package/dist/components/features/automations/build-automation-menu-items.cjs.map +1 -1
  328. package/dist/components/features/automations/build-automation-menu-items.d.ts +3 -1
  329. package/dist/components/features/automations/build-automation-menu-items.js +12 -11
  330. package/dist/components/features/automations/build-automation-menu-items.js.map +1 -1
  331. package/dist/components/features/automations/detail/configuration-section.d.ts +7 -1
  332. package/dist/components/features/automations/detail/detail-header.d.ts +10 -5
  333. package/dist/components/features/automations/detail/run-status-badge.cjs +1 -1
  334. package/dist/components/features/automations/detail/run-status-badge.cjs.map +1 -1
  335. package/dist/components/features/automations/detail/run-status-badge.d.ts +2 -2
  336. package/dist/components/features/automations/detail/run-status-badge.js +82 -53
  337. package/dist/components/features/automations/detail/run-status-badge.js.map +1 -1
  338. package/dist/components/features/automations/kebab-menu.cjs +1 -1
  339. package/dist/components/features/automations/kebab-menu.cjs.map +1 -1
  340. package/dist/components/features/automations/kebab-menu.js +9 -5
  341. package/dist/components/features/automations/kebab-menu.js.map +1 -1
  342. package/dist/components/features/automations/recommended-automations-launcher.cjs +1 -1
  343. package/dist/components/features/automations/recommended-automations-launcher.cjs.map +1 -1
  344. package/dist/components/features/automations/recommended-automations-launcher.js +12 -12
  345. package/dist/components/features/automations/recommended-automations-launcher.js.map +1 -1
  346. package/dist/components/features/automations/recommended-automations-section.cjs +1 -1
  347. package/dist/components/features/automations/recommended-automations-section.js +9 -9
  348. package/dist/components/features/backends/backend-selector.cjs +1 -1
  349. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  350. package/dist/components/features/backends/backend-selector.js +123 -112
  351. package/dist/components/features/backends/backend-selector.js.map +1 -1
  352. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  353. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  354. package/dist/components/features/backends/manage-backends-modal.js +29 -29
  355. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  356. package/dist/components/features/chat/change-agent-button.cjs +1 -1
  357. package/dist/components/features/chat/change-agent-button.js +4 -4
  358. package/dist/components/features/chat/chat-interface.cjs +2 -2
  359. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  360. package/dist/components/features/chat/chat-interface.js +137 -137
  361. package/dist/components/features/chat/chat-interface.js.map +1 -1
  362. package/dist/components/features/chat/chat-message.cjs +1 -1
  363. package/dist/components/features/chat/chat-message.cjs.map +1 -1
  364. package/dist/components/features/chat/chat-message.d.ts +2 -1
  365. package/dist/components/features/chat/chat-message.js +88 -79
  366. package/dist/components/features/chat/chat-message.js.map +1 -1
  367. package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs +1 -1
  368. package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -1
  369. package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +62 -61
  370. package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -1
  371. package/dist/components/features/chat/components/context-window-meter.cjs +1 -1
  372. package/dist/components/features/chat/components/context-window-meter.js +4 -4
  373. package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
  374. package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
  375. package/dist/components/features/chat/generic-event-message.cjs +1 -1
  376. package/dist/components/features/chat/generic-event-message.cjs.map +1 -1
  377. package/dist/components/features/chat/generic-event-message.d.ts +2 -1
  378. package/dist/components/features/chat/generic-event-message.js +41 -22
  379. package/dist/components/features/chat/generic-event-message.js.map +1 -1
  380. package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
  381. package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
  382. package/dist/components/features/chat/interactive-chat-box.js +20 -19
  383. package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
  384. package/dist/components/features/chat/model-messages.cjs +1 -1
  385. package/dist/components/features/chat/model-messages.cjs.map +1 -1
  386. package/dist/components/features/chat/model-messages.js +27 -26
  387. package/dist/components/features/chat/model-messages.js.map +1 -1
  388. package/dist/components/features/conversation/conversation-overview-git-section.cjs +1 -1
  389. package/dist/components/features/conversation/conversation-overview-git-section.js +4 -4
  390. package/dist/components/features/conversation/conversation-overview-skills-panel.cjs +1 -1
  391. package/dist/components/features/conversation/conversation-overview-skills-panel.js +4 -4
  392. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
  393. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
  394. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +77 -78
  395. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
  396. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
  397. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
  398. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +88 -88
  399. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
  400. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs +2 -0
  401. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs.map +1 -0
  402. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.d.ts +21 -0
  403. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js +239 -0
  404. package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js.map +1 -0
  405. package/dist/components/features/conversation-panel/budget-display.cjs +1 -1
  406. package/dist/components/features/conversation-panel/budget-display.cjs.map +1 -1
  407. package/dist/components/features/conversation-panel/budget-display.d.ts +1 -2
  408. package/dist/components/features/conversation-panel/budget-display.js +12 -19
  409. package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
  410. package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs +2 -0
  411. package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs.map +1 -0
  412. package/dist/components/features/conversation-panel/conversation-active-tag-filters.d.ts +28 -0
  413. package/dist/components/features/conversation-panel/conversation-active-tag-filters.js +69 -0
  414. package/dist/components/features/conversation-panel/conversation-active-tag-filters.js.map +1 -0
  415. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
  416. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs.map +1 -1
  417. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +2 -1
  418. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +19 -18
  419. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js.map +1 -1
  420. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
  421. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
  422. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +2 -1
  423. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +91 -80
  424. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
  425. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
  426. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
  427. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +45 -44
  428. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
  429. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs +1 -1
  430. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs.map +1 -1
  431. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js +1 -1
  432. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js.map +1 -1
  433. package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs +1 -1
  434. package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs.map +1 -1
  435. package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +7 -1
  436. package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +87 -81
  437. package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
  438. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs +1 -1
  439. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs.map +1 -1
  440. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.d.ts +2 -1
  441. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js +1 -1
  442. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js.map +1 -1
  443. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs +1 -1
  444. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs.map +1 -1
  445. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.d.ts +2 -1
  446. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js +2 -1
  447. package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js.map +1 -1
  448. package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs +2 -0
  449. package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs.map +1 -0
  450. package/dist/components/features/conversation-panel/conversation-layouts-menu.d.ts +29 -0
  451. package/dist/components/features/conversation-panel/conversation-layouts-menu.js +177 -0
  452. package/dist/components/features/conversation-panel/conversation-layouts-menu.js.map +1 -0
  453. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
  454. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
  455. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +37 -0
  456. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +85 -45
  457. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
  458. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  459. package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
  460. package/dist/components/features/conversation-panel/conversation-panel.js +296 -290
  461. package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
  462. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs +2 -0
  463. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs.map +1 -0
  464. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.d.ts +22 -0
  465. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js +153 -0
  466. package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js.map +1 -0
  467. package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs +2 -0
  468. package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs.map +1 -0
  469. package/dist/components/features/conversation-panel/hide-older-conversations-row.d.ts +6 -0
  470. package/dist/components/features/conversation-panel/hide-older-conversations-row.js +65 -0
  471. package/dist/components/features/conversation-panel/hide-older-conversations-row.js.map +1 -0
  472. package/dist/components/features/conversation-panel/menu-row.cjs +1 -1
  473. package/dist/components/features/conversation-panel/menu-row.cjs.map +1 -1
  474. package/dist/components/features/conversation-panel/menu-row.d.ts +11 -1
  475. package/dist/components/features/conversation-panel/menu-row.js +27 -16
  476. package/dist/components/features/conversation-panel/menu-row.js.map +1 -1
  477. package/dist/components/features/home/featured-automations/automation-health-indicator.cjs +1 -1
  478. package/dist/components/features/home/featured-automations/automation-health-indicator.cjs.map +1 -1
  479. package/dist/components/features/home/featured-automations/automation-health-indicator.js +1 -1
  480. package/dist/components/features/home/featured-automations/automation-health-indicator.js.map +1 -1
  481. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs +1 -1
  482. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs.map +1 -1
  483. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +4 -3
  484. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js +22 -25
  485. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js.map +1 -1
  486. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs +1 -1
  487. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs.map +1 -1
  488. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +1 -1
  489. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js +15 -15
  490. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js.map +1 -1
  491. package/dist/components/features/home/featured-automations/automation-run-health.cjs +1 -1
  492. package/dist/components/features/home/featured-automations/automation-run-health.cjs.map +1 -1
  493. package/dist/components/features/home/featured-automations/automation-run-health.d.ts +5 -3
  494. package/dist/components/features/home/featured-automations/automation-run-health.js +30 -23
  495. package/dist/components/features/home/featured-automations/automation-run-health.js.map +1 -1
  496. package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +1 -2
  497. package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +0 -1
  498. package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +3 -2
  499. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
  500. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
  501. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +1 -1
  502. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +42 -42
  503. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
  504. package/dist/components/features/images/image-lightbox.cjs +2 -0
  505. package/dist/components/features/images/image-lightbox.cjs.map +1 -0
  506. package/dist/components/features/images/image-lightbox.d.ts +11 -0
  507. package/dist/components/features/images/image-lightbox.js +37 -0
  508. package/dist/components/features/images/image-lightbox.js.map +1 -0
  509. package/dist/components/features/images/image-preview.cjs +1 -1
  510. package/dist/components/features/images/image-preview.cjs.map +1 -1
  511. package/dist/components/features/images/image-preview.d.ts +2 -1
  512. package/dist/components/features/images/image-preview.js +33 -13
  513. package/dist/components/features/images/image-preview.js.map +1 -1
  514. package/dist/components/features/manifest/manifest-form-field.d.ts +3 -1
  515. package/dist/components/features/manifest/manifest-review-step.d.ts +3 -1
  516. package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +3 -4
  517. package/dist/components/features/settings/cloud-settings-link.cjs +1 -1
  518. package/dist/components/features/settings/cloud-settings-link.cjs.map +1 -1
  519. package/dist/components/features/settings/cloud-settings-link.d.ts +3 -1
  520. package/dist/components/features/settings/cloud-settings-link.js +22 -19
  521. package/dist/components/features/settings/cloud-settings-link.js.map +1 -1
  522. package/dist/components/features/settings/integrations-settings-link.cjs +1 -1
  523. package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -1
  524. package/dist/components/features/settings/integrations-settings-link.d.ts +3 -1
  525. package/dist/components/features/settings/integrations-settings-link.js +20 -17
  526. package/dist/components/features/settings/integrations-settings-link.js.map +1 -1
  527. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
  528. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +3 -2
  529. package/dist/components/features/settings/llm-profiles/profile-row.cjs +1 -1
  530. package/dist/components/features/settings/llm-profiles/profile-row.js +1 -1
  531. package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +2 -2
  532. package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs +1 -1
  533. package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs.map +1 -1
  534. package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +8 -7
  535. package/dist/components/features/settings/sdk-settings/sdk-section-page.js +172 -142
  536. package/dist/components/features/settings/sdk-settings/sdk-section-page.js.map +1 -1
  537. package/dist/components/features/settings/secrets-settings/secret-form.cjs +1 -1
  538. package/dist/components/features/settings/secrets-settings/secret-form.cjs.map +1 -1
  539. package/dist/components/features/settings/secrets-settings/secret-form.js +38 -25
  540. package/dist/components/features/settings/secrets-settings/secret-form.js.map +1 -1
  541. package/dist/components/features/settings/settings-dropdown-input.cjs +1 -1
  542. package/dist/components/features/settings/settings-dropdown-input.js +6 -6
  543. package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
  544. package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
  545. package/dist/components/features/sidebar/sidebar-rail-body.d.ts +4 -1
  546. package/dist/components/features/sidebar/sidebar-rail-body.js +157 -139
  547. package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
  548. package/dist/components/features/sidebar/sidebar.cjs +1 -1
  549. package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
  550. package/dist/components/features/sidebar/sidebar.js +28 -26
  551. package/dist/components/features/sidebar/sidebar.js.map +1 -1
  552. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.cjs +1 -1
  553. package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.js +3 -3
  554. package/dist/components/features/skills/extensions-navigation.cjs +1 -1
  555. package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
  556. package/dist/components/features/skills/extensions-navigation.js +3 -3
  557. package/dist/components/features/skills/extensions-navigation.js.map +1 -1
  558. package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
  559. package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
  560. package/dist/components/providers/agent-server-ui-providers.js +33 -29
  561. package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
  562. package/dist/components/shared/buttons/remove-button.cjs +1 -1
  563. package/dist/components/shared/buttons/remove-button.cjs.map +1 -1
  564. package/dist/components/shared/buttons/remove-button.d.ts +2 -1
  565. package/dist/components/shared/buttons/remove-button.js +2 -1
  566. package/dist/components/shared/buttons/remove-button.js.map +1 -1
  567. package/dist/components/shared/buttons/styled-tooltip.cjs +1 -1
  568. package/dist/components/shared/buttons/styled-tooltip.cjs.map +1 -1
  569. package/dist/components/shared/buttons/styled-tooltip.d.ts +2 -1
  570. package/dist/components/shared/buttons/styled-tooltip.js +2 -1
  571. package/dist/components/shared/buttons/styled-tooltip.js.map +1 -1
  572. package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
  573. package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
  574. package/dist/components/shared/filters/enum-filter-dropdown.d.ts +5 -1
  575. package/dist/components/shared/filters/enum-filter-dropdown.js +14 -14
  576. package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
  577. package/dist/components/shared/free-models-note.cjs +2 -0
  578. package/dist/components/shared/free-models-note.cjs.map +1 -0
  579. package/dist/components/shared/free-models-note.d.ts +3 -0
  580. package/dist/components/shared/free-models-note.js +20 -0
  581. package/dist/components/shared/free-models-note.js.map +1 -0
  582. package/dist/components/shared/modals/confirmation-modal.cjs +1 -1
  583. package/dist/components/shared/modals/confirmation-modal.cjs.map +1 -1
  584. package/dist/components/shared/modals/confirmation-modal.d.ts +2 -1
  585. package/dist/components/shared/modals/confirmation-modal.js +8 -8
  586. package/dist/components/shared/modals/confirmation-modal.js.map +1 -1
  587. package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
  588. package/dist/components/shared/modals/settings/model-selector.cjs.map +1 -1
  589. package/dist/components/shared/modals/settings/model-selector.js +102 -112
  590. package/dist/components/shared/modals/settings/model-selector.js.map +1 -1
  591. package/dist/config/defaults.cjs +1 -1
  592. package/dist/config/defaults.cjs.map +1 -1
  593. package/dist/config/defaults.js +3 -3
  594. package/dist/config/defaults.js.map +1 -1
  595. package/dist/constants/acp-providers.cjs.map +1 -1
  596. package/dist/constants/acp-providers.d.ts +12 -0
  597. package/dist/constants/acp-providers.js.map +1 -1
  598. package/dist/constants/settings-nav.d.ts +8 -0
  599. package/dist/contexts/conversation-websocket-context.cjs +3 -3
  600. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  601. package/dist/contexts/conversation-websocket-context.d.ts +5 -0
  602. package/dist/contexts/conversation-websocket-context.js +194 -198
  603. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  604. package/dist/contexts/websocket-provider-wrapper.cjs +1 -1
  605. package/dist/contexts/websocket-provider-wrapper.cjs.map +1 -1
  606. package/dist/contexts/websocket-provider-wrapper.js +31 -15
  607. package/dist/contexts/websocket-provider-wrapper.js.map +1 -1
  608. package/dist/hooks/chat/record-model-switch-message.cjs +1 -1
  609. package/dist/hooks/chat/record-model-switch-message.cjs.map +1 -1
  610. package/dist/hooks/chat/record-model-switch-message.d.ts +31 -0
  611. package/dist/hooks/chat/record-model-switch-message.js +25 -12
  612. package/dist/hooks/chat/record-model-switch-message.js.map +1 -1
  613. package/dist/hooks/chat/use-plan-mode-interceptor.cjs +2 -0
  614. package/dist/hooks/chat/use-plan-mode-interceptor.cjs.map +1 -0
  615. package/dist/hooks/chat/use-plan-mode-interceptor.d.ts +16 -0
  616. package/dist/hooks/chat/use-plan-mode-interceptor.js +43 -0
  617. package/dist/hooks/chat/use-plan-mode-interceptor.js.map +1 -0
  618. package/dist/hooks/chat/use-slash-command.cjs +1 -1
  619. package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
  620. package/dist/hooks/chat/use-slash-command.js +63 -62
  621. package/dist/hooks/chat/use-slash-command.js.map +1 -1
  622. package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
  623. package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
  624. package/dist/hooks/mutation/use-create-conversation.js +5 -1
  625. package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
  626. package/dist/hooks/mutation/use-read-conversation-file.cjs +1 -1
  627. package/dist/hooks/mutation/use-read-conversation-file.cjs.map +1 -1
  628. package/dist/hooks/mutation/use-read-conversation-file.js +11 -4
  629. package/dist/hooks/mutation/use-read-conversation-file.js.map +1 -1
  630. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  631. package/dist/hooks/mutation/use-save-settings.js +3 -3
  632. package/dist/hooks/mutation/use-switch-llm-profile.cjs +1 -1
  633. package/dist/hooks/mutation/use-switch-llm-profile.cjs.map +1 -1
  634. package/dist/hooks/mutation/use-switch-llm-profile.js +13 -25
  635. package/dist/hooks/mutation/use-switch-llm-profile.js.map +1 -1
  636. package/dist/hooks/mutation/use-update-conversation-tags.cjs +2 -0
  637. package/dist/hooks/mutation/use-update-conversation-tags.cjs.map +1 -0
  638. package/dist/hooks/mutation/use-update-conversation-tags.d.ts +8 -0
  639. package/dist/hooks/mutation/use-update-conversation-tags.js +45 -0
  640. package/dist/hooks/mutation/use-update-conversation-tags.js.map +1 -0
  641. package/dist/hooks/query/query-keys.cjs +1 -1
  642. package/dist/hooks/query/query-keys.cjs.map +1 -1
  643. package/dist/hooks/query/query-keys.d.ts +6 -0
  644. package/dist/hooks/query/query-keys.js +2 -2
  645. package/dist/hooks/query/query-keys.js.map +1 -1
  646. package/dist/hooks/query/use-automation-sdk-version.cjs +1 -1
  647. package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
  648. package/dist/hooks/query/use-automation-sdk-version.d.ts +0 -1
  649. package/dist/hooks/query/use-automation-sdk-version.js +30 -55
  650. package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
  651. package/dist/hooks/query/use-conversation-skills.cjs +1 -1
  652. package/dist/hooks/query/use-conversation-skills.cjs.map +1 -1
  653. package/dist/hooks/query/use-conversation-skills.d.ts +14 -5
  654. package/dist/hooks/query/use-conversation-skills.js +20 -4
  655. package/dist/hooks/query/use-conversation-skills.js.map +1 -1
  656. package/dist/hooks/query/use-free-models.cjs +2 -0
  657. package/dist/hooks/query/use-free-models.cjs.map +1 -0
  658. package/dist/hooks/query/use-free-models.d.ts +23 -0
  659. package/dist/hooks/query/use-free-models.js +67 -0
  660. package/dist/hooks/query/use-free-models.js.map +1 -0
  661. package/dist/hooks/query/use-local-git-info.cjs.map +1 -1
  662. package/dist/hooks/query/use-local-git-info.js.map +1 -1
  663. package/dist/hooks/query/use-provider-connections.cjs +1 -1
  664. package/dist/hooks/query/use-provider-connections.cjs.map +1 -1
  665. package/dist/hooks/query/use-provider-connections.d.ts +6 -3
  666. package/dist/hooks/query/use-provider-connections.js +7 -3
  667. package/dist/hooks/query/use-provider-connections.js.map +1 -1
  668. package/dist/hooks/query/use-provider-models.cjs +1 -1
  669. package/dist/hooks/query/use-provider-models.cjs.map +1 -1
  670. package/dist/hooks/query/use-provider-models.js +34 -25
  671. package/dist/hooks/query/use-provider-models.js.map +1 -1
  672. package/dist/hooks/query/use-search-providers.cjs +1 -1
  673. package/dist/hooks/query/use-search-providers.cjs.map +1 -1
  674. package/dist/hooks/query/use-search-providers.js +31 -19
  675. package/dist/hooks/query/use-search-providers.js.map +1 -1
  676. package/dist/hooks/query/use-sub-conversations.cjs +1 -1
  677. package/dist/hooks/query/use-sub-conversations.cjs.map +1 -1
  678. package/dist/hooks/query/use-sub-conversations.js +16 -16
  679. package/dist/hooks/query/use-sub-conversations.js.map +1 -1
  680. package/dist/hooks/use-acp-model-context.cjs +1 -1
  681. package/dist/hooks/use-acp-model-context.js +3 -3
  682. package/dist/hooks/use-agent-state.cjs +1 -1
  683. package/dist/hooks/use-agent-state.cjs.map +1 -1
  684. package/dist/hooks/use-agent-state.d.ts +17 -1
  685. package/dist/hooks/use-agent-state.js +19 -9
  686. package/dist/hooks/use-agent-state.js.map +1 -1
  687. package/dist/hooks/use-automation-permissions.cjs +2 -0
  688. package/dist/hooks/use-automation-permissions.cjs.map +1 -0
  689. package/dist/hooks/use-automation-permissions.d.ts +43 -0
  690. package/dist/hooks/use-automation-permissions.js +52 -0
  691. package/dist/hooks/use-automation-permissions.js.map +1 -0
  692. package/dist/hooks/use-chat-input-model-state.cjs +1 -1
  693. package/dist/hooks/use-chat-input-model-state.js +3 -3
  694. package/dist/hooks/use-handle-plan-click.cjs +1 -1
  695. package/dist/hooks/use-handle-plan-click.cjs.map +1 -1
  696. package/dist/hooks/use-handle-plan-click.d.ts +3 -1
  697. package/dist/hooks/use-handle-plan-click.js +85 -26
  698. package/dist/hooks/use-handle-plan-click.js.map +1 -1
  699. package/dist/hooks/use-home-automation-actions.cjs +1 -1
  700. package/dist/hooks/use-home-automation-actions.cjs.map +1 -1
  701. package/dist/hooks/use-home-automation-actions.d.ts +1 -2
  702. package/dist/hooks/use-home-automation-actions.js +1 -1
  703. package/dist/hooks/use-home-automation-actions.js.map +1 -1
  704. package/dist/hooks/use-llm-configured.cjs +1 -1
  705. package/dist/hooks/use-llm-configured.js +3 -3
  706. package/dist/hooks/use-manifest-preflight.d.ts +1 -1
  707. package/dist/hooks/use-unified-websocket-status.cjs +1 -1
  708. package/dist/hooks/use-unified-websocket-status.cjs.map +1 -1
  709. package/dist/hooks/use-unified-websocket-status.d.ts +7 -0
  710. package/dist/hooks/use-unified-websocket-status.js +5 -1
  711. package/dist/hooks/use-unified-websocket-status.js.map +1 -1
  712. package/dist/i18n/declaration.cjs +1 -1
  713. package/dist/i18n/declaration.cjs.map +1 -1
  714. package/dist/i18n/declaration.d.ts +71 -14
  715. package/dist/i18n/declaration.js +1 -1
  716. package/dist/i18n/declaration.js.map +1 -1
  717. package/dist/i18n/translation.cjs +2 -2
  718. package/dist/i18n/translation.cjs.map +1 -1
  719. package/dist/i18n/translation.js +1281 -312
  720. package/dist/i18n/translation.js.map +1 -1
  721. package/dist/locales/ar/openhands.json +79 -22
  722. package/dist/locales/ca/openhands.json +79 -22
  723. package/dist/locales/de/openhands.json +79 -22
  724. package/dist/locales/en/openhands.json +79 -22
  725. package/dist/locales/es/openhands.json +79 -22
  726. package/dist/locales/fr/openhands.json +79 -22
  727. package/dist/locales/it/openhands.json +79 -22
  728. package/dist/locales/ja/openhands.json +79 -22
  729. package/dist/locales/ko-KR/openhands.json +79 -22
  730. package/dist/locales/no/openhands.json +79 -22
  731. package/dist/locales/pt/openhands.json +79 -22
  732. package/dist/locales/tr/openhands.json +79 -22
  733. package/dist/locales/uk/openhands.json +79 -22
  734. package/dist/locales/zh-CN/openhands.json +79 -22
  735. package/dist/locales/zh-TW/openhands.json +79 -22
  736. package/dist/manifests/automation-insights.cjs.map +1 -1
  737. package/dist/manifests/automation-insights.d.ts +10 -2
  738. package/dist/manifests/automation-insights.js.map +1 -1
  739. package/dist/manifests/automation-setup.cjs +1 -1
  740. package/dist/manifests/automation-setup.cjs.map +1 -1
  741. package/dist/manifests/automation-setup.d.ts +9 -16
  742. package/dist/manifests/automation-setup.js +17 -7
  743. package/dist/manifests/automation-setup.js.map +1 -1
  744. package/dist/manifests/manifest-actions.d.ts +1 -1
  745. package/dist/manifests/manifest-capabilities.d.ts +3 -1
  746. package/dist/manifests/manifest-local-validation.cjs +2 -0
  747. package/dist/manifests/manifest-local-validation.cjs.map +1 -0
  748. package/dist/manifests/manifest-local-validation.d.ts +15 -11
  749. package/dist/manifests/manifest-local-validation.js +8 -0
  750. package/dist/manifests/manifest-local-validation.js.map +1 -0
  751. package/dist/manifests/manifest-template.cjs +2 -0
  752. package/dist/manifests/manifest-template.cjs.map +1 -0
  753. package/dist/manifests/manifest-template.d.ts +4 -4
  754. package/dist/manifests/manifest-template.js +12 -0
  755. package/dist/manifests/manifest-template.js.map +1 -0
  756. package/dist/manifests/manifest-validation.cjs +1 -1
  757. package/dist/manifests/manifest-validation.cjs.map +1 -1
  758. package/dist/manifests/manifest-validation.js +106 -28
  759. package/dist/manifests/manifest-validation.js.map +1 -1
  760. package/dist/manifests/types.cjs.map +1 -1
  761. package/dist/manifests/types.d.ts +39 -4
  762. package/dist/manifests/types.js.map +1 -1
  763. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs +8 -0
  764. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs.map +1 -0
  765. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js +221 -0
  766. package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js.map +1 -0
  767. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs +1 -1
  768. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs.map +1 -1
  769. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js +1 -1
  770. package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js.map +1 -1
  771. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +1 -1
  772. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -1
  773. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +1 -1
  774. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -1
  775. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs +1 -1
  776. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs.map +1 -1
  777. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js +1 -1
  778. package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js.map +1 -1
  779. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
  780. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
  781. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +22 -20
  782. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
  783. package/dist/node_modules/@openhands/extensions/automations/interface.cjs +1 -1
  784. package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -1
  785. package/dist/node_modules/@openhands/extensions/automations/interface.js +2 -1
  786. package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -1
  787. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs +1 -1
  788. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +1 -1
  789. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +24 -5
  790. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +1 -1
  791. package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs +1 -1
  792. package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js +1 -1
  793. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs +2 -0
  794. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs.map +1 -0
  795. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js +21 -0
  796. package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js.map +1 -0
  797. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs +2 -0
  798. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs.map +1 -0
  799. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js +23 -0
  800. package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js.map +1 -0
  801. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs +2 -0
  802. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs.map +1 -0
  803. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js +43 -0
  804. package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js.map +1 -0
  805. package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs +2 -0
  806. package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs.map +1 -0
  807. package/dist/node_modules/lucide-react/dist/esm/icons/tags.js +22 -0
  808. package/dist/node_modules/lucide-react/dist/esm/icons/tags.js.map +1 -0
  809. package/dist/package.cjs +1 -1
  810. package/dist/package.cjs.map +1 -1
  811. package/dist/package.js +4 -4
  812. package/dist/package.js.map +1 -1
  813. package/dist/routes/agent-settings.d.ts +2 -0
  814. package/dist/routes/app-settings.cjs +1 -1
  815. package/dist/routes/app-settings.cjs.map +1 -1
  816. package/dist/routes/app-settings.js +53 -48
  817. package/dist/routes/app-settings.js.map +1 -1
  818. package/dist/routes/llm-settings.cjs +1 -1
  819. package/dist/routes/llm-settings.cjs.map +1 -1
  820. package/dist/routes/llm-settings.d.ts +3 -1
  821. package/dist/routes/llm-settings.js +120 -127
  822. package/dist/routes/llm-settings.js.map +1 -1
  823. package/dist/routes/planner-tab.cjs +1 -1
  824. package/dist/routes/planner-tab.cjs.map +1 -1
  825. package/dist/routes/planner-tab.js +44 -28
  826. package/dist/routes/planner-tab.js.map +1 -1
  827. package/dist/services/telemetry.cjs +1 -1
  828. package/dist/services/telemetry.cjs.map +1 -1
  829. package/dist/services/telemetry.d.ts +5 -0
  830. package/dist/services/telemetry.js +122 -115
  831. package/dist/services/telemetry.js.map +1 -1
  832. package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
  833. package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
  834. package/dist/stores/conversation-panel-preferences-store.d.ts +32 -5
  835. package/dist/stores/conversation-panel-preferences-store.js +29 -12
  836. package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
  837. package/dist/stores/conversation-state-store.cjs +1 -1
  838. package/dist/stores/conversation-state-store.cjs.map +1 -1
  839. package/dist/stores/conversation-state-store.d.ts +9 -3
  840. package/dist/stores/conversation-state-store.js +6 -3
  841. package/dist/stores/conversation-state-store.js.map +1 -1
  842. package/dist/stores/conversation-store.cjs +1 -1
  843. package/dist/stores/conversation-store.cjs.map +1 -1
  844. package/dist/stores/conversation-store.d.ts +2 -0
  845. package/dist/stores/conversation-store.js +3 -0
  846. package/dist/stores/conversation-store.js.map +1 -1
  847. package/dist/stores/free-models-store.cjs +2 -0
  848. package/dist/stores/free-models-store.cjs.map +1 -0
  849. package/dist/stores/free-models-store.d.ts +30 -0
  850. package/dist/stores/free-models-store.js +22 -0
  851. package/dist/stores/free-models-store.js.map +1 -0
  852. package/dist/stores/model-store.cjs +1 -1
  853. package/dist/stores/model-store.cjs.map +1 -1
  854. package/dist/stores/model-store.d.ts +7 -0
  855. package/dist/stores/model-store.js +4 -0
  856. package/dist/stores/model-store.js.map +1 -1
  857. package/dist/types/automation.cjs.map +1 -1
  858. package/dist/types/automation.d.ts +46 -1
  859. package/dist/types/automation.js.map +1 -1
  860. package/dist/ui/context-menu.d.ts +1 -1
  861. package/dist/ui/toggle-switch.cjs +1 -1
  862. package/dist/ui/toggle-switch.cjs.map +1 -1
  863. package/dist/ui/toggle-switch.d.ts +4 -1
  864. package/dist/ui/toggle-switch.js +4 -3
  865. package/dist/ui/toggle-switch.js.map +1 -1
  866. package/dist/utils/automation-catalog.cjs +1 -1
  867. package/dist/utils/automation-catalog.cjs.map +1 -1
  868. package/dist/utils/automation-catalog.d.ts +12 -1
  869. package/dist/utils/automation-catalog.js +42 -12
  870. package/dist/utils/automation-catalog.js.map +1 -1
  871. package/dist/utils/automation-run-display.cjs +2 -0
  872. package/dist/utils/automation-run-display.cjs.map +1 -0
  873. package/dist/utils/automation-run-display.d.ts +20 -0
  874. package/dist/utils/automation-run-display.js +85 -0
  875. package/dist/utils/automation-run-display.js.map +1 -0
  876. package/dist/utils/automation-schedule.cjs +1 -1
  877. package/dist/utils/automation-schedule.cjs.map +1 -1
  878. package/dist/utils/automation-schedule.d.ts +16 -0
  879. package/dist/utils/automation-schedule.js +2 -0
  880. package/dist/utils/automation-schedule.js.map +1 -1
  881. package/dist/utils/constants.cjs +1 -1
  882. package/dist/utils/constants.cjs.map +1 -1
  883. package/dist/utils/constants.d.ts +4 -0
  884. package/dist/utils/constants.js +23 -3
  885. package/dist/utils/constants.js.map +1 -1
  886. package/dist/utils/format-event-timestamp.cjs +2 -0
  887. package/dist/utils/format-event-timestamp.cjs.map +1 -0
  888. package/dist/utils/format-event-timestamp.d.ts +1 -0
  889. package/dist/utils/format-event-timestamp.js +13 -0
  890. package/dist/utils/format-event-timestamp.js.map +1 -0
  891. package/dist/utils/format-model-name.cjs +1 -1
  892. package/dist/utils/format-model-name.cjs.map +1 -1
  893. package/dist/utils/format-model-name.d.ts +27 -6
  894. package/dist/utils/format-model-name.js +14 -6
  895. package/dist/utils/format-model-name.js.map +1 -1
  896. package/dist/utils/git-diff-stats.cjs +2 -2
  897. package/dist/utils/git-diff-stats.cjs.map +1 -1
  898. package/dist/utils/git-diff-stats.d.ts +4 -0
  899. package/dist/utils/git-diff-stats.js +12 -2
  900. package/dist/utils/git-diff-stats.js.map +1 -1
  901. package/dist/utils/plan-file.cjs +4 -0
  902. package/dist/utils/plan-file.cjs.map +1 -0
  903. package/dist/utils/plan-file.d.ts +18 -0
  904. package/dist/utils/plan-file.js +58 -0
  905. package/dist/utils/plan-file.js.map +1 -0
  906. package/dist/utils/recommended-automation-rail.cjs +1 -1
  907. package/dist/utils/recommended-automation-rail.cjs.map +1 -1
  908. package/dist/utils/recommended-automation-rail.js +1 -0
  909. package/dist/utils/recommended-automation-rail.js.map +1 -1
  910. package/dist/utils/scroll-fade-state.cjs +1 -1
  911. package/dist/utils/scroll-fade-state.cjs.map +1 -1
  912. package/dist/utils/scroll-fade-state.d.ts +6 -0
  913. package/dist/utils/scroll-fade-state.js +8 -1
  914. package/dist/utils/scroll-fade-state.js.map +1 -1
  915. package/dist/utils/sdk-settings-schema.cjs +1 -1
  916. package/dist/utils/sdk-settings-schema.cjs.map +1 -1
  917. package/dist/utils/sdk-settings-schema.d.ts +1 -0
  918. package/dist/utils/sdk-settings-schema.js +25 -22
  919. package/dist/utils/sdk-settings-schema.js.map +1 -1
  920. package/dist/utils/utils.cjs +1 -1
  921. package/dist/utils/utils.cjs.map +1 -1
  922. package/dist/utils/utils.js +11 -11
  923. package/dist/utils/utils.js.map +1 -1
  924. package/package.json +4 -4
  925. package/scripts/check-sdk-version-sync.mjs +6 -6
  926. package/scripts/dev-safe.mjs +1 -1
  927. package/scripts/dev-with-automation.mjs +1 -1
  928. package/scripts/static-server.mjs +33 -1
  929. package/build/assets/active-backend-context-CrHTlgvN.js +0 -2
  930. package/build/assets/agent-profiles-settings-Dzgb7G9z.js +0 -1
  931. package/build/assets/agent-server-conversation-service.api-tnqNjbpE.js +0 -86
  932. package/build/assets/agent-settings-DLtsqaOs.js +0 -2
  933. package/build/assets/agent-settings-fFvR-XC2.js +0 -1
  934. package/build/assets/alert-banner-HP6mX-Vr.js +0 -1
  935. package/build/assets/api-key-entry-screen-qTzrmJcr.js +0 -1
  936. package/build/assets/app-settings-dbnneVaV.js +0 -1
  937. package/build/assets/automation-detail-BmwlCUAB.js +0 -3
  938. package/build/assets/automation-git-sync-CprN5DcU.js +0 -1
  939. package/build/assets/automation-setup-route-C40kXjMY.js +0 -1
  940. package/build/assets/automations-list-DuNcRawl.js +0 -1
  941. package/build/assets/backend-form-modal-lhGwzXFI.js +0 -1
  942. package/build/assets/backend-synced-settings-badge-DPkz30BE.js +0 -1
  943. package/build/assets/badge-BU3S0VtE.js +0 -1
  944. package/build/assets/bot-dMYHVfYM.js +0 -1
  945. package/build/assets/browser-DSAo0tz1.js +0 -46
  946. package/build/assets/browser-tab-C9vy56R5.js +0 -1
  947. package/build/assets/canvas-extension-page-dx1gFrfW.js +0 -1
  948. package/build/assets/canvas-extensions-8A-XhpgP.js +0 -1
  949. package/build/assets/check-CS0vmpQQ.js +0 -1
  950. package/build/assets/chevron-down-e1QBpjVy.js +0 -1
  951. package/build/assets/chevron-right-ZG4R5G4Q.js +0 -1
  952. package/build/assets/circle-check-DzWLNsbE.js +0 -1
  953. package/build/assets/circle-plus-check-toggle-BO_kFZt3.js +0 -1
  954. package/build/assets/command-menu--UIlGL72.js +0 -1
  955. package/build/assets/commits-tab-AnZwLvh-.js +0 -1
  956. package/build/assets/confirmation-modal-Dv1ktp8K.js +0 -1
  957. package/build/assets/conversation-BbGrAO4Z.js +0 -93
  958. package/build/assets/conversation-mYT6NAoj.js +0 -1
  959. package/build/assets/conversation-panel-mYT6NAoj.js +0 -1
  960. package/build/assets/conversation-state-store-B0ImPLHO.js +0 -1
  961. package/build/assets/conversation-store-Ca3ghXap.js +0 -6
  962. package/build/assets/copy-to-clipboard-button-Ca8iSkkA.js +0 -1
  963. package/build/assets/device-verify-Bhn2e_Ye.js +0 -1
  964. package/build/assets/edit-automation-modal-DadGbJ2u.js +0 -1
  965. package/build/assets/empty-state-BoGVDecT.js +0 -1
  966. package/build/assets/enum-filter-dropdown-Bgca129f.js +0 -1
  967. package/build/assets/environment-switch-overlay-BmBRT7gv.js +0 -1
  968. package/build/assets/error-state-Body8Ngd.js +0 -1
  969. package/build/assets/extensions-hub-CcDqq_vR.js +0 -1
  970. package/build/assets/extensions-navigation-Cr4yzYk4.js +0 -1
  971. package/build/assets/external-link-DKUlnCQV.js +0 -1
  972. package/build/assets/files-tab-D4o2VyE_.js +0 -1
  973. package/build/assets/format-model-name-CasAP3nd.js +0 -1
  974. package/build/assets/get-git-path-ChKDVHZp.js +0 -1
  975. package/build/assets/git-repo-dropdown-4ROKl2cB.js +0 -1
  976. package/build/assets/git-repo-dropdown-BkqzkMmM.js +0 -1
  977. package/build/assets/highlighted-source-view-BFRxGT_Q.js +0 -1
  978. package/build/assets/home-ChpSuepX.js +0 -1
  979. package/build/assets/home-DIsB440S.js +0 -1
  980. package/build/assets/home-automation-run-tooltip-BVNDWjAH.js +0 -1
  981. package/build/assets/home-store-CY9Ej0ux.js +0 -1
  982. package/build/assets/index-home-BdlrFIif.js +0 -1
  983. package/build/assets/info-B6RQawoW.js +0 -1
  984. package/build/assets/install-server-modal-Dpy89p4g.js +0 -1
  985. package/build/assets/kebab-menu-item-content-D8hSNGmm.js +0 -1
  986. package/build/assets/launch-IrTDEFCs.js +0 -1
  987. package/build/assets/list-filter-DsEK7NFC.js +0 -1
  988. package/build/assets/llm-not-configured-banner-CIFABh3K.js +0 -27
  989. package/build/assets/llm-settings-B9juXhIa.js +0 -1
  990. package/build/assets/llm-settings-De1d5dfr.js +0 -1
  991. package/build/assets/llm-subscription-service-BpJ0ouQo.js +0 -1
  992. package/build/assets/loader-circle-CC1au6hc.js +0 -1
  993. package/build/assets/manage-backends-modal-BrPV3oB-.js +0 -1
  994. package/build/assets/manifest-80fb1c29.js +0 -1
  995. package/build/assets/manifest-subpage-layout-CAOYzrYp.js +0 -1
  996. package/build/assets/markdown-renderer-BzTlxI8x.js +0 -8
  997. package/build/assets/mcp-BTs_SXfZ.js +0 -1
  998. package/build/assets/mcp-page-BEBYqH_K.js +0 -9
  999. package/build/assets/messages-DKV9cRc2.js +0 -41
  1000. package/build/assets/modal-close-button-DDzdRvCs.js +0 -1
  1001. package/build/assets/onboarding-DV_OXoeP.js +0 -1
  1002. package/build/assets/onboarding-modal-rkyBYkeQ.js +0 -1
  1003. package/build/assets/organization-service.api-DrYNkEN_.js +0 -1
  1004. package/build/assets/pencil-47jAZH_V.js +0 -1
  1005. package/build/assets/pin-By41Vl5J.js +0 -1
  1006. package/build/assets/planner-tab-C9uZmhme.js +0 -1
  1007. package/build/assets/plug-CG5HFcNG.js +0 -1
  1008. package/build/assets/plugins-management-service-BMJgC3Ga.js +0 -1
  1009. package/build/assets/plus-C7Slq-0I.js +0 -1
  1010. package/build/assets/profiles-service.api-ChoKrL0l.js +0 -1
  1011. package/build/assets/providers-BhMcY5nv.js +0 -1
  1012. package/build/assets/proxy-9Fe1v5na.js +0 -1
  1013. package/build/assets/recommended-automations-launcher-6ABrI9Cy.js +0 -1
  1014. package/build/assets/refresh-cw-3q3Frrii.js +0 -1
  1015. package/build/assets/root-Dc8YmC9F.js +0 -2
  1016. package/build/assets/root-VDaypvK4.css +0 -1
  1017. package/build/assets/root-layout-CXkhSPYh.js +0 -2
  1018. package/build/assets/schema-field-D-y9-LDb.js +0 -1
  1019. package/build/assets/scroll-fade-state-Dw-i4SGq.js +0 -1
  1020. package/build/assets/sdk-section-page-BlFiizlG.js +0 -1
  1021. package/build/assets/secret-form-BB7the8W.js +0 -1
  1022. package/build/assets/secrets-service-ByZVENbp.js +0 -1
  1023. package/build/assets/secrets-settings-B_GpxKW2.js +0 -1
  1024. package/build/assets/settings-C0EWuBtA.js +0 -1
  1025. package/build/assets/settings-dropdown-input-BcwylHs2.js +0 -1
  1026. package/build/assets/settings-index-5w5UW2K3.js +0 -1
  1027. package/build/assets/settings-input-Db-1g8Ql.js +0 -1
  1028. package/build/assets/settings-modal-DfJ3tcJQ.js +0 -1
  1029. package/build/assets/settings-service.api-DJ1r62Zr.js +0 -1
  1030. package/build/assets/settings-switch-CS-dJDmA.js +0 -1
  1031. package/build/assets/shared-conversation-CA5ISEDy.js +0 -1
  1032. package/build/assets/shield-check-D2aCRd16.js +0 -1
  1033. package/build/assets/sidebar-mobile-menu-toggle-C_fb0Jki.js +0 -1
  1034. package/build/assets/sidebar-store-DGqHkVLw.js +0 -1
  1035. package/build/assets/skill-card-pill-row-B27-xyig.js +0 -1
  1036. package/build/assets/skill-scope-B42H-XOc.js +0 -1
  1037. package/build/assets/skills-plugins-tgF8EiXC.js +0 -1
  1038. package/build/assets/skills-settings-BgJ9PaOe.js +0 -1
  1039. package/build/assets/styled-tooltip-C4jf5Fv9.js +0 -1
  1040. package/build/assets/task-list-tab-C5zcaktH.js +0 -1
  1041. package/build/assets/toggle-switch-ChOLXv2n.js +0 -1
  1042. package/build/assets/trash-2-D7K26eDO.js +0 -1
  1043. package/build/assets/trash-D-HYiVYM.js +0 -1
  1044. package/build/assets/triangle-alert-CtdXWHUI.js +0 -1
  1045. package/build/assets/usage-tab-CVDffLPt.js +0 -1
  1046. package/build/assets/use-acp-credential-form-XIQmpX6M.js +0 -1
  1047. package/build/assets/use-activate-agent-profile-BLfmvDiG.js +0 -1
  1048. package/build/assets/use-agent-profiles-Bd9Bvvp1.js +0 -1
  1049. package/build/assets/use-canvas-extensions-Bi693ujJ.js +0 -1
  1050. package/build/assets/use-config-A9QovgXO.js +0 -1
  1051. package/build/assets/use-create-conversation-Dx3l7mFZ.js +0 -1
  1052. package/build/assets/use-create-secret-B9cUFWRG.js +0 -1
  1053. package/build/assets/use-has-permission-B3C8rQmR.js +0 -1
  1054. package/build/assets/use-is-authed-nTBcM7dE.js +0 -1
  1055. package/build/assets/use-llm-configured-BV9nZ1_j.js +0 -1
  1056. package/build/assets/use-llm-profiles-BO-P4Oyo.js +0 -1
  1057. package/build/assets/use-manifest-capabilities-Cw_flwEz.js +0 -1
  1058. package/build/assets/use-onboarding-completion-D8U7k4Qb.js +0 -1
  1059. package/build/assets/use-pinned-home-route-CckOZrmb.js +0 -1
  1060. package/build/assets/use-plugins-marketplace-7i94Zu3Z.js +0 -1
  1061. package/build/assets/use-save-agent-profile-BUjSsDXK.js +0 -1
  1062. package/build/assets/use-settings-DSXLbvBl.js +0 -1
  1063. package/build/assets/use-settings-nav-items-CwRw-CmX.js +0 -16
  1064. package/build/assets/use-tracking-D53y3TH9.js +0 -3
  1065. package/build/assets/useQueries-DlbhlH9I.js +0 -1
  1066. package/build/assets/useQuery-BSTgq1rl.js +0 -1
  1067. package/build/assets/utils-CN5ZfZy1.js +0 -1
  1068. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js +0 -186
  1069. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-rfV8mQ9m.js +0 -1
  1070. package/build/assets/vendor~root-layout-C9Ju9DQg.js +0 -1
  1071. package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BWir3rJs.js +0 -1
  1072. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-cDuKr-WD.js +0 -1
  1073. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js +0 -1
  1074. package/build/assets/x-DJdhbdmt.js +0 -1
  1075. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +0 -2
  1076. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +0 -1
  1077. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +0 -35
  1078. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +0 -247
  1079. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +0 -1
  1080. package/dist/hooks/query/use-skills.cjs +0 -2
  1081. package/dist/hooks/query/use-skills.cjs.map +0 -1
  1082. package/dist/hooks/query/use-skills.d.ts +0 -7
  1083. package/dist/hooks/query/use-skills.js +0 -13
  1084. package/dist/hooks/query/use-skills.js.map +0 -1
  1085. package/dist/hooks/use-has-permission.cjs +0 -2
  1086. package/dist/hooks/use-has-permission.cjs.map +0 -1
  1087. package/dist/hooks/use-has-permission.d.ts +0 -1
  1088. package/dist/hooks/use-has-permission.js +0 -8
  1089. package/dist/hooks/use-has-permission.js.map +0 -1
  1090. package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs +0 -2
  1091. package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs.map +0 -1
  1092. package/dist/node_modules/lucide-react/dist/esm/icons/eye.js +0 -14
  1093. package/dist/node_modules/lucide-react/dist/esm/icons/eye.js.map +0 -1
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{F as r,P as i,R as a,U as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as s}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{M as c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js";import{Z as l,n as u}from"./active-backend-context-CrHTlgvN.js";import{W as d,t as f}from"./utils-CN5ZfZy1.js";import{r as p}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-CUmIwQCN.js";import{t as m}from"./loading-spinner-BY9N3pOe.js";import{A as h,M as g,N as _,P as v,a as y,c as ee,d as b,f as x,g as te,h as ne,i as S,m as re,n as C,o as ie,p as ae,r as oe,s as se,t as ce,u as w,v as T,y as E}from"./use-tracking-D53y3TH9.js";import{l as D}from"./settings-service.api-DJ1r62Zr.js";import{n as O}from"./use-settings-DSXLbvBl.js";import{t as le}from"./modal-backdrop-BSzNhM4r.js";import{n as ue}from"./modal-classes-C8eycCwG.js";import{l as k}from"./form-control-classes-Bkh5FGrD.js";import{t as A}from"./brand-button-BAfk4wGP.js";import{t as j}from"./navigation-link-Bxo3-4vo.js";import{t as M}from"./settings-dropdown-input-BcwylHs2.js";import{o as N,s as P,t as de}from"./conversation-store-Ca3ghXap.js";import{t as fe}from"./modal-close-button-DDzdRvCs.js";import{t as F}from"./settings-input-Db-1g8Ql.js";import{n as I}from"./use-create-conversation-Dx3l7mFZ.js";import{t as pe}from"./api-error-message-B-XdSk3b.js";import{f as L,n as R,o as z,s as me}from"./mcp-marketplace-utils-AIBzzHTO.js";import{t as B}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-cDuKr-WD.js";import{n as he}from"./use-manifest-capabilities-Cw_flwEz.js";import{t as V}from"./git-repo-dropdown-4ROKl2cB.js";import"./git-repo-dropdown-BkqzkMmM.js";var H=e(t(),1);function ge(e){let t=e.requires.integrations,{data:n,isLoading:r}=O(),i=(0,H.useMemo)(()=>L(D(n?.agent_settings?.mcp_config)),[n?.agent_settings?.mcp_config]),a=(0,H.useMemo)(()=>{let e=me(B);return Object.entries(t).map(([t,n])=>({id:t,requirement:n,entry:z(t,e)??null})).filter(({entry:e})=>!e||!R(e,i))},[t,i]),o=a.filter(({requirement:e})=>e.required!==!1);return{blockingIntegrations:o,warningIntegrations:a.filter(({requirement:e})=>e.required===!1),isBlocked:o.length>0,isLoading:r}}var _e={fieldErrors:{},formErrors:[]};function U(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function W(e,t){let n=e[0]===`body`?e.slice(1):e,r=[],i=t;return n.forEach(e=>{if(typeof e==`number`){Array.isArray(i)&&r.length>0&&(r[r.length-1]+=`[${e}]`,i=i[e]);return}U(i)&&e in i&&(r.push(e),i=i[e])}),r.join(`.`)}function G(e,t){if(!U(e))return[];if(Array.isArray(e.errors))return e.errors.flatMap(e=>!U(e)||typeof e.message!=`string`?[]:[{path:typeof e.field==`string`?e.field:``,message:e.message}]);let{detail:n}=e;return typeof n==`string`?[{path:``,message:n}]:Array.isArray(n)?n.flatMap(e=>!U(e)||typeof e.msg!=`string`?[]:[{path:W(Array.isArray(e.loc)?e.loc:[],t),message:e.msg}]):[]}function K(e,t){return t[e]??t[e.replace(/\[\d+\]/g,`[0]`)]}function q(e,t){if(e.length===0)return _e;let n={},r=[];return e.forEach(({path:e,message:i})=>{let a=e?K(e,t):void 0;if(!a?.length){r.push(i);return}a.forEach(e=>{e in n||(n[e]=i)})}),{fieldErrors:n,formErrors:r}}var ve={fieldErrors:{},formErrors:[]},ye=[404,501];function be(e){return ye.some(t=>l(e,t)||c.isAxiosError(e)&&e.response?.status===t)}function xe(e){let t=(0,H.useRef)(0),n=(0,H.useMemo)(()=>ie(e),[e]);return(0,H.useCallback)(async r=>{try{let i=y(e,r);if(!i)return null;t.current+=1;let a=t.current,o=await C.validateDraft(i);return a===t.current?o?.valid?ve:q(G(o,i.draft),n):null}catch(e){return be(e)||console.warn(`Automation setup preflight failed:`,e),null}},[e,n])}var J=new TextEncoder,Y=512,Se=100,Ce=148;function we(e,t,n){let r=new Uint8Array(Y),i=(e,t)=>{for(let n=0;n<t.length;n+=1)r[e+n]=t.charCodeAt(n)&127},a=(e,t,n)=>i(e,n.toString(8).padStart(t-1,`0`));return r.set(t,0),a(100,8,e.mode??420),a(108,8,0),a(116,8,0),a(124,12,n),a(136,12,0),r[156]=48,i(257,`ustar`),i(263,`00`),r.fill(32,Ce,156),i(Ce,r.reduce((e,t)=>e+t,0).toString(8).padStart(6,`0`)),r[154]=0,r[155]=32,r}function Te(e){let t=[];for(let n of e){let e=J.encode(n.name);if(e.length>Se)throw Error(`tar: name too long for a ustar header: ${n.name}`);let r=J.encode(n.content);t.push(we(n,e,r.length));let i=new Uint8Array(Math.ceil(r.length/Y)*Y);i.set(r),t.push(i)}t.push(new Uint8Array(Y*2));let n=t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(new ArrayBuffer(n)),i=0;for(let e of t)r.set(e,i),i+=e.length;return r}async function Ee(e){let t=Te(e),n=new ReadableStream({start(e){e.enqueue(t),e.close()}}),r=new Response(n.pipeThrough(new CompressionStream(`gzip`)));return new Uint8Array(await r.arrayBuffer())}function De(e){let t=p?.(e);if(!t||Object.keys(t).length===0)throw Error(`The published extensions package ships no bundle files for '${e}'.`);return t}function Oe(e){let t=(e.entrypoint.trim().split(` `)[0]??``).replace(/^\.\//,``);return new Set([e.setupScript,t in e.files?t:void 0].filter(e=>e!==void 0))}async function ke(e,t){let n=e.setup.bundle;if(!n)throw Error(`'${e.id}' declares no bundle.`);let r=De(e.id),i=Object.keys(n.files).filter(e=>typeof r[e]!=`string`);if(i.length>0)throw Error(`The published extensions package is missing bundle files for '${e.id}': ${i.join(`, `)}.`);let a=S(e,t)?.template,o=Oe(n),s=Object.keys(n.files).sort().map(e=>({name:e,content:r[e],mode:o.has(e)?493:420}));return s.push({name:_,content:`${JSON.stringify(a?.config??{},null,2)}\n`}),Ee(s)}function Ae(){let e=I(),t=de(e=>e.setMessageToSend),n=(0,H.useRef)(null),r=(0,H.useCallback)(async n=>{let r=await e.mutateAsync({});return r.conversation_id.startsWith(`task-`)&&r.task_id?P(r.task_id,n):N(r.conversation_id,{draftMessage:n}),window.setTimeout(()=>t(n),0),{response:{...r}}},[e,t]);return(0,H.useCallback)(async(e,t,i)=>{if(!i)return r(oe(e,t));if(se(e)){let r=`${e.id}\n${JSON.stringify(t)}`,i=n.current?.path??null;if(n.current?.key!==r||i===null){let a=await ke(e,t);i=await C.uploadAutomationTarball(e.id,a),n.current={key:r,path:i}}let a=S(e,t,i);if(!a)throw Error(`'${e.id}' produced no create request.`);return{response:await C.createAutomationDraft(a,e)}}return{response:await C.createAutomationDraft(i,e)}},[r])}var X=n();function je({name:e,field:t,values:n,canListRepositories:r,placeholder:i,disabled:a,onChange:o,onBlur:c}){let{t:l}=s(`openhands`),[u,f]=(0,H.useState)(``),p=e=>{let t=e.trim();!t||n.includes(t)||(o([...n,t]),f(``),c())},m=e=>{o(n.filter(t=>t!==e)),c()};return(0,X.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,"data-testid":`setup-list-${e}`,children:[n.length>0&&(0,X.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:n.map(t=>(0,X.jsxs)(`li`,{className:`flex items-center justify-between gap-2 rounded-md border border-[var(--oh-border)] px-3 py-1.5`,children:[(0,X.jsx)(`span`,{className:`truncate text-sm`,children:t}),(0,X.jsx)(A,{testId:`setup-list-${e}-remove-${t}`,type:`button`,variant:`ghost-danger`,isDisabled:a,ariaLabel:l(d.COMMON$REMOVE),onClick:()=>m(t),children:l(d.COMMON$REMOVE)})]},t))}),r?(0,X.jsx)(V,{provider:t.provider??`github`,value:null,repositoryName:null,placeholder:i,disabled:a,onChange:e=>{e?.full_name&&p(e.full_name)}}):(0,X.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,X.jsx)(`div`,{className:`grow`,children:(0,X.jsx)(F,{testId:`setup-field-${e}`,name:e,label:``,ariaLabel:t.label,type:`text`,value:u,placeholder:i,isDisabled:a,onChange:f,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),p(u))},onBlur:()=>p(u)})}),(0,X.jsx)(A,{testId:`setup-list-${e}-add`,type:`button`,variant:`secondary`,isDisabled:a||u.trim()===``,onClick:()=>p(u),children:l(d.BUTTON$ADD)})]})]})}function Me({name:e,field:t,value:n,error:r,options:i,repository:a,disabled:o,onChange:c,onRepositoryChange:l,onBlur:p}){let{t:m}=s(`openhands`),{backend:h}=u(),g=`setup-field-${e}`,_=(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:t.help}),v=h.kind===`cloud`,y=t.placeholder??m(d.SETUP$REPOSITORY_PLACEHOLDER);if(t.type===`repo-picker`&&t.multiple)return(0,X.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,X.jsx)(Q,{field:t}),(0,X.jsx)(je,{name:e,field:t,values:x(n),canListRepositories:v,placeholder:y,disabled:o,onChange:c,onBlur:p}),(0,X.jsx)($,{testId:g,error:r}),_]});if(t.type===`repo-picker`&&v)return(0,X.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,X.jsx)(Q,{field:t}),(0,X.jsx)(V,{provider:t.provider??`github`,value:a?.id??null,repositoryName:a?.full_name??b(n)??null,placeholder:t.placeholder,disabled:o,onChange:e=>{l(e??null),c(e?.full_name??``),p()}}),(0,X.jsx)($,{testId:g,error:r}),_]});if(t.type===`select`||t.type===`timezone`&&i.length>0)return(0,X.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,X.jsx)(M,{testId:g,name:e,label:(0,X.jsx)(Z,{field:t}),items:i.map(e=>({key:e.value,label:e.label})),selectedKey:b(n)||void 0,placeholder:t.placeholder,isDisabled:o,required:t.required,onSelectionChange:e=>{c(e===null?``:String(e)),p()}}),(0,X.jsx)($,{testId:g,error:r}),_]});if(t.type===`textarea`)return(0,X.jsxs)(`label`,{className:`flex w-full flex-col gap-2.5`,children:[(0,X.jsx)(Z,{field:t}),(0,X.jsx)(`textarea`,{"data-testid":g,name:e,rows:4,value:b(n),placeholder:t.placeholder,disabled:o,"aria-invalid":!!r,onChange:e=>c(e.target.value),onBlur:p,className:f(k,r&&`border-red-500`)}),(0,X.jsx)($,{testId:g,error:r}),_]});let ee=t.type===`repo-picker`?y:t.placeholder;return(0,X.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,X.jsx)(F,{testId:g,name:e,type:`text`,label:t.label,value:b(n),placeholder:ee,isDisabled:o,showRequiredTag:t.required,error:r,onChange:c,onBlur:p}),_]})}function Z({field:e}){return(0,X.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[e.label,e.required&&(0,X.jsx)(`span`,{className:`text-sm leading-none text-red-400`,"aria-hidden":!0,children:`*`})]})}function Q({field:e}){return(0,X.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,X.jsx)(Z,{field:e})})}function $({testId:e,error:t}){return t?(0,X.jsx)(`p`,{role:`alert`,"data-testid":`${e}-error`,className:`-mt-1 text-xs text-red-400`,children:t}):null}var Ne=`/mcp`;function Pe({prerequisites:e}){let{t}=s(`openhands`),{blockingIntegrations:n,warningIntegrations:r}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-4`,"data-testid":`setup-prerequisites`,children:[[...n,...r].map(({id:e,requirement:t,entry:n})=>(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsx)(`span`,{className:`text-sm`,children:n?.name??e}),(0,X.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:t.message})]},e)),(0,X.jsx)(j,{to:Ne,className:`text-sm underline`,children:t(d.SETUP$MANAGE_INTEGRATIONS)})]})}function Fe({setup:e,values:t}){let{t:n}=s(`openhands`);return(0,X.jsx)(`div`,{className:`flex flex-col gap-4`,"data-testid":`setup-review`,children:(0,X.jsx)(`dl`,{className:`flex flex-col gap-3`,children:Object.entries(w(e)).map(([e,r])=>(0,X.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,X.jsx)(`dt`,{className:`text-xs text-[var(--oh-muted)]`,children:r.label}),(0,X.jsx)(`dd`,{className:`text-sm break-words`,children:x(t[e]).join(`, `)||n(d.SETUP$EMPTY_VALUE)})]},e))})})}var Ie=400,Le={fieldErrors:{},formErrors:[]};function Re(e){return e.formErrors.length>0||Object.keys(e.fieldErrors).length>0}function ze(e){return typeof e.conversation_id==`string`?`/conversations/${e.conversation_id}`:typeof e.id==`string`?T(e.id):null}function Be({entry:e,onClose:t}){let{t:n}=s(`openhands`),r=a(),i=he(e),o=ge(e),c=xe(e),l=Ae(),{trackAutomationSetupOpened:u,trackAutomationSetupValidated:p,trackAutomationSetupCreated:h,trackAutomationSetupFailed:g}=ce(),[_,y]=(0,H.useState)(`prerequisites`),[b,x]=(0,H.useState)(()=>re(e.setup)),[C,oe]=(0,H.useState)({}),[se,T]=(0,H.useState)({}),[E,D]=(0,H.useState)(Le),[O,k]=(0,H.useState)(!1),j=(0,H.useRef)(b),M=(0,H.useRef)(null);(0,H.useEffect)(()=>()=>{M.current&&window.clearTimeout(M.current)},[]);let N=(0,H.useMemo)(()=>w(e.setup),[e]),P=(0,H.useMemo)(()=>ne(e.setup,i.capabilities),[e,i.capabilities]),de=(0,H.useMemo)(()=>S(e,b),[e,b]),F=(0,H.useMemo)(()=>ie(e),[e]),I=(0,H.useRef)(!1);(0,H.useEffect)(()=>{I.current||(I.current=!0,u({automationId:e.id}))},[e.id,u]);let L=(0,H.useMemo)(()=>ee(e),[e]),R=i.supported===!1||L.length>0,z=[...i.unmet,...L],me=o.blockingIntegrations.length>0||o.warningIntegrations.length>0,B=_===`prerequisites`&&!me?`form`:_,V=(e,t)=>{j.current={...j.current,[e]:t},x(j.current),T(({[e]:t,...n})=>n),D(t=>{if(!(e in t.fieldErrors))return t;let{[e]:n,...r}=t.fieldErrors;return{...t,fieldErrors:r}})},_e=()=>{M.current&&window.clearTimeout(M.current),M.current=window.setTimeout(()=>{c(j.current).then(e=>{e&&D(e)})},Ie)},U=async()=>{if(B===`prerequisites`){y(`form`);return}let t=te(e.setup,b,P);if(Object.keys(t).length>0){T(t);return}T({});let n=await c(b);if(n&&Re(n)){D(n);return}D(Le),p({automationId:e.id}),y(`review`)},W=async(i,a)=>{k(!0);try{let{response:n}=await l(e,b,i);h({automationId:e.id,setupMode:a});let o=ze(n);o?r(o,{replace:!0}):t()}catch(t){g({automationId:e.id,setupMode:a});let r=q(G(pe(t),i),F);D(Re(r)?r:{fieldErrors:{},formErrors:[n(d.SETUP$SUBMIT_FAILED)]}),y(`form`)}finally{k(!1)}},K=()=>W(de,e.setup.mode),ve=()=>W(null,`assisted`),ye=e.setup.mode===`direct`&&(v(e)!==null||e.setup.message!==void 0),be=e=>{let t=se[e];return t?Ve(t,n):E.fieldErrors[e]},J=i.isLoading||o.isLoading,Y=R?n(d.SETUP$UNAVAILABLE_TITLE):B===`prerequisites`?n(d.SETUP$PREREQUISITES_TITLE):B===`review`?n(d.SETUP$REVIEW_TITLE):e.name;return(0,X.jsx)(le,{onClose:t,"aria-label":e.name,children:(0,X.jsxs)(`div`,{"data-testid":`setup-dialog`,className:`relative flex max-h-[85vh] w-[92vw] max-w-lg flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,X.jsx)(fe,{onClose:t,testId:`setup-dialog-close`,disabled:O}),(0,X.jsx)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:(0,X.jsx)(`h2`,{className:f(`pr-6`,ue),children:Y})}),(0,X.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-6`,children:[J&&(0,X.jsx)(`div`,{className:`flex justify-center py-6`,children:(0,X.jsx)(m,{size:`small`})}),!J&&R&&(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,X.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:n(d.SETUP$UNSUPPORTED_MESSAGE)}),z.length>0&&(0,X.jsx)(`p`,{"data-testid":`setup-unmet-requirements`,className:`text-sm text-[var(--oh-muted)]`,children:z.join(`, `)})]}),!J&&!R&&B===`prerequisites`&&(0,X.jsx)(Pe,{prerequisites:o}),!J&&!R&&B===`form`&&(0,X.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,X.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:e.description}),e.setup.form.note&&(0,X.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:e.setup.form.note}),Object.entries(N).map(([e,t])=>(0,X.jsx)(Me,{name:e,field:t,value:b[e]??``,error:be(e),options:ae(e,t,P),repository:C[e]??null,disabled:O,onChange:t=>V(e,t),onRepositoryChange:t=>oe(n=>({...n,[e]:t})),onBlur:_e},e))]}),!J&&!R&&B===`review`&&(0,X.jsx)(Fe,{setup:e.setup,values:b}),E.formErrors.map(e=>(0,X.jsx)(`p`,{role:`alert`,"data-testid":`setup-form-error`,className:`pt-4 text-sm text-red-400`,children:e},e))]}),(0,X.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[B===`review`&&(0,X.jsx)(A,{testId:`setup-back-button`,type:`button`,variant:`secondary`,isDisabled:O,onClick:()=>y(`form`),children:n(d.BUTTON$BACK)}),R?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(A,{type:`button`,variant:`secondary`,isDisabled:O,onClick:t,children:n(d.BUTTON$CLOSE)}),ye&&(0,X.jsx)(A,{testId:`setup-fallback-conversation`,type:`button`,variant:`primary`,isDisabled:O,onClick:ve,children:n(d.SETUP$FALLBACK_CONVERSATION)})]}):(0,X.jsx)(A,{testId:`setup-continue-button`,type:`button`,variant:`primary`,isDisabled:J||O||B===`prerequisites`&&o.isBlocked,onClick:B===`review`?K:U,children:n(B===`review`?d.SETUP$CONFIRM:d.BUTTON$CONTINUE)})]})]})})}function Ve(e,t){switch(e.code){case`required`:return t(d.SETUP$VALIDATION_REQUIRED);case`minLength`:return t(d.SETUP$VALIDATION_MIN_LENGTH,{length:e.length});case`maxLength`:return t(d.SETUP$VALIDATION_MAX_LENGTH,{length:e.length});case`invalidOption`:return t(d.SETUP$VALIDATION_INVALID_OPTION);case`unsafeExpressionLiteral`:return t(d.SETUP$VALIDATION_UNSAFE_VALUE);default:return e}}var He=({params:e})=>{let t=g.findById(e.automationId??``);if(!t||!h())throw new Response(null,{status:404,statusText:`Not Found`});return{automationId:t.id}},Ue=o(function(){let{automationId:e}=i(),t=r(),n=a(),o=g.findById(e);return o?(0,X.jsx)(Be,{entry:o,onClose:()=>{t.key==="default"?n(E(),{replace:!0}):n(-1)}}):null});export{He as clientLoader,Ue as default};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{U as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{D as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js";import{t as s}from"./useQueries-DlbhlH9I.js";import{t as c}from"./recommended-automations-launcher-6ABrI9Cy.js";import{Ft as l,It as u,Lt as d,n as f}from"./active-backend-context-CrHTlgvN.js";import{W as p,a as m,t as h}from"./utils-CN5ZfZy1.js";import{t as g}from"./check-CS0vmpQQ.js";import{t as _}from"./chevron-down-e1QBpjVy.js";import{i as v,n as y,r as b,t as ee}from"./empty-state-BoGVDecT.js";import{P as x,_ as S,c as te,g as ne,h as re,l as ie,m as ae}from"./home-automation-run-tooltip-BVNDWjAH.js";import{t as C}from"./list-filter-DsEK7NFC.js";import{t as oe}from"./plus-C7Slq-0I.js";import{t as se}from"./refresh-cw-3q3Frrii.js";import{n as w,t as T}from"./context-menu-list-item-I86vKcmM.js";import{A as ce,C as le,E as ue,_ as de,l as fe,n as E,t as pe,v as me,z as he}from"./use-tracking-D53y3TH9.js";import{t as D}from"./modal-backdrop-BSzNhM4r.js";import{n as O}from"./modal-classes-C8eycCwG.js";import{t as k}from"./brand-button-BAfk4wGP.js";import{n as ge}from"./navigation-context-CQZwH_tC.js";import{t as A,u as _e}from"./dropdown-classes-Bc1djN0-.js";import{t as j}from"./modal-close-button-DDzdRvCs.js";import{t as M}from"./use-click-outside-element-W6Os4Nlb.js";import{t as ve}from"./use-automation-health-E6NZi9rb.js";import{t as N}from"./automation-C_eCrGyP.js";import{a as ye,c as P,i as be,o as xe,r as Se,t as Ce}from"./use-automations-xijQKIl9.js";import{a as F}from"./extension-module-card-classes-DpeaYhYo.js";import{n as we}from"./api-error-message-B-XdSk3b.js";import{p as I,t as L}from"./kebab-menu-item-content-D8hSNGmm.js";import{t as Te}from"./edit-automation-modal-DadGbJ2u.js";import{n as Ee,t as De}from"./error-state-Body8Ngd.js";import{t as R}from"./enum-filter-dropdown-Bgca129f.js";import{n as Oe,r as ke,t as Ae}from"./manifest-subpage-layout-CAOYzrYp.js";import{i as je,n as Me,r as Ne,t as Pe}from"./automation-export-D3a3of4G.js";var z=o(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),Fe=o(`grid-2x2`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),Ie=o(`rows-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),B=e(t(),1),V=e(n(),1),H=r();function U({icon:e,label:t,isSelected:n}){return(0,H.jsxs)(`span`,{className:`flex min-w-0 w-full items-center gap-2`,children:[(0,H.jsx)(`span`,{className:_e,"aria-hidden":!0,children:(0,H.jsx)(e,{})}),(0,H.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),n?(0,H.jsx)(g,{className:`size-4 shrink-0`,"aria-hidden":!0}):null]})}var W=[{value:`grid`,icon:Fe,labelKey:p.AUTOMATIONS$VIEW_GRID,testId:`automations-view-toggle-grid`},{value:`list`,icon:Ie,labelKey:p.AUTOMATIONS$VIEW_LIST,testId:`automations-view-toggle-list`}];function Le({view:e,onChange:t,disabled:n=!1}){let{t:r}=a(`openhands`),[i,o]=(0,B.useState)(!1),[s,c]=(0,B.useState)(),l=(0,B.useRef)(null),u=(0,B.useRef)(null),d=(W.find(t=>t.value===e)??W[0]).icon;(0,B.useLayoutEffect)(()=>{if(!i||!l.current)return;let e=()=>{let e=l.current?.getBoundingClientRect();e&&c({position:`fixed`,zIndex:9999,top:e.bottom+4,right:window.innerWidth-e.right})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[i]),(0,B.useEffect)(()=>{if(!i)return;let e=e=>{let t=e.target;l.current?.contains(t)||u.current?.contains(t)||o(!1)},t=e=>{e.key===`Escape`&&o(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[i]);let f=i&&s?(0,H.jsx)(w,{ref:u,theme:`popover`,className:`min-w-[10rem]`,children:W.map(n=>(0,H.jsx)(`li`,{children:(0,H.jsx)(T,{testId:n.testId,onClick:()=>{t(n.value),o(!1)},className:`group`,children:(0,H.jsx)(U,{icon:n.icon,label:r(n.labelKey),isSelected:e===n.value})})},n.value))}):null;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`button`,{ref:l,type:`button`,"data-testid":`automations-view-toggle`,"aria-label":r(p.AUTOMATIONS$VIEW_MODE),"aria-haspopup":`menu`,"aria-expanded":i,"aria-disabled":n,disabled:n,onClick:()=>{n||o(e=>!e)},className:h(`inline-flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-[var(--oh-border)] bg-base-secondary text-white transition-colors hover:bg-[var(--oh-interactive-hover)] focus-visible:border-white/40 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/20`,`disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-base-secondary`),children:(0,H.jsx)(d,{className:`size-4`,"aria-hidden":!0})}),i&&s&&typeof document<`u`?V.createPortal((0,H.jsx)(`div`,{style:s,children:f}),document.body):null]})}function Re({onAdd:e,onImport:t,isAddDisabled:n=!1}){let{t:r}=a(`openhands`),[i,o]=(0,B.useState)(!1),[s,c]=(0,B.useState)(),l=(0,B.useRef)(null),u=(0,B.useRef)(null);(0,B.useLayoutEffect)(()=>{if(!i||!l.current)return;let e=()=>{let e=l.current?.getBoundingClientRect();e&&c({position:`fixed`,zIndex:9999,top:e.bottom+2,right:window.innerWidth-e.right})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[i]),(0,B.useEffect)(()=>{if(!i)return;let e=e=>{let t=e.target;l.current?.contains(t)||u.current?.contains(t)||o(!1)},t=e=>{e.key===`Escape`&&o(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[i]);let d=e=>{e(),o(!1)},f=i&&s?(0,H.jsxs)(w,{ref:u,testId:`automations-add-automation-menu`,theme:`popover`,position:`none`,alignment:`none`,spacing:`none`,className:`min-w-[10rem]`,children:[(0,H.jsx)(`li`,{children:(0,H.jsx)(T,{testId:`automations-add-automation-create`,isDisabled:n,className:`group`,onClick:()=>{n||d(e)},children:(0,H.jsx)(L,{icon:(0,H.jsx)(oe,{className:`size-4`,"aria-hidden":!0}),label:r(p.AUTOMATIONS$CREATE_AUTOMATION_BUTTON)})})}),(0,H.jsx)(`li`,{children:(0,H.jsx)(T,{testId:`automations-import-automation`,className:`group`,onClick:()=>d(t),children:(0,H.jsx)(L,{icon:(0,H.jsx)(z,{className:`size-4`,"aria-hidden":!0}),label:r(p.AUTOMATIONS$IMPORT)})})})]}):null;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(k,{ref:l,type:`button`,variant:`secondary`,testId:`automations-add-automation`,className:`whitespace-nowrap`,"aria-haspopup":`menu`,"aria-expanded":i,onClick:()=>o(e=>!e),children:[r(p.AUTOMATIONS$ADD_AUTOMATION),(0,H.jsx)(_,{className:`size-4 shrink-0`,"aria-hidden":!0})]}),i&&s&&typeof document<`u`?V.createPortal((0,H.jsx)(`div`,{style:s,children:f}),document.body):null]})}function G({label:e,value:t}){return(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsx)(`dt`,{className:`text-xs font-medium uppercase tracking-wide text-muted`,children:e}),(0,H.jsx)(`dd`,{className:`whitespace-pre-wrap break-words text-sm text-content`,children:t})]})}function ze(e){let t=e.dataTransfer?.files;return t&&t.length>0?t[0]:null}function K({onFile:e}){let{t}=a(`openhands`),n=(0,B.useRef)(null),[r,i]=(0,B.useState)(!1),o=()=>n.current?.click();return(0,H.jsxs)(`div`,{className:`flex flex-col gap-5 px-6 pb-6`,children:[(0,H.jsxs)(`p`,{className:`text-sm leading-relaxed text-tertiary-light`,children:[t(p.AUTOMATIONS$IMPORT_EXPLAIN),` `,(0,H.jsx)(`a`,{href:de,target:`_blank`,rel:`noopener noreferrer`,"data-testid":`import-automation-format-docs`,className:`text-white no-underline transition-colors hover:text-white`,children:t(p.AUTOMATIONS$IMPORT_FORMAT_DOCS)})]}),(0,H.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:t(p.AUTOMATIONS$IMPORT_DISABLED_NOTICE)}),(0,H.jsx)(`input`,{ref:n,type:`file`,accept:`application/json,.json`,className:`hidden`,"data-testid":`automations-import-file`,onChange:()=>{let t=n.current,r=t?.files?.[0];t&&(t.value=``),r&&e(r)}}),(0,H.jsxs)(`div`,{"data-testid":`import-automation-dropzone`,"data-active":r?`true`:`false`,onClick:o,onDragEnter:e=>{e.preventDefault(),i(!0)},onDragOver:e=>{e.preventDefault(),i(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||i(!1)},onDrop:t=>{t.preventDefault(),i(!1);let n=ze(t);n&&e(n)},className:h(`flex cursor-pointer flex-col items-center justify-center gap-3 rounded-xl border border-dashed px-6 py-10 text-center`,r?`border-[var(--oh-focus)] bg-[var(--oh-interactive-hover)]`:`border-[var(--oh-border)] bg-[var(--oh-surface)]`),children:[(0,H.jsx)(z,{className:`size-8 text-[var(--oh-muted)]`,"aria-hidden":!0}),(0,H.jsx)(`p`,{className:`text-sm font-medium text-content`,children:t(p.AUTOMATIONS$IMPORT_DROPZONE)}),(0,H.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:t(p.AUTOMATIONS$IMPORT_OR)}),(0,H.jsx)(k,{testId:`import-automation-choose-file`,type:`button`,variant:`secondary`,onClick:e=>{e?.stopPropagation(),o()},children:t(p.AUTOMATIONS$IMPORT_CHOOSE_FILE)})]})]})}function Be({isOpen:e,spec:t,isImporting:n,onClose:r,onImport:i,onFile:o}){let{t:s}=a(`openhands`);if(!e)return null;let c=t?t.trigger.type===`event`?[t.trigger.source,I(t.trigger.on)].filter(Boolean).join(`: `):[t.trigger.schedule_human??t.trigger.schedule,t.timezone??t.trigger.timezone].filter(Boolean).join(` · `):``;return(0,H.jsx)(D,{onClose:n?void 0:r,closeOnEscape:!n,closeOnBackdropClick:!n,"aria-label":s(p.AUTOMATIONS$IMPORT),children:(0,H.jsxs)(`div`,{"data-testid":`import-automation-modal`,"data-view":t?`preview`:`picker`,className:`relative flex max-h-[85vh] w-[min(36rem,calc(100vw-2rem))] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,H.jsx)(j,{onClose:r,testId:`import-automation-modal-close`,disabled:n}),(0,H.jsxs)(`header`,{className:`px-6 pb-4 pt-6`,children:[(0,H.jsx)(`h2`,{className:h(`pr-6`,O),children:s(p.AUTOMATIONS$IMPORT)}),t?(0,H.jsx)(`p`,{className:`mt-2 text-sm text-tertiary-light`,children:s(p.AUTOMATIONS$IMPORT_PREVIEW_DESCRIPTION)}):null]}),t?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`dl`,{className:`mx-6 flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] px-4 py-4`,children:[(0,H.jsx)(G,{label:s(p.AUTOMATIONS$NAME),value:t.name}),(0,H.jsx)(G,{label:s(p.AUTOMATIONS$DETAIL$TRIGGER),value:c}),(0,H.jsx)(G,{label:s(p.AUTOMATIONS$PROMPT),value:t.prompt??``}),t.plugins&&t.plugins.length>0?(0,H.jsx)(G,{label:s(p.AUTOMATIONS$DETAIL$PLUGINS),value:t.plugins.join(`, `)}):null]}),(0,H.jsxs)(`footer`,{className:`px-6 py-5`,children:[(0,H.jsx)(`p`,{className:`mb-4 text-sm text-tertiary-light`,children:s(p.AUTOMATIONS$IMPORT_DISABLED_NOTICE)}),(0,H.jsxs)(`div`,{className:`flex justify-end gap-3`,children:[(0,H.jsx)(k,{testId:`import-automation-cancel`,type:`button`,variant:`secondary`,onClick:r,isDisabled:n,children:s(p.AUTOMATIONS$CANCEL)}),(0,H.jsx)(k,{testId:`import-automation-confirm`,type:`button`,variant:`primary`,onClick:i,isDisabled:n,"aria-busy":n,children:s(n?p.AUTOMATIONS$IMPORTING:p.AUTOMATIONS$IMPORT)})]})]})]}):(0,H.jsx)(K,{onFile:o})]})})}var q=20,Ve=15e3,He=e=>e.status===N.PENDING||e.status===N.RUNNING;function Ue(e,t={}){let{enabled:n=!0}=t,r=f();return s({queries:e.map(e=>({queryKey:[...P,e.id,{limit:q,offset:0},r.backend.id,r.orgId],queryFn:({signal:t})=>x.run(()=>E.getAutomationRuns(e.id,q,0),t),staleTime:60*1e3,retry:!1,refetchOnWindowFocus:!1,meta:{disableToast:!0},enabled:n&&!!e.id,refetchInterval:e=>{let t=e.state.data?.runs?.[0];return t&&He(t)?Ve:!1}})),combine:t=>{let n=new Map;return e.forEach((e,r)=>{let i=t[r];n.set(e.id,{summary:i.data?S(i.data):null,isLoading:i.isLoading,isError:i.isError})}),n}})}function J({label:e,children:t}){return(0,H.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,H.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:e}),t]})}function Y(e){return Object.fromEntries(e.map(e=>[e.value,e.label]))}function We({spec:e,status:t,trigger:n,sort:r,onStatusChange:i,onTriggerChange:o,onSortChange:s}){let{t:c}=a(`openhands`),[l,u]=(0,B.useState)(!1),d=M(()=>u(!1)),f=e.filters.find(e=>e.id===`status`),m=e.filters.find(e=>e.id===`trigger`),g=[f&&t!==f.options[0]?.value,m&&n!==m.options[0]?.value,r!==e.sort.default].filter(Boolean).length,v=c(p.AUTOMATIONS$FILTERS),y=f?.options[0]?.value,b=m?.options[0]?.value;return(0,H.jsxs)(`div`,{ref:d,className:`relative shrink-0 w-auto`,"data-testid":`automations-filters`,children:[(0,H.jsxs)(`button`,{type:`button`,"data-testid":`dropdown-trigger`,"aria-haspopup":`true`,"aria-expanded":l,"aria-label":v,onClick:()=>u(e=>!e),className:h(A,`h-9 py-0`,g>0&&`border-white/60 bg-white/10`),children:[(0,H.jsx)(C,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0}),(0,H.jsx)(`span`,{className:`whitespace-nowrap`,children:v}),g>0?(0,H.jsx)(`span`,{className:`rounded-full bg-white px-1.5 text-[11px] font-medium text-black`,children:g}):null,(0,H.jsx)(_,{className:h(`h-4 w-4 shrink-0 text-tertiary-alt transition-transform`,l&&`rotate-180`),"aria-hidden":!0})]}),l?(0,H.jsxs)(`div`,{role:`group`,"data-testid":`automations-filters-menu`,"aria-label":v,className:`absolute right-0 top-full z-50 mt-1 flex min-w-[16rem] w-max flex-col gap-3 overflow-visible rounded-[6px] bg-tertiary p-3 context-menu-box-shadow`,children:[f?(0,H.jsx)(J,{label:f.label,children:(0,H.jsx)(R,{testId:`automations-filter-status`,value:t,onChange:i,options:f.options.map(e=>e.value),labelByValue:Y(f.options),ariaLabel:f.label,fullWidth:!0})}):null,m?(0,H.jsx)(J,{label:m.label,children:(0,H.jsx)(R,{testId:`automations-filter-trigger`,value:n,onChange:o,options:m.options.map(e=>e.value),labelByValue:Y(m.options),ariaLabel:m.label,fullWidth:!0})}):null,(0,H.jsx)(J,{label:e.sort.label,children:(0,H.jsx)(R,{testId:`automations-sort`,value:r,onChange:s,options:e.sort.options.map(e=>e.value),labelByValue:Y(e.sort.options),ariaLabel:e.sort.label,fullWidth:!0})}),g>0?(0,H.jsx)(`button`,{type:`button`,"data-testid":`automations-filters-reset`,onClick:()=>{y&&i(y),b&&o(b),s(e.sort.default)},className:`self-start text-sm text-muted hover:text-foreground`,children:c(p.AUTOMATIONS$RESET_ALL)}):null]}):null]})}function Ge({onClear:e}){let{t}=a(`openhands`);return(0,H.jsxs)(`div`,{"data-testid":`automations-filtered-empty`,className:`rounded-xl border border-dashed border-[var(--oh-border)] p-8 text-center`,children:[(0,H.jsx)(`p`,{className:`text-sm text-muted`,children:t(p.AUTOMATIONS$NO_FILTER_MATCHES)}),(0,H.jsx)(`button`,{type:`button`,"data-testid":`automations-clear-filters`,onClick:e,className:`mt-2 text-sm text-white underline-offset-2 hover:underline`,children:t(p.AUTOMATIONS$CLEAR_FILTERS)})]})}function Ke({label:e,tiles:t}){return(0,H.jsx)(`section`,{"aria-label":e,className:`grid grid-cols-2 gap-3 xl:grid-cols-4`,children:t.map(e=>(0,H.jsxs)(`div`,{"data-testid":`overview-tile-${e.key}`,className:h(F,`p-4`),children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,H.jsx)(`span`,{className:`truncate text-xs text-muted`,children:e.label}),(0,H.jsx)(e.Icon,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]}),(0,H.jsx)(`div`,{className:`mt-2 text-xl font-semibold text-content`,children:e.value}),(0,H.jsx)(`div`,{className:`mt-1 truncate text-xs text-muted`,children:e.detail})]},e.key))})}var qe=50,X=()=>{if(!ce())throw new Response(null,{status:404,statusText:`Not Found`});return null},Z=i(function(){let{t:e}=a(`openhands`),t=ue(),n=(0,B.useMemo)(()=>le(),[]),r=Oe(),i=n&&r?{spec:n,nav:r}:null,[o,s]=(0,B.useState)(``),[g,_]=(0,B.useState)(`all`),[x,S]=(0,B.useState)(`all`),[C,oe]=(0,B.useState)(n?.sort.default??`last-run`),[w,T]=(0,B.useState)(()=>te()),[ce,de]=(0,B.useState)(qe),[E,D]=(0,B.useState)(null),[O,A]=(0,B.useState)(null),[_e,j]=(0,B.useState)(!1),[M,N]=(0,B.useState)(null),[P,F]=(0,B.useState)(!1),I=f(),{navigate:L}=ge(),R=I.backend.kind===`local`,{data:z,isLoading:Fe,refetch:Ie}=ve(),V=z?.status===`ok`,{data:U,isLoading:W,isError:G,refetch:ze}=Ce({limit:ce,offset:0,enabled:V}),K=Ue(U?.automations??[],{enabled:V&&i!==null}),{trackPrebuiltAutomationEnabled:q,trackAutomationExported:Ve}=pe(),He=xe(),J=Se(),Y=be(),X=ye(),Z=(0,B.useMemo)(()=>U?.automations?n?ae(U.automations,{search:o,status:g,trigger:x,sort:C},K):U.automations.filter(e=>ne(e,o)):[],[U?.automations,n,o,g,x,C,K]),Je=(0,B.useMemo)(()=>Z.filter(e=>e.enabled),[Z]),Ye=(0,B.useMemo)(()=>Z.filter(e=>!e.enabled),[Z]),Xe=(e,t)=>{let n=!t;if(He.mutate({id:e,enabled:n}),n){let t=U?.automations.find(t=>t.id===e);q({automationId:e,automationName:t?.name??e})}},Ze=t=>{Y.mutate(t,{onSuccess:()=>{u(e(p.AUTOMATIONS$RUN_NOW_SUCCESS))},onError:t=>{l(we(t,e(p.AUTOMATIONS$RUN_NOW_ERROR)))}})},Qe=e=>{let t=U?.automations.find(t=>t.id===e);t&&D({id:e,name:t.name})},Q=e=>{let t=U?.automations.find(t=>t.id===e);t&&A(t)},$e=e=>{let t=`${JSON.stringify(Ne(e),null,2)}\n`;m(new Blob([t],{type:`application/json`}),Pe(e)),Ve({backendKind:I.backend.kind})},et=async t=>{try{let n;try{n=JSON.parse(await t.text())}catch{l(e(p.AUTOMATIONS$IMPORT_INVALID_JSON));return}N(Me(n))}catch(t){l(t instanceof Error?t.message:e(p.ERROR$GENERIC))}},tt=()=>{M&&X.mutate({...M,enabled:!1},{onSuccess:t=>{F(!1),N(null),d(e(p.AUTOMATIONS$IMPORT_SUCCESS,{name:t.name}),e(p.AUTOMATIONS$IMPORT_VIEW),me(t.id))},onError:t=>{l(we(t,e(p.ERROR$GENERIC)))}})},nt=()=>{E&&(J.mutate(E.id),D(null))},rt=(0,B.useCallback)(e=>{T(e),ie(e)},[]),it=()=>{s(``),_(`all`),S(`all`)},at=(0,B.useMemo)(()=>{if(!n)return[];let e=U?.automations??[];return n.overview.tiles.map(t=>{let n=re(t.metric,e,K),r=n.isZero&&t.zeroDetail?t.zeroDetail:t.detail;return{key:t.metric,label:t.label,value:n.display,detail:fe(r,n.placeholderValues),Icon:he[t.icon]}})},[n,U?.automations,K]),ot=i?{spec:i.spec.insights,byId:K}:void 0,st=e=>i?(0,H.jsx)(Ae,{heading:i.nav.heading,navTestIdBase:`automations-navbar`,items:i.nav.items,children:e}):(0,H.jsx)(`div`,{className:`min-h-full`,children:(0,H.jsx)(`div`,{className:`p-6 max-w-4xl mx-auto`,children:e})}),ct=U?U.total>U.automations.length:!1,$=!W&&!G&&U?.automations.length===0;return st(Fe?(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h1`,{className:`text-xl font-medium text-content`,children:t.listTitle}),(0,H.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:t.listSubtitle}),(0,H.jsx)(`div`,{className:`mt-6 flex flex-col gap-3`,children:Array.from({length:3}).map((e,t)=>(0,H.jsx)(v,{},`skeleton-${String(t)}`))})]}):V?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h1`,{className:`text-xl font-semibold text-content`,children:t.listTitle}),(0,H.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:t.listSubtitle})]}),(0,H.jsxs)(`div`,{className:`flex shrink-0 flex-wrap justify-end gap-2`,children:[R&&(0,H.jsx)(k,{type:`button`,variant:`secondary`,testId:`automations-git-sync`,className:`whitespace-nowrap`,onClick:()=>L?.(`/automations/git-sync`),startContent:(0,H.jsx)(se,{className:`size-4`,"aria-hidden":!0}),children:e(p.AUTOMATIONS$GIT_SYNC$NAV_BUTTON)}),(0,H.jsx)(Re,{onAdd:()=>j(!0),onImport:()=>F(!0)})]})]}),i&&(0,H.jsx)(Ke,{label:i.spec.overview.label,tiles:at}),(0,H.jsxs)(`div`,{className:h(`flex items-stretch gap-2`,i?`flex-wrap`:`mt-6`),children:[(0,H.jsx)(ke,{value:o,onChange:s}),i&&(0,H.jsx)(We,{spec:i.spec,status:g,trigger:x,sort:C,onStatusChange:_,onTriggerChange:S,onSortChange:oe}),(0,H.jsx)(Le,{view:w,onChange:rt,disabled:$})]}),(0,H.jsxs)(`div`,{className:h(`flex flex-col gap-6`,!i&&`mt-6`),children:[W&&(0,H.jsx)(`div`,{className:`flex flex-col gap-3`,children:Array.from({length:3}).map((e,t)=>(0,H.jsx)(v,{},`skeleton-${String(t)}`))}),G&&!W&&(0,H.jsx)(De,{onRetry:ze}),$&&(0,H.jsx)(ee,{}),!W&&!G&&U&&U.automations.length>0&&(i&&Z.length===0?(0,H.jsx)(Ge,{onClear:it}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(b,{title:e(p.AUTOMATIONS$ACTIVE),count:Je.length,automations:Je,view:w,onToggle:Xe,onRunNow:Ze,runPendingId:Y.isPending?Y.variables??null:null,onDelete:Qe,onExport:$e,onEdit:R?Q:void 0,insights:ot}),(0,H.jsx)(b,{title:e(p.AUTOMATIONS$INACTIVE),count:Ye.length,automations:Ye,view:w,onToggle:Xe,onRunNow:Ze,runPendingId:Y.isPending?Y.variables??null:null,onDelete:Qe,onExport:$e,onEdit:R?Q:void 0,insights:ot}),ct&&(0,H.jsx)(`button`,{type:`button`,onClick:()=>de(e=>e+qe),className:`self-center rounded-lg border border-[var(--oh-border)] px-6 py-2 text-sm text-white hover:bg-surface-raised`,children:e(p.AUTOMATIONS$LOAD_MORE)})]}))]}),!i&&(0,H.jsx)(`div`,{className:`mt-6`,children:(0,H.jsx)(c,{query:o})}),(0,H.jsx)(je,{automationName:E?.name??``,isOpen:E!==null,onConfirm:nt,onCancel:()=>D(null)}),O&&(0,H.jsx)(Te,{automation:O,isOpen:O!==null,onClose:()=>A(null)}),(0,H.jsx)(y,{isOpen:_e,onClose:()=>j(!1)}),(0,H.jsx)(Be,{isOpen:P,spec:M,isImporting:X.isPending,onClose:()=>{F(!1),N(null)},onImport:tt,onFile:et})]}):(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h1`,{className:`text-xl font-medium text-content`,children:t.listTitle}),(0,H.jsx)(`p`,{className:`mt-1 text-sm text-muted`,children:t.listSubtitle}),(0,H.jsx)(Ee,{onRetry:Ie})]}))});export{X as clientLoader,Z as default};
@@ -1 +0,0 @@
1
- import{a as e,r as t}from"./rolldown-runtime-Cyuzqnbw.js";import{St as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{D as a,a as o,b as s,i as c,n as l,r as u}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js";import{t as d}from"./useQuery-BSTgq1rl.js";import{$ as f,Bt as p,Et as m,K as h,Ut as g,Vt as _,r as v,tt as y,w as b}from"./active-backend-context-CrHTlgvN.js";import{W as x,t as S}from"./utils-CN5ZfZy1.js";import{t as C}from"./chevron-down-e1QBpjVy.js";import{a as w,i as T,n as E,r as D}from"./cloud-funnel-analytics-CztBCCPp.js";import{t as ee}from"./info-B6RQawoW.js";import{a as O,i as k,n as A,o as j,r as M}from"./use-onboarding-completion-D8U7k4Qb.js";import{t as N}from"./use-tracking-D53y3TH9.js";import{t as P}from"./modal-backdrop-BSzNhM4r.js";import{n as te,r as ne,t as re}from"./modal-body-BxZjsju9.js";import{n as ie,r as ae}from"./modal-classes-C8eycCwG.js";import{t as F}from"./brand-button-BAfk4wGP.js";import{n as oe}from"./navigation-context-CQZwH_tC.js";import{t as I}from"./modal-close-button-DDzdRvCs.js";import{t as L}from"./settings-input-Db-1g8Ql.js";var se=a(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),R=e(n()),z=r(),B=e=>(0,z.jsxs)(`svg`,{width:1365,height:1365,viewBox:`0 -24 148 148`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,z.jsx)(`path`,{d:`M71.7542 16.863V2.97414C71.7542 1.82355 72.6872 0.890503 73.8378 0.890503C74.9884 0.890503 75.9214 1.82355 75.9214 2.97414V16.863C75.9214 18.0136 74.9884 18.9466 73.8378 18.9466C72.6872 18.9466 71.7542 18.0136 71.7542 16.863Z`,fill:`white`}),(0,z.jsx)(`path`,{d:`M82.5272 18.9329L89.4716 6.90477C90.0469 5.90832 91.3215 5.5668 92.3179 6.1421C93.3144 6.7174 93.6559 7.99197 93.0806 8.98841L86.1362 21.0165C85.5609 22.0129 84.2863 22.3545 83.2899 21.7792C82.2934 21.2039 81.9519 19.9293 82.5272 18.9329Z`,fill:`white`}),(0,z.jsx)(`path`,{d:`M65.1481 18.9329L58.2037 6.90477C57.6284 5.90832 56.3538 5.5668 55.3574 6.1421C54.3609 6.7174 54.0194 7.99197 54.5947 8.98841L61.5391 21.0165C62.1144 22.0129 63.389 22.3545 64.3854 21.7792C65.3819 21.2039 65.7234 19.9293 65.1481 18.9329Z`,fill:`white`}),(0,z.jsx)(`path`,{d:`M140.606 62.0292C140.606 58.409 141.583 47.6748 141.89 44.1323C142.097 41.7374 141.809 40.4247 141.424 39.7542C141.141 39.2626 140.699 38.915 139.634 38.8436C138.865 38.7921 138.027 39.0114 137.401 39.5761C136.814 40.1052 136.159 41.1682 136.159 43.3176L136.155 43.4388L135.198 59.758C135.164 60.3451 134.883 60.8911 134.424 61.2599C133.966 61.6284 133.374 61.7859 132.793 61.6941L122.764 60.1068L111.948 58.6703C110.949 58.5376 110.188 57.7084 110.142 56.7016L109.561 44.1323C109.535 43.621 109.51 43.1141 109.484 42.6146C109.241 37.9294 109.022 33.7805 109.022 32.4282C109.022 28.3859 108.338 26.6806 107.74 25.9634C107.263 25.3915 106.577 25.1402 105.11 25.1402C104.583 25.1402 104.212 25.2481 103.933 25.4111C103.659 25.5714 103.346 25.8587 103.049 26.4208C102.41 27.6257 101.945 29.891 102.118 33.8479C102.342 38.9804 102.692 42.8146 103.035 46.2718C103.377 49.7231 103.718 52.8561 103.908 56.4971C104.204 62.1966 104.178 66.1256 103.945 68.7924C103.828 70.124 103.656 71.1996 103.423 72.0501C103.202 72.8558 102.871 73.6757 102.296 74.2887C101.6 75.0303 100.608 75.3844 99.577 75.136C98.7592 74.9389 98.1847 74.4215 97.8706 74.0916C97.2141 73.4017 96.7501 72.5106 96.568 72.0512C95.5097 69.3812 92.2352 63.1808 87.8023 59.6811C86.5089 58.6599 85.5666 58.3652 84.9736 58.3204C84.4148 58.2783 84.0094 58.4436 83.6909 58.6967C83.34 58.9756 83.0781 59.3811 82.9479 59.7643C82.9019 59.8999 82.8823 59.9968 82.8741 60.0584C84.0759 62.0865 88.8421 69.5222 91.0896 77.069C92.7648 82.6941 96.8038 88.4259 99.8194 90.8809C102.74 93.258 107.988 94.7313 113.9 95.0218C119.756 95.3095 125.788 94.4121 130.033 92.5092C138.233 88.8334 139.903 80.7382 140.651 77.2292C141.232 74.5057 141.243 71.5987 141.087 68.9009C141.01 67.5551 140.894 66.2969 140.793 65.1373C140.695 64.0105 140.606 62.9215 140.606 62.0292ZM120.986 27.0953C120.986 25.8314 120.648 24.7049 120.089 23.9514C119.583 23.27 118.84 22.7987 117.646 22.7984C116.668 22.7982 116.011 22.9187 115.546 23.1167C115.13 23.2943 114.781 23.5699 114.463 24.0831C113.73 25.2671 113.192 27.6455 113.189 32.384L113.721 43.9088C113.91 47.5661 114.106 51.4922 114.235 54.7707L120.986 55.6666V27.0953ZM125.153 56.2652L131.172 57.218L131.992 43.267V32.5083C131.992 31.031 131.39 30.1275 130.678 29.5489C129.884 28.9039 128.957 28.6731 128.519 28.6731C127.722 28.6731 126.899 28.797 126.306 29.2179C125.849 29.5421 125.153 30.3087 125.153 32.5083V56.2652ZM136.159 35.4278C137.406 34.8069 138.74 34.6083 139.912 34.6868C142.037 34.8292 143.91 35.718 145.037 37.6779C146.06 39.4592 146.273 41.8136 146.041 44.4927C145.72 48.1949 144.772 58.6457 144.772 62.0292C144.772 62.708 144.843 63.6116 144.944 64.7758C145.042 65.907 145.165 67.2389 145.247 68.6606C145.411 71.4987 145.422 74.8383 144.727 78.0987C144.002 81.4953 142.041 91.6918 131.738 96.3108C126.731 98.5551 120.002 99.4936 113.696 99.1838C107.445 98.8767 101.128 97.3189 97.1887 94.1122C93.4809 91.0937 88.9938 84.6307 87.0962 78.2589C84.9529 71.0619 80.3109 63.9646 79.1527 61.9533C78.4706 60.7689 78.684 59.3628 79.0019 58.4258C79.3607 57.3688 80.0554 56.2631 81.0993 55.4337C82.1758 54.5784 83.6043 54.0377 85.2876 54.1647C86.9369 54.2893 88.6462 55.0393 90.3834 56.4107C94.8541 59.9401 98.1342 65.5082 99.7424 68.9231C99.759 68.7664 99.779 68.6024 99.7941 68.4298C100.003 66.0435 100.039 62.3344 99.7467 56.7132C99.5635 53.1942 99.2356 50.1809 98.8888 46.6828C98.5425 43.1904 98.184 39.2713 97.955 34.0302C97.7722 29.8481 98.2012 26.6722 99.3672 24.471C99.9716 23.3302 100.79 22.4223 101.83 21.814C102.866 21.2087 103.995 20.974 105.11 20.974C106.759 20.974 108.813 21.2062 110.448 22.7678C110.593 22.4576 110.75 22.1652 110.921 21.8899C111.676 20.6698 112.681 19.8084 113.912 19.2835C115.095 18.7791 116.378 18.6309 117.646 18.6311C120.195 18.6315 122.164 19.7567 123.434 21.4683C124.256 22.576 124.75 23.8775 124.985 25.1982C126.338 24.5876 127.691 24.5068 128.519 24.5068C129.933 24.5068 131.784 25.0791 133.305 26.3154C134.908 27.6179 136.159 29.6733 136.159 32.5083V35.4278Z`,fill:`white`}),(0,z.jsx)(`path`,{d:`M7.15661 62.0292C7.15661 58.409 6.17994 47.6748 5.87291 44.1323C5.6654 41.7374 5.95357 40.4247 6.33875 39.7542C6.62116 39.2626 7.06336 38.915 8.12834 38.8436C8.89759 38.7921 9.73544 39.0114 10.3616 39.5761C10.9484 40.1052 11.6032 41.1682 11.6032 43.3176L11.6074 43.4388L12.5644 59.758C12.5988 60.3451 12.8798 60.8911 13.338 61.2599C13.7961 61.6284 14.3887 61.7859 14.9695 61.6941L24.9988 60.1068L35.8143 58.6703C36.8135 58.5376 37.5741 57.7084 37.6208 56.7016L38.2015 44.1323C38.2279 43.621 38.2525 43.1141 38.2784 42.6146C38.5218 37.9294 38.7401 33.7805 38.7401 32.4282C38.7401 28.3859 39.4246 26.6806 40.0227 25.9634C40.4996 25.3915 41.185 25.1402 42.6523 25.1402C43.1794 25.1402 43.5505 25.2481 43.8295 25.4111C44.1038 25.5714 44.416 25.8587 44.7138 26.4208C45.3521 27.6257 45.8173 29.891 45.6444 33.8479C45.4201 38.9804 45.0703 42.8146 44.7275 46.2718C44.3853 49.7231 44.0443 52.8561 43.8548 56.4971C43.5582 62.1966 43.5847 66.1256 43.8179 68.7924C43.9344 70.124 44.1069 71.1996 44.3396 72.0501C44.5601 72.8558 44.891 73.6757 45.4663 74.2887C46.1625 75.0303 47.1546 75.3844 48.1855 75.136C49.0033 74.9389 49.5778 74.4215 49.8918 74.0916C50.5484 73.4017 51.0123 72.5106 51.1945 72.0512C52.2527 69.3812 55.5272 63.1808 59.9601 59.6811C61.2536 58.6599 62.1958 58.3652 62.7889 58.3204C63.3476 58.2783 63.753 58.4436 64.0715 58.6967C64.4225 58.9756 64.6844 59.3811 64.8146 59.7643C64.8606 59.8999 64.8801 59.9968 64.8883 60.0584C63.6866 62.0865 58.9204 69.5222 56.6729 77.069C54.9977 82.6941 50.9586 88.4259 47.9431 90.8809C45.0229 93.258 39.7747 94.7313 33.8624 95.0218C28.0068 95.3095 21.9748 94.4121 17.7297 92.5092C9.52988 88.8334 7.85961 80.7382 7.11129 77.2292C6.53054 74.5057 6.5195 71.5987 6.67496 68.9009C6.75251 67.5551 6.86809 66.2969 6.96901 65.1373C7.06707 64.0105 7.1566 62.9215 7.15661 62.0292ZM26.7768 27.0953C26.7768 25.8314 27.1147 24.7049 27.6737 23.9514C28.1792 23.27 28.9221 22.7987 30.1167 22.7984C31.0942 22.7982 31.7518 22.9187 32.2162 23.1167C32.6326 23.2943 32.9817 23.5699 33.2996 24.0831C34.0328 25.2671 34.5705 27.6455 34.5738 32.384L34.0416 43.9088C33.8524 47.5661 33.6565 51.4922 33.5273 54.7707L26.7768 55.6666V27.0953ZM22.6095 56.2652L16.5904 57.218L15.7705 43.267V32.5083C15.7705 31.031 16.3726 30.1275 17.0847 29.5489C17.8785 28.9039 18.8058 28.6731 19.2432 28.6731C20.0404 28.6731 20.8634 28.797 21.4565 29.2179C21.9131 29.5421 22.6095 30.3087 22.6095 32.5083V56.2652ZM11.6032 35.4278C10.3568 34.8069 9.02265 34.6083 7.8501 34.6868C5.72541 34.8292 3.85197 35.718 2.72584 37.6779C1.70247 39.4592 1.48924 41.8136 1.72143 44.4927C2.0423 48.1949 2.99038 58.6457 2.99038 62.0292C2.99037 62.708 2.91991 63.6116 2.81859 64.7758C2.72014 65.907 2.59699 67.2389 2.51505 68.6606C2.3515 71.4987 2.34041 74.8383 3.0357 78.0987C3.76005 81.4953 5.72154 91.6918 16.0245 96.3108C21.0311 98.5551 27.7601 99.4936 34.0669 99.1838C40.3172 98.8767 46.6346 97.3189 50.5737 94.1122C54.2816 91.0937 58.7686 84.6307 60.6662 78.2589C62.8095 71.0619 67.4515 63.9646 68.6098 61.9533C69.2919 60.7689 69.0785 59.3628 68.7605 58.4258C68.4018 57.3688 67.707 56.2631 66.6632 55.4337C65.5867 54.5784 64.1582 54.0377 62.4748 54.1647C60.8256 54.2893 59.1162 55.0393 57.379 56.4107C52.9083 59.9401 49.6283 65.5082 48.02 68.9231C48.0034 68.7664 47.9835 68.6024 47.9684 68.4298C47.7597 66.0435 47.7232 62.3344 48.0158 56.7132C48.1989 53.1942 48.5269 50.1809 48.8737 46.6828C49.22 43.1904 49.5784 39.2713 49.8075 34.0302C49.9903 29.8481 49.5612 26.6722 48.3952 24.471C47.7909 23.3302 46.9729 22.4223 45.9321 21.814C44.8964 21.2087 43.7676 20.974 42.6523 20.974C41.0038 20.974 38.9497 21.2062 37.3141 22.7678C37.1698 22.4576 37.0124 22.1652 36.8419 21.8899C36.0863 20.6698 35.0817 19.8084 33.8508 19.2835C32.6679 18.7791 31.3849 18.6309 30.1167 18.6311C27.5677 18.6315 25.5986 19.7567 24.3285 21.4683C23.5066 22.576 23.0121 23.8775 22.7771 25.1982C21.4247 24.5876 20.0718 24.5068 19.2432 24.5068C17.8298 24.5068 15.9788 25.0791 14.4573 26.3154C12.8542 27.6179 11.6032 29.6733 11.6032 32.5083V35.4278Z`,fill:`white`})]});function ce(e){return o(e,{headers:b})}function le(e,t,n){return c(e,t,{...n,headers:b})}var V=e=>(0,z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15.3235 10.9352L11.5016 14.2111L7.67969 10.9352L8.6152 9.84375L11.5016 12.3178L14.388 9.84375L15.3235 10.9352Z`,fill:`currentColor`})}),H=e=>(0,z.jsxs)(`svg`,{width:16,height:16,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,z.jsx)(`path`,{d:`M13 3H8.33337V4H11.2929L7.31315 7.97978L8.02026 8.68689L12 4.70711V7.66667H13V3Z`,fill:`currentColor`}),(0,z.jsx)(`path`,{d:`M4.33333 3.66667C3.59695 3.66667 3 4.26362 3 5V11.6667C3 12.403 3.59695 13 4.33333 13H11C11.7364 13 12.3333 12.403 12.3333 11.6667V9.66667H11.3333V11.6667C11.3333 11.8508 11.1841 12 11 12H4.33333C4.14924 12 4 11.8508 4 11.6667V5C4 4.81591 4.14924 4.66667 4.33333 4.66667H6.33333V3.66667H4.33333Z`,fill:`currentColor`})]}),ue=e=>(0,z.jsx)(`svg`,{viewBox:`0 0 18 18`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,z.jsx)(`path`,{d:`M8.25 9.75C8.10166 9.75 7.95666 9.79399 7.83332 9.8764C7.70999 9.95881 7.61386 10.0759 7.55709 10.213C7.50032 10.35 7.48547 10.5008 7.51441 10.6463C7.54335 10.7918 7.61478 10.9254 7.71967 11.0303C7.82456 11.1352 7.9582 11.2066 8.10368 11.2356C8.24917 11.2645 8.39997 11.2497 8.53701 11.1929C8.67406 11.1361 8.79119 11.04 8.8736 10.9167C8.95601 10.7933 9 10.6483 9 10.5C9 10.3011 8.92098 10.1103 8.78033 9.96967C8.63968 9.82902 8.44891 9.75 8.25 9.75ZM5.25 9.75C5.10166 9.75 4.95666 9.79399 4.83332 9.8764C4.70999 9.95881 4.61386 10.0759 4.55709 10.213C4.50032 10.35 4.48547 10.5008 4.51441 10.6463C4.54335 10.7918 4.61478 10.9254 4.71967 11.0303C4.82456 11.1352 4.9582 11.2066 5.10368 11.2356C5.24917 11.2645 5.39997 11.2497 5.53701 11.1929C5.67406 11.1361 5.79119 11.04 5.8736 10.9167C5.95601 10.7933 6 10.6483 6 10.5C6 10.3011 5.92098 10.1103 5.78033 9.96967C5.63968 9.82902 5.44891 9.75 5.25 9.75ZM16.5 3C16.5 2.40326 16.2629 1.83097 15.841 1.40901C15.419 0.987053 14.8467 0.75 14.25 0.75H3.75C3.15326 0.75 2.58097 0.987053 2.15901 1.40901C1.73705 1.83097 1.5 2.40326 1.5 3V6C1.50331 6.55504 1.71166 7.08927 2.085 7.5C1.71166 7.91073 1.50331 8.44496 1.5 9V12C1.5 12.5967 1.73705 13.169 2.15901 13.591C2.58097 14.0129 3.15326 14.25 3.75 14.25H8.25V15.75H2.25C2.05109 15.75 1.86032 15.829 1.71967 15.9697C1.57902 16.1103 1.5 16.3011 1.5 16.5C1.5 16.6989 1.57902 16.8897 1.71967 17.0303C1.86032 17.171 2.05109 17.25 2.25 17.25H15.75C15.9489 17.25 16.1397 17.171 16.2803 17.0303C16.421 16.8897 16.5 16.6989 16.5 16.5C16.5 16.3011 16.421 16.1103 16.2803 15.9697C16.1397 15.829 15.9489 15.75 15.75 15.75H9.75V14.25H14.25C14.8467 14.25 15.419 14.0129 15.841 13.591C16.2629 13.169 16.5 12.5967 16.5 12V9C16.4967 8.44496 16.2883 7.91073 15.915 7.5C16.2883 7.08927 16.4967 6.55504 16.5 6V3ZM15 12C15 12.1989 14.921 12.3897 14.7803 12.5303C14.6397 12.671 14.4489 12.75 14.25 12.75H3.75C3.55109 12.75 3.36032 12.671 3.21967 12.5303C3.07902 12.3897 3 12.1989 3 12V9C3 8.80109 3.07902 8.61032 3.21967 8.46967C3.36032 8.32902 3.55109 8.25 3.75 8.25H14.25C14.4489 8.25 14.6397 8.32902 14.7803 8.46967C14.921 8.61032 15 8.80109 15 9V12ZM15 6C15 6.19891 14.921 6.38968 14.7803 6.53033C14.6397 6.67098 14.4489 6.75 14.25 6.75H3.75C3.55109 6.75 3.36032 6.67098 3.21967 6.53033C3.07902 6.38968 3 6.19891 3 6V3C3 2.80109 3.07902 2.61032 3.21967 2.46967C3.36032 2.32902 3.55109 2.25 3.75 2.25H14.25C14.4489 2.25 14.6397 2.32902 14.7803 2.46967C14.921 2.61032 15 2.80109 15 3V6ZM8.25 3.75C8.10166 3.75 7.95666 3.79399 7.83332 3.8764C7.70999 3.95881 7.61386 4.07594 7.55709 4.21299C7.50032 4.35003 7.48547 4.50083 7.51441 4.64632C7.54335 4.7918 7.61478 4.92544 7.71967 5.03033C7.82456 5.13522 7.9582 5.20665 8.10368 5.23559C8.24917 5.26453 8.39997 5.24968 8.53701 5.19291C8.67406 5.13614 8.79119 5.04001 8.8736 4.91668C8.95601 4.79334 9 4.64834 9 4.5C9 4.30109 8.92098 4.11032 8.78033 3.96967C8.63968 3.82902 8.44891 3.75 8.25 3.75ZM5.25 3.75C5.10166 3.75 4.95666 3.79399 4.83332 3.8764C4.70999 3.95881 4.61386 4.07594 4.55709 4.21299C4.50032 4.35003 4.48547 4.50083 4.51441 4.64632C4.54335 4.7918 4.61478 4.92544 4.71967 5.03033C4.82456 5.13522 4.9582 5.20665 5.10368 5.23559C5.24917 5.26453 5.39997 5.24968 5.53701 5.19291C5.67406 5.13614 5.79119 5.04001 5.8736 4.91668C5.95601 4.79334 6 4.64834 6 4.5C6 4.30109 5.92098 4.11032 5.78033 3.96967C5.63968 3.82902 5.44891 3.75 5.25 3.75Z`,fill:`currentColor`})});function U(e,t,n){let r=n?.lastError??null,i=t?.kind===`cloud`;return i&&!t?.apiKey?.trim()||O(r)?e(x.BACKEND$STATUS_DISCONNECTED_ADD_API_KEY):k(r)?e(x.BACKEND$STATUS_DISCONNECTED_CHECK_API_KEY):M(r)?e(x.BACKEND$LOGGED_OUT):n?.isConnected===!0?e(x.ONBOARDING$BACKEND_STATUS_CONNECTED):i&&n?.isConnected===!1&&(A(r)||g(r))?e(x.BACKEND$STATUS_DISCONNECTED_CHECK_CLOUD_ACCESS):n?.isConnected===!1&&_(r)?e(x.BACKEND$STATUS_DISCONNECTED_CHECK_TUNNEL):n?.isConnected===!1&&g(r)?e(x.BACKEND$STATUS_DISCONNECTED_CHECK_URL_OR_NETWORK):n?.isConnected===!1?e(x.ONBOARDING$BACKEND_STATUS_DISCONNECTED):e(x.ONBOARDING$BACKEND_STATUS_CHECKING)}function W({isConnected:e,className:t}){let n,r,i;return e===`unavailable`?(n=`bg-[var(--oh-text-tertiary)]`,r=`No Backend Available`,i=`unavailable`):e===!0?(n=`bg-[var(--oh-status-success)]`,r=`Connected`,i=`connected`):e===!1?(n=`bg-red-500`,r=`Disconnected`,i=`disconnected`):(n=`bg-[var(--oh-interactive-selected)]`,r=`Checking connection`,i=`checking`),(0,z.jsx)(`span`,{"data-testid":`backend-status-dot`,"data-status":i,"aria-label":r,title:r,role:`status`,className:S(`inline-block w-2 h-2 rounded-full shrink-0`,n,t)})}var G={status:`idle`,verificationUrl:null,userCode:null,apiKey:null,error:null,errorCode:null};function de(){let[e,t]=R.useState(G),n=R.useRef(null),r=R.useCallback((e,r)=>{n.current?.abort();let i=new AbortController;n.current=i,t({...G,status:`starting`}),(async()=>{let n;try{n=await ce(e)}catch(e){if(i.signal.aborted)return;let n=e instanceof Error?e.message:`Failed to start device flow`,r=e instanceof l?e.code:void 0;t({...G,status:`error`,error:n,errorCode:r??null});return}if(!i.signal.aborted){E(e,r),t({...G,status:`awaiting_authorization`,verificationUrl:n.verification_uri_complete,userCode:n.user_code});try{let a=await le(e,n.device_code,{interval:n.interval,signal:i.signal});if(i.signal.aborted)return;D(e,r),t({...G,status:`success`,apiKey:a.access_token})}catch(e){if(i.signal.aborted)return;if(e instanceof l&&e.code===`cancelled`){t(G);return}let n=e instanceof Error?e.message:`Authorization failed`,r=e instanceof l?e.code:void 0;t({...G,status:`error`,error:n,errorCode:r??null})}}})()},[]),i=R.useCallback(()=>{n.current?.abort(),n.current=null,t(G)},[]),a=R.useCallback(()=>{n.current?.abort(),n.current=null,t(G)},[]);return R.useEffect(()=>()=>{n.current?.abort()},[]),{...e,start:r,cancel:i,reset:a}}function K(e){try{return new URL(e).protocol===`https:`}catch{return!1}}function q({host:e,onSuccess:t,testIdRoot:n,isDisabled:r=!1,idleButtonLabel:a,idleButtonContent:o,idleDescription:s,idleFooter:c,className:l,buttonClassName:u,buttonVariant:d=`primary`,statusDisplay:f=`inline`,analyticsSource:p}){let{t:m}=i(`openhands`),h=de(),g=R.useRef(null);R.useEffect(()=>()=>{g.current?.close()},[]),R.useEffect(()=>{if(h.status===`awaiting_authorization`&&h.verificationUrl&&g.current&&!g.current.closed){if(!K(h.verificationUrl)){console.error(`Invalid verification URL protocol`);return}try{g.current.location.href=h.verificationUrl}catch{g.current=window.open(h.verificationUrl,`_blank`,`noopener,noreferrer`)}}},[h.status,h.verificationUrl]),R.useEffect(()=>{if(h.status===`success`&&h.apiKey)try{t(h.apiKey)}finally{h.reset(),g.current?.close()}},[h.status,h.apiKey,h.reset,t]);let _=()=>{let t=e.trim().replace(/\/+$/,``),n=/^https?:\/\//i.test(t)?t:`https://${t}`;try{let e=new URL(n);if(e.username||e.password)throw Error(`Invalid URL format`)}catch{return}g.current=window.open(`about:blank`,`_blank`),g.current||console.warn(`Popup blocked - user will need to use manual link`),h.start(n,p)},v=()=>{h.cancel(),g.current?.close()},y=(0,z.jsx)(fe,{status:h.status,error:h.error,verificationUrl:h.verificationUrl,testIdRoot:n,onCancel:v,onRetry:_}),b=f===`modal`&&h.status!==`idle`,C=a??m(x.BACKEND$LOGIN_WITH_OPENHANDS);return(0,z.jsxs)(`div`,{"data-testid":`${n}-device-flow`,className:S(`flex flex-col gap-3`,l),children:[h.status===`idle`?s:null,h.status===`idle`&&d===`unstyled`&&(0,z.jsx)(`button`,{type:`button`,onClick:_,"data-testid":`${n}-login-button`,className:u,disabled:r,"aria-label":o?C:void 0,children:o??C}),h.status===`idle`&&d!==`unstyled`&&(0,z.jsx)(F,{type:`button`,variant:d,onClick:_,testId:`${n}-login-button`,className:u,isDisabled:r,ariaLabel:o?C:void 0,children:o??C}),h.status===`idle`?c:null,f===`inline`?y:null,b?(0,z.jsx)(P,{onClose:v,"aria-label":m(x.BACKEND$LOGIN_WITH_OPENHANDS),closeOnBackdropClick:!1,children:(0,z.jsx)(te,{testID:`${n}-auth-modal`,width:`sm`,className:`items-stretch border border-[var(--oh-border)]`,children:y})}):null]})}function fe({status:e,error:t,verificationUrl:n,testIdRoot:r,onCancel:a,onRetry:o}){let{t:s}=i(`openhands`);if(e===`idle`||e===`success`)return null;if(e===`starting`)return(0,z.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,"data-testid":`${r}-auth-starting`,role:`status`,"aria-live":`polite`,children:[(0,z.jsx)(pe,{}),(0,z.jsx)(`span`,{className:`text-sm text-[var(--oh-text-tertiary)]`,children:s(x.BACKEND$AUTH_STARTING)})]});if(e===`awaiting_authorization`){let e=n&&K(n)?n:null;return(0,z.jsxs)(`div`,{className:`flex flex-col gap-4`,"data-testid":`${r}-auth-awaiting`,role:`status`,"aria-live":`polite`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,z.jsx)(pe,{}),(0,z.jsx)(`span`,{className:`text-sm font-medium text-white`,children:s(x.BACKEND$AUTH_AWAITING)})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,z.jsx)(`p`,{className:`text-center text-sm leading-5 text-[var(--oh-text-tertiary)]`,children:e?`${s(x.BACKEND$AUTH_BROWSER_OPENED)} ${s(x.BACKEND$AUTH_OPEN_MANUALLY)}`:s(x.BACKEND$AUTH_BROWSER_OPENED)}),e?(0,z.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`max-h-16 overflow-auto break-all text-center text-xs text-blue-400 hover:underline`,children:e}):null]}),(0,z.jsx)(F,{type:`button`,variant:`secondary`,onClick:a,testId:`${r}-auth-cancel`,className:`w-full`,children:s(x.BACKEND$AUTH_CANCEL)})]})}return(0,z.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg border border-red-700 bg-red-900/20 p-4`,"data-testid":`${r}-auth-error`,role:`alert`,children:[(0,z.jsx)(`p`,{className:`text-sm text-red-400`,children:t}),(0,z.jsx)(F,{type:`button`,variant:`secondary`,onClick:o,testId:`${r}-auth-retry`,className:`w-full`,children:s(x.BACKEND$AUTH_RETRY)})]})}function pe(){return(0,z.jsx)(`svg`,{className:`animate-spin h-4 w-4 text-white`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,z.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})})}var me=t({BackendConnectionOptions:()=>De,BackendForm:()=>Q,BackendFormModal:()=>Pe});function he(e){return u(e)?`cloud`:`local`}function ge(e){let t=e.toLowerCase().replace(/^\[|\]$/g,``);return!!(t===`localhost`||t===`::1`||t===`::`||t===`0.0.0.0`||/^127\./.test(t)||/^::ffff:127\./i.test(t)||/^10\./.test(t)||/^192\.168\./.test(t)||/^172\.(1[6-9]|2\d|3[01])\./.test(t)||/^fe[89ab][0-9a-f]:/i.test(t)||/^f[cd][0-9a-f]{2}:/i.test(t)||t.endsWith(`.local`)||!t.includes(`.`)&&!t.includes(`:`))}function J(e){let t=e.trim().replace(/\/+$/,``);if(!t)return``;if(/^https?:\/\//i.test(t))return t;let n=t.match(/^\[([^\]]+)\]/);return`${ge(n?n[1]:(t.match(/:/g)??[]).length>1?t:t.split(`:`)[0])?`http`:`https`}://${t}`}function Y(e){let t=e.trim();if(!t||/\s/.test(t))return!1;let n=J(t);if(!n)return!1;try{let e=new URL(n);return(e.protocol===`http:`||e.protocol===`https:`)&&e.hostname.length>0}catch{return!1}}var X=`https://app.all-hands.dev`,_e=`agent-canvas --backend-only --port 8001`,ve=`https://github.com/OpenHands/OpenHands/blob/main/docs/DEVELOPMENT.md#alternative-development-workflows`,ye=`https://github.com/OpenHands/OpenHands/blob/main/docs/SELF_HOSTING.md`,be=`https://docs.openhands.dev/overview/introduction`;function xe(e,t){return e(x.BACKEND$CONNECTION_TEST_FAILED,{host:t,interpolation:{escapeValue:!1}})}function Se(e){return p(e)}function Ce(e,t){let n=Se(t);return n?`${e}\n${n}`:e}async function we(e){return e.kind===`local`?{agentServerVersion:await f(e,5e3)}:{agentServerVersion:null}}function Te({backend:e,testIdRoot:t}){let{t:n}=i(`openhands`),r=j([e])[e.id],a=r?.isConnected??null,o=r?.disabled===!0,c=r?.consecutiveFailures??0,l=r?.lastError??null,{data:u}=d({queryKey:[`backend-version`,e.host,e.apiKey],queryFn:async()=>h(await new s(y({host:e.host,sessionApiKey:e.apiKey||null,timeout:5e3})).getServerInfo()),retry:!1,staleTime:6e4,enabled:e.kind===`local`&&!o}),f=U(n,e,r),p=e.kind===`cloud`?n(x.BACKEND$KIND_CLOUD):n(x.BACKEND$KIND_LOCAL);return(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsxs)(`div`,{"data-testid":`${t}-status`,className:`flex items-center gap-3 text-sm`,children:[(0,z.jsx)(W,{isConnected:a}),(0,z.jsx)(`span`,{className:`text-white`,"data-testid":`${t}-status-label`,children:f}),(0,z.jsx)(`span`,{className:`text-tertiary-alt`,children:`·`}),(0,z.jsx)(`span`,{className:`text-[var(--oh-text-tertiary)]`,children:p}),u?(0,z.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,"data-testid":`${t}-version`,children:n(x.BACKEND$VERSION_LABEL,{version:u})}):null]}),o?(0,z.jsxs)(`div`,{"data-testid":`${t}-status-error`,className:`flex flex-col gap-1 rounded-md border border-red-500/40 bg-red-500/10 p-3 text-sm`,children:[(0,z.jsx)(`span`,{className:`font-semibold text-red-300`,children:n(x.BACKEND$HEALTH_FAILED_TITLE)}),(0,z.jsx)(`span`,{className:`text-xs text-[var(--oh-text-tertiary)]`,children:n(x.BACKEND$HEALTH_FAILED_DETAIL,{count:c})}),l?(0,z.jsx)(`span`,{"data-testid":`${t}-status-error-message`,className:`text-xs text-red-300 whitespace-pre-wrap break-words`,children:l}):null]}):null]})}function Z({initialName:e=``,initialHost:t=``,initialApiKey:n=``,onTestConnection:r,onSuccess:a,requireApiKey:o=!1,onSubmitOverride:s,fixedKind:c}){let{t:l}=i(`openhands`),[u,d]=R.useState(e),[f,p]=R.useState(t),[m,h]=R.useState(n),[g,_]=R.useState(null),[v,y]=R.useState(!1),[b,x]=R.useState(null),S=c??b??he(f),C=o||S!==`local`,w=u.trim().length>0&&Y(f)&&(!C||m.trim().length>0);return{name:u,setName:d,host:f,setHost:p,apiKey:m,setApiKey:h,connectionError:g,setConnectionError:_,isSubmitting:v,kind:S,setKind:x,canSubmit:w,handleSubmit:R.useCallback(async e=>{if(e.preventDefault(),!w||v)return;let t={name:u.trim(),host:J(f),apiKey:m.trim(),kind:S};_(null),y(!0);try{s?await s(t):a(await r(t))}catch(e){_(Ce(xe(l,t.host),e))}finally{y(!1)}},[w,v,u,f,m,S,r,a,o,s,c,l])}}function Q({mode:e,backend:t,onSubmitted:n,renderActions:r,testIdRoot:a,hostReadOnly:o,requireApiKey:s,hideConfigurationFields:c=!1,onSubmitOverride:l}){let{t:u}=i(`openhands`),{addBackend:d,updateBackend:f}=v(),p=e===`edit`&&t?t.kind:null,{name:m,setName:h,host:g,setHost:_,apiKey:y,setApiKey:b,connectionError:C,setConnectionError:w,isSubmitting:T,kind:E,handleSubmit:D}=Z({initialName:t?.name??``,initialHost:t?.host??``,initialApiKey:t?.apiKey??``,onTestConnection:we,onSuccess:async()=>{let r={name:m.trim(),host:J(g),apiKey:y.trim(),kind:p??E};e===`edit`&&t?f(t.id,r):d(r),n()},requireApiKey:s,onSubmitOverride:l}),[ee,O]=R.useState(!1),[k,A]=R.useState(!1),j=p??E,M=a??(e===`edit`?`edit-backend`:`add-backend`),N=s||j!==`local`,P=m.trim().length>0&&Y(g)&&(!N||y.trim().length>0),te=ee&&!m.trim()?u(x.BACKEND$NAME_REQUIRED):void 0,ne=k?g.trim()?Y(g)?void 0:u(x.BACKEND$HOST_INVALID):u(x.BACKEND$HOST_REQUIRED):void 0;return(0,z.jsxs)(`form`,{"data-testid":`${M}-form`,onSubmit:async e=>{if(!P){O(!0),A(!0);return}await D(e)},className:`flex flex-col gap-4`,children:[(0,z.jsxs)(`div`,{"data-testid":`${M}-configuration-fields`,className:S(`flex flex-col gap-4`,c&&`hidden`),children:[(0,z.jsx)(L,{testId:`${M}-name`,name:`${M}-name`,type:`text`,label:u(x.BACKEND$NAME_LABEL),value:m,onChange:e=>{h(e),w(null)},onBlur:()=>O(!0),placeholder:`Production`,className:`w-full`,showRequiredTag:!0,error:te}),(0,z.jsx)(L,{testId:`${M}-host`,name:`${M}-host`,type:`text`,label:u(x.BACKEND$HOST_LABEL),value:g,onChange:o?void 0:e=>{_(e),w(null)},onBlur:()=>A(!0),placeholder:X,className:`w-full`,showRequiredTag:!0,error:ne,isDisabled:o}),(0,z.jsx)(L,{testId:`${M}-api-key`,name:`${M}-api-key`,type:`password`,label:u(x.BACKEND$KEY_LABEL),value:y,onChange:e=>{b(e),w(null)},placeholder:``,className:`w-full`}),C?(0,z.jsx)(`div`,{role:`alert`,"data-testid":`${M}-error`,className:`rounded-md border border-red-500/40 bg-red-500/10 p-3 text-sm text-red-300 whitespace-pre-wrap break-words`,children:C}):null,e===`edit`&&t&&(0,z.jsx)(Te,{backend:t,testIdRoot:M})]}),r?r({canSubmit:P&&!T,isSubmitting:T,testIdRoot:M}):(0,z.jsxs)(`div`,{className:`flex justify-end gap-2 mt-2 w-full`,children:[(0,z.jsx)(F,{type:`button`,variant:`secondary`,onClick:n,testId:`${M}-cancel`,children:u(x.BUTTON$CANCEL)}),(0,z.jsx)(F,{type:`submit`,variant:`primary`,isDisabled:!P||T,testId:`${M}-submit`,children:u(x.BACKEND$SAVE)})]})]})}function Ee(){let{currentPath:e,navigate:t}=oe();return R.useCallback(()=>{/^\/automations\/[^/]+/.test(e)?t(`/automations`):/^\/conversations\/[^/]+/.test(e)&&t(`/conversations`)},[e,t])}function De({onConnected:e,testIdRoot:t=`add-backend`,initialManualBackend:n,requireManualApiKey:r=!1,manualSubmitLabel:a,manualSubmittingLabel:o,manualSubmitTestId:s,analyticsSource:c}){let{t:l}=i(`openhands`),u=m();return u?(0,z.jsx)(`div`,{"data-testid":`${t}-connection-options`,className:`flex justify-center`,children:(0,z.jsx)(`div`,{className:`w-full`,children:(0,z.jsx)($,{onConnected:e,testIdRoot:t,lockedHost:u,analyticsSource:c})})}):(0,z.jsxs)(`div`,{"data-testid":`${t}-connection-options`,className:`flex flex-col gap-6 md:flex-row`,children:[(0,z.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,z.jsx)(Oe,{onConnected:e,testIdRoot:t,initialBackend:n,requireApiKey:r,submitLabel:a??l(x.BACKEND$CONNECT),submittingLabel:o??l(x.ONBOARDING$BACKEND_STATUS_CHECKING),submitTestId:s})}),(0,z.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,z.jsx)($,{onConnected:e,testIdRoot:t,analyticsSource:c})})]})}function Oe({onConnected:e,testIdRoot:t,initialBackend:n,requireApiKey:r,submitLabel:a,submittingLabel:o,submitTestId:s,fixedKind:c,showKindSelector:l=!0}){let{t:u}=i(`openhands`),{name:d,setName:f,host:p,setHost:m,apiKey:h,setApiKey:g,connectionError:_,setConnectionError:v,isSubmitting:y,kind:b,setKind:S,canSubmit:C,handleSubmit:w}=Z({initialName:n?.name??``,initialHost:n?.host??``,initialApiKey:n?.apiKey??``,onTestConnection:we,onSuccess:t=>{e({name:d.trim(),host:J(p),apiKey:h.trim(),kind:b},`manual`,t)},requireApiKey:r,fixedKind:c});return(0,z.jsxs)(`form`,{"data-testid":`${t}-form`,onSubmit:w,className:`flex flex-col gap-4 flex-1 min-w-0`,children:[(0,z.jsx)(L,{testId:`${t}-name`,name:`${t}-name`,type:`text`,label:u(x.BACKEND$NAME_LABEL),hint:u(x.BACKEND$NAME_HELPER),value:d,onChange:e=>{f(e),v(null)},placeholder:`e.g. My Server`,className:`w-full`}),(0,z.jsx)(L,{testId:`${t}-host`,name:`${t}-host`,type:`text`,label:u(x.BACKEND$HOST_LABEL),hint:u(x.BACKEND$HOST_HELPER),value:p,onChange:e=>{m(e),v(null)},placeholder:`http://localhost:8000`,className:`w-full`}),l?(0,z.jsxs)(`div`,{className:`flex flex-col items-start gap-2.5`,children:[(0,z.jsx)(`span`,{className:`text-sm`,children:u(x.BACKEND$KIND_LABEL)}),(0,z.jsx)(T,{value:b,options:[{value:`local`,label:u(x.BACKEND$KIND_LOCAL)},{value:`cloud`,label:u(x.BACKEND$KIND_CLOUD)}],onChange:e=>S(e),ariaLabel:u(x.BACKEND$KIND_LABEL),testId:`${t}-kind`})]}):null,(0,z.jsx)(L,{testId:`${t}-api-key`,name:`${t}-api-key`,type:`password`,label:u(x.BACKEND$KEY_LABEL),value:h,onChange:e=>{g(e),v(null)},placeholder:`sk-••••••••••`,className:`w-full`}),_?(0,z.jsx)(`div`,{role:`alert`,"data-testid":`${t}-error`,className:`rounded-md border border-red-500/40 bg-red-500/10 p-3 text-sm text-red-300 whitespace-pre-wrap break-words`,children:_}):null,(0,z.jsx)(F,{type:`submit`,variant:`secondary`,isDisabled:!C||y,testId:s??`${t}-submit`,className:`w-full text-center`,children:y?o:a})]})}function $({onConnected:e,testIdRoot:t,lockedHost:n,analyticsSource:r,showBranding:a=!0}){let{t:o}=i(`openhands`),[s,c]=R.useState(!1),[l,u]=R.useState(``),d=`${t}-advanced-panel`,f=n??(l.trim()||X);return(0,z.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col items-center gap-3`,children:[a?(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,z.jsx)(B,{width:56,height:56,"aria-hidden":!0}),(0,z.jsx)(`h4`,{className:ae,"data-testid":`${t}-cloud-title`,children:o(x.BACKEND$CLOUD_TITLE)})]}):null,(0,z.jsx)(q,{host:f,onSuccess:t=>{e({name:`OpenHands Cloud`,host:J(f),apiKey:t,kind:`cloud`},`cloud_login`)},testIdRoot:t,analyticsSource:r,className:`w-full items-center`,idleDescription:(0,z.jsx)(`p`,{className:`text-center text-sm leading-relaxed text-[var(--oh-muted)]`,"data-testid":`${t}-cloud-description`,children:o(x.BACKEND$CLOUD_DESCRIPTION)}),idleFooter:n?null:(0,z.jsxs)(`div`,{className:`mx-auto w-full max-w-md`,children:[(0,z.jsxs)(`button`,{type:`button`,onClick:()=>c(e=>!e),"aria-expanded":s,"aria-controls":d,"data-testid":`${t}-advanced-toggle`,className:`flex w-full cursor-pointer items-center justify-center gap-1 text-center text-xs text-[var(--oh-muted)] transition-colors hover:text-content-2`,children:[(0,z.jsx)(`span`,{children:o(x.BACKEND$ADVANCED)}),(0,z.jsx)(V,{className:S(`h-4 w-4 shrink-0 text-muted transition-transform duration-200 ease-out`,s&&`rotate-180`),"aria-hidden":!0})]}),(0,z.jsx)(`div`,{className:S(`grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none`,s?`grid-rows-[1fr]`:`grid-rows-[0fr]`),children:(0,z.jsx)(`div`,{className:`overflow-hidden`,children:(0,z.jsxs)(`div`,{id:d,"data-testid":`${t}-advanced-panel`,"aria-hidden":!s,inert:s?void 0:!0,className:S(`pt-3 transition-opacity duration-200 ease-out motion-reduce:transition-none`,s?`opacity-100`:`opacity-0`),children:[(0,z.jsx)(L,{testId:`${t}-cloud-host`,name:`${t}-cloud-host`,type:`text`,label:o(x.BACKEND$HOST_LABEL),value:l,onChange:u,placeholder:X,className:`w-full`}),(0,z.jsx)(`p`,{className:`mt-1 text-xs text-[var(--oh-muted)]`,children:o(x.BACKEND$LOGIN_CLOUD_HINT)})]})})})]})})]})}function ke({value:e,selectedValue:t,title:n,description:r,icon:i,onSelect:a,panelId:o,testId:s}){let c=e===t;return(0,z.jsxs)(`button`,{id:`${s}-tab`,type:`button`,role:`tab`,"aria-selected":c,"aria-controls":o,"data-testid":s,onClick:()=>a(e),className:S(`relative flex min-h-16 w-full cursor-pointer items-center gap-3 px-3 py-3 text-left transition-colors`,`first:border-r first:border-r-[var(--oh-border)]`,`focus-visible:z-10 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-300`,c?`bg-[var(--oh-surface-raised)] text-white after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-primary`:`text-[var(--oh-muted)] hover:bg-[var(--oh-surface-raised)] hover:text-white`),children:[(0,z.jsx)(`span`,{className:`flex size-8 shrink-0 items-center justify-center`,"aria-hidden":!0,children:i}),(0,z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`span`,{className:`block truncate text-sm font-medium`,children:n}),(0,z.jsx)(`span`,{className:`mt-0.5 block text-xs leading-tight text-[var(--oh-muted)]`,children:r})]})]})}function Ae({children:e}){let t=R.useRef(null),[n,r]=R.useState();return R.useLayoutEffect(()=>{let e=t.current;if(!e)return;let n=()=>{let t=e.getBoundingClientRect().height;r(t>0?t:void 0)};if(n(),typeof ResizeObserver>`u`)return;let i=new ResizeObserver(n);return i.observe(e),()=>i.disconnect()},[]),(0,z.jsx)(`div`,{"data-testid":`add-backend-panel-height`,style:n===void 0?void 0:{height:n},className:`overflow-hidden transition-[height] duration-300 ease-in-out motion-reduce:transition-none`,children:(0,z.jsx)(`div`,{ref:t,children:e})})}function je({location:e}){let{t}=i(`openhands`),[n,r]=R.useState(!1),a=e===`remote`,o=t(a?x.BACKEND$REMOTE_SETUP_TITLE:x.BACKEND$BEFORE_CONNECT_TITLE),s=t(a?x.BACKEND$REMOTE_SETUP_DESCRIPTION:x.BACKEND$LOCAL_SETUP_DESCRIPTION),c=a?ye:ve,l=t(a?x.BACKEND$REMOTE_SETUP_DOCS:x.BACKEND$LOCAL_SETUP_DOCS),u=a?`add-backend-remote`:`add-backend-local`,d=`${u}-guidance-toggle`,f=`${u}-guidance-body`;return(0,z.jsxs)(`aside`,{"data-testid":`${u}-guidance`,className:`rounded-lg bg-[var(--oh-surface-raised)] text-sm text-[var(--oh-muted)]`,children:[(0,z.jsx)(`h4`,{className:`text-white`,children:(0,z.jsxs)(`button`,{id:d,type:`button`,onClick:()=>r(e=>!e),"aria-expanded":n,"aria-controls":f,"data-testid":d,className:S(`flex w-full cursor-pointer items-center justify-between gap-2 rounded-lg px-3 py-2 text-left font-medium`,`transition-colors hover:bg-[var(--oh-interactive-hover)]`,`focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-300`),children:[(0,z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,z.jsx)(ee,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0}),(0,z.jsx)(`span`,{className:`truncate`,children:o})]}),(0,z.jsx)(C,{className:S(`size-5 shrink-0 text-[var(--oh-muted)] transition-transform duration-200 ease-out`,n&&`rotate-180`),"aria-hidden":!0})]})}),(0,z.jsx)(`div`,{className:S(`grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none`,n?`grid-rows-[1fr]`:`grid-rows-[0fr]`),children:(0,z.jsx)(`div`,{className:`overflow-hidden`,children:(0,z.jsxs)(`div`,{id:f,"data-testid":f,role:`region`,"aria-labelledby":d,"aria-hidden":!n,inert:n?void 0:!0,className:S(`flex flex-col gap-2 px-3 pb-3 transition-opacity duration-200 ease-out motion-reduce:transition-none`,n?`opacity-100`:`opacity-0`),children:[(0,z.jsx)(`p`,{className:`leading-5`,children:s}),a?(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h5`,{className:`font-medium text-white`,children:t(x.BACKEND$REMOTE_CONNECTION_TITLE)}),(0,z.jsx)(`p`,{className:`mt-1 leading-5`,children:t(x.BACKEND$REMOTE_CONNECTION_DESCRIPTION)})]}):(0,z.jsx)(`code`,{className:`block break-words font-mono text-xs text-white`,children:_e}),(0,z.jsxs)(`a`,{href:c,target:`_blank`,rel:`noopener noreferrer`,"data-testid":`${u}-docs-link`,tabIndex:n?void 0:-1,className:`inline-flex w-fit items-center gap-1.5 text-primary hover:underline`,children:[(0,z.jsx)(`span`,{children:l}),(0,z.jsx)(H,{className:`size-4 shrink-0`,"aria-hidden":!0})]})]})})})]})}function Me({onConnected:e,source:t}){let{t:n}=i(`openhands`),[r,a]=R.useState(`cloud`),[o,s]=R.useState(`local`),c=`add-backend-selected-panel`,l=`add-backend-option-${r}-tab`,u=r===`cloud`;return(0,z.jsxs)(`div`,{"data-testid":`add-backend-chooser`,className:`flex flex-col`,children:[(0,z.jsxs)(`div`,{role:`tablist`,"aria-label":n(x.BACKEND$CHOOSER_TITLE),className:`grid grid-cols-2 overflow-hidden rounded-lg border border-[var(--oh-border)]`,children:[(0,z.jsx)(ke,{value:`cloud`,selectedValue:r,title:n(x.BACKEND$CLOUD_TITLE),description:n(x.BACKEND$CLOUD_OPTION_DESCRIPTION),icon:(0,z.jsx)(B,{width:32,height:32,"data-testid":`add-backend-option-cloud-logo`}),onSelect:a,panelId:c,testId:`add-backend-option-cloud`}),(0,z.jsx)(ke,{value:`agent-server`,selectedValue:r,title:n(x.BACKEND$AGENT_SERVER_TITLE),description:n(x.BACKEND$AGENT_SERVER_OPTION_DESCRIPTION),icon:(0,z.jsx)(ue,{className:`size-6`}),onSelect:a,panelId:c,testId:`add-backend-option-agent-server`})]}),(0,z.jsx)(`div`,{className:`mt-6`,children:(0,z.jsx)(Ae,{children:(0,z.jsx)(`section`,{id:c,role:`tabpanel`,"aria-labelledby":l,className:`min-w-0`,children:u?(0,z.jsx)(`div`,{"data-testid":`add-backend-cloud-panel`,className:S(`relative isolate flex min-h-[13.5rem] w-full items-center justify-center rounded-xl border border-[var(--oh-border)] px-5 py-6`,`before:pointer-events-none before:absolute before:inset-0 before:-z-10 before:rounded-xl`,`before:bg-[radial-gradient(75%_75%_at_50%_50%,rgba(255,255,255,0.1)_0%,rgba(255,255,255,0)_70%)]`),children:(0,z.jsx)($,{onConnected:e,testIdRoot:`add-backend`,analyticsSource:t,showBranding:!1})}):(0,z.jsxs)(`div`,{"data-testid":`add-backend-agent-server-panel`,className:`mx-auto w-full max-w-xl`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`span`,{className:`h-px flex-1 bg-[var(--oh-border)]`,"aria-hidden":!0}),(0,z.jsx)(T,{value:o,options:[{value:`local`,label:n(x.BACKEND$KIND_LOCAL),icon:(0,z.jsx)(se,{"aria-hidden":!0})},{value:`remote`,label:n(x.BACKEND$KIND_REMOTE),icon:(0,z.jsx)(w,{"aria-hidden":!0})}],onChange:s,ariaLabel:n(x.BACKEND$AGENT_SERVER_LOCATION),testId:`add-backend-location`}),(0,z.jsx)(`span`,{className:`h-px flex-1 bg-[var(--oh-border)]`,"aria-hidden":!0})]}),(0,z.jsxs)(`div`,{className:`mt-4 flex flex-col gap-4`,children:[(0,z.jsx)(je,{location:o},o),(0,z.jsx)(Oe,{onConnected:e,testIdRoot:`add-backend`,requireApiKey:o===`remote`,submitLabel:n(x.BACKEND$CONNECT),submittingLabel:n(x.ONBOARDING$BACKEND_STATUS_CHECKING),fixedKind:`local`,showKindSelector:!1})]})]})})})})]})}function Ne({onClose:e,source:t}){let{addBackend:n}=v(),r=Ee(),{trackBackendAdded:i}=N(),a=m(),o=R.useCallback((a,o,s)=>{n(a),i({backendKind:a.kind,connectionMethod:o,hasApiKey:!!a.apiKey,source:t,agentServerVersion:s?.agentServerVersion}),r(),e()},[n,r,e,i,t]);return a?(0,z.jsx)($,{onConnected:o,testIdRoot:`add-backend`,lockedHost:a,analyticsSource:t}):(0,z.jsx)(Me,{onConnected:o,source:t})}function Pe({mode:e,backend:t,onClose:n,source:r=`add_backend_modal`,hideCloseButton:a=!1}){let{t:o}=i(`openhands`);if(e===`add`)return(0,z.jsx)(P,{onClose:a?void 0:n,closeOnEscape:!1,closeOnBackdropClick:!a,"aria-label":o(x.BACKEND$ADD_TITLE),children:(0,z.jsxs)(`div`,{"data-testid":a?`onboarding-modal`:`add-backend-modal`,className:S(`relative max-h-[92vh] w-[720px] overflow-y-auto rounded-xl border border-[var(--oh-border)] bg-base-secondary p-6`,re),children:[a?null:(0,z.jsx)(I,{onClose:n,testId:`add-backend-close`}),a?null:(0,z.jsxs)(`div`,{className:`pr-8`,children:[(0,z.jsx)(`h2`,{className:ie,children:o(x.BACKEND$CHOOSER_TITLE)}),(0,z.jsxs)(`p`,{className:`mt-2 text-sm leading-6 text-[var(--oh-muted)]`,"data-testid":`add-backend-description`,children:[o(x.BACKEND$CHOOSER_DESCRIPTION),` `,(0,z.jsxs)(`a`,{href:be,target:`_blank`,rel:`noopener noreferrer`,"aria-label":o(x.BACKEND$DEPLOYMENT_OPTIONS),"data-testid":`add-backend-deployment-options-link`,className:`text-primary hover:underline`,children:[o(x.CTA$LEARN_MORE),(0,z.jsx)(H,{className:`ml-1 inline size-3.5 align-[-0.125em]`,"aria-hidden":!0})]})]})]}),(0,z.jsx)(`div`,{className:a?void 0:`mt-5`,children:(0,z.jsx)(Ne,{onClose:n,source:r})})]})});let s=`edit-backend`;return(0,z.jsx)(P,{onClose:n,closeOnEscape:!1,"aria-label":o(x.BACKEND$EDIT_TITLE),children:(0,z.jsxs)(`div`,{"data-testid":`${s}-modal`,className:S(`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)]`,ne(`md`)),children:[(0,z.jsx)(I,{onClose:n,testId:`${s}-close`}),(0,z.jsx)(`h2`,{className:S(`pr-6`,ie),children:o(x.BACKEND$EDIT_TITLE)}),(0,z.jsx)(Q,{mode:`edit`,backend:t,onSubmitted:n,testIdRoot:s})]})})}export{q as a,V as c,me as i,Q as n,W as o,Pe as r,U as s,De as t};
@@ -1 +0,0 @@
1
- import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{n}from"./active-backend-context-CrHTlgvN.js";import{W as r}from"./utils-CN5ZfZy1.js";import{n as i,t as a}from"./use-cloud-current-user-id-CDfAHpPX.js";import{r as o}from"./typography-v1KN0tzi.js";var s=e();function c(){let{t:e}=t(),o=n(),s=i(),c=a();if(o.backend.kind!==`cloud`||!o.orgId)return o.backend.name;let l=s[o.backend.id]?.orgs.find(e=>e.id===o.orgId);if(!l)return o.backend.name;let u=c[o.backend.id]?.userId??null,d=u&&l.id===u?e(r.BACKEND$PERSONAL_WORKSPACE):l.name;return`${o.backend.name} – ${d}`}function l(){let{t:e}=t(),i=n(),a=c();return(0,s.jsx)(`div`,{"data-testid":`backend-synced-settings-badge`,className:`flex items-center`,children:(0,s.jsx)(o.Text,{className:`text-[11px] font-medium text-[var(--oh-text-dim)] leading-5`,children:e(r.SETTINGS$BACKEND_SYNCED_BADGE,{name:a,host:i.backend.host,interpolation:{escapeValue:!1}})})})}export{l as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{W as i,t as a}from"./utils-CN5ZfZy1.js";import{t as o}from"./modal-backdrop-BSzNhM4r.js";import{r as s,t as c}from"./modal-body-BxZjsju9.js";import{r as l}from"./base-modal-D_L0oEbG.js";import{t as u}from"./settings-input-Db-1g8Ql.js";import{a as d}from"./use-can-manage-org-profiles-CrJP5262.js";var f=e(t(),1),p=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;function m(e,{isRequired:t=!1}={}){return e===``?!t:p.test(e)}function h(e){let t=e.split(`/`),n=(t[t.length-1]||e).replace(/[^A-Za-z0-9._-]/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``);return n&&!/^[A-Za-z0-9]/.test(n)&&(n=`profile-${n}`),n.length>64&&(n=n.substring(0,64).replace(/-+$/,``)),n||`default-profile`}var g=n(),_=(0,f.forwardRef)(function({testId:e,ruleTestId:t,value:n,onChange:o,onKeyDown:s,placeholder:c,isDisabled:l,isOptional:d,isRequired:p=!1},h){let{t:_}=r(`openhands`),v=m(n,{isRequired:p}),y=d?`${_(i.SETTINGS$PROFILE_NAME_LABEL)} (${_(i.COMMON$OPTIONAL)})`:_(i.SETTINGS$PROFILE_NAME_LABEL),b=f.useId(),x=t??`${b}-rule`;return(0,g.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,g.jsx)(u,{ref:h,testId:e,label:y,type:`text`,className:`w-full`,value:n,placeholder:c??_(i.SETTINGS$PROFILE_NAME_PLACEHOLDER),onChange:o,onKeyDown:s,isDisabled:l,ariaDescribedBy:x,ariaInvalid:!v}),(0,g.jsx)(`p`,{id:x,"data-testid":t,className:a(`text-xs`,v?`text-[var(--oh-muted)]`:`text-red-400`),children:_(i.SETTINGS$PROFILE_NAME_RULE)})]})});function v({isOpen:e,title:t,width:n=`md`,children:r,footer:i,onClose:u,initialFocusRef:d}){let p=(0,f.useRef)(null);return(0,f.useEffect)(()=>{if(!e)return;let t=d?.current??p.current;if(t){let e=setTimeout(()=>{t.focus()},0);return()=>clearTimeout(e)}},[e,d]),(0,f.useEffect)(()=>{if(!e||!p.current)return;let t=p.current,n=e=>{if(e.key!==`Tab`)return;let n=t.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`),r=n[0],i=n[n.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),i?.focus()):!e.shiftKey&&document.activeElement===i&&(e.preventDefault(),r?.focus())};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[e]),e?(0,g.jsx)(o,{onClose:u,children:(0,g.jsxs)(`div`,{ref:p,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`modal-title`,className:a(`bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)]`,s(n),c),children:[(0,g.jsx)(l,{id:`modal-title`,title:t}),r,(0,g.jsx)(`div`,{className:`w-full flex justify-end gap-2 mt-2`,children:i})]})}):null}function y({index:e,icon:t,label:n,onClick:r,onKeyDown:i,menuItemsRef:o,disabled:s,testId:c}){return(0,g.jsx)(`button`,{ref:t=>{o.current[e]=t},type:`button`,onClick:r,onKeyDown:t=>i(t,e),disabled:s,className:a(`group w-full cursor-pointer rounded px-2 py-2 text-start text-nowrap text-sm font-normal`,`text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,`disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent`),role:`menuitem`,"data-testid":c,children:(0,g.jsx)(d,{icon:t,text:n})})}function b({children:e,className:t,...n}){return(0,g.jsx)(`span`,{className:a(`text-sm leading-4 text-black font-semibold tracking-tighter bg-primary p-1 rounded-full`,t),...n,children:e})}export{h as a,_ as i,y as n,m as o,v as r,b as t};
@@ -1 +0,0 @@
1
- import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js";var t=e(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]);export{t};
@@ -1,46 +0,0 @@
1
- import{D as e,O as t}from"./utils-CN5ZfZy1.js";import{t as n}from"./settings-CKqk8ZnH.js";import{c as r,d as i,l as a,o,s,u as c}from"./llm-subscription-DTqtBCWz.js";import{t as l}from"./automation-C_eCrGyP.js";import{a as ee,i as u,n as d,o as f,r as p,t as te}from"./vendor~browser-hbU4u2Ag.js";var m=[`file1.txt`,`file2.txt`,`file3.txt`],h=[`reboot_skynet.exe`,`target_list.txt`,`terminator_blueprint.txt`],ne={home:`/home/openhands`,favorites:[{label:`Downloads`,path:`/home/openhands/Downloads`}],locations:[]},re={"/projects":[{name:`demo-app`,path:`/projects/demo-app`},{name:`sample-tools`,path:`/projects/sample-tools`},{name:`notes-service`,path:`/projects/notes-service`}],"/projects/demo-app":[{name:`web-client`,path:`/projects/demo-app/web-client`},{name:`api-service`,path:`/projects/demo-app/api-service`}],"/projects/demo-app/web-client":[]},ie=[u.all(`*/api/bash/execute_bash_command`,async()=>f.json({command:``,exit_code:0,output:``})),u.get(`*/api/file/home`,async()=>f.json(ne)),u.get(`*/api/file/search_subdirs`,async({request:e})=>{let t=new URL(e.url).searchParams.get(`path`)??``,n=re[t]??[];return f.json({path:t,items:n,subdirs:n,next_page_id:null})}),u.get(`*/api/file/:path`,async({params:e})=>f.json({path:`/${e.path?.toString()??`home`}`,subdirs:[]})),u.get(`/api/conversations/:conversationId/list-files`,async({params:e})=>{await p();let t=e.conversationId?.toString();return t?t===`test-conversation-id-2`?f.json(h):f.json(m):f.json(null,{status:400})}),u.get(`/api/conversations/:conversationId/select-file`,async({request:e})=>{await p();let t=new URL(e.url).searchParams.get(`file`)?.toString();return t?f.json({code:`Content of ${t}`}):f.json(null,{status:404})})],g=new Map([[`OpenAI_API_Key`,{value:`test-123`,description:`OpenAI API Key`}],[`Google_Maps_API_Key`,{value:`test-123`,description:`Google Maps API Key`}]]),ae=[u.get(`*/api/settings/secrets`,async({request:e})=>{if(new URL(e.url).pathname.split(`/`).filter(Boolean).length>3)return;let t=Array.from(g.entries()).map(([e,{description:t}])=>({name:e,description:t}));return f.json({secrets:t})}),u.get(`*/api/settings/secrets/:name`,async({params:e})=>{let{name:t}=e;if(typeof t!=`string`)return f.json({detail:`Invalid name`},{status:400});let n=g.get(t);return n?new f(n.value,{headers:{"Content-Type":`text/plain`}}):f.json({detail:`Secret not found`},{status:404})}),u.put(`*/api/settings/secrets`,async({request:e})=>{let t=await e.json();return!t?.name||!t?.value?f.json({detail:`name and value are required`},{status:400}):(g.set(t.name,{value:t.value,description:t.description}),f.json({name:t.name,description:t.description}))}),u.delete(`*/api/settings/secrets/:name`,async({params:e})=>{let{name:t}=e;return typeof t==`string`?g.delete(t)?f.json({deleted:!0}):f.json({detail:`Secret not found`},{status:404}):f.json({detail:`Invalid name`},{status:400})})],_=new Map,v=null,oe={critic_enabled:!1,critic_mode:`off`,enable_iterative_refinement:!1,critic_threshold:.5,max_refinement_iterations:3,critic_server_url:null,critic_model_name:null};function se(e){return{schema_version:1,revision:1,mcp_server_refs:null,agent_kind:`openhands`,llm_profile_ref:`default`,agent:`CodeActAgent`,skills:[],system_message_suffix:null,condenser:null,verification:oe,enable_sub_agents:!1,tool_concurrency_limit:1,...e}}var ce=`3f1c1b7e-0000-4000-8000-000000000001`,y=[se({id:ce,name:`default`}),se({id:`3f1c1b7e-0000-4000-8000-000000000002`,name:`research`,enable_sub_agents:!0,tool_concurrency_limit:4})],b=y.length+1;function le(){let e=String(b).padStart(12,`0`);return b+=1,`3f1c1b7e-0000-4000-8000-${e}`}function ue(){_.clear(),v=null,b=y.length+1}function de(){ue();for(let e of y)_.set(e.name,{...e});v=ce}de();function fe(e,t){return{id:t.id,name:e,agent_kind:t.agent_kind,revision:t.revision,llm_profile_ref:t.agent_kind===`openhands`?t.llm_profile_ref:null,mcp_server_refs:t.mcp_server_refs}}function pe(e){return f.json({detail:`Agent profile '${e}' not found`},{status:404})}var me=[u.get(`*/api/agent-profiles`,async()=>{let e=Array.from(_.entries()).map(([e,t])=>fe(e,t));return f.json({profiles:e,active_agent_profile_id:v})}),u.get(`*/api/agent-profiles/:name`,async({params:e})=>{let{name:t}=e;if(typeof t!=`string`)return f.json({detail:`Invalid name`},{status:400});let n=_.get(t);return n?f.json({name:t,profile:n}):pe(t)}),u.post(`*/api/agent-profiles/:name/rename`,async({params:e,request:t})=>{let{name:n}=e;if(typeof n!=`string`)return f.json({detail:`Invalid name`},{status:400});let r=(await t.json())?.new_name;if(!r)return f.json({detail:`new_name is required`},{status:422});let i=_.get(n);return i?r!==n&&_.has(r)?f.json({detail:`Agent profile '${r}' already exists`},{status:409}):(_.delete(n),_.set(r,{...i,name:r}),f.json({name:r,message:`Agent profile renamed.`})):pe(n)}),u.post(`*/api/agent-profiles/:id/activate`,async({params:e})=>{let{id:t}=e;return typeof t==`string`?Array.from(_.values()).find(e=>e.id===t)?(v=t,f.json({id:t,message:`Agent profile activated.`,agent_settings_applied:!1})):pe(t):f.json({detail:`Invalid id`},{status:400})}),u.post(`*/api/agent-profiles/:name`,async({params:e,request:t})=>{let{name:n}=e;if(typeof n!=`string`)return f.json({detail:`Invalid name`},{status:400});let r=await t.json(),i=_.get(n);return _.set(n,{...r,name:n,id:i?.id??r.id??le(),revision:(i?.revision??0)+1}),f.json({name:n,message:`Agent profile saved.`})}),u.delete(`*/api/agent-profiles/:name`,async({params:e})=>{let{name:t}=e;return typeof t==`string`?(v===_.get(t)?.id&&(v=null),_.delete(t),f.json({name:t,message:`Agent profile deleted.`})):f.json({detail:`Invalid name`},{status:400})})],x=(e,t)=>Array.from({length:e},(e,n)=>({id:`${n+1}`,full_name:`user/repo-${n+1}`,git_provider:t,is_public:Math.random()>.3,stargazers_count:Math.floor(Math.random()*1e3),pushed_at:new Date(Date.now()-Math.random()*90*24*60*60*1e3).toISOString()})),he=e=>Array.from({length:e},(e,t)=>({name:t===0?`main`:t===1?`develop`:`feature/branch-${t}`,commit_sha:`abc123${t.toString().padStart(3,`0`)}`,protected:t===0,last_push_date:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toISOString()})),ge={github:x(120,`github`),gitlab:x(120,`gitlab`),bitbucket:x(120,`bitbucket`)},S=he(25),_e=[{path:`src/components/hello.tsx`,status:`UPDATED`},{path:`src/utils/new-helper.ts`,status:`ADDED`},{path:`src/old-module.py`,status:`DELETED`}],ve=[u.get(`*/api/user/repositories`,async({request:e})=>{await p(500);let t=new URL(e.url),n=t.searchParams.get(`selected_provider`),r=parseInt(t.searchParams.get(`page`)||`1`,10),i=parseInt(t.searchParams.get(`per_page`)||`30`,10),a=t.searchParams.get(`sort`)||`pushed`,o=t.searchParams.get(`installation_id`);if(!n)return f.json(`Git provider token required. (such as GitHub).`,{status:401});let s=[...ge[n]||[]];if(a===`pushed`?s.sort((e,t)=>new Date(t.pushed_at).getTime()-new Date(e.pushed_at).getTime()):a===`stars`&&s.sort((e,t)=>(t.stargazers_count||0)-(e.stargazers_count||0)),o&&n===`github`){let e=(parseInt(o,10)||0)*20;s=s.slice(e,e+20)}let c=(r-1)*i,l=c+i,ee=s.slice(c,l),u=l<s.length,d=r>1,te=Math.ceil(s.length/i),m=``;if(u||d){let e=[];d&&e.push(`</api/user/repositories?page=${r-1}&per_page=${i}>; rel="prev"`),u&&e.push(`</api/user/repositories?page=${r+1}&per_page=${i}>; rel="next"`),e.push(`</api/user/repositories?page=${te}&per_page=${i}>; rel="last"`),e.push(`</api/user/repositories?page=1&per_page=${i}>; rel="first"`),m=e.join(`, `)}let h=[...ee];return h.length>0&&m&&(h[0]={...h[0],link_header:m}),f.json(h)}),u.get(`*/api/user/search/repositories`,async({request:e})=>{await p(300);let t=new URL(e.url),n=t.searchParams.get(`query`)||``,r=t.searchParams.get(`selected_provider`),i=parseInt(t.searchParams.get(`per_page`)||`5`,10),a=t.searchParams.get(`sort`)||`stars`,o=t.searchParams.get(`order`)||`desc`;if(!r)return f.json(`Git provider token required.`,{status:401});let s=[...(ge[r]||[]).filter(e=>e.full_name.toLowerCase().includes(n.toLowerCase()))];a===`stars`&&s.sort((e,t)=>{let n=e.stargazers_count||0,r=t.stargazers_count||0;return o===`desc`?r-n:n-r});let c=s.slice(0,i);return f.json(c)}),u.get(`*/api/user/repository/branches`,async({request:e})=>{await p(300);let t=new URL(e.url),n=t.searchParams.get(`repository`),r=parseInt(t.searchParams.get(`page`)||`1`,10),i=parseInt(t.searchParams.get(`per_page`)||`30`,10);if(!n)return f.json(`Repository parameter is required`,{status:400});let a=(r-1)*i,o=a+i,s={branches:S.slice(a,o),has_next_page:o<S.length,current_page:r,per_page:i,total_count:S.length};return f.json(s)}),u.get(`*/api/user/search/branches`,async({request:e})=>{await p(200);let t=new URL(e.url),n=t.searchParams.get(`repository`),r=t.searchParams.get(`query`)||``,i=parseInt(t.searchParams.get(`per_page`)||`30`,10);if(!n)return f.json(`Repository parameter is required`,{status:400});let a=S.filter(e=>e.name.toLowerCase().includes(r.toLowerCase())).slice(0,i);return f.json(a)}),u.get(`*/api/git/changes`,async()=>f.json(_e)),u.get(`*/api/git/diff`,async()=>f.json({original:`def greet(name):
2
- return f"Hello, {name}!"
3
- `,modified:`def greet(name: str) -> str:
4
- return f"Hello, {name}! Welcome."
5
- `}))];function C(e,t){let n={...e};for(let[e,r]of Object.entries(t))typeof r==`object`&&r&&!Array.isArray(r)&&typeof n[e]==`object`&&n[e]!=null&&!Array.isArray(n[e])?n[e]=C(n[e],r):n[e]=r;return n}var ye=n.agent_settings??{},w=ye.llm,be=typeof w?.model==`string`?w.model:`openhands/claude-opus-4-5-20251101`,xe={model_name:`AgentSettings`,sections:[{key:`general`,label:`General`,fields:[{key:`enable_sub_agents`,label:`Enable sub-agents`,description:`Allow the agent to delegate work to specialized built-in sub-agents.`,section:`general`,section_label:`General`,value_type:`boolean`,default:!1,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1},{key:`enable_switch_llm_tool`,label:`Enable LLM switching tool`,description:`Allow the agent to move the conversation to another saved LLM profile on its own.`,section:`general`,section_label:`General`,value_type:`boolean`,default:!0,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1},{key:`tool_concurrency_limit`,label:`Parallel tool calls`,description:`Maximum number of tool calls to execute concurrently per agent step. 1 = sequential (default).`,section:`general`,section_label:`General`,value_type:`integer`,default:1,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1}]},{key:`llm`,label:`LLM`,fields:[{key:`llm.model`,label:`Model`,description:`Select the model to use for this conversation.`,section:`llm`,section_label:`LLM`,value_type:`string`,default:be,choices:[],depends_on:[],prominence:`critical`,secret:!1,required:!0},{key:`llm.api_key`,label:`API Key`,description:`Provide the API key used to authenticate requests for the selected model.`,section:`llm`,section_label:`LLM`,value_type:`string`,default:null,choices:[],depends_on:[],prominence:`critical`,secret:!0,required:!1},{key:`llm.base_url`,description:`Override the model provider's default API base URL when needed.`,label:`Base URL`,section:`llm`,section_label:`LLM`,value_type:`string`,default:null,choices:[],depends_on:[],prominence:`critical`,secret:!1,required:!1},{key:`llm.temperature`,label:`Temperature`,description:`Adjust randomness for non-deterministic model outputs.`,section:`llm`,section_label:`LLM`,value_type:`number`,default:null,choices:[],depends_on:[],prominence:`minor`,secret:!1,required:!1}]},{key:`verification`,label:`Verification`,fields:[{key:`verification.critic_enabled`,label:`Enable Critic`,description:`Enable an additional critic pass to review the agent's work.`,section:`verification`,section_label:`Verification`,value_type:`boolean`,default:!1,choices:[],depends_on:[],prominence:`critical`,secret:!1,required:!1},{key:`verification.critic_mode`,label:`Critic Mode`,description:`Choose when the critic should review and intervene.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:`finish_and_message`,choices:[{label:`finish_and_message`,value:`finish_and_message`},{label:`all_actions`,value:`all_actions`}],depends_on:[`verification.critic_enabled`],prominence:`major`,secret:!1,required:!1},{key:`verification.enable_iterative_refinement`,label:`Enable Iterative Refinement`,description:`Let the critic send the agent back to refine its work when issues are found.`,section:`verification`,section_label:`Verification`,value_type:`boolean`,default:!1,choices:[],depends_on:[`verification.critic_enabled`],prominence:`critical`,secret:!1,required:!1},{key:`verification.critic_api_key`,label:`Critic API Key`,description:`If OpenHands is selected as your active LLM provider, leave this empty; the critic reuses the OpenHands Provider LLM Key.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:null,choices:[],depends_on:[`verification.critic_enabled`],prominence:`critical`,secret:!0,required:!1},{key:`verification.critic_threshold`,label:`Critic Threshold`,description:`Critic success threshold used for iterative refinement.`,section:`verification`,section_label:`Verification`,value_type:`number`,default:.6,choices:[],depends_on:[`verification.critic_enabled`,`verification.enable_iterative_refinement`],prominence:`minor`,secret:!1,required:!1},{key:`verification.max_refinement_iterations`,label:`Max Refinement Iterations`,description:`Maximum number of refinement attempts after critic feedback.`,section:`verification`,section_label:`Verification`,value_type:`integer`,default:3,choices:[],depends_on:[`verification.critic_enabled`,`verification.enable_iterative_refinement`],prominence:`minor`,secret:!1,required:!1},{key:`verification.critic_server_url`,label:`Critic Server URL`,description:`Override the critic service URL.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:null,choices:[],depends_on:[`verification.critic_enabled`],prominence:`minor`,secret:!1,required:!1},{key:`verification.critic_model_name`,label:`Critic Model Name`,description:`Override the critic model name.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:null,choices:[],depends_on:[`verification.critic_enabled`],prominence:`minor`,secret:!1,required:!1}]},{key:`condenser`,label:`Condenser`,fields:[{description:`Enable the default LLM-based condenser to summarize long conversation histories.`,key:`condenser.enable_default_condenser`,label:`Enable default condenser`,section:`condenser`,section_label:`Condenser`,value_type:`boolean`,default:!0,choices:[],depends_on:[],prominence:`critical`,secret:!1,required:!0},{description:`Maximum number of tokens the condenser keeps after summarization. Leave blank for unlimited.`,key:`condenser.condenser_max_size`,label:`Condenser max size`,section:`condenser`,section_label:`Condenser`,value_type:`integer`,default:null,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1}]},{key:`agent_context`,label:`Memory`,fields:[{description:`The agent keeps notes under .openhands/memory/ and loads them at the start of each new conversation, learning your codebase and preferences over time.`,key:`agent_context.load_memory`,label:`Persistent memory`,section:`agent_context`,section_label:`Memory`,value_type:`boolean`,default:!1,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1}]}]},T={model_name:`ConversationSettings`,sections:[{key:`general`,label:`General`,fields:[{key:`max_iterations`,label:`Max iterations`,section:`general`,description:`Maximum number of agent steps allowed before the conversation stops.`,section_label:`General`,value_type:`integer`,default:500,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!0}]},{key:`verification`,label:`Verification`,fields:[{key:`confirmation_mode`,label:`Confirmation mode`,description:`Pause for confirmation before the agent performs high-risk actions.`,section:`verification`,section_label:`Verification`,value_type:`boolean`,default:!1,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!0},{key:`security_analyzer`,label:`Security analyzer`,description:`Choose how OpenHands should analyze actions before asking for confirmation.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:`llm`,choices:[{label:`llm`,value:`llm`},{label:`none`,value:`none`}],depends_on:[`confirmation_mode`],prominence:`major`,secret:!1,required:!1}]}]},E={...n,provider_tokens_set:{},agent_settings_schema:xe,agent_settings:{...ye,verification:{critic_enabled:!1,enable_iterative_refinement:!1},llm:{...w??{},api_key:null,model:be},condenser:{enable_default_condenser:!0,condenser_max_size:null},enable_sub_agents:!1,tool_concurrency_limit:1},conversation_settings_schema:T,conversation_settings:{...n.conversation_settings??{}}},D={settings:structuredClone(E)},O={profiles:new Map,activeProfile:null},k=!1,A=e=>decodeURIComponent(String(Array.isArray(e)?e[0]??``:e??``)),Se=e=>({name:e.name,model:typeof e.config.model==`string`?e.config.model:null,base_url:typeof e.config.base_url==`string`?e.config.base_url:null,api_key_set:e.api_key_set}),j=e=>{let t=D.settings||structuredClone(E);D.settings={...t,agent_settings:{...t.agent_settings??{},llm:structuredClone(e.config)},llm_api_key_set:e.api_key_set}},Ce=(e,t)=>{let n=structuredClone(e.config);return e.api_key_set&&`api_key`in n&&(t===`encrypted`?n.api_key=`gAAAAA_mock_encrypted_${e.name}`:t===`plaintext`||(n.api_key=null)),{name:e.name,config:n,api_key_set:e.api_key_set}},we=(e,t)=>{let n=structuredClone(t.llm??{});if(typeof n.model!=`string`||n.model.trim().length===0)return null;let r={name:e,config:n,api_key_set:typeof n.api_key==`string`&&n.api_key.trim().length>0};return O.profiles.set(e,r),O.activeProfile===e&&j(r),r},M=[`anthropic/claude-3.5`,`anthropic/claude-sonnet-4-20250514`,`anthropic/claude-sonnet-4-5-20250929`,`anthropic/claude-haiku-4-5-20251001`,`anthropic/claude-opus-4-5-20251101`,`anthropic/claude-opus-4-8`,`openai/gpt-3.5-turbo`,`openai/gpt-5.5`,`openai/gpt-4o`,`openai/gpt-4o-mini`,`openhands/claude-sonnet-4-20250514`,`openhands/claude-sonnet-4-5-20250929`,`openhands/claude-haiku-4-5-20251001`,`openhands/claude-opus-4-5-20251101`,`openai/gpt-5.6-sol`,`openhands/deepseek-v4-flash`,`openhands/glm-5.2`,`sambanova/Meta-Llama-3.1-8B-Instruct`],Te=[`gpt-5.2`,`gpt-5.3-codex`],Ee=new Set([`anthropic/claude-opus-4-5-20251101`,`anthropic/claude-opus-4-8`,`anthropic/claude-sonnet-4-5-20250929`,`openai/gpt-5.5`,`openhands/claude-opus-4-5-20251101`,`openhands/claude-sonnet-4-5-20250929`,`openai/gpt-5.6-sol`,`openhands/deepseek-v4-flash`,`openhands/glm-5.2`]),De=[`openhands`,`anthropic`,`openai`,`mistral`,`gemini`,`deepseek`,`moonshot`,`minimax`],Oe=Array.from(new Set(M.map(e=>e.split(`/`)[0]).filter(e=>!!e))),ke=M.reduce((e,t)=>{if(!Ee.has(t))return e;let[n,...r]=t.split(`/`);return!n||r.length===0?e:(e[n]??=[],e[n].push(r.join(`/`)),e)},{}),Ae=`1.36.1`,je=[u.get(`*/server_info`,async()=>f.json({uptime:0,idle_time:0,version:Ae,usable_tools:[`terminal`,`file_editor`,`task_tracker`,`browser_tool_set`],agents:[`CodeActAgent`],default_agent:`CodeActAgent`,models:M,security_analyzers:[`llm`,`none`]})),u.get(`*/api/llm/models`,async()=>f.json({models:M})),u.get(`*/api/llm/models/verified`,async()=>f.json({models:ke})),u.get(`*/api/llm/providers`,async()=>f.json({providers:Oe})),u.get(`*${a}`,async()=>f.json({vendor:i,models:Te})),u.get(`*${c}`,async()=>f.json({connected:k,account_email:k?`mock-chatgpt@example.com`:null,expires_at:null})),u.post(`*${s}`,async()=>f.json({device_code:`mock-device-code`,user_code:`MOCK-CODE`,verification_uri:`https://auth.openai.com/activate`,verification_uri_complete:`https://auth.openai.com/activate?user_code=MOCK-CODE`,interval:1,expires_in:900})),u.post(`*${o}`,async()=>(k=!0,f.json({connected:!0,account_email:`mock-chatgpt@example.com`,expires_at:null}))),u.post(`*${r}`,async()=>(k=!1,f.json({connected:!1}))),u.get(`*/api/options/models`,async()=>f.json({models:M,verified_models:[`claude-opus-4-5-20251101`,`claude-sonnet-4-5-20250929`],verified_providers:De,default_model:`openai/gpt-5.6-sol`})),u.get(`*/api/v1/config/providers/search`,async({request:e})=>{let t=new URL(e.url),n=t.searchParams.get(`query`)?.toLowerCase(),r=t.searchParams.get(`verified__eq`),i=new Set,a=[];for(let e of M){let[t]=e.split(`/`);t&&!i.has(t)&&(i.add(t),a.push({name:t,verified:De.includes(t)}))}if(n&&(a=a.filter(e=>e.name.toLowerCase().includes(n))),r!=null){let e=r===`true`;a=a.filter(t=>t.verified===e)}return f.json({items:a,next_page_id:null})}),u.get(`*/api/v1/config/models/search`,async({request:e})=>{let t=new URL(e.url),n=t.searchParams.get(`query`)?.toLowerCase(),r=t.searchParams.get(`verified__eq`),i=t.searchParams.get(`provider__eq`),a=M.map(e=>{let[t,...n]=e.split(`/`),r=n.join(`/`);return{provider:t||null,name:r,verified:Ee.has(e)}});if(i&&(a=a.filter(e=>e.provider===i)),n&&(a=a.filter(e=>e.name.toLowerCase().includes(n))),r!=null){let e=r===`true`;a=a.filter(t=>t.verified===e)}return f.json({items:a,next_page_id:null})}),u.get(`*/api/options/security-analyzers`,async()=>f.json([`llm`,`none`])),u.get(`*/api/profiles`,async()=>f.json({profiles:Array.from(O.profiles.values()).map(Se),active_profile:O.activeProfile})),u.get(`*/api/profiles/:name`,async({params:e,request:t})=>{let n=A(e.name),r=O.profiles.get(n);return r?f.json(Ce(r,t.headers.get(`X-Expose-Secrets`))):f.json({detail:`Profile '${n}' not found`},{status:404})}),u.post(`*/api/profiles/:name`,async({params:e,request:t})=>{let n=A(e.name),r=await t.json();if(!r)return f.json({detail:`Empty body`},{status:400});let i=we(n,r);return i?f.json({name:i.name,message:`Profile '${i.name}' saved`},{status:201}):f.json({detail:`Profile requires llm.model`},{status:400})}),u.delete(`*/api/profiles/:name`,async({params:e})=>{let t=A(e.name);return O.profiles.delete(t),O.activeProfile===t&&(O.activeProfile=null),f.json({name:t,message:`Profile '${t}' deleted`})}),u.post(`*/api/profiles/:name/rename`,async({params:e,request:t})=>{let n=A(e.name),r=(await t.json())?.new_name?.trim()??``,i=O.profiles.get(n);if(!i)return f.json({detail:`Profile '${n}' not found`},{status:404});if(!r)return f.json({detail:`new_name is required`},{status:400});if(r!==n&&O.profiles.has(r))return f.json({detail:`Profile '${r}' already exists`},{status:409});O.profiles.delete(n);let a={...i,name:r};return O.profiles.set(r,a),O.activeProfile===n&&(O.activeProfile=r,j(a)),f.json({name:r,message:`Profile '${n}' renamed to '${r}'`})}),u.post(`*/api/profiles/:name/activate`,async({params:e})=>{let t=A(e.name),n=O.profiles.get(t);return n?(O.activeProfile=t,j(n),f.json({name:t,message:`Profile '${t}' activated and applied to current settings`,llm_applied:!0})):f.json({detail:`Profile '${t}' not found`},{status:404})}),u.get(`*/api/v1/web-client/config`,()=>{let e={feature_flags:{hide_llm_settings:!1,hide_users_page:!1},providers_configured:[],maintenance_start_time:null,recaptcha_site_key:null,faulty_models:[],error_message:null,updated_at:new Date().toISOString()};return f.json(e)}),u.get(`*/api/settings/conversation-schema`,async()=>(await p(),f.json(T))),u.get(`*/api/v1/settings/conversation-schema`,async()=>(await p(),f.json(T))),u.get(`*/api/v1/settings`,async()=>{await p();let{settings:e}=D;return e?f.json(e):f.json(null,{status:404})}),u.get(`*/api/settings`,async({request:e})=>{if(new URL(e.url).pathname.split(`/`).filter(Boolean).length>2)return;await p();let{settings:t}=D,n={language:null,user_consents_to_analytics:null,enable_sound_notifications:null,git_user_name:null,git_user_email:null,title_llm_profile:null,disabled_skills:[]};if(!t)return f.json({agent_settings:{},conversation_settings:{},llm_api_key_is_set:!1,misc_settings:{app_preferences:n}});let r=e.headers.get(`X-Expose-Secrets`),i=structuredClone(t.agent_settings??{}),a=i.llm;a?.api_key&&(r===`encrypted`?a.api_key=`gAAAAA_mock_encrypted_${String(a.api_key).slice(0,8)}`:r===`plaintext`||(a.api_key=`**********`));let o=!!t.llm_api_key_set||!!t.agent_settings?.llm&&!!t.agent_settings.llm?.api_key,s=t.misc_settings,c={...n,...s?.app_preferences??{}};return f.json({agent_settings:i,conversation_settings:t.conversation_settings??{},llm_api_key_is_set:o,misc_settings:{app_preferences:c}})}),u.patch(`*/api/settings`,async({request:e})=>{await p();let t=await e.json();if(!t)return f.json({error:`Empty body`},{status:400});if(!t.agent_settings_diff&&!t.conversation_settings_diff&&!t.misc_settings_diff)return f.json({error:`At least one of agent_settings_diff, conversation_settings_diff, or misc_settings_diff must be provided`},{status:400});let n=D.settings||structuredClone(E),r={...n};if(t.agent_settings_diff){let e=C(n.agent_settings??{},t.agent_settings_diff);r.agent_settings=e;let i=e.llm;i?.api_key&&typeof i.api_key==`string`&&i.api_key.trim().length>0&&(r.llm_api_key_set=!0)}if(t.conversation_settings_diff&&(r.conversation_settings={...n.conversation_settings??{},...t.conversation_settings_diff}),t.misc_settings_diff){let e=n.misc_settings,i={...e??{}};t.misc_settings_diff.app_preferences&&(i.app_preferences={...e?.app_preferences??{},...t.misc_settings_diff.app_preferences}),r.misc_settings=i}return D.settings=r,f.json({agent_settings:r.agent_settings??{},conversation_settings:r.conversation_settings??{},llm_api_key_is_set:r.llm_api_key_set??!1,misc_settings:r.misc_settings??{app_preferences:{}}})}),u.post(`*/api/mcp/test`,async()=>(await p(),f.json({ok:!0,tools:[`mock_tool`]}))),u.get(`*/api/settings/agent-schema`,async()=>(await p(),f.json(xe))),u.get(`*/api/v1/settings/agent-schema`,async()=>(await p(),f.json(xe))),u.post(`*/api/v1/settings`,async({request:e})=>{await p();let t=await e.json();if(t){let e=D.settings||structuredClone(E);if(`agent_settings`in t||`conversation_settings`in t)return f.json({error:`Use *_diff nested settings payloads`,keys:[`agent_settings`,`conversation_settings`].filter(e=>e in t)},{status:422});let n={...e},r=t.agent_settings_diff;r&&(n.agent_settings=C(e.agent_settings??{},r));let i=t.conversation_settings_diff;i&&(n.conversation_settings={...e.conversation_settings??{},...i});for(let[e,r]of Object.entries(t))e!==`agent_settings_diff`&&e!==`conversation_settings_diff`&&e!==`agent_settings_schema`&&e!==`conversation_settings_schema`&&(n[e]=r);return D.settings=n,f.json(null,{status:200})}return f.json(null,{status:400})}),u.post(`*/api/mcp/test`,async()=>(await p(),f.json({ok:!0,tools:[]})))],Me=`table-demo`,Ne=`Can you compare several coding agents in a wide table?`,Pe=[`Here is a wide comparison table. Scroll horizontally to read every column:`,``,`| Feature | OpenHands | Claude Code | Codex | Gemini CLI | Cursor | Windsurf | Cline | Aider | Devin | Continue |`,`| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |`,`| CLI | Yes | Yes | Yes | Yes | IDE | IDE | IDE | Terminal | Cloud | IDE |`,`| MCP support | Yes | Yes | Partial | Partial | Yes | Yes | Yes | No | Yes | Yes |`,`| Local models | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes |`,`| Browser tools | Yes | Yes | Yes | Limited | Yes | Yes | Yes | No | Yes | Yes |`,`| Git integration | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |`,`| Best for | General coding | Anthropic stack | OpenAI stack | Google stack | IDE users | IDE users | VS Code | Terminal | Autonomous | IDE users |`].join(`
6
- `),Fe=Date.UTC(2026,5,23,12,0,0);function Ie(e,t,n,r){return{id:e,timestamp:new Date(Fe+r*6e4).toISOString(),source:t===`user`?`user`:`agent`,llm_message:{role:t,content:[{type:`text`,text:n}]},activated_skills:[],extended_content:[]}}var Le=[Ie(`table-demo-user-1`,`user`,Ne,0),Ie(`table-demo-agent-1`,`assistant`,Pe,1)],Re=`canvas-demo`,N=`canvas.md`,P=[`# Agent Canvas Demo`,``,`This report was generated by the agent and opened from the file chip in chat.`,``,`## Release snapshot`,``,`| Area | Status | Next step |`,`| --- | --- | --- |`,`| Conversation UX | Ready | Validate the drawer flow |`,`| Markdown preview | Ready | Review rich rendering |`,`| Accessibility | Ready | Confirm keyboard navigation |`,``,`## Highlights`,``,`- The artifact stays in the conversation workspace.`,`- The chat chip is the compact entry point.`,`- The Files drawer provides the full rich Markdown view.`].join(`
7
- `),ze=Date.UTC(2026,6,29,12,0,0),F=e=>new Date(ze+e*1e3).toISOString();function Be(e,t,n,r){return{id:e,timestamp:F(r),source:t===`user`?`user`:`agent`,llm_message:{role:t,content:[{type:`text`,text:n}]},activated_skills:[],extended_content:[]}}var Ve={id:`canvas-demo-action`,timestamp:F(1),source:`agent`,thought:[],thinking_blocks:[],action:{kind:`FileEditorAction`,command:`create`,path:N,file_text:P,old_str:null,new_str:null,insert_line:null,view_range:null},tool_name:`file_editor`,tool_call_id:`canvas-demo-tool-call`,tool_call:{id:`canvas-demo-tool-call`,type:`function`,function:{name:`file_editor`,arguments:JSON.stringify({command:`create`,path:N})}},llm_response_id:`canvas-demo-response`,security_risk:t.LOW},He={id:`canvas-demo-observation`,timestamp:F(2),source:`environment`,tool_name:`file_editor`,tool_call_id:`canvas-demo-tool-call`,action_id:Ve.id,observation:{kind:`FileEditorObservation`,command:`create`,output:`Created ${N}`,path:N,prev_exist:!1,old_content:null,new_content:P,error:null}},Ue=[Be(`canvas-demo-user`,`user`,`Create a concise project canvas as a Markdown report.`,0),Ve,He,Be(`canvas-demo-agent`,`assistant`,`I generated the project canvas. Open it from the file chip above.`,3)],We={[Me]:Le,[Re]:Ue},I=Date.now(),Ge=`pagination-local`,L=`pagination-cloud`,Ke=100,qe=500,Je=Date.UTC(2026,4,13,0,0,0),Ye=[{id:`1`,title:`My New Project`,created_at:new Date(I).toISOString(),updated_at:new Date(I).toISOString(),execution_status:`waiting_for_confirmation`},{id:`2`,title:`Repo Testing`,created_at:new Date(I-2880*60*1e3).toISOString(),updated_at:new Date(I-2880*60*1e3).toISOString(),execution_status:`idle`,selected_repository:`octocat/hello-world`,git_provider:`github`},{id:`3`,title:`Another Project`,created_at:new Date(I-7200*60*1e3).toISOString(),updated_at:new Date(I-7200*60*1e3).toISOString(),execution_status:`idle`,selected_repository:`octocat/earth`,selected_branch:`main`},{id:`4`,title:`Archived Project`,created_at:new Date(I-14400*60*1e3).toISOString(),updated_at:new Date(I-14400*60*1e3).toISOString(),execution_status:`idle`,sandbox_status:`MISSING`},{id:`5`,title:`Errored Project`,created_at:new Date(I-10080*60*1e3).toISOString(),updated_at:new Date(I-10080*60*1e3).toISOString(),execution_status:`idle`,sandbox_status:`ERROR`},{id:Ge,title:`Local pagination fixture`,created_at:new Date(I-8640*60*1e3).toISOString(),updated_at:new Date(I-8640*60*1e3).toISOString(),execution_status:`idle`,workspace:{working_dir:`/workspace/project`}},{id:Me,title:`Wide table demo`,created_at:new Date(I-1440*60*1e3).toISOString(),updated_at:new Date(I-1440*60*1e3).toISOString(),execution_status:`idle`,workspace:{working_dir:`/workspace/project`}},{id:Re,title:`Generated canvas demo`,created_at:new Date(I-720*60*1e3).toISOString(),updated_at:new Date(I-720*60*1e3).toISOString(),execution_status:`idle`,workspace:{working_dir:`/workspace/project`}}],R=new Map(Ye.map(e=>[e.id,e])),Xe=new Map([[Ge,Qe(`Local pagination message`)],[L,Qe(`Cloud pagination message`)]]);function Ze(e,t){return{id:`${t.toLowerCase().replaceAll(` `,`-`)}-${e}`,timestamp:new Date(Je+e*6e4).toISOString(),source:`agent`,llm_message:{role:`assistant`,content:[{type:`text`,text:`${t} ${e}`}]},activated_skills:[],extended_content:[]}}function Qe(e){return Array.from({length:Ke},(t,n)=>Ze(n+1,e))}function $e(e,t){let n=Number(t.get(`limit`)??`100`),r=t.get(`timestamp__lt`),i=t.get(`sort_order`),a=[...r?e.filter(e=>(e.timestamp??``)<r):e].sort((e,t)=>i===`TIMESTAMP_DESC`?(t.timestamp??``).localeCompare(e.timestamp??``):(e.timestamp??``).localeCompare(t.timestamp??``));return{items:a.slice(0,n),next_page_id:a.length>n?`next-page`:null}}async function et(e,t){let n=Xe.get(e);return n?(t.has(`timestamp__lt`)&&await p(qe),$e(n,t)):null}function tt(){let t=new Date(I-8640*60*1e3).toISOString();return{id:L,created_by_user_id:null,selected_repository:null,selected_branch:null,git_provider:null,title:`Cloud pagination fixture`,trigger:null,pr_number:[],llm_model:`openhands/claude-haiku-4-5-20251001`,metrics:null,created_at:t,updated_at:t,execution_status:e.IDLE,conversation_url:null,session_api_key:null,sandbox_id:null,workspace:{working_dir:`/workspace/project`},public:!1,sub_conversation_ids:[]}}var nt=tt();function z(e){return{id:e.id,title:e.title??null,created_at:e.created_at,updated_at:e.updated_at,execution_status:e.execution_status??`idle`,sandbox_status:e.sandbox_status??null,metrics:e.metrics??null,agent:e.agent??null,workspace:e.workspace??null}}function rt(e){return!e||e.length===0?Array.from(R.values()).map(z):e.map(e=>{let t=R.get(e);return t?z(t):null})}var it=[u.get(`*/api/conversations/search`,async({request:e})=>{let t=new URL(e.url),n=Number(t.searchParams.get(`limit`)??`20`),r=Array.from(R.values()).sort((e,t)=>t.updated_at.localeCompare(e.updated_at)).slice(0,n).map(z);return f.json({items:r,next_page_id:null})}),u.get(`*/api/conversations`,async({request:e})=>{let t=new URL(e.url),n=t.searchParams.getAll(`ids[]`).length>0?t.searchParams.getAll(`ids[]`):t.searchParams.getAll(`ids`);return f.json(rt(n))}),u.get(`*/api/conversations/:conversationId`,async({params:e})=>{let t=e.conversationId,n=R.get(t);return n?f.json(z(n)):f.json(null,{status:404})}),u.post(`*/api/conversations`,async()=>{await p();let e={id:`${Math.floor(Math.random()*1e5)}`,title:`New Conversation`,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),execution_status:`idle`};return R.set(e.id,e),f.json(z(e),{status:201})}),u.patch(`/api/conversations/:conversationId`,async({params:e,request:t})=>{let n=e.conversationId,r=R.get(n);if(r){let e=await t.json();if(e?.title)return R.set(n,{...r,title:e.title,updated_at:new Date().toISOString()}),f.json(null,{status:200})}return f.json(null,{status:404})}),u.delete(`*/api/conversations/:conversationId`,async({params:e})=>{let t=e.conversationId;return R.has(t)?(R.delete(t),f.json(null,{status:200})):f.json(null,{status:404})}),u.get(`*/api/conversations/:conversationId/events/count`,async()=>f.json(0)),u.get(`*/api/conversations/:conversationId/events/search`,async({params:e,request:t})=>{let n=e.conversationId,r=new URL(t.url).searchParams,i=await et(n,r);if(i)return f.json(i);let a=We[n];return a?f.json($e(a,r)):f.json({items:[],next_page_id:null})}),u.post(`*/api/conversations/:conversationId/events`,async()=>f.json({ok:!0})),u.get(`*/api/conversations/:conversationId/workspace/*`,({params:e,request:t})=>{let n=e.conversationId?.toString(),r=new URL(t.url);return n===`canvas-demo`&&r.pathname.endsWith(`/canvas.md`)?f.text(P,{headers:{"Content-Type":`text/markdown; charset=utf-8`}}):d()}),u.post(`*/api/conversations/:conversationId/pause`,async()=>f.json({success:!0})),u.post(`*/api/conversations/:conversationId/interrupt`,async()=>f.json({success:!0})),u.post(`*/api/conversations/:conversationId/run`,async()=>f.json({success:!0})),u.post(`*/api/cloud-proxy`,async({request:e})=>{let t=(await e.json()).path??`/`,n=new URL(t,`https://mock-cloud.test`);if(n.pathname===`/api/v1/app-conversations`){let e=n.searchParams.getAll(`ids`);if(e.length>0)return f.json(e.map(e=>e===L?nt:null))}if(n.pathname===`/api/v1/app-conversations/search`)return f.json({items:[nt],next_page_id:null});if(n.pathname===`/api/v1/conversation/${L}/events/search`){let e=await et(L,n.searchParams);return f.json(e)}return n.pathname===`/api/v1/settings`?f.json({llm_model:`openhands/claude-haiku-4-5-20251001`,llm_base_url:``,llm_api_key:null,llm_api_key_set:!1,search_api_key_set:!1,agent:`CodeActAgent`,language:`en`,user_consents_to_analytics:!1,provider_tokens_set:{github:``}}):n.pathname===`/api/keys/current`?f.json({id:`mock-key`,name:`Mock key`,org_id:`org-1`,user_id:`user-1`,auth_type:`api_key`}):n.pathname===`/api/organizations`?f.json({items:[{id:`org-1`,name:`Mock Org`,is_personal:!0}],current_org_id:`org-1`}):n.pathname===`/api/organizations/org-1/me`?f.json({org_id:`org-1`,user_id:`org-1`}):n.pathname===`/api/authenticate`?f.json({ok:!0}):f.json({})}),u.post(`*/api/conversations/:conversationId/ask_agent`,async()=>f.json({response:`Mock agent response`})),u.get(`*/api/vscode/url`,async()=>f.json({url:null})),u.post(`*/api/skills`,async()=>f.json({skills:[]})),u.post(`/api/v1/conversations/:conversationId/pending-messages`,async()=>f.json({id:`mock-pending-id`,position:0}))],at=[u.post(`*/api/cloud-proxy`,()=>f.json({error:`cloud proxy not available in mock mode`},{status:503})),u.get(`*/api/user/info`,()=>f.json({id:`1`,login:`octocat`,avatar_url:`https://avatars.githubusercontent.com/u/583231?v=4`,company:`GitHub`,email:`placeholder@placeholder.placeholder`,name:`monalisa octocat`})),u.post(`*/api/authenticate`,async()=>f.json({message:`Authenticated`})),u.post(`*/api/logout`,()=>f.json(null,{status:200}))],ot=[u.post(`*/api/submit-feedback`,async()=>(await p(1200),f.json({statusCode:200,body:{message:`Success`,link:`fake-url.com`,password:`abc123`}}))),u.post(`*/api/submit-feedback`,async()=>f.json({statusCode:200},{status:200}))],st=[u.post(`https://us.i.posthog.com/e`,async()=>f.json(null,{status:200})),u.post(`https://z.openhands.dev/*`,async()=>f.json(null,{status:200}))],B=new Date().toISOString(),V=e=>new Date(Date.now()-e*864e5).toISOString(),ct={automations:[{id:`a1000000-0000-0000-0000-000000000001`,name:`PR Triage Digest`,trigger:{type:`cron`,schedule:`0 9 * * 1-5`,schedule_human:`Weekdays at 09:00`},enabled:!0,repository:`acme/frontend-app`,model:`triage-fast`,timeout:600,created_at:V(90),updated_at:B,prompt:`Review newly opened pull requests in acme/frontend-app, identify risky changes, summarize likely impact, and prepare a concise digest with priority ordering for the engineering review channel.`,branch:`main`,plugins:[`GitHub`,`Slack`,`Linear`],notification:`Slack digest to #eng-reviews`,timezone:`America/Los_Angeles`,last_triggered_at:V(0)},{id:`a1000000-0000-0000-0000-000000000002`,name:`Nightly Security Pass`,trigger:{type:`cron`,schedule:`30 1 * * *`,schedule_human:`Daily at 01:30`},enabled:!0,repository:`acme/backend-api`,model:`security-careful`,timeout:900,created_at:V(60),updated_at:B,prompt:`Scan the acme/backend-api repository for known security vulnerabilities, outdated dependencies, and insecure code patterns. Produce a prioritized remediation summary.`,branch:`main`,plugins:[`GitHub`],notification:`Email to security-team@acme.com`,timezone:`UTC`,last_triggered_at:V(0)},{id:`a1000000-0000-0000-0000-000000000003`,name:`Docs Sync on Push`,trigger:{type:`cron`,schedule:`*/5 * * * *`,schedule_human:`Runs on every push`},enabled:!0,repository:`acme/docs`,model:`docs-fast`,created_at:V(45),updated_at:B,prompt:`Monitor acme/docs for new pushes. For each push, generate a changelog-ready summary of what changed and why.`,branch:`main`,plugins:[`GitHub`,`Slack`],notification:`Slack to #docs-updates`,timezone:`America/New_York`,last_triggered_at:V(1)},{id:`a1000000-0000-0000-0000-000000000004`,name:`Release Readiness Review`,trigger:{type:`cron`,schedule:`0 11 * * 5`,schedule_human:`Fridays at 11:00`},enabled:!1,repository:`acme/realtime-service`,model:`release-review`,created_at:V(80),updated_at:B,prompt:`Compile a release readiness report: list open blockers, active incidents, and pending approvals for acme/realtime-service.`,branch:`release`,plugins:[`GitHub`,`Linear`],notification:`Slack to #releases`,timezone:`America/Chicago`,last_triggered_at:V(14)},{id:`a1000000-0000-0000-0000-000000000005`,name:`Incident Webhook Summary`,trigger:{type:`cron`,schedule:`0 */2 * * *`,schedule_human:`On incident webhook`},enabled:!1,repository:`acme/incident-service`,model:`incident-summary`,created_at:V(30),updated_at:B,prompt:`Summarize incoming incident webhooks, categorize by severity, and post a digest to the on-call Slack channel.`,branch:`main`,plugins:[`Slack`],notification:`Slack to #oncall`,timezone:`UTC`,last_triggered_at:null},{id:`a1000000-0000-0000-0000-000000000006`,name:`PR Review on Open`,trigger:{type:`event`,source:`github`,on:`pull_request.opened`,filter:`repository.full_name == 'acme/frontend-app'`},enabled:!0,repository:`acme/frontend-app`,model:`review-fast`,timeout:1800,created_at:V(15),updated_at:B,prompt:`When a new PR is opened, perform a thorough code review focusing on correctness, security, and performance. Post findings as inline comments.`,branch:`main`,plugins:[`GitHub`],notification:`GitHub PR comment`,last_triggered_at:V(0)},{id:`a1000000-0000-0000-0000-000000000007`,name:`Release Notes Generator`,trigger:{type:`event`,source:`github`,on:`release.published`,filter:`glob(release.tag_name, 'v*') && !release.prerelease`},enabled:!0,repository:`acme/backend-api`,model:`docs-fast`,created_at:V(10),updated_at:B,prompt:`Generate comprehensive release notes from the commits since the last release. Include breaking changes, new features, and bug fixes.`,branch:`main`,plugins:[`GitHub`],notification:`GitHub release body update`,last_triggered_at:V(3)}],total:7},lt=(e,t=9)=>{let n=new Date(Date.now()-e*864e5);return n.setHours(t,0,0,0),n.toISOString()},ut=e=>new Date(Date.now()-e*6e4).toISOString();function dt(e,t){return e?{phase_code:e.code,phase_label:e.label,phase_updated_at:e.ageMinutes===void 0?t:ut(e.ageMinutes)}:{}}function H(e,t,n,r=9,i=!0,a){let o=lt(n,r);return{id:e,status:t,conversation_id:i?`conv-${e}`:null,bash_command_id:i?`cmd-${e}`:null,error_detail:t===l.FAILED?`Process exited with code 1`:null,...dt(a,o),started_at:o,completed_at:new Date(new Date(o).getTime()+12e4).toISOString()}}function U(e,t,n,r=!0,i){let a=ut(n);return{id:e,status:t,conversation_id:r?`conv-${e}`:null,bash_command_id:r?`cmd-${e}`:null,error_detail:null,...dt(i,a),started_at:a,completed_at:null}}var ft={"a1000000-0000-0000-0000-000000000001":[H(`r1-01`,l.COMPLETED,0),H(`r1-02`,l.COMPLETED,1),H(`r1-03`,l.FAILED,2,9,!0,{code:`sandbox_provisioning`,label:null}),H(`r1-04`,l.COMPLETED,3,9,!0,{code:`running_agent`,label:null}),H(`r1-05`,l.COMPLETED,4),H(`r1-06`,l.COMPLETED,7),H(`r1-07`,l.FAILED,8),H(`r1-08`,l.COMPLETED,9),H(`r1-09`,l.COMPLETED,10),H(`r1-10`,l.COMPLETED,11)],"a1000000-0000-0000-0000-000000000002":[U(`r2-00`,l.PENDING,2,!1,{code:`queued`,label:null}),H(`r2-01`,l.COMPLETED,0,1),H(`r2-02`,l.COMPLETED,1,1),H(`r2-03`,l.COMPLETED,2,1),H(`r2-04`,l.FAILED,3,1),H(`r2-05`,l.COMPLETED,4,1)],"a1000000-0000-0000-0000-000000000003":[U(`r3-00`,l.RUNNING,52,!0,{code:`diffing_docs_tree`,label:`Diffing 340 changed files against main`,ageMinutes:41}),H(`r3-01`,l.COMPLETED,1),H(`r3-02`,l.CANCELLED,2),H(`r3-03`,l.SKIPPED,3,9,!1)],"a1000000-0000-0000-0000-000000000004":[H(`r4-01`,l.FAILED,14,11,!1),H(`r4-02`,l.COMPLETED,21,11)],"a1000000-0000-0000-0000-000000000005":[],"a1000000-0000-0000-0000-000000000006":[U(`r6-00`,l.RUNNING,13,!0,{code:null,label:`Running QA checks on PR #4821`,ageMinutes:4}),U(`r6-06`,l.RUNNING,6,!0,{code:`checking_out`,label:null,ageMinutes:2}),U(`r6-07`,l.RUNNING,21),H(`r6-01`,l.COMPLETED,0,14),H(`r6-02`,l.COMPLETED,0,11),H(`r6-03`,l.FAILED,1,16),H(`r6-04`,l.COMPLETED,2,10),H(`r6-05`,l.COMPLETED,3,9)],"a1000000-0000-0000-0000-000000000007":[H(`r7-01`,l.COMPLETED,3,15),H(`r7-02`,l.COMPLETED,10,12)]},W=te.responses.supported.body,pt=/^(?:\*|\*\/(\d+)) \* \* \* \*$/;function mt(e){let t=pt.exec(e.trim());return t?(t[1]?Number(t[1]):1)*60:null}var ht=W.eventTypes.filter(e=>e!==`pull_request_review_comment.created`);function gt(e){if(!e)return[];let t=W.triggers.cron;if(e.type===`cron`&&e.schedule&&t){let n=mt(e.schedule);if(n!==null&&n<t.minIntervalSeconds)return[{field:`trigger.schedule`,code:`interval_too_short`,message:`Minimum interval for this deployment is ${t.minIntervalSeconds/60} minutes.`}]}return e.type===`event`&&e.on&&!ht.includes(e.on)?[{field:`trigger.on`,code:`event_type_not_delivered`,message:`No ${e.source===`github`?`GitHub`:e.source} webhook delivering ${e.on} is registered for this organization.`}]:[]}var G=new Map(ct.automations.map(e=>[e.id,{...e}])),_t=[u.get(`*/api/automation/health`,async()=>(await p(100),f.json({status:`ok`}))),u.get(`*/api/automation/v1`,async({request:e})=>{await p(300);let t=new URL(e.url),n=Number(t.searchParams.get(`limit`)??`50`),r=Number(t.searchParams.get(`offset`)??`0`),i=Array.from(G.values()),a={automations:i.slice(r,r+n),total:i.length};return f.json(a)}),u.get(`*/api/automation/v1/capabilities`,async()=>(await p(200),f.json(W))),u.post(`*/api/automation/v1/validate`,async({request:e})=>{await p(200);let t=gt((await e.clone().json()).draft?.trigger),n={valid:t.length===0,errors:t};return f.json(n)}),u.post(`*/api/automation/v1/preset/:kind`,async({params:e,request:t})=>{await p(200);let n=await t.clone().json(),r=new Date().toISOString(),i={id:crypto.randomUUID(),name:n.name,prompt:n.prompt,model:n.model??null,trigger:n.trigger,enabled:!0,created_at:r,updated_at:r,last_triggered_at:null,...n.repos?.[0]&&{repository:n.repos[0].url,branch:n.repos[0].ref},...n.plugins&&{plugins:n.plugins.map(e=>e.source)},...typeof n.timeout==`number`&&{timeout:n.timeout},...typeof n.trigger.timezone==`string`&&{timezone:n.trigger.timezone}};return e.kind!==`prompt`&&e.kind!==`plugin`?f.json({detail:`Unknown preset kind`},{status:404}):(G.set(i.id,i),f.json(i,{status:201}))}),u.get(`*/api/automation/v1/:id/runs`,async({params:e,request:t})=>{await p(200);let n=e.id;if(!G.has(n))return f.json({detail:`Automation not found`},{status:404});let r=new URL(t.url),i=Number(r.searchParams.get(`limit`)??`50`),a=Number(r.searchParams.get(`offset`)??`0`),o=ft[n]??[],s={runs:o.slice(a,a+i),total:o.length};return f.json(s)}),u.get(`*/api/automation/v1/:id`,async({params:e})=>{await p(200);let t=G.get(e.id);return t?f.json(t):f.json({detail:`Automation not found`},{status:404})}),u.patch(`*/api/automation/v1/:id`,async({params:e,request:t})=>{await p(200);let n=e.id,r=await t.clone().json(),i=G.get(n);if(!i)return f.json({detail:`Automation not found`},{status:404});let a={...i,...r,updated_at:new Date().toISOString()};return G.set(n,a),f.json(a)}),u.post(`*/api/automation/v1/:id/dispatch`,async({params:e})=>{await p(200);let t=e.id;if(!G.get(t))return f.json({detail:`Automation not found`},{status:404});let n={id:crypto.randomUUID(),status:l.PENDING,conversation_id:null,bash_command_id:null,error_detail:null,phase_code:null,phase_label:null,phase_updated_at:null,started_at:new Date().toISOString(),completed_at:null};return f.json(n,{status:201})}),u.delete(`*/api/automation/v1/:id`,async({params:e})=>{await p(200);let t=e.id;return G.has(t)?(G.delete(t),new f(null,{status:204})):f.json({detail:`Automation not found`},{status:404})})],vt={ok:!0,tools:[]},yt=[u.post(`*/api/mcp/test`,async()=>f.json(vt))],K=[],q=[];function J(){return{workspaces:K.map(e=>({...e})),workspaceParents:q.map(e=>({...e}))}}var bt=[u.get(`*/api/workspaces`,async()=>f.json(J())),u.post(`*/api/workspaces`,async({request:e})=>{let t=await e.json();for(let e of t.workspaces??[]){let t=K.findIndex(t=>t.path===e.path);t>=0?K[t]={...e}:K.push({...e})}return f.json(J())}),u.delete(`*/api/workspaces`,async({request:e})=>{let t=new URL(e.url).searchParams.get(`path`),n=K.length;return K=K.filter(e=>e.path!==t),f.json({deleted:K.length!==n})}),u.post(`*/api/workspaces/parents`,async({request:e})=>{let t=await e.json();for(let e of t.parents??[]){let t=q.findIndex(t=>t.path===e.path);t>=0?q[t]={...e}:q.push({...e})}return f.json(J())}),u.delete(`*/api/workspaces/parents`,async({request:e})=>{let t=new URL(e.url).searchParams.get(`path`),n=q.length;return q=q.filter(e=>e.path!==t),f.json({deleted:q.length!==n})}),u.post(`*/api/auth/workspace-session`,async()=>f.json({ok:!0})),u.delete(`*/api/auth/workspace-session`,async()=>new f(null,{status:204}))],xt=`{
8
- "schema_version": 1,
9
- "name": "demo-page",
10
- "display_name": "Demo page",
11
- "version": "0.1.0",
12
- "description": "A dependency-free fixture for the Canvas Extension page ABI.",
13
- "entrypoint": "extension.js",
14
- "contributes": {
15
- "pages": [
16
- {
17
- "id": "hello",
18
- "title": "Hello from an extension",
19
- "path": "/hello",
20
- "nav_label": "Extension demo"
21
- }
22
- ]
23
- }
24
- }
25
- `,St=`export function activate(host) {
26
- return host.registerPage("hello", ({ container, path }) => {
27
- const wrapper = document.createElement("section");
28
- wrapper.style.cssText =
29
- "min-height:100%;padding:2rem;color:var(--oh-text-primary,#fff);background:var(--oh-color-base,#111);";
30
-
31
- const title = document.createElement("h1");
32
- title.textContent = "Hello from a Canvas Extension";
33
- title.style.cssText = "font-size:1.5rem;font-weight:600;";
34
-
35
- const detail = document.createElement("p");
36
- detail.textContent = path
37
- ? \`Nested extension path: \${path}\`
38
- : \`Host API \${host.apiVersion} on backend \${host.backend.id}\`;
39
- detail.style.cssText = "margin-top:0.75rem;opacity:0.75;";
40
-
41
- wrapper.append(title, detail);
42
- container.append(wrapper);
43
- return () => wrapper.remove();
44
- });
45
- }
46
- `,Ct=`src/fixtures/canvas-extensions/demo-page`,Y=JSON.parse(xt),wt=`openhands-canvas-extension-dev-installation`;function Tt(){try{let e=globalThis.sessionStorage?.getItem(wt);return e?JSON.parse(e):null}catch{return null}}var X=Tt();function Et(e){X=e;try{e?globalThis.sessionStorage?.setItem(wt,JSON.stringify(e)):globalThis.sessionStorage?.removeItem(wt)}catch{}}function Dt(e){return e.replaceAll(`\\`,`/`).endsWith(Ct)}function Z(e){return e?decodeURIComponent(Array.isArray(e)?e[0]:e):``}function Q(e){return f.json({detail:`Canvas extension '${e}' is not installed.`},{status:404})}function $(e){return X?.name===e?X:null}var Ot=[u.get(`*/api/canvas-extensions/installed`,()=>f.json({canvas_extensions:X?[X]:[]})),u.post(`*/api/canvas-extensions/install`,async({request:e})=>{let t=await e.json();return!t.source||!Dt(t.source)?f.json({detail:`Mock mode only installs '${Ct}'.`},{status:400}):X&&!t.force?f.json({detail:`Canvas extension '${Y.name}' is already installed.`},{status:409}):(Et({name:Y.name,version:Y.version,description:Y.description,enabled:!1,source:t.source,resolved_ref:t.ref||`mock-working-tree`,repo_path:t.repo_path||null,installed_at:new Date().toISOString(),install_path:`/mock/canvas-extensions/${Y.name}`,manifest:Y}),f.json(X))}),u.get(`*/api/canvas-extensions/installed/:name/bundle`,({params:e})=>{let t=Z(e.name);return $(t)?new f(St,{headers:{"Content-Type":`application/javascript; charset=utf-8`,"Cache-Control":`no-cache`}}):Q(t)}),u.get(`*/api/canvas-extensions/installed/:name`,({params:e})=>{let t=Z(e.name),n=$(t);return n?f.json(n):Q(t)}),u.patch(`*/api/canvas-extensions/installed/:name`,async({params:e,request:t})=>{let n=Z(e.name),r=$(n);if(!r)return Q(n);let i=await t.json();return typeof i.enabled==`boolean`?(Et({...r,enabled:i.enabled}),f.json({name:n,enabled:i.enabled})):f.json({detail:`'enabled' must be a boolean.`},{status:422})}),u.delete(`*/api/canvas-extensions/installed/:name`,({params:e})=>{let t=Z(e.name);return $(t)?(Et(null),f.json({message:`Canvas extension uninstalled.`})):Q(t)})],kt=ee(...ie,...ae,...me,...ve,...je,...it,...at,...ot,...st,..._t,...yt,...bt,...Ot);export{kt as worker};
@@ -1 +0,0 @@
1
- import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{W as n,t as r}from"./utils-CN5ZfZy1.js";import{t as i}from"./external-link-DKUlnCQV.js";import{x as a}from"./markdown-renderer-BzTlxI8x.js";import{t as o}from"./conversation-tab-empty-state-FIbh_lc8.js";import{t as s}from"./vendor~browser-tab-C5uuAxZX.js";var c=e();function l({src:e}){let{t:r}=t(`openhands`);return(0,c.jsx)(`img`,{src:e,className:`block w-full h-auto`,alt:r(n.BROWSER$SCREENSHOT_ALT)})}function u({url:e,hasPage:a}){let{t:o}=t(`openhands`),s=r(`shrink-0 inline-flex items-center justify-center w-6 h-6 rounded-md`,`text-[var(--oh-text-tertiary)] opacity-40 cursor-not-allowed`),l=`w-3.5 h-3.5`;return(0,c.jsxs)(`div`,{className:`flex w-full min-h-[34px] shrink-0 items-center gap-1 border-b border-[var(--oh-border)] px-2 py-1.5`,"data-testid":`browser-chrome-bar`,children:[(0,c.jsx)(`div`,{className:r(`flex min-h-7 min-w-0 flex-1 items-center rounded-md border border-[var(--oh-border)]`,`bg-[var(--oh-surface-raised)] px-2 text-xs leading-5`,e?`text-[var(--oh-text-tertiary)]`:`text-[var(--oh-text-dim)]`),"data-testid":`browser-chrome-url`,title:e||void 0,children:(0,c.jsx)(`span`,{className:`truncate`,children:e||o(n.BROWSER$URL_PLACEHOLDER)})}),a&&e?(0,c.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,"aria-label":o(n.BUTTON$OPEN_IN_NEW_TAB),title:o(n.BUTTON$OPEN_IN_NEW_TAB),"data-testid":`browser-chrome-open-external`,className:r(`shrink-0 inline-flex items-center justify-center w-6 h-6 rounded-md`,`text-[var(--oh-text-tertiary)] hover:bg-tertiary cursor-pointer`),children:(0,c.jsx)(i,{className:l,"aria-hidden":!0,strokeWidth:2})}):(0,c.jsx)(`button`,{type:`button`,disabled:!0,"aria-label":o(n.BUTTON$OPEN_IN_NEW_TAB),title:o(n.BUTTON$OPEN_IN_NEW_TAB),className:s,children:(0,c.jsx)(i,{className:l,"aria-hidden":!0,strokeWidth:2})})]})}function d(){let{t:e}=t(`openhands`);return(0,c.jsx)(o,{icon:(0,c.jsx)(s,{}),children:e(n.BROWSER$NO_PAGE_LOADED)})}function f(){let{url:e,screenshotSrc:t}=a(),n=!!t,r=t?.startsWith(`data:image/png;base64,`)?t:`data:image/png;base64,${t??``}`;return(0,c.jsxs)(`div`,{className:`flex h-full min-h-0 w-full flex-col text-[var(--oh-muted)]`,children:[(0,c.jsx)(u,{url:e,hasPage:n}),(0,c.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto scrollbar-hide bg-[var(--oh-surface)]`,children:t?(0,c.jsx)(l,{src:r}):(0,c.jsx)(d,{})})]})}function p(){return(0,c.jsx)(f,{})}export{p as default};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{B as r,R as i,U as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{W as s}from"./utils-CN5ZfZy1.js";import{t as c}from"./loading-spinner-BY9N3pOe.js";import{n as l}from"./canvas-extensions-runtime-2_x5Ezmi.js";var u=e(t(),1),d=n(),f=a(function(){let{t:e}=o(`openhands`),t=r(),n=i(),a=t.extensionName??``,f=t[`*`]??``,{pages:p,activating:m,errors:h}=l(),g=u.useRef(null),[_,v]=u.useState(null),y=u.useMemo(()=>p.filter(e=>e.extension.name===a).sort((e,t)=>t.contribution.path.length-e.contribution.path.length).find(e=>f===e.contribution.path||f.startsWith(`${e.contribution.path}/`)),[a,p,f]);if(u.useEffect(()=>{let e=g.current;if(!e||!y)return;let t=!1,r;v(null),e.replaceChildren();let i=f.slice(y.contribution.path.length).replace(/^\/+/,``);return Promise.resolve().then(()=>y.mount({container:e,path:i,navigate:e=>n(e)})).then(e=>{typeof e==`function`&&(t?e():r=e)}).catch(e=>{t||v(e instanceof Error?e.message:`Extension page failed.`)}),()=>{t=!0;try{r?.()}catch(e){console.error(`Canvas Extension page cleanup failed`,e)}e.replaceChildren()}},[n,y,f]),m&&!y)return(0,d.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,d.jsx)(c,{size:`large`})});let b=_??h.get(a);return b||!y?(0,d.jsx)(`main`,{className:`flex h-full items-center justify-center p-8`,children:(0,d.jsxs)(`div`,{className:`max-w-lg rounded-xl border border-[var(--oh-border)] bg-base-secondary p-6 text-center`,children:[(0,d.jsx)(`h1`,{className:`text-lg font-semibold text-white`,children:e(s.SETUP$UNAVAILABLE_TITLE)}),(0,d.jsx)(`p`,{className:`mt-2 text-sm text-tertiary-light`,children:b||e(s.SETTINGS$CANVAS_EXTENSIONS_PAGE_UNAVAILABLE)})]})}):(0,d.jsx)(`main`,{"aria-label":y.contribution.title,className:`h-full min-h-0 overflow-auto`,children:(0,d.jsx)(`div`,{ref:g,className:`min-h-full`})})});export{f as default};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-rfV8mQ9m.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{t as o}from"./useMutation-B-qc391N.js";import{It as s,j as c,mt as l,n as u}from"./active-backend-context-CrHTlgvN.js";import{W as d,t as f}from"./utils-CN5ZfZy1.js";import{n as p}from"./extensions-navigation-Cr4yzYk4.js";import{t as m}from"./modal-backdrop-BSzNhM4r.js";import{n as h}from"./modal-classes-C8eycCwG.js";import{t as g}from"./brand-button-BAfk4wGP.js";import{t as _}from"./modal-close-button-DDzdRvCs.js";import{t as v}from"./settings-input-Db-1g8Ql.js";import{t as y}from"./confirmation-modal-Dv1ktp8K.js";import{i as b,n as x,r as S,t as C}from"./use-canvas-extensions-Bi693ujJ.js";import{a as w,i as T,n as E,o as D,t as O}from"./extension-module-card-classes-DpeaYhYo.js";import{t as k}from"./toggle-switch-ChOLXv2n.js";import{n as A}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";var j=e(t(),1);function M(){let e=i();return()=>e.invalidateQueries({queryKey:c.all})}function N(){let e=M(),{t}=a(`openhands`);return o({mutationFn:e=>x.install(e),onSuccess:()=>{e(),s(t(d.SETTINGS$CANVAS_EXTENSIONS_INSTALL_SUCCESS))}})}function P(){let e=M();return o({mutationFn:({name:e,enabled:t})=>x.setEnabled(e,t),onSuccess:()=>void e()})}function F(){let e=M(),{t}=a(`openhands`);return o({mutationFn:e=>x.uninstall(e),onSuccess:()=>{e(),s(t(d.SETTINGS$CANVAS_EXTENSIONS_UNINSTALL_SUCCESS))}})}var I=n();function L({onClose:e}){let{t}=a(`openhands`),n=N(),[r,i]=j.useState(``),[o,s]=j.useState(``),[c,l]=j.useState(``),u=r.trim(),p=u.length>0&&!n.isPending;return(0,I.jsx)(m,{onClose:e,"aria-label":t(d.SETTINGS$CANVAS_EXTENSIONS_ADD_BUTTON),children:(0,I.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),p&&n.mutate({source:u,ref:o.trim()||null,repo_path:c.trim()||null},{onSuccess:e})},"data-testid":`add-canvas-extension-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,I.jsx)(_,{onClose:e,testId:`add-canvas-extension-modal-close`}),(0,I.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,I.jsx)(`h2`,{className:f(`pr-6`,h),children:t(d.SETTINGS$CANVAS_EXTENSIONS_ADD_BUTTON)}),(0,I.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(d.SETTINGS$CANVAS_EXTENSIONS_ADD_MODAL_INTRO)})]}),(0,I.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,I.jsx)(v,{testId:`add-canvas-extension-source-input`,label:t(d.SETTINGS$PLUGINS_SOURCE_LABEL),type:`text`,value:r,onChange:i,placeholder:t(d.SETTINGS$PLUGINS_SOURCE_PLACEHOLDER),showRequiredTag:!0}),(0,I.jsx)(v,{testId:`add-canvas-extension-ref-input`,label:t(d.SETTINGS$PLUGINS_REF_LABEL),type:`text`,value:o,onChange:s,showOptionalTag:!0}),(0,I.jsx)(v,{testId:`add-canvas-extension-repo-path-input`,label:t(d.SETTINGS$PLUGINS_REPO_PATH_LABEL),type:`text`,value:c,onChange:l,showOptionalTag:!0})]}),(0,I.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,I.jsx)(g,{type:`button`,variant:`secondary`,onClick:e,testId:`add-canvas-extension-dismiss`,children:t(d.BUTTON$CLOSE)}),(0,I.jsx)(g,{type:`submit`,variant:`primary`,testId:`add-canvas-extension-submit`,isDisabled:!p,children:t(n.isPending?d.SETTINGS$PLUGINS_INSTALLING:d.SETTINGS$PLUGINS_INSTALL)})]})]})})}function R({extension:e,isBusy:t,onToggle:n,onUninstall:r}){let{t:i}=a(`openhands`),o=e.manifest?.contributes?.pages??[],s=e.manifest?.display_name||e.name;return(0,I.jsxs)(`article`,{"data-testid":`canvas-extension-card-${e.name}`,className:`flex min-w-0 flex-col gap-4 p-4 ${w}`,children:[(0,I.jsxs)(`header`,{className:`flex items-start justify-between gap-4`,children:[(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsx)(`h3`,{className:`truncate text-sm font-semibold text-white`,children:s}),(0,I.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-tertiary-alt`,children:e.source})]}),(0,I.jsx)(k,{enabled:e.enabled,label:i(e.enabled?d.COMMON$DISABLE:d.COMMON$ENABLE),onToggle:n,className:t?`pointer-events-none opacity-50`:void 0})]}),e.description||e.manifest?.description?(0,I.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:e.description||e.manifest?.description}):null,(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,I.jsx)(`span`,{className:T,children:e.enabled?i(d.SETTINGS$SKILLS_ENABLED):i(d.SETTINGS$SKILLS_DISABLED)}),(0,I.jsx)(`span`,{className:T,children:i(d.SETTINGS$SKILLS_VERSION,{version:e.version})}),o.length?(0,I.jsxs)(`span`,{className:T,children:[i(d.SETTINGS$CANVAS_EXTENSIONS_PAGES),`: `,o.length]}):null]}),(0,I.jsxs)(`dl`,{className:`grid min-w-0 grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs`,children:[e.resolved_ref?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`dt`,{className:`text-tertiary-alt`,children:i(d.SETTINGS$PLUGINS_REF_LABEL)}),(0,I.jsx)(`dd`,{className:`min-w-0 truncate font-mono text-tertiary-light`,children:e.resolved_ref})]}):null,e.repo_path?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`dt`,{className:`text-tertiary-alt`,children:i(d.SETTINGS$PLUGINS_REPO_PATH_LABEL)}),(0,I.jsx)(`dd`,{className:`min-w-0 truncate text-tertiary-light`,children:e.repo_path})]}):null]}),o.length?(0,I.jsx)(`section`,{className:`flex min-w-0 flex-col gap-2`,children:(0,I.jsx)(`ul`,{className:`flex flex-wrap gap-2`,children:o.map(e=>(0,I.jsx)(`li`,{className:T,children:e.title},e.id))})}):null,(0,I.jsx)(`footer`,{className:`flex justify-end gap-2 border-t border-[var(--oh-border)] pt-3`,children:(0,I.jsx)(g,{type:`button`,variant:`ghost-danger`,testId:`canvas-extension-uninstall-${e.name}`,isDisabled:t,onClick:r,children:i(d.SETTINGS$PLUGINS_UNINSTALL)})})]})}var z=r(function(){let{t:e}=a(`openhands`),{backend:t}=u(),[n,r]=j.useState(!1),[i,o]=j.useState(null),s=C(),c=P(),m=F(),h=!l(t)&&t.kind===`local`,_=!h||b(s.error),v=c.isPending||m.isPending,x=()=>{i&&(i.type===`enable`?c.mutate({name:i.extension.name,enabled:!0},{onSuccess:()=>o(null)}):m.mutate(i.extension.name,{onSuccess:()=>o(null)}))},w=i?i.extension.manifest?.display_name||i.extension.name:``,T=i?.type===`enable`?e(d.SETTINGS$CANVAS_EXTENSIONS_ENABLE_CONFIRM,{name:w}):i?.type===`uninstall`?e(d.SETTINGS$CANVAS_EXTENSIONS_UNINSTALL_CONFIRM,{name:w}):``;return(0,I.jsxs)(`div`,{"data-testid":`canvas-extensions-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,I.jsx)(p,{}),(0,I.jsx)(`main`,{className:f(A,`h-full`),children:(0,I.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,I.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,I.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,I.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(d.NAV$EXTENSIONS)}),(0,I.jsx)(`p`,{className:`max-w-2xl text-sm text-tertiary-light`,children:e(d.SETTINGS$CANVAS_EXTENSIONS_PAGE_DESCRIPTION)})]}),(0,I.jsx)(g,{type:`button`,variant:`secondary`,testId:`canvas-extensions-add-button`,isDisabled:!h||_||s.isLoading,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>r(!0),children:e(d.SETTINGS$CANVAS_EXTENSIONS_ADD_BUTTON)})]}),(0,I.jsx)(`div`,{className:`rounded-xl border border-amber-400/30 bg-amber-400/5 px-4 py-3 text-sm text-amber-100`,children:e(d.SETTINGS$CANVAS_EXTENSIONS_TRUST_NOTICE)}),_?(0,I.jsxs)(`div`,{className:D,children:[(0,I.jsx)(`h3`,{className:`text-sm font-semibold text-white`,children:e(d.SETUP$UNAVAILABLE_TITLE)}),(0,I.jsx)(`p`,{className:`mt-2 text-sm text-tertiary-light`,children:b(s.error)?s.error.message:t.kind===`cloud`?new S(`cloud-backend`).message:new S(`no-backend`).message})]}):s.isLoading?(0,I.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2].map(e=>(0,I.jsx)(`div`,{className:`h-40 animate-pulse rounded-xl bg-base-secondary`},e))}):s.isError?(0,I.jsxs)(`div`,{className:D,children:[(0,I.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:s.error instanceof Error?s.error.message:e(d.ERROR$GENERIC)}),(0,I.jsx)(g,{type:`button`,variant:`secondary`,className:`mt-4`,onClick:()=>void s.refetch(),children:e(d.AUTOMATIONS$ERROR_RETRY)})]}):s.data?.length?(0,I.jsx)(`div`,{className:E,children:(0,I.jsx)(`div`,{className:O,children:s.data.map(e=>(0,I.jsx)(R,{extension:e,isBusy:v,onToggle:()=>{e.enabled?c.mutate({name:e.name,enabled:!1}):o({type:`enable`,extension:e})},onUninstall:()=>o({type:`uninstall`,extension:e})},e.name))})}):(0,I.jsx)(`div`,{className:D,children:(0,I.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(d.SETTINGS$CANVAS_EXTENSIONS_EMPTY)})})]})}),n?(0,I.jsx)(L,{onClose:()=>r(!1)}):null,i?(0,I.jsx)(y,{text:T,onCancel:()=>o(null),onConfirm:x,isConfirming:v}):null]})});export{z as default};
@@ -1 +0,0 @@
1
- import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
@@ -1 +0,0 @@
1
- import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
@@ -1 +0,0 @@
1
- import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
@@ -1 +0,0 @@
1
- import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js";var t=e(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]);export{t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{W as i,t as a}from"./utils-CN5ZfZy1.js";import{t as o}from"./styled-tooltip-C4jf5Fv9.js";import{t as s}from"./checkmark-XZyokq_Y.js";import{t as c}from"./x-mark-BopmFoBq.js";var l=e(t()),u=n(),d=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 25 25`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M10.8696 23.3696V1.63043C10.8696 0.729971 11.5995 0 12.5 0C13.4005 0 14.1304 0.729971 14.1304 1.63043V23.3696C14.1304 24.27 13.4005 25 12.5 25C11.5995 25 10.8696 24.27 10.8696 23.3696Z`,fill:`currentColor`}),(0,u.jsx)(`path`,{d:`M1.63043 10.8641L23.3696 10.8641C24.27 10.8641 25 11.5941 25 12.4946C25 13.395 24.27 14.125 23.3696 14.125L1.63043 14.125C0.729971 14.125 -3.93605e-08 13.395 0 12.4946C3.93605e-08 11.5941 0.729971 10.8641 1.63043 10.8641Z`,fill:`currentColor`})]});function f({className:e,testId:t,tooltipKey:n=i.AUTOMATIONS$ADD_AUTOMATION}){let{t:s}=r(`openhands`);return(0,u.jsx)(o,{content:s(n),placement:`top`,children:(0,u.jsx)(`span`,{"aria-hidden":`true`,"data-testid":t,className:a(`inline-flex size-7 shrink-0 items-center justify-center rounded-full bg-surface-raised text-white transition-colors hover:bg-[var(--oh-interactive-hover)]`,e),children:(0,u.jsx)(d,{className:`size-3`})})})}function p({testId:e,isSelected:t,onToggle:n,isDisabled:f=!1,className:p,enableLabelKey:m=i.SETTINGS$SKILLS_ENABLE_SKILL,disableLabelKey:h=i.SETTINGS$SKILLS_DISABLE_SKILL,enableTooltipKey:g=i.COMMON$ENABLE,disableTooltipKey:_,removeTooltipKey:v=i.COMMON$REMOVE}){let{t:y}=r(`openhands`),[b,x]=l.useState(!1),S=e=>{e.stopPropagation(),!f&&(n(!t),e.currentTarget.blur())},C=t&&b,w=y(t?_??v:g),T=y(t?h:m);return(0,u.jsx)(o,{content:w,placement:`top`,children:(0,u.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":t,"data-testid":e,"data-showing-remove":C?`true`:`false`,disabled:f,"aria-label":T,onClick:S,onPointerEnter:()=>x(!0),onPointerLeave:()=>x(!1),className:a(`inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full p-0 transition-colors`,t&&(C?`border-0 bg-[rgba(248,113,113,0.14)] text-[#ef4444] hover:bg-[rgba(248,113,113,0.24)]`:`border border-white bg-transparent text-white [&_path]:fill-current`),!t&&`border-0 bg-surface-raised text-white hover:bg-[var(--oh-interactive-hover)]`,f&&`cursor-not-allowed opacity-50`,p),children:t?C?(0,u.jsx)(c,{"aria-hidden":!0,width:14,height:14,className:`stroke-[2.5]`}):(0,u.jsx)(s,{"aria-hidden":!0,width:14,height:14}):(0,u.jsx)(d,{"aria-hidden":!0,className:`size-3`})})})}export{p as n,f as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{D as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js";import{W as o,t as s}from"./utils-CN5ZfZy1.js";import{a as c}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-CUmIwQCN.js";import{t as l}from"./bot-dMYHVfYM.js";import{t as u}from"./wrench-CUEI1krB.js";import{a as d,i as f,n as p,r as m,t as h}from"./sidebar-store-DGqHkVLw.js";import{o as g}from"./use-acp-credential-form-XIQmpX6M.js";import{t as _}from"./list-todo-apgLVjMw.js";import{n as v,t as y}from"./x-DJdhbdmt.js";import{t as b}from"./shield-check-D2aCRd16.js";import{r as x}from"./context-menu-list-item-I86vKcmM.js";import{A as S,E as C,y as w}from"./use-tracking-D53y3TH9.js";import{n as T}from"./navigation-context-CQZwH_tC.js";var E=a(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),D=e(n(),1),O=e(t(),1),k=r(),A=18,j={conversations:`/conversations`,customize:`/customize`,automations:w(),mcp:`/mcp`,settings:`/settings`,agentSettings:`/settings/agents`,llmSettings:`/settings/llm`,condenserSettings:`/settings/condenser`,verificationSettings:`/settings/verification`,appSettings:`/settings/app`,secretsSettings:`/settings/secrets`};function M(e,t,n){return e===void 0?t===void 0?``:n(t):e}var N={navigation:o.COMMAND_MENU$GROUP_NAVIGATION,settings:o.COMMAND_MENU$GROUP_SETTINGS,actions:o.COMMAND_MENU$GROUP_ACTIONS},P=[`navigation`,`settings`,`actions`],F=({toggleSidebar:e})=>[{id:`new-chat`,group:`navigation`,titleKey:o.COMMAND_MENU$NEW_CHAT_TITLE,descriptionKey:o.COMMAND_MENU$NEW_CHAT_DESCRIPTION,keywordsKey:o.COMMAND_MENU$NEW_CHAT_KEYWORDS,icon:(0,k.jsx)(d,{size:A}),to:j.conversations},{id:`customize`,group:`navigation`,titleKey:o.COMMAND_MENU$CUSTOMIZE_TITLE,descriptionKey:o.COMMAND_MENU$CUSTOMIZE_DESCRIPTION,keywordsKey:o.COMMAND_MENU$CUSTOMIZE_KEYWORDS,icon:(0,k.jsx)(c,{size:A}),to:j.customize},...S()?[{id:`automations`,group:`navigation`,title:C().commandMenuTitle,description:C().commandMenuDescription,keywords:C().commandMenuKeywords,icon:(0,k.jsx)(x,{size:A}),to:j.automations}]:[],{id:`mcp`,group:`navigation`,titleKey:o.COMMAND_MENU$MCP_TITLE,descriptionKey:o.COMMAND_MENU$MCP_DESCRIPTION,keywordsKey:o.COMMAND_MENU$MCP_KEYWORDS,icon:(0,k.jsx)(u,{size:A}),to:j.mcp},{id:`settings`,group:`settings`,titleKey:o.COMMAND_MENU$SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$SETTINGS_KEYWORDS,icon:(0,k.jsx)(m,{size:A}),to:j.settings},{id:`agent-settings`,group:`settings`,titleKey:o.COMMAND_MENU$AGENT_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$AGENT_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$AGENT_SETTINGS_KEYWORDS,icon:(0,k.jsx)(l,{size:A}),to:j.agentSettings},{id:`llm-settings`,group:`settings`,titleKey:o.COMMAND_MENU$LLM_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$LLM_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$LLM_SETTINGS_KEYWORDS,icon:(0,k.jsx)(v,{size:A}),to:j.llmSettings},{id:`condenser-settings`,group:`settings`,titleKey:o.COMMAND_MENU$CONDENSER_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$CONDENSER_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$CONDENSER_SETTINGS_KEYWORDS,icon:(0,k.jsx)(_,{size:A}),to:j.condenserSettings},{id:`verification-settings`,group:`settings`,titleKey:o.COMMAND_MENU$VERIFICATION_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$VERIFICATION_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$VERIFICATION_SETTINGS_KEYWORDS,icon:(0,k.jsx)(b,{size:A}),to:j.verificationSettings},{id:`app-settings`,group:`settings`,titleKey:o.COMMAND_MENU$APP_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$APP_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$APP_SETTINGS_KEYWORDS,icon:(0,k.jsx)(f,{size:A}),to:j.appSettings},{id:`secrets-settings`,group:`settings`,titleKey:o.COMMAND_MENU$SECRETS_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$SECRETS_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$SECRETS_SETTINGS_KEYWORDS,icon:(0,k.jsx)(g,{size:A}),to:j.secretsSettings},{id:`toggle-sidebar`,group:`actions`,titleKey:o.COMMAND_MENU$TOGGLE_SIDEBAR_TITLE,descriptionKey:o.COMMAND_MENU$TOGGLE_SIDEBAR_DESCRIPTION,keywordsKey:o.COMMAND_MENU$TOGGLE_SIDEBAR_KEYWORDS,icon:(0,k.jsx)(E,{size:A}),perform:e}],I=`command-menu-search`,L=`command-menu-results`,R=`command-menu-option`,z=`command-menu`,B=`k`,V=`ArrowDown`,H=`ArrowUp`,U=`Enter`,W=`Escape`,G=``,K=-1;function q(e){return`${R}-${e.id}`}function J({item:e,query:t,translate:n}){let r=t.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return!0;let i=[M(e.title,e.titleKey,n),M(e.description,e.descriptionKey,n),M(e.keywords,e.keywordsKey,n)].join(` `).toLocaleLowerCase();return r.every(e=>i.includes(e))}function Y(){let{t:e}=i(`openhands`),{navigate:t}=T(),n=p(e=>e.isOpen),r=p(e=>e.open),a=p(e=>e.close),[c,l]=O.useState(G),[u,d]=O.useState(0),f=O.useRef(null),m=O.useRef(new Map);O.useEffect(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLocaleLowerCase()===B&&(e.preventDefault(),r())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r]),O.useEffect(()=>{if(!n){l(G),d(0),m.current.clear();return}let e=requestAnimationFrame(()=>f.current?.focus());return()=>cancelAnimationFrame(e)},[n]);let g=O.useMemo(()=>F({toggleSidebar:()=>h.getState().toggleCollapsed()}),[]),_=O.useMemo(()=>g.filter(t=>J({item:t,query:c,translate:t=>e(t)})),[g,c,e]);O.useEffect(()=>{d(e=>_.length===0?K:Math.min(Math.max(e,0),_.length-1))},[_.length]),O.useEffect(()=>{let e=_[u];if(!e)return;let t=m.current.get(e.id);typeof t?.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`})},[u,_]);let b=O.useCallback(e=>{if(e){if(a(),e.to){t(e.to);return}e.perform?.()}},[a,t]),x=e=>{if(e.key===V){e.preventDefault(),d(e=>_.length===0?e:(e+1)%_.length);return}if(e.key===H){e.preventDefault(),d(e=>_.length===0?e:(e-1+_.length)%_.length);return}if(e.key===U){e.preventDefault(),b(_[u]);return}e.key===W&&(e.preventDefault(),a())};if(!n||typeof document>`u`)return null;let S=_[u];return(0,D.createPortal)((0,k.jsxs)(`div`,{className:`fixed inset-0 z-[70] flex items-start justify-center px-3 pt-[10vh] sm:px-6`,"data-testid":z,role:`dialog`,"aria-modal":`true`,"aria-label":e(o.COMMAND_MENU$ARIA_LABEL),children:[(0,k.jsx)(`button`,{type:`button`,className:`absolute inset-0 cursor-default bg-black/65 backdrop-blur-[2px]`,"aria-label":e(o.COMMAND_MENU$CLOSE_LABEL),onClick:a}),(0,k.jsxs)(`div`,{className:s(`relative flex max-h-[min(720px,78vh)] w-full max-w-2xl flex-col overflow-hidden rounded-2xl`,`border border-[var(--oh-border)] bg-[var(--oh-surface)]`,`shadow-[0_24px_90px_rgba(0,0,0,0.52),0_0_0_1px_rgba(255,255,255,0.03)_inset]`),children:[(0,k.jsxs)(`div`,{className:`relative flex items-center gap-3 border-b border-[var(--oh-border)] px-4 py-3`,children:[(0,k.jsx)(v,{className:`size-5 shrink-0 text-[var(--oh-text-dim)]`}),(0,k.jsx)(`input`,{ref:f,id:I,className:`h-11 min-w-0 flex-1 bg-transparent text-base text-white outline-none placeholder:text-[var(--oh-text-dim)]`,placeholder:e(o.COMMAND_MENU$PLACEHOLDER),"aria-label":e(o.COMMAND_MENU$SEARCH_LABEL),role:`combobox`,"aria-expanded":`true`,"aria-controls":L,"aria-activedescendant":S?q(S):void 0,value:c,onChange:e=>l(e.target.value),onKeyDown:x}),c?(0,k.jsx)(`button`,{type:`button`,className:`inline-flex size-8 items-center justify-center rounded-lg text-[var(--oh-muted)] hover:bg-[var(--oh-surface-raised)] hover:text-white`,"aria-label":e(o.COMMAND_MENU$CLEAR_SEARCH_LABEL),onClick:()=>{l(G),f.current?.focus()},children:(0,k.jsx)(y,{className:`size-4`})}):null,(0,k.jsx)(`kbd`,{className:`hidden rounded-md border border-[var(--oh-border)] bg-black/25 px-2 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--oh-text-dim)] sm:inline-flex`,children:e(o.COMMAND_MENU$SHORTCUT)})]}),(0,k.jsx)(`div`,{id:L,role:`listbox`,className:`relative min-h-0 flex-1 overflow-y-auto px-2 py-2 custom-scrollbar`,children:_.length===0?(0,k.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 px-6 py-16 text-center`,children:[(0,k.jsx)(`div`,{className:`flex size-11 items-center justify-center rounded-2xl border border-dashed border-[var(--oh-border)] text-[var(--oh-text-dim)]`,children:(0,k.jsx)(v,{className:`size-5`})}),(0,k.jsx)(`p`,{className:`text-sm font-medium text-white`,children:e(o.COMMAND_MENU$NO_RESULTS_TITLE)}),(0,k.jsx)(`p`,{className:`max-w-sm text-xs leading-5 text-[var(--oh-muted)]`,children:e(o.COMMAND_MENU$NO_RESULTS_DESCRIPTION)})]}):P.map(t=>{let n=_.filter(e=>e.group===t);return n.length===0?null:(0,k.jsxs)(`section`,{className:`py-1`,children:[(0,k.jsx)(`div`,{className:`px-3 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--oh-text-dim)]`,children:e(N[t])}),(0,k.jsx)(`div`,{className:`space-y-1`,children:n.map(t=>{let n=_.indexOf(t),r=n===u,i=t.to,a=e=>{e?m.current.set(t.id,e):m.current.delete(t.id)},c=s(`group flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left transition-colors duration-150`,r?`bg-white/[0.09] text-white shadow-[0_0_0_1px_rgba(255,255,255,0.08)_inset]`:`text-[var(--oh-muted)] hover:bg-white/[0.05] hover:text-white`),l=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{className:s(`flex size-9 shrink-0 items-center justify-center rounded-lg border transition-colors duration-150`,r?`border-[var(--oh-accent)] bg-[var(--oh-accent)]/15 text-white`:`border-[var(--oh-border)] bg-black/15 text-[var(--oh-text-dim)] group-hover:text-white`),"aria-hidden":`true`,children:t.icon}),(0,k.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,k.jsx)(`span`,{className:`block truncate text-sm font-medium text-current`,children:M(t.title,t.titleKey,e)}),(0,k.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-[var(--oh-text-dim)]`,children:M(t.description,t.descriptionKey,e)})]}),(0,k.jsx)(`span`,{className:`hidden shrink-0 rounded-md border border-[var(--oh-border)] px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.14em] text-[var(--oh-text-dim)] sm:inline-flex`,children:e(i?o.COMMAND_MENU$GO_HINT:o.COMMAND_MENU$RUN_HINT)})]});return i?(0,k.jsx)(`a`,{ref:a,id:q(t),href:i,role:`option`,"aria-selected":r,onMouseEnter:()=>d(n),onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),b(t))},className:c,children:l},t.id):(0,k.jsx)(`button`,{ref:a,id:q(t),type:`button`,role:`option`,"aria-selected":r,onMouseEnter:()=>d(n),onClick:()=>b(t),className:c,children:l},t.id)})})]},t)})}),(0,k.jsx)(`div`,{className:`border-t border-[var(--oh-border)] px-4 py-2.5 text-[11px] text-[var(--oh-text-dim)]`,children:e(o.COMMAND_MENU$FOOTER_HINT)})]})]}),document.body)}export{Y as CommandMenu};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,m as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{t as a}from"./useQuery-BSTgq1rl.js";import{A as o,W as s,t as c}from"./utils-CN5ZfZy1.js";import{P as l,i as u}from"./messages-DKV9cRc2.js";import{t as d}from"./chevron-down-e1QBpjVy.js";import{t as f}from"./vendor~root-layout~conversation-panel~conversation-BMbMgaGu.js";import{t as p}from"./chevron-right-ZG4R5G4Q.js";import{a as m,i as h,n as g,o as _,r as v,t as y}from"./vendor~conversation-panel~conversation-C8Fn4XOf.js";import{t as b}from"./conversation-store-Ca3ghXap.js";import{t as x}from"./format-time-delta-BIR5Os7T.js";import{r as S}from"./typography-v1KN0tzi.js";import{m as C}from"./llm-not-configured-banner-CIFABh3K.js";import{$ as w,Q as T,Z as E,t as ee}from"./markdown-renderer-BzTlxI8x.js";import{a as D,o as O,s as k}from"./conversation-BbGrAO4Z.js";import{n as A,t as j}from"./get-git-path-ChKDVHZp.js";import{t as M}from"./conversation-tab-empty-state-FIbh_lc8.js";import{n as te,t as ne}from"./vendor~commits-tab-BaO2Ce3e.js";var N=e(t(),1),P=(e,t)=>{let{conversationId:n}=w(),{data:r}=T(),i=A(),o=r?.conversation_url,s=r?.session_api_key,c=r?.selected_repository,l=r?.workspace?.working_dir?.trim(),u=N.useMemo(()=>j(c,l),[c,l]);return a({queryKey:[`commit_changes`,n,o,s,u,e],queryFn:async()=>{if(!n)throw Error(`No conversation ID`);return k.getCommitChanges(o,s,u,e)},staleTime:1/0,gcTime:1e3*60*15,retry:!1,enabled:t.enabled&&i&&!!n,meta:{disableToast:!0}})},F=r(),I={duration:.2,ease:`easeInOut`};function L({open:e,children:t,testId:r,className:i}){return l()?e?(0,F.jsx)(`div`,{"data-testid":r,className:i,children:t}):null:(0,F.jsx)(n,{initial:!1,children:e?(0,F.jsx)(f.div,{"data-testid":r,initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:I,className:c(`overflow-hidden`,i),children:t},`accordion-panel`):null})}var re=e=>{let{conversationId:t}=w(),{data:n}=T(),r=n?.conversation_url,i=n?.session_api_key,o=n?.selected_repository,s=n?.workspace?.working_dir?.trim(),c=N.useMemo(()=>`${j(o,s)}/${e.filePath}`,[o,e.filePath,s]),l=e.type===`D`;return a({queryKey:e.commit?[`commit_file_diff`,t,r,i,e.commit,c]:[`file_diff`,t,r,i,c],queryFn:async()=>{if(!t)throw Error(`No conversation ID`);return k.getGitChangeDiff(t,r,i,c,e.commit)},enabled:e.enabled&&(!l||!!e.commit),staleTime:e.commit?1/0:1e3*60*5,gcTime:1e3*60*15})};function R({className:e}){let{t}=i(`openhands`);return(0,F.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,F.jsx)(`div`,{className:c(`animate-spin rounded-full border-4 border-transparent border-t-white`,e),role:`status`,"aria-label":t(s.HOME$LOADING)})})}function ie({height:e,children:t,className:n}){return(0,F.jsx)(`div`,{"data-testid":`editor-container`,className:c(`w-full border-b border-[var(--oh-border)] overflow-hidden h-[var(--editor-height)]`,n),style:{"--editor-height":`${e}px`},children:t})}var ae=[{mode:`old`,icon:_},{mode:`diff`,icon:m},{mode:`new`,icon:y}],z={renderValidationDecorations:`off`,readOnly:!0,scrollBeyondLastLine:!1,minimap:{enabled:!1},automaticLayout:!0,scrollbar:{alwaysConsumeMouseWheel:!1}};function B(e){return Math.min(e,600)}var V={A:h,D:v,M:g,R:`Renamed`,U:`Untracked`},H=e=>{e.editor.defineTheme(`custom-diff-theme`,{base:`vs-dark`,inherit:!0,rules:[{token:`comment`,foreground:`6a9955`},{token:`keyword`,foreground:`569cd6`},{token:`string`,foreground:`ce9178`},{token:`number`,foreground:`b5cea8`}],colors:{"diffEditor.insertedTextBackground":`#014b01AA`,"diffEditor.removedTextBackground":`#750000AA`,"diffEditor.insertedLineBackground":`#003f00AA`,"diffEditor.removedLineBackground":`#5a0000AA`,"diffEditor.border":`var(--oh-border-subtle)`,"editorUnnecessaryCode.border":`#00000000`,"editorUnnecessaryCode.opacity":`rgba(0, 0, 0, 0.467)`}})};function U({path:e,type:t,commit:n,isExpanded:r,onToggle:a}){let{t:o}=i(`openhands`),[l,f]=N.useState(!1),m=r!==void 0,h=m?r:l,g=!h,_=()=>{if(m){a?.();return}f(e=>!e)},[v,y]=N.useState(0),[b,x]=N.useState(!1),[C,w]=N.useState(`diff`),T=N.useRef(null),E=N.useRef(null),D=t===`A`||t===`U`,O=t===`D`,k=N.useMemo(()=>{if(t===`R`){let t=e.split(/\s+/).slice(1);return t[t.length-1]}return e},[e,t]),{data:A,isLoading:j,isSuccess:M,isRefetching:P}=re({filePath:k,type:t,enabled:!g,commit:n}),I=N.useCallback(()=>{if(!T.current)return;let e=T.current.getOriginalEditor(),t=T.current.getModifiedEditor();e&&t&&(y(B(Math.max(e.getContentHeight(),t.getContentHeight())+20)),x(!0))},[]),U=N.useCallback(()=>{E.current&&(y(B(E.current.getContentHeight()+20)),x(!0))},[]);N.useEffect(()=>{x(!1),y(0)},[g,C]);let W=e=>{T.current=e,I(),e.getOriginalEditor().onDidContentSizeChange(I),e.getModifiedEditor().onDidContentSizeChange(I)},G=e=>{E.current=e,U(),e.onDidContentSizeChange(U)},K=(t===`U`?V.A:V[t])||`?`,q=typeof K==`string`?(0,F.jsx)(S.Text,{children:K}):N.createElement(K,{className:`w-4 h-4 shrink-0`}),J=j||P,Y=u(k),X=Y===`markdown`,Z=C===`old`?A?.original??``:A?.modified??``,Q=!O,$=!g&&Q,oe=e=>(0,F.jsx)(`div`,{className:c(`relative w-full`,!b&&`h-0 overflow-hidden`),children:(0,F.jsx)(ie,{height:b?v:B(400),className:c(!b&&`absolute inset-x-0 top-0 invisible`),children:e})});return(0,F.jsxs)(`div`,{"data-testid":`file-diff-viewer-outer`,className:`w-full flex flex-col`,children:[(0,F.jsx)(`div`,{className:`flex h-10 items-center px-3 border-b border-[var(--oh-border)] hover:cursor-pointer`,onClick:_,children:(0,F.jsxs)(`span`,{className:`text-sm w-full text-content flex items-center gap-2 min-w-0`,children:[(0,F.jsx)(`span`,{className:`inline-flex w-4 h-4 shrink-0 items-center justify-center`,children:J?(0,F.jsx)(R,{className:`w-4 h-4`}):q}),(0,F.jsx)(`strong`,{className:`min-w-0 flex-1 truncate font-medium`,children:k}),Q&&(0,F.jsx)(`span`,{className:c(`flex items-center gap-0.5 shrink-0`,!$&&`invisible pointer-events-none`),onClick:e=>e.stopPropagation(),"aria-hidden":!$,children:ae.map(({mode:e,icon:t})=>(0,F.jsx)(`button`,{"data-testid":`view-mode-${e}`,type:`button`,tabIndex:$?0:-1,"aria-pressed":C===e,onClick:()=>w(e),className:c(`p-1 rounded transition-colors cursor-pointer`,C===e?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-white`),children:(0,F.jsx)(t,{className:`w-4 h-4`})},e))}),(0,F.jsx)(`button`,{"data-testid":`collapse`,type:`button`,className:`shrink-0 text-[var(--oh-muted)]`,children:g?(0,F.jsx)(p,{className:`w-4 h-4`,"aria-hidden":!0}):(0,F.jsx)(d,{className:`w-4 h-4`,"aria-hidden":!0})})]})}),(0,F.jsx)(L,{open:h,children:O&&!n?(0,F.jsx)(`div`,{"data-testid":`file-deleted-message`,className:`w-full border-b border-[var(--oh-border)] p-4 bg-base text-[var(--oh-text-dim)] text-sm`,children:o(s.DIFF_VIEWER$FILE_DELETED)}):M&&(C===`diff`?oe((0,F.jsx)(te,{"data-testid":`file-diff-viewer`,className:`w-full h-full`,language:Y,original:D?``:A?.original??``,modified:O?``:A?.modified??``,theme:`custom-diff-theme`,onMount:W,beforeMount:H,options:{...z,renderSideBySide:!D&&!O,hideUnchangedRegions:{enabled:!0}}})):X?(0,F.jsx)(`div`,{className:`w-full border-b border-[var(--oh-border)] overflow-auto p-4 bg-base prose prose-invert max-w-none`,"data-testid":`markdown-preview`,style:{maxHeight:600},children:(0,F.jsx)(ee,{content:Z,includeStandard:!0,includeHeadings:!0})}):oe((0,F.jsx)(ne,{"data-testid":`file-single-viewer`,className:`w-full h-full`,language:Y,value:Z,theme:`custom-diff-theme`,beforeMount:H,onMount:G,options:z})))})]})}function W({changes:e,commit:t}){let[n,r]=(0,N.useState)(null);return(0,F.jsx)(`div`,{"data-testid":`diff-change-list`,className:`w-full flex flex-col`,children:e.map(e=>(0,F.jsx)(U,{path:e.path,type:e.status,commit:t,isExpanded:n===e.path,onToggle:()=>r(t=>t===e.path?null:e.path)},e.path))})}function G({commit:e,showAuthor:t,isExpanded:n,onToggle:r}){let{t:a}=i(`openhands`),{data:o,isLoading:c,isSuccess:l}=P(e.sha,{enabled:n});return(0,F.jsxs)(`div`,{"data-testid":`commit-row`,className:`w-full flex flex-col`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:r,"aria-expanded":n,"data-testid":`commit-row-toggle`,className:`w-full flex h-10 items-center gap-2 px-3 border-b border-[var(--oh-border)] text-sm text-content text-left hover:cursor-pointer`,children:[(0,F.jsx)(`code`,{className:`w-[7ch] flex-shrink-0 text-center font-mono text-xs text-[var(--oh-muted)]`,children:e.shortSha}),(0,F.jsx)(`strong`,{className:`flex-1 truncate font-medium`,children:e.subject}),t&&(0,F.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate max-w-32 flex-shrink-0`,children:e.author}),(0,F.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] flex-shrink-0`,children:`${x(e.timestamp)} ${a(s.CONVERSATION$AGO)}`}),n?(0,F.jsx)(d,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0}):(0,F.jsx)(p,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]}),(0,F.jsxs)(L,{open:n,testId:`commit-row-content`,className:`w-full flex flex-col pl-6`,children:[c&&(0,F.jsx)(`div`,{className:`p-3`,children:(0,F.jsx)(R,{className:`w-4 h-4`})}),l&&o&&o.length>0&&(0,F.jsx)(W,{changes:o,commit:e.sha})]})]})}var K=`-`,q=`DIFF_VIEWER$UNCOMMITTED_FILE_COUNT`;function J({changes:e,isExpanded:t,onToggle:n}){let{t:r}=i(`openhands`);return(0,F.jsxs)(`div`,{"data-testid":`uncommitted-changes-row`,className:`w-full flex flex-col`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:n,"aria-expanded":t,"data-testid":`uncommitted-changes-row-toggle`,className:`w-full flex h-10 items-center gap-2 px-3 border-b border-[var(--oh-border)] text-sm text-content text-left hover:cursor-pointer`,children:[(0,F.jsx)(`code`,{className:`w-[7ch] flex-shrink-0 text-center font-mono text-xs text-[var(--oh-muted)]`,children:K}),(0,F.jsx)(`strong`,{className:`flex-1 truncate font-medium`,children:r(s.DIFF_VIEWER$UNCOMMITTED)}),e.length>0?(0,F.jsx)(`span`,{"data-testid":`uncommitted-changes-count`,className:`text-xs text-[var(--oh-muted)] tabular-nums flex-shrink-0`,children:r(q,{count:e.length})}):null,t?(0,F.jsx)(d,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0}):(0,F.jsx)(p,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]}),(0,F.jsx)(L,{open:t,testId:`uncommitted-changes-row-content`,className:`w-full flex flex-col pl-6`,children:e.length>0?(0,F.jsx)(W,{changes:e}):null})]})}var Y=`uncommitted`;function X({commits:e,hasMore:t,uncommittedChanges:n,autoExpandUncommitted:r=!1,onAutoExpandHandled:a}){let{t:o}=i(`openhands`),[c,l]=N.useState(null);N.useEffect(()=>{r&&(l(Y),a?.())},[r,a]);let u=new Set(e.map(e=>e.author)).size>1;return(0,F.jsxs)(`section`,{"data-testid":`commit-list`,className:`w-full flex flex-col`,children:[(0,F.jsx)(J,{changes:n,isExpanded:c===Y,onToggle:()=>l(e=>e===Y?null:Y)}),e.map(e=>(0,F.jsx)(G,{commit:e,showAuthor:u,isExpanded:c===e.sha,onToggle:()=>l(t=>t===e.sha?null:e.sha)},e.sha)),t&&(0,F.jsx)(`div`,{"data-testid":`commit-list-cap-notice`,className:`px-3 py-2.5 text-xs text-[var(--oh-muted)]`,children:o(s.DIFF_VIEWER$COMMITS_CAP,{count:e.length})})]})}function Z(){return(0,F.jsx)(g,{"aria-hidden":!0,className:`size-full`})}function Q(){let{t:e}=i(`openhands`),{conversationId:t}=w(),{commits:n,hasMore:r,isUnsupported:a,isLoading:c,isSuccess:l}=D(),{data:u,isSuccess:d,isLoading:f}=O(),p=b(e=>e.commitsAutoExpandSection),m=b(e=>e.setCommitsAutoExpandSection),h=(0,N.useCallback)(()=>m(null),[m]),{curAgentState:g}=E(),_=!o.includes(g),v=l&&!a&&n.length>0,y=d&&(u?.length??0)>0,x=v||y,S=c||_&&f;return(0,F.jsx)(`main`,{className:`h-full w-full flex flex-col items-stretch`,children:x?(0,F.jsx)(`div`,{className:`h-full overflow-y-auto flex flex-col items-stretch custom-scrollbar-always`,children:(0,F.jsx)(X,{commits:v?n:[],hasMore:v?r:!1,uncommittedChanges:d?(u??[]).slice(0,100):[],autoExpandUncommitted:p===`uncommitted`,onAutoExpandHandled:h},t)}):(0,F.jsxs)(`div`,{className:`flex-1 flex items-center justify-center`,children:[!_&&(0,F.jsx)(C,{testId:`commits-tab-status`,messageKey:s.DIFF_VIEWER$WAITING_FOR_RUNTIME}),_&&S&&(0,F.jsx)(C,{testId:`commits-tab-status`,messageKey:s.DIFF_VIEWER$LOADING}),_&&!S&&(0,F.jsx)(M,{icon:(0,F.jsx)(Z,{}),children:e(s.DIFF_VIEWER$NO_COMMITS)})]})})}export{Q as default};
@@ -1 +0,0 @@
1
- import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{W as n}from"./utils-CN5ZfZy1.js";import{t as r}from"./modal-backdrop-BSzNhM4r.js";import{t as i}from"./brand-button-BAfk4wGP.js";var a=e();function o({text:e,onConfirm:o,onCancel:s,isConfirming:c=!1}){let{t:l}=t(`openhands`);return(0,a.jsx)(r,{onClose:c?void 0:s,closeOnEscape:!c,children:(0,a.jsxs)(`div`,{"data-testid":`confirmation-modal`,className:`bg-base-secondary p-4 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)]`,children:[(0,a.jsx)(`p`,{children:e}),(0,a.jsxs)(`div`,{className:`w-full flex justify-end gap-2`,children:[(0,a.jsx)(i,{testId:`cancel-button`,type:`button`,onClick:s,variant:`secondary`,isDisabled:c,children:l(n.BUTTON$CANCEL)}),(0,a.jsx)(i,{testId:`confirm-button`,type:`button`,onClick:o,variant:`primary`,isDisabled:c,children:l(n.BUTTON$CONFIRM)})]})]})})}export{o as t};