@openhands/agent-canvas 1.8.0 → 1.10.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 (1282) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{acp-providers-WUD4tfSq.js → acp-providers-DLe_gVDY.js} +1 -1
  4. package/build/assets/active-backend-context-B0wI7OzM.js +2 -0
  5. package/build/assets/agent-context-settings-CaQtdNA-.js +1 -0
  6. package/build/assets/agent-profiles-settings-CvuErjp6.js +1 -0
  7. package/build/assets/agent-server-conversation-service.api-km_8sOVf.js +41 -0
  8. package/build/assets/{agent-settings-BGTyoT6X.js → agent-settings-UE-U4Xii.js} +2 -2
  9. package/build/assets/agent-settings-nmO-KSXr.js +1 -0
  10. package/build/assets/alert-banner-BMaOtTCG.js +1 -0
  11. package/build/assets/{api-key-entry-screen-JOx3SH1-.js → api-key-entry-screen-Cy66vT4D.js} +1 -1
  12. package/build/assets/{app-settings-D53QZy5p.js → app-settings-9ok42bV6.js} +1 -1
  13. package/build/assets/automation-C_eCrGyP.js +1 -0
  14. package/build/assets/automation-detail-fuITm6i3.js +3 -0
  15. package/build/assets/automation-export-CRq40mux.js +2 -0
  16. package/build/assets/automation-setup-route-EXDazOHW.js +1 -0
  17. package/build/assets/automation-templates-BArZsaxP.js +1 -0
  18. package/build/assets/automations-list-CG4HKOTn.js +1 -0
  19. package/build/assets/{back-nav-button-C02hGa8t.js → back-nav-button-BZB6H7xz.js} +1 -1
  20. package/build/assets/backend-form-modal-B_lXjOGa.js +1 -0
  21. package/build/assets/{backend-synced-settings-badge-CQ9xtNWm.js → backend-synced-settings-badge-B_NXJ3u1.js} +1 -1
  22. package/build/assets/{badge-CzXbf7tR.js → badge-C64c-7PO.js} +1 -1
  23. package/build/assets/{base-modal-DkVyzFMt.js → base-modal-C0RQPug5.js} +1 -1
  24. package/build/assets/bot-DuN83i3p.js +1 -0
  25. package/build/assets/{brand-button-BUlDL-mz.js → brand-button-DJmFCyMK.js} +1 -1
  26. package/build/assets/browser-D3gd2n83.js +6 -0
  27. package/build/assets/{browser-tab-BijpUbdt.js → browser-tab-BicAWuJ1.js} +1 -1
  28. package/build/assets/{chat-send-button-BKsVjhtA.js → chat-send-button-CCrH1E8u.js} +1 -1
  29. package/build/assets/check-DLOKoFU9.js +1 -0
  30. package/build/assets/{checkmark-CxdXtM3b.js → checkmark-XZyokq_Y.js} +1 -1
  31. package/build/assets/chevron-down-CnIbtM6i.js +1 -0
  32. package/build/assets/circle-check-CxCYJrpZ.js +1 -0
  33. package/build/assets/{circle-plus-check-toggle-DdjUiOo1.js → circle-plus-check-toggle-CB_sNERY.js} +1 -1
  34. package/build/assets/{close-CDAVqnTn.js → close-ScPlnwyq.js} +1 -1
  35. package/build/assets/cloud-funnel-analytics-XynamQGU.js +1 -0
  36. package/build/assets/{combobox-caret-Dl9UtvD6.js → combobox-caret-Bwiifgjs.js} +1 -1
  37. package/build/assets/command-menu-CA3IjGNc.js +1 -0
  38. package/build/assets/condenser-settings-cNGy75gq.js +1 -0
  39. package/build/assets/{confirmation-modal-CRBJSllP.js → confirmation-modal-BATFmFyP.js} +1 -1
  40. package/build/assets/context-menu-list-item-DhJCcBA0.js +1 -0
  41. package/build/assets/conversation-B6t6EiVp.js +1 -0
  42. package/build/assets/conversation-Csdxh9Xt.js +90 -0
  43. package/build/assets/conversation-panel-B6t6EiVp.js +1 -0
  44. package/build/assets/conversation-state-store-C2QzhPaK.js +1 -0
  45. package/build/assets/{conversation-store-C6hSXHw0.js → conversation-store-B8Eahyeg.js} +1 -1
  46. package/build/assets/{conversation-tab-empty-state-CDjvNgpG.js → conversation-tab-empty-state-D3fb5xIA.js} +1 -1
  47. package/build/assets/{copy-Drwu97Gx.js → copy-DaHuDtG4.js} +1 -1
  48. package/build/assets/{copy-z7idLzWO.js → copy-Drmhc2jD.js} +1 -1
  49. package/build/assets/{copy-to-clipboard-button-NbN1clVr.js → copy-to-clipboard-button-c4MQwKGj.js} +1 -1
  50. package/build/assets/{device-verify-CDm_WrVu.js → device-verify-oFpQoLgm.js} +1 -1
  51. package/build/assets/{dist-hOnv1nn2.js → dist-Bl64nBZL.js} +1 -1
  52. package/build/assets/{dropdown-classes-CqA2BTCL.js → dropdown-classes-f91ARMV1.js} +1 -1
  53. package/build/assets/entry.client-BCzY2Bf3.js +2 -0
  54. package/build/assets/enum-filter-dropdown-HG3q3rkV.js +1 -0
  55. package/build/assets/{environment-switch-overlay-mGl2pqqx.js → environment-switch-overlay-CquZXolz.js} +1 -1
  56. package/build/assets/{extensions-hub-Br3Lgynp.js → extensions-hub-BeweE0PW.js} +1 -1
  57. package/build/assets/{extensions-navigation-BQmstKDZ.js → extensions-navigation-Dd58NlUF.js} +1 -1
  58. package/build/assets/{external-link-D9B2QMPf.js → external-link-zWbg5KXS.js} +1 -1
  59. package/build/assets/file-text-RecuaId_.js +1 -0
  60. package/build/assets/files-tab-CLLG55-q.js +1 -0
  61. package/build/assets/{folder-C86qXV7M.js → folder-C1ou4_DT.js} +1 -1
  62. package/build/assets/{form-control-classes-CtVAktAy.js → form-control-classes-pHtZUI6K.js} +1 -1
  63. package/build/assets/format-relative-time-6-3uvOXe.js +1 -0
  64. package/build/assets/format-time-delta-BIR5Os7T.js +1 -0
  65. package/build/assets/git-provider-icon-wg7ShB98.js +1 -0
  66. package/build/assets/git-repo-dropdown-CWnaUyxL.js +1 -0
  67. package/build/assets/git-repo-dropdown-TzOuG5Ef.js +1 -0
  68. package/build/assets/{highlighted-source-view-KMsA9c4a.js → highlighted-source-view-DBtI3por.js} +1 -1
  69. package/build/assets/home-BpZQkDWM.js +1 -0
  70. package/build/assets/home-OEx0XtfP.js +1 -0
  71. package/build/assets/home-store-DM4qw1lF.js +1 -0
  72. package/build/assets/{iconBase-B2rQun3J.js → iconBase-C2sR-uAp.js} +1 -1
  73. package/build/assets/index-home-OEx0XtfP.js +1 -0
  74. package/build/assets/info-C9lpK5pw.js +1 -0
  75. package/build/assets/install-server-modal-DnjZrJUy.js +1 -0
  76. package/build/assets/kebab-menu-item-content-By16Tm_0.js +1 -0
  77. package/build/assets/{launch-DjkKw55l.js → launch-C9uijypN.js} +1 -1
  78. package/build/assets/{link-external-BDBCz-_z.js → link-external-BNZzCM1I.js} +1 -1
  79. package/build/assets/list-filter-C86CBRDE.js +1 -0
  80. package/build/assets/{list-todo-BpAf7aOT.js → list-todo-CheUtB7F.js} +1 -1
  81. package/build/assets/llm-not-configured-banner-DrBrhfN0.js +27 -0
  82. package/build/assets/{llm-settings-D8zNkIlP.js → llm-settings-CRsLqxgu.js} +1 -1
  83. package/build/assets/llm-settings-RBm_3kNm.js +1 -0
  84. package/build/assets/{llm-subscription-service-COTgZc1C.js → llm-subscription-service-DwjJ8-_X.js} +1 -1
  85. package/build/assets/loader-circle-C5AnEN8r.js +1 -0
  86. package/build/assets/{loading-spinner-DRFyh6Iy.js → loading-spinner-6Yj-YyoS.js} +1 -1
  87. package/build/assets/{manage-backends-modal-DiRWE3tJ.js → manage-backends-modal-DrwErS0N.js} +1 -1
  88. package/build/assets/manifest-c352d453.js +1 -0
  89. package/build/assets/manifest-subpage-layout-CtqVwIvJ.js +1 -0
  90. package/build/assets/markdown-renderer-lsvsp7jn.js +8 -0
  91. package/build/assets/mcp-DD4hPTRE.js +9 -0
  92. package/build/assets/mcp-marketplace-utils-BMnYz0Gc.js +1 -0
  93. package/build/assets/messages-Dt77e0qi.js +40 -0
  94. package/build/assets/{modal-backdrop-X-vKo61e.js → modal-backdrop-BSzNhM4r.js} +1 -1
  95. package/build/assets/{modal-body-C3bGicn4.js → modal-body-BHGCSAtj.js} +1 -1
  96. package/build/assets/{modal-classes-DFFO6BMU.js → modal-classes-DSTLuxkA.js} +1 -1
  97. package/build/assets/{modal-close-button-vxkAIRyZ.js → modal-close-button-dheWZ2ys.js} +1 -1
  98. package/build/assets/mouse-pointer-click-Px-dXWcS.js +1 -0
  99. package/build/assets/{navigation-context-BOGzIng3.js → navigation-context-CQZwH_tC.js} +1 -1
  100. package/build/assets/navigation-link-Bxo3-4vo.js +1 -0
  101. package/build/assets/onboarding-5CZvRBbh.js +1 -0
  102. package/build/assets/onboarding-modal-CD2ehuxt.js +1 -0
  103. package/build/assets/{openhands-logo-CmYvJXBa.js → openhands-logo-BS-Epajy.js} +1 -1
  104. package/build/assets/{organization-service.api-CQ73CB-S.js → organization-service.api-Dsuoep0g.js} +1 -1
  105. package/build/assets/{pencil-DzW2GB2M.js → pencil-Bl3GWhgq.js} +1 -1
  106. package/build/assets/{planner-tab-YG0bGxDY.js → planner-tab-DeO7Thb0.js} +1 -1
  107. package/build/assets/{plugins-management-service-ijhH8OSh.js → plugins-management-service-C9f75R6X.js} +1 -1
  108. package/build/assets/plus-CtzlyAoF.js +1 -0
  109. package/build/assets/{profiles-service.api-C32pPm70.js → profiles-service.api-Dl20_2IM.js} +1 -1
  110. package/build/assets/{providers-DuSn9s2i.js → providers-CeuhK46N.js} +1 -1
  111. package/build/assets/{proxy-BiyDhMBd.js → proxy-CIGI9zQC.js} +1 -1
  112. package/build/assets/{puzzle-DlqT0yvr.js → puzzle-B3v361yY.js} +1 -1
  113. package/build/assets/recommended-automations-launcher-6xmbf7lh.js +1 -0
  114. package/build/assets/{refresh-cw-Br5254f4.js → refresh-cw-B9GhC3QC.js} +1 -1
  115. package/build/assets/root-BQPNqNvD.js +2 -0
  116. package/build/assets/root-BeuHFY2s.css +1 -0
  117. package/build/assets/root-layout-Dl_2CDoq.js +3 -0
  118. package/build/assets/{schema-field-htfNouTG.js → schema-field-z2vSLuLo.js} +1 -1
  119. package/build/assets/{sdk-section-page-D0K1dBQY.js → sdk-section-page-BnCXAytf.js} +1 -1
  120. package/build/assets/{search-7DRiGm4Z.js → search-BatSpWed.js} +1 -1
  121. package/build/assets/search-CYaiKHRp.js +1 -0
  122. package/build/assets/{secrets-service-Dbv5Zb8G.js → secrets-service-DGUNlwQd.js} +1 -1
  123. package/build/assets/{secrets-settings-Da4SSaX9.js → secrets-settings-DUmML_dK.js} +1 -1
  124. package/build/assets/segmented-toggle-eSofF7gn.js +1 -0
  125. package/build/assets/settings-CWFxymAf.js +1 -0
  126. package/build/assets/{settings-F4a09IxY.js → settings-Co-M5bK9.js} +1 -1
  127. package/build/assets/{settings-dropdown-input-jOiv5Yrk.js → settings-dropdown-input-Cx4g7Xfl.js} +1 -1
  128. package/build/assets/{settings-gear-TYXnELES.js → settings-gear-DaJj6Pde.js} +1 -1
  129. package/build/assets/{settings-index-CyJBf5NA.js → settings-index-BECdgecg.js} +1 -1
  130. package/build/assets/settings-input-BQY115xH.js +1 -0
  131. package/build/assets/settings-like-page-layout-classes-Cw4Yzv_P.js +1 -0
  132. package/build/assets/{settings-list-classes-VqMzkYYt.js → settings-list-classes-C9cLrrcc.js} +1 -1
  133. package/build/assets/{settings-modal-C-S1NpbC.js → settings-modal-ChBJNTdd.js} +1 -1
  134. package/build/assets/{settings-section-header-context-CnIIQAUn.js → settings-section-header-context-BOJ_Fbak.js} +1 -1
  135. package/build/assets/settings-service.api-Dz9cZyvx.js +1 -0
  136. package/build/assets/{settings-switch-B405oU_v.js → settings-switch-BIodMVz9.js} +1 -1
  137. package/build/assets/shared-conversation-CSF0aTuE.js +1 -0
  138. package/build/assets/{sidebar-layout-BGMuyC86.js → sidebar-layout-DEycoFd_.js} +1 -1
  139. package/build/assets/sidebar-mobile-menu-toggle-DeRvTupV.js +1 -0
  140. package/build/assets/{sidebar-nav-link-DA4_ct9G.js → sidebar-nav-link-BjpQ-NVc.js} +1 -1
  141. package/build/assets/{sidebar-store-FRJ3rADB.js → sidebar-store-B04sX8aP.js} +1 -1
  142. package/build/assets/{skill-card-pill-row-BMdhr_sd.js → skill-card-pill-row-BH6fPGba.js} +1 -1
  143. package/build/assets/{skill-icon-badge-CGUkgcVH.js → skill-icon-badge-D4uznfjU.js} +1 -1
  144. package/build/assets/skill-scope-DH_AUUUP.js +1 -0
  145. package/build/assets/{skills-CYFLsN5U.js → skills-B0IliMxw.js} +1 -1
  146. package/build/assets/{skills-plugins-C5eJnyft.js → skills-plugins-vfvOk34h.js} +1 -1
  147. package/build/assets/skills-settings-DnbIu2eO.js +2 -0
  148. package/build/assets/sparkles-g7y3r-Ut.js +1 -0
  149. package/build/assets/{styled-tooltip-B3kIdVyH.js → styled-tooltip-CQ9JEFiO.js} +1 -1
  150. package/build/assets/{switch-skeleton-BQoOhQTB.js → switch-skeleton-DwOoCqaL.js} +1 -1
  151. package/build/assets/{syntax-highlighter-B92AFGMy.js → syntax-highlighter-BGDg_7w9.js} +1 -1
  152. package/build/assets/{task-list-tab-B3k4W1cK.js → task-list-tab-DeF_uXdw.js} +1 -1
  153. package/build/assets/{terminal-cMS3RgVE.js → terminal-BUpID2wS.js} +1 -1
  154. package/build/assets/{terminal-CBI_41Zc.js → terminal-DRc4rup7.js} +1 -1
  155. package/build/assets/{toggle-switch-DYRr9CAR.js → toggle-switch--8n8NeV_.js} +1 -1
  156. package/build/assets/{trash-2-gZPlx23R.js → trash-2-CzDVN-Iw.js} +1 -1
  157. package/build/assets/{typography-B1UxuuEC.js → typography-BSbUhJPn.js} +1 -1
  158. package/build/assets/{u-check-circle-DBEvndTS.js → u-check-circle-BKn1spCL.js} +1 -1
  159. package/build/assets/{u-edit-809W9D9T.js → u-edit-DAkcF52u.js} +1 -1
  160. package/build/assets/{u-robot-CJtSzy5X.js → u-robot-BvAOA2ZD.js} +1 -1
  161. package/build/assets/{use-acp-credential-form-CjSvKWFH.js → use-acp-credential-form-BGKFi1VL.js} +1 -1
  162. package/build/assets/{use-activate-agent-profile-DCRf47e-.js → use-activate-agent-profile-2nvALjC-.js} +1 -1
  163. package/build/assets/use-agent-profiles-BlQA67MW.js +1 -0
  164. package/build/assets/{use-breakpoint-DA7JqsRN.js → use-breakpoint-DWtihr9g.js} +1 -1
  165. package/build/assets/{use-can-manage-org-profiles-vBiP7rHF.js → use-can-manage-org-profiles-Clw5Dh1s.js} +1 -1
  166. package/build/assets/{use-click-outside-element-DKqpqEEm.js → use-click-outside-element-W6Os4Nlb.js} +1 -1
  167. package/build/assets/{use-cloud-current-user-id-BMq9gw93.js → use-cloud-current-user-id-B8AQSQFM.js} +1 -1
  168. package/build/assets/use-config-C3zGuUQI.js +1 -0
  169. package/build/assets/{use-create-conversation-CakhLF0X.js → use-create-conversation-FaP0kUpg.js} +1 -1
  170. package/build/assets/{use-create-secret-RT4QtSS9.js → use-create-secret-CgQ3pXd6.js} +1 -1
  171. package/build/assets/use-is-authed-Bka89Xmm.js +1 -0
  172. package/build/assets/{use-is-creating-conversation-CIAcnd8M.js → use-is-creating-conversation-CVefC9Ns.js} +1 -1
  173. package/build/assets/{use-launch-skill-in-chat-DKzCTMt0.js → use-launch-skill-in-chat-BcKNjxxd.js} +1 -1
  174. package/build/assets/use-llm-profiles-C-tDO6UB.js +1 -0
  175. package/build/assets/use-manifest-capabilities-DLP5wCxp.js +1 -0
  176. package/build/assets/{use-onboarding-completion-CJU4MNAY.js → use-onboarding-completion-BiCdXvlU.js} +1 -1
  177. package/build/assets/{use-plugins-marketplace-D-93nqtJ.js → use-plugins-marketplace-DRFNLBlr.js} +1 -1
  178. package/build/assets/use-save-agent-profile-CaGVAudI.js +1 -0
  179. package/build/assets/{use-save-settings--C6LZXfI.js → use-save-settings-C9B8Y-h3.js} +1 -1
  180. package/build/assets/{use-settings-DIAo5KFk.js → use-settings-3RcgdUuZ.js} +1 -1
  181. package/build/assets/use-settings-nav-items-y-Oyc93G.js +16 -0
  182. package/build/assets/use-tracking-CTtkLAmx.js +3 -0
  183. package/build/assets/{use-user-conversation-DhcAEyJX.js → use-user-conversation-Bei82QsZ.js} +1 -1
  184. package/build/assets/useInfiniteQuery-DbCv0Jzd.js +1 -0
  185. package/build/assets/{useMutation-DHLpZ6J0.js → useMutation-ChpkYxI5.js} +1 -1
  186. package/build/assets/{useQueries-B3T1a7qt.js → useQueries-Cjv3E8_1.js} +1 -1
  187. package/build/assets/useQuery-BCnzy4LX.js +1 -0
  188. package/build/assets/utils-BX9XJ0IE.js +1 -0
  189. package/build/assets/{vendor-markdown-BML7QbqS.js → vendor-markdown-j0kYzV48.js} +1 -1
  190. package/build/assets/{vendor-styling-Bcgpimp9.js → vendor-styling-Ck5D_A2Q.js} +6 -6
  191. package/build/assets/{vendor~browser-jaN4ilxM.js → vendor~browser-C6uXH-dw.js} +2 -2
  192. package/build/assets/vendor~browser-DJ1pl_wn.js +47 -0
  193. package/build/assets/{vendor~browser-tab-_-VCXq8n.js → vendor~browser-tab-C5uuAxZX.js} +1 -1
  194. package/build/assets/vendor~entry.client-CgNUwtQL.js +1 -0
  195. package/build/assets/{vendor~entry.client-Di4qO77Y.js → vendor~entry.client-zSIea5EO.js} +2 -2
  196. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js +1 -0
  197. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js} +4 -4
  198. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js +26 -0
  199. package/build/assets/{vendor~files-tab-atebg0iG.js → vendor~files-tab-C87pjSpi.js} +1 -1
  200. package/build/assets/{vendor~index-home~home~conversation-panel~conversation-G9DMrR7m.js → vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js} +1 -1
  201. package/build/assets/{vendor~conversation-panel~conversation~alert-banner-BNzz5FuZ.js → vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js} +1 -1
  202. package/build/assets/{vendor~launch-ChXCOGw8.js → vendor~launch-CHwEQG6e.js} +1 -1
  203. package/build/assets/vendor~module-DyG7x7JT.js +2 -0
  204. package/build/assets/{vendor~root-layout~conversation-panel~conversation-DEhW1h3I.js → vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js} +1 -1
  205. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-DRblkyXD.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DOuig0C0.js} +1 -1
  206. package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js +1 -0
  207. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js +1 -0
  208. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js +1 -0
  209. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~automation-templates~automation-set~bxsimjx0-D7IDevqN.js +1 -0
  210. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js} +1 -1
  211. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-VFnwct3q.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js} +1 -1
  212. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js +73 -0
  213. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~eywn6ulz-BKxxr74w.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js} +175 -54
  214. package/build/assets/{verification-settings-Vr5cN4md.js → verification-settings-nD61Ijph.js} +1 -1
  215. package/build/assets/wrench-DRitTfwe.js +1 -0
  216. package/build/assets/x-RYDBg-e2.js +1 -0
  217. package/build/assets/{x-mark-jcTkPiOB.js → x-mark-BopmFoBq.js} +1 -1
  218. package/build/assets/zap-tbKDzCe3.js +1 -0
  219. package/build/index.html +4 -4
  220. package/build/locales/ar/openhands.json +106 -5
  221. package/build/locales/ca/openhands.json +106 -5
  222. package/build/locales/de/openhands.json +106 -5
  223. package/build/locales/en/openhands.json +107 -6
  224. package/build/locales/es/openhands.json +106 -5
  225. package/build/locales/fr/openhands.json +106 -5
  226. package/build/locales/it/openhands.json +106 -5
  227. package/build/locales/ja/openhands.json +106 -5
  228. package/build/locales/ko-KR/openhands.json +106 -5
  229. package/build/locales/no/openhands.json +106 -5
  230. package/build/locales/pt/openhands.json +106 -5
  231. package/build/locales/tr/openhands.json +106 -5
  232. package/build/locales/uk/openhands.json +106 -5
  233. package/build/locales/zh-CN/openhands.json +106 -5
  234. package/build/locales/zh-TW/openhands.json +106 -5
  235. package/build/mockServiceWorker.js +21 -9
  236. package/config/defaults.json +3 -3
  237. package/dist/api/agent-server-adapter.cjs +3 -3
  238. package/dist/api/agent-server-adapter.cjs.map +1 -1
  239. package/dist/api/agent-server-adapter.d.ts +46 -6
  240. package/dist/api/agent-server-adapter.js +187 -168
  241. package/dist/api/agent-server-adapter.js.map +1 -1
  242. package/dist/api/agent-server-compatibility.cjs +1 -1
  243. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  244. package/dist/api/agent-server-compatibility.d.ts +4 -0
  245. package/dist/api/agent-server-compatibility.js +41 -38
  246. package/dist/api/agent-server-compatibility.js.map +1 -1
  247. package/dist/api/automation-service/automation-service.api.cjs +1 -1
  248. package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
  249. package/dist/api/automation-service/automation-service.api.d.ts +25 -0
  250. package/dist/api/automation-service/automation-service.api.js +110 -62
  251. package/dist/api/automation-service/automation-service.api.js.map +1 -1
  252. package/dist/api/backend-registry/active-store.cjs +1 -1
  253. package/dist/api/backend-registry/active-store.cjs.map +1 -1
  254. package/dist/api/backend-registry/active-store.js +36 -31
  255. package/dist/api/backend-registry/active-store.js.map +1 -1
  256. package/dist/api/backend-registry/url-selection.cjs +2 -0
  257. package/dist/api/backend-registry/url-selection.cjs.map +1 -0
  258. package/dist/api/backend-registry/url-selection.d.ts +31 -0
  259. package/dist/api/backend-registry/url-selection.js +29 -0
  260. package/dist/api/backend-registry/url-selection.js.map +1 -0
  261. package/dist/api/mcp-service/mcp-redacted-credentials.cjs +1 -1
  262. package/dist/api/mcp-service/mcp-redacted-credentials.cjs.map +1 -1
  263. package/dist/api/mcp-service/mcp-redacted-credentials.d.ts +3 -2
  264. package/dist/api/mcp-service/mcp-redacted-credentials.js +32 -27
  265. package/dist/api/mcp-service/mcp-redacted-credentials.js.map +1 -1
  266. package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
  267. package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
  268. package/dist/api/mcp-service/mcp-service.api.js +19 -19
  269. package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
  270. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  271. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  272. package/dist/api/settings-service/settings-service.api.d.ts +10 -0
  273. package/dist/api/settings-service/settings-service.api.js +90 -100
  274. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  275. package/dist/api/skills-service.cjs +1 -1
  276. package/dist/api/skills-service.cjs.map +1 -1
  277. package/dist/api/skills-service.js +1 -0
  278. package/dist/api/skills-service.js.map +1 -1
  279. package/dist/assets/chevron-left.d.ts +1 -1
  280. package/dist/assets/chevron-right.d.ts +1 -1
  281. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs +2 -0
  282. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs.map +1 -0
  283. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.d.ts +12 -0
  284. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js +94 -0
  285. package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js.map +1 -0
  286. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
  287. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
  288. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +31 -90
  289. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
  290. package/dist/components/conversation-events/chat/event-message-components/collapsible-thinking.d.ts +2 -1
  291. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.d.ts +2 -1
  292. package/dist/components/conversation-events/chat/event-message-components/error-event-message.d.ts +2 -1
  293. package/dist/components/conversation-events/chat/event-message-components/event-group.d.ts +1 -1
  294. package/dist/components/conversation-events/chat/event-message-components/finish-event-message.d.ts +1 -1
  295. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
  296. package/dist/components/conversation-events/chat/event-message-components/observation-pair-event-message.d.ts +2 -1
  297. package/dist/components/conversation-events/chat/event-message-components/skill-item-expanded.d.ts +1 -1
  298. package/dist/components/conversation-events/chat/event-message-components/skill-ready-content-list.d.ts +2 -1
  299. package/dist/components/conversation-events/chat/event-message-components/thought-event-message.d.ts +1 -1
  300. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +2 -1
  301. package/dist/components/conversation-events/chat/event-message.d.ts +2 -1
  302. package/dist/components/conversation-events/chat/task-tracking/task-item.d.ts +1 -1
  303. package/dist/components/conversation-events/chat/task-tracking/task-list-section.d.ts +1 -1
  304. package/dist/components/features/alerts/alert-banner.d.ts +1 -1
  305. package/dist/components/features/analytics/telemetry-consent-banner.d.ts +2 -1
  306. package/dist/components/features/automations/add-automation-modal.d.ts +1 -1
  307. package/dist/components/features/automations/automation-card-skeleton.d.ts +1 -1
  308. package/dist/components/features/automations/automation-card.d.ts +9 -1
  309. package/dist/components/features/automations/automation-group.d.ts +9 -1
  310. package/dist/components/features/automations/automation-health-badge.d.ts +8 -0
  311. package/dist/components/features/automations/automation-list-row.d.ts +3 -1
  312. package/dist/components/features/automations/automation-run-insights.d.ts +17 -0
  313. package/dist/components/features/automations/automation-view-toggle.d.ts +1 -1
  314. package/dist/components/features/automations/backend-not-configured.d.ts +1 -1
  315. package/dist/components/features/automations/create-instructions.d.ts +2 -2
  316. package/dist/components/features/automations/dashboard/automations-dashboard-controls.d.ts +18 -0
  317. package/dist/components/features/automations/dashboard/automations-filtered-empty-state.d.ts +9 -0
  318. package/dist/components/features/automations/dashboard/use-automation-sub-page-nav.d.ts +12 -0
  319. package/dist/components/features/automations/delete-confirmation-modal.d.ts +1 -1
  320. package/dist/components/features/automations/detail/active-status-badge.d.ts +1 -1
  321. package/dist/components/features/automations/detail/activity-log-item.d.ts +1 -1
  322. package/dist/components/features/automations/detail/activity-log-section.d.ts +3 -1
  323. package/dist/components/features/automations/detail/activity-section.d.ts +1 -1
  324. package/dist/components/features/automations/detail/back-link.d.ts +1 -1
  325. package/dist/components/features/automations/detail/branch-badge.d.ts +1 -1
  326. package/dist/components/features/automations/detail/config-field.d.ts +1 -1
  327. package/dist/components/features/automations/detail/configuration-section.d.ts +1 -1
  328. package/dist/components/features/automations/detail/debug-automation-button.d.ts +1 -1
  329. package/dist/components/features/automations/detail/detail-header.d.ts +1 -1
  330. package/dist/components/features/automations/detail/detail-skeleton.d.ts +1 -1
  331. package/dist/components/features/automations/detail/edit-automation-modal.d.ts +1 -1
  332. package/dist/components/features/automations/detail/not-found-state.d.ts +1 -1
  333. package/dist/components/features/automations/detail/plugin-chip.d.ts +1 -1
  334. package/dist/components/features/automations/detail/plugins-section.d.ts +1 -1
  335. package/dist/components/features/automations/detail/prompt-section.d.ts +2 -1
  336. package/dist/components/features/automations/detail/run-logs-modal.d.ts +1 -1
  337. package/dist/components/features/automations/detail/run-status-badge.d.ts +10 -1
  338. package/dist/components/features/automations/detail/section-card.d.ts +1 -1
  339. package/dist/components/features/automations/empty-state.d.ts +1 -1
  340. package/dist/components/features/automations/error-state.d.ts +1 -1
  341. package/dist/components/features/automations/import-automation-modal.d.ts +1 -1
  342. package/dist/components/features/automations/kebab-menu-item-content.d.ts +1 -1
  343. package/dist/components/features/automations/kebab-menu.d.ts +1 -1
  344. package/dist/components/features/automations/metadata-chip.d.ts +1 -1
  345. package/dist/components/features/automations/recommended-automations-launcher.d.ts +1 -8
  346. package/dist/components/features/automations/recommended-automations-section.d.ts +1 -7
  347. package/dist/components/features/automations/responder-deployment-modal.d.ts +1 -1
  348. package/dist/components/features/automations/search-input.d.ts +1 -1
  349. package/dist/components/features/automations/status-badge.d.ts +1 -1
  350. package/dist/components/features/automations/turn-off-confirmation-modal.d.ts +8 -0
  351. package/dist/components/features/automations/view-menu-item-content.d.ts +1 -1
  352. package/dist/components/features/backends/add-backend-modal.d.ts +1 -1
  353. package/dist/components/features/backends/api-key-entry-screen.d.ts +2 -1
  354. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  355. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  356. package/dist/components/features/backends/backend-form-modal.d.ts +3 -3
  357. package/dist/components/features/backends/backend-form-modal.js +568 -358
  358. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  359. package/dist/components/features/backends/backend-row.d.ts +1 -1
  360. package/dist/components/features/backends/backend-selector.d.ts +2 -1
  361. package/dist/components/features/backends/backend-status-dot.d.ts +2 -1
  362. package/dist/components/features/backends/backend-version.d.ts +1 -1
  363. package/dist/components/features/backends/device-flow-auth.cjs +1 -1
  364. package/dist/components/features/backends/device-flow-auth.cjs.map +1 -1
  365. package/dist/components/features/backends/device-flow-auth.d.ts +9 -1
  366. package/dist/components/features/backends/device-flow-auth.js +56 -55
  367. package/dist/components/features/backends/device-flow-auth.js.map +1 -1
  368. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  369. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  370. package/dist/components/features/backends/manage-backends-modal.d.ts +2 -1
  371. package/dist/components/features/backends/manage-backends-modal.js +1 -1
  372. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  373. package/dist/components/features/browser/browser-chrome-bar.d.ts +1 -1
  374. package/dist/components/features/browser/browser-snapshot.d.ts +1 -1
  375. package/dist/components/features/browser/browser.d.ts +1 -1
  376. package/dist/components/features/browser/empty-browser-message.d.ts +1 -1
  377. package/dist/components/features/chat/btw-messages.d.ts +1 -1
  378. package/dist/components/features/chat/change-agent-button.d.ts +2 -1
  379. package/dist/components/features/chat/change-agent-context-menu.d.ts +1 -1
  380. package/dist/components/features/chat/chat-action-tooltip.d.ts +1 -1
  381. package/dist/components/features/chat/chat-add-file-button.d.ts +2 -1
  382. package/dist/components/features/chat/chat-interface.cjs +1 -1
  383. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  384. package/dist/components/features/chat/chat-interface.d.ts +2 -1
  385. package/dist/components/features/chat/chat-interface.js +105 -105
  386. package/dist/components/features/chat/chat-interface.js.map +1 -1
  387. package/dist/components/features/chat/chat-message.cjs +1 -1
  388. package/dist/components/features/chat/chat-message.cjs.map +1 -1
  389. package/dist/components/features/chat/chat-message.d.ts +2 -1
  390. package/dist/components/features/chat/chat-message.js +59 -49
  391. package/dist/components/features/chat/chat-message.js.map +1 -1
  392. package/dist/components/features/chat/chat-messages-skeleton.d.ts +2 -1
  393. package/dist/components/features/chat/chat-play-button.d.ts +1 -1
  394. package/dist/components/features/chat/chat-send-button.d.ts +1 -1
  395. package/dist/components/features/chat/chat-status-indicator.d.ts +1 -1
  396. package/dist/components/features/chat/chat-stop-button.d.ts +1 -1
  397. package/dist/components/features/chat/chat-suggestions.d.ts +1 -1
  398. package/dist/components/features/chat/components/chat-input-actions.d.ts +2 -1
  399. package/dist/components/features/chat/components/chat-input-container.d.ts +1 -1
  400. package/dist/components/features/chat/components/chat-input-field.d.ts +1 -1
  401. package/dist/components/features/chat/components/chat-input-grip.d.ts +1 -1
  402. package/dist/components/features/chat/components/chat-input-llm-profile-picker.d.ts +3 -2
  403. package/dist/components/features/chat/components/chat-input-model.d.ts +3 -2
  404. package/dist/components/features/chat/components/chat-input-profile-picker.d.ts +1 -1
  405. package/dist/components/features/chat/components/chat-input-row.d.ts +1 -1
  406. package/dist/components/features/chat/components/hidden-file-input.d.ts +1 -1
  407. package/dist/components/features/chat/components/slash-command-menu.d.ts +2 -1
  408. package/dist/components/features/chat/confirmation-mode-enabled.d.ts +1 -1
  409. package/dist/components/features/chat/custom-chat-input.d.ts +1 -1
  410. package/dist/components/features/chat/drag-over.d.ts +1 -1
  411. package/dist/components/features/chat/error-message-banner.d.ts +2 -1
  412. package/dist/components/features/chat/error-message.d.ts +2 -1
  413. package/dist/components/features/chat/generic-event-message.d.ts +1 -1
  414. package/dist/components/features/chat/git-control-bar-branch-button.d.ts +1 -1
  415. package/dist/components/features/chat/git-control-bar-pr-button.d.ts +1 -1
  416. package/dist/components/features/chat/git-control-bar-pull-button.d.ts +1 -1
  417. package/dist/components/features/chat/git-control-bar-push-button.d.ts +1 -1
  418. package/dist/components/features/chat/git-control-bar-repo-button.d.ts +1 -1
  419. package/dist/components/features/chat/git-control-bar-tooltip-wrapper.d.ts +1 -1
  420. package/dist/components/features/chat/git-control-bar.d.ts +1 -1
  421. package/dist/components/features/chat/git-external-link-icon.d.ts +1 -1
  422. package/dist/components/features/chat/goal-status-banner.d.ts +1 -1
  423. package/dist/components/features/chat/goal-status-content.d.ts +1 -1
  424. package/dist/components/features/chat/got-it-button.d.ts +1 -1
  425. package/dist/components/features/chat/interactive-chat-box.d.ts +1 -1
  426. package/dist/components/features/chat/model-messages.d.ts +2 -1
  427. package/dist/components/features/chat/mono-component.d.ts +1 -1
  428. package/dist/components/features/chat/open-repository-modal.d.ts +2 -1
  429. package/dist/components/features/chat/pasted-image-upload-as-file-button.d.ts +1 -1
  430. package/dist/components/features/chat/path-component.d.ts +1 -1
  431. package/dist/components/features/chat/pending-stop-icon.d.ts +1 -1
  432. package/dist/components/features/chat/pending-user-messages.cjs +1 -1
  433. package/dist/components/features/chat/pending-user-messages.cjs.map +1 -1
  434. package/dist/components/features/chat/pending-user-messages.d.ts +2 -1
  435. package/dist/components/features/chat/pending-user-messages.js +4 -1
  436. package/dist/components/features/chat/pending-user-messages.js.map +1 -1
  437. package/dist/components/features/chat/plan-preview.d.ts +1 -1
  438. package/dist/components/features/chat/remove-file-button.d.ts +1 -1
  439. package/dist/components/features/chat/skill-install-restart-banner.d.ts +1 -1
  440. package/dist/components/features/chat/success-indicator.d.ts +1 -1
  441. package/dist/components/features/chat/task-tracking/status-badge.d.ts +1 -1
  442. package/dist/components/features/chat/task-tracking/status-icon.d.ts +1 -1
  443. package/dist/components/features/chat/task-tracking/task-item.d.ts +1 -1
  444. package/dist/components/features/chat/task-tracking/task-list-section.d.ts +1 -1
  445. package/dist/components/features/chat/tool-visualizers/primitives/code-block.d.ts +2 -1
  446. package/dist/components/features/chat/tool-visualizers/primitives/diff-view.d.ts +2 -1
  447. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +2 -1
  448. package/dist/components/features/chat/tool-visualizers/primitives/key-value-grid.d.ts +1 -1
  449. package/dist/components/features/chat/tool-visualizers/primitives/output-pane.d.ts +2 -1
  450. package/dist/components/features/chat/typing-indicator.cjs +1 -1
  451. package/dist/components/features/chat/typing-indicator.cjs.map +1 -1
  452. package/dist/components/features/chat/typing-indicator.d.ts +8 -1
  453. package/dist/components/features/chat/typing-indicator.js +94 -10
  454. package/dist/components/features/chat/typing-indicator.js.map +1 -1
  455. package/dist/components/features/chat/uploaded-file.d.ts +1 -1
  456. package/dist/components/features/chat/uploaded-files.d.ts +1 -1
  457. package/dist/components/features/chat/uploaded-image.d.ts +2 -1
  458. package/dist/components/features/chat/user-message-body.d.ts +2 -2
  459. package/dist/components/features/chat/waiting-for-runtime-message.d.ts +1 -1
  460. package/dist/components/features/chat/workspace-mode-icon.d.ts +1 -1
  461. package/dist/components/features/chat/workspace-mode-selector.d.ts +1 -1
  462. package/dist/components/features/command-menu/command-menu-items.d.ts +5 -1
  463. package/dist/components/features/command-menu/command-menu-trigger.d.ts +2 -1
  464. package/dist/components/features/context-menu/archived-disabled-tooltip.d.ts +1 -1
  465. package/dist/components/features/context-menu/context-menu-icon-text-with-description.d.ts +1 -1
  466. package/dist/components/features/context-menu/context-menu-icon-text.d.ts +1 -1
  467. package/dist/components/features/context-menu/context-menu-list-item.cjs +1 -1
  468. package/dist/components/features/context-menu/context-menu-list-item.cjs.map +1 -1
  469. package/dist/components/features/context-menu/context-menu-list-item.d.ts +2 -1
  470. package/dist/components/features/context-menu/context-menu-list-item.js +2 -1
  471. package/dist/components/features/context-menu/context-menu-list-item.js.map +1 -1
  472. package/dist/components/features/controls/agent-loading.d.ts +1 -1
  473. package/dist/components/features/controls/agent-status.d.ts +1 -1
  474. package/dist/components/features/controls/git-tools-submenu.d.ts +1 -1
  475. package/dist/components/features/controls/macros-submenu.d.ts +1 -1
  476. package/dist/components/features/controls/server-status-context-menu-icon-text.d.ts +1 -1
  477. package/dist/components/features/controls/server-status-context-menu.d.ts +1 -1
  478. package/dist/components/features/controls/server-status.d.ts +1 -1
  479. package/dist/components/features/controls/tools-context-menu-icon-text.d.ts +1 -1
  480. package/dist/components/features/controls/tools-context-menu.d.ts +1 -1
  481. package/dist/components/features/controls/tools.d.ts +2 -1
  482. package/dist/components/features/conversation/conversation-loading.d.ts +1 -1
  483. package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.d.ts +1 -1
  484. package/dist/components/features/conversation/conversation-main/conversation-main.d.ts +1 -1
  485. package/dist/components/features/conversation/conversation-main/conversation-mobile-panel-page.d.ts +2 -1
  486. package/dist/components/features/conversation/conversation-name-context-menu-icon-text.d.ts +1 -1
  487. package/dist/components/features/conversation/conversation-name-context-menu.d.ts +1 -1
  488. package/dist/components/features/conversation/conversation-name-with-status.d.ts +2 -1
  489. package/dist/components/features/conversation/conversation-name.d.ts +2 -1
  490. package/dist/components/features/conversation/conversation-tab-empty-state.d.ts +1 -1
  491. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content-crossfade.d.ts +1 -1
  492. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.d.ts +1 -1
  493. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/suspense-pending-fallback.d.ts +1 -1
  494. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-container.d.ts +1 -1
  495. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-content-area.d.ts +1 -1
  496. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-wrapper.d.ts +1 -1
  497. package/dist/components/features/conversation/conversation-tabs/conversation-tab-nav.d.ts +1 -1
  498. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.d.ts +1 -1
  499. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.d.ts +1 -1
  500. package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.d.ts +1 -1
  501. package/dist/components/features/conversation/metrics-modal/context-window-section.d.ts +1 -1
  502. package/dist/components/features/conversation/metrics-modal/cost-section.d.ts +1 -1
  503. package/dist/components/features/conversation/metrics-modal/empty-state.d.ts +1 -1
  504. package/dist/components/features/conversation/metrics-modal/metric-row.d.ts +1 -1
  505. package/dist/components/features/conversation/metrics-modal/metrics-modal-header.d.ts +1 -1
  506. package/dist/components/features/conversation/metrics-modal/metrics-modal.d.ts +1 -1
  507. package/dist/components/features/conversation/metrics-modal/usage-section.d.ts +1 -1
  508. package/dist/components/features/conversation/right-panel-toggle.d.ts +1 -1
  509. package/dist/components/features/conversation/transcript-export-modal.d.ts +2 -1
  510. package/dist/components/features/conversation-panel/budget-display.d.ts +2 -1
  511. package/dist/components/features/conversation-panel/budget-progress-bar.d.ts +1 -1
  512. package/dist/components/features/conversation-panel/budget-usage-text.d.ts +2 -1
  513. package/dist/components/features/conversation-panel/cloud-new-conversation-menu.d.ts +1 -1
  514. package/dist/components/features/conversation-panel/compact-conversation-row.cjs +1 -1
  515. package/dist/components/features/conversation-panel/compact-conversation-row.cjs.map +1 -1
  516. package/dist/components/features/conversation-panel/compact-conversation-row.d.ts +2 -1
  517. package/dist/components/features/conversation-panel/compact-conversation-row.js +38 -37
  518. package/dist/components/features/conversation-panel/compact-conversation-row.js.map +1 -1
  519. package/dist/components/features/conversation-panel/confirm-delete-modal.d.ts +1 -1
  520. package/dist/components/features/conversation-panel/confirm-stop-modal.d.ts +1 -1
  521. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +1 -1
  522. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +1 -1
  523. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +1 -1
  524. package/dist/components/features/conversation-panel/conversation-card/conversation-card-header.d.ts +1 -1
  525. package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.d.ts +1 -1
  526. package/dist/components/features/conversation-panel/conversation-card/conversation-card-skeleton.d.ts +1 -1
  527. package/dist/components/features/conversation-panel/conversation-card/conversation-card-title.d.ts +1 -1
  528. package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +2 -1
  529. package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.d.ts +1 -1
  530. package/dist/components/features/conversation-panel/conversation-card/conversation-status-badges.d.ts +1 -1
  531. package/dist/components/features/conversation-panel/conversation-card/no-repository.d.ts +1 -1
  532. package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +1 -1
  533. package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +1 -1
  534. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +1 -1
  535. package/dist/components/features/conversation-panel/conversation-panel-new-thread-picker.d.ts +1 -1
  536. package/dist/components/features/conversation-panel/conversation-panel-pinned-section.d.ts +1 -1
  537. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  538. package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
  539. package/dist/components/features/conversation-panel/conversation-panel.d.ts +2 -1
  540. package/dist/components/features/conversation-panel/conversation-panel.js +221 -220
  541. package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
  542. package/dist/components/features/conversation-panel/conversation-status-dot.d.ts +1 -1
  543. package/dist/components/features/conversation-panel/exit-conversation-modal.d.ts +1 -1
  544. package/dist/components/features/conversation-panel/hook-event-item.d.ts +1 -1
  545. package/dist/components/features/conversation-panel/hook-matcher-content.d.ts +1 -1
  546. package/dist/components/features/conversation-panel/hooks-empty-state.d.ts +1 -1
  547. package/dist/components/features/conversation-panel/hooks-loading-state.d.ts +1 -1
  548. package/dist/components/features/conversation-panel/hooks-modal-header.d.ts +1 -1
  549. package/dist/components/features/conversation-panel/hooks-modal.d.ts +1 -1
  550. package/dist/components/features/conversation-panel/local-new-conversation-menu.d.ts +1 -1
  551. package/dist/components/features/conversation-panel/menu-heading.d.ts +1 -1
  552. package/dist/components/features/conversation-panel/menu-row.d.ts +1 -1
  553. package/dist/components/features/conversation-panel/menu-separator.d.ts +1 -1
  554. package/dist/components/features/conversation-panel/new-conversation-button.d.ts +2 -1
  555. package/dist/components/features/conversation-panel/plugins-modal.d.ts +1 -1
  556. package/dist/components/features/conversation-panel/runtime-waiting-state.d.ts +1 -1
  557. package/dist/components/features/conversation-panel/skill-content.d.ts +1 -1
  558. package/dist/components/features/conversation-panel/skill-item.d.ts +1 -1
  559. package/dist/components/features/conversation-panel/skill-triggers.d.ts +1 -1
  560. package/dist/components/features/conversation-panel/skills-empty-state.d.ts +1 -1
  561. package/dist/components/features/conversation-panel/skills-loading-state.d.ts +1 -1
  562. package/dist/components/features/conversation-panel/skills-modal-header.d.ts +1 -1
  563. package/dist/components/features/conversation-panel/skills-modal-section.d.ts +1 -1
  564. package/dist/components/features/conversation-panel/skills-modal.d.ts +1 -1
  565. package/dist/components/features/conversation-panel/start-task-card/start-task-card-footer.d.ts +1 -1
  566. package/dist/components/features/conversation-panel/start-task-card/start-task-card-header.d.ts +1 -1
  567. package/dist/components/features/conversation-panel/start-task-card/start-task-card.d.ts +1 -1
  568. package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.d.ts +1 -1
  569. package/dist/components/features/conversation-panel/start-task-card/start-task-status-indicator.d.ts +1 -1
  570. package/dist/components/features/conversation-panel/system-message-modal/empty-tools-state.d.ts +1 -1
  571. package/dist/components/features/conversation-panel/system-message-modal/system-message-content.d.ts +1 -1
  572. package/dist/components/features/conversation-panel/system-message-modal/system-message-header.d.ts +1 -1
  573. package/dist/components/features/conversation-panel/system-message-modal/tab-button.d.ts +1 -1
  574. package/dist/components/features/conversation-panel/system-message-modal/tab-content.d.ts +1 -1
  575. package/dist/components/features/conversation-panel/system-message-modal/tab-navigation.d.ts +1 -1
  576. package/dist/components/features/conversation-panel/system-message-modal/toggle-button.d.ts +1 -1
  577. package/dist/components/features/conversation-panel/system-message-modal/tool-item.d.ts +1 -1
  578. package/dist/components/features/conversation-panel/system-message-modal/tool-parameters.d.ts +1 -1
  579. package/dist/components/features/conversation-panel/system-message-modal/tools-list.d.ts +1 -1
  580. package/dist/components/features/conversation-panel/system-message-modal.d.ts +1 -1
  581. package/dist/components/features/diff-viewer/commit-list.d.ts +2 -1
  582. package/dist/components/features/diff-viewer/commit-row.d.ts +2 -1
  583. package/dist/components/features/diff-viewer/diff-drawer-icon.d.ts +1 -1
  584. package/dist/components/features/diff-viewer/editor-container.d.ts +1 -1
  585. package/dist/components/features/diff-viewer/empty-changes-message.d.ts +1 -1
  586. package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +2 -1
  587. package/dist/components/features/diff-viewer/loading-spinner.d.ts +1 -1
  588. package/dist/components/features/files/file-item.d.ts +1 -1
  589. package/dist/components/features/files/file-list.d.ts +2 -1
  590. package/dist/components/features/files-tab/file-content-viewer.d.ts +1 -1
  591. package/dist/components/features/files-tab/file-quick-row.d.ts +1 -1
  592. package/dist/components/features/files-tab/file-tree-view.d.ts +1 -1
  593. package/dist/components/features/files-tab/highlighted-source-view.d.ts +1 -1
  594. package/dist/components/features/files-tab/no-file-selected-message.d.ts +1 -1
  595. package/dist/components/features/files-tab/segmented-toggle.cjs +1 -1
  596. package/dist/components/features/files-tab/segmented-toggle.cjs.map +1 -1
  597. package/dist/components/features/files-tab/segmented-toggle.d.ts +3 -1
  598. package/dist/components/features/files-tab/segmented-toggle.js +17 -14
  599. package/dist/components/features/files-tab/segmented-toggle.js.map +1 -1
  600. package/dist/components/features/files-tab/tree-node.d.ts +1 -1
  601. package/dist/components/features/home/featured-automations/automation-health-indicator.d.ts +11 -0
  602. package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +18 -0
  603. package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +14 -0
  604. package/dist/components/features/home/featured-automations/automation-run-health.d.ts +25 -0
  605. package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +39 -0
  606. package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +22 -0
  607. package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +23 -0
  608. package/dist/components/features/home/featured-automations/home-automation-menu.d.ts +13 -0
  609. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +12 -0
  610. package/dist/components/features/home/featured-automations/pinned-automation-card.d.ts +21 -0
  611. package/dist/components/features/home/featured-automations/pinned-automations-dashboard.d.ts +6 -0
  612. package/dist/components/features/home/featured-automations/running-automations-list.d.ts +6 -0
  613. package/dist/components/features/home/git-branch-dropdown/branch-dropdown-menu.d.ts +1 -1
  614. package/dist/components/features/home/git-branch-dropdown/git-branch-dropdown.d.ts +2 -1
  615. package/dist/components/features/home/git-provider-dropdown/git-provider-dropdown.d.ts +2 -1
  616. package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.d.ts +2 -1
  617. package/dist/components/features/home/home-chat-launcher.d.ts +1 -1
  618. package/dist/components/features/home/home-git-control-bar-preview.d.ts +1 -1
  619. package/dist/components/features/home/home-header/guide-message.d.ts +1 -1
  620. package/dist/components/features/home/home-header/home-header-title.d.ts +1 -1
  621. package/dist/components/features/home/home-header/home-header.d.ts +1 -1
  622. package/dist/components/features/home/llm-not-configured-banner.d.ts +1 -1
  623. package/dist/components/features/home/new-conversation/create-conversation-button.d.ts +1 -1
  624. package/dist/components/features/home/new-conversation/new-conversation.d.ts +1 -1
  625. package/dist/components/features/home/new-conversation.d.ts +1 -1
  626. package/dist/components/features/home/open-launcher-button.d.ts +1 -1
  627. package/dist/components/features/home/open-repository-dialog.d.ts +1 -1
  628. package/dist/components/features/home/open-workspace-dialog.d.ts +1 -1
  629. package/dist/components/features/home/repo-selection-form.d.ts +2 -1
  630. package/dist/components/features/home/shared/clear-button.d.ts +2 -1
  631. package/dist/components/features/home/shared/dropdown-item.d.ts +1 -1
  632. package/dist/components/features/home/shared/empty-state.d.ts +2 -1
  633. package/dist/components/features/home/shared/error-message.d.ts +2 -1
  634. package/dist/components/features/home/shared/generic-dropdown-menu.d.ts +1 -1
  635. package/dist/components/features/home/shared/loading-spinner.d.ts +2 -1
  636. package/dist/components/features/home/shared/toggle-button.d.ts +1 -1
  637. package/dist/components/features/home/tasks/task-card.d.ts +1 -1
  638. package/dist/components/features/home/tasks/task-group.d.ts +1 -1
  639. package/dist/components/features/home/tasks/task-issue-number.d.ts +1 -1
  640. package/dist/components/features/home/tasks/task-item-title.d.ts +1 -1
  641. package/dist/components/features/home/tasks/task-suggestions-skeleton.d.ts +1 -1
  642. package/dist/components/features/home/tasks/task-suggestions.d.ts +1 -1
  643. package/dist/components/features/home/workspace-dropdown/folder-browser-modal.d.ts +2 -1
  644. package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.d.ts +2 -1
  645. package/dist/components/features/home/workspace-dropdown/workspace-dropdown.d.ts +2 -1
  646. package/dist/components/features/home/workspace-selection-form.d.ts +2 -1
  647. package/dist/components/features/images/image-carousel.d.ts +2 -1
  648. package/dist/components/features/images/image-preview.d.ts +1 -1
  649. package/dist/components/features/images/thumbnail.d.ts +1 -1
  650. package/dist/components/features/launch/plugin-launch-modal.d.ts +2 -1
  651. package/dist/components/features/launch/plugin-launch-parameter-input.d.ts +1 -1
  652. package/dist/components/features/launch/plugin-launch-plugin-section.d.ts +1 -1
  653. package/dist/components/features/manifest/manifest-form-field.d.ts +27 -0
  654. package/dist/components/features/manifest/manifest-icons.d.ts +13 -0
  655. package/dist/components/features/manifest/manifest-overview-tiles.d.ts +19 -0
  656. package/dist/components/features/manifest/manifest-prerequisites-step.d.ts +11 -0
  657. package/dist/components/features/manifest/manifest-review-step.d.ts +14 -0
  658. package/dist/components/features/manifest/manifest-setup-dialog.d.ts +14 -0
  659. package/dist/components/features/manifest/manifest-subpage-layout.d.ts +23 -0
  660. package/dist/components/features/markdown/anchor.d.ts +1 -1
  661. package/dist/components/features/markdown/blockquote.d.ts +1 -1
  662. package/dist/components/features/markdown/code.d.ts +1 -1
  663. package/dist/components/features/markdown/headings.d.ts +6 -6
  664. package/dist/components/features/markdown/horizontal-rule.d.ts +1 -1
  665. package/dist/components/features/markdown/list.d.ts +3 -3
  666. package/dist/components/features/markdown/markdown-renderer.d.ts +1 -1
  667. package/dist/components/features/markdown/markdown-table-scroll.d.ts +1 -1
  668. package/dist/components/features/markdown/paragraph.d.ts +1 -1
  669. package/dist/components/features/markdown/plan-components.d.ts +36 -36
  670. package/dist/components/features/markdown/table.d.ts +3 -3
  671. package/dist/components/features/mcp-logo-badge.d.ts +1 -1
  672. package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
  673. package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
  674. package/dist/components/features/mcp-page/custom-server-editor.d.ts +2 -1
  675. package/dist/components/features/mcp-page/custom-server-editor.js +5 -0
  676. package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
  677. package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
  678. package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
  679. package/dist/components/features/mcp-page/install-server-modal.d.ts +2 -1
  680. package/dist/components/features/mcp-page/install-server-modal.js +117 -118
  681. package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
  682. package/dist/components/features/mcp-page/installed-server-card.d.ts +2 -1
  683. package/dist/components/features/mcp-page/installed-servers-section.d.ts +1 -1
  684. package/dist/components/features/mcp-page/marketplace-card.d.ts +1 -1
  685. package/dist/components/features/mcp-page/marketplace-section.d.ts +1 -1
  686. package/dist/components/features/mcp-page/mcp-logo-stack-badge.d.ts +1 -1
  687. package/dist/components/features/mcp-page/mcp-section-filter-dropdown.d.ts +1 -1
  688. package/dist/components/features/mcp-page/mcp-server-health.d.ts +2 -1
  689. package/dist/components/features/mcp-page/mcp-toolbar.d.ts +1 -1
  690. package/dist/components/features/mcp-page/save-as-secret-toggle.d.ts +1 -1
  691. package/dist/components/features/onboarding/onboarding-host.d.ts +1 -1
  692. package/dist/components/features/onboarding/onboarding-modal.d.ts +2 -1
  693. package/dist/components/features/onboarding/onboarding-progress-bar.d.ts +1 -1
  694. package/dist/components/features/onboarding/steps/check-backend-step.d.ts +2 -1
  695. package/dist/components/features/onboarding/steps/choose-agent-step.d.ts +3 -2
  696. package/dist/components/features/onboarding/steps/say-hello-step.d.ts +2 -1
  697. package/dist/components/features/onboarding/steps/setup-acp-secrets-step.d.ts +2 -1
  698. package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +2 -1
  699. package/dist/components/features/plugins/add-plugin-modal.d.ts +2 -1
  700. package/dist/components/features/plugins/plugin-card.d.ts +2 -1
  701. package/dist/components/features/plugins/plugin-detail-modal.d.ts +1 -1
  702. package/dist/components/features/plugins/plugin-files-section.d.ts +2 -1
  703. package/dist/components/features/plugins/plugin-picker-card.d.ts +1 -1
  704. package/dist/components/features/plugins/plugin-picker-modal.d.ts +1 -1
  705. package/dist/components/features/plugins/plugin-picker-trigger.d.ts +1 -1
  706. package/dist/components/features/plugins/plugin-picker.d.ts +1 -1
  707. package/dist/components/features/plugins/plugins-toolbar.d.ts +1 -1
  708. package/dist/components/features/settings/acp-auth-status-banner.d.ts +1 -1
  709. package/dist/components/features/settings/acp-conflict-warnings.d.ts +2 -1
  710. package/dist/components/features/settings/acp-credentials-section.d.ts +1 -1
  711. package/dist/components/features/settings/acp-secret-field.d.ts +2 -1
  712. package/dist/components/features/settings/agent-canvas-update-card.d.ts +1 -1
  713. package/dist/components/features/settings/agent-profiles/agent-profile-actions-menu.d.ts +1 -1
  714. package/dist/components/features/settings/agent-profiles/agent-profile-row.d.ts +1 -1
  715. package/dist/components/features/settings/agent-profiles/agent-profiles-body.d.ts +1 -1
  716. package/dist/components/features/settings/agent-profiles/agent-profiles-local-view.d.ts +1 -1
  717. package/dist/components/features/settings/agent-profiles/agent-profiles-manager.d.ts +1 -1
  718. package/dist/components/features/settings/agent-profiles/delete-agent-profile-modal.d.ts +1 -1
  719. package/dist/components/features/settings/agent-server-onboarding.d.ts +2 -1
  720. package/dist/components/features/settings/api-key-modal-base.d.ts +1 -1
  721. package/dist/components/features/settings/app-settings/app-settings-inputs-skeleton.d.ts +1 -1
  722. package/dist/components/features/settings/app-settings/language-input.d.ts +1 -1
  723. package/dist/components/features/settings/app-settings/theme-input.d.ts +2 -1
  724. package/dist/components/features/settings/backend-synced-settings-badge.d.ts +1 -1
  725. package/dist/components/features/settings/banner-message.d.ts +1 -1
  726. package/dist/components/features/settings/cloud-settings-link.d.ts +1 -1
  727. package/dist/components/features/settings/input-skeleton.d.ts +1 -1
  728. package/dist/components/features/settings/integrations-settings-link.d.ts +1 -1
  729. package/dist/components/features/settings/key-status-icon.d.ts +1 -1
  730. package/dist/components/features/settings/llm-profiles/delete-profile-modal.d.ts +1 -1
  731. package/dist/components/features/settings/llm-profiles/llm-profiles-manager.d.ts +1 -1
  732. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.d.ts +2 -1
  733. package/dist/components/features/settings/llm-profiles/profile-actions-menu-item.d.ts +1 -1
  734. package/dist/components/features/settings/llm-profiles/profile-actions-menu.d.ts +1 -1
  735. package/dist/components/features/settings/llm-profiles/profile-row.d.ts +1 -1
  736. package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +1 -1
  737. package/dist/components/features/settings/llm-profiles/rename-profile-modal.d.ts +1 -1
  738. package/dist/components/features/settings/llm-settings/llm-settings-inputs-skeleton.d.ts +1 -1
  739. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.d.ts +2 -1
  740. package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +1 -1
  741. package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
  742. package/dist/components/features/settings/mcp-settings/mcp-server-form.d.ts +2 -1
  743. package/dist/components/features/settings/mcp-settings/mcp-server-form.js +2 -1
  744. package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
  745. package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +1 -1
  746. package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +1 -1
  747. package/dist/components/features/settings/mobile-header.d.ts +1 -1
  748. package/dist/components/features/settings/optional-tag.d.ts +1 -1
  749. package/dist/components/features/settings/sdk-settings/field-help.d.ts +1 -1
  750. package/dist/components/features/settings/sdk-settings/schema-field.d.ts +2 -1
  751. package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +1 -1
  752. package/dist/components/features/settings/sdk-settings/view-toggle.d.ts +1 -1
  753. package/dist/components/features/settings/secrets-settings/secret-form.d.ts +2 -1
  754. package/dist/components/features/settings/secrets-settings/secret-list-item.d.ts +2 -2
  755. package/dist/components/features/settings/settings-desktop-sidebar.d.ts +1 -1
  756. package/dist/components/features/settings/settings-dropdown-input.d.ts +1 -1
  757. package/dist/components/features/settings/settings-input.cjs +1 -1
  758. package/dist/components/features/settings/settings-input.cjs.map +1 -1
  759. package/dist/components/features/settings/settings-input.d.ts +6 -0
  760. package/dist/components/features/settings/settings-input.js +13 -8
  761. package/dist/components/features/settings/settings-input.js.map +1 -1
  762. package/dist/components/features/settings/settings-layout.d.ts +1 -1
  763. package/dist/components/features/settings/settings-mobile-drawer.d.ts +1 -1
  764. package/dist/components/features/settings/settings-mobile-hub.d.ts +1 -1
  765. package/dist/components/features/settings/settings-nav-divider.d.ts +1 -1
  766. package/dist/components/features/settings/settings-nav-header.d.ts +1 -1
  767. package/dist/components/features/settings/settings-nav-link.d.ts +1 -1
  768. package/dist/components/features/settings/settings-navigation.d.ts +1 -1
  769. package/dist/components/features/settings/settings-switch.d.ts +1 -1
  770. package/dist/components/features/settings/subtext-skeleton.d.ts +1 -1
  771. package/dist/components/features/settings/switch-skeleton.d.ts +1 -1
  772. package/dist/components/features/settings/upgrade-banner.d.ts +1 -1
  773. package/dist/components/features/settings/upgrade-button.d.ts +1 -1
  774. package/dist/components/features/sidebar/avatar.d.ts +1 -1
  775. package/dist/components/features/sidebar/sidebar-collapsed-icon-slot.d.ts +1 -1
  776. package/dist/components/features/sidebar/sidebar-conversation-list.d.ts +1 -1
  777. package/dist/components/features/sidebar/sidebar-mobile-menu-bar.d.ts +1 -1
  778. package/dist/components/features/sidebar/sidebar-mobile-menu-toggle.d.ts +1 -1
  779. package/dist/components/features/sidebar/sidebar-mobile-nav-context.d.ts +1 -1
  780. package/dist/components/features/sidebar/sidebar-nav-link.d.ts +1 -1
  781. package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
  782. package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
  783. package/dist/components/features/sidebar/sidebar-rail-body.d.ts +1 -1
  784. package/dist/components/features/sidebar/sidebar-rail-body.js +124 -123
  785. package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
  786. package/dist/components/features/sidebar/sidebar.d.ts +2 -1
  787. package/dist/components/features/sidebar/user-avatar.d.ts +1 -1
  788. package/dist/components/features/skills/add-skill-modal.d.ts +2 -1
  789. package/dist/components/features/skills/extensions-mobile-hub.d.ts +1 -1
  790. package/dist/components/features/skills/extensions-navigation.d.ts +1 -1
  791. package/dist/components/features/skills/skill-card-pill-row.d.ts +1 -1
  792. package/dist/components/features/skills/skill-card.d.ts +2 -1
  793. package/dist/components/features/skills/skill-detail-modal.d.ts +2 -1
  794. package/dist/components/features/skills/skill-facet-rail.d.ts +8 -0
  795. package/dist/components/features/skills/skill-facet-row.d.ts +13 -0
  796. package/dist/components/features/skills/skill-filter.d.ts +34 -0
  797. package/dist/components/features/skills/skill-filters-modal.d.ts +10 -0
  798. package/dist/components/features/skills/skill-icon-badge.d.ts +1 -1
  799. package/dist/components/features/skills/skill-type-badge.d.ts +1 -1
  800. package/dist/components/features/skills/skills-toolbar.d.ts +3 -4
  801. package/dist/components/features/suggestions/suggestion-item.d.ts +1 -1
  802. package/dist/components/features/suggestions/suggestions.d.ts +1 -1
  803. package/dist/components/features/terminal/empty-terminal-message.d.ts +1 -1
  804. package/dist/components/features/terminal/terminal.d.ts +1 -1
  805. package/dist/components/features/tips/random-tip.d.ts +2 -1
  806. package/dist/components/providers/agent-server-ui-providers.d.ts +1 -1
  807. package/dist/components/providers/agent-server-ui-root.d.ts +1 -1
  808. package/dist/components/providers/telemetry-provider.d.ts +1 -1
  809. package/dist/components/shared/action-tooltip.d.ts +1 -1
  810. package/dist/components/shared/agent-brand-icon.d.ts +1 -1
  811. package/dist/components/shared/badge.d.ts +1 -1
  812. package/dist/components/shared/buttons/back-nav-button-content.d.ts +1 -1
  813. package/dist/components/shared/buttons/circle-plus-check-toggle.d.ts +3 -2
  814. package/dist/components/shared/buttons/conversation-confirmation-buttons.d.ts +1 -1
  815. package/dist/components/shared/buttons/copy-to-clipboard-button.d.ts +1 -1
  816. package/dist/components/shared/buttons/copyable-content-wrapper.d.ts +1 -1
  817. package/dist/components/shared/buttons/modal-button.d.ts +1 -1
  818. package/dist/components/shared/buttons/openhands-logo-button.d.ts +1 -1
  819. package/dist/components/shared/buttons/remove-button.d.ts +1 -1
  820. package/dist/components/shared/buttons/scroll-to-bottom-button.d.ts +1 -1
  821. package/dist/components/shared/buttons/styled-tooltip.d.ts +1 -1
  822. package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
  823. package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
  824. package/dist/components/shared/filters/enum-filter-dropdown.d.ts +6 -2
  825. package/dist/components/shared/filters/enum-filter-dropdown.js +13 -13
  826. package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
  827. package/dist/components/shared/git-provider-icon.d.ts +1 -1
  828. package/dist/components/shared/hook-execution-event-message.d.ts +2 -1
  829. package/dist/components/shared/loading-spinner.d.ts +1 -1
  830. package/dist/components/shared/modals/confirmation-modal.d.ts +1 -1
  831. package/dist/components/shared/modals/confirmation-modals/base-modal.d.ts +3 -3
  832. package/dist/components/shared/modals/confirmation-modals/danger-modal.d.ts +1 -1
  833. package/dist/components/shared/modals/modal-body.d.ts +1 -1
  834. package/dist/components/shared/modals/modal-close-button.d.ts +1 -1
  835. package/dist/components/shared/modals/settings/model-selector.d.ts +2 -1
  836. package/dist/components/shared/modals/settings/settings-form.d.ts +2 -1
  837. package/dist/components/shared/modals/settings/settings-modal.d.ts +1 -1
  838. package/dist/components/shared/navigation-link.cjs +1 -1
  839. package/dist/components/shared/navigation-link.cjs.map +1 -1
  840. package/dist/components/shared/navigation-link.js +11 -7
  841. package/dist/components/shared/navigation-link.js.map +1 -1
  842. package/dist/components/shared/risk-alert.d.ts +1 -1
  843. package/dist/components/shared/text-shimmer.d.ts +1 -1
  844. package/dist/components/ui/resize-handle.d.ts +1 -1
  845. package/dist/config/defaults.cjs +1 -1
  846. package/dist/config/defaults.cjs.map +1 -1
  847. package/dist/config/defaults.js +3 -3
  848. package/dist/config/defaults.js.map +1 -1
  849. package/dist/context/navigation-context.d.ts +1 -1
  850. package/dist/context/scroll-context.d.ts +1 -1
  851. package/dist/contexts/active-backend-context.d.ts +1 -1
  852. package/dist/contexts/conversation-websocket-context.d.ts +1 -1
  853. package/dist/contexts/settings-section-header-context.d.ts +1 -1
  854. package/dist/contexts/websocket-provider-wrapper.d.ts +1 -1
  855. package/dist/fixtures/home-automations-demo.d.ts +19 -0
  856. package/dist/hooks/mutation/use-add-mcp-server.cjs +1 -1
  857. package/dist/hooks/mutation/use-add-mcp-server.cjs.map +1 -1
  858. package/dist/hooks/mutation/use-add-mcp-server.js +10 -14
  859. package/dist/hooks/mutation/use-add-mcp-server.js.map +1 -1
  860. package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
  861. package/dist/hooks/mutation/use-delete-mcp-server.cjs.map +1 -1
  862. package/dist/hooks/mutation/use-delete-mcp-server.d.ts +2 -7
  863. package/dist/hooks/mutation/use-delete-mcp-server.js +8 -34
  864. package/dist/hooks/mutation/use-delete-mcp-server.js.map +1 -1
  865. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  866. package/dist/hooks/mutation/use-save-settings.cjs.map +1 -1
  867. package/dist/hooks/mutation/use-save-settings.js +8 -4
  868. package/dist/hooks/mutation/use-save-settings.js.map +1 -1
  869. package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
  870. package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
  871. package/dist/hooks/mutation/use-update-mcp-server.d.ts +1 -1
  872. package/dist/hooks/mutation/use-update-mcp-server.js +31 -16
  873. package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
  874. package/dist/hooks/query/query-keys.cjs.map +1 -1
  875. package/dist/hooks/query/query-keys.d.ts +4 -0
  876. package/dist/hooks/query/query-keys.js.map +1 -1
  877. package/dist/hooks/query/use-active-conversation.d.ts +1 -1
  878. package/dist/hooks/query/use-agent-profiles.d.ts +1 -1
  879. package/dist/hooks/query/use-app-installations.d.ts +1 -1
  880. package/dist/hooks/query/use-automation-detail.d.ts +2 -2
  881. package/dist/hooks/query/use-automation-health.d.ts +2 -0
  882. package/dist/hooks/query/use-automations.d.ts +5 -1
  883. package/dist/hooks/query/use-bash-command-logs.d.ts +1 -1
  884. package/dist/hooks/query/use-cloud-sandbox.d.ts +1 -1
  885. package/dist/hooks/query/use-commit-changes.d.ts +1 -1
  886. package/dist/hooks/query/use-config.d.ts +1 -1
  887. package/dist/hooks/query/use-conversation-history.d.ts +1 -1
  888. package/dist/hooks/query/use-conversation-hooks.d.ts +1 -1
  889. package/dist/hooks/query/use-conversation-skills.d.ts +1 -1
  890. package/dist/hooks/query/use-get-secrets.d.ts +1 -1
  891. package/dist/hooks/query/use-home-automations.d.ts +20 -0
  892. package/dist/hooks/query/use-latest-automation-runs.d.ts +19 -0
  893. package/dist/hooks/query/use-llm-profiles.d.ts +1 -1
  894. package/dist/hooks/query/use-llm-subscription-models.d.ts +1 -1
  895. package/dist/hooks/query/use-llm-subscription-status.d.ts +1 -1
  896. package/dist/hooks/query/use-local-git-info.d.ts +1 -1
  897. package/dist/hooks/query/use-local-workspaces.d.ts +1 -1
  898. package/dist/hooks/query/use-manifest-capabilities.d.ts +23 -0
  899. package/dist/hooks/query/use-manifest-prerequisites.d.ts +24 -0
  900. package/dist/hooks/query/use-plugin-file-content.d.ts +1 -1
  901. package/dist/hooks/query/use-plugins-marketplace.d.ts +1 -1
  902. package/dist/hooks/query/use-provider-models.d.ts +1 -1
  903. package/dist/hooks/query/use-search-branches.d.ts +1 -1
  904. package/dist/hooks/query/use-search-providers.d.ts +1 -1
  905. package/dist/hooks/query/use-search-repositories.d.ts +1 -1
  906. package/dist/hooks/query/use-search-subdirs.d.ts +2 -2
  907. package/dist/hooks/query/use-settings.d.ts +2 -2
  908. package/dist/hooks/query/use-skills.d.ts +1 -1
  909. package/dist/hooks/query/use-start-tasks.d.ts +1 -1
  910. package/dist/hooks/query/use-sub-conversation-task-polling.d.ts +1 -1
  911. package/dist/hooks/query/use-sub-conversations.d.ts +1 -1
  912. package/dist/hooks/query/use-suggested-tasks.d.ts +1 -1
  913. package/dist/hooks/query/use-task-polling.d.ts +2 -2
  914. package/dist/hooks/query/use-unified-get-git-changes.d.ts +1 -1
  915. package/dist/hooks/query/use-unified-git-diff.d.ts +1 -1
  916. package/dist/hooks/query/use-user-conversation.d.ts +1 -1
  917. package/dist/hooks/query/use-workspace-file-content.d.ts +1 -1
  918. package/dist/hooks/use-backend-scoped-path.cjs +2 -0
  919. package/dist/hooks/use-backend-scoped-path.cjs.map +1 -0
  920. package/dist/hooks/use-backend-scoped-path.d.ts +10 -0
  921. package/dist/hooks/use-backend-scoped-path.js +13 -0
  922. package/dist/hooks/use-backend-scoped-path.js.map +1 -0
  923. package/dist/hooks/use-home-automation-actions.d.ts +23 -0
  924. package/dist/hooks/use-home-pinned-automations.d.ts +26 -0
  925. package/dist/hooks/use-llm-configured.cjs +1 -1
  926. package/dist/hooks/use-llm-configured.cjs.map +1 -1
  927. package/dist/hooks/use-llm-configured.js +2 -1
  928. package/dist/hooks/use-llm-configured.js.map +1 -1
  929. package/dist/hooks/use-manifest-preflight.d.ts +18 -0
  930. package/dist/hooks/use-tracking.cjs +1 -1
  931. package/dist/hooks/use-tracking.cjs.map +1 -1
  932. package/dist/hooks/use-tracking.d.ts +18 -0
  933. package/dist/hooks/use-tracking.js +25 -1
  934. package/dist/hooks/use-tracking.js.map +1 -1
  935. package/dist/i18n/declaration.cjs +1 -1
  936. package/dist/i18n/declaration.cjs.map +1 -1
  937. package/dist/i18n/declaration.d.ts +103 -2
  938. package/dist/i18n/declaration.js +1 -1
  939. package/dist/i18n/declaration.js.map +1 -1
  940. package/dist/i18n/translation.cjs +2 -2
  941. package/dist/i18n/translation.cjs.map +1 -1
  942. package/dist/i18n/translation.js +1780 -63
  943. package/dist/i18n/translation.js.map +1 -1
  944. package/dist/icons/code-pill.d.ts +1 -1
  945. package/dist/icons/external-link.cjs +2 -0
  946. package/dist/icons/external-link.cjs.map +1 -0
  947. package/dist/icons/external-link.js +22 -0
  948. package/dist/icons/external-link.js.map +1 -0
  949. package/dist/icons/server.cjs +2 -0
  950. package/dist/icons/server.cjs.map +1 -0
  951. package/dist/icons/server.js +17 -0
  952. package/dist/icons/server.js.map +1 -0
  953. package/dist/locales/ar/openhands.json +106 -5
  954. package/dist/locales/ca/openhands.json +106 -5
  955. package/dist/locales/de/openhands.json +106 -5
  956. package/dist/locales/en/openhands.json +107 -6
  957. package/dist/locales/es/openhands.json +106 -5
  958. package/dist/locales/fr/openhands.json +106 -5
  959. package/dist/locales/it/openhands.json +106 -5
  960. package/dist/locales/ja/openhands.json +106 -5
  961. package/dist/locales/ko-KR/openhands.json +106 -5
  962. package/dist/locales/no/openhands.json +106 -5
  963. package/dist/locales/pt/openhands.json +106 -5
  964. package/dist/locales/tr/openhands.json +106 -5
  965. package/dist/locales/uk/openhands.json +106 -5
  966. package/dist/locales/zh-CN/openhands.json +106 -5
  967. package/dist/locales/zh-TW/openhands.json +106 -5
  968. package/dist/manifests/automation-insights.d.ts +64 -0
  969. package/dist/manifests/automation-interface.cjs +2 -0
  970. package/dist/manifests/automation-interface.cjs.map +1 -0
  971. package/dist/manifests/automation-interface.d.ts +76 -0
  972. package/dist/manifests/automation-interface.js +82 -0
  973. package/dist/manifests/automation-interface.js.map +1 -0
  974. package/dist/manifests/automation-setup.cjs +2 -0
  975. package/dist/manifests/automation-setup.cjs.map +1 -0
  976. package/dist/manifests/automation-setup.d.ts +52 -0
  977. package/dist/manifests/automation-setup.js +8 -0
  978. package/dist/manifests/automation-setup.js.map +1 -0
  979. package/dist/manifests/interface-validation.cjs +2 -0
  980. package/dist/manifests/interface-validation.cjs.map +1 -0
  981. package/dist/manifests/interface-validation.d.ts +27 -0
  982. package/dist/manifests/interface-validation.js +360 -0
  983. package/dist/manifests/interface-validation.js.map +1 -0
  984. package/dist/manifests/manifest-actions.d.ts +15 -0
  985. package/dist/manifests/manifest-capabilities.d.ts +25 -0
  986. package/dist/manifests/manifest-error-map.d.ts +40 -0
  987. package/dist/manifests/manifest-local-validation.d.ts +56 -0
  988. package/dist/manifests/manifest-registry.cjs +2 -0
  989. package/dist/manifests/manifest-registry.cjs.map +1 -0
  990. package/dist/manifests/manifest-registry.d.ts +15 -0
  991. package/dist/manifests/manifest-registry.js +26 -0
  992. package/dist/manifests/manifest-registry.js.map +1 -0
  993. package/dist/manifests/manifest-sources.cjs +2 -0
  994. package/dist/manifests/manifest-sources.cjs.map +1 -0
  995. package/dist/manifests/manifest-sources.d.ts +15 -0
  996. package/dist/manifests/manifest-sources.js +8 -0
  997. package/dist/manifests/manifest-sources.js.map +1 -0
  998. package/dist/manifests/manifest-template.d.ts +20 -0
  999. package/dist/manifests/manifest-validation.cjs +2 -0
  1000. package/dist/manifests/manifest-validation.cjs.map +1 -0
  1001. package/dist/manifests/manifest-validation.d.ts +30 -0
  1002. package/dist/manifests/manifest-validation.js +145 -0
  1003. package/dist/manifests/manifest-validation.js.map +1 -0
  1004. package/dist/manifests/types.cjs +2 -0
  1005. package/dist/manifests/types.cjs.map +1 -0
  1006. package/dist/manifests/types.d.ts +355 -0
  1007. package/dist/manifests/types.js +39 -0
  1008. package/dist/manifests/types.js.map +1 -0
  1009. package/dist/mockServiceWorker.js +21 -9
  1010. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +9 -0
  1011. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -0
  1012. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +75 -0
  1013. package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -0
  1014. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs +9 -0
  1015. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs.map +1 -0
  1016. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js +78 -0
  1017. package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js.map +1 -0
  1018. package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.cjs +17 -0
  1019. package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.cjs.map +1 -0
  1020. package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.js +89 -0
  1021. package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.js.map +1 -0
  1022. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs +10 -0
  1023. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs.map +1 -0
  1024. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js +17 -0
  1025. package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js.map +1 -0
  1026. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.cjs +9 -0
  1027. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.cjs.map +1 -0
  1028. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.js +15 -0
  1029. package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.js.map +1 -0
  1030. package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.cjs +9 -0
  1031. package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.cjs.map +1 -0
  1032. package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.js +18 -0
  1033. package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.js.map +1 -0
  1034. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.cjs +9 -0
  1035. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.cjs.map +1 -0
  1036. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.js +14 -0
  1037. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.js.map +1 -0
  1038. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.cjs +9 -0
  1039. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.cjs.map +1 -0
  1040. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.js +14 -0
  1041. package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.js.map +1 -0
  1042. package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs +9 -0
  1043. package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs.map +1 -0
  1044. package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js +74 -0
  1045. package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js.map +1 -0
  1046. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +2 -0
  1047. package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -0
  1048. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +25 -0
  1049. package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -0
  1050. package/dist/node_modules/@openhands/extensions/automations/index.cjs +2 -0
  1051. package/dist/node_modules/@openhands/extensions/automations/index.cjs.map +1 -0
  1052. package/dist/node_modules/@openhands/extensions/automations/index.js +18 -0
  1053. package/dist/node_modules/@openhands/extensions/automations/index.js.map +1 -0
  1054. package/dist/node_modules/@openhands/extensions/automations/interface.cjs +2 -0
  1055. package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -0
  1056. package/dist/node_modules/@openhands/extensions/automations/interface.js +210 -0
  1057. package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -0
  1058. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs +1 -1
  1059. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs.map +1 -1
  1060. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js +3 -3
  1061. package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js.map +1 -1
  1062. package/dist/node_modules/@openhands/extensions/skills/index.cjs +174 -53
  1063. package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
  1064. package/dist/node_modules/@openhands/extensions/skills/index.js +115 -53
  1065. package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
  1066. package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs +1 -1
  1067. package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs.map +1 -1
  1068. package/dist/node_modules/@tanstack/query-core/build/modern/utils.js +12 -1
  1069. package/dist/node_modules/@tanstack/query-core/build/modern/utils.js.map +1 -1
  1070. package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs +1 -1
  1071. package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs.map +1 -1
  1072. package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js +14 -12
  1073. package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js.map +1 -1
  1074. package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs +2 -0
  1075. package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs.map +1 -0
  1076. package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js +177 -0
  1077. package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js.map +1 -0
  1078. package/dist/node_modules/i18next/dist/esm/i18next.cjs +1 -1
  1079. package/dist/node_modules/i18next/dist/esm/i18next.cjs.map +1 -1
  1080. package/dist/node_modules/i18next/dist/esm/i18next.js +31 -24
  1081. package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
  1082. package/dist/node_modules/lucide-react/dist/esm/icons/monitor.cjs +2 -0
  1083. package/dist/node_modules/lucide-react/dist/esm/icons/monitor.cjs.map +1 -0
  1084. package/dist/node_modules/lucide-react/dist/esm/icons/monitor.js +29 -0
  1085. package/dist/node_modules/lucide-react/dist/esm/icons/monitor.js.map +1 -0
  1086. package/dist/node_modules/posthog-js/dist/module.cjs +2 -2
  1087. package/dist/node_modules/posthog-js/dist/module.cjs.map +1 -1
  1088. package/dist/node_modules/posthog-js/dist/module.js +2055 -1929
  1089. package/dist/node_modules/posthog-js/dist/module.js.map +1 -1
  1090. package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs +1 -1
  1091. package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs.map +1 -1
  1092. package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js +43 -62
  1093. package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js.map +1 -1
  1094. package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs +1 -1
  1095. package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs.map +1 -1
  1096. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +12 -6
  1097. package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
  1098. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +1 -1
  1099. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -1
  1100. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +352 -310
  1101. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  1102. package/dist/package.cjs +1 -1
  1103. package/dist/package.cjs.map +1 -1
  1104. package/dist/package.js +34 -33
  1105. package/dist/package.js.map +1 -1
  1106. package/dist/routes/agent-settings.d.ts +3 -2
  1107. package/dist/routes/app-settings.d.ts +2 -1
  1108. package/dist/routes/browser-tab.d.ts +1 -1
  1109. package/dist/routes/changes-tab.d.ts +2 -1
  1110. package/dist/routes/commits-tab.d.ts +1 -1
  1111. package/dist/routes/conversation.d.ts +2 -1
  1112. package/dist/routes/files-tab.d.ts +1 -1
  1113. package/dist/routes/llm-settings.d.ts +3 -2
  1114. package/dist/routes/mcp.cjs +1 -1
  1115. package/dist/routes/mcp.cjs.map +1 -1
  1116. package/dist/routes/mcp.d.ts +2 -1
  1117. package/dist/routes/mcp.js +1 -1
  1118. package/dist/routes/mcp.js.map +1 -1
  1119. package/dist/routes/planner-tab.d.ts +2 -1
  1120. package/dist/routes/secrets-settings.d.ts +2 -1
  1121. package/dist/routes/task-list-tab.d.ts +1 -1
  1122. package/dist/services/settings.cjs +1 -1
  1123. package/dist/services/settings.cjs.map +1 -1
  1124. package/dist/services/settings.js +3 -7
  1125. package/dist/services/settings.js.map +1 -1
  1126. package/dist/types/agent-server/core/events/conversation-state-event.d.ts +2 -19
  1127. package/dist/types/agent-server/core/events/observation-event.d.ts +2 -18
  1128. package/dist/types/automation.d.ts +23 -4
  1129. package/dist/types/mcp-auth.cjs.map +1 -1
  1130. package/dist/types/mcp-auth.d.ts +5 -41
  1131. package/dist/types/mcp-auth.js.map +1 -1
  1132. package/dist/types/mcp-server.d.ts +17 -32
  1133. package/dist/types/settings.d.ts +8 -28
  1134. package/dist/ui/card-title.d.ts +1 -1
  1135. package/dist/ui/card.d.ts +1 -1
  1136. package/dist/ui/combobox-caret.d.ts +3 -3
  1137. package/dist/ui/context-menu.cjs +1 -1
  1138. package/dist/ui/context-menu.cjs.map +1 -1
  1139. package/dist/ui/context-menu.d.ts +3 -2
  1140. package/dist/ui/context-menu.js +10 -9
  1141. package/dist/ui/context-menu.js.map +1 -1
  1142. package/dist/ui/divider.d.ts +1 -1
  1143. package/dist/ui/dropdown/clear-button.d.ts +1 -1
  1144. package/dist/ui/dropdown/dropdown-input.d.ts +1 -1
  1145. package/dist/ui/dropdown/dropdown-menu.d.ts +1 -1
  1146. package/dist/ui/dropdown/dropdown.d.ts +1 -1
  1147. package/dist/ui/dropdown/loading-spinner.d.ts +1 -1
  1148. package/dist/ui/dropdown/toggle-button.d.ts +1 -1
  1149. package/dist/ui/help-link.d.ts +1 -1
  1150. package/dist/ui/pre.d.ts +1 -1
  1151. package/dist/ui/toggle-switch.d.ts +2 -2
  1152. package/dist/ui/typography.d.ts +7 -7
  1153. package/dist/utils/api-error-message.d.ts +6 -2
  1154. package/dist/utils/automation-activity-log-export.d.ts +17 -0
  1155. package/dist/utils/automation-catalog.cjs +2 -0
  1156. package/dist/utils/automation-catalog.cjs.map +1 -0
  1157. package/dist/utils/automation-catalog.d.ts +28 -0
  1158. package/dist/utils/automation-catalog.js +5 -0
  1159. package/dist/utils/automation-catalog.js.map +1 -0
  1160. package/dist/utils/automation-timeout.d.ts +5 -6
  1161. package/dist/utils/custom-toast-handlers.d.ts +2 -2
  1162. package/dist/utils/format-relative-time.d.ts +3 -0
  1163. package/dist/utils/mcp-config.cjs +1 -1
  1164. package/dist/utils/mcp-config.cjs.map +1 -1
  1165. package/dist/utils/mcp-config.d.ts +12 -29
  1166. package/dist/utils/mcp-config.js +161 -143
  1167. package/dist/utils/mcp-config.js.map +1 -1
  1168. package/dist/utils/mcp-installed-servers.cjs +1 -1
  1169. package/dist/utils/mcp-installed-servers.cjs.map +1 -1
  1170. package/dist/utils/mcp-installed-servers.d.ts +2 -2
  1171. package/dist/utils/mcp-installed-servers.js +21 -32
  1172. package/dist/utils/mcp-installed-servers.js.map +1 -1
  1173. package/dist/utils/mcp-server-health-key.cjs.map +1 -1
  1174. package/dist/utils/mcp-server-health-key.d.ts +2 -4
  1175. package/dist/utils/mcp-server-health-key.js.map +1 -1
  1176. package/dist/utils/responder-deployment.d.ts +5 -1
  1177. package/dist/utils/settings-like-page-layout-classes.cjs +1 -1
  1178. package/dist/utils/settings-like-page-layout-classes.cjs.map +1 -1
  1179. package/dist/utils/settings-like-page-layout-classes.d.ts +6 -2
  1180. package/dist/utils/settings-like-page-layout-classes.js +1 -1
  1181. package/dist/utils/settings-like-page-layout-classes.js.map +1 -1
  1182. package/dist/utils/skill-category.d.ts +12 -0
  1183. package/dist/utils/transcript-export/index.cjs +5 -5
  1184. package/dist/utils/transcript-export/index.js +12 -12
  1185. package/package.json +36 -33
  1186. package/scripts/check-sdk-version-sync.mjs +6 -6
  1187. package/scripts/check-translation-completeness.cjs +1 -0
  1188. package/scripts/dev-safe.mjs +17 -12
  1189. package/scripts/dev-static.mjs +17 -0
  1190. package/scripts/dev-with-automation.mjs +15 -16
  1191. package/scripts/ingress.mjs +22 -0
  1192. package/scripts/proxy-utils.mjs +157 -2
  1193. package/scripts/runtime-services-info.mjs +6 -6
  1194. package/scripts/static-build.mjs +0 -7
  1195. package/scripts/static-server.mjs +10 -0
  1196. package/build/assets/Trans-B7lYw4uD.js +0 -1
  1197. package/build/assets/active-backend-context-mY7Gff5c.js +0 -2
  1198. package/build/assets/agent-context-settings-BTUmWEzL.js +0 -1
  1199. package/build/assets/agent-profiles-settings-Ilqid_R5.js +0 -1
  1200. package/build/assets/agent-server-conversation-service.api-C_7YnjzP.js +0 -41
  1201. package/build/assets/agent-settings-CxfT4ksO.js +0 -1
  1202. package/build/assets/alert-banner-eRyIwDyU.js +0 -1
  1203. package/build/assets/automation-BGP_I1RR.js +0 -1
  1204. package/build/assets/automation-detail-nEflClmc.js +0 -2
  1205. package/build/assets/automation-export-BO_kfqC8.js +0 -2
  1206. package/build/assets/automations-list-BYncC7gv.js +0 -1
  1207. package/build/assets/backend-form-modal-CKrBF80P.js +0 -1
  1208. package/build/assets/browser-3QjrEr1D.js +0 -6
  1209. package/build/assets/check-CrxQfJZ2.js +0 -1
  1210. package/build/assets/chevron-down-D_LsyTA7.js +0 -1
  1211. package/build/assets/circle-check-DZn9HkLE.js +0 -1
  1212. package/build/assets/cloud-funnel-analytics-NlmDoeo2.js +0 -1
  1213. package/build/assets/command-menu-CvLPs7dg.js +0 -1
  1214. package/build/assets/condenser-settings-C4Y9CzQV.js +0 -1
  1215. package/build/assets/context-menu-list-item-FGaafXGh.js +0 -1
  1216. package/build/assets/conversation-D_ORtpKC.js +0 -1
  1217. package/build/assets/conversation-Dpc5nmGi.js +0 -90
  1218. package/build/assets/conversation-panel-D_ORtpKC.js +0 -1
  1219. package/build/assets/conversation-state-store-CGRQemtx.js +0 -1
  1220. package/build/assets/entry.client-BO2KQj0y.js +0 -2
  1221. package/build/assets/enum-filter-dropdown-DSqPZnsD.js +0 -1
  1222. package/build/assets/files-tab-4c9HFSLo.js +0 -1
  1223. package/build/assets/format-time-delta-DICE64sz.js +0 -1
  1224. package/build/assets/git-provider-icon-0PqmIS_S.js +0 -1
  1225. package/build/assets/home-D9JsyEmE.js +0 -1
  1226. package/build/assets/home-TFhnmZLx.js +0 -1
  1227. package/build/assets/index-home-D9JsyEmE.js +0 -1
  1228. package/build/assets/install-server-modal-BgGRnqA0.js +0 -1
  1229. package/build/assets/llm-not-configured-banner-Y4W9-sar.js +0 -27
  1230. package/build/assets/llm-settings-nPwv7hKu.js +0 -1
  1231. package/build/assets/loader-circle-CGD6-Vak.js +0 -1
  1232. package/build/assets/manifest-1cf33a7b.js +0 -1
  1233. package/build/assets/markdown-renderer-U40HF0Ak.js +0 -8
  1234. package/build/assets/mcp-xDMaHzOw.js +0 -9
  1235. package/build/assets/messages-CdNfZPgd.js +0 -40
  1236. package/build/assets/navigation-link-Bxmn-pCs.js +0 -1
  1237. package/build/assets/onboarding-DWuFieEA.js +0 -1
  1238. package/build/assets/onboarding-modal-C8m72Dpb.js +0 -1
  1239. package/build/assets/plus-CTGLo3aa.js +0 -1
  1240. package/build/assets/recommended-automations-launcher-Dru1yN46.js +0 -58
  1241. package/build/assets/root-B5JXKp1P.css +0 -1
  1242. package/build/assets/root-DOLLQteU.js +0 -2
  1243. package/build/assets/root-layout-xmylWoew.js +0 -3
  1244. package/build/assets/search-BrpWXWUi.js +0 -1
  1245. package/build/assets/segmented-toggle-CZKOdIly.js +0 -1
  1246. package/build/assets/settings-Chfn5xTD.js +0 -1
  1247. package/build/assets/settings-input-BEaTCem1.js +0 -1
  1248. package/build/assets/settings-like-page-layout-classes-DyxyJ0k4.js +0 -1
  1249. package/build/assets/settings-service.api-CTJRrvMu.js +0 -1
  1250. package/build/assets/shared-conversation-BvWtTwES.js +0 -1
  1251. package/build/assets/sidebar-mobile-menu-toggle-xiKoUfGa.js +0 -1
  1252. package/build/assets/skills-settings-pUxMr6WZ.js +0 -2
  1253. package/build/assets/use-agent-profiles-DmT9zxAN.js +0 -1
  1254. package/build/assets/use-config-C959QcRC.js +0 -1
  1255. package/build/assets/use-is-authed-BsS4XwSL.js +0 -1
  1256. package/build/assets/use-llm-profiles-CdaxVpyY.js +0 -1
  1257. package/build/assets/use-save-agent-profile-DGJ3-u0M.js +0 -1
  1258. package/build/assets/use-settings-nav-items-DPK5sxvR.js +0 -16
  1259. package/build/assets/use-skills-D_mLhYNa.js +0 -1
  1260. package/build/assets/use-tracking-COqZLobY.js +0 -1
  1261. package/build/assets/useQuery-B38jBavx.js +0 -1
  1262. package/build/assets/utils-DsWhWn2F.js +0 -1
  1263. package/build/assets/v4-DDdyfk2q.js +0 -1
  1264. package/build/assets/vendor~browser-CIoZCqGs.js +0 -47
  1265. package/build/assets/vendor~entry.client-BfviqoVc.js +0 -1
  1266. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js +0 -1
  1267. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js +0 -26
  1268. package/build/assets/vendor~module-BZXjBMvd.js +0 -2
  1269. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-Acmf1sKj.js +0 -1
  1270. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CmzCY1BT.js +0 -1
  1271. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C7Yh77RT.js +0 -1
  1272. package/build/assets/x-Dx_JbpHA.js +0 -1
  1273. package/dist/components/features/skills/skill-type-filter.d.ts +0 -3
  1274. package/dist/components/features/skills/skills-type-filter-dropdown.d.ts +0 -7
  1275. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs +0 -2
  1276. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs.map +0 -1
  1277. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js +0 -81
  1278. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js.map +0 -1
  1279. package/dist/node_modules/void-elements/index.cjs +0 -2
  1280. package/dist/node_modules/void-elements/index.cjs.map +0 -1
  1281. package/dist/node_modules/void-elements/index.js +0 -25
  1282. package/dist/node_modules/void-elements/index.js.map +0 -1
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{A as a,g as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";import{t as s}from"./useQuery-BCnzy4LX.js";import{$ as c,Pt as l,X as u,ct as d,mt as f,n as p,nt as m}from"./active-backend-context-B0wI7OzM.js";import{E as h,t as g,z as _}from"./utils-BX9XJ0IE.js";import{c as v,r as y}from"./messages-Dt77e0qi.js";import{a as b,c as ee,i as x,l as S,n as C,o as w,r as T,s as E,t as D}from"./vendor~files-tab-C87pjSpi.js";import{t as O}from"./mouse-pointer-click-Px-dXWcS.js";import{r as k}from"./conversation-Csdxh9Xt.js";import{i as A}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js";import{t as j}from"./proxy-CIGI9zQC.js";import{c as te,f as M}from"./conversation-store-B8Eahyeg.js";import{t as ne}from"./segmented-toggle-eSofF7gn.js";import{c as N,u as re}from"./agent-server-conversation-service.api-km_8sOVf.js";import{t as ie}from"./format-time-delta-BIR5Os7T.js";import{o as P}from"./home-store-DM4qw1lF.js";import{r as ae}from"./typography-BSbUhJPn.js";import{d as F}from"./llm-not-configured-banner-DrBrhfN0.js";import{G as oe,J as se,K as I,h as L,q as R,t as ce,x as le}from"./markdown-renderer-lsvsp7jn.js";import{t as ue}from"./link-external-BNZzCM1I.js";import{n as de,t as fe}from"./highlighted-source-view-DBtI3por.js";import{t as z}from"./conversation-tab-empty-state-D3fb5xIA.js";var B=e(t(),1),V=n();function pe(){let{t:e}=i(`openhands`);return(0,V.jsx)(z,{className:`h-full`,icon:(0,V.jsx)(O,{"aria-hidden":!0,strokeWidth:2,className:`size-full`}),children:e(_.FILES$NO_FILE_SELECTED)})}var me=class{static async executeCommand(e,t,n,r,i=30){let a=d().backend;if(a.kind===`cloud`&&e){let o=await j({backend:a,method:`POST`,hostOverride:m(e),path:`/api/bash/execute_bash_command`,body:{command:n,...r?{cwd:r}:{},timeout:Math.floor(i)},authMode:`session-api-key`,sessionApiKey:t,timeoutSeconds:i+10});return{exit_code:o.exit_code??-1,stdout:o.stdout??``,stderr:o.stderr??``}}let o=await new A(c({conversationUrl:e,sessionApiKey:t})).executeCommand(n,r,i);return{exit_code:o.exit_code,stdout:o.stdout,stderr:o.stderr}}static async downloadFile(e,t,n){let r=d().backend;return r.kind===`cloud`&&e?(await j({backend:r,method:`GET`,hostOverride:m(e),path:`/api/file/download?path=${encodeURIComponent(n)}`,authMode:`session-api-key`,sessionApiKey:t,responseType:`blob`})).arrayBuffer():new o(c({conversationUrl:e,sessionApiKey:t})).downloadFile(n)}};function H(e){return e.startsWith(`/`)?e:`/${e}`}async function U(e,t,n,r){let i=d().backend;if(i.kind===`cloud`&&e){let a=new URLSearchParams({...r,path:H(r.path)});return j({backend:i,method:`GET`,hostOverride:m(e),path:`${n}?${a.toString()}`,authMode:`session-api-key`,sessionApiKey:t??void 0})}return(await new A(c({conversationUrl:e,sessionApiKey:t})).client.get(n,{params:r})).data}function he(e){return u(e,404)||a(e)&&e.response?.status===404}var W=class{static async getGitChanges(e,t,n,r){let i=d().backend;if(i.kind===`cloud`&&e){let t=new URLSearchParams;t.set(`path`,H(r));let n=await j({backend:i,method:`GET`,path:`/api/v1/app-conversations/${e}/git/changes?${t.toString()}`});if(!Array.isArray(n))throw Error(`Invalid response from runtime - runtime may be unavailable`);return n.map(e=>({status:P(String(e.status)),path:e.path}))}let a=await new A(c({conversationUrl:t,sessionApiKey:n})).gitChanges(r);if(!Array.isArray(a))throw Error(`Invalid response from runtime - runtime may be unavailable`);return a.map(e=>({status:P(String(e.status)),path:e.path}))}static async getGitCommits(e,t,n,r=50){try{let i=await U(e,t,`/api/git/commits`,{path:n,limit:String(r)});return{commits:(i?.commits??[]).map(e=>({sha:e.sha,shortSha:e.short_sha,subject:e.subject,author:e.author,timestamp:e.timestamp})),hasMore:!!i?.has_more}}catch(e){if(he(e))return null;throw e}}static async getCommitChanges(e,t,n,r){let i=await U(e,t,`/api/git/commits/${encodeURIComponent(r)}/changes`,{path:n});if(!Array.isArray(i))throw Error(`Invalid response from runtime - runtime may be unavailable`);return i.map(e=>({status:P(String(e.status)),path:e.path}))}static async getGitChangeDiff(e,t,n,r,i){if(i){let e=await U(t,n,`/api/git/diff`,{path:r,commit:i});return{modified:e?.modified??``,original:e?.original??``,...e?.diff?{diff:e.diff}:{}}}let a=d().backend;if(a.kind===`cloud`&&e){let t=new URLSearchParams;t.set(`path`,H(r));let n=await j({backend:a,method:`GET`,path:`/api/v1/app-conversations/${e}/git/diff?${t.toString()}`});return{modified:n?.modified??``,original:n?.original??``,...n?.diff?{diff:n.diff}:{}}}let o=await new A(c({conversationUrl:t,sessionApiKey:n})).gitDiff(r);return{modified:o.modified??``,original:o.original??``,...o.diff?{diff:o.diff}:{}}}};function G(e,t){let n=t?.trim();if(n)return n;if(!e)return f;let r=e.split(`/`);return`${f}/${r[r.length-1]}`}var K=()=>{let{conversationId:e}=R(),{data:t}=I(),[n,r]=B.useState([]),i=B.useRef(null),a=k(),o=t?.conversation_url,c=t?.session_api_key,l=t?.selected_repository,u=t?.workspace?.working_dir?.trim(),d=B.useMemo(()=>G(l,u),[l,u]),f=s({queryKey:[`file_changes`,e,o,c,d],queryFn:async()=>{if(!e)throw Error(`No conversation ID`);return W.getGitChanges(e,o,c,d)},retry:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnMount:`always`,enabled:a&&!!e,meta:{disableToast:!0}});return B.useEffect(()=>{if(!f.isFetching&&f.isSuccess&&f.data){let e=f.data;if(e!==i.current)if(i.current=e,Array.isArray(e)){let t=new Set(e.map(e=>e.path)),i=new Set(n.map(e=>e.path)),a=e.filter(e=>!i.has(e.path)),o=n.filter(e=>t.has(e.path));r([...a,...o])}else r([e])}},[f.isFetching,f.isSuccess,f.data]),{data:n,isLoading:f.isLoading,isFetching:f.isFetching,isSuccess:f.isSuccess,isError:f.isError,error:f.error,refetch:f.refetch}},q=2e3,ge=[`.git`,`node_modules`,`.venv`,`venv`,`__pycache__`,`dist`,`build`,`.next`,`.cache`,`.pytest_cache`,`.mypy_cache`,`.turbo`,`.parcel-cache`,`target`];function _e(){return`find . \\( ${ge.map(e=>`-name '${e}' -prune`).join(` -o `)} \\) -o -type f -print 2>/dev/null | sort | head -n ${q}`}function ve(e){return e.startsWith(`./`)?e.slice(2):e}function ye(e){let{data:t}=I(),n=k(),r=t?.id,i=t?.conversation_url,a=t?.session_api_key,o=t?.workspace?.working_dir?.trim(),c=s({queryKey:[`workspace-files`,r,i,a,o],queryFn:async()=>{let e=await me.executeCommand(i,a,_e(),o,30);if(e.exit_code!==0)throw Error(e.stderr?.trim()||`Failed to list workspace files`);let t=e.stdout.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).map(ve);return Array.from(new Set(t)).slice(0,q)},enabled:e&&n&&!!r&&!!o,retry:!1,staleTime:1e3*30,gcTime:1e3*60*5,meta:{disableToast:!0}});return{data:c.data,isLoading:c.isLoading}}function be(e){let t=K(),n=(0,B.useMemo)(()=>{if(!e)return;let n=t.data.filter(e=>e.status!==`D`).map(e=>e.path);return Array.from(new Set(n)).slice(0,q)},[e,t.data]);return{data:e?n:void 0,isLoading:e?t.isLoading:!1}}function xe(){let{backend:e}=p(),t=e.kind===`cloud`,n=ye(!t),r=be(t);return t?r:n}function Se(){let{data:e}=I(),t=k(),n=e?.id,r=e?.conversation_url,i=e?.session_api_key,a=d().backend.kind===`local`,o=s({queryKey:[`workspace-session`,n,r,i],queryFn:async()=>({baseUrl:await new A(c({conversationUrl:r,sessionApiKey:i})).startWorkspaceSession(n)}),enabled:t&&!!n&&a,staleTime:1/0,gcTime:1/0,retry:!1});return{data:o.data??null,isLoading:o.isLoading,isError:o.isError,error:o.error??null}}function Ce(e,t){let n=(t??``).replace(/^\/+/,``);return n?`${e}${n.split(`/`).map(e=>encodeURIComponent(e)).join(`/`)}`:e}var J=M(e=>({count:0,bump:()=>e(e=>({count:e.count+1}))}));function we(e,t){return e===null?null:`${e}${e.includes(`?`)?`&`:`?`}v=${t}`}var Te=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`bmp`,`ico`,`svg`,`avif`]),Ee=new Set([`pdf`]);function De(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function Oe(e){switch(De(e)){case`html`:case`htm`:return`text/html`;case`css`:return`text/css`;case`js`:case`mjs`:case`cjs`:return`text/javascript`;case`json`:return`application/json`;case`md`:case`markdown`:return`text/markdown`;case`svg`:return`image/svg+xml`;case`png`:return`image/png`;case`jpg`:case`jpeg`:return`image/jpeg`;case`gif`:return`image/gif`;case`webp`:return`image/webp`;case`bmp`:return`image/bmp`;case`ico`:return`image/x-icon`;case`avif`:return`image/avif`;case`pdf`:return`application/pdf`;default:return`text/plain`}}function ke(e){let t=De(e);return Te.has(t)?`image`:Ee.has(t)?`pdf`:`text`}function Ae(e){let t=new Uint8Array(e,0,Math.min(e.byteLength,8e3));for(let e=0;e<t.length;e+=1)if(t[e]===0)return!0;return!1}function Y(e){let t=new Uint8Array(e),n=32768,r=``;for(let e=0;e<t.length;e+=n)r+=String.fromCharCode.apply(null,t.subarray(e,e+n));return btoa(r)}function je(e){let{data:t}=I(),n=k(),{data:r}=Se(),i=J(e=>e.count),a=t?.id,o=t?.conversation_url,c=t?.session_api_key,l=t?.selected_repository,u=t?.workspace?.working_dir?.trim(),f=r?.baseUrl,p=d().backend.kind===`cloud`,m=G(l,u),h=m.startsWith(`/`)?m:`/${m}`,g=e?`${h}/${e}`:null;return s({queryKey:[`workspace-file-content`,a,o,c,p?`cloud`:f,e,g,i],queryFn:async()=>{if(!e)throw Error(`No path`);let t=ke(e),n=Oe(e);if(p){let r=await N(a,g);if(t===`text`){let t=new TextEncoder().encode(r);return Ae(t.buffer)?{path:e,kind:`binary`,text:null,staticUrl:`data:application/octet-stream;base64,${Y(t.buffer)}`,mimeType:`application/octet-stream`}:{path:e,kind:`text`,text:r,staticUrl:`data:${n};charset=utf-8;base64,${Y(t.buffer)}`,mimeType:n}}return{path:e,kind:t,text:null,staticUrl:`data:${n};base64,${Y(new TextEncoder().encode(r).buffer)}`,mimeType:n}}if(!f)throw Error(`No workspace session`);let r=Ce(f,e);if(t!==`text`)return{path:e,kind:t,text:null,staticUrl:r,mimeType:n};let i=await fetch(r,{credentials:`include`});if(!i.ok)throw Error(`Failed to read ${e}: ${i.status}`);let o=await i.arrayBuffer();return Ae(o)?{path:e,kind:`binary`,text:null,staticUrl:r,mimeType:`application/octet-stream`}:{path:e,kind:`text`,text:new TextDecoder(`utf-8`,{fatal:!1}).decode(o),staticUrl:r,mimeType:n}},enabled:n&&!!a&&!!e&&(p||!!f),retry:!1,staleTime:1e3*5,gcTime:1e3*60,meta:{disableToast:!0}})}function Me(){let{data:e,isLoading:t}=I(),n=e?.id?re(e.id):null;return{hasAttachedSource:!!e?.selected_repository||!!n?.selected_workspace,isLoading:t}}function Ne(e){let{data:t}=I(),n=k(),{backend:r}=p(),i=r.kind===`local`,a=t?.id,o=t?.conversation_url,c=t?.session_api_key,l=t?.workspace?.working_dir?.trim(),u=(e?.enabled??!0)&&i&&n&&!!a&&!!l,d=s({queryKey:[`has-git-commits`,a,o,c,l],queryFn:async()=>(await me.executeCommand(o,c,`git rev-parse --verify HEAD`,l,10)).exit_code===0,enabled:u,retry:!1,staleTime:6e4,gcTime:5*6e4,meta:{disableToast:!0}});return{hasCommits:d.data??null,isLoading:d.isLoading}}var Pe=new Set([`FileEditorObservation`,`StrReplaceEditorObservation`,`PlanningFileEditorObservation`]),Fe=new Set([`view`]),Ie=new Set([`ExecuteBashObservation`,`TerminalObservation`]);function Le(e){let t=e.observation;return!(!t||typeof t.kind!=`string`||!Pe.has(t.kind)||t.command&&Fe.has(t.command))}function Re(e){let t=e.observation;return!!t&&typeof t.kind==`string`&&Ie.has(t.kind)}function ze(){let e=r(),t=le(e=>e.events),n=J(e=>e.bump),i=(0,B.useRef)(new Set),a=(0,B.useRef)(new WeakSet);(0,B.useEffect)(()=>{let r=!1,o=!1;for(let e of t){let t=`id`in e?e.id:void 0;(t===void 0?a.current.has(e):i.current.has(t))||(t===void 0?a.current.add(e):i.current.add(t),Le(e)?r=!0:Re(e)&&(o=!0))}!r&&!o||(e.invalidateQueries({queryKey:[`file_changes`]}),e.invalidateQueries({queryKey:[`file_diff`]}),e.invalidateQueries({queryKey:[`git_commits`]}),r&&(e.invalidateQueries({queryKey:[`workspace-files`]}),e.invalidateQueries({queryKey:[`workspace-file-content`]}),n()))},[t,e,n])}var Be=[`index.html`,`index.htm`,`readme.md`,`readme`,`main.html`,`app.html`,`index.js`,`index.ts`,`index.tsx`,`index.jsx`,`main.py`,`app.py`,`main.go`,`main.rs`,`main.java`,`main.c`,`main.cpp`,`package.json`,`pyproject.toml`,`cargo.toml`,`go.mod`,`pom.xml`,`dockerfile`,`makefile`],Ve=[`license`,`license.md`,`license.txt`,`changelog.md`,`agents.md`,`tsconfig.json`,`.env.sample`,`.env.example`];function He(e){let t=e.lastIndexOf(`/`);return(t===-1?e:e.slice(t+1)).toLowerCase()}function Ue(e){return e.split(`/`).filter(Boolean).length-1}function We(e){let t=He(e),n=Be.indexOf(t);if(n!==-1)return n;let r=Ve.indexOf(t);return r===-1?1e4:1e3+r}function Ge(e){return[...e].sort((e,t)=>{let n=Ue(e)-Ue(t);if(n!==0)return n;let r=We(e)-We(t);return r===0?e.localeCompare(t):r})}function Ke({paths:e,selectedPath:t,onSelectFile:n,isTreeVisible:r,onToggleTree:a}){let{t:o}=i(`openhands`),s=(0,B.useMemo)(()=>Ge(e),[e]);return(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5 border-b border-[var(--oh-border)] px-2 py-1.5 min-h-[34px]`,"data-testid":`file-quick-row`,children:[(0,V.jsx)(`button`,{type:`button`,onClick:a,"data-testid":`file-quick-row-tree-toggle`,"aria-pressed":r,"aria-label":o(r?_.FILES$HIDE_FILE_TREE:_.FILES$SHOW_FILE_TREE),title:o(r?_.FILES$HIDE_FILE_TREE:_.FILES$SHOW_FILE_TREE),className:g(`shrink-0 inline-flex items-center justify-center w-6 h-6 rounded-md cursor-pointer`,`text-[var(--oh-text-tertiary)] hover:bg-tertiary`,r&&`bg-[var(--oh-surface-raised)]`),children:(0,V.jsx)(S,{className:`w-3 h-3`,"aria-hidden":!0,strokeWidth:2})}),s.length>0&&(0,V.jsx)(`div`,{className:`flex flex-nowrap items-center gap-1.5 overflow-hidden flex-1 min-w-0`,children:s.map(e=>{let r=t===e;return(0,V.jsx)(`button`,{type:`button`,onClick:()=>n(e),title:e,"data-testid":`file-quick-row-item-${e}`,className:g(`inline-flex items-center px-2 py-0.5 text-xs whitespace-nowrap rounded-md cursor-pointer`,r?`bg-[var(--oh-interactive-hover)] text-white`:`bg-[var(--oh-surface-raised)] text-[var(--oh-text-tertiary)] hover:bg-tertiary`),children:e},e)})})]})}var qe=new Set([`html`,`htm`,`svg`]),Je=new Set([`md`,`markdown`,`mdx`]),Ye={pptx:`PowerPoint`,ppt:`PowerPoint`,docx:`Word`,doc:`Word`,xlsx:`Excel`,xls:`Excel`};function X(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function Z({path:e}){let{t}=i(`openhands`),n=Ye[X(e)];return(0,V.jsx)(`div`,{className:`flex h-full w-full items-center justify-center text-sm text-[var(--oh-muted)]`,"data-testid":n?`file-content-viewer-unsupported-document`:`file-content-viewer-binary-fallback`,children:n?t(_.FILES$UNSUPPORTED_DOCUMENT,{type:n}):t(_.FILES$BINARY_FALLBACK)})}function Xe({path:e,viewMode:t}){let{t:n}=i(`openhands`),r=je(e),a=J(e=>e.count);if(r.isLoading)return(0,V.jsx)(`div`,{className:`flex h-full w-full items-center justify-center text-sm text-[var(--oh-muted)]`,children:n(_.FILES$LOADING_FILES)});if(r.isError||!r.data)return(0,V.jsx)(`div`,{className:`flex h-full w-full items-center justify-center text-sm text-[var(--oh-muted)]`,"data-testid":`file-content-viewer-error`,children:r.error?.message??n(_.FILES$LOAD_ERROR)});let{kind:o,text:s,staticUrl:c,mimeType:l}=r.data,u=we(c,a);return t===`plain`?o===`text`&&s!==null?(0,V.jsx)(fe,{path:e,text:s,mimeType:l??void 0}):(0,V.jsx)(Z,{path:e}):o===`image`?(0,V.jsx)(`div`,{className:`flex h-full w-full items-center justify-center bg-[var(--oh-surface)] p-4`,"data-testid":`file-content-viewer-image`,children:(0,V.jsx)(`img`,{src:u,alt:e,className:`max-h-full max-w-full object-contain`})}):o===`pdf`?(0,V.jsx)(`iframe`,{title:e,src:u,sandbox:`allow-same-origin`,"data-testid":`file-content-viewer-iframe`,className:`h-full w-full bg-white`}):o===`binary`?(0,V.jsx)(Z,{path:e}):l===`text/html`||qe.has(X(e))?(0,V.jsx)(`iframe`,{title:e,src:u,sandbox:`allow-same-origin`,"data-testid":`file-content-viewer-iframe`,className:`h-full w-full bg-white`}):o===`text`&&Je.has(X(e))?(0,V.jsx)(`div`,{"data-testid":`file-content-viewer-markdown`,className:`h-full w-full overflow-auto bg-[var(--oh-surface)] text-white custom-scrollbar-always`,children:(0,V.jsx)(`div`,{className:`prose prose-sm prose-invert max-w-none p-6 [--tw-prose-body:#fff] [--tw-prose-bold:#fff] [--tw-prose-headings:#fff] [--tw-prose-lead:#fff] [--tw-prose-counters:#fff] [--tw-prose-quotes:#fff] [--tw-prose-quote-borders:var(--oh-border-subtle)] [--tw-prose-bullets:var(--oh-muted)] [--tw-prose-hr:var(--oh-border-subtle)] [--tw-prose-captions:var(--oh-muted)] [--tw-prose-kbd:#fff]`,children:(0,V.jsx)(ce,{content:s??``,includeStandard:!0,includeHeadings:!0})})}):o===`text`&&s!==null?(0,V.jsx)(fe,{path:e,text:s,mimeType:l??void 0}):(0,V.jsx)(Z,{path:e})}var Ze=e=>(0,V.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 13 15`,fill:`none`,...e,children:(0,V.jsx)(`path`,{d:`M6.59467 0.21967C6.88756 -0.0732233 7.36244 -0.0732233 7.65533 0.21967L9.90533 2.46967C10.1982 2.76256 10.1982 3.23744 9.90533 3.53033L7.65533 5.78033C7.36244 6.07322 6.88756 6.07322 6.59467 5.78033C6.30178 5.48744 6.30178 5.01256 6.59467 4.71967L7.56434 3.75H6.375C3.71421 3.75 1.5 5.96421 1.5 8.625C1.5 11.2858 3.71421 13.5 6.375 13.5C9.03579 13.5 11.25 11.2858 11.25 8.625C11.25 8.21079 11.5858 7.875 12 7.875C12.4142 7.875 12.75 8.21079 12.75 8.625C12.75 12.1142 9.86421 15 6.375 15C2.88579 15 0 12.1142 0 8.625C0 5.13579 2.88579 2.25 6.375 2.25H7.56434L6.59467 1.28033C6.30178 0.987437 6.30178 0.512563 6.59467 0.21967Z`,fill:`currentColor`})}),Qe=()=>{let{conversationId:e}=R(),{data:t}=I(),n=k(),r=t?.conversation_url,i=t?.session_api_key,a=t?.selected_repository,o=t?.workspace?.working_dir?.trim(),c=B.useMemo(()=>G(a,o),[a,o]),l=s({queryKey:[`git_commits`,e,r,i,c],queryFn:async()=>{if(!e)throw Error(`No conversation ID`);return W.getGitCommits(r,i,c,50)},retry:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnMount:`always`,enabled:n&&!!e,meta:{disableToast:!0}});return{commits:l.data?.commits??[],hasMore:l.data?.hasMore??!1,isUnsupported:l.data===null,isLoading:l.isLoading,isFetching:l.isFetching,isSuccess:l.isSuccess,isError:l.isError}},Q=e=>(0,V.jsx)(`svg`,{width:13,height:8,viewBox:`0 0 13 8`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,V.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M0.259766 6.17427L6.26425 0.715628L12.2688 6.17427L11.2597 7.28418L6.26425 2.74282L1.26878 7.28418L0.259766 6.17427Z`,fill:`currentColor`})}),$e=e=>{let{conversationId:t}=R(),{data:n}=I(),r=n?.conversation_url,i=n?.session_api_key,a=n?.selected_repository,o=n?.workspace?.working_dir?.trim(),c=B.useMemo(()=>`${G(a,o)}/${e.filePath}`,[a,e.filePath,o]),l=e.type===`D`;return s({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 W.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 et({className:e}){let{t}=i(`openhands`);return(0,V.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,V.jsx)(`div`,{className:g(`animate-spin rounded-full border-4 border-transparent border-t-white`,e),role:`status`,"aria-label":t(_.HOME$LOADING)})})}function tt({height:e,children:t}){return(0,V.jsx)(`div`,{"data-testid":`editor-container`,className:`w-full border-b border-[var(--oh-border)] overflow-hidden h-[var(--editor-height)]`,style:{"--editor-height":`${e}px`},children:t})}var nt=[{mode:`old`,icon:w},{mode:`diff`,icon:b},{mode:`new`,icon:D}],rt={renderValidationDecorations:`off`,readOnly:!0,scrollBeyondLastLine:!1,minimap:{enabled:!1},automaticLayout:!0,scrollbar:{alwaysConsumeMouseWheel:!1}},it={A:x,D:T,M:C,R:`Renamed`,U:`Untracked`},at=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 ot({path:e,type:t,commit:n}){let{t:r}=i(`openhands`),[a,o]=B.useState(!0),[s,c]=B.useState(400),[l,u]=B.useState(`diff`),d=B.useRef(null),f=B.useRef(null),p=t===`A`||t===`U`,m=t===`D`,h=B.useMemo(()=>{if(t===`R`){let t=e.split(/\s+/).slice(1);return t[t.length-1]}return e},[e,t]),{data:v,isLoading:b,isSuccess:x,isRefetching:S}=$e({filePath:h,type:t,enabled:!a,commit:n}),C=B.useCallback(()=>{if(!d.current)return;let e=d.current.getOriginalEditor(),t=d.current.getModifiedEditor();e&&t&&c(Math.max(e.getContentHeight(),t.getContentHeight())+20)},[]),w=B.useCallback(()=>{f.current&&c(f.current.getContentHeight()+20)},[]),T=e=>{d.current=e,C(),e.getOriginalEditor().onDidContentSizeChange(C),e.getModifiedEditor().onDidContentSizeChange(C)},D=e=>{f.current=e,w(),e.onDidContentSizeChange(w)},O=(t===`U`?it.A:it[t])||`?`,k=typeof O==`string`?(0,V.jsx)(ae.Text,{children:O}):B.createElement(O,{className:`w-5 h-5`}),A=b||S,j=y(h),te=j===`markdown`,M=l===`old`?v?.original??``:v?.modified??``;return(0,V.jsxs)(`div`,{"data-testid":`file-diff-viewer-outer`,className:`w-full flex flex-col`,children:[(0,V.jsx)(`div`,{className:`flex justify-between items-center px-3 py-2.5 border-b border-[var(--oh-border)] hover:cursor-pointer`,onClick:()=>o(e=>!e),children:(0,V.jsxs)(`span`,{className:`text-sm w-full text-content flex items-center gap-2`,children:[A?(0,V.jsx)(et,{className:`w-4 h-4`}):k,(0,V.jsx)(`strong`,{className:`w-full truncate font-medium`,children:h}),!a&&!m&&(0,V.jsx)(`span`,{className:`flex items-center gap-0.5 shrink-0`,onClick:e=>e.stopPropagation(),children:nt.map(({mode:e,icon:t})=>(0,V.jsx)(`button`,{"data-testid":`view-mode-${e}`,type:`button`,"aria-pressed":l===e,onClick:()=>u(e),className:g(`p-1 rounded transition-colors cursor-pointer`,l===e?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-white`),children:(0,V.jsx)(t,{className:`w-4 h-4`})},e))}),(0,V.jsx)(`button`,{"data-testid":`collapse`,type:`button`,children:(0,V.jsx)(Q,{className:g(`w-4 h-4 transition-transform`,a&&`transform rotate-180`)})})]})}),!a&&m&&!n&&(0,V.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:r(_.DIFF_VIEWER$FILE_DELETED)}),!a&&(!m||!!n)&&x&&(l===`diff`?(0,V.jsx)(tt,{height:s,children:(0,V.jsx)(ee,{"data-testid":`file-diff-viewer`,className:`w-full h-full`,language:j,original:p?``:v?.original??``,modified:m?``:v?.modified??``,theme:`custom-diff-theme`,onMount:T,beforeMount:at,options:{...rt,renderSideBySide:!p&&!m,hideUnchangedRegions:{enabled:!0}}})}):te?(0,V.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`,children:(0,V.jsx)(ce,{content:M,includeStandard:!0,includeHeadings:!0})}):(0,V.jsx)(tt,{height:s,children:(0,V.jsx)(E,{"data-testid":`file-single-viewer`,className:`w-full h-full`,language:j,value:M,theme:`custom-diff-theme`,beforeMount:at,onMount:D,options:rt})}))]})}function $(){return(0,V.jsx)(C,{"aria-hidden":!0,className:`size-full`})}function st(){let{t:e}=i(`openhands`);return(0,V.jsx)(z,{icon:(0,V.jsx)($,{}),children:e(_.DIFF_VIEWER$NO_CHANGES)})}var ct=[{key:_.TIPS$CUSTOMIZE_MICROAGENT,link:`https://docs.all-hands.dev/usage/prompting/microagents-repo`},{key:_.TIPS$SETUP_SCRIPT,link:`https://docs.all-hands.dev/usage/prompting/repository#setup-script`},{key:_.TIPS$VSCODE_INSTANCE},{key:_.TIPS$SAVE_WORK},{key:_.TIPS$SPECIFY_FILES,link:`https://docs.all-hands.dev/usage/prompting/prompting-best-practices`},{key:_.TIPS$HEADLESS_MODE,link:`https://docs.all-hands.dev/usage/how-to/headless-mode`},{key:_.TIPS$CLI_MODE,link:`https://docs.all-hands.dev/usage/how-to/cli-mode`},{key:_.TIPS$GITHUB_HOOK,link:`https://docs.all-hands.dev/usage/cloud/github-installation#working-on-github-issues-and-pull-requests-using-openhands`},{key:_.TIPS$BLOG_SIGNUP,link:`https://www.all-hands.dev/blog`},{key:_.TIPS$API_USAGE,link:`https://docs.all-hands.dev/api-reference/health-check`}];function lt(){return ct[Math.floor(Math.random()*ct.length)]}function ut(){let{t:e}=i(`openhands`),[t,n]=B.useState(lt());return B.useEffect(()=>{n(lt())},[]),(0,V.jsx)(`div`,{className:`w-full bg-tertiary p-4 text-left`,children:(0,V.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,V.jsx)(v,{className:`mt-0.5 h-4 w-4 shrink-0 fill-[var(--oh-muted)]`,"aria-hidden":!0}),(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`h4`,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)]`,children:e(_.TIPS$PROTIP)}),(0,V.jsxs)(`p`,{className:`text-sm font-normal leading-5 text-[var(--oh-muted)]`,children:[e(t.key),t.link?(0,V.jsxs)(V.Fragment,{children:[` `,(0,V.jsx)(`a`,{href:t.link,target:`_blank`,rel:`noopener noreferrer`,className:`underline transition-colors hover:text-white`,children:e(_.TIPS$LEARN_MORE)})]}):null]})]})]})})}var dt=/not a git repository/i,ft=new Set([_.DIFF_VIEWER$WAITING_FOR_RUNTIME,_.DIFF_VIEWER$LOADING]);function pt({messages:e}){let{t}=i(`openhands`);return e.length===1&&ft.has(e[0])?(0,V.jsx)(F,{testId:`changes-tab-status`,messageKey:e[0]}):(0,V.jsx)(z,{icon:(0,V.jsx)($,{}),children:e.map(e=>(0,V.jsx)(`span`,{className:`block`,children:t(e)},e))})}function mt(){let{data:e,isSuccess:t,isError:n,error:r,isLoading:i}=K(),[a,o]=B.useState(null),{curAgentState:s}=oe(),c=!h.includes(s),u=r&&dt.test(l(r));return B.useEffect(()=>{if(!c)o([_.DIFF_VIEWER$WAITING_FOR_RUNTIME]);else if(r){let e=l(r);dt.test(e)?o([_.DIFF_VIEWER$NOT_A_GIT_REPO,_.DIFF_VIEWER$ASK_OH]):o([e])}else o(i?[_.DIFF_VIEWER$LOADING]:null)},[c,u,i,r,o]),(0,V.jsx)(`main`,{className:`h-full w-full flex flex-col items-stretch`,children:!t||!e.length?(0,V.jsxs)(`div`,{className:`flex flex-col h-full w-full`,children:[(0,V.jsxs)(`div`,{className:`flex-1 flex items-center justify-center`,children:[a&&(0,V.jsx)(pt,{messages:a}),!a&&t&&e.length===0&&(0,V.jsx)(st,{})]}),!n&&t&&e.length===0&&(0,V.jsx)(ut,{})]}):(0,V.jsx)(`div`,{className:`h-full overflow-y-auto flex flex-col items-stretch custom-scrollbar-always`,children:e.slice(0,100).map(e=>(0,V.jsx)(ot,{path:e.path,type:e.status},e.path))})})}var ht=(e,t)=>{let{conversationId:n}=R(),{data:r}=I(),i=k(),a=r?.conversation_url,o=r?.session_api_key,c=r?.selected_repository,l=r?.workspace?.working_dir?.trim(),u=B.useMemo(()=>G(c,l),[c,l]);return s({queryKey:[`commit_changes`,n,a,o,u,e],queryFn:async()=>{if(!n)throw Error(`No conversation ID`);return W.getCommitChanges(a,o,u,e)},staleTime:1/0,gcTime:1e3*60*15,retry:!1,enabled:t.enabled&&i&&!!n,meta:{disableToast:!0}})};function gt({commit:e,showAuthor:t,isExpanded:n,onToggle:r}){let{t:a}=i(`openhands`),{data:o,isLoading:s,isSuccess:c}=ht(e.sha,{enabled:n});return(0,V.jsxs)(`div`,{"data-testid":`commit-row`,className:`w-full flex flex-col`,children:[(0,V.jsxs)(`button`,{type:`button`,onClick:r,"aria-expanded":n,"data-testid":`commit-row-toggle`,className:`w-full flex items-center gap-2 px-3 py-2.5 border-b border-[var(--oh-border)] text-sm text-content text-left hover:cursor-pointer`,children:[(0,V.jsx)(`code`,{className:`font-mono text-xs text-[var(--oh-muted)] flex-shrink-0`,children:e.shortSha}),(0,V.jsx)(`strong`,{className:`flex-1 truncate font-medium`,children:e.subject}),t&&(0,V.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate max-w-32 flex-shrink-0`,children:e.author}),(0,V.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] flex-shrink-0`,children:`${ie(e.timestamp)} ${a(_.CONVERSATION$AGO)}`}),(0,V.jsx)(Q,{className:g(`w-4 h-4 transition-transform flex-shrink-0`,!n&&`transform rotate-180`)})]}),n&&(0,V.jsxs)(`div`,{"data-testid":`commit-row-content`,className:`w-full flex flex-col pl-6`,children:[s&&(0,V.jsx)(`div`,{className:`p-3`,children:(0,V.jsx)(et,{className:`w-4 h-4`})}),c&&o?.map(t=>(0,V.jsx)(ot,{path:t.path,type:t.status,commit:e.sha},t.path))]})]})}function _t({commits:e,hasMore:t}){let{t:n}=i(`openhands`),[r,a]=B.useState(null),o=new Set(e.map(e=>e.author)).size>1;return(0,V.jsxs)(`section`,{"data-testid":`commit-list`,className:`w-full flex flex-col`,children:[e.map(e=>(0,V.jsx)(gt,{commit:e,showAuthor:o,isExpanded:r===e.sha,onToggle:()=>a(t=>t===e.sha?null:e.sha)},e.sha)),t&&(0,V.jsx)(`div`,{"data-testid":`commit-list-cap-notice`,className:`px-3 py-2.5 text-xs text-[var(--oh-muted)]`,children:n(_.DIFF_VIEWER$COMMITS_CAP,{count:e.length})})]})}function vt(){let{t:e}=i(`openhands`),{conversationId:t}=R(),{commits:n,hasMore:r,isUnsupported:a,isLoading:o,isSuccess:s}=Qe(),{curAgentState:c}=oe(),l=!h.includes(c);return(0,V.jsx)(`main`,{className:`h-full w-full flex flex-col items-stretch`,children:s&&!a&&n.length>0?(0,V.jsx)(`div`,{className:`h-full overflow-y-auto flex flex-col items-stretch custom-scrollbar-always`,children:(0,V.jsx)(_t,{commits:n,hasMore:r},t)}):(0,V.jsxs)(`div`,{className:`flex-1 flex items-center justify-center`,children:[!l&&(0,V.jsx)(F,{testId:`commits-tab-status`,messageKey:_.DIFF_VIEWER$WAITING_FOR_RUNTIME}),l&&o&&(0,V.jsx)(F,{testId:`commits-tab-status`,messageKey:_.DIFF_VIEWER$LOADING}),l&&!o&&(0,V.jsx)(z,{icon:(0,V.jsx)($,{}),children:e(_.DIFF_VIEWER$NO_COMMITS)})]})})}function yt(){let{t:e}=i(`openhands`);ze();let{hasAttachedSource:t,isLoading:n}=Me(),{hasCommits:a}=Ne({enabled:t}),{conversationId:o}=se(),{state:s,setFilesTabDiffView:c,setFilesTabContentViewMode:l}=te(o??``),u=(t||n)&&a!==!1,d=s.filesTabDiffView??u,f=s.filesTabContentViewMode,{isSuccess:p,isUnsupported:m}=Qe(),h=p&&!m,[g,v]=(0,B.useState)(!1),y=d?`on`:`off`;g&&h&&(y=`commits`);let[b,ee]=(0,B.useState)(!1),x=xe(),S=(0,B.useMemo)(()=>x.data??[],[x.data]),C=L(e=>e.selectedPath),w=L(e=>e.selectedConversationId),T=L(e=>e.setSelectedPath),E=w===o?C:null,D=(0,B.useCallback)(e=>T(e,o),[o,T]),O=je(E),k=J(e=>e.count),A=we(O.data?.staticUrl??null,k);(0,B.useEffect)(()=>{w!==o&&T(null,o)},[w,o,T]),(0,B.useEffect)(()=>{if(E||S.length===0)return;let[e]=Ge(S);e&&T(e,o)},[S,E,o,T]);let j=r(),{refetch:M,isFetching:N}=K(),re=()=>{M(),j.invalidateQueries({queryKey:[`workspace-files`]}),j.invalidateQueries({queryKey:[`workspace-file-content`]}),j.invalidateQueries({queryKey:[`git_commits`]})};return(0,V.jsxs)(`main`,{className:`h-full w-full flex flex-col items-stretch`,"data-testid":`files-tab`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-1.5 border-b border-[var(--oh-border)]`,children:[(0,V.jsx)(ne,{ariaLabel:e(_.FILES$DIFF_VIEW),testId:`files-tab-diff-toggle`,value:y,options:[{value:`on`,label:e(_.FILES$DIFF_VIEW)},...h?[{value:`commits`,label:e(_.DIFF_VIEWER$COMMITS)}]:[],{value:`off`,label:e(_.COMMON$FILES)}],onChange:e=>{e===`commits`?v(!0):(v(!1),c(e===`on`))}}),y===`off`&&(0,V.jsx)(ne,{ariaLabel:e(_.FILES$RICH),testId:`files-tab-content-mode-toggle`,value:f,options:[{value:`rich`,label:e(_.FILES$RICH)},{value:`plain`,label:e(_.FILES$PLAIN)}],onChange:l}),(0,V.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[y===`off`&&A&&(0,V.jsx)(`a`,{href:A,target:`_blank`,rel:`noopener noreferrer`,"aria-label":e(_.FILES$OPEN_IN_NEW_WINDOW),title:e(_.FILES$OPEN_IN_NEW_WINDOW),"data-testid":`files-tab-open-in-new-window`,className:`flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-white`,children:(0,V.jsx)(ue,{width:14,height:14})}),(0,V.jsx)(`button`,{type:`button`,onClick:re,disabled:N,"aria-label":e(_.FILES$REFRESH),title:e(_.FILES$REFRESH),"data-testid":`files-tab-refresh`,className:`flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:enabled:bg-[var(--oh-interactive-hover)] cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed`,children:(0,V.jsx)(Ze,{width:12.75,height:15,color:`#ffffff`,className:N?`animate-spin`:``})})]})]}),y===`on`&&(0,V.jsx)(`div`,{className:`flex-1 min-h-0`,children:(0,V.jsx)(mt,{})}),y===`commits`&&(0,V.jsx)(`div`,{className:`flex-1 min-h-0`,children:(0,V.jsx)(vt,{})}),y===`off`&&(0,V.jsx)(`div`,{className:`flex flex-1 flex-col min-h-0`,children:x.isLoading?(0,V.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-sm text-[var(--oh-muted)]`,children:e(_.FILES$LOADING_FILES)}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Ke,{paths:S,selectedPath:E,onSelectFile:D,isTreeVisible:b,onToggleTree:()=>ee(e=>!e)}),(0,V.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1`,children:[b&&(0,V.jsx)(`aside`,{className:`w-56 shrink-0 border-r border-[var(--oh-border)] overflow-y-auto custom-scrollbar-always`,"data-testid":`files-tab-tree`,children:(0,V.jsx)(de,{paths:S,selectedPath:E,onSelectFile:D})}),(0,V.jsx)(`section`,{className:`flex h-full min-h-0 min-w-0 flex-1 flex-col`,"data-testid":`files-tab-content`,children:E?(0,V.jsx)(Xe,{path:E,viewMode:f}):(0,V.jsx)(pe,{})})]})]})})]})}export{yt as default};
@@ -1 +1 @@
1
- import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Bcgpimp9.js";e();var n=t(),r=e=>(0,n.jsxs)(`svg`,{width:28,height:28,viewBox:`0 0 28 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsxs)(`g`,{clipPath:`url(#clip0_8760_4530)`,children:[(0,n.jsx)(`path`,{d:`M2.33496 6.99504C2.33496 5.70504 3.37496 4.66504 4.66496 4.66504H10.495C10.805 4.66504 11.105 4.78504 11.315 5.00504L13.305 6.99504H23.325C24.615 6.99504 25.655 8.03504 25.655 9.32504V20.995C25.655 22.285 24.615 23.325 23.325 23.325H4.66496C3.37496 23.325 2.33496 22.285 2.33496 20.995V6.99504ZM10.015 6.99504H4.66496V20.995H23.335V9.33504H12.835C12.525 9.33504 12.225 9.21504 12.015 8.99504L10.025 7.00504L10.015 6.99504Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M8.40279 11.4871C8.28576 11.4871 8.16873 11.4403 8.0829 11.3545L6.67853 9.95013C6.49908 9.77068 6.49908 9.482 6.67853 9.30255C6.85798 9.12311 7.14666 9.12311 7.3261 9.30255L8.73048 10.7069C8.90992 10.8864 8.90992 11.1751 8.73048 11.3545C8.64465 11.4403 8.52762 11.4871 8.41059 11.4871H8.40279Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M9.48901 12.5635H8.57617V16.7532H9.48901V12.5635Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M9.03627 13.0159C8.28727 13.0159 7.67871 12.4073 7.67871 11.6583C7.67871 10.9093 8.28727 10.3008 9.03627 10.3008C9.78527 10.3008 10.3938 10.9093 10.3938 11.6583C10.3938 12.4073 9.78527 13.0159 9.03627 13.0159ZM9.03627 11.2214C8.79441 11.2214 8.59936 11.4165 8.59936 11.6583C8.59936 11.9002 8.79441 12.0953 9.03627 12.0953C9.27814 12.0953 9.47319 11.9002 9.47319 11.6583C9.47319 11.4165 9.27814 11.2214 9.03627 11.2214Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M12.0324 16.012C11.2834 16.012 10.6748 15.4034 10.6748 14.6544C10.6748 13.9054 11.2834 13.2969 12.0324 13.2969C12.7814 13.2969 13.3899 13.9054 13.3899 14.6544C13.3899 15.4034 12.7814 16.012 12.0324 16.012ZM12.0324 14.2175C11.7905 14.2175 11.5954 14.4126 11.5954 14.6544C11.5954 14.8963 11.7905 15.0914 12.0324 15.0914C12.2742 15.0914 12.4693 14.8963 12.4693 14.6544C12.4693 14.4126 12.2742 14.2175 12.0324 14.2175Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M9.03627 19.0003C8.28727 19.0003 7.67871 18.3917 7.67871 17.6427C7.67871 16.8937 8.28727 16.2852 9.03627 16.2852C9.78527 16.2852 10.3938 16.8937 10.3938 17.6427C10.3938 18.3917 9.78527 19.0003 9.03627 19.0003ZM9.03627 17.2058C8.79441 17.2058 8.59936 17.4009 8.59936 17.6427C8.59936 17.8846 8.79441 18.0796 9.03627 18.0796C9.27814 18.0796 9.47319 17.8846 9.47319 17.6427C9.47319 17.4009 9.27814 17.2058 9.03627 17.2058Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M9.9902 11.9805L9.34473 12.626L11.066 14.3472L11.7115 13.7018L9.9902 11.9805Z`,fill:`currentColor`})]}),(0,n.jsx)(`defs`,{children:(0,n.jsx)(`clipPath`,{id:`clip0_8760_4530`,children:(0,n.jsx)(`rect`,{width:23.33,height:18.67,fill:`white`,transform:`translate(2.33496 4.66504)`})})})]});export{r as t};
1
+ import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";e();var n=t(),r=e=>(0,n.jsxs)(`svg`,{width:28,height:28,viewBox:`0 0 28 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsxs)(`g`,{clipPath:`url(#clip0_8760_4530)`,children:[(0,n.jsx)(`path`,{d:`M2.33496 6.99504C2.33496 5.70504 3.37496 4.66504 4.66496 4.66504H10.495C10.805 4.66504 11.105 4.78504 11.315 5.00504L13.305 6.99504H23.325C24.615 6.99504 25.655 8.03504 25.655 9.32504V20.995C25.655 22.285 24.615 23.325 23.325 23.325H4.66496C3.37496 23.325 2.33496 22.285 2.33496 20.995V6.99504ZM10.015 6.99504H4.66496V20.995H23.335V9.33504H12.835C12.525 9.33504 12.225 9.21504 12.015 8.99504L10.025 7.00504L10.015 6.99504Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M8.40279 11.4871C8.28576 11.4871 8.16873 11.4403 8.0829 11.3545L6.67853 9.95013C6.49908 9.77068 6.49908 9.482 6.67853 9.30255C6.85798 9.12311 7.14666 9.12311 7.3261 9.30255L8.73048 10.7069C8.90992 10.8864 8.90992 11.1751 8.73048 11.3545C8.64465 11.4403 8.52762 11.4871 8.41059 11.4871H8.40279Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M9.48901 12.5635H8.57617V16.7532H9.48901V12.5635Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M9.03627 13.0159C8.28727 13.0159 7.67871 12.4073 7.67871 11.6583C7.67871 10.9093 8.28727 10.3008 9.03627 10.3008C9.78527 10.3008 10.3938 10.9093 10.3938 11.6583C10.3938 12.4073 9.78527 13.0159 9.03627 13.0159ZM9.03627 11.2214C8.79441 11.2214 8.59936 11.4165 8.59936 11.6583C8.59936 11.9002 8.79441 12.0953 9.03627 12.0953C9.27814 12.0953 9.47319 11.9002 9.47319 11.6583C9.47319 11.4165 9.27814 11.2214 9.03627 11.2214Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M12.0324 16.012C11.2834 16.012 10.6748 15.4034 10.6748 14.6544C10.6748 13.9054 11.2834 13.2969 12.0324 13.2969C12.7814 13.2969 13.3899 13.9054 13.3899 14.6544C13.3899 15.4034 12.7814 16.012 12.0324 16.012ZM12.0324 14.2175C11.7905 14.2175 11.5954 14.4126 11.5954 14.6544C11.5954 14.8963 11.7905 15.0914 12.0324 15.0914C12.2742 15.0914 12.4693 14.8963 12.4693 14.6544C12.4693 14.4126 12.2742 14.2175 12.0324 14.2175Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M9.03627 19.0003C8.28727 19.0003 7.67871 18.3917 7.67871 17.6427C7.67871 16.8937 8.28727 16.2852 9.03627 16.2852C9.78527 16.2852 10.3938 16.8937 10.3938 17.6427C10.3938 18.3917 9.78527 19.0003 9.03627 19.0003ZM9.03627 17.2058C8.79441 17.2058 8.59936 17.4009 8.59936 17.6427C8.59936 17.8846 8.79441 18.0796 9.03627 18.0796C9.27814 18.0796 9.47319 17.8846 9.47319 17.6427C9.47319 17.4009 9.27814 17.2058 9.03627 17.2058Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M9.9902 11.9805L9.34473 12.626L11.066 14.3472L11.7115 13.7018L9.9902 11.9805Z`,fill:`currentColor`})]}),(0,n.jsx)(`defs`,{children:(0,n.jsx)(`clipPath`,{id:`clip0_8760_4530`,children:(0,n.jsx)(`rect`,{width:23.33,height:18.67,fill:`white`,transform:`translate(2.33496 4.66504)`})})})]});export{r as t};
@@ -1 +1 @@
1
- import{t as e}from"./utils-DsWhWn2F.js";var t=`h-9 min-h-9`,n=`rounded-lg`,r=`border border-[var(--oh-border)]`,i=`bg-base-secondary`,a=`duration-75`,o=`!duration-75`,s=`motion-reduce:transition-none`,c=e(`transition-[background-color,border-color,box-shadow,opacity]`,a,s),l=e(`!transition-[background-color,border-color,box-shadow,opacity]`,o,s),u=e(`transition-[transform] ease`,a,s),d=`hover:text-white hover:bg-white/10`,f=e(`inline-flex items-center gap-1 rounded-[100px] border border-transparent px-1.5`,`text-sm font-normal leading-5 text-[var(--oh-muted)] whitespace-nowrap min-w-0 cursor-pointer`,c,d),p=e(`flex items-center justify-center rounded-full text-[var(--oh-muted)] cursor-pointer`,c,d),m=`focus:border-white/40 focus:ring-1 focus:ring-white/20 focus:outline-none`,h=`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,g=`disabled:cursor-not-allowed disabled:opacity-60`,_=e(t,n,r,i,c,m,g,`w-full min-w-0 px-3 text-sm text-white placeholder:text-tertiary-alt`),v=e(_,`placeholder:italic`,l),y=e(n,r,i,c,m,g,`w-full min-w-0 px-3 py-2 text-sm text-white placeholder:text-tertiary-alt`),b=e(t,`relative flex min-w-0 items-center`,n,r,i,c,h),x=e(`min-w-0 flex-1 border-0 bg-transparent px-3 text-sm outline-none`,`placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`),S=e(t,`inline-flex w-fit cursor-pointer items-center justify-center gap-2 px-3`,n,c,`text-sm font-normal disabled:cursor-not-allowed disabled:opacity-30`),C=`pl-12`;e(S,r,i,`shrink-0 text-white`);var w=e(`inline-flex items-center gap-2 self-start rounded-lg p-2`,`text-sm font-normal leading-5 text-[var(--oh-muted)] cursor-pointer`,c,`hover:bg-tertiary hover:text-white`);export{c as _,S as a,x as c,n as d,v as f,u as g,C as h,r as i,y as l,i as m,f as n,g as o,b as p,w as r,_ as s,p as t,d as u};
1
+ import{t as e}from"./utils-BX9XJ0IE.js";var t=`h-9 min-h-9`,n=`rounded-lg`,r=`border border-[var(--oh-border)]`,i=`bg-base-secondary`,a=`duration-75`,o=`!duration-75`,s=`motion-reduce:transition-none`,c=e(`transition-[background-color,border-color,box-shadow,opacity]`,a,s),l=e(`!transition-[background-color,border-color,box-shadow,opacity]`,o,s),u=e(`transition-[transform] ease`,a,s),d=`hover:text-white hover:bg-white/10`,f=e(`inline-flex items-center gap-1 rounded-[100px] border border-transparent px-1.5`,`text-sm font-normal leading-5 text-[var(--oh-muted)] whitespace-nowrap min-w-0 cursor-pointer`,c,d),p=e(`flex items-center justify-center rounded-full text-[var(--oh-muted)] cursor-pointer`,c,d),m=`focus:border-white/40 focus:ring-1 focus:ring-white/20 focus:outline-none`,h=`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,g=`disabled:cursor-not-allowed disabled:opacity-60`,_=e(t,n,r,i,c,m,g,`w-full min-w-0 px-3 text-sm text-white placeholder:text-tertiary-alt`),v=e(_,`placeholder:italic`,l),y=e(n,r,i,c,m,g,`w-full min-w-0 px-3 py-2 text-sm text-white placeholder:text-tertiary-alt`),b=e(t,`relative flex min-w-0 items-center`,n,r,i,c,h),x=e(`min-w-0 flex-1 border-0 bg-transparent px-3 text-sm outline-none`,`placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`),S=e(t,`inline-flex w-fit cursor-pointer items-center justify-center gap-2 px-3`,n,c,`text-sm font-normal disabled:cursor-not-allowed disabled:opacity-30`),C=`pl-12`;e(S,r,i,`shrink-0 text-white`);var w=e(`inline-flex items-center gap-2 self-start rounded-lg p-2`,`text-sm font-normal leading-5 text-[var(--oh-muted)] cursor-pointer`,c,`hover:bg-tertiary hover:text-white`);export{c as _,S as a,x as c,n as d,v as f,u as g,C as h,r as i,y as l,i as m,f as n,g as o,b as p,w as r,_ as s,p as t,d as u};
@@ -0,0 +1 @@
1
+ import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{t as r,z as i}from"./utils-BX9XJ0IE.js";import{t as a}from"./loader-circle-C5AnEN8r.js";import{t as o}from"./styled-tooltip-CQ9JEFiO.js";import{a as s}from"./kebab-menu-item-content-By16Tm_0.js";import{t as c}from"./automation-C_eCrGyP.js";e();var l=t(),u=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})}),d=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})}),f={[c.COMPLETED]:{label:i.AUTOMATIONS$DETAIL$SUCCESSFUL,style:`border-[var(--oh-success)]/50 bg-[var(--oh-success)]/10 text-[var(--oh-success)]`,iconTone:`text-[var(--oh-success)]`},[c.FAILED]:{label:i.AUTOMATIONS$DETAIL$FAILED,style:`border-[var(--oh-danger)]/50 bg-[var(--oh-danger)]/10 text-danger`,iconTone:`text-danger`},[c.PENDING]:{label:i.AUTOMATIONS$DETAIL$PENDING,style:`border-[var(--oh-border)] bg-surface-raised text-muted`,iconTone:`text-muted`},[c.RUNNING]:{label:i.AUTOMATIONS$DETAIL$RUNNING,style:`border-[var(--oh-border)] bg-surface-raised text-muted`,iconTone:`text-muted`},[c.CANCELLED]:{label:i.AUTOMATIONS$DETAIL$CANCELLED,style:`border-[var(--oh-border)] bg-surface-raised text-muted`,iconTone:`text-muted`},[c.SKIPPED]:{label:i.AUTOMATIONS$DETAIL$SKIPPED,style:`border-[var(--oh-border)] bg-surface-raised text-muted`,iconTone:`text-muted`}};function p({status:e,compact:t=!1}){let n=t?`size-3`:`size-3.5`;switch(e){case c.COMPLETED:return(0,l.jsx)(u,{"data-testid":`run-status-icon-completed`,className:n});case c.FAILED:return(0,l.jsx)(d,{"data-testid":`run-status-icon-failed`,className:n});case c.RUNNING:return(0,l.jsx)(a,{"data-testid":`run-status-icon-running`,className:r(n,`animate-spin motion-reduce:animate-none`),"aria-hidden":`true`});default:return(0,l.jsx)(s,{"data-testid":`run-status-icon-pending`,className:n})}}function m({status:e,iconOnly:t=!1,showLabel:i=!1,compact:a=!1}){let{t:s}=n(`openhands`),u=f[e]??f[c.PENDING],d=s(u.label);return t?i?(0,l.jsxs)(`span`,{"data-testid":`run-status-badge-icon`,className:r(`inline-flex min-w-0 shrink-0 items-center gap-1.5 text-xs font-medium`,u.iconTone),children:[(0,l.jsx)(p,{status:e,compact:a}),(0,l.jsx)(`span`,{className:`truncate`,children:d})]}):(0,l.jsx)(o,{content:d,placement:`top`,children:(0,l.jsx)(`span`,{role:`img`,"aria-label":d,"data-testid":`run-status-badge-icon`,className:r(`inline-flex shrink-0 cursor-default items-center justify-center`,u.iconTone),children:(0,l.jsx)(p,{status:e,compact:a})})}):(0,l.jsxs)(`span`,{className:r(`inline-flex items-center rounded-full border font-medium`,a?`gap-1 px-1.5 py-0 text-[10px] leading-4`:`gap-1.5 px-2.5 py-1 text-xs`,u.style),children:[(0,l.jsx)(p,{status:e,compact:a}),d]})}function h(e,t){return new Date(e).toLocaleDateString(t,{year:`numeric`,month:`short`,day:`numeric`})}function g(e,t,n){let r=Date.now()-new Date(e).getTime(),a=Math.floor(r/6e4),o=Math.floor(r/36e5),s=Math.floor(r/864e5);return a<1?n(i.AUTOMATIONS$DETAIL$TIME_JUST_NOW):a<60?n(i.AUTOMATIONS$DETAIL$TIME_MINUTES_AGO,{count:a}):o<24?n(i.AUTOMATIONS$DETAIL$TIME_HOURS_AGO,{count:o}):s===1?n(i.AUTOMATIONS$DETAIL$TIME_YESTERDAY):s<7?n(i.AUTOMATIONS$DETAIL$TIME_DAYS_AGO,{count:s}):h(e,t)}export{u as i,g as n,m as r,h as t};
@@ -0,0 +1 @@
1
+ var e=e=>e.includes(`Z`)||e.match(/[+-]\d{2}:\d{2}$/)!==null?new Date(e):new Date(`${e}Z`),t=t=>{let n=typeof t==`string`?e(t):t,r=new Date().getTime()-n.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),o=Math.floor(a/60),s=Math.floor(o/24),c=Math.floor(s/30),l=Math.floor(c/12);return i<60?`${i}s`:a<60?`${a}m`:o<24?`${o}h`:s<30?`${s}d`:c<12?`${c}mo`:`${l}y`};export{t};
@@ -0,0 +1 @@
1
+ import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{E as i,w as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";import{t as o}from"./useMutation-ChpkYxI5.js";import{At as s,kt as c}from"./active-backend-context-B0wI7OzM.js";import{C as l,i as u,t as d,z as f}from"./utils-BX9XJ0IE.js";import{a as p,o as m,t as h}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js";import{t as g}from"./use-tracking-CTtkLAmx.js";import{n as _}from"./navigation-context-CQZwH_tC.js";import{t as v}from"./dist-Bl64nBZL.js";import{n as y}from"./conversation-store-B8Eahyeg.js";import{t as b}from"./agent-server-conversation-service.api-km_8sOVf.js";import{d as x,u as S}from"./conversation-state-store-C2QzhPaK.js";var C=i(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),w=t(),T=v(`shrink-0 self-stretch min-w-full bg-[var(--oh-border)]`,{variants:{orientation:{horizontal:`h-[1px]`},color:{light:`bg-[var(--oh-border)]`},size:{thin:`h-[1px]`},inset:{none:``,menu:``}},defaultVariants:{orientation:`horizontal`,color:`light`,size:`thin`,inset:`none`}});function E({orientation:e,color:t,size:n,inset:r,className:i,testId:a}){return r===`menu`?(0,w.jsx)(`div`,{"data-testid":a,role:`separator`,className:d(`relative min-w-full shrink-0 self-stretch`,`h-3`,i),children:(0,w.jsx)(`div`,{"aria-hidden":!0,className:`absolute top-1/2 -left-1 -right-1 h-px -translate-y-1/2 bg-[var(--oh-border)]`})}):(0,w.jsx)(`div`,{"data-testid":a,role:`separator`,className:d(T({orientation:e,color:t,size:n,inset:r}),i)})}var D=()=>{let e=n();return o({mutationFn:e=>b.deleteConversation(e.conversationId),onMutate:async t=>{await e.cancelQueries({queryKey:[`user`,`conversations`]});let n=e.getQueryData([`user`,`conversations`]);return e.setQueryData([`user`,`conversations`],e=>e?.filter(e=>e.conversation_id!==t.conversationId)),{previousConversations:n}},onSuccess:(e,t)=>{y(t.conversationId)},onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:()=>{e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`start-tasks`]})}})},O=()=>{let{t:e}=r(`openhands`),t=n(),{conversationId:i,navigate:u}=_();return o({mutationKey:[`stop-conversation`],mutationFn:async e=>x(e.conversationId),onMutate:async()=>{let n=a.loading(e(f.TOAST$STOPPING_CONVERSATION),c);return await t.cancelQueries({queryKey:[`user`,`conversations`]}),{previousConversations:t.getQueryData([`user`,`conversations`]),toastId:n}},onError:(n,r,i)=>{i?.toastId&&a.dismiss(i.toastId),s(e(f.TOAST$FAILED_TO_STOP_CONVERSATION)),i?.previousConversations&&t.setQueryData([`user`,`conversations`],i.previousConversations)},onSuccess:(n,r,o)=>{o?.toastId&&a.dismiss(o.toastId),a.success(e(f.TOAST$CONVERSATION_STOPPED),c),S(t,r.conversationId,{execution_status:l.PAUSED,sandbox_status:`PAUSED`}),i===r.conversationId&&u(`/conversations`)}})};function k(e){return e===`MISSING`||e===`ERROR`}e();var A=e=>(0,w.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M22.1595 5.22752L20.9895 4.95152L17.8275 8.09552L16.0365 6.27152L19.1205 3.03602L18.8505 1.84802C18.1988 1.62999 17.5172 1.51461 16.83 1.50602C16.0804 1.49449 15.3365 1.63746 14.6445 1.92602C13.9764 2.22843 13.3725 2.65616 12.8655 3.18602C12.3011 3.72063 11.8542 4.36683 11.553 5.08352C10.9732 6.50984 10.9732 8.10619 11.553 9.53252C8.42587 12.609 5.3391 15.7263 2.29351 18.8835C1.97851 19.296 1.82851 19.8105 1.86751 20.328C1.89825 20.8846 2.14856 21.4063 2.56351 21.7785C2.74951 21.981 2.97151 22.149 3.21901 22.2705C3.47401 22.383 3.74851 22.4475 4.02601 22.461C4.50001 22.452 4.95451 22.272 5.30701 21.9555C7.62901 19.77 12.078 15.2805 14.6055 12.6495C15.291 12.9405 16.0275 13.0905 16.7715 13.089C17.5204 13.0884 18.2616 12.9377 18.9513 12.6458C19.641 12.3539 20.2652 11.9267 20.787 11.3895C21.8588 10.2964 22.4575 8.82543 22.4535 7.29452C22.4708 6.59398 22.3715 5.89544 22.1595 5.22752ZM4.39951 20.892C4.34178 20.9433 4.27218 20.9794 4.19701 20.997C4.12306 21.0098 4.04746 21.0098 3.97351 20.997C3.89598 20.9852 3.82213 20.956 3.75751 20.9115C3.68817 20.8709 3.62955 20.8144 3.58651 20.7465C3.37651 20.532 3.18001 20.124 3.37651 19.8945C5.43151 17.709 9.66301 13.437 12.309 10.8255C12.459 11.0235 12.624 11.2125 12.801 11.3895C12.978 11.574 13.1685 11.745 13.371 11.901C10.812 14.526 6.63901 18.747 4.40101 20.892H4.39951ZM21.0765 7.29452C21.0795 8.44202 20.6325 9.54452 19.8285 10.3665C19.0262 11.1536 17.9472 11.5944 16.8233 11.5944C15.6994 11.5944 14.6203 11.1536 13.818 10.3665C13.23 9.75286 12.8283 8.98485 12.6597 8.15183C12.4911 7.31882 12.5624 6.45505 12.8655 5.66102C13.0673 5.12062 13.3802 4.62858 13.784 4.21671C14.1879 3.80485 14.6737 3.48233 15.21 3.27002C15.7192 3.05688 16.266 2.94774 16.818 2.94902H17.199L14.4735 5.75852V6.80252L17.316 9.63152H18.306L21.0765 6.90752V7.29452ZM4.86001 10.032H7.15651L8.21401 11.1075L9.23101 10.0965L8.23351 9.07952V9.01502L8.31901 6.54152L7.98901 5.88602L3.69901 3.06302L2.81251 3.16202L1.56601 4.43552L1.46701 5.33402L4.22401 9.71102L4.86001 10.0335V10.032ZM3.44251 4.58402L6.91351 6.87002L6.85501 8.55452H5.24101L3.00301 5.01152L3.44251 4.58402ZM14.1 15.024L15.111 14.0145L19.77 18.792C20.1624 19.2045 20.3813 19.752 20.3813 20.3213C20.3813 20.8906 20.1624 21.4381 19.77 21.8505C19.4749 22.1535 19.0955 22.3605 18.6811 22.4448C18.2667 22.5291 17.8365 22.4866 17.4465 22.323C17.1976 22.2126 16.9744 22.0517 16.791 21.8505L12.078 17.046L13.0965 16.029L17.7945 20.82C17.8577 20.8897 17.9363 20.9436 18.024 20.9775C18.1967 21.0476 18.3899 21.0476 18.5625 20.9775C18.6502 20.9436 18.7288 20.8897 18.792 20.82C18.8577 20.755 18.9088 20.6768 18.942 20.5905C18.9764 20.5025 18.9947 20.409 18.996 20.3145C18.9945 20.2202 18.9767 20.1268 18.9435 20.0385C18.9103 19.9523 18.8592 19.8741 18.7935 19.809L14.1 15.024Z`,fill:`currentColor`})}),j=e=>(0,w.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,w.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 13.0605L17.469 18.531L18.531 17.4705L13.0605 12L18.531 6.53099L17.4705 5.46899L12 10.9395L6.53099 5.46899L5.47049 6.53099L10.9395 12L5.47049 17.469L6.53099 18.531L12 13.0605Z`,fill:`currentColor`})}),M=e=>(0,w.jsx)(`svg`,{height:24,viewBox:`0 0 24 24`,width:24,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,w.jsx)(`path`,{fill:`currentColor`,d:`m22 18-5 4-8-3v3l-4.19-5.75 12.91 1.05v-10.96l4.28-.69zm-17.19-1.75v-7.29l12.91-2.62-7.12-4.34v2.84l-6.63 1.92-1.97 2.62v5.69z`})}),N=e=>(0,w.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,w.jsx)(`path`,{d:`M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM7.79289 7.79289C8.18342 7.40237 8.81658 7.40237 9.20711 7.79289L12 10.5858L14.7929 7.79289C15.1834 7.40237 15.8166 7.40237 16.2071 7.79289C16.5976 8.18342 16.5976 8.81658 16.2071 9.20711L13.4142 12L16.2071 14.7929C16.5976 15.1834 16.5976 15.8166 16.2071 16.2071C15.8166 16.5976 15.1834 16.5976 14.7929 16.2071L12 13.4142L9.20711 16.2071C8.81658 16.5976 8.18342 16.5976 7.79289 16.2071C7.40237 15.8166 7.40237 15.1834 7.79289 14.7929L10.5858 12L7.79289 9.20711C7.40237 8.81658 7.40237 8.18342 7.79289 7.79289Z`,fill:`currentColor`})}),P=()=>{let{trackDownloadTrajectoryButtonClicked:e}=g(),{t}=r(`openhands`);return o({mutationKey:[`conversations`,`download`],mutationFn:async t=>{e(),u(await b.downloadConversation(t),`conversation_${t}.zip`)},onError:()=>{s(t(f.CONVERSATION$DOWNLOAD_ERROR))}})};function F({gitProvider:e,className:t}){return(0,w.jsxs)(w.Fragment,{children:[e===`github`&&(0,w.jsx)(p,{size:14,className:t}),e===`gitlab`&&(0,w.jsx)(m,{size:14,className:t}),e===`bitbucket`&&(0,w.jsx)(h,{size:14,className:t}),e===`bitbucket_data_center`&&(0,w.jsx)(h,{size:14,className:t}),e===`azure_devops`&&(0,w.jsx)(M,{className:d(t,`w-[14px] h-[14px]`)})]})}export{j as a,O as c,C as d,M as i,D as l,P as n,A as o,N as r,k as s,F as t,E as u};
@@ -0,0 +1 @@
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~gxu4j2ea-Cwhh3zLe.js";import{t as i,z as a}from"./utils-BX9XJ0IE.js";import{s as o}from"./form-control-classes-pHtZUI6K.js";import{t as s}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js";import{c,i as l,r as u,u as d}from"./dropdown-classes-f91ARMV1.js";import{r as f,t as p}from"./combobox-caret-Bwiifgjs.js";import{a as m,c as h,i as g,n as _,r as v,t as y}from"./home-store-DM4qw1lF.js";import{r as b}from"./typography-BSbUhJPn.js";var x=e(t(),1),S=n();function C({disabled:e,onClear:t,testId:n=`dropdown-clear`}){let{t:o}=r(`openhands`);return(0,S.jsx)(`button`,{onClick:e=>{e.stopPropagation(),t()},disabled:e,className:i(`p-1 text-[#fff]`,`cursor-pointer disabled:cursor-not-allowed disabled:opacity-60`),type:`button`,"aria-label":o(a.COMMON$CLEAR_SELECTION),"data-testid":n,children:(0,S.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,S.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})}function w({isOpen:e,disabled:t,getToggleButtonProps:n,iconClassName:o}){let{t:s}=r(`openhands`);return(0,S.jsx)(`button`,{...n({disabled:t,className:i(f,`text-current`,e&&`rotate-180`,t&&`cursor-not-allowed opacity-60`)}),type:`button`,"aria-label":s(a.COMMON$TOGGLE_MENU),children:(0,S.jsx)(p,{className:o})})}function T({item:e,index:t,isSelected:n,getItemProps:r,getDisplayText:a,getItemKey:o,isProviderDropdown:s=!1,renderIcon:l,itemClassName:f,ariaLabel:p}){return(0,S.jsx)(`li`,{...r({index:t,item:e,...p?{"aria-label":p}:{},className:i(s?`group px-2 py-0 cursor-pointer text-xs rounded-md mx-0 my-0 h-6 flex items-center`:`group px-2 py-2 cursor-pointer text-sm rounded-md mx-0 my-0.5`,`text-white focus:outline-none font-normal`,u,{"bg-[var(--oh-interactive-selected)] text-white":n,"hover:bg-[var(--oh-interactive-hover)]":!n},f)}),children:(0,S.jsxs)(`div`,{className:i(`flex items-center`,c),children:[l?(0,S.jsx)(`span`,{className:d,children:l(e)}):null,(0,S.jsx)(`span`,{className:`font-normal`,children:a(e)})]})},o(e))}function E({inputValue:e,searchMessage:t=`No items found`,emptyMessage:n=`No items available`,testId:r=`dropdown-empty`}){return(0,S.jsx)(`li`,{className:`px-3 py-2 text-[var(--oh-text-secondary)] text-sm rounded-lg mx-0.5 my-0.5`,"data-testid":r,children:e?t:n})}function D({isOpen:e,filteredItems:t,inputValue:n,highlightedIndex:r,selectedItem:a,getMenuProps:o,getItemProps:s,onScroll:c,menuRef:u,renderItem:d,renderItemPrefix:f,renderEmptyState:p,stickyTopItem:m,stickyFooterItem:h,testId:g,numberOfRecentItems:_=0,itemKey:v}){let y=!(t.length>0)&&!m&&!h;return e?(0,S.jsx)(`div`,{className:`relative`,children:(0,S.jsxs)(`div`,{className:i(`absolute z-10 w-full bg-tertiary border border-[var(--oh-border-input)] rounded-lg shadow-none`,`focus:outline-none mt-1 z-[9999]`,`max-h-60`),children:[(0,S.jsx)(`ul`,{...o({ref:u,className:i(`w-full overflow-auto p-1 custom-scrollbar-always`,l,m||h?`max-h-[calc(15rem-3rem)]`:`max-h-60`),onScroll:c,"data-testid":g}),children:y?p(n):(0,S.jsxs)(S.Fragment,{children:[m,t.map((e,t)=>{let n=v(e);return(0,S.jsxs)(x.Fragment,{children:[f?.(e,t),d(e,t,r,a,s),_>0&&t===_-1&&(0,S.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,className:`border-b border-[var(--oh-border-input)] bg-tertiary pb-1 mb-1 h-[1px]`})]},n)})]})}),h&&(0,S.jsx)(`div`,{className:`border-t border-[var(--oh-border-input)] bg-tertiary p-1 rounded-b-lg`,children:h})]})}):(0,S.jsx)(`div`,{className:`relative`,children:(0,S.jsx)(`ul`,{...o({ref:u,className:`hidden`,"data-testid":g})})})}function O({isError:e,message:t=`Failed to load data`,testId:n=`dropdown-error`}){return e?(0,S.jsx)(`div`,{className:`text-red-500 text-sm mt-1`,"data-testid":n,children:t}):null}function k(e,t){let[n,r]=(0,x.useState)([]),[i,a]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{(async()=>{if(!t){r([]);return}if(e.startsWith(`https://`)){let n=e.match(/https:\/\/[^/]+\/([^/]+\/[^/]+)/);if(n){let e=n[1];a(!0);try{r((await m.searchGitRepositories(e,t,3)).items)}catch{r([])}finally{a(!1)}}}else r([])})()},[e,t]),{urlSearchResults:n,isUrlSearchLoading:i}}function ee(e,t,n,r,i,a,o){let{data:s,fetchNextPage:c,hasNextPage:l,isLoading:u,isFetchingNextPage:d,isError:f}=g({provider:e,enabled:!t}),{data:p,isLoading:m}=v(n,e,(0,x.useMemo)(()=>i===o,[o,i])),h=(0,x.useMemo)(()=>s?.pages?.flatMap(e=>e.items)||[],[s]),_=(0,x.useMemo)(()=>a&&[...h,...r,...p||[]].find(e=>e.id===a)||null,[h,r,p,a]),y=(0,x.useMemo)(()=>r.length>0?r:n&&p&&i!==_?.full_name?p:h,[r,n,p,h,_,i]);return(0,x.useEffect)(()=>{!t&&!u&&!d&&!m&&l&&!n&&r.length===0&&y.length>0&&y.length<10&&c()},[t,u,d,m,l,n,r.length,y.length,c]),{repositories:y,allRepositories:h,selectedRepository:_,fetchNextPage:c,hasNextPage:l,isLoading:u,isFetchingNextPage:d,isError:f,isSearchLoading:m}}function A({provider:e,value:t,repositoryName:n,placeholder:c,className:l,disabled:u=!1,onChange:d}){let{t:f}=r(`openhands`),{recentRepositories:p}=y(),[m,g]=(0,x.useState)(``),[v,A]=(0,x.useState)(null),j=_(m,300),M=(0,x.useRef)(null),N=(0,x.useMemo)(()=>{if(j.startsWith(`https://`)){let e=j.match(/https:\/\/[^/]+\/([^/]+\/[^/]+)/);return e?e[1]:j}return j},[j]),{urlSearchResults:P,isUrlSearchLoading:te}=k(m,e),{repositories:F,selectedRepository:I,fetchNextPage:L,hasNextPage:R,isLoading:z,isFetchingNextPage:B,isError:V,isSearchLoading:H}=ee(e,u,N,P,m,t,n),U=I??v,W=(0,x.useMemo)(()=>{let t=p.filter(t=>t.git_provider===e);if(!m?.trim())return t;let n=m.startsWith(`https://`)?N:m;return t.filter(e=>e.full_name.toLowerCase().includes(n.toLowerCase()))},[p,e,m,N]),G=(0,x.useCallback)(e=>{let t=new Set(W.map(e=>e.id)),n=e.filter(e=>!t.has(e.id));return[...W,...n]},[W]),K=(0,x.useMemo)(()=>{let e;if(P.length>0)e=F;else if(m===I?.full_name)e=F;else if(!m?.trim())e=F;else{let t=m.startsWith(`https://`)?N:m;e=F.filter(e=>e.full_name.toLowerCase().includes(t.toLowerCase()))}return G(e)},[F,m,I,P,N,G]),q=(0,x.useCallback)(e=>{A(e),d?.(e||void 0),e&&g(e.full_name)},[d]),J=(0,x.useCallback)(()=>{A(null),q(null),g(``)},[q]),Y=(0,x.useCallback)(e=>{let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;t+r>=n-10&&R&&!B&&L()},[R,B,L]),{isOpen:X,getToggleButtonProps:Z,getMenuProps:ne,getInputProps:re,highlightedIndex:ie,getItemProps:Q,selectedItem:$}=s({items:K,itemToString:e=>e?.full_name||``,selectedItem:v,onSelectedItemChange:({selectedItem:e})=>{q(e)},inputValue:m,stateReducer:(e,t)=>t.type===s.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes});(0,x.useEffect)(()=>{I?A(I):t===null&&A(null)},[I,t]),(0,x.useEffect)(()=>{X||g(U?.full_name??``)},[U,X]);let ae=z||H||B||te,oe=(e,t,n,r,i)=>(0,S.jsx)(T,{item:e,index:t,isSelected:r?.id===e.id,getItemProps:i,getDisplayText:e=>e.full_name,getItemKey:e=>e.id},e.id),se=e=>(0,S.jsx)(E,{inputValue:e,searchMessage:f(a.HOME$NO_REPOSITORY_FOUND),emptyMessage:f(a.COMMON$NO_REPOSITORY),testId:`git-repo-dropdown-empty`}),ce=(0,x.useMemo)(()=>W.length===0?null:(0,S.jsx)(`div`,{children:(0,S.jsx)(b.Text,{className:`text-xs text-content-2 font-semibold leading-4 pl-2`,children:f(a.COMMON$MOST_RECENT)})}),[W,v,Q,f]);return(0,S.jsxs)(`div`,{className:i(`relative`,l),children:[(0,S.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[(0,S.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:ae?(0,S.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`}):(0,S.jsx)(h,{width:16,height:16})}),(0,S.jsx)(`input`,{...re({disabled:u,placeholder:c??f(a.COMMON$SEARCH_REPOSITORIES_PLACEHOLDER),className:i(o,`text-inherit shadow-none pl-7 pr-16 text-sm font-normal leading-5`,`placeholder:text-[var(--oh-muted)]`,`disabled:cursor-not-allowed disabled:opacity-60`),onChange:e=>{g(e.target.value)}}),"data-testid":`git-repo-dropdown`}),(0,S.jsxs)(`div`,{className:`absolute right-1 top-1/2 transform -translate-y-1/2 flex items-center`,children:[U&&(0,S.jsx)(C,{disabled:u,onClear:J}),(0,S.jsx)(w,{isOpen:X,disabled:u,getToggleButtonProps:Z})]})]}),(0,S.jsx)(D,{isOpen:X,filteredItems:K,inputValue:m,highlightedIndex:ie,selectedItem:$,getMenuProps:ne,getItemProps:Q,onScroll:Y,menuRef:M,renderItem:oe,renderEmptyState:se,stickyTopItem:ce,testId:`git-repo-dropdown-menu`,numberOfRecentItems:W.length,itemKey:e=>e.id}),(0,S.jsx)(O,{isError:V})]})}export{T as a,E as i,O as n,w as o,D as r,C as s,A as t};
@@ -0,0 +1 @@
1
+ import"./git-repo-dropdown-CWnaUyxL.js";
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as i,z as a}from"./utils-DsWhWn2F.js";import{ot as o,st as s}from"./vendor-markdown-BML7QbqS.js";import{t as c}from"./folder-C86qXV7M.js";import{t as l}from"./syntax-highlighter-B92AFGMy.js";var u=e(t(),1);function d(e){e.children.sort((e,t)=>e.isDirectory===t.isDirectory?e.name.localeCompare(t.name):e.isDirectory?-1:1);for(let t of e.children)t.isDirectory&&d(t)}function f(e,t,n,r,i){let a=t.get(e);a||(a=new Map,t.set(e,a));let o=a.get(n);if(o)return!i&&!o.isDirectory&&(o.isDirectory=!0),o;let s={name:n,path:r,isDirectory:!i,children:[]};return e.children.push(s),a.set(n,s),s}function p(e){let t={name:``,path:``,isDirectory:!0,children:[]},n=new Map;for(let r of e){let e=r.split(`/`).filter(Boolean);if(e.length>0){let r=t,i=``;for(let t=0;t<e.length;t+=1){let a=e[t];i=i?`${i}/${a}`:a;let o=t===e.length-1;r=f(r,n,a,i,o)}}}return d(t),t}var m=n();function h({node:e,depth:t,selectedPath:n,onSelectFile:r}){let[a,o]=(0,u.useState)(!1),s=8+t*12;if(e.isDirectory)return(0,m.jsxs)(`li`,{children:[(0,m.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),"aria-expanded":a,"data-testid":`file-tree-dir-${e.path}`,className:i(`flex w-full items-center gap-1.5 py-1 pr-2 text-left text-sm text-white`,`hover:bg-tertiary cursor-pointer`),style:{paddingLeft:`${s}px`},children:[(0,m.jsx)(`span`,{"aria-hidden":!0,className:i(`inline-block w-3 text-[10px] text-[var(--oh-muted)] transition-transform`,a?`rotate-90`:`rotate-0`),children:`▶`}),(0,m.jsx)(c,{className:`w-3.5 h-3.5 shrink-0`}),(0,m.jsx)(`span`,{className:`truncate`,children:e.name})]}),a&&e.children.length>0&&(0,m.jsx)(`ul`,{children:e.children.map(e=>(0,m.jsx)(h,{node:e,depth:t+1,selectedPath:n,onSelectFile:r},e.path))})]});let d=n===e.path;return(0,m.jsx)(`li`,{children:(0,m.jsxs)(`button`,{type:`button`,onClick:()=>r(e.path),"data-testid":`file-tree-file-${e.path}`,className:i(`flex w-full items-center gap-1.5 py-1 pr-2 text-left text-sm`,`hover:bg-tertiary cursor-pointer`,d?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-text-tertiary)]`),style:{paddingLeft:`${s+16}px`},children:[(0,m.jsx)(l,{className:`w-3.5 h-3.5 shrink-0`}),(0,m.jsx)(`span`,{className:`truncate`,children:e.name})]})})}function g({paths:e,selectedPath:t,onSelectFile:n}){let{t:i}=r(`openhands`),o=(0,u.useMemo)(()=>p(e),[e]);return o.children.length===0?(0,m.jsx)(`div`,{className:`px-3 py-4 text-sm text-[var(--oh-muted)]`,children:i(a.FILES$NO_FILES)}):(0,m.jsx)(`ul`,{className:`py-1 custom-scrollbar-always`,"data-testid":`file-tree-view`,children:o.children.map(e=>(0,m.jsx)(h,{node:e,depth:0,selectedPath:t,onSelectFile:n},e.path))})}var _={js:`javascript`,jsx:`jsx`,mjs:`javascript`,cjs:`javascript`,ts:`typescript`,tsx:`tsx`,py:`python`,pyi:`python`,pyw:`python`,html:`markup`,htm:`markup`,svg:`markup`,xml:`markup`,css:`css`,scss:`scss`,sass:`sass`,less:`less`,json:`json`,json5:`json5`,yaml:`yaml`,yml:`yaml`,toml:`toml`,ini:`ini`,cfg:`ini`,properties:`properties`,conf:`ini`,env:`bash`,md:`markdown`,markdown:`markdown`,mdx:`markdown`,sh:`bash`,bash:`bash`,zsh:`bash`,fish:`bash`,bat:`batch`,cmd:`batch`,ps1:`powershell`,ps:`powershell`,c:`c`,h:`c`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,hpp:`cpp`,hh:`cpp`,cs:`csharp`,java:`java`,kt:`kotlin`,kts:`kotlin`,scala:`scala`,rs:`rust`,go:`go`,rb:`ruby`,php:`php`,swift:`swift`,m:`objectivec`,mm:`objectivec`,hs:`haskell`,ex:`elixir`,exs:`elixir`,erl:`erlang`,fs:`fsharp`,fsx:`fsharp`,ml:`ocaml`,mli:`ocaml`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,lua:`lua`,pl:`perl`,pm:`perl`,r:`r`,jl:`julia`,dart:`dart`,groovy:`groovy`,gradle:`groovy`,tf:`hcl`,hcl:`hcl`,dockerfile:`docker`,sql:`sql`,graphql:`graphql`,gql:`graphql`,proto:`protobuf`,diff:`diff`,patch:`diff`,nix:`nix`,sol:`solidity`},v={dockerfile:`docker`,makefile:`makefile`,gnumakefile:`makefile`,".bashrc":`bash`,".zshrc":`bash`,".profile":`bash`,".env":`bash`,".gitignore":`bash`,".dockerignore":`bash`};function y(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`)),n=e.slice(t+1),r=n.lastIndexOf(`.`);return r<=0?``:n.slice(r+1).toLowerCase()}function b(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return e.slice(t+1).toLowerCase()}function x(e,t){let n=v[b(e)];if(n)return n;let r=y(e);if(r&&_[r])return _[r];if(t){if(t===`text/html`)return`markup`;if(t===`text/css`)return`css`;if(t===`application/json`)return`json`;if(t===`text/markdown`)return`markdown`;if(t===`application/javascript`||t===`text/javascript`)return`javascript`;if(t===`application/x-yaml`||t===`text/yaml`)return`yaml`}return null}function S({path:e,text:t,mimeType:n}){let r=x(e,n);return r?(0,m.jsx)(`div`,{"data-testid":`file-content-viewer-highlighted`,"data-language":r,className:`h-full w-full overflow-auto bg-[var(--oh-surface)] custom-scrollbar-always`,children:(0,m.jsx)(o,{language:r,style:s,showLineNumbers:!0,wrapLongLines:!1,customStyle:{margin:0,padding:`1rem`,background:`transparent`,fontSize:`0.75rem`,lineHeight:`1.25rem`,minHeight:`100%`},codeTagProps:{style:{background:`transparent`,fontFamily:`inherit`}},lineNumberStyle:{color:`var(--oh-border)`,minWidth:`2.5em`,paddingRight:`1em`,userSelect:`none`},children:t})}):(0,m.jsx)(`pre`,{"data-testid":`file-content-viewer-plain`,className:`h-full w-full overflow-auto whitespace-pre-wrap break-words bg-[var(--oh-surface)] p-4 text-xs leading-5 text-white custom-scrollbar-always`,children:t})}export{g as n,S as t};
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~gxu4j2ea-Cwhh3zLe.js";import{t as i,z as a}from"./utils-BX9XJ0IE.js";import{ot as o,st as s}from"./vendor-markdown-j0kYzV48.js";import{t as c}from"./folder-C1ou4_DT.js";import{t as l}from"./syntax-highlighter-BGDg_7w9.js";var u=e(t(),1);function d(e){e.children.sort((e,t)=>e.isDirectory===t.isDirectory?e.name.localeCompare(t.name):e.isDirectory?-1:1);for(let t of e.children)t.isDirectory&&d(t)}function f(e,t,n,r,i){let a=t.get(e);a||(a=new Map,t.set(e,a));let o=a.get(n);if(o)return!i&&!o.isDirectory&&(o.isDirectory=!0),o;let s={name:n,path:r,isDirectory:!i,children:[]};return e.children.push(s),a.set(n,s),s}function p(e){let t={name:``,path:``,isDirectory:!0,children:[]},n=new Map;for(let r of e){let e=r.split(`/`).filter(Boolean);if(e.length>0){let r=t,i=``;for(let t=0;t<e.length;t+=1){let a=e[t];i=i?`${i}/${a}`:a;let o=t===e.length-1;r=f(r,n,a,i,o)}}}return d(t),t}var m=n();function h({node:e,depth:t,selectedPath:n,onSelectFile:r}){let[a,o]=(0,u.useState)(!1),s=8+t*12;if(e.isDirectory)return(0,m.jsxs)(`li`,{children:[(0,m.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),"aria-expanded":a,"data-testid":`file-tree-dir-${e.path}`,className:i(`flex w-full items-center gap-1.5 py-1 pr-2 text-left text-sm text-white`,`hover:bg-tertiary cursor-pointer`),style:{paddingLeft:`${s}px`},children:[(0,m.jsx)(`span`,{"aria-hidden":!0,className:i(`inline-block w-3 text-[10px] text-[var(--oh-muted)] transition-transform`,a?`rotate-90`:`rotate-0`),children:`▶`}),(0,m.jsx)(c,{className:`w-3.5 h-3.5 shrink-0`}),(0,m.jsx)(`span`,{className:`truncate`,children:e.name})]}),a&&e.children.length>0&&(0,m.jsx)(`ul`,{children:e.children.map(e=>(0,m.jsx)(h,{node:e,depth:t+1,selectedPath:n,onSelectFile:r},e.path))})]});let d=n===e.path;return(0,m.jsx)(`li`,{children:(0,m.jsxs)(`button`,{type:`button`,onClick:()=>r(e.path),"data-testid":`file-tree-file-${e.path}`,className:i(`flex w-full items-center gap-1.5 py-1 pr-2 text-left text-sm`,`hover:bg-tertiary cursor-pointer`,d?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-text-tertiary)]`),style:{paddingLeft:`${s+16}px`},children:[(0,m.jsx)(l,{className:`w-3.5 h-3.5 shrink-0`}),(0,m.jsx)(`span`,{className:`truncate`,children:e.name})]})})}function g({paths:e,selectedPath:t,onSelectFile:n}){let{t:i}=r(`openhands`),o=(0,u.useMemo)(()=>p(e),[e]);return o.children.length===0?(0,m.jsx)(`div`,{className:`px-3 py-4 text-sm text-[var(--oh-muted)]`,children:i(a.FILES$NO_FILES)}):(0,m.jsx)(`ul`,{className:`py-1 custom-scrollbar-always`,"data-testid":`file-tree-view`,children:o.children.map(e=>(0,m.jsx)(h,{node:e,depth:0,selectedPath:t,onSelectFile:n},e.path))})}var _={js:`javascript`,jsx:`jsx`,mjs:`javascript`,cjs:`javascript`,ts:`typescript`,tsx:`tsx`,py:`python`,pyi:`python`,pyw:`python`,html:`markup`,htm:`markup`,svg:`markup`,xml:`markup`,css:`css`,scss:`scss`,sass:`sass`,less:`less`,json:`json`,json5:`json5`,yaml:`yaml`,yml:`yaml`,toml:`toml`,ini:`ini`,cfg:`ini`,properties:`properties`,conf:`ini`,env:`bash`,md:`markdown`,markdown:`markdown`,mdx:`markdown`,sh:`bash`,bash:`bash`,zsh:`bash`,fish:`bash`,bat:`batch`,cmd:`batch`,ps1:`powershell`,ps:`powershell`,c:`c`,h:`c`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,hpp:`cpp`,hh:`cpp`,cs:`csharp`,java:`java`,kt:`kotlin`,kts:`kotlin`,scala:`scala`,rs:`rust`,go:`go`,rb:`ruby`,php:`php`,swift:`swift`,m:`objectivec`,mm:`objectivec`,hs:`haskell`,ex:`elixir`,exs:`elixir`,erl:`erlang`,fs:`fsharp`,fsx:`fsharp`,ml:`ocaml`,mli:`ocaml`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,lua:`lua`,pl:`perl`,pm:`perl`,r:`r`,jl:`julia`,dart:`dart`,groovy:`groovy`,gradle:`groovy`,tf:`hcl`,hcl:`hcl`,dockerfile:`docker`,sql:`sql`,graphql:`graphql`,gql:`graphql`,proto:`protobuf`,diff:`diff`,patch:`diff`,nix:`nix`,sol:`solidity`},v={dockerfile:`docker`,makefile:`makefile`,gnumakefile:`makefile`,".bashrc":`bash`,".zshrc":`bash`,".profile":`bash`,".env":`bash`,".gitignore":`bash`,".dockerignore":`bash`};function y(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`)),n=e.slice(t+1),r=n.lastIndexOf(`.`);return r<=0?``:n.slice(r+1).toLowerCase()}function b(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return e.slice(t+1).toLowerCase()}function x(e,t){let n=v[b(e)];if(n)return n;let r=y(e);if(r&&_[r])return _[r];if(t){if(t===`text/html`)return`markup`;if(t===`text/css`)return`css`;if(t===`application/json`)return`json`;if(t===`text/markdown`)return`markdown`;if(t===`application/javascript`||t===`text/javascript`)return`javascript`;if(t===`application/x-yaml`||t===`text/yaml`)return`yaml`}return null}function S({path:e,text:t,mimeType:n}){let r=x(e,n);return r?(0,m.jsx)(`div`,{"data-testid":`file-content-viewer-highlighted`,"data-language":r,className:`h-full w-full overflow-auto bg-[var(--oh-surface)] custom-scrollbar-always`,children:(0,m.jsx)(o,{language:r,style:s,showLineNumbers:!0,wrapLongLines:!1,customStyle:{margin:0,padding:`1rem`,background:`transparent`,fontSize:`0.75rem`,lineHeight:`1.25rem`,minHeight:`100%`},codeTagProps:{style:{background:`transparent`,fontFamily:`inherit`}},lineNumberStyle:{color:`var(--oh-border)`,minWidth:`2.5em`,paddingRight:`1em`,userSelect:`none`},children:t})}):(0,m.jsx)(`pre`,{"data-testid":`file-content-viewer-plain`,className:`h-full w-full overflow-auto whitespace-pre-wrap break-words bg-[var(--oh-surface)] p-4 text-xs leading-5 text-white custom-scrollbar-always`,children:t})}export{g as n,S as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,i as r,yt as i}from"./vendor-styling-Ck5D_A2Q.js";import{F as a,U as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{t as s}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{E as c,w as l}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";import{t as u}from"./useQueries-Cjv3E8_1.js";import{t as d}from"./use-is-creating-conversation-CVefC9Ns.js";import{At as f,jt as p,kt as m,n as h}from"./active-backend-context-B0wI7OzM.js";import{t as g,z as _}from"./utils-BX9XJ0IE.js";import{t as v}from"./chevron-down-CnIbtM6i.js";import{t as y}from"./external-link-zWbg5KXS.js";import{t as b}from"./file-text-RecuaId_.js";import{a as x,c as S,d as C,f as w,h as T,i as ee,l as E,m as D,n as O,o as k,p as A,r as j,s as M,t as N,u as P}from"./onboarding-5CZvRBbh.js";import{t as F}from"./plus-CtzlyAoF.js";import{t as I}from"./search-CYaiKHRp.js";import{t as L}from"./x-RYDBg-e2.js";import{t as R}from"./zap-tbKDzCe3.js";import{n as z}from"./use-tracking-CTtkLAmx.js";import{t as B}from"./modal-backdrop-BSzNhM4r.js";import{n as V,r as H,t as te}from"./modal-body-BHGCSAtj.js";import{r as ne}from"./base-modal-C0RQPug5.js";import{r as re}from"./modal-classes-DSTLuxkA.js";import{_ as ie,i as ae,m as oe,s as se}from"./form-control-classes-pHtZUI6K.js";import{t as ce}from"./brand-button-DJmFCyMK.js";import{n as le}from"./navigation-context-CQZwH_tC.js";import{t as U}from"./navigation-link-Bxo3-4vo.js";import{t as ue}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js";import{t as de}from"./styled-tooltip-CQ9JEFiO.js";import{i as fe,n as pe,o as me,u as he}from"./dropdown-classes-f91ARMV1.js";import{t as ge}from"./conversation-store-B8Eahyeg.js";import{t as _e}from"./modal-close-button-dheWZ2ys.js";import{i as ve}from"./conversation-state-store-C2QzhPaK.js";import{t as ye}from"./use-click-outside-element-W6Os4Nlb.js";import{n as be}from"./use-create-conversation-FaP0kUpg.js";import{n as xe,t as Se}from"./context-menu-list-item-DhJCcBA0.js";import{n as Ce}from"./use-can-manage-org-profiles-Clw5Dh1s.js";import{t as we}from"./u-edit-DAkcF52u.js";import{c as Te,s as Ee,t as De}from"./home-store-DM4qw1lF.js";import{t as Oe}from"./folder-C1ou4_DT.js";import{t as ke}from"./use-user-conversation-Bei82QsZ.js";import{r as Ae}from"./typography-BSbUhJPn.js";import{i as je,n as Me,t as Ne}from"./extension-module-card-classes-Bo43vY5V.js";import{n as Pe}from"./circle-plus-check-toggle-CB_sNERY.js";import{t as Fe}from"./x-mark-BopmFoBq.js";import{F as Ie,I as Le,N as Re,R as ze,T as Be,a as Ve,c as He,i as Ue,l as We,n as Ge,o as Ke,r as qe,s as Je,t as Ye,z as Xe}from"./llm-not-configured-banner-DrBrhfN0.js";import{y as Ze}from"./markdown-renderer-lsvsp7jn.js";import{t as Qe}from"./use-plugins-marketplace-DRFNLBlr.js";import{_ as $e,a as et,c as tt,d as nt,i as rt,l as it,m as at,n as ot,o as st,p as ct,r as lt,s as ut,t as dt}from"./kebab-menu-item-content-By16Tm_0.js";import{t as W}from"./automation-C_eCrGyP.js";import{t as ft}from"./vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js";import{i as pt}from"./use-manifest-capabilities-DLP5wCxp.js";import{n as mt,r as ht}from"./format-relative-time-6-3uvOXe.js";import{a as gt,i as _t,o as vt,r as yt,s as bt,t as xt}from"./git-repo-dropdown-CWnaUyxL.js";import"./git-repo-dropdown-TzOuG5Ef.js";var St=c(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),G=e(t(),1);async function Ct(e){let{imagesToEmbed:t}=Xe(e.images,e.imagesMarkedUploadAsFile),n=await Promise.all(t.map(e=>Ie(e)));Ze.getState().enqueuePendingMessage({conversationId:e.conversationId,text:e.text,content:e.text,imageUrls:n,fileUrls:[]})}var K=i();function wt({plugin:e,isSelected:t,isDisabled:n=!1,onToggle:r}){return(0,K.jsxs)(`div`,{"data-testid":`plugin-picker-card-${e.name}`,className:g(`flex min-w-0 items-start justify-between gap-3 rounded-lg bg-tertiary p-4`),children:[(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,K.jsx)(`h3`,{"data-testid":`plugin-picker-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),(0,K.jsx)(`p`,{className:`mt-0.5 min-w-0 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),e.description?(0,K.jsx)(`p`,{className:`mt-1 line-clamp-2 text-xs text-tertiary-light`,children:e.description}):null,e.repo_path||e.ref?(0,K.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[e.repo_path?(0,K.jsx)(`span`,{className:je,children:e.repo_path}):null,e.ref?(0,K.jsxs)(`span`,{className:je,children:[`@`,e.ref]}):null]}):null]}),(0,K.jsx)(Pe,{testId:`plugin-picker-toggle-${e.name}`,isSelected:t,isDisabled:n,onToggle:r,enableLabelKey:_.BUTTON$ADD,disableLabelKey:_.COMMON$REMOVE,enableTooltipKey:_.BUTTON$ADD,disableTooltipKey:_.COMMON$REMOVE})]})}function q(e){return[e.source,e.ref??``,e.repo_path??``].join(`\0`)}function Tt(e){return{source:e.source,ref:e.ref??null,repo_path:e.repo_path??null}}function Et(e,t){let n=q(t);return e.some(e=>q(e)===n)}function Dt(e,t){let n=q(t);return e.some(e=>q(e)===n)?e.filter(e=>q(e)!==n):[...e,Tt(t)]}function Ot(e,t){let n=t.trim().toLowerCase();return n?[e.name,e.description,e.source,e.repo_path,e.ref].filter(e=>typeof e==`string`&&e.length>0).some(e=>e.toLowerCase().includes(n)):!0}function kt({selected:e,onChange:t,disabled:n=!1}){let{t:r}=s(`openhands`),{data:i,isLoading:a,isError:o}=Qe(),[c,l]=(0,G.useState)(``),u=(i??[]).filter(e=>Ot(e,c));return(0,K.jsxs)(`div`,{"data-testid":`plugin-picker`,className:`flex w-full flex-col gap-3`,children:[(0,K.jsxs)(`div`,{className:g(`relative flex min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`transition-colors focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`),children:[(0,K.jsx)(I,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,K.jsx)(`input`,{"data-testid":`plugin-picker-search-input`,type:`search`,value:c,onChange:e=>l(e.target.value),placeholder:r(_.PLUGINS$PICKER_SEARCH_PLACEHOLDER),"aria-label":r(_.PLUGINS$PICKER_SEARCH_PLACEHOLDER),className:g(`min-w-0 flex-1 border-0 bg-transparent outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),c?(0,K.jsx)(`button`,{type:`button`,onClick:()=>l(``),"aria-label":r(_.MCP$SEARCH_CLEAR),className:`mr-2 cursor-pointer rounded p-1 text-tertiary-alt hover:text-white`,children:(0,K.jsx)(L,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),a?(0,K.jsx)(`p`,{"data-testid":`plugin-picker-loading`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(_.PLUGINS$PICKER_LOADING)}):o?(0,K.jsx)(`p`,{"data-testid":`plugin-picker-error`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(_.PLUGINS$PICKER_ERROR)}):u.length===0?(0,K.jsx)(`p`,{"data-testid":`plugin-picker-empty`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(_.PLUGINS$PICKER_EMPTY)}):(0,K.jsx)(`div`,{className:Me,children:(0,K.jsx)(`div`,{className:Ne,children:u.map(r=>(0,K.jsx)(wt,{plugin:r,isSelected:Et(e,r),isDisabled:n,onToggle:()=>t(Dt(e,r))},`${r.source} ${r.ref??``} ${r.repo_path??``} ${r.name}`))})})]})}function At({selected:e,onChange:t,onClose:n}){let{t:r}=s(`openhands`);return(0,K.jsx)(B,{onClose:n,children:(0,K.jsxs)(`div`,{"data-testid":`plugin-picker-modal`,className:g(`relative flex max-h-[80vh] flex-col gap-4 rounded-xl border border-[var(--oh-border)] bg-base-secondary p-6`,H(`lg`),te),children:[(0,K.jsx)(_e,{onClose:n,testId:`plugin-picker-close`}),(0,K.jsxs)(`div`,{className:`pr-6`,children:[(0,K.jsx)(Ae.H2,{children:r(_.PLUGINS$PICKER_TITLE)}),(0,K.jsx)(Ae.Text,{className:`mt-1 block text-sm text-tertiary-light`,children:r(_.PLUGINS$PICKER_SUBTITLE)})]}),(0,K.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:(0,K.jsx)(kt,{selected:e,onChange:t})}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between border-t border-[var(--oh-border-subtle)] pt-4`,children:[(0,K.jsx)(Ae.Text,{className:`text-sm text-tertiary-light`,children:r(_.PLUGINS$PICKER_SELECTED_COUNT,{count:e.length})}),(0,K.jsx)(ce,{testId:`plugin-picker-done`,type:`button`,variant:`primary`,onClick:n,className:`px-4`,children:r(_.PLUGINS$PICKER_DONE)})]})]})})}function jt({count:e,onClick:t,disabled:n=!1}){let{t:r}=s(`openhands`);return(0,K.jsxs)(`button`,{type:`button`,"data-testid":`open-plugin-picker`,onClick:t,disabled:n,className:g(`flex flex-row items-center gap-2 rounded-full px-2.5 py-1 text-white`,ae,oe,ie,n?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-surface-raised`),children:[(0,K.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center`,children:(0,K.jsx)(Be,{width:16,height:16,className:`shrink-0`,"aria-hidden":!0})}),(0,K.jsx)(`span`,{className:`text-sm font-normal leading-5`,children:r(_.PLUGINS$PICKER_TRIGGER)}),e>0?(0,K.jsx)(`span`,{"data-testid":`plugin-picker-count`,className:`inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white px-1 text-[11px] font-semibold leading-none text-black`,children:e}):null]})}var Mt=15e3;function Nt(e){let t=h(),n=u({queries:e.map(e=>({queryKey:[...at,e.id,{limit:12,offset:0},t.backend.id,t.orgId],queryFn:()=>z.getAutomationRuns(e.id,12,0),staleTime:60*1e3,retry:!1,refetchOnWindowFocus:!1,refetchInterval:e=>{let t=e.state.data?.runs[0];return t?.status===W.PENDING||t?.status===W.RUNNING?Mt:!1}}))}),r=new Map;return e.forEach((e,t)=>{let i=n[t],a=i?.data?.runs??[];r.set(e.id,{latestRun:a[0]??null,recentRuns:a,isLoading:i?.isPending??!0,isError:i?.isError??!1})}),r}var Pt=20,Ft=[W.COMPLETED,W.COMPLETED,W.FAILED,W.COMPLETED,W.CANCELLED,W.COMPLETED,W.COMPLETED,W.FAILED,W.COMPLETED,W.SKIPPED,W.COMPLETED];function It(){if(typeof window>`u`)return!1;if(window.localStorage.getItem(`oh:home-automations-demo`)===`1`)return!0;try{return new URLSearchParams(window.location.search).get(`demoAutomations`)===`1`}catch{return!1}}var Lt={"demo-conv-titled":`Fix flaky CI on main`,"demo-conv-untitled":`Summarize open pull requests`};function Rt(e){if(e in Lt)return Lt[e]}function zt(e){return new Date(Date.now()-e*36e5).toISOString()}function J(e,t,n){return{id:e,name:t,trigger:n,enabled:!0,created_at:zt(720),updated_at:zt(24),prompt:`demo`}}function Y(e,t,n={}){let r=n.startedHoursAgo??2,i=n.completedHoursAgo===void 0?1:n.completedHoursAgo;return{id:e,status:t,conversation_id:n.conversationId===void 0?null:n.conversationId,bash_command_id:null,error_detail:n.errorDetail===void 0?null:n.errorDetail,started_at:zt(r),completed_at:i===null?null:zt(i)}}function Bt(e){if(!e)return[];let t=[2,8,45,3,15,1,25,90,5,12,6];return[e,...Ft.slice(0,11).map((n,r)=>{let i=24+r*6,a=(t[r]??5)/60;return Y(`${e.id}-hist-${r}`,n,{startedHoursAgo:i,completedHoursAgo:i-a,conversationId:null,errorDetail:n===W.FAILED?`Prior failure`:null})})]}function Vt(e){return{...e,recentRuns:e.recentRuns??Bt(e.latestRun)}}var X=[{pin:!0,automation:J(`demo-pin-loading`,`Card: loading skeleton`,{type:`cron`,schedule:`0 * * * *`,schedule_human:`Every hour`}),runState:{latestRun:null,isLoading:!0,isError:!1}},{pin:!0,automation:J(`demo-pin-error`,`Card: status unavailable`,{type:`cron`,schedule:`0 9 * * *`,schedule_human:`Daily at 9am`}),runState:{latestRun:null,isLoading:!1,isError:!0}},{pin:!0,automation:J(`demo-pin-no-runs`,`Card: no runs yet`,{type:`event`,source:`github`,on:`pull_request.opened`}),runState:{latestRun:null,isLoading:!1,isError:!1}},{pin:!0,automation:J(`demo-pin-failed-detail`,`Card: failed with error detail`,{type:`cron`,schedule:`*/15 * * * *`,schedule_human:`Every 15 min`}),runState:{latestRun:Y(`run-failed-detail`,W.FAILED,{errorDetail:`Sandbox provisioning timed out after 120s while waiting for the runtime to become ready.`,startedHoursAgo:3,completedHoursAgo:2.5}),isLoading:!1,isError:!1}},{pin:!0,automation:J(`demo-pin-completed-title`,`Card: completed + conversation title`,{type:`event`,source:`github`,on:`push`}),runState:{latestRun:Y(`run-completed-title`,W.COMPLETED,{conversationId:`demo-conv-titled`,startedHoursAgo:5,completedHoursAgo:4}),isLoading:!1,isError:!1}},{pin:!0,automation:J(`demo-pin-completed-untitled`,`Card: completed + conversation title`,{type:`cron`,schedule:`0 0 * * 1`,schedule_human:`Mondays at midnight`}),runState:{latestRun:Y(`run-completed-untitled`,W.COMPLETED,{conversationId:`demo-conv-untitled`,startedHoursAgo:8,completedHoursAgo:7}),isLoading:!1,isError:!1}},{pin:!0,automation:J(`demo-pin-completed-no-conv`,`Card: completed, no conversation`,{type:`cron`,schedule:`0 12 * * *`,schedule_human:`Daily at noon`}),runState:{latestRun:Y(`run-completed-no-conv`,W.COMPLETED,{conversationId:null,startedHoursAgo:10,completedHoursAgo:9}),isLoading:!1,isError:!1}},{pin:!0,automation:J(`demo-pin-failed-no-conv`,`Card: failed, no conversation`,{type:`event`,source:`slack`,on:`message`}),runState:{latestRun:Y(`run-failed-no-conv`,W.FAILED,{conversationId:null,errorDetail:null,startedHoursAgo:12,completedHoursAgo:11}),isLoading:!1,isError:!1}},{pin:!0,automation:J(`demo-pin-pending`,`Card: pending (empty result panel)`,{type:`cron`,schedule:`0 */6 * * *`,schedule_human:`Every 6 hours`}),runState:{latestRun:Y(`run-pending`,W.PENDING,{conversationId:null,startedHoursAgo:.1,completedHoursAgo:null}),isLoading:!1,isError:!1}},{pin:!0,automation:J(`demo-pin-running`,`Card: running (empty result panel)`,{type:`event`,source:`github`,on:`issues.opened`}),runState:{latestRun:Y(`run-running`,W.RUNNING,{conversationId:null,startedHoursAgo:.25,completedHoursAgo:null}),isLoading:!1,isError:!1}},{automation:J(`demo-list-cancelled`,`List: cancelled run`,{type:`cron`,schedule:`30 2 * * *`,schedule_human:`Daily at 2:30am`}),runState:{latestRun:Y(`run-cancelled`,W.CANCELLED,{startedHoursAgo:14,completedHoursAgo:13}),isLoading:!1,isError:!1}},{automation:J(`demo-list-skipped`,`List: skipped run`,{type:`event`,source:`github`,on:`pull_request.synchronize`}),runState:{latestRun:Y(`run-skipped`,W.SKIPPED,{startedHoursAgo:16,completedHoursAgo:16}),isLoading:!1,isError:!1}},{automation:J(`demo-list-running-2`,`List: second in-flight run`,{type:`cron`,schedule:`*/5 * * * *`,schedule_human:`Every 5 min`}),runState:{latestRun:Y(`run-running-2`,W.RUNNING,{conversationId:null,startedHoursAgo:.5,completedHoursAgo:null}),isLoading:!1,isError:!1}},{automation:J(`demo-list-success-old`,`List: older success`,{type:`cron`,schedule:`0 8 * * 1-5`,schedule_human:`Weekdays at 8am`}),runState:{latestRun:Y(`run-success-old`,W.COMPLETED,{conversationId:`demo-conv-titled`,startedHoursAgo:48,completedHoursAgo:47}),isLoading:!1,isError:!1}},{automation:J(`demo-list-failed-old`,`List: older failure`,{type:`event`,source:`github`,on:`release.published`}),runState:{latestRun:Y(`run-failed-old`,W.FAILED,{errorDetail:`Model returned an empty completion.`,startedHoursAgo:72,completedHoursAgo:71}),isLoading:!1,isError:!1}},{automation:J(`demo-list-no-runs-2`,`List: never ran`,{type:`cron`,schedule:`0 0 1 * *`,schedule_human:`Monthly on the 1st`}),runState:{latestRun:null,isLoading:!1,isError:!1}},{automation:J(`demo-list-loading-2`,`List: loading status`,{type:`event`,source:`linear`,on:`Issue.create`}),runState:{latestRun:null,isLoading:!0,isError:!1}},{automation:J(`demo-list-error-2`,`List: fetch error`,{type:`cron`,schedule:`15 * * * *`,schedule_human:`Hourly at :15`}),runState:{latestRun:null,isLoading:!1,isError:!0}},{automation:J(`demo-list-pending-2`,`List: pending, long name that should truncate in the activity row when the viewport is narrow`,{type:`cron`,schedule:`0 3 * * 0`,schedule_human:`Sundays at 3am`}),runState:{latestRun:Y(`run-pending-2`,W.PENDING,{startedHoursAgo:.05,completedHoursAgo:null}),isLoading:!1,isError:!1}},{automation:J(`demo-list-completed-fallback`,`List: completed with conversation`,{type:`event`,source:`github`,on:`workflow_run.completed`}),runState:{latestRun:Y(`run-completed-fallback`,W.COMPLETED,{conversationId:`demo-conv-untitled`,startedHoursAgo:20,completedHoursAgo:19}),isLoading:!1,isError:!1}}];if(X.length!==Pt)throw Error(`home-automations-demo: expected ${Pt} specs, got ${X.length}`);var Z=X.filter(e=>e.pin).map(e=>e.automation.id),Ht=X.map(e=>e.automation),Ut=new Map(X.map(e=>[e.automation.id,Vt(e.runState)])),Wt={latestRun:null,recentRuns:[],isLoading:!0,isError:!1};function Gt(){let e=It(),{data:t,isLoading:n}=$e(),r=t?.status===`ok`,{data:i,isError:a,isLoading:o}=tt({limit:50,offset:0,enabled:!e&&r}),s=e?Ht:i?.automations??[],c=s.filter(e=>e.enabled).slice(0,20),l=new Set(s.map(e=>e.id)),u=e?!0:i!=null&&s.length>=i.total,d=Nt(e?[]:c),f=e?Ut:d;return e?{isBackendHealthy:!0,isHealthLoading:!1,isError:!1,isAutomationsLoading:!1,enabledAutomations:c,knownAutomationIds:l,isAutomationListComplete:u,runStates:f}:{isBackendHealthy:r,isHealthLoading:n,isError:a,isAutomationsLoading:o,enabledAutomations:c,knownAutomationIds:l,isAutomationListComplete:u,runStates:f}}var Kt=`oh:home-pinned-automations`;function qt(e,t){return`${Kt}:${e}:${t??`-`}`}function Q(e){if(!Array.isArray(e))return[];let t=new Set,n=[];for(let r of e)typeof r!=`string`||!r||t.has(r)||(t.add(r),n.push(r));return n}function Jt(e,t){let n=new Set(e),r=[];for(let e of t)n.has(e)&&(r.push(e),n.delete(e));for(let t of e)n.has(t)&&r.push(t);return r}function Yt(e,t,n,r=`after`){if(t===n)return[...e];let i=e.indexOf(t),a=e.indexOf(n);if(i<0||a<0)return[...e];let o=[...e];o.splice(i,1);let s=o.indexOf(n),c=r===`before`?s:s+1;return o.splice(c,0,t),o}function Xt(){let e=It(),t=h(),[n,r]=ft(qt(t.backend.id,t.orgId),[]),[i,a]=(0,G.useState)(null),o=(0,G.useMemo)(()=>e?i?Jt(Z,i):[...Z]:Q(n),[e,i,n]),s=(0,G.useCallback)(e=>o.includes(e),[o]),c=(0,G.useCallback)(t=>{if(e){a(e=>{let n=e?Jt(Z,e):[...Z];return n.includes(t)?n:[...n,t]});return}r(e=>{let n=Q(e);return n.includes(t)?n:[...n,t]})},[e,r]),l=(0,G.useCallback)(t=>{if(e){a(e=>(e?Jt(Z,e):[...Z]).filter(e=>e!==t));return}r(e=>Q(e).filter(e=>e!==t))},[e,r]);return{pinnedIds:o,isPinned:s,pin:c,unpin:l,togglePin:(0,G.useCallback)(e=>{if(s(e)){l(e);return}c(e)},[s,c,l]),reorder:(0,G.useCallback)((t,n,i=`after`)=>{if(e){a(e=>Yt(e?Jt(Z,e):[...Z],t,n,i));return}r(e=>Yt(Q(e),t,n,i))},[e,r]),pruneMissing:(0,G.useCallback)(t=>{e||r(e=>{let n=Q(e),r=n.filter(e=>t.has(e));return r.length===n.length&&r.every((e,t)=>e===n[t])?n:r})},[e,r])}}function Zt({automationName:e,isOpen:t,onConfirm:n,onCancel:r}){let{t:i}=s(`openhands`);return t?(0,K.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,K.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:r,onKeyDown:e=>{e.key===`Escape`&&r()},role:`presentation`}),(0,K.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`turn-off-automation-title`,className:`relative w-full max-w-sm rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:r,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":i(_.BUTTON$CLOSE),children:(0,K.jsx)(Fe,{className:`size-5`})}),(0,K.jsx)(`h2`,{id:`turn-off-automation-title`,className:re,children:i(_.AUTOMATIONS$TURN_OFF_CONFIRM_TITLE)}),(0,K.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:i(_.AUTOMATIONS$TURN_OFF_CONFIRM_MESSAGE,{name:e})}),(0,K.jsxs)(`div`,{className:`mt-6 flex justify-end gap-3`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:r,className:`rounded-lg border border-[var(--oh-border)] px-4 py-2 text-sm text-white hover:bg-surface-raised`,children:i(_.AUTOMATIONS$CANCEL)}),(0,K.jsx)(`button`,{type:`button`,"data-testid":`turn-off-automation-confirm`,onClick:n,className:`rounded-lg bg-danger px-4 py-2 text-sm text-white hover:bg-danger/80`,children:i(_.AUTOMATIONS$TURN_OFF)})]})]})]}):null}function Qt(e){return e?.status===W.PENDING||e?.status===W.RUNNING}function $t(e,t){let{t:n}=s(`openhands`),{navigate:r}=le(),i=h(),a=rt(`manage_automations`),o=i.backend.kind===`local`,c=It(),l=nt(),u=ct(),d=it(),[m,g]=(0,G.useState)(!1),[v,y]=(0,G.useState)(!1),b=l.isPending&&l.variables===e.id,x=d.isPending&&d.variables?.runId===t?.id,S=a&&Qt(t),C=(0,G.useCallback)(()=>{if(c){p(n(_.AUTOMATIONS$RUN_NOW_SUCCESS));return}l.mutate(e.id,{onSuccess:()=>{p(n(_.AUTOMATIONS$RUN_NOW_SUCCESS))},onError:e=>{f(pt(e,n(_.AUTOMATIONS$RUN_NOW_ERROR)))}})},[e.id,l,c,n]),w=(0,G.useCallback)(()=>{r?.(`/automations/${e.id}`)},[e.id,r]);return{canManage:a,canEdit:o,isRunPending:b,isCancelPending:x,canCancel:S,editOpen:m,setEditOpen:g,turnOffConfirmOpen:v,runNow:C,viewDetails:w,openEdit:(0,G.useCallback)(()=>{if(!o){w();return}g(!0)},[o,w]),requestTurnOff:(0,G.useCallback)(()=>{y(!0)},[]),confirmTurnOff:(0,G.useCallback)(()=>{y(!1),!c&&u.mutate({id:e.id,enabled:!1},{onError:e=>{f(pt(e,n(_.AUTOMATIONS$TURN_OFF_ERROR)))}})},[e.id,c,n,u]),cancelTurnOff:(0,G.useCallback)(()=>{y(!1)},[]),cancelRun:(0,G.useCallback)(()=>{if(!(!t||!Qt(t))){if(c){p(n(_.AUTOMATIONS$CANCEL_RUN_SUCCESS));return}d.mutate({automationId:e.id,runId:t.id},{onSuccess:()=>{p(n(_.AUTOMATIONS$CANCEL_RUN_SUCCESS))},onError:e=>{f(pt(e,n(_.AUTOMATIONS$CANCEL_RUN_ERROR)))}})}},[e.id,d,c,t,n])}}function en(e){if(e.isLoading||e.isError)return`unknown`;if(!e.latestRun)return`none`;switch(e.latestRun.status){case W.COMPLETED:return`success`;case W.FAILED:return`failed`;case W.PENDING:case W.RUNNING:return`in_progress`;default:return`unknown`}}function tn(e){switch(e){case`success`:return _.FEATURED_AUTOMATIONS$LAST_RUN_SUCCEEDED;case`failed`:return _.FEATURED_AUTOMATIONS$LAST_RUN_FAILED;case`in_progress`:return _.FEATURED_AUTOMATIONS$RUN_IN_PROGRESS;case`none`:return _.AUTOMATIONS$DETAIL$NO_RUNS;default:return _.FEATURED_AUTOMATIONS$STATUS_UNKNOWN}}var nn={github:`GitHub`,gitlab:`GitLab`,slack:`Slack`,linear:`Linear`,jira:`Jira`};function rn(e){let t=e.trim().toLowerCase();return t?nn[t]??t.replace(/\b\w/g,e=>e.toUpperCase()):e}function an(e){let{trigger:t}=e;return t.type===`event`&&t.on?ut(t.on):null}function on(e){let{trigger:t}=e;return t.type===`event`&&t.source?.trim()||null}function sn(e){let{trigger:t}=e;return t.type===`event`?null:t.schedule_human||t.schedule||t.type||null}function cn(e){let{trigger:t}=e;if(t.type===`event`){let t=on(e);return[an(e)??``,t?`(${rn(t)})`:``].filter(Boolean).join(` `)}return sn(e)??t.type}var ln=48;function un(e){let t=e.trim().replace(/\s+/g,` `);if(!t)return t;let n=t.match(/^.*?[.!?](?=\s|$)/)?.[0]??t;return n.length<=ln?n:`${n.slice(0,ln-1).trimEnd()}…`}function dn(e,t=un(e)){return e.trim().replace(/\s+/g,` `)!==t}function $(e){let t=e.completed_at??e.started_at;if(!t)return null;let n=new Date(t).getTime();return Number.isNaN(n)||n===0?null:t}var fn=1e3,pn=30*6e4;function mn(e,t=Date.now()){let n=e.started_at?new Date(e.started_at).getTime():NaN;if(Number.isNaN(n)||n<=0)return null;if(e.completed_at){let t=new Date(e.completed_at).getTime();return Number.isNaN(t)||t<n?null:t-n}return e.status===W.PENDING||e.status===W.RUNNING?Math.max(0,t-n):null}function hn(e){if(e==null||e<=0)return 11;let t=Math.log(Math.min(pn,Math.max(fn,e))/fn)/Math.log(pn/fn);return Math.round(6+t*9)}function gn(e){switch(e){case W.COMPLETED:return`bg-[var(--oh-status-success)]`;case W.FAILED:return`bg-[var(--oh-status-error)]`;case W.RUNNING:return`bg-[var(--oh-status-success)] animate-pulse motion-reduce:animate-none`;case W.PENDING:return`bg-[repeating-linear-gradient(-45deg,var(--oh-muted)_0_1.5px,var(--oh-border)_1.5px_3px)]`;case W.CANCELLED:return`bg-[var(--oh-muted)]`;default:return`bg-[var(--oh-border)]`}}function _n(e){switch(e){case W.COMPLETED:return _.AUTOMATIONS$DETAIL$SUCCESSFUL;case W.FAILED:return _.AUTOMATIONS$DETAIL$FAILED;case W.PENDING:return _.AUTOMATIONS$DETAIL$PENDING;case W.RUNNING:return _.AUTOMATIONS$DETAIL$RUNNING;case W.CANCELLED:return _.AUTOMATIONS$DETAIL$CANCELLED;case W.SKIPPED:return _.AUTOMATIONS$DETAIL$SKIPPED;default:return _.FEATURED_AUTOMATIONS$STATUS_UNKNOWN}}function vn(e){return e==null||e<=0?null:e<6e4?`${Math.max(1,Math.round(e/1e3))}s`:e<36e5?`${Math.round(e/6e4)}m`:`${(e/36e5).toFixed(1)}h`}function yn({label:e,children:t}){return(0,K.jsxs)(`div`,{className:`flex items-start gap-2 text-xs`,children:[(0,K.jsx)(`span`,{className:`w-16 shrink-0 text-[var(--oh-muted)]`,children:e}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 break-words text-white`,children:t})]})}function bn({run:e,nowMs:t}){let{t:n,i18n:r}=s(`openhands`),i=$(e),a=i?mt(i,r.language,n):null,o=vn(mn(e,t)),c=n(_n(e.status)),l=e.status===W.FAILED&&e.error_detail?.trim()||null;return(0,K.jsxs)(`div`,{className:`flex w-[220px] flex-col gap-2 p-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{"aria-hidden":`true`,className:g(`h-3 w-1.5 shrink-0 rounded-[1px]`,gn(e.status))}),(0,K.jsx)(`span`,{className:`text-sm font-medium text-white`,children:c})]}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[a?(0,K.jsx)(yn,{label:n(_.AUTOMATIONS$DETAIL$LAST_RUN),children:a}):null,o?(0,K.jsx)(yn,{label:n(_.FEATURED_AUTOMATIONS$RUN_DURATION),children:o}):null]}),l?(0,K.jsx)(`p`,{className:`line-clamp-3 text-xs text-[var(--oh-status-error)]`,children:l}):null]})}function xn({automationId:e,run:t,nowMs:n}){let{t:i}=s(`openhands`),a=mn(t,n),o=i(_n(t.status)),c=`/automations/${encodeURIComponent(e)}?run=${encodeURIComponent(t.id)}`;return(0,K.jsx)(r,{content:(0,K.jsx)(bn,{run:t,nowMs:n}),placement:`top`,closeDelay:80,delay:200,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,children:(0,K.jsx)(U,{to:c,"aria-label":o,className:`group/spark-bar inline-flex h-full cursor-pointer items-end px-[2px] focus:outline-none focus-visible:ring-1 focus-visible:ring-[var(--oh-focus)]`,onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),children:(0,K.jsx)(`span`,{className:g(`w-1 shrink-0 origin-bottom rounded-[1px]`,`transition-transform duration-100 ease-out motion-reduce:transition-none`,`group-hover/spark-bar:scale-x-[1.4] group-hover/spark-bar:scale-y-[1.15]`,`group-focus-visible/spark-bar:scale-x-[1.4] group-focus-visible/spark-bar:scale-y-[1.15]`,gn(t.status)),style:{height:hn(a)}})})})}function Sn({automationId:e,runs:t,testId:n}){let{t:r}=s(`openhands`),i=t.some(e=>Qt(e)),[a,o]=(0,G.useState)(()=>Date.now());if((0,G.useEffect)(()=>{if(!i)return;let e=window.setInterval(()=>o(Date.now()),1e3);return()=>window.clearInterval(e)},[i]),t.length===0)return null;let c=[...t].reverse().slice(-12);return(0,K.jsx)(`span`,{"data-testid":n,"aria-label":r(_.FEATURED_AUTOMATIONS$RUN_ACTIVITY_LABEL,{count:c.length}),className:`inline-flex shrink-0 items-end`,style:{height:18},onMouseDown:e=>e.preventDefault(),children:c.map((t,n)=>(0,K.jsx)(xn,{automationId:e,run:t,nowMs:a},`${t.id}-${n}`))})}function Cn({automation:e,t,canManage:n,canEdit:r,isRunPending:i,isCancelPending:a,canCancel:o,testIdPrefix:s,pinTestId:c,isPinned:l,onRunNow:u,onCancelRun:d,onView:f,onEdit:p,onTurnOff:m,onTogglePin:h}){let g=[];return n&&g.push({kind:`item`,key:`run-now`,label:t(_.AUTOMATIONS$RUN_NOW),icon:(0,K.jsx)(lt,{className:`size-4`}),onClick:u,disabled:i||!e.enabled||o,testId:`${s}-run-${e.id}`}),n&&o&&g.push({kind:`item`,key:`cancel-run`,label:t(_.AUTOMATIONS$CANCEL_RUN),icon:(0,K.jsx)(St,{className:`size-3.5 fill-current`,"aria-hidden":!0}),onClick:d,disabled:a,testId:`${s}-cancel-${e.id}`}),g.push({kind:`item`,key:`view`,label:t(_.COMMON$VIEW),icon:(0,K.jsx)(b,{className:`size-4`,"aria-hidden":!0}),onClick:f,testId:`${s}-view-${e.id}`}),n&&r&&p&&g.push({kind:`item`,key:`edit`,label:t(_.AUTOMATIONS$EDIT),icon:(0,K.jsx)(we,{className:`size-4`}),onClick:p,testId:`${s}-edit-${e.id}`}),n&&g.push({kind:`item`,key:`turn-off`,label:t(_.AUTOMATIONS$TURN_OFF),icon:(0,K.jsx)(ot,{className:`size-4`}),onClick:m,testId:`${s}-turn-off-${e.id}`}),g.push({kind:`separator`,key:`pin-separator`},{kind:`item`,key:`pin`,label:t(l?_.FEATURED_AUTOMATIONS$UNPIN:_.FEATURED_AUTOMATIONS$PIN),icon:(0,K.jsx)(A,{className:l?`size-3.5 fill-current`:`size-3.5`,"aria-hidden":`true`}),onClick:h,testId:c}),g}function wn({onUnpin:e,automation:t,...n}){return Cn({...n,automation:t,testIdPrefix:`pinned-automation`,pinTestId:`unpin-automation-${t.id}`,isPinned:!0,onTogglePin:e})}var Tn=e(n(),1);function En({testId:e,panelTestId:t,ariaLabel:n,items:r,triggerClassName:i}){let[a,o]=(0,G.useState)(!1),[s,c]=(0,G.useState)(0),l=(0,G.useRef)(null),u=(0,G.useRef)([]),[,d]=(0,G.useReducer)(e=>e+1,0),f=()=>{o(!1),queueMicrotask(()=>l.current?.focus())},p=ye(f,l),m=r.map((e,t)=>e.kind===`item`&&!e.disabled?t:-1).filter(e=>e>=0);(0,G.useLayoutEffect)(()=>{if(!a)return;d(),c(m[0]??0);let e=0,t=()=>{e||=window.requestAnimationFrame(()=>{e=0,d()})};return window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0),e&&window.cancelAnimationFrame(e)}},[a]),(0,G.useEffect)(()=>{a&&u.current[s]?.focus()},[s,a]);let h=(()=>{if(!a||!l.current)return;let e=l.current.getBoundingClientRect(),t=window.innerWidth,n=window.innerHeight,i=r.reduce((e,t)=>e+(t.kind===`separator`?9:36),10),o=p.current?.getBoundingClientRect().height??i;return{position:`fixed`,...e.bottom+4+o+8>n?{bottom:n-e.top+4}:{top:e.bottom+4},right:Math.max(8,t-e.right),zIndex:1e5}})(),g=typeof document<`u`?document.body:null,_=e=>{m.length!==0&&c(m[(m.indexOf(s)+e+m.length)%m.length]??m[0])};return(0,K.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,K.jsx)(Ce,{ref:l,testId:e,ariaLabel:n,className:i,onClick:e=>{e.preventDefault(),e.stopPropagation(),o(e=>!e)}}),a&&h&&g?(0,Tn.createPortal)((0,K.jsx)(xe,{ref:p,testId:t,theme:`popover`,position:`none`,alignment:`none`,spacing:`none`,style:h,className:`min-w-40`,onKeyDown:e=>{if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),f();return}if(e.key===`ArrowDown`){e.preventDefault(),_(1);return}e.key===`ArrowUp`&&(e.preventDefault(),_(-1))},children:r.map((e,t)=>e.kind===`separator`?(0,K.jsx)(w,{},e.key):(0,K.jsx)(`li`,{children:(0,K.jsx)(Se,{ref:e=>{u.current[t]=e},testId:e.testId,isDisabled:e.disabled,className:`group`,onClick:t=>{t.preventDefault(),t.stopPropagation(),!e.disabled&&(e.onClick(),f())},children:(0,K.jsx)(dt,{icon:e.icon,label:e.label})})},e.key))}),g):null]})}function Dn({automation:e,runState:t,onUnpin:n,onDragStart:i,onDragOver:a,onDrop:o,onDragEnd:c,isDropTarget:l,dropPosition:u,isDragging:d}){let{t:f,i18n:p}=s(`openhands`),{latestRun:m,recentRuns:h,isLoading:v,isError:b}=t,x=$t(e,m),S=m?.conversation_id??null,C=S?Rt(S):void 0,{data:w}=ke(C===void 0?S:null),T=C===void 0?w?.title??null:C,ee=m?$(m):null,E=m?.status===W.COMPLETED||m?.status===W.FAILED,D=e.trigger.type===`event`?R:et,O=an(e),k=sn(e),A=on(e),j=m?.status===W.FAILED&&m.error_detail?.trim()||null,M=j?un(j):null,N=j!=null&&M!=null&&dn(j,M),P=(0,G.useRef)(null),F=wn({automation:e,t:f,canManage:x.canManage,canEdit:x.canEdit,isRunPending:x.isRunPending,isCancelPending:x.isCancelPending,canCancel:x.canCancel,onRunNow:x.runNow,onCancelRun:x.cancelRun,onView:x.viewDetails,onEdit:x.canEdit?x.openEdit:void 0,onTurnOff:x.requestTurnOff,onUnpin:()=>n(e.id)});return(0,K.jsxs)(`article`,{ref:P,role:`listitem`,"data-testid":`pinned-automation-card-${e.id}`,onDragOver:t=>{t.preventDefault();let{dataTransfer:n}=t;n.dropEffect=`move`;let r=t.currentTarget.getBoundingClientRect(),i=(t.clientX-r.left)/r.width,o=(t.clientY-r.top)/r.height,s=i<.3||i>.7?i<.5?`before`:`after`:o<.5?`before`:`after`;a(e.id,s)},onDrop:t=>{t.preventDefault(),o(e.id)},onDragEnd:c,className:g(`group relative flex flex-col rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-4`,d&&`opacity-50`,l&&u===`before`&&`shadow-[inset_0_2px_0_0_var(--oh-focus)]`,l&&u===`after`&&`shadow-[inset_0_-2px_0_0_var(--oh-focus)]`),children:[(0,K.jsxs)(`div`,{draggable:!0,"data-testid":`pinned-automation-drag-${e.id}`,"aria-label":f(_.FEATURED_AUTOMATIONS$REORDER_HANDLE,{name:e.name}),className:`-mx-4 -mt-4 mb-0 flex cursor-grab items-start justify-between gap-3 rounded-t-xl px-4 pb-1 pt-4 active:cursor-grabbing`,onDragStart:t=>{if(t.target?.closest(`[data-no-drag]`)){t.preventDefault();return}let{dataTransfer:n}=t;n.effectAllowed=`move`,n.setData(`text/plain`,e.id),P.current&&n.setDragImage(P.current,24,24),i(e.id)},onDragEnd:c,children:[(0,K.jsx)(`span`,{role:`link`,tabIndex:0,title:f(_.FEATURED_AUTOMATIONS$VIEW_DETAILS),className:`min-w-0 flex-1 cursor-pointer truncate font-medium text-[var(--oh-foreground)] hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--oh-focus)]`,onClick:()=>x.viewDetails(),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),x.viewDetails())},children:e.name}),(0,K.jsx)(`div`,{"data-no-drag":!0,className:`shrink-0`,children:(0,K.jsx)(En,{testId:`pinned-automation-menu-${e.id}`,panelTestId:`pinned-automation-menu-panel-${e.id}`,ariaLabel:f(_.FEATURED_AUTOMATIONS$ROW_MENU_LABEL,{name:e.name}),triggerClassName:`opacity-70 group-hover:opacity-100`,items:F})})]}),(0,K.jsxs)(`div`,{className:`mt-2 flex items-center justify-between gap-3 text-xs text-[var(--oh-text-secondary)]`,children:[(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,K.jsx)(D,{className:`size-3 shrink-0`,"aria-hidden":`true`}),O?(0,K.jsx)(`span`,{className:`truncate`,children:O}):null,k?(0,K.jsx)(`span`,{className:`truncate`,children:k}):null,A?(0,K.jsx)(`span`,{className:g(je,`px-1.5 py-0 text-[var(--oh-text-secondary)]`),children:rn(A)}):null]}),h.length>0?(0,K.jsx)(Sn,{automationId:e.id,runs:h,testId:`pinned-automation-activity-${e.id}`}):null]}),(0,K.jsxs)(`div`,{className:`mt-3 flex min-h-9 items-center justify-between gap-2 overflow-hidden rounded-md border border-[var(--oh-border-subtle)] bg-[var(--oh-surface)] px-3 py-2 text-xs`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 overflow-hidden`,children:[v?(0,K.jsx)(`div`,{className:`h-3.5 w-3/4 animate-pulse rounded bg-surface-raised motion-reduce:animate-none`,"aria-hidden":`true`}):null,!v&&b?(0,K.jsx)(`p`,{className:`truncate text-[var(--oh-text-secondary)]`,children:f(_.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE)}):null,!v&&!b&&!m?(0,K.jsx)(`p`,{className:`truncate text-[var(--oh-text-secondary)]`,children:f(_.AUTOMATIONS$DETAIL$NO_RUNS)}):null,m?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(ht,{status:m.status,iconOnly:!0,showLabel:m.status===W.PENDING||m.status===W.RUNNING&&!T}),M?N&&j?(0,K.jsx)(r,{content:(0,K.jsx)(`p`,{className:`max-w-xs whitespace-pre-wrap break-words p-2 text-xs`,children:j}),placement:`top`,closeDelay:100,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,children:(0,K.jsx)(`span`,{className:`min-w-0 flex-1 cursor-default truncate text-[var(--oh-status-error)]`,children:M})}):(0,K.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-[var(--oh-status-error)]`,children:M}):null,S&&T?(0,K.jsxs)(U,{to:`/conversations/${S}`,"aria-label":T,title:T,className:`group/conversation inline-flex min-w-0 items-center gap-1 text-[var(--oh-foreground)] hover:text-[var(--oh-text-secondary)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--oh-focus)]`,children:[(0,K.jsx)(`span`,{className:`truncate`,children:T}),(0,K.jsx)(y,{className:`size-3 shrink-0 opacity-0 transition-opacity group-hover/conversation:opacity-100 group-focus-visible/conversation:opacity-100`,"aria-hidden":`true`})]}):null,!S&&E?(0,K.jsx)(`p`,{className:`min-w-0 truncate text-[var(--oh-text-secondary)]`,children:f(_.AUTOMATIONS$DETAIL$NO_CONVERSATION)}):null]}):null]}),ee?(0,K.jsx)(`span`,{className:`shrink-0 text-[var(--oh-text-secondary)]`,children:mt(ee,p.language,f)}):null]}),x.editOpen?(0,K.jsx)(st,{automation:e,isOpen:x.editOpen,onClose:()=>x.setEditOpen(!1)}):null,(0,K.jsx)(Zt,{automationName:e.name,isOpen:x.turnOffConfirmOpen,onConfirm:x.confirmTurnOff,onCancel:x.cancelTurnOff})]})}function On(){let{t:e}=s(`openhands`),{pinnedIds:t,unpin:n,reorder:r,pruneMissing:i}=Xt(),{isBackendHealthy:a,isHealthLoading:o,isError:c,enabledAutomations:l,knownAutomationIds:u,isAutomationListComplete:d,runStates:f}=Gt(),[p,m]=(0,G.useState)(!1),[h,g]=(0,G.useState)(null),[v,y]=(0,G.useState)(null),[b,x]=(0,G.useState)(null);(0,G.useEffect)(()=>{!d||u.size===0||i(u)},[d,u,i]);let S=new Map(l.map(e=>[e.id,e])),C=t.map(e=>S.get(e)).filter(e=>!!e);if(o||!a||c||C.length===0)return null;let w=p||C.length<=6?C:C.slice(0,6),T=C.length>6;return(0,K.jsxs)(`section`,{"data-testid":`pinned-automations-dashboard`,"aria-label":e(_.FEATURED_AUTOMATIONS$PINNED_DASHBOARD_LABEL),className:`w-full`,children:[(0,K.jsx)(`h2`,{className:`mb-2 text-sm font-medium text-[var(--oh-foreground)]`,children:e(_.FEATURED_AUTOMATIONS$PINNED_TITLE)}),(0,K.jsx)(`div`,{role:`list`,className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:w.map(e=>(0,K.jsx)(Dn,{automation:e,runState:f.get(e.id)??Wt,onUnpin:n,onDragStart:g,onDragOver:(e,t)=>{y(e),x(t)},onDrop:e=>{h&&b&&r(h,e,b),g(null),y(null),x(null)},onDragEnd:()=>{g(null),y(null),x(null)},isDropTarget:v===e.id,dropPosition:v===e.id?b:null,isDragging:h===e.id},e.id))}),T?(0,K.jsx)(`div`,{className:`mt-2 flex justify-start`,children:(0,K.jsx)(`button`,{type:`button`,"data-testid":`pinned-automations-view-more`,onClick:()=>m(e=>!e),className:`text-xs text-[var(--oh-text-secondary)] hover:text-[var(--oh-foreground)]`,children:e(p?_.COMMON$VIEW_LESS:_.COMMON$VIEW_MORE)})}):null]})}function kn({health:e}){return e===`success`?(0,K.jsx)(`svg`,{viewBox:`0 0 12 12`,className:`h-2.5 w-2.5 shrink-0 stroke-[var(--oh-status-success)]`,fill:`none`,strokeWidth:2.25,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,K.jsx)(`path`,{d:`M2.5 6.5 5 9l4.5-5.5`})}):(0,K.jsx)(`span`,{"aria-hidden":`true`,className:g(`h-1.5 w-1.5 shrink-0 rounded-full`,e===`failed`&&`bg-[var(--oh-status-error)]`,e===`in_progress`&&`animate-pulse bg-[var(--oh-status-success)] motion-reduce:animate-none`,(e===`none`||e===`unknown`)&&`bg-[var(--oh-border)]`)})}function An(e,t,n,r){let{latestRun:i}=t,a=i?$(i):null;return{id:e.id,name:e.name,triggerSummary:cn(e),status:i?.status??null,whenLabel:a?mt(a,n,r):null,conversationId:i?.conversation_id??null}}function jn(e,t){let n=t.get(e),r=n?.latestRun?.status;if(r===W.PENDING||r===W.RUNNING)return 2**53-1;let i=n?.latestRun?$(n.latestRun):null;return i?new Date(i).getTime():0}function Mn(e,t,n,r,i){return[...e].map(e=>An(e,t.get(e.id)??i,n,r)).sort((e,n)=>jn(n.id,t)-jn(e.id,t))}function Nn(e){return e.conversationId?`/conversations/${e.conversationId}`:`/automations/${e.id}`}function Pn(e){return e.isError?_.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE:tn(en(e))}function Fn({label:e,children:t}){return(0,K.jsxs)(`div`,{className:`flex items-start gap-2 text-xs`,children:[(0,K.jsx)(`span`,{className:`w-20 shrink-0 text-[var(--oh-muted)]`,children:e}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 break-words text-[var(--oh-foreground)]`,children:t})]})}function In({automation:e,runState:t}){let{t:n,i18n:r}=s(`openhands`),{latestRun:i}=t,a=i?$(i):null,o=e.trigger.type===`event`?R:et,c=en(t);return(0,K.jsxs)(`div`,{className:`flex w-[280px] flex-col gap-3 p-3`,children:[(0,K.jsx)(`span`,{className:`break-words text-sm font-medium text-white`,children:e.name}),(0,K.jsxs)(`dl`,{className:`flex flex-col gap-1.5`,children:[(0,K.jsx)(Fn,{label:n(_.AUTOMATIONS$DETAIL$TRIGGER),children:(0,K.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[(0,K.jsx)(o,{className:`mt-0.5 size-3 shrink-0`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{className:`break-all`,children:cn(e)})]})}),(0,K.jsx)(Fn,{label:n(_.COMMON$STATUS),children:(0,K.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5`,children:[(0,K.jsx)(kn,{health:c}),(0,K.jsx)(`span`,{children:n(Pn(t))})]})}),a?(0,K.jsx)(Fn,{label:n(_.AUTOMATIONS$DETAIL$LAST_RUN),children:mt(a,r.language,n)}):null,i?.status===W.FAILED&&i.error_detail?(0,K.jsx)(Fn,{label:n(_.STATUS$ERROR),children:(0,K.jsx)(`span`,{className:`line-clamp-3 text-[var(--oh-status-error)]`,children:i.error_detail})}):null]})]})}function Ln({item:e,automation:t,runState:n}){let{t:i}=s(`openhands`),{isPinned:a,togglePin:o}=Xt(),c=$t(t,n.latestRun),l=a(e.id),u=t.trigger.type===`event`?R:et,d=an(t),f=sn(t),p=on(t),m=!!(d||f||p),h=m||!!e.whenLabel||!!e.status,v=en(n),y=Pn(n),b=Cn({automation:t,t:i,canManage:c.canManage,canEdit:c.canEdit,isRunPending:c.isRunPending,isCancelPending:c.isCancelPending,canCancel:c.canCancel,testIdPrefix:`running-automation`,pinTestId:`running-automation-pin-${e.id}`,isPinned:l,onRunNow:c.runNow,onCancelRun:c.cancelRun,onView:c.viewDetails,onEdit:c.canEdit?c.openEdit:void 0,onTurnOff:c.requestTurnOff,onTogglePin:()=>o(e.id)});return(0,K.jsxs)(`li`,{"data-testid":`running-automation-row-${e.id}`,className:`group relative flex items-stretch transition-colors hover:bg-[var(--oh-interactive-hover)] has-[:focus-visible]:bg-[var(--oh-interactive-hover)]`,children:[(0,K.jsx)(r,{content:(0,K.jsx)(In,{automation:t,runState:n}),placement:`top-start`,closeDelay:100,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,children:(0,K.jsx)(U,{to:Nn(e),"aria-label":`${e.name} ${i(y)}`,className:`flex min-w-0 flex-1 items-center justify-between gap-3 px-3 py-2.5 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--oh-focus)]`,children:(0,K.jsxs)(`div`,{className:`grid min-w-0 flex-1 grid-cols-[auto_minmax(0,1fr)] gap-x-2`,children:[(0,K.jsx)(`span`,{className:`inline-flex h-5 w-2.5 shrink-0 items-center justify-center`,children:(0,K.jsx)(kn,{health:v})}),(0,K.jsx)(`span`,{className:`truncate text-sm font-medium leading-5 text-[var(--oh-foreground)]`,children:e.name}),h?(0,K.jsxs)(`span`,{className:`col-start-2 mt-0.5 flex min-w-0 items-center gap-1.5 text-xs leading-4 text-[var(--oh-text-secondary)]`,children:[(0,K.jsx)(u,{className:`size-3 shrink-0`,"aria-hidden":`true`}),d?(0,K.jsx)(`span`,{className:`truncate`,children:d}):null,f?(0,K.jsx)(`span`,{className:`truncate`,children:f}):null,p?(0,K.jsx)(`span`,{className:g(je,`shrink-0 px-1.5 py-0 text-[var(--oh-text-secondary)]`),children:rn(p)}):null,e.whenLabel?(0,K.jsxs)(K.Fragment,{children:[m?(0,K.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:`·`}):null,(0,K.jsx)(`span`,{className:`truncate`,children:e.whenLabel})]}):null,e.status?(0,K.jsxs)(K.Fragment,{children:[m||e.whenLabel?(0,K.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:`·`}):null,(0,K.jsx)(ht,{status:e.status,compact:!0})]}):null]}):null,(0,K.jsx)(`span`,{className:`sr-only`,children:i(y)})]})})}),(0,K.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5 pr-1.5`,children:[(0,K.jsx)(Sn,{automationId:t.id,runs:n.recentRuns,testId:`running-automation-activity-${e.id}`}),(0,K.jsx)(En,{testId:`running-automation-menu-${e.id}`,panelTestId:`running-automation-menu-panel-${e.id}`,ariaLabel:i(_.FEATURED_AUTOMATIONS$ROW_MENU_LABEL,{name:e.name}),triggerClassName:`opacity-70 group-hover:opacity-100`,items:b})]}),c.editOpen?(0,K.jsx)(st,{automation:t,isOpen:c.editOpen,onClose:()=>c.setEditOpen(!1)}):null,(0,K.jsx)(Zt,{automationName:t.name,isOpen:c.turnOffConfirmOpen,onConfirm:c.confirmTurnOff,onCancel:c.cancelTurnOff})]})}function Rn(){let{t:e,i18n:t}=s(`openhands`),[n,r]=(0,G.useState)(!1),{isBackendHealthy:i,isHealthLoading:a,isError:o,enabledAutomations:c,runStates:l}=Gt(),u=t?.language??`en`,d=(0,G.useMemo)(()=>Mn(c,l,u,e,Wt),[c,l,u,e]),f=(0,G.useMemo)(()=>new Map(c.map(e=>[e.id,e])),[c]),p=n?20:10,m=d.slice(0,p),h=!n&&d.length>10,g=n&&d.length>=20;return a||!i||o||d.length===0?null:(0,K.jsxs)(`section`,{"aria-labelledby":`running-automations-heading`,"data-testid":`running-automations-list`,className:`mt-8 w-full`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,K.jsx)(`h2`,{id:`running-automations-heading`,className:`text-sm font-medium text-[var(--oh-foreground)]`,children:e(_.FEATURED_AUTOMATIONS$SECTION_TITLE)}),(0,K.jsx)(de,{content:e(_.FEATURED_AUTOMATIONS$MANAGE),placement:`bottom`,children:(0,K.jsxs)(U,{to:`/automations`,"data-testid":`home-automations-manage`,"aria-label":e(_.FEATURED_AUTOMATIONS$MANAGE),className:`inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-xs font-medium text-[var(--oh-text-secondary)] transition-colors hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--oh-focus)]`,children:[(0,K.jsx)(F,{className:`size-3`,"aria-hidden":`true`}),e(_.BUTTON$ADD)]})})]}),(0,K.jsx)(`ul`,{"aria-label":e(_.FEATURED_AUTOMATIONS$RECENT_GROUP_LABEL),className:`divide-y divide-[var(--oh-border-subtle)] overflow-hidden rounded-xl border border-[var(--oh-border-subtle)] bg-[var(--oh-surface)]`,children:m.map(e=>{let t=f.get(e.id);return t?(0,K.jsx)(Ln,{item:e,automation:t,runState:l.get(e.id)??Wt},e.id):null})}),h?(0,K.jsx)(`div`,{className:`mt-2 flex justify-start`,children:(0,K.jsx)(`button`,{type:`button`,"data-testid":`home-automations-view-more`,onClick:()=>r(!0),className:`rounded-md px-1.5 py-0.5 text-xs font-medium text-[var(--oh-text-secondary)] transition-colors hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--oh-focus)]`,children:e(_.COMMON$VIEW_MORE)})}):null,g?(0,K.jsx)(`div`,{className:`mt-2 flex justify-start`,children:(0,K.jsx)(U,{to:`/automations`,"data-testid":`home-automations-view-all`,className:`rounded-md px-1.5 py-0.5 text-xs font-medium text-[var(--oh-text-secondary)] transition-colors hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--oh-focus)]`,children:e(_.FEATURED_AUTOMATIONS$VIEW_ALL)})}):null]})}function zn(){let{t:e}=s(`openhands`);return(0,K.jsx)(`div`,{className:`flex w-full items-center justify-center py-2`,children:(0,K.jsx)(Ae.H1,{className:`w-full text-center leading-normal`,children:e(_.HOME$LETS_START_BUILDING)})})}function Bn({kind:e,onClick:t,disabled:n=!1,disabledTooltip:r}){let{t:i}=s(`openhands`),a=e===`local`,o=i(a?_.HOME$OPEN_WORKSPACE:_.COMMON$OPEN_REPOSITORY),c=(0,K.jsxs)(`button`,{type:`button`,"data-testid":a?`open-workspace-button`:`open-repository-button`,onClick:t,disabled:n,className:g(`flex flex-row items-center gap-2 rounded-full px-2.5 py-1 text-white`,ae,oe,ie,n?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-surface-raised`),children:[(0,K.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center`,children:a?(0,K.jsx)(T,{"aria-hidden":!0,className:`h-4 w-4`,strokeWidth:2}):(0,K.jsx)(ve,{width:16,height:16,className:`shrink-0`})}),(0,K.jsx)(`span`,{className:`text-sm font-normal leading-5`,children:o})]});return r?(0,K.jsx)(de,{content:r,placement:`top`,children:(0,K.jsx)(`span`,{className:`inline-flex`,children:c})}):c}var Vn=`__ungrouped__`;function Hn({workspaces:e,parents:t=[],value:n,placeholder:r,className:i,disabled:a=!1,disabledTooltip:o,showManage:c,onChange:l,onAddClick:u,onManageClick:d}){let{t:f}=s(`openhands`),[p,m]=(0,G.useState)(n?.name??``),h=(0,G.useRef)(null),v=(0,G.useMemo)(()=>{let t=p.trim().toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t)):e},[e,p]),y=(0,G.useCallback)(e=>e.parentPath??Vn,[]),b=(0,G.useMemo)(()=>{let e=new Map;return t.forEach(t=>e.set(t.path,t.name)),e},[t]),{groupedWorkspaces:x,isGrouped:S,headerByFirstIndex:C,groupLabelByIndex:w}=(0,G.useMemo)(()=>{let e=[],t=new Map;v.forEach(n=>{let r=y(n);t.has(r)||(t.set(r,[]),e.push(r)),t.get(r)?.push(n)}),e.sort((e,t)=>e===Vn?1:t===Vn?-1:0);let n=e.length>1,r=[],i=new Map,a=new Map;return e.forEach(e=>{let o=e===Vn?f(_.HOME$WORKSPACE_GROUP_OTHER):b.get(e)||e.split(`/`).filter(Boolean).pop()||e;n&&i.set(r.length,o),(t.get(e)??[]).forEach(e=>{a.set(r.length,o),r.push(e)})}),{groupedWorkspaces:r,isGrouped:n,headerByFirstIndex:i,groupLabelByIndex:a}},[v,y,b,f]),T=(0,G.useCallback)(e=>{l(e),e&&m(e.name)},[l]),ee=(0,G.useCallback)(()=>{T(null),m(``)},[T]),{isOpen:E,getToggleButtonProps:D,getMenuProps:O,getInputProps:k,highlightedIndex:A,getItemProps:j,selectedItem:M,closeMenu:N}=ue({items:x,itemToString:e=>e?.name??``,selectedItem:n,onSelectedItemChange:({selectedItem:e})=>{T(e??null)},inputValue:p,onIsOpenChange:({isOpen:e,selectedItem:t})=>{m(e?``:t?.name??``)},stateReducer:(e,t)=>t.type===ue.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes}),P=(e,t,n,r,i)=>(0,K.jsx)(gt,{item:e,index:t,isSelected:r?.id===e.id,getItemProps:i,getDisplayText:e=>e.name,getItemKey:e=>e.id,ariaLabel:S?`${w.get(t)??``}, ${e.name}`.trim():void 0},e.id),F=e=>(0,K.jsx)(_t,{inputValue:e,searchMessage:f(_.HOME$NO_WORKSPACES),emptyMessage:f(_.HOME$NO_WORKSPACES),testId:`workspace-dropdown-empty`}),I=(0,G.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),L=(0,G.useCallback)(e=>{I(e),N(),u()},[N,u,I]),R=(0,G.useCallback)(e=>{I(e),N(),u()},[N,u,I]),z=(0,G.useCallback)(e=>{I(e),N(),d()},[N,d,I]),B=(0,G.useCallback)(e=>{I(e),N(),d()},[N,d,I]),V=(0,G.useMemo)(()=>(0,K.jsxs)(`div`,{className:fe,children:[(0,K.jsx)(`button`,{type:`button`,"data-testid":`add-workspaces-button`,className:g(pe,`cursor-pointer`),onMouseDown:I,onTouchStart:I,onTouchEnd:R,onClick:L,children:f(_.HOME$ADD_WORKSPACES)}),(c??e.length>0)&&(0,K.jsx)(`button`,{type:`button`,"data-testid":`manage-workspaces-button`,className:g(pe,`cursor-pointer`),onMouseDown:I,onTouchStart:I,onTouchEnd:B,onClick:z,children:f(_.HOME$MANAGE_WORKSPACES)})]}),[L,R,z,B,I,f,e.length,c]),H=(0,K.jsxs)(`div`,{className:g(`relative`,i),children:[(0,K.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[(0,K.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:(0,K.jsx)(Te,{width:16,height:16})}),(0,K.jsx)(`input`,{...k({disabled:a,placeholder:E&&n?n.name:r??f(_.HOME$WORKSPACE_PLACEHOLDER),className:g(se,`text-inherit shadow-none pl-7 pr-16 text-sm font-normal leading-5`,`placeholder:text-[var(--oh-muted)]`,`disabled:cursor-not-allowed disabled:opacity-60`),onChange:e=>{m(e.target.value)}}),"data-testid":`workspace-dropdown`}),(0,K.jsxs)(`div`,{className:`absolute right-1 top-1/2 transform -translate-y-1/2 flex items-center`,children:[n&&(0,K.jsx)(bt,{disabled:a,onClear:ee}),(0,K.jsx)(vt,{isOpen:E,disabled:a,getToggleButtonProps:D})]})]}),(0,K.jsx)(yt,{isOpen:E,filteredItems:x,inputValue:p,highlightedIndex:A,selectedItem:M,getMenuProps:O,getItemProps:j,menuRef:h,renderItem:P,renderItemPrefix:S?(e,t)=>{let n=C.get(t);return n?(0,K.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,"data-testid":`workspace-group-header`,className:`px-2 pt-2 pb-1 text-xs font-medium text-[var(--oh-muted)] select-none`,children:n}):null}:void 0,renderEmptyState:F,stickyFooterItem:V,testId:`workspace-dropdown-menu`,itemKey:e=>e.id})]});return o?(0,K.jsx)(de,{content:o,placement:`top`,children:(0,K.jsx)(`span`,{className:`block`,children:H})}):H}var Un=`oh:home-selected-workspace-path`;function Wn(){if(typeof window>`u`)return null;try{let e=window.sessionStorage.getItem(Un);return e&&e.length>0?e:null}catch{return null}}function Gn(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem(Un,e):window.sessionStorage.removeItem(Un)}catch{}}function Kn({isLoadingSettings:e=!1,onConfirm:t}){let{t:n}=s(`openhands`),{navigate:r}=le(),{data:i,error:a}=M(),o=i?.workspaceParents??[],{mutate:c}=E(),{mutate:l}=P(),{mutate:u}=S(),{mutate:f}=C(),{workspaces:p,parents:m,isLoading:h,isError:g,error:v}=k(),y=x(a??v,n),[b,w]=G.useState(null),[T,D]=G.useState(!1),[O,A]=G.useState(!1),{mutate:N,isPending:F,isSuccess:I}=be(),L=d(),R=F||I||L,z=G.useCallback(e=>{w(e),Gn(e?.path??null)},[]);G.useEffect(()=>{let e=Wn();if(!e)return;let t=p.find(t=>t.path===e);if(t){w(e=>e?.path===t.path?e:t);return}!h&&!g&&!y&&(Gn(null),w(t=>t?.path===e?null:t))},[g,h,p,y]);let B=o.length>0||!!y,V=null;y?V=y:h?V=n(_.HOME$LOADING):g&&(V=n(_.HOME$WORKSPACE_SCAN_ERROR));let H=!!y||e||h&&p.length===0;return(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[!t&&(0,K.jsxs)(`div`,{className:`flex items-center gap-[10px] pb-4`,children:[(0,K.jsx)(Oe,{width:24,height:24}),(0,K.jsx)(`span`,{className:`leading-5 font-bold text-base text-white`,children:n(_.HOME$WORKSPACES_TAB)})]}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-[10px] pb-4`,children:[(0,K.jsx)(Hn,{workspaces:p,parents:m,value:b,placeholder:y?n(_.HOME$WORKSPACES_UNSUPPORTED_PLACEHOLDER):H?n(_.HOME$LOADING):void 0,disabled:H,disabledTooltip:y,showManage:p.length>0||o.length>0,onChange:z,onAddClick:()=>D(!0),onManageClick:()=>A(!0),className:`max-w-auto`},b?.path??`empty-workspace-selection`),B&&V&&(0,K.jsx)(`p`,{className:`px-1 text-xs text-[var(--oh-text-secondary)]`,"data-testid":`workspace-status-message`,children:V})]}),(0,K.jsx)(ce,{testId:`workspace-launch-button`,variant:`primary`,type:`button`,isDisabled:!b||!t&&R||e,onClick:()=>{if(b){if(t){t(b);return}N({workingDir:b.path,entryPoint:`home_workspace_form`},{onSuccess:e=>r(`/conversations/${e.conversation_id}`)})}},className:t?`w-full`:`w-auto absolute bottom-5 left-5 right-5`,children:n(t?_.BUTTON$CONFIRM:R?_.HOME$LOADING:_.BUTTON$LAUNCH)}),(0,K.jsx)(ee,{isOpen:T,onClose:()=>D(!1),onAdd:e=>{let t=e[e.length-1];c(e,{onSuccess:()=>{t&&z(t)}})},onAddParent:e=>u(e)}),(0,K.jsx)(j,{isOpen:O,workspaces:p,workspaceParents:o,onClose:()=>A(!1),onRemove:e=>{b?.path===e&&z(null),l(e)},onRemoveParent:e=>{b?.parentPath===e&&z(null),f(e)}})]})}function qn({isOpen:e,onClose:t,onConfirm:n}){let{t:r}=s(`openhands`),{isLoadingSettings:i}=Ee();return e?(0,K.jsx)(B,{onClose:t,children:(0,K.jsxs)(V,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,K.jsx)(_e,{onClose:t,testId:`close-open-workspace-dialog`}),(0,K.jsx)(`div`,{className:`w-full pr-6`,children:(0,K.jsx)(ne,{title:r(_.HOME$OPEN_WORKSPACE)})}),(0,K.jsx)(`div`,{className:`w-full`,"data-testid":`open-workspace-dialog-body`,children:(0,K.jsx)(Kn,{isLoadingSettings:i,onConfirm:e=>{n(e),t()}})})]})}):null}function Jn({onRepoSelection:e,isLoadingSettings:t=!1,onConfirm:n}){let{navigate:r}=le(),[i,a]=G.useState(null),[o,c]=G.useState(null),[l,u]=G.useState(null),{providers:f}=Ee(),{addRecentRepository:p,setLastSelectedProvider:m,getLastSelectedProvider:h}=De(),{mutate:g,isPending:v,isSuccess:y}=be(),b=d(),{t:x}=s(`openhands`);G.useEffect(()=>{if(f.length!==0){if(f.length===1&&!l){u(f[0]);return}if(f.length>1&&!l){let e=h();e&&f.includes(e)&&u(e)}}},[f,l,h]);let S=v||y||b,C=t=>{t!==l&&(u(t),m(t),a(null),c(null),e?.(null))},w=G.useCallback(e=>{c(e)},[]);return(0,K.jsxs)(`div`,{className:`flex flex-col`,children:[!n&&(0,K.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,K.jsxs)(`div`,{className:`flex items-center gap-[10px] pb-4`,children:[(0,K.jsx)(ve,{width:24,height:24}),(0,K.jsx)(`span`,{className:`leading-5 font-bold text-base text-white`,children:x(_.COMMON$OPEN_REPOSITORY)})]})}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-[10px] pb-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`span`,{className:`text-sm text-white font-normal leading-[22px]`,children:x(_.HOME$SELECT_OR_INSERT_URL)}),f.length<=1?null:(0,K.jsx)(Ve,{providers:f,value:l,className:`max-w-[500px]`,onChange:C,disabled:t})]}),(0,K.jsx)(xt,{provider:l||f[0],value:i?.id||null,repositoryName:i?.full_name||null,placeholder:`user/repo`,disabled:!l||t,onChange:t=>{t?(e?.(t),a(t)):(e?.(null),a(null),c(null))},className:`max-w-auto`}),(()=>{let e=i?.main_branch||null;return(0,K.jsx)(Ue,{repository:i?.full_name||null,provider:l||f[0],selectedBranch:o,onBranchSelect:w,defaultBranch:e,className:`max-w-full`,disabled:!i||t})})()]}),(0,K.jsx)(ce,{testId:`repo-launch-button`,variant:`primary`,type:`button`,isDisabled:!i||!o||!n&&S||f.length>1&&!l||t,onClick:()=>{if(!(!i||!o)){if(p(i),n){n({repository:i,branch:o,provider:l});return}g({repository:{name:i.full_name||``,gitProvider:i.git_provider||`github`,branch:o.name||`main`},entryPoint:`home_repo_form`},{onSuccess:e=>r(`/conversations/${e.conversation_id}`)})}},className:`w-full`,children:x(n?_.BUTTON$CONFIRM:S?_.HOME$LOADING:_.BUTTON$LAUNCH)})]})}function Yn({isOpen:e,onClose:t,onConfirm:n}){let{t:r}=s(`openhands`),{isLoadingSettings:i}=Ee();return e?(0,K.jsx)(B,{onClose:t,children:(0,K.jsxs)(V,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,K.jsx)(_e,{onClose:t,testId:`close-open-repository-dialog`}),(0,K.jsx)(`div`,{className:`w-full pr-6`,children:(0,K.jsx)(ne,{title:r(_.COMMON$OPEN_REPOSITORY)})}),(0,K.jsx)(`div`,{className:`w-full`,"data-testid":`open-repository-dialog-body`,children:(0,K.jsx)(Jn,{isLoadingSettings:i,onConfirm:e=>{n(e),t()}})})]})}):null}function Xn(e,t){return e===`new_worktree`?_.COMMON$WORKSPACE_MODE_NEW_WORKTREE:t===`cloud`?_.COMMON$WORKSPACE_MODE_CLOUD_REPO:_.COMMON$WORKSPACE_MODE_LOCAL_REPO}function Zn({mode:e}){return e===`new_worktree`?(0,K.jsx)(D,{className:`size-3`,strokeWidth:2,"aria-hidden":!0}):(0,K.jsx)(ve,{width:12,height:12,color:`white`,"aria-hidden":!0})}var Qn=[`local_repo`,`new_worktree`];function $n({value:e,backendKind:t,onChange:n,disabled:r=!1,testId:i=`workspace-mode-selector`}){let{t:a}=s(`openhands`),[o,c]=(0,G.useState)(!1),l=(0,G.useRef)(null),u=a(Xn(e,t));return(0,G.useEffect)(()=>{if(!o)return;let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[o]),(0,G.useEffect)(()=>{if(!o)return;let e=e=>{e.key===`Escape`&&c(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[o]),(0,K.jsxs)(`div`,{ref:l,className:`relative inline-flex`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-testid":i,"aria-haspopup":`menu`,"aria-expanded":o,"aria-label":u,disabled:r,onClick:()=>c(e=>!e),className:g(`group flex flex-row items-center justify-between gap-2 pl-2.5 pr-2 py-1 rounded-[100px] truncate relative`,`border border-[rgba(71,74,84,0.50)] bg-transparent text-white`,r?`cursor-not-allowed opacity-50`:`cursor-pointer hover:border-[var(--oh-border-subtle)]`),children:[(0,K.jsx)(`span`,{className:`flex size-3 shrink-0 items-center justify-center`,children:(0,K.jsx)(Zn,{mode:e})}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-normal leading-5`,children:u}),(0,K.jsx)(v,{className:`size-3 shrink-0 text-white`,"aria-hidden":!0})]}),o?(0,K.jsx)(`div`,{role:`menu`,"data-testid":`${i}-menu`,className:g(`absolute left-0 top-full z-50 mt-1 min-w-[180px] rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface)] p-1 shadow-lg`,fe),children:Qn.map(r=>{let o=a(Xn(r,t));return(0,K.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":r===e,"data-testid":`${i}-option-${r}`,onClick:()=>{n(r),c(!1)},className:me,children:[(0,K.jsx)(`span`,{className:he,children:(0,K.jsx)(Zn,{mode:r})}),(0,K.jsx)(`span`,{className:`truncate`,children:o})]},r)})}):null]})}function er({workspace:e,repository:t,branch:n,provider:r,workspaceMode:i,backendKind:a,onRepoClick:o,onWorkspaceModeChange:s}){let c=e?e.path.replace(/\/+$/,``).split(`/`).pop()||e.path:null;return(0,K.jsxs)(`div`,{className:`flex flex-row gap-2.5 items-center flex-wrap`,"data-testid":`home-git-control-bar-preview`,children:[(0,K.jsx)(qe,{selectedRepository:t?.full_name??null,gitProvider:r??null,workspaceName:c,onClick:o}),e?(0,K.jsx)($n,{value:i,backendKind:a,onChange:s}):null,n?(0,K.jsx)(Ge,{selectedBranch:n.name,selectedRepository:t?.full_name??null,gitProvider:r??null}):null]})}function tr(){let{t:e}=s(`openhands`),{backend:t}=h(),{navigate:n}=le(),r=t.kind===`local`,[i,a]=(0,G.useState)(!1),[o,c]=(0,G.useState)(null),[u,p]=(0,G.useState)(null),[g,v]=(0,G.useState)(null),[y,b]=(0,G.useState)(null),[S,C]=(0,G.useState)(`local_repo`),[w,T]=(0,G.useState)([]),[ee,E]=(0,G.useState)(!1),{mutateAsync:D,isPending:O}=be(),k=d(),A=O||k,{isConfigured:j,isLoading:N}=Je(),P=!N&&!j,{images:F,files:I,imagesMarkedUploadAsFile:L,clearAllFiles:R}=ge(),{handleUpload:z}=Ke(),{error:B}=M({enabled:r}),V=r?x(B,e):null,H=r?!!o:!!u&&!!g,te=He(null,t=>{let i=t.trim(),a=F.length>0||I.length>0;if(!i&&!a||A||P)return;let s={images:[...F],files:[...I]},c={query:a?void 0:i||void 0,entryPoint:`home_chat_launcher`};r&&o?c={...c,workingDir:o.path,workspaceMode:S}:!r&&u&&g&&(c={...c,repository:{name:u.full_name,gitProvider:u.git_provider,branch:g.name}}),w.length>0&&(c={...c,plugins:w});let d=l.loading(e(_.HOME$CREATING_CONVERSATION),m);(async()=>{try{let t=await D(c);l.dismiss(d);try{sessionStorage.removeItem(ze)}catch{}let o=t.conversation_id,u=o.startsWith(`task-`);if(a)if(!r||u){let e=t.task_id??(u?o.slice(5):null);if(!e){f(null);return}Le(e,{content:i,images:s.images,files:s.files,imagesMarkedUploadAsFile:[...L]}),R(),await Ct({conversationId:o,text:i,images:s.images,imagesMarkedUploadAsFile:L}),n(`/conversations/${o}`);return}else try{await Re({conversationId:o,content:i,images:s.images,files:s.files,imagesMarkedUploadAsFile:L,t:e}),R()}catch(e){f(e instanceof Error?e.message:null);return}u&&i&&await Ct({conversationId:o,text:i,images:[],imagesMarkedUploadAsFile:[]}),n(`/conversations/${o}`)}catch(e){l.dismiss(d),f(e instanceof Error?e.message:null)}})()});return(0,K.jsxs)(`div`,{"data-testid":`home-chat-launcher`,className:`flex w-full flex-col items-center pt-[max(4rem,28vh)] pb-10`,children:[(0,K.jsxs)(`div`,{className:`flex w-full max-w-[800px] flex-col gap-4 md:px-4`,children:[(0,K.jsx)(`div`,{className:`flex w-full justify-center`,children:(0,K.jsx)(zn,{})}),(0,K.jsx)(`div`,{className:`w-full`,children:(0,K.jsx)(We,{onSubmit:te,onFilesPaste:z,disabled:A||P})}),(0,K.jsxs)(`div`,{className:`flex items-center justify-start gap-2`,children:[H?(0,K.jsx)(er,{workspace:o,repository:u,branch:g,provider:y,workspaceMode:S,backendKind:t.kind,onRepoClick:()=>a(!0),onWorkspaceModeChange:C}):(0,K.jsx)(Bn,{kind:r?`local`:`cloud`,onClick:()=>a(!0),disabled:A||!!V,disabledTooltip:V}),(0,K.jsx)(jt,{count:w.length,onClick:()=>E(!0),disabled:A})]}),(0,K.jsxs)(`div`,{className:`mt-8 flex w-full flex-col gap-8`,children:[(0,K.jsx)(On,{}),(0,K.jsx)(Rn,{})]})]}),r?(0,K.jsx)(qn,{isOpen:i,onClose:()=>a(!1),onConfirm:e=>{c(e),p(null),v(null),b(null),C(`local_repo`)}}):(0,K.jsx)(Yn,{isOpen:i,onClose:()=>a(!1),onConfirm:({repository:e,branch:t,provider:n})=>{p(e),v(t),b(n??e.git_provider),c(null),C(`local_repo`)}}),ee&&(0,K.jsx)(At,{selected:w,onChange:T,onClose:()=>E(!1)})]})}function nr(){let e=O(a().search);return(0,K.jsxs)(`div`,{"data-testid":`home-screen`,className:`custom-scrollbar-always h-full overflow-y-auto rounded-xl bg-transparent px-4 md:px-0 lg:px-[42px]`,children:[(0,K.jsx)(`div`,{className:`md:px-4 lg:px-0`,children:(0,K.jsx)(Ye,{})}),(0,K.jsx)(tr,{}),e?null:(0,K.jsx)(N,{})]})}var rr=o(nr);export{rr as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./home-BpZQkDWM.js";export{e as default};
@@ -0,0 +1 @@
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"./useInfiniteQuery-DbCv0Jzd.js";import{t as i}from"./useQuery-BCnzy4LX.js";import{$ as a,ct as o,n as s}from"./active-backend-context-B0wI7OzM.js";import{_ as c}from"./utils-BX9XJ0IE.js";import{i as l}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js";import{t as u}from"./proxy-CIGI9zQC.js";import{n as d}from"./use-settings-3RcgdUuZ.js";import{d as f,f as p,l as m}from"./conversation-store-B8Eahyeg.js";import{t as h}from"./agent-server-conversation-service.api-km_8sOVf.js";import{t as g}from"./use-is-authed-Bka89Xmm.js";var _=e(t()),v=n(),y=e=>(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,v.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M21 15V2.25L20.25 1.5H5.60999C5.26596 1.50381 4.92547 1.56987 4.60499 1.695C4.28194 1.83856 3.99081 2.0452 3.74868 2.30278C3.50656 2.56036 3.31831 2.8637 3.19499 3.195C3.07229 3.49004 3.00614 3.80552 2.99999 4.125V18.375C2.99638 18.7197 3.06272 19.0616 3.19499 19.38C3.46049 20.0205 3.96749 20.532 4.60499 20.805C4.92547 20.9301 5.26596 20.9962 5.60999 21H5.99999V19.5H5.60999C5.46032 19.5005 5.31218 19.4698 5.17499 19.41C4.90342 19.2974 4.68763 19.0816 4.57499 18.81C4.52706 18.6699 4.50174 18.5231 4.49999 18.375V17.625C4.50174 17.4769 4.52706 17.3301 4.57499 17.19C4.68763 16.9184 4.90342 16.7026 5.17499 16.59C5.31033 16.531 5.45634 16.5004 5.60399 16.5H19.5V19.5H13.5V21H20.25L21 20.25V15ZM5.99999 15V3H19.5V15H5.99999ZM7.49999 4.5H8.99999V6H7.49999V4.5ZM7.49999 7.5H8.99999V9H7.49999V7.5ZM8.99999 10.5H7.49999V12H8.99999V10.5ZM9.74999 20.235L7.91999 22.5H7.49999V18H12V22.5H11.58L9.74999 20.235Z`,fill:`currentColor`})}),b=e=>{if(!e)return[];let t=[];for(let n of Object.keys(e))n&&t.push(n);return t},x=()=>{let{data:e,isLoading:t}=d();return{providers:_.useMemo(()=>b(e?.provider_tokens_set),[e?.provider_tokens_set]),isLoadingSettings:t}};function S(e){switch(e){case`ADDED`:case`added`:return`A`;case`DELETED`:case`deleted`:return`D`;case`UPDATED`:case`modified`:return`M`;case`MOVED`:case`renamed`:return`R`;default:return`M`}}function C(){let e=o().backend;if(e.kind!==`cloud`)throw Error(`Cloud git call requires a cloud backend.`);return e}async function w(e){let t=C(),n=new URLSearchParams;n.set(`provider`,e.provider),n.set(`limit`,String(e.limit??100)),e.query&&n.set(`query`,e.query),e.pageId&&n.set(`page_id`,e.pageId),e.installationId&&n.set(`installation_id`,e.installationId);let r=await u({backend:t,method:`GET`,path:`/api/v1/git/repositories/search?${n.toString()}`});return{items:r?.items??[],next_page_id:r?.next_page_id??null}}async function T(e){let t=C(),n=new URLSearchParams;n.set(`provider`,e.provider),n.set(`limit`,String(e.limit??100)),e.pageId&&n.set(`page_id`,e.pageId);let r=await u({backend:t,method:`GET`,path:`/api/v1/git/installations/search?${n.toString()}`});return{items:r?.items??[],next_page_id:r?.next_page_id??null}}async function E(e){let t=C(),n=new URLSearchParams;n.set(`provider`,e.provider),n.set(`repository`,e.repository),n.set(`limit`,String(e.limit??30)),n.set(`query`,e.query??``),e.pageId&&n.set(`page_id`,e.pageId);let r=await u({backend:t,method:`GET`,path:`/api/v1/git/branches/search?${n.toString()}`});return{items:r?.items??[],next_page_id:r?.next_page_id??null}}var D=e=>e,O=()=>o().backend.kind===`cloud`,k=e=>!e||e===`undefined`||e===`null`,A={items:[],next_page_id:null},j={items:[],next_page_id:null},M={items:[],next_page_id:null},N=class{static async searchGitRepositories(e,t,n=100,r,i){return k(t)||!O()?A:w({provider:D(t),query:e||void 0,limit:n,pageId:r,installationId:i})}static async retrieveUserGitRepositories(e,t,n=30,r){return k(e)||!O()?A:w({provider:D(e),limit:n,pageId:t,installationId:r})}static async retrieveInstallationRepositories(e,t,n,r,i=30){if(k(e)||!O())return A;let a=n[t];return a?w({provider:D(e),installationId:a,limit:i,pageId:r}):A}static async getRepositoryBranches(e,t,n=``,r,i=30){return k(t)||!O()?j:E({provider:D(t),repository:e,query:n||void 0,pageId:r,limit:i})}static async searchRepositoryBranches(e,t,n,r,i=30){return k(t)||!O()?j:E({provider:D(t),repository:e,query:n,pageId:r,limit:i})}static async getUserInstallations(e,t,n=100){return k(e)||!O()?M:T({provider:D(e),pageId:t,limit:n})}static async getGitChanges(e){let t=await h.resolveConversationWorkingDir(e);return(await new l(a({workingDir:t})).gitChanges(t)).map(e=>({path:e.path,status:S(String(e.status))}))}static async getGitChangeDiff(e,t){let n=await new l(a()).gitDiff(t);return{modified:n.modified??``,original:n.original??``}}},P=e=>{let{data:t}=g(),{providers:n}=x(),r=s();return i({queryKey:[`installations`,e,r.backend.id,r.orgId],queryFn:()=>N.getUserInstallations(e),enabled:t&&!!e&&n.length>0&&c(e,r.backend.kind),staleTime:1e3*60*5,gcTime:1e3*60*15})};function F(e){let{provider:t,pageSize:n=30,enabled:i=!0}=e,{providers:a}=x(),{data:o}=P(t),l=o?.items,u=s(),d=t?c(t,u.backend.kind):!1,f=r({queryKey:[`repositories`,t,d,n,u.backend.id,u.orgId,...d?[l||[]]:[]],queryFn:async({pageParam:e})=>{if(!t)throw Error(`Provider is required`);if(d){if(!l)throw Error(`Missing installation list`);let r=e;return await N.retrieveInstallationRepositories(t,r.installationIndex,l,r.pageId??void 0,n)}let r=e;return await N.retrieveUserGitRepositories(t,r??void 0,n)},getNextPageParam:(e,t,n)=>{if(d&&l){let t=n;if(e.next_page_id)return{installationIndex:t.installationIndex,pageId:e.next_page_id};let r=t.installationIndex+1;return r<l.length?{installationIndex:r,pageId:null}:void 0}return e.next_page_id},initialPageParam:d?{installationIndex:0,pageId:null}:null,enabled:i&&(a||[]).length>0&&!!t&&(!d||Array.isArray(l)&&l.length>0),staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnWindowFocus:!1});return{data:f.data,isLoading:f.isLoading,isError:f.isError,hasNextPage:f.hasNextPage,isFetchingNextPage:f.isFetchingNextPage,fetchNextPage:f.fetchNextPage,onLoadMore:()=>{f.hasNextPage&&!f.isFetchingNextPage&&f.fetchNextPage()}}}function I(e,t,n,r=100){return i({queryKey:[`repositories`,`search`,e,t,r],queryFn:async()=>t?(await N.searchGitRepositories(e,t,r)).items:[],enabled:!!e&&!!t&&!n,staleTime:1e3*60*5,gcTime:1e3*60*15})}function L(e,t){let[n,r]=(0,_.useState)(e);return(0,_.useEffect)(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}var R={recentRepositories:[],lastSelectedProvider:null},z=p()(f((e,t)=>({...R,addRecentRepository:t=>e(e=>({recentRepositories:[t,...e.recentRepositories.filter(e=>e.id!==t.id)].slice(0,3)})),clearRecentRepositories:()=>e(()=>({recentRepositories:[]})),getRecentRepositories:()=>t().recentRepositories,setLastSelectedProvider:t=>e(()=>({lastSelectedProvider:t})),getLastSelectedProvider:()=>t().lastSelectedProvider}),{name:`home-store`,storage:m(()=>localStorage)}));export{N as a,y as c,F as i,L as n,S as o,I as r,x as s,z as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Bcgpimp9.js";var n=e(t(),1),r={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i=n.createContext&&n.createContext(r),a=[`attr`,`size`,`title`];function o(e,t){if(e==null)return{};var n,r,i=s(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function s(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(null,arguments)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?l(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t=p(e,`string`);return typeof t==`symbol`?t:t+``}function p(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function m(e){return e&&e.map((e,t)=>n.createElement(e.tag,u({key:t},e.attr),m(e.child)))}function h(e){return t=>n.createElement(g,c({attr:u({},e.attr)},t),m(e.child))}function g(e){var t=t=>{var{attr:r,size:i,title:s}=e,l=o(e,a),d=i||t.size||`1em`,f;return t.className&&(f=t.className),e.className&&(f=(f?f+` `:``)+e.className),n.createElement(`svg`,c({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,r,l,{className:f,style:u(u({color:e.color||t.color},t.style),e.style),height:d,width:d,xmlns:`http://www.w3.org/2000/svg`}),s&&n.createElement(`title`,null,s),e.children)};return i===void 0?t(r):n.createElement(i.Consumer,null,e=>t(e))}export{h as t};
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";var n=e(t(),1),r={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i=n.createContext&&n.createContext(r),a=[`attr`,`size`,`title`];function o(e,t){if(e==null)return{};var n,r,i=s(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function s(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(null,arguments)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?l(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t=p(e,`string`);return typeof t==`symbol`?t:t+``}function p(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function m(e){return e&&e.map((e,t)=>n.createElement(e.tag,u({key:t},e.attr),m(e.child)))}function h(e){return t=>n.createElement(g,c({attr:u({},e.attr)},t),m(e.child))}function g(e){var t=t=>{var{attr:r,size:i,title:s}=e,l=o(e,a),d=i||t.size||`1em`,f;return t.className&&(f=t.className),e.className&&(f=(f?f+` `:``)+e.className),n.createElement(`svg`,c({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,r,l,{className:f,style:u(u({color:e.color||t.color},t.style),e.style),height:d,width:d,xmlns:`http://www.w3.org/2000/svg`}),s&&n.createElement(`title`,null,s),e.children)};return i===void 0?t(r):n.createElement(i.Consumer,null,e=>t(e))}export{h as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./home-BpZQkDWM.js";export{e as default};
@@ -0,0 +1 @@
1
+ import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";var t=e(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{p as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";import{t as o}from"./useMutation-ChpkYxI5.js";import{$ as s,At as c,Pt as l,R as u,ct as d,jt as f,n as ee,ut as te}from"./active-backend-context-B0wI7OzM.js";import{t as p,z as m}from"./utils-BX9XJ0IE.js";import{t as h}from"./bot-DuN83i3p.js";import{c as g,i as _,l as v,m as y,p as ne,r as b,t as x,u as S}from"./settings-service.api-Dz9cZyvx.js";import{n as C}from"./use-settings-3RcgdUuZ.js";import{t as re}from"./modal-backdrop-BSzNhM4r.js";import{n as ie}from"./modal-classes-DSTLuxkA.js";import{t as ae}from"./brand-button-DJmFCyMK.js";import{t as w}from"./styled-tooltip-CQ9JEFiO.js";import{t as oe}from"./modal-close-button-dheWZ2ys.js";import{t as T}from"./settings-input-BQY115xH.js";import{t as E}from"./secrets-service-DGUNlwQd.js";import{c as se,i as ce,s as D,t as O}from"./mcp-marketplace-utils-BMnYz0Gc.js";import{t as k}from"./vendor~root-layout~index-home~home~mcp~automations-list~automation-templates~automation-set~bxsimjx0-D7IDevqN.js";var A=e(t()),j=n();function M({fieldKey:e,checked:t,onToggle:n}){let{t:r}=i(`openhands`);return(0,j.jsxs)(`label`,{"data-testid":`mcp-install-save-secret-${e}`,className:p(`flex items-center gap-2 px-3 py-2 mt-0.5 rounded-lg border cursor-pointer transition-colors`,t?`border-green-500/35 bg-green-500/10`:`border-[var(--oh-border)] bg-transparent hover:bg-white/[0.03]`),children:[(0,j.jsx)(`input`,{className:`sr-only`,id:`mcp-save-secret-checkbox-${e}`,type:`checkbox`,checked:t,onChange:e=>n(e.target.checked)}),(0,j.jsx)(`span`,{"aria-hidden":`true`,className:p(`relative inline-flex h-[22px] w-[40px] shrink-0 items-center rounded-full border transition-colors duration-200`,t?`border-green-500 bg-green-500`:`border-[var(--oh-border)] bg-surface-raised`),children:(0,j.jsx)(`span`,{className:p(`inline-block size-4 rounded-full transition-transform duration-200`,t?`translate-x-[21px] bg-white`:`translate-x-[2px] bg-[var(--oh-muted)]`)})}),(0,j.jsx)(`span`,{className:`text-sm`,children:r(m.MCP$ALSO_SAVE_AS_SECRET)}),(0,j.jsx)(`code`,{className:p(`ml-auto text-[11px] font-mono tracking-tight border rounded px-1.5 py-0.5`,t?`text-green-500 border-green-500/35 bg-white/[0.04]`:`text-tertiary-alt border-[var(--oh-border)]`),children:e}),(0,j.jsx)(w,{content:r(m.MCP$SAVE_AS_SECRET_TOOLTIP),placement:`top`,children:(0,j.jsx)(`button`,{type:`button`,"aria-label":r(m.MCP$SAVE_AS_SECRET_TOOLTIP),className:`flex items-center justify-center size-[15px] shrink-0 rounded-full border border-[var(--oh-muted)] text-tertiary-alt text-[9px] font-bold cursor-help`,onClick:e=>e.preventDefault(),children:`?`})})]})}var le=e=>(0,j.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,j.jsx)(`path`,{d:`M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z`,fill:`currentColor`})}),ue={xs:`h-4 w-4 rounded [&>svg]:h-2.5 [&>svg]:w-2.5`,sm:`h-5 w-5 rounded-md [&>svg]:h-3 [&>svg]:w-3`,md:`h-10 w-10 rounded-lg [&>svg]:h-5 [&>svg]:w-5`},N={slack:le};function de({entry:e,size:t=`md`,className:n,fallback:r,testId:i}){let a=e?N[e.id]:void 0;return(0,j.jsx)(`span`,{"aria-hidden":`true`,title:e?.name,"data-testid":i,className:p(`inline-flex shrink-0 items-center justify-center overflow-hidden`,`border border-white/10 shadow-[inset_0_1px_0_rgba(255,255,255,0.18)]`,ue[t],n),style:{backgroundColor:e?.iconBg??`var(--oh-color-tertiary)`,color:e?.iconColor??`#FFFFFF`},children:a?(0,j.jsx)(a,{}):e?.logoUrl?(0,j.jsx)(`img`,{src:e.logoUrl,alt:`${e.name} logo`,className:`h-full w-full object-contain p-[22%]`,onError:e=>{let t=e.currentTarget;t.style.display=`none`}}):r??(0,j.jsx)(h,{className:`h-5 w-5`,strokeWidth:2.25})})}var fe=new Set([`invalid_auth`,`not_authed`,`account_inactive`,`token_revoked`,`token_expired`]),P=e=>e.is_error?e.text||`tool call failed`:null,pe={github:{toolCall:{name:`get_me`,arguments:{}},interpret:P},linear:{toolCall:{name:`list_teams`,arguments:{}},interpret:P},slack:{toolCall:{name:`slack_list_channels`,arguments:{limit:1}},interpret:e=>{if(e.is_error)return e.text||`tool call failed`;try{let t=JSON.parse(e.text);if(t?.ok===!1&&fe.has(t.error))return String(t.error)}catch{}return null}}};function F(e){let t=O(e,D(k));return t?pe[t.id]:void 0}var me=4,he=/token|key|secret|auth/i,ge=[/\bgh[pousr]_[A-Za-z0-9]{16,}\b/g,/\bgithub_pat_[A-Za-z0-9_]{20,}\b/g,/\bxox[a-z](?:-[A-Za-z0-9]+)+/g,/\blin_api_[A-Za-z0-9]{10,}\b/g,/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\b/g],_e=/\bBearer\s+[A-Za-z0-9._~+/=-]{8,}/gi;function I(e,t){typeof t==`string`&&(t.length<me||t!==`**********`&&e.add(t))}function L(e,t){for(let n of Object.values(t??{}))I(e,n)}function ve(e,t){if(t)try{let n=new URL(t);I(e,n.username),I(e,n.password),I(e,decodeURIComponent(n.username)),I(e,decodeURIComponent(n.password)),n.searchParams.forEach((t,n)=>{he.test(n)&&I(e,t)})}catch{}}function ye(e,t){if(t)switch(t.strategy){case`api_key`:case`bearer`:I(e,t.value);break;case`basic`:I(e,t.username),I(e,t.password);break;case`header`:L(e,t.headers);break;case`oauth2`:I(e,t.authentication?.client_secret),L(e,t.state?.tokens);break;default:break}}function be(e){let t=new Set;return L(t,e.env),L(t,e.headers),ye(t,e.auth),ve(t,e.url),[...t].sort((e,t)=>t.length-e.length)}function R(e,...t){if(!e)return e;let n=e;for(let e of t)if(e)for(let t of be(e))n=n.split(t).join(b);n=n.replace(_e,`Bearer ${b}`);for(let e of ge)n=n.replace(e,b);return n}var z=e=>!!e&&typeof e==`object`&&!Array.isArray(e),xe=e=>{if(!z(e))return;let t=Object.entries(e).filter(e=>typeof e[1]==`string`);return t.length>0?Object.fromEntries(t):void 0},Se=e=>!!e&&Object.values(e).some(e=>e===`**********`);function Ce(e,t){if(!z(e))return e;let n=z(t)?t:{},r={...e};for(let[t,i]of Object.entries(e))if(i===`**********`){let e=n[t];typeof e==`string`&&e!==`**********`&&(r[t]=e)}else z(i)&&(r[t]=Ce(i,n[t]));return r}var we=(e,t)=>t[e.id];async function Te(e){let t=(await x.fetchSettingsFromApi(`encrypted`)).agent_settings?.mcp_config;if(z(t))return we(e,t)}async function Ee(e){let t=e.type===`stdio`&&Se(e.env),n=(e.type===`sse`||e.type===`shttp`)&&g(e.auth),r=(e.type===`sse`||e.type===`shttp`)&&Se(e.headers);if(!t&&!n&&!r)return e;try{let i=await Te(e);if(!i)return e;if(t){let t=xe(i.env)??{},n=Object.fromEntries(Object.entries(e.env??{}).map(([e,n])=>[e,n===`**********`&&typeof t[e]==`string`?t[e]:n]));return{...e,env:n}}let a={...e};if(n&&y(i.auth)&&(a.auth=Ce(e.auth,i.auth)),r){let t=xe(i.headers)??{};a.headers=Object.fromEntries(Object.entries(e.headers??{}).map(([e,n])=>[e,n===`**********`&&typeof t[e]==`string`?t[e]:n]))}return a}catch{return e}}var De=120;function Oe(e){return e.type===`stdio`?{type:`stdio`,command:e.command,...e.args?.length&&{args:e.args},...e.env&&Object.keys(e.env).length>0&&{env:e.env}}:{type:e.type===`sse`?`sse`:`http`,url:e.url,...e.headers&&Object.keys(e.headers).length>0&&{headers:e.headers},...e.auth?{auth:e.auth}:{}}}function ke(e){return e.auth?.strategy===`oauth2`?De:e.timeout}async function Ae(e){let t=F(e),n=await Ee(e),r=Oe(n),i=ke(e);return{request:{server:r,...e.name?{name:e.name}:{},...i===void 0?{}:{timeout:i},...t?{tool_call:t.toolCall}:{}},substituted:n}}function je(e,t){return e.ok?e.tool_result?{...e,tool_result:{...e.tool_result,text:R(e.tool_result.text,...t)}}:e:{...e,error:R(e.error,...t)}}function Me(e,t,n){let r=je(e,n);if(r.ok&&t&&r.tool_result&&r.tools.includes(t.toolCall.name)){let e=t.interpret(r.tool_result);if(e)return{ok:!1,error:e,error_kind:`credentials`}}return r}function Ne(){if(d().backend.kind===`local`){let{host:e,apiKey:t}=s();return{host:e,...t?{apiKey:t}:{}}}let e=te().find(e=>e.kind===`local`&&e.host);if(e)return{host:e.host.replace(/\/+$/,``),...e.apiKey?{apiKey:e.apiKey}:{}};throw Error(`OAuth authorization requires a reachable local backend.`)}function B(){let{host:e,apiKey:t}=Ne();return new a({host:e,...t?{apiKey:t}:{},timeout:125e3})}function Pe(e){return e.status===`succeeded`?{ok:!0,tools:e.tools??[],...e.tool_result!==void 0&&{tool_result:e.tool_result},...e.oauth_state!==void 0&&{oauth_state:e.oauth_state}}:{ok:!1,error:e.error||`OAuth authorization did not complete`,error_kind:e.error_kind||`unknown`}}var Fe=e=>new Promise(t=>{window.setTimeout(t,e)}),V=class e{static async testServer(e){if(d().backend.kind===`cloud`)return{ok:!0,tools:[]};let t=F(e),{host:n,apiKey:r}=s(),i=new a({host:n,...r?{apiKey:r}:{}});try{let{request:n,substituted:r}=await Ae(e);return Me(await i.testServer(n),t,[r,e])}finally{i.close()}}static async startOAuth(t){let n=B();try{return await e.startOAuthWithClient(n,t)}finally{n.close()}}static async getOAuthStatus(t){let n=B();try{return await e.getOAuthStatusWithClient(n,t)}finally{n.close()}}static async submitOAuthCallback(t,n){let r=B();try{return await e.submitOAuthCallbackWithClient(r,t,n)}finally{r.close()}}static async authorizeOAuth(t){let n=F(t),r=e=>Me(e,n,[t]),i=window.open(`about:blank`,`_blank`),a=B();try{let n=await e.startOAuthWithClient(a,t);if(!n.ok||!n.job_id||!n.authorization_url)return i?.close(),r({ok:!1,error:n.error||`Could not start OAuth authorization`,error_kind:n.error_kind||`unknown`});let o=await e.getOAuthStatusWithClient(a,n.job_id);for(let t=0;t<20;t+=1){if(o.status===`succeeded`||o.status===`failed`)return i?.close(),r(Pe(o));if(o.callback_ready)break;await Fe(250),o=await e.getOAuthStatusWithClient(a,n.job_id)}i&&(i.location.href=n.authorization_url);for(let t=0;t<De;t+=1)if(await Fe(1e3),o=await e.getOAuthStatusWithClient(a,n.job_id),o.status===`succeeded`||o.status===`failed`)return i?.close(),r(Pe(o));return{ok:!1,error:`OAuth authorization timed out`,error_kind:`timeout`}}finally{a.close()}}static async startOAuthWithClient(e,t){let{request:n}=await Ae(t);return e.startOAuth(n)}static async getOAuthStatusWithClient(e,t){return await e.getOAuthStatus(t)}static async submitOAuthCallbackWithClient(e,t,n){return await e.submitOAuthCallback(t,{callback_url:n})}},H=e=>Object.keys(e??{}).sort();function U(e){return e.type===`stdio`?JSON.stringify({type:e.type,name:e.name??``,command:e.command??``,args:e.args??[],envKeys:H(e.env)}):JSON.stringify({type:e.type,name:e.name??``,url:e.url??``,headerKeys:H(e.headers),authStrategy:e.auth?.strategy??``,authHeaderName:e.auth?.strategy===`api_key`?e.auth.header_name??``:``,authHeaderKeys:e.auth?.strategy===`header`?H(e.auth.headers):[]})}var W={},G=new Set,Ie=1;function K(e){W=e,G.forEach(e=>e())}function Le(){return W}function Re(e){return G.add(e),()=>{G.delete(e)}}function ze(e){let t=Ie;return Ie+=1,K({...W,[e]:{status:`checking`,checkId:t}}),t}function q(e,t,n){let r=W[e];r?.status!==`checking`||r.checkId!==t||K({...W,[e]:n})}function Be(e,t){K({...W,[e]:t})}function Ve(e){if(!(e in W))return;let{[e]:t,...n}=W;K(n)}var He=/\b(401|403)\b|unauthorized|forbidden|invalid[ _-]?(token|credentials?|api[ _-]?key)/i;function Ue(e,t){return{status:`failed`,kind:`unknown`,error:R(t instanceof Error?t.message:String(t),e),checkedAt:Date.now()}}function J(e,t){let n=Date.now();if(!t.ok)return{status:`failed`,kind:(t.error_kind===`connection`||t.error_kind===`unknown`)&&He.test(t.error)?`credentials`:t.error_kind,error:t.error,checkedAt:n};let r=F(e);return{status:`healthy`,verification:r&&t.tools.includes(r.toolCall.name)&&t.tool_result&&!t.tool_result.is_error?`verified`:`connectivity-only`,toolCount:t.tools.length,checkedAt:n}}async function We(e){let t=U(e),n=ze(t),r;try{r=J(e,await V.testServer(e))}catch(t){r=Ue(e,t)}q(t,n,r)}async function Ge(e){let t=U(e),n=ze(t);try{let r=await V.authorizeOAuth(e);return q(t,n,J(e,r)),r}catch(r){return q(t,n,Ue(e,r)),null}}function Y(e,t,n){let r=U(e);n.some(e=>U(e)===r)||Be(r,J(e,t))}function Ke(){let e=r(),{data:t}=C();return o({mutationFn:async e=>{if(!t)throw Error(`MCP settings are still loading. Please try again.`);let n=_(t.mcp_config??v(t.agent_settings?.mcp_config),e.name,e.type);await x.createMcpServer(n,S(e))},onSuccess:()=>{e.invalidateQueries({queryKey:u.personal()})}})}function qe(){return o({mutationFn:e=>V.testServer(e)})}function Je(e){return e.length<=3?e.join(`, `):`${e.slice(0,3).join(`, `)} … (+${e.length-3})`}function Ye(){let{t:e}=i(`openhands`),t=r();return(0,A.useCallback)((n,r,i)=>{let a=n.filter(e=>i[e.key]&&(r[e.key]??``).trim());return a.length===0?Promise.resolve():Promise.allSettled(a.map(e=>E.createSecret(e.key,r[e.key].trim(),e.label))).then(n=>{let r=a.filter((e,t)=>n[t].status===`fulfilled`).map(e=>e.key),i=a.filter((e,t)=>n[t].status===`rejected`).map(e=>e.key);r.length>0&&(t.invalidateQueries({queryKey:[`secrets-search`]}),t.invalidateQueries({queryKey:[`secrets`]}),f(e(m.MCP$SECRETS_SAVED,{keys:Je(r)}))),i.length>0&&c(e(m.MCP$SECRETS_SAVE_FAILED,{keys:Je(i)}))})},[e,t])}function X(e,t,n){switch(t){case`timeout`:return e(m.MCP$TEST_ERROR_TIMEOUT);case`connection`:return e(m.MCP$TEST_ERROR_CONNECTION);case`credentials`:return e(m.MCP$TEST_ERROR_CREDENTIALS,{error:n});default:return e(m.MCP$TEST_ERROR_UNKNOWN,{error:n})}}function Z(e){let t=/\[([^\]]+)\]\(([^)]+)\)/g,n=[],r=0;for(let i of e.matchAll(t))i.index>r&&n.push(e.slice(r,i.index)),n.push((0,j.jsx)(`a`,{href:/^https?:\/\//i.test(i[2])?i[2]:`#`,target:`_blank`,rel:`noreferrer`,className:`underline hover:text-white transition-colors`,children:i[1]},i.index)),r=i.index+i[0].length;return r<e.length&&n.push(e.slice(r)),n}function Q(e){return e?.transport.kind!==`shttp`&&e?.transport.kind!==`sse`?!1:[`api_key`,`bearer`].includes(e.auth.strategy)}function Xe(e){return!!e&&e.auth.strategy===`oauth2`}function Ze(e){return e.transport.kind===`stdio`?e.auth.apiKeyOptional??!1:e.auth.apiKeyOptional??e.transport.apiKeyOptional??!1}function $(e){return e?.transport.kind!==`shttp`&&e?.transport.kind!==`sse`?[]:e.transport.headerFields??[]}function Qe(e){let t={},n={},r=ce(e),i=r?.transport;if(i?.kind===`stdio`){for(let e of i.envFields??[])t[e.key]=``,n[e.key]=e.type===`password`;for(let e of i.argFields??[])t[e.key]=``}else if(i?.kind===`shttp`||i?.kind===`sse`){t.url=i.url;for(let e of $(r))t[e.key]=``,n[e.key]=e.type===`password`;Q(r)&&(t.api_key=``,r?.auth.credentialSecretName&&(n.api_key=r.auth.saveCredentialAsSecretByDefault??!1))}return{values:t,errors:{},savedAsSecret:n}}function $e({entry:e,existingServers:t,onClose:n,onSuccess:r}){let{t:a}=i(`openhands`),{mutate:o,isPending:s}=Ke(),{mutate:c,isPending:u}=qe(),d=Ye(),{backend:te}=ee(),p=te.kind===`cloud`,[h,g]=A.useState(()=>Qe(e)),_=A.useRef(h);_.current=h;let[v,y]=A.useState(null),[b,x]=A.useState(!1),[S,C]=A.useState(!1),w=ce(e),E=w?.transport,D=u||S||s||b,O=(e,t)=>{g(n=>({...n,values:{...n.values,[e]:t},errors:{...n.errors,[e]:null}})),y(null)},k=(e,t)=>{g(n=>({...n,savedAsSecret:{...n.savedAsSecret,[e]:t}}))},le=()=>{let e=w?.auth.credentialSecretName,t=_.current.values.api_key?.trim();return!e||!t||!_.current.savedAsSecret.api_key?Promise.resolve():d([{key:e,label:w.auth.credentialLabel??e,type:`password`,required:!0}],{[e]:t},{[e]:!0})},ue=()=>E?.kind===`stdio`?d(E.envFields??[],_.current.values,_.current.savedAsSecret):E?.kind===`shttp`||E?.kind===`sse`?Promise.all([le(),d($(w),_.current.values,_.current.savedAsSecret)]).then(()=>void 0):Promise.resolve(),N=i=>{if(i.auth?.strategy===`oauth2`){C(!0),V.authorizeOAuth(i).then(s=>{if(!s.ok){y(X(a,s.error_kind,s.error));return}let c=s.oauth_state?{...i,auth:{...i.auth,state:s.oauth_state}}:i;o(c,{onSuccess:()=>{p||Y(c,s,t),f(a(m.MCP$INSTALL_SUCCESS)),x(!0),(async()=>{try{await ue()}finally{r?.(e),n()}})()},onError:e=>{y(l(e)||a(m.ERROR$GENERIC))}})}).catch(e=>{y(l(e)||a(m.ERROR$GENERIC))}).finally(()=>C(!1));return}c(i,{onSuccess:s=>{if(!s.ok){y(X(a,s.error_kind,s.error));return}let c=s.oauth_state&&i.auth?.strategy===`oauth2`?{...i,auth:{...i.auth,state:s.oauth_state}}:i;o(c,{onSuccess:()=>{p||Y(c,s,t),f(a(m.MCP$INSTALL_SUCCESS)),x(!0),(async()=>{try{await ue()}finally{r?.(e),n()}})()},onError:e=>{y(l(e)||a(m.ERROR$GENERIC))}})},onError:e=>{y(l(e)||a(m.ERROR$GENERIC))}})},fe=()=>{if(E?.kind!==`shttp`&&E?.kind!==`sse`||!w)return;let t=h.values.api_key?.trim()??``,n=E.urlEditable?h.values.url?.trim()??``:E.url,r=Xe(w),i=Q(w),o=$(w),s={};if(!n)s.url=a(m.SETTINGS$MCP_ERROR_URL_REQUIRED);else try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s.url=a(m.SETTINGS$MCP_ERROR_URL_INVALID_PROTOCOL))}catch{s.url=a(m.SETTINGS$MCP_ERROR_URL_INVALID)}for(let e of o)e.required&&!(h.values[e.key]??``).trim()&&(s[e.key]=a(m.MCP$ERROR_FIELD_REQUIRED));if(!r&&i&&!Ze(w)&&!t&&(s.api_key=a(m.MCP$ERROR_FIELD_REQUIRED)),Object.values(s).some(Boolean)){g(e=>({...e,errors:s}));return}let c=r?se(w):void 0,l=Object.fromEntries(o.map(e=>[e.key,h.values[e.key]?.trim()??``]).filter(([,e])=>e)),u=Object.keys(l).length>0,d;r?d={strategy:`oauth2`,...c&&{authentication:c}}:i&&t?d=w.auth.strategy===`api_key`?{strategy:`api_key`,value:t,...w.auth.apiKeyHeaderName&&{header_name:w.auth.apiKeyHeaderName}}:{strategy:`bearer`,value:t}:u&&(d={strategy:`header`,headers:l}),N({id:``,type:E.kind,name:ne(e.id),url:n,...d&&{auth:d},...u&&d?.strategy!==`header`&&{headers:l}})},P=()=>{if(E?.kind!==`stdio`)return;let e=E,t={};for(let n of e.envFields??[])n.required&&!(h.values[n.key]??``).trim()&&(t[n.key]=a(m.MCP$ERROR_FIELD_REQUIRED));for(let n of e.argFields??[])n.required&&!(h.values[n.key]??``).trim()&&(t[n.key]=a(m.MCP$ERROR_FIELD_REQUIRED));if(Object.values(t).some(Boolean)){g(e=>({...e,errors:t}));return}let n={};for(let t of e.envFields??[]){let e=h.values[t.key]?.trim();e&&(n[t.key]=e)}let r=[];for(let t of e.argFields??[]){let e=h.values[t.key]?.trim();if(e)for(let t of e.split(/\s+/))t&&r.push(t)}N({id:``,type:`stdio`,name:e.serverName,command:e.command,args:[...e.args,...r],...Object.keys(n).length>0&&{env:n}})};return(0,j.jsx)(re,{onClose:n,"aria-label":e.name,children:(0,j.jsxs)(`form`,{"data-testid":`mcp-install-modal`,"data-marketplace-id":e.id,onSubmit:e=>(e.preventDefault(),y(null),E?.kind===`shttp`||E?.kind===`sse`?fe():P()),className:`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[85vh] overflow-y-auto custom-scrollbar`,children:[(0,j.jsx)(oe,{onClose:n,testId:`mcp-install-modal-close`,disabled:D}),(0,j.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,j.jsx)(de,{entry:e}),(0,j.jsxs)(`div`,{className:`flex flex-col flex-1`,children:[(0,j.jsx)(`h2`,{className:ie,children:e.name}),(0,j.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:e.description})]})]}),e.installHint&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:e.installHint}),e.docsUrl&&(0,j.jsx)(`a`,{href:e.docsUrl,target:`_blank`,rel:`noreferrer`,className:`text-xs text-[var(--oh-muted)] hover:text-white hover:underline self-start transition-colors`,children:a(m.MCP$VIEW_DOCS)}),(0,j.jsx)(`div`,{className:`flex flex-col gap-3`,children:(()=>{if(E?.kind===`shttp`||E?.kind===`sse`){let e=Xe(w),t=Q(w),n=w?Ze(w):!1,r=w?.auth.credentialSecretName,i=$(w);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(T,{testId:`mcp-install-field-url`,name:`url`,type:`url`,label:a(m.SETTINGS$MCP_URL),value:h.values.url??E.url,onChange:e=>O(`url`,e),isDisabled:!E.urlEditable,className:`w-full`}),h.errors.url&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:h.errors.url}),i.map(e=>(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(T,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:h.values[e.key]??``,onChange:t=>O(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(e.helperText)}),h.errors[e.key]&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:h.errors[e.key]}),e.key in h.savedAsSecret&&(0,j.jsx)(M,{fieldKey:e.key,checked:h.savedAsSecret[e.key]??!1,onToggle:t=>k(e.key,t)})]},e.key)),e?(0,j.jsxs)(`div`,{"data-testid":`mcp-install-oauth-info`,className:`flex flex-col gap-2 p-3 rounded-lg border border-[var(--oh-border)] bg-base-tertiary`,children:[(0,j.jsx)(`p`,{className:`text-sm text-secondary-light`,children:a(m.MCP$OAUTH_CONNECT_INFO)}),(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:a(m.MCP$OAUTH_CONNECT_HINT)})]}):t?(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(T,{testId:`mcp-install-field-api_key`,name:`api_key`,type:`password`,label:w?.auth.credentialLabel??a(m.SETTINGS$MCP_API_KEY),value:h.values.api_key??``,onChange:e=>O(`api_key`,e),placeholder:w?.auth.credentialPlaceholder??a(m.SETTINGS$MCP_API_KEY_PLACEHOLDER),showOptionalTag:n,required:!n,className:`w-full`}),w?.auth.credentialHelp&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(w.auth.credentialHelp)}),h.errors.api_key&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:h.errors.api_key}),r&&(0,j.jsx)(M,{fieldKey:r,checked:h.savedAsSecret.api_key??!1,onToggle:e=>k(`api_key`,e)})]}):null]})}if(E?.kind!==`stdio`)return null;let e=E;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(T,{testId:`mcp-install-field-command-readonly`,name:`command-readonly`,type:`text`,label:a(m.MCP$COMMAND_LABEL),value:`${e.command} ${e.args.join(` `)}`.trim(),onChange:()=>{},isDisabled:!0,className:`w-full`}),(e.envFields??[]).map(e=>(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(T,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:h.values[e.key]??``,onChange:t=>O(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(e.helperText)}),h.errors[e.key]&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:h.errors[e.key]}),e.key in h.savedAsSecret&&(0,j.jsx)(M,{fieldKey:e.key,checked:h.savedAsSecret[e.key],onToggle:t=>k(e.key,t)})]},e.key)),(e.argFields??[]).map(e=>(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(T,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:h.values[e.key]??``,onChange:t=>O(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(e.helperText)}),h.errors[e.key]&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:h.errors[e.key]})]},e.key))]})})()}),v&&(0,j.jsx)(`p`,{"data-testid":`mcp-install-modal-error`,className:`text-sm text-red-500 whitespace-pre-wrap`,children:v}),(0,j.jsxs)(`div`,{className:`flex justify-end gap-2 mt-2`,children:[(0,j.jsx)(ae,{type:`button`,variant:`secondary`,onClick:n,testId:`mcp-install-cancel`,isDisabled:D,children:a(m.BUTTON$CANCEL)}),(0,j.jsx)(ae,{type:`submit`,variant:`primary`,isDisabled:D,testId:`mcp-install-submit`,children:a(u||S?m.MCP$VERIFYING:s||b?m.SETTINGS$SAVING:m.MCP$INSTALL_BUTTON)})]})]})})}export{We as a,Ve as c,U as d,V as f,Ke as i,Le as l,X as n,Ge as o,de as p,qe as r,Y as s,$e as t,Re as u};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{t as a}from"./useMutation-ChpkYxI5.js";import{t as o}from"./useQuery-BCnzy4LX.js";import{At as s,jt as c,n as l}from"./active-backend-context-B0wI7OzM.js";import{t as u,z as d}from"./utils-BX9XJ0IE.js";import{g as f,n as p,t as m,x as h}from"./use-tracking-CTtkLAmx.js";import{r as g}from"./modal-classes-DSTLuxkA.js";import{f as _,l as v}from"./form-control-classes-pHtZUI6K.js";import{t as y}from"./brand-button-DJmFCyMK.js";import{u as b}from"./dropdown-classes-f91ARMV1.js";import{t as x}from"./settings-input-BQY115xH.js";import{t as S}from"./use-llm-profiles-C-tDO6UB.js";import{t as C}from"./settings-dropdown-input-Cx4g7Xfl.js";import{t as w}from"./x-mark-BopmFoBq.js";import{t as T}from"./automation-C_eCrGyP.js";import{i as E,t as D}from"./use-manifest-capabilities-DLP5wCxp.js";var O=[`automation-health`];function k(){let e=l();return o({queryKey:[...O,e.backend.id,e.orgId],queryFn:()=>p.checkHealth(),staleTime:30*1e3,retry:!1})}var A=e(t(),1),j=[`automation-detail`],M=[`automation-runs`];function N(e){let{id:t,enabled:n=!0}=e,r=l();return o({queryKey:[...j,t,r.backend.id,r.orgId],queryFn:()=>p.getAutomation(t),staleTime:300*1e3,enabled:!!t&&n})}function P(e){let{id:t,limit:n=20,offset:r=0,enabled:i=!0}=e,a=l();return o({queryKey:[...M,t,{limit:n,offset:r},a.backend.id,a.orgId],queryFn:()=>p.getAutomationRuns(t,n,r),staleTime:60*1e3,enabled:!!t&&i,refetchInterval:e=>{let t=e.state.data;return t&&t.runs.some(e=>e.status===T.PENDING||e.status===T.RUNNING)?3e3:!1}})}var F=[`automations`];function I(e={}){let{limit:t=50,offset:n=0,enabled:r=!0}=e,i=l();return o({queryKey:[...F,{limit:t,offset:n},i.backend.id,i.orgId],queryFn:()=>p.getAutomations(t,n),staleTime:0,enabled:r})}function L(){let e=r(),t=l(),{trackAutomationDisableButton:n}=m();return a({mutationFn:({id:e,enabled:t})=>p.toggleAutomation(e,t),onSuccess:(r,i)=>{e.invalidateQueries({queryKey:F}),e.invalidateQueries({queryKey:j}),i.enabled||n({backendKind:t.backend.kind})}})}function R(){let e=r(),t=l(),{trackAutomationImported:n}=m();return a({mutationFn:e=>p.createAutomation({...e,enabled:!1}),onSuccess:()=>{e.invalidateQueries({queryKey:F}),n({backendKind:t.backend.kind})}})}function z(){let e=r(),t=l(),{trackAutomationEdited:n}=m();return a({mutationFn:({id:e,body:t})=>p.updateAutomation(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:F}),e.invalidateQueries({queryKey:j}),n({backendKind:t.backend.kind})}})}function B(){let e=r(),t=l(),{trackAutomationDeleted:n}=m();return a({mutationFn:e=>p.deleteAutomation(e),onSuccess:()=>{e.invalidateQueries({queryKey:F}),n({backendKind:t.backend.kind})}})}function V(){let e=r(),t=l(),{trackAutomationExecuted:n}=m();return a({mutationFn:e=>p.dispatchAutomation(e),onSuccess:(r,i)=>{e.invalidateQueries({queryKey:F}),e.invalidateQueries({queryKey:j}),e.invalidateQueries({queryKey:[...M,i]}),n({backendKind:t.backend.kind})}})}function H(){let e=r();return a({mutationFn:({runId:e})=>p.cancelAutomationRun(e),onSuccess:(t,{automationId:n})=>{e.invalidateQueries({queryKey:F}),e.invalidateQueries({queryKey:j}),e.invalidateQueries({queryKey:[...M,n]})}})}var U=/^(\d+)$/;function W(e,t,n){let r=e.match(U);if(!r)return null;let i=Number(r[1]);return Number.isNaN(i)||i<t||i>n?null:i}function G(e){let t=(e??``).trim();if(!t)return{kind:`custom`,raw:``};let n=t.split(/\s+/);if(n.length!==5)return{kind:`custom`,raw:t};let[r,i,a,o,s]=n,c=W(r,0,59),l=W(i,0,23);if(c===null||l===null)return{kind:`custom`,raw:t};if(a!==`*`||o!==`*`)return{kind:`custom`,raw:t,hour:l,minute:c};if(s===`*`||s===`0-6`)return{kind:`daily`,hour:l,minute:c};if(s===`1-5`)return{kind:`weekdays`,hour:l,minute:c};let u=W(s,0,6);return u===null?{kind:`custom`,raw:t,hour:l,minute:c}:{kind:`weekly`,hour:l,minute:c,weekday:u}}function K(e){let{kind:t,hour:n,minute:r,weekday:i}=e;switch(t){case`daily`:return`${r} ${n} * * *`;case`weekdays`:return`${r} ${n} * * 1-5`;case`weekly`:return`${r} ${n} * * ${i??1}`;default:return t}}function q(e,t){return`${String(e).padStart(2,`0`)}:${String(t).padStart(2,`0`)}`}function J(e){let t=e.match(/^(\d{1,2}):(\d{2})$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return Number.isNaN(n)||Number.isNaN(r)||n<0||n>23||r<0||r>59?null:{hour:n,minute:r}}function Y(e){return e?Array.isArray(e)?e.join(`, `):e:`—`}function X(e,t){let n=e.trim();if(!n)return{value:null};let r=Number(n);return Number.isInteger(r)?r<=0?{errorKey:d.AUTOMATIONS$ERROR_TIMEOUT_POSITIVE}:t!==void 0&&r>t?{errorKey:d.AUTOMATIONS$ERROR_TIMEOUT_MAX_EXCEEDED}:{value:r}:{errorKey:d.AUTOMATIONS$ERROR_TIMEOUT_INVALID_NUMBER}}var Z=n(),Q=`__active__`,$=[d.AUTOMATIONS$WEEKDAY_SUN,d.AUTOMATIONS$WEEKDAY_MON,d.AUTOMATIONS$WEEKDAY_TUE,d.AUTOMATIONS$WEEKDAY_WED,d.AUTOMATIONS$WEEKDAY_THU,d.AUTOMATIONS$WEEKDAY_FRI,d.AUTOMATIONS$WEEKDAY_SAT];function ee(e){let t=e.timeout==null?``:String(e.timeout);if(e.trigger.type===`event`)return{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:`custom`,weekday:1,timeOfDay:``,isCustomSchedule:!0,rawSchedule:``,timeout:t};let n=G(e.trigger.schedule);return n.kind===`custom`?{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:`custom`,weekday:1,timeOfDay:n.hour!==void 0&&n.minute!==void 0?q(n.hour,n.minute):``,isCustomSchedule:!0,rawSchedule:n.raw,timeout:t}:{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:n.kind,weekday:n.kind===`weekly`?n.weekday??1:1,timeOfDay:q(n.hour,n.minute),isCustomSchedule:!1,rawSchedule:e.trigger.schedule??``,timeout:t}}function te({automation:e,isOpen:t,onClose:n}){let{t:r}=i(`openhands`),a=z(),o=h().editTitle??r(d.AUTOMATIONS$EDIT_TITLE),l=f(`name`),p=f(`prompt`),m=f(`model`),b=f(`timeout`),T=f(`schedule`),{data:O}=D(),k=O?.maxAutomationTimeoutSeconds,j=k===void 0?void 0:Math.min(k,b.max??k),{data:M,isLoading:N}=S(),P=M?.profiles??[],F=[{key:Q,label:r(d.COMMON$ACTIVE_PROFILE)},...P.map(e=>({key:e.name,label:e.name}))],I=(0,A.useMemo)(()=>ee(e),[e]),[L,R]=(0,A.useState)(I),[B,V]=(0,A.useState)(null),[H,U]=(0,A.useState)(null);if((0,A.useEffect)(()=>{t&&(R(I),V(null),U(null))},[t,I]),!t)return null;let W=[{key:`daily`,label:r(d.AUTOMATIONS$FREQUENCY_DAILY)},{key:`weekdays`,label:r(d.AUTOMATIONS$FREQUENCY_WEEKDAYS)},{key:`weekly`,label:r(d.AUTOMATIONS$FREQUENCY_WEEKLY)},...L.isCustomSchedule?[{key:`custom`,label:r(d.AUTOMATIONS$FREQUENCY_CUSTOM)}]:[]],G=$.map((e,t)=>({key:String(t),label:r(e)})),q=!L.isCustomSchedule||J(L.timeOfDay)!==null||L.timeOfDay===``;return(0,Z.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`presentation`}),(0,Z.jsxs)(`div`,{className:`relative w-full max-w-md rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,Z.jsx)(`button`,{type:`button`,onClick:n,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":r(d.AUTOMATIONS$CANCEL),children:(0,Z.jsx)(w,{className:`size-5`})}),(0,Z.jsx)(`h2`,{className:g,children:o}),(0,Z.jsxs)(`form`,{onSubmit:t=>{t.preventDefault();let i=L.name.trim();if(!i){V(r(d.AUTOMATIONS$NAME_REQUIRED));return}V(null);let o=X(L.timeout,j);if(`errorKey`in o){U(r(o.errorKey,{max:j}));return}U(null);let l={};i!==e.name&&(l.name=i);let u=L.prompt.trim();u!==(e.prompt??``).trim()&&(l.prompt=u.length===0?null:u);let f=L.model.trim();if(f!==(e.model??``)&&(l.model=f===``?null:f),(o.value??null)!==(e.timeout??null)&&(l.timeout=o.value),!L.isCustomSchedule&&L.frequency!==`custom`){let t=J(L.timeOfDay);if(t){let n=K({kind:L.frequency,hour:t.hour,minute:t.minute,weekday:L.frequency===`weekly`?L.weekday:void 0});n!==e.trigger.schedule&&(l.trigger={...e.trigger,schedule:n})}}if(Object.keys(l).length===0){n();return}a.mutate({id:e.id,body:l},{onSuccess:()=>{c(r(d.AUTOMATIONS$EDIT_SUCCESS)),n()},onError:e=>{s(E(e,r(d.AUTOMATIONS$EDIT_ERROR)))}})},noValidate:!0,className:`mt-4 flex flex-col gap-4`,"aria-label":o,children:[l.present&&(0,Z.jsx)(x,{testId:`edit-automation-name`,name:`name`,type:`text`,label:l.label??r(d.AUTOMATIONS$NAME),value:L.name,onChange:e=>R(t=>({...t,name:e})),error:B??void 0,showRequiredTag:l.required}),p.present&&(0,Z.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,Z.jsx)(`span`,{className:`text-sm`,children:p.label??r(d.AUTOMATIONS$PROMPT)}),(0,Z.jsx)(`textarea`,{"data-testid":`edit-automation-prompt`,name:`prompt`,value:L.prompt,onChange:e=>R(t=>({...t,prompt:e.target.value})),rows:4,className:u(v,`placeholder:italic`)}),(0,Z.jsx)(`span`,{className:`text-xs text-muted`,children:p.help??r(d.AUTOMATIONS$EDIT_PROMPT_HINT)})]}),m.present&&(N||P.length>0)&&(0,Z.jsx)(C,{testId:`edit-automation-model`,name:`model`,label:m.label??r(d.AUTOMATIONS$DETAIL$MODEL),items:F,selectedKey:L.model||Q,isLoading:N,placeholder:r(d.COMMON$ACTIVE_PROFILE),onSelectionChange:e=>R(t=>({...t,model:e&&e!==Q?String(e):``}))}),b.present&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,Z.jsx)(x,{testId:`edit-automation-timeout`,name:`timeout`,type:`number`,label:b.label??r(d.AUTOMATIONS$TIMEOUT),value:L.timeout,onChange:e=>R(t=>({...t,timeout:e})),error:H??void 0,showOptionalTag:!0,min:b.min??1,max:j,step:1,placeholder:`600`}),(0,Z.jsx)(`span`,{"data-testid":`edit-automation-timeout-hint`,className:`text-xs text-muted`,children:b.help??r(d.AUTOMATIONS$TIMEOUT_HINT)})]}),e.trigger.type===`event`?(0,Z.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg bg-[var(--oh-surface-raised)] p-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:r(d.AUTOMATIONS$DETAIL$TRIGGER)}),(0,Z.jsx)(`span`,{className:`text-sm text-content`,children:r(d.AUTOMATIONS$DETAIL$TRIGGER_EVENT)})]}),e.trigger.source&&(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:r(d.AUTOMATIONS$DETAIL$EVENT_SOURCE)}),(0,Z.jsx)(`span`,{className:`text-sm text-content`,children:e.trigger.source})]}),e.trigger.on&&(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:r(d.AUTOMATIONS$DETAIL$EVENT_TYPE)}),(0,Z.jsx)(`code`,{className:`text-xs font-mono text-content`,children:Y(e.trigger.on)})]}),e.trigger.filter&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:r(d.AUTOMATIONS$DETAIL$EVENT_FILTER)}),(0,Z.jsx)(`code`,{className:`text-xs font-mono text-content break-all`,children:e.trigger.filter})]})]}):T.present?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(C,{testId:`edit-automation-frequency`,name:`frequency`,label:T.label??r(d.AUTOMATIONS$FREQUENCY),items:W,selectedKey:L.frequency,isDisabled:L.isCustomSchedule,onSelectionChange:e=>{!e||L.isCustomSchedule||R(t=>({...t,frequency:e}))}}),L.frequency===`weekly`&&!L.isCustomSchedule&&(0,Z.jsx)(C,{testId:`edit-automation-weekday`,name:`weekday`,label:r(d.AUTOMATIONS$WEEKDAY),items:G,selectedKey:String(L.weekday),onSelectionChange:e=>{e!==null&&R(t=>({...t,weekday:Number(e)}))}}),(0,Z.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,Z.jsx)(`span`,{className:`text-sm`,children:r(d.AUTOMATIONS$TIME_OF_DAY)}),(0,Z.jsx)(`input`,{"data-testid":`edit-automation-time`,name:`timeOfDay`,type:`time`,value:L.timeOfDay,onChange:e=>R(t=>({...t,timeOfDay:e.target.value})),disabled:L.isCustomSchedule&&!q,className:u(_,`disabled:bg-[var(--oh-surface-raised)]`)}),e.timezone&&(0,Z.jsxs)(`span`,{className:`text-xs text-muted`,children:[r(d.AUTOMATIONS$TIMEZONE),`: `,e.timezone]})]}),L.isCustomSchedule&&(0,Z.jsxs)(`p`,{className:`text-xs text-muted`,"data-testid":`custom-schedule-hint`,children:[r(d.AUTOMATIONS$CUSTOM_SCHEDULE_HINT),L.rawSchedule&&(0,Z.jsxs)(Z.Fragment,{children:[` `,(0,Z.jsx)(`code`,{className:`text-xs text-content`,children:L.rawSchedule})]})]})]}):null,(0,Z.jsxs)(`div`,{className:`mt-2 flex justify-end gap-3`,children:[(0,Z.jsx)(y,{testId:`edit-automation-cancel`,type:`button`,variant:`secondary`,onClick:n,isDisabled:a.isPending,children:r(d.AUTOMATIONS$CANCEL)}),(0,Z.jsx)(y,{testId:`edit-automation-save`,type:`submit`,variant:`primary`,isDisabled:a.isPending,"aria-busy":a.isPending,children:a.isPending?r(d.AUTOMATIONS$SAVING):r(d.AUTOMATIONS$SAVE)})]})]})]})]})}var ne=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,Z.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z`})});function re(e){return!0}var ie=e=>(0,Z.jsxs)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,Z.jsx)(`g`,{clipPath:`url(#clip0_8467_30872)`,children:(0,Z.jsx)(`path`,{d:`M6.26693 21.4874L6.25583 21.4951L6.24514 21.5033C5.95991 21.7227 5.5 21.5308 5.5 21.0996V2.89961C5.5 2.4684 5.95991 2.2765 6.24514 2.49592L6.25634 2.50452L6.26799 2.51249L19.518 11.5625L19.518 11.5625L19.5226 11.5656C19.8258 11.7677 19.8258 12.1815 19.5226 12.3836L19.5226 12.3835L19.5169 12.3874L6.26693 21.4874Z`,fill:`currentColor`,stroke:`currentColor`})}),(0,Z.jsx)(`defs`,{children:(0,Z.jsx)(`clipPath`,{id:`clip0_8467_30872`,children:(0,Z.jsx)(`rect`,{width:24,height:24,fill:`white`})})})]}),ae=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,Z.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M5.636 5.636a9 9 0 1012.728 0M12 3v9`})});function oe({icon:e,label:t}){return(0,Z.jsxs)(`span`,{className:`flex min-w-0 w-full items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:u(`[&_svg]:size-4`,b),"aria-hidden":!0,children:e}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t})]})}export{k as _,ne as a,I as c,V as d,R as f,P as g,N as h,re as i,H as l,M as m,ae as n,te as o,L as p,ie as r,Y as s,oe as t,B as u};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{H as r,R as i,U as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as s,z as c}from"./utils-DsWhWn2F.js";import{t as l}from"./modal-backdrop-X-vKo61e.js";import{r as u,t as d}from"./modal-body-C3bGicn4.js";import{t as f}from"./brand-button-BUlDL-mz.js";import{t as p}from"./modal-close-button-vxkAIRyZ.js";import{t as m}from"./settings-input-BEaTCem1.js";import{n as h}from"./use-create-conversation-CakhLF0X.js";import{r as g}from"./typography-B1UxuuEC.js";import{n as _,t as v}from"./vendor~launch-ChXCOGw8.js";var y=e(t(),1),b=n();function x({pluginIndex:e,paramKey:t,paramValue:n,onParameterChange:r}){let i=`plugin-${e}-param-${t}`;return typeof n==`boolean`?(0,b.jsxs)(`label`,{htmlFor:i,className:`flex w-full cursor-pointer items-center gap-2.5`,children:[(0,b.jsx)(`input`,{id:i,"data-testid":i,type:`checkbox`,checked:n,onChange:n=>r(e,t,n.target.checked),className:`h-4 w-4 shrink-0 rounded`}),(0,b.jsx)(`span`,{className:`text-sm`,children:t})]}):typeof n==`number`?(0,b.jsx)(m,{testId:i,name:`plugin-${e}-param-${t}`,type:`number`,label:t,value:String(n),className:`w-full`,onChange:n=>r(e,t,n===``?0:parseFloat(n)||0)}):(0,b.jsx)(m,{testId:i,name:`plugin-${e}-param-${t}`,type:`text`,label:t,value:String(n??``),className:`w-full`,onChange:n=>r(e,t,n)})}function S({plugin:e,originalIndex:t,isExpanded:n,onToggle:r,getPluginDisplayName:i,onParameterChange:a}){let{t:s}=o(`openhands`);return e.parameters&&Object.keys(e.parameters).length>0?(0,b.jsxs)(`div`,{className:`rounded-lg border border-[var(--oh-border)] bg-tertiary`,children:[(0,b.jsxs)(`button`,{type:`button`,onClick:r,className:`flex w-full items-center justify-between px-4 py-3 text-left hover:bg-base-tertiary rounded-t-lg cursor-pointer`,"data-testid":`plugin-section-${t}`,children:[(0,b.jsx)(g.Text,{className:`text-base font-normal`,children:i(e)}),n?(0,b.jsx)(v,{className:`h-5 w-5 text-white`}):(0,b.jsx)(_,{className:`h-5 w-5 text-white`})]}),n&&(0,b.jsxs)(`div`,{className:`border-t border-[var(--oh-border-subtle)] px-4 pb-3`,children:[e.ref&&(0,b.jsxs)(`div`,{className:`mb-2 text-sm text-white`,children:[s(c.LAUNCH$PLUGIN_REF),` `,e.ref]}),e.repo_path&&(0,b.jsxs)(`div`,{className:`mb-2 text-sm text-white`,children:[s(c.LAUNCH$PLUGIN_PATH),` `,e.repo_path]}),(0,b.jsx)(`div`,{className:`flex flex-col gap-4`,children:Object.entries(e.parameters||{}).map(([e,n])=>(0,b.jsx)(x,{pluginIndex:t,paramKey:e,paramValue:n,onParameterChange:a},e))})]})]}):null}function C({plugins:e,message:t,isLoading:n=!1,onStartConversation:r,onClose:i}){let{t:a}=o(`openhands`),[m,h]=y.useState(e),[_,v]=y.useState(()=>{let t={};return e.forEach((e,n)=>{e.parameters&&Object.keys(e.parameters).length>0&&(t[n]=!0)}),t}),[x,C]=y.useState(!1),w=m.filter(e=>e.parameters&&Object.keys(e.parameters).length>0),T=m.filter(e=>!e.parameters||Object.keys(e.parameters).length===0),E=e=>{v(t=>({...t,[e]:!t[e]}))},D=(e,t,n)=>{h(r=>{let i=[...r],a={...i[e]};return a.parameters={...a.parameters,[t]:n},i[e]=a,i})},O=e=>{let{source:t,repo_path:n}=e;if(n){let e=n.split(`/`);return e[e.length-1]}if(t.startsWith(`github:`))return t.replace(`github:`,``);if(t.includes(`/`)){let e=t.split(`/`);return e[e.length-1].replace(`.git`,``)}return t},k=e=>{let{source:t}=e;return t.startsWith(`github:`)?t.replace(`github:`,``):t.includes(`github.com/`)&&t.split(`github.com/`)[1]?.replace(`.git`,``)||t},A=()=>{let e=m.map(e=>k(e));return[...new Set(e)]},j=()=>{r(m,t)},M=m.length===1?O(m[0]):a(c.LAUNCH$MODAL_TITLE_GENERIC);return(0,b.jsx)(l,{onClose:i,children:(0,b.jsxs)(`div`,{"data-testid":`plugin-launch-modal`,className:s(`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] max-h-[80vh]`,u(`md`),d),children:[(0,b.jsx)(p,{onClose:i,testId:`close-button`}),(0,b.jsxs)(g.H2,{className:`pr-6`,children:[a(c.LAUNCH$MODAL_TITLE),` `,M]}),t&&(0,b.jsx)(`p`,{className:`text-sm text-white`,children:t}),(0,b.jsxs)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:[w.length>0&&(0,b.jsx)(`div`,{className:`space-y-3`,children:m.map((e,t)=>(0,b.jsx)(S,{plugin:e,originalIndex:t,isExpanded:!!_[t],onToggle:()=>E(t),getPluginDisplayName:O,onParameterChange:D},`plugin-${t}`))}),T.length>0&&(0,b.jsxs)(`div`,{className:s(w.length>0&&`mt-4`),children:[(0,b.jsx)(g.H3,{className:`mb-2 text-white`,children:w.length>0?a(c.LAUNCH$ADDITIONAL_PLUGINS):a(c.LAUNCH$PLUGINS)}),(0,b.jsx)(`div`,{className:`space-y-2`,children:T.map((e,t)=>(0,b.jsxs)(`div`,{className:`rounded-md bg-tertiary px-3 py-2 text-sm`,children:[(0,b.jsx)(`div`,{className:`font-medium`,children:O(e)}),(0,b.jsxs)(`div`,{className:`text-xs text-white mt-1`,children:[k(e),e.repo_path&&(0,b.jsxs)(`span`,{className:`ml-1`,children:[`/ `,e.repo_path]}),e.ref&&(0,b.jsxs)(`span`,{className:`ml-2`,children:[`@ `,e.ref]})]})]},`simple-plugin-${t}`))})]})]}),(0,b.jsxs)(`div`,{className:`pt-4 border-t border-[var(--oh-border-subtle)]`,children:[(0,b.jsxs)(`div`,{className:`flex items-start gap-3 mb-4`,children:[(0,b.jsx)(`input`,{id:`trust-checkbox`,"data-testid":`trust-checkbox`,type:`checkbox`,checked:x,onChange:e=>C(e.target.checked),className:`mt-1 h-4 w-4 flex-shrink-0`}),(0,b.jsx)(`label`,{htmlFor:`trust-checkbox`,className:`text-sm text-white`,children:a(c.LAUNCH$TRUST_SKILL_CHECKBOX,{sources:A().join(`, `),interpolation:{escapeValue:!1}})})]}),(0,b.jsx)(`div`,{className:`flex w-full justify-end mt-8`,children:(0,b.jsx)(f,{testId:`start-conversation-button`,type:`button`,variant:`primary`,onClick:j,isDisabled:n||!x,className:`px-4`,children:a(n?c.LAUNCH$STARTING:c.LAUNCH$START_CONVERSATION)})})]})]})})}function w(e){if(e)return e.replace(/<[^>]*>/g,``).slice(0,500)||void 0}function T(e){let t=e.get(`plugins`);if(t)try{let n=atob(t),r=JSON.parse(n);if(!Array.isArray(r))return{plugins:[],error:`invalid_format`};let i=[];for(let e of r){if(typeof e!=`object`||!e||typeof e.source!=`string`)return{plugins:[],error:`invalid_format`};i.push({source:e.source,ref:e.ref??null,repo_path:e.repo_path??null,parameters:e.parameters??null})}return i.length===0?{plugins:[],error:`no_plugins`}:{plugins:i,message:w(e.get(`message`))}}catch{return{plugins:[],error:`invalid_format`}}let n=e.get(`plugin_source`);return n?{plugins:[{source:n,ref:e.get(`plugin_ref`)??null,repo_path:e.get(`plugin_repo_path`)??null,parameters:null}],message:w(e.get(`message`))}:{plugins:[],error:`no_plugins`}}function E({errorType:e,onGoHome:t,onTryAgain:n}){let{t:r}=o(`openhands`),i={no_plugins:r(c.LAUNCH$ERROR_NO_PLUGINS),invalid_format:r(c.LAUNCH$ERROR_INVALID_FORMAT),creation_failed:r(c.LAUNCH$ERROR_CREATION_FAILED)};return(0,b.jsx)(`div`,{className:`flex h-full items-center justify-center`,"data-testid":`launch-error`,children:(0,b.jsxs)(`div`,{className:`max-w-md rounded-lg bg-[var(--oh-surface)] p-6 text-center`,children:[(0,b.jsx)(`h2`,{className:`mb-4 text-xl font-medium text-red-400`,children:r(c.LAUNCH$ERROR_TITLE)}),(0,b.jsx)(`p`,{className:`mb-6 text-[var(--oh-text-tertiary)]`,children:i[e]}),(0,b.jsxs)(`div`,{className:`flex justify-center gap-3`,children:[(0,b.jsx)(`button`,{type:`button`,onClick:t,className:`rounded-md bg-tertiary px-4 py-2 text-sm text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`go-home-button`,children:r(c.LAUNCH$GO_HOME)}),n&&(0,b.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-md bg-blue-600 px-4 py-2 text-sm text-white hover:bg-blue-700`,"data-testid":`try-again-button`,children:r(c.LAUNCH$TRY_AGAIN)})]})]})})}var D=a(function(){let[e]=r(),t=i(),{t:n}=o(`openhands`),a=h(),[s,l]=y.useState(null),u=y.useMemo(()=>T(e),[e]),d=async(e,r)=>{l(null);try{t(`/conversations/${(await a.mutateAsync({plugins:e,query:r,entryPoint:`launch_deeplink`})).conversation_id}`)}catch{l(n(c.LAUNCH$ERROR_CREATION_UNKNOWN))}},f=()=>{t(`/conversations`)};return u.error?(0,b.jsx)(E,{errorType:u.error,onGoHome:f}):s?(0,b.jsx)(E,{errorType:`creation_failed`,onGoHome:f,onTryAgain:()=>{l(null),window.location.reload()}}):(0,b.jsx)(`div`,{className:`h-full`,"data-testid":`launch-route`,children:(0,b.jsx)(C,{plugins:u.plugins,message:u.message,isLoading:a.isPending,onStartConversation:d,onClose:f})})});export{D as default};
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{H as r,R as i,U as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{t as s,z as c}from"./utils-BX9XJ0IE.js";import{t as l}from"./modal-backdrop-BSzNhM4r.js";import{r as u,t as d}from"./modal-body-BHGCSAtj.js";import{t as f}from"./brand-button-DJmFCyMK.js";import{t as p}from"./modal-close-button-dheWZ2ys.js";import{t as m}from"./settings-input-BQY115xH.js";import{n as h}from"./use-create-conversation-FaP0kUpg.js";import{r as g}from"./typography-BSbUhJPn.js";import{n as _,t as v}from"./vendor~launch-CHwEQG6e.js";var y=e(t(),1),b=n();function x({pluginIndex:e,paramKey:t,paramValue:n,onParameterChange:r}){let i=`plugin-${e}-param-${t}`;return typeof n==`boolean`?(0,b.jsxs)(`label`,{htmlFor:i,className:`flex w-full cursor-pointer items-center gap-2.5`,children:[(0,b.jsx)(`input`,{id:i,"data-testid":i,type:`checkbox`,checked:n,onChange:n=>r(e,t,n.target.checked),className:`h-4 w-4 shrink-0 rounded`}),(0,b.jsx)(`span`,{className:`text-sm`,children:t})]}):typeof n==`number`?(0,b.jsx)(m,{testId:i,name:`plugin-${e}-param-${t}`,type:`number`,label:t,value:String(n),className:`w-full`,onChange:n=>r(e,t,n===``?0:parseFloat(n)||0)}):(0,b.jsx)(m,{testId:i,name:`plugin-${e}-param-${t}`,type:`text`,label:t,value:String(n??``),className:`w-full`,onChange:n=>r(e,t,n)})}function S({plugin:e,originalIndex:t,isExpanded:n,onToggle:r,getPluginDisplayName:i,onParameterChange:a}){let{t:s}=o(`openhands`);return e.parameters&&Object.keys(e.parameters).length>0?(0,b.jsxs)(`div`,{className:`rounded-lg border border-[var(--oh-border)] bg-tertiary`,children:[(0,b.jsxs)(`button`,{type:`button`,onClick:r,className:`flex w-full items-center justify-between px-4 py-3 text-left hover:bg-base-tertiary rounded-t-lg cursor-pointer`,"data-testid":`plugin-section-${t}`,children:[(0,b.jsx)(g.Text,{className:`text-base font-normal`,children:i(e)}),n?(0,b.jsx)(v,{className:`h-5 w-5 text-white`}):(0,b.jsx)(_,{className:`h-5 w-5 text-white`})]}),n&&(0,b.jsxs)(`div`,{className:`border-t border-[var(--oh-border-subtle)] px-4 pb-3`,children:[e.ref&&(0,b.jsxs)(`div`,{className:`mb-2 text-sm text-white`,children:[s(c.LAUNCH$PLUGIN_REF),` `,e.ref]}),e.repo_path&&(0,b.jsxs)(`div`,{className:`mb-2 text-sm text-white`,children:[s(c.LAUNCH$PLUGIN_PATH),` `,e.repo_path]}),(0,b.jsx)(`div`,{className:`flex flex-col gap-4`,children:Object.entries(e.parameters||{}).map(([e,n])=>(0,b.jsx)(x,{pluginIndex:t,paramKey:e,paramValue:n,onParameterChange:a},e))})]})]}):null}function C({plugins:e,message:t,isLoading:n=!1,onStartConversation:r,onClose:i}){let{t:a}=o(`openhands`),[m,h]=y.useState(e),[_,v]=y.useState(()=>{let t={};return e.forEach((e,n)=>{e.parameters&&Object.keys(e.parameters).length>0&&(t[n]=!0)}),t}),[x,C]=y.useState(!1),w=m.filter(e=>e.parameters&&Object.keys(e.parameters).length>0),T=m.filter(e=>!e.parameters||Object.keys(e.parameters).length===0),E=e=>{v(t=>({...t,[e]:!t[e]}))},D=(e,t,n)=>{h(r=>{let i=[...r],a={...i[e]};return a.parameters={...a.parameters,[t]:n},i[e]=a,i})},O=e=>{let{source:t,repo_path:n}=e;if(n){let e=n.split(`/`);return e[e.length-1]}if(t.startsWith(`github:`))return t.replace(`github:`,``);if(t.includes(`/`)){let e=t.split(`/`);return e[e.length-1].replace(`.git`,``)}return t},k=e=>{let{source:t}=e;return t.startsWith(`github:`)?t.replace(`github:`,``):t.includes(`github.com/`)&&t.split(`github.com/`)[1]?.replace(`.git`,``)||t},A=()=>{let e=m.map(e=>k(e));return[...new Set(e)]},j=()=>{r(m,t)},M=m.length===1?O(m[0]):a(c.LAUNCH$MODAL_TITLE_GENERIC);return(0,b.jsx)(l,{onClose:i,children:(0,b.jsxs)(`div`,{"data-testid":`plugin-launch-modal`,className:s(`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] max-h-[80vh]`,u(`md`),d),children:[(0,b.jsx)(p,{onClose:i,testId:`close-button`}),(0,b.jsxs)(g.H2,{className:`pr-6`,children:[a(c.LAUNCH$MODAL_TITLE),` `,M]}),t&&(0,b.jsx)(`p`,{className:`text-sm text-white`,children:t}),(0,b.jsxs)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:[w.length>0&&(0,b.jsx)(`div`,{className:`space-y-3`,children:m.map((e,t)=>(0,b.jsx)(S,{plugin:e,originalIndex:t,isExpanded:!!_[t],onToggle:()=>E(t),getPluginDisplayName:O,onParameterChange:D},`plugin-${t}`))}),T.length>0&&(0,b.jsxs)(`div`,{className:s(w.length>0&&`mt-4`),children:[(0,b.jsx)(g.H3,{className:`mb-2 text-white`,children:w.length>0?a(c.LAUNCH$ADDITIONAL_PLUGINS):a(c.LAUNCH$PLUGINS)}),(0,b.jsx)(`div`,{className:`space-y-2`,children:T.map((e,t)=>(0,b.jsxs)(`div`,{className:`rounded-md bg-tertiary px-3 py-2 text-sm`,children:[(0,b.jsx)(`div`,{className:`font-medium`,children:O(e)}),(0,b.jsxs)(`div`,{className:`text-xs text-white mt-1`,children:[k(e),e.repo_path&&(0,b.jsxs)(`span`,{className:`ml-1`,children:[`/ `,e.repo_path]}),e.ref&&(0,b.jsxs)(`span`,{className:`ml-2`,children:[`@ `,e.ref]})]})]},`simple-plugin-${t}`))})]})]}),(0,b.jsxs)(`div`,{className:`pt-4 border-t border-[var(--oh-border-subtle)]`,children:[(0,b.jsxs)(`div`,{className:`flex items-start gap-3 mb-4`,children:[(0,b.jsx)(`input`,{id:`trust-checkbox`,"data-testid":`trust-checkbox`,type:`checkbox`,checked:x,onChange:e=>C(e.target.checked),className:`mt-1 h-4 w-4 flex-shrink-0`}),(0,b.jsx)(`label`,{htmlFor:`trust-checkbox`,className:`text-sm text-white`,children:a(c.LAUNCH$TRUST_SKILL_CHECKBOX,{sources:A().join(`, `),interpolation:{escapeValue:!1}})})]}),(0,b.jsx)(`div`,{className:`flex w-full justify-end mt-8`,children:(0,b.jsx)(f,{testId:`start-conversation-button`,type:`button`,variant:`primary`,onClick:j,isDisabled:n||!x,className:`px-4`,children:a(n?c.LAUNCH$STARTING:c.LAUNCH$START_CONVERSATION)})})]})]})})}function w(e){if(e)return e.replace(/<[^>]*>/g,``).slice(0,500)||void 0}function T(e){let t=e.get(`plugins`);if(t)try{let n=atob(t),r=JSON.parse(n);if(!Array.isArray(r))return{plugins:[],error:`invalid_format`};let i=[];for(let e of r){if(typeof e!=`object`||!e||typeof e.source!=`string`)return{plugins:[],error:`invalid_format`};i.push({source:e.source,ref:e.ref??null,repo_path:e.repo_path??null,parameters:e.parameters??null})}return i.length===0?{plugins:[],error:`no_plugins`}:{plugins:i,message:w(e.get(`message`))}}catch{return{plugins:[],error:`invalid_format`}}let n=e.get(`plugin_source`);return n?{plugins:[{source:n,ref:e.get(`plugin_ref`)??null,repo_path:e.get(`plugin_repo_path`)??null,parameters:null}],message:w(e.get(`message`))}:{plugins:[],error:`no_plugins`}}function E({errorType:e,onGoHome:t,onTryAgain:n}){let{t:r}=o(`openhands`),i={no_plugins:r(c.LAUNCH$ERROR_NO_PLUGINS),invalid_format:r(c.LAUNCH$ERROR_INVALID_FORMAT),creation_failed:r(c.LAUNCH$ERROR_CREATION_FAILED)};return(0,b.jsx)(`div`,{className:`flex h-full items-center justify-center`,"data-testid":`launch-error`,children:(0,b.jsxs)(`div`,{className:`max-w-md rounded-lg bg-[var(--oh-surface)] p-6 text-center`,children:[(0,b.jsx)(`h2`,{className:`mb-4 text-xl font-medium text-red-400`,children:r(c.LAUNCH$ERROR_TITLE)}),(0,b.jsx)(`p`,{className:`mb-6 text-[var(--oh-text-tertiary)]`,children:i[e]}),(0,b.jsxs)(`div`,{className:`flex justify-center gap-3`,children:[(0,b.jsx)(`button`,{type:`button`,onClick:t,className:`rounded-md bg-tertiary px-4 py-2 text-sm text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`go-home-button`,children:r(c.LAUNCH$GO_HOME)}),n&&(0,b.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-md bg-blue-600 px-4 py-2 text-sm text-white hover:bg-blue-700`,"data-testid":`try-again-button`,children:r(c.LAUNCH$TRY_AGAIN)})]})]})})}var D=a(function(){let[e]=r(),t=i(),{t:n}=o(`openhands`),a=h(),[s,l]=y.useState(null),u=y.useMemo(()=>T(e),[e]),d=async(e,r)=>{l(null);try{t(`/conversations/${(await a.mutateAsync({plugins:e,query:r,entryPoint:`launch_deeplink`})).conversation_id}`)}catch{l(n(c.LAUNCH$ERROR_CREATION_UNKNOWN))}},f=()=>{t(`/conversations`)};return u.error?(0,b.jsx)(E,{errorType:u.error,onGoHome:f}):s?(0,b.jsx)(E,{errorType:`creation_failed`,onGoHome:f,onTryAgain:()=>{l(null),window.location.reload()}}):(0,b.jsx)(`div`,{className:`h-full`,"data-testid":`launch-route`,children:(0,b.jsx)(C,{plugins:u.plugins,message:u.message,isLoading:a.isPending,onStartConversation:d,onClose:f})})});export{D as default};
@@ -1 +1 @@
1
- import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Bcgpimp9.js";e();var n=t(),r=e=>(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,n.jsx)(`path`,{d:`M7.062 8.367L3.0915 12.336L7.062 16.305L6 17.367L1.5 12.867V11.805L6 7.305L7.062 8.367ZM17.562 7.305L16.5 8.367L20.4705 12.336L16.5 16.305L17.562 17.367L22.062 12.867V11.805L17.562 7.305ZM7.362 19.5L8.703 20.172L16.203 5.172L14.862 4.5L7.362 19.5Z`,fill:`currentColor`})}),i=e=>(0,n.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,n.jsx)(`path`,{d:`M2.25 1.5H9V3H3V21H21V15H22.5V21.75L21.75 22.5H2.25L1.5 21.75V2.25L2.25 1.5Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M22.5 2.25V12H21V4.0605L10.8645 14.1975L9.80402 13.1355L19.9395 3H12V1.5H21.75L22.5 2.25Z`,fill:`currentColor`})]});export{r as n,i as t};
1
+ import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";e();var n=t(),r=e=>(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,n.jsx)(`path`,{d:`M7.062 8.367L3.0915 12.336L7.062 16.305L6 17.367L1.5 12.867V11.805L6 7.305L7.062 8.367ZM17.562 7.305L16.5 8.367L20.4705 12.336L16.5 16.305L17.562 17.367L22.062 12.867V11.805L17.562 7.305ZM7.362 19.5L8.703 20.172L16.203 5.172L14.862 4.5L7.362 19.5Z`,fill:`currentColor`})}),i=e=>(0,n.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,n.jsx)(`path`,{d:`M2.25 1.5H9V3H3V21H21V15H22.5V21.75L21.75 22.5H2.25L1.5 21.75V2.25L2.25 1.5Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M22.5 2.25V12H21V4.0605L10.8645 14.1975L9.80402 13.1355L19.9395 3H12V1.5H21.75L22.5 2.25Z`,fill:`currentColor`})]});export{r as n,i as t};
@@ -0,0 +1 @@
1
+ import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";var t=e(`list-filter`,[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]);export{t};
@@ -1 +1 @@
1
- import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";var t=e(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]);export{t};
1
+ import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";var t=e(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]);export{t};