@openhands/agent-canvas 1.1.0 → 1.2.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 (1373) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/Trans-De9RwQhA.js +1 -0
  4. package/build/assets/__vite-browser-external-4xJsU2-u.js +1 -0
  5. package/build/assets/{acp-providers-B_ZxlEbx.js → acp-providers-D_D8VUpP.js} +1 -1
  6. package/build/assets/active-backend-context-DRFevVIj.js +1 -0
  7. package/build/assets/add-backend-modal-DzuB9zlG.js +1 -0
  8. package/build/assets/agent-profiles-settings-BfAwTshW.js +1 -0
  9. package/build/assets/{agent-server-client-options-CxnCYyIW.js → agent-server-client-options-DVLRd9sw.js} +1 -1
  10. package/build/assets/agent-server-conversation-service.api-DfH2k6Sx.js +5 -0
  11. package/build/assets/agent-settings-CMMms-0q.js +1 -0
  12. package/build/assets/agent-settings-DjVlKgaP.js +2 -0
  13. package/build/assets/alert-banner-BW0wRYw6.js +1 -0
  14. package/build/assets/api-key-entry-screen-O8gS-fnF.js +1 -0
  15. package/build/assets/app-settings-SlZvaXlk.js +1 -0
  16. package/build/assets/automation-detail-CwsNJ9AM.js +2 -0
  17. package/build/assets/automations-list-B9cPtugh.js +1 -0
  18. package/build/assets/back-nav-button-BYmxFxGt.js +1 -0
  19. package/build/assets/backend-form-modal-D2EDGVAc.js +1 -0
  20. package/build/assets/backend-synced-settings-badge-6OCwIuLY.js +1 -0
  21. package/build/assets/base-modal-CC5Pp8CF.js +1 -0
  22. package/build/assets/bot-D7eUAuSB.js +1 -0
  23. package/build/assets/brand-button-DKPMEKcW.js +1 -0
  24. package/build/assets/{browser-CCwPzPsD.js → browser-B39N74jU.js} +2 -2
  25. package/build/assets/browser-store-BI6uklCG.js +1 -0
  26. package/build/assets/browser-tab-aiDg7aEn.js +1 -0
  27. package/build/assets/chat-send-button-DxuZIoW8.js +1 -0
  28. package/build/assets/check-Bvi71siz.js +1 -0
  29. package/build/assets/checkmark-h7udgXMM.js +1 -0
  30. package/build/assets/{chevron-down-BxZEAIv4.js → chevron-down-CI8A6tet.js} +1 -1
  31. package/build/assets/circle-plus-check-toggle-T3eAIuPQ.js +1 -0
  32. package/build/assets/close-p3Op5lxI.js +1 -0
  33. package/build/assets/code-tag-DYlAhEQY.js +1 -0
  34. package/build/assets/{color-themes-CTNRQd1a.js → color-themes-Dd1sO5U6.js} +1 -1
  35. package/build/assets/combobox-caret-CLGvOs32.js +1 -0
  36. package/build/assets/command-menu-DKrLCRla.js +1 -0
  37. package/build/assets/{command-store-C-57Heey.js → command-store-D8J5LMW1.js} +1 -1
  38. package/build/assets/condenser-settings-BhxvlfoY.js +1 -0
  39. package/build/assets/confirmation-modal-BK1F0A68.js +1 -0
  40. package/build/assets/context-menu-list-item-DBFzplWW.js +1 -0
  41. package/build/assets/conversation-B8prFAZF.js +19 -0
  42. package/build/assets/conversation-DGVDwGn8.js +1 -0
  43. package/build/assets/conversation-local-storage-F6zVMM--.js +1 -0
  44. package/build/assets/conversation-panel-C7DC4Cxx.js +1 -0
  45. package/build/assets/conversation-service.api-Ch9kR9aE.js +1 -0
  46. package/build/assets/conversation-state-store-B2Bp32XI.js +1 -0
  47. package/build/assets/conversation-store-LptbOvKa.js +1 -0
  48. package/build/assets/conversation-tab-empty-state-m8IUkfMj.js +1 -0
  49. package/build/assets/copy-3JCw_XFB.js +1 -0
  50. package/build/assets/copy-BLmGeJcd.js +1 -0
  51. package/build/assets/copy-to-clipboard-button-Aj9wFmt2.js +1 -0
  52. package/build/assets/createLucideIcon-CVAsW2Yo.js +1 -0
  53. package/build/assets/declaration-B9kpCaYl.js +1 -0
  54. package/build/assets/device-verify-B5YCrvSu.js +1 -0
  55. package/build/assets/dist-CodhvuAP.js +1 -0
  56. package/build/assets/dropdown-classes-CgQ45JmQ.js +1 -0
  57. package/build/assets/edit-automation-modal-BoibW8cd.js +1 -0
  58. package/build/assets/ellipsis-button-1BV9Sga8.js +1 -0
  59. package/build/assets/entry.client-BgWj9jL_.js +2 -0
  60. package/build/assets/enum-filter-dropdown-DCITiYVi.js +1 -0
  61. package/build/assets/environment-switch-overlay-DUnKILNH.js +1 -0
  62. package/build/assets/extensions-hub-MtC8lK3A.js +1 -0
  63. package/build/assets/{extensions-navigation-DfLHdTUC.js → extensions-navigation-BtV14oQL.js} +1 -1
  64. package/build/assets/{external-link-D8njjDTk.js → external-link-D2zJjE9G.js} +1 -1
  65. package/build/assets/files-tab-DHqtsKLy.js +1 -0
  66. package/build/assets/files-tab-store-DJsPxYdg.js +1 -0
  67. package/build/assets/folder-mMWFvaw0.js +1 -0
  68. package/build/assets/form-control-classes-9rkU4usZ.js +1 -0
  69. package/build/assets/get-language-from-path-CPNnuVhI.js +1 -0
  70. package/build/assets/git-provider-icon-CGU7_KiU.js +1 -0
  71. package/build/assets/home-BgjWP_UN.js +1 -0
  72. package/build/assets/iconBase-DaTRRUjy.js +1 -0
  73. package/build/assets/index-redirect-CUUJiNki.js +1 -0
  74. package/build/assets/install-server-modal-J_eQ6lhG.js +1 -0
  75. package/build/assets/launch-DamfAY5L.js +1 -0
  76. package/build/assets/lesson-plan-HD886V64.js +4 -0
  77. package/build/assets/link-external-DfKQroKX.js +1 -0
  78. package/build/assets/{list-todo-B_Ts2JmZ.js → list-todo-BfH6yYUK.js} +1 -1
  79. package/build/assets/llm-not-configured-banner-DTrLsVr_.js +27 -0
  80. package/build/assets/llm-settings-BgSFkbHC.js +1 -0
  81. package/build/assets/llm-settings-Bkc8C5Bi.js +1 -0
  82. package/build/assets/{llm-subscription-service-BX_AtNlO.js → llm-subscription-service-CKyaV24y.js} +1 -1
  83. package/build/assets/loader-circle-BEykUKYG.js +1 -0
  84. package/build/assets/loading-spinner-DHAIPZkP.js +1 -0
  85. package/build/assets/manage-backends-modal-BUzj5_Lq.js +1 -0
  86. package/build/assets/manifest-4d6a1552.js +1 -0
  87. package/build/assets/{markdown-renderer-DWy7Np7u.js → markdown-renderer-D8mayGjI.js} +1 -1
  88. package/build/assets/mcp-DvqJYDbz.js +9 -0
  89. package/build/assets/messages-C4KEFkPk.js +40 -0
  90. package/build/assets/middleware-DYHYNAnP.js +6 -0
  91. package/build/assets/modal-backdrop-zVwfOJZr.js +1 -0
  92. package/build/assets/modal-body-Dcu5McCa.js +1 -0
  93. package/build/assets/{modal-classes-C4kS6ib_.js → modal-classes-DPqxSyuP.js} +1 -1
  94. package/build/assets/modal-close-button-CTCX4nCH.js +1 -0
  95. package/build/assets/model-selector-VDHBytb6.js +1 -0
  96. package/build/assets/{mouse-pointer-click-CXAx4FyM.js → mouse-pointer-click-PdEQPL6v.js} +1 -1
  97. package/build/assets/navigation-context-DPs2G0X8.js +1 -0
  98. package/build/assets/navigation-link-D8hfwvxI.js +1 -0
  99. package/build/assets/onboarding-gGIqoxvA.js +1 -0
  100. package/build/assets/onboarding-modal-CGHPoMp7.js +1 -0
  101. package/build/assets/openhands-logo-bcNw5bkY.js +1 -0
  102. package/build/assets/option-service.api-Dz7Eomnx.js +1 -0
  103. package/build/assets/organization-service.api-CnynNoT-.js +1 -0
  104. package/build/assets/path-utils-CBaRYg35.js +1 -0
  105. package/build/assets/{pencil-CsL0ns9y.js → pencil-Dj2XjKmI.js} +1 -1
  106. package/build/assets/plan-components-j9X4AxYM.js +1 -0
  107. package/build/assets/planner-tab-G4j36bJk.js +1 -0
  108. package/build/assets/plugins-management-service-BAp70KN7.js +1 -0
  109. package/build/assets/profiles-service.api-CeYEmSM3.js +1 -0
  110. package/build/assets/providers-CPoq0VXm.js +1 -0
  111. package/build/assets/{proxy-TeteRRW5.js → proxy-CHmFkV16.js} +1 -1
  112. package/build/assets/react-DPDgL6du.js +1 -0
  113. package/build/assets/recommended-automations-launcher-CXaEK1rW.js +50 -0
  114. package/build/assets/{refresh-cw-GkGYXsU-.js → refresh-cw-DM82EIyx.js} +1 -1
  115. package/build/assets/root-CxWZUXTQ.css +1 -0
  116. package/build/assets/root-S6CfVoNm.js +2 -0
  117. package/build/assets/root-layout-CvxdHJ6j.js +2 -0
  118. package/build/assets/runtime-waiting-state-DkzLgvMn.js +1 -0
  119. package/build/assets/schema-field-DwUzlw6b.js +1 -0
  120. package/build/assets/sdk-section-page-BUXONTx6.js +1 -0
  121. package/build/assets/sdk-settings-schema-BjBkMHzZ.js +1 -0
  122. package/build/assets/search-4DHskuhE.js +1 -0
  123. package/build/assets/search-BsjCEFNf.js +1 -0
  124. package/build/assets/secrets-service-CZYjNxFw.js +1 -0
  125. package/build/assets/secrets-settings-ZxyfRBgx.js +1 -0
  126. package/build/assets/segmented-toggle-Cen5AMUc.js +1 -0
  127. package/build/assets/settings-Bx6vn-g8.js +1 -0
  128. package/build/assets/settings-dropdown-input-xzoZwgUe.js +1 -0
  129. package/build/assets/settings-gear-MXCyZW0x.js +1 -0
  130. package/build/assets/settings-index-D4SM26d5.js +1 -0
  131. package/build/assets/settings-input-DYs7t3oK.js +1 -0
  132. package/build/assets/settings-list-classes-DvQr5jVS.js +1 -0
  133. package/build/assets/{settings-CN_HaPjH.js → settings-mQUckT0g.js} +1 -1
  134. package/build/assets/settings-modal-BoC8oMlg.js +1 -0
  135. package/build/assets/settings-section-header-context-COMOIaxV.js +1 -0
  136. package/build/assets/settings-service.api-DldkFI1x.js +1 -0
  137. package/build/assets/settings-switch-C2N2xqEb.js +1 -0
  138. package/build/assets/{settings-utils-9-_6iVIn.js → settings-utils-BMdG65By.js} +1 -1
  139. package/build/assets/shared-conversation-DMiaQFsj.js +1 -0
  140. package/build/assets/sidebar-layout-BtpUSN3j.js +1 -0
  141. package/build/assets/sidebar-mobile-menu-toggle-CaV3tQFF.js +1 -0
  142. package/build/assets/sidebar-nav-link-CIB3NBRW.js +1 -0
  143. package/build/assets/sidebar-store-CZuE8AH5.js +1 -0
  144. package/build/assets/skill-card-pill-row-D2bUe2kB.js +1 -0
  145. package/build/assets/skills-9cDZONKh.js +1 -0
  146. package/build/assets/skills-plugins-D2WkrXkr.js +1 -0
  147. package/build/assets/skills-settings-CZGVOp_t.js +2 -0
  148. package/build/assets/{square-chevron-right-Cfi-SUY0.js → square-chevron-right-Czw3FFWc.js} +1 -1
  149. package/build/assets/styled-tooltip-DsKsFjuq.js +1 -0
  150. package/build/assets/suspense-X5dBsJzn.js +1 -0
  151. package/build/assets/switch-skeleton-DqQwalyu.js +1 -0
  152. package/build/assets/task-list-tab-BAThr9Ex.js +1 -0
  153. package/build/assets/{terminal-HakoMrQX.js → terminal-B0aL_iDZ.js} +2 -2
  154. package/build/assets/terminal-BuLtIrb9.js +1 -0
  155. package/build/assets/toggle-switch-DBlOOzBr.js +1 -0
  156. package/build/assets/{trash-2-Bq4hqiRH.js → trash-2-Be_7y3Mn.js} +1 -1
  157. package/build/assets/typography-YGPBGzOG.js +1 -0
  158. package/build/assets/u-check-circle-BqoIxNz_.js +1 -0
  159. package/build/assets/u-check-circle-half-LiwZkuFe.js +1 -0
  160. package/build/assets/u-edit-DJ90xc8Z.js +1 -0
  161. package/build/assets/use-acp-credential-form-rzaqkJ1n.js +1 -0
  162. package/build/assets/use-activate-agent-profile-DY0txItX.js +1 -0
  163. package/build/assets/use-active-agent-profile-Cp5AFONR.js +1 -0
  164. package/build/assets/use-active-conversation-DvcFBqFe.js +1 -0
  165. package/build/assets/use-agent-profiles-DnH16_Vm.js +1 -0
  166. package/build/assets/use-agent-state-BvRcEzY4.js +1 -0
  167. package/build/assets/use-backends-health-e-Ull4wz.js +1 -0
  168. package/build/assets/use-breakpoint-B-O0lQ84.js +1 -0
  169. package/build/assets/use-can-manage-org-profiles-OIhplvQ0.js +1 -0
  170. package/build/assets/use-click-outside-element-Bf4Omzot.js +1 -0
  171. package/build/assets/use-cloud-current-user-id-ekU7UXDT.js +1 -0
  172. package/build/assets/use-config-Dwf5gla-.js +1 -0
  173. package/build/assets/use-create-conversation-CvAXfA3T.js +1 -0
  174. package/build/assets/use-create-secret-BKeXCo__.js +1 -0
  175. package/build/assets/use-event-store-YSOxy9FC.js +4 -0
  176. package/build/assets/use-handle-plan-click-cAXS-Hft.js +1 -0
  177. package/build/assets/use-is-authed-_dhQ2Xuj.js +1 -0
  178. package/build/assets/use-launch-skill-in-chat-BnoDgvAy.js +1 -0
  179. package/build/assets/use-llm-profiles-BcLibtGb.js +1 -0
  180. package/build/assets/use-onboarding-completion-C_Swglzp.js +1 -0
  181. package/build/assets/use-plugins-marketplace-BGb-KgfD.js +1 -0
  182. package/build/assets/use-runtime-is-ready-CBFe69Ew.js +1 -0
  183. package/build/assets/use-save-agent-profile-DFjxHhNx.js +1 -0
  184. package/build/assets/{use-save-settings-DErJDIDL.js → use-save-settings-5xPYpSQM.js} +1 -1
  185. package/build/assets/use-settings-B07msZ2Z.js +1 -0
  186. package/build/assets/use-settings-nav-items-CswsOEyw.js +16 -0
  187. package/build/assets/use-skills-Aoaoq_ei.js +1 -0
  188. package/build/assets/use-task-list-CmWGElgb.js +1 -0
  189. package/build/assets/use-tracking-CqODdfO4.js +1 -0
  190. package/build/assets/use-user-conversation-BPHQ-dm-.js +1 -0
  191. package/build/assets/useMutation-DCE9RcgK.js +1 -0
  192. package/build/assets/useMutationState-BUab8Kxr.js +1 -0
  193. package/build/assets/useQueries-CRzaAqzH.js +1 -0
  194. package/build/assets/useQuery-CpjHYtZc.js +1 -0
  195. package/build/assets/useTranslation-Cgy4JA_g.js +1 -0
  196. package/build/assets/utils-CE0lDWtb.js +1 -0
  197. package/build/assets/vendor-styling-CI0PQ3ab.js +22 -0
  198. package/build/assets/{vendor~browser-BQU4C3CQ.js → vendor~browser-Cvg7jXCP.js} +1 -1
  199. package/build/assets/{vendor~browser-tab-Cim6xN2k.js → vendor~browser-tab-Di0kh5Zw.js} +1 -1
  200. package/build/assets/vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js +1 -0
  201. package/build/assets/vendor~entry.client-9tWQ_Ugw.js +1 -0
  202. package/build/assets/{vendor~entry.client-lAMyAlBD.js → vendor~entry.client-D6BtSOtn.js} +1 -1
  203. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~d1e18dtv-5Q6lQJdE.js +177 -0
  204. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~i3v2mlbw-BrJQ3XZH.js +1 -0
  205. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~ncdxw0bh-ClHnt5lR.js +10 -0
  206. package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~t35o0b0f-Bss49YXv.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~k6tszsdc-Bb-xMtbv.js} +1 -1
  207. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~nn5zty47-Zl0G1QCy.js +1 -0
  208. package/build/assets/{vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~fpbtwbmk-DDSPtjxR.js → vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js} +1 -1
  209. package/build/assets/{vendor~files-tab-BvQLon-P.js → vendor~files-tab-B02k3xvx.js} +1 -1
  210. package/build/assets/{vendor~home~conversation-panel~conversation-DBPRU26Z.js → vendor~home~conversation-panel~conversation-CYMF9JYB.js} +1 -1
  211. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DnEBAp2W.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-9UMeuPV6.js} +1 -1
  212. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CzI-A-Gz.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD0GaRGa.js} +1 -1
  213. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-ByET2Quf.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CqXiHwjU.js} +1 -1
  214. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DCYBrned.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-D7EUmQ8Y.js} +1 -1
  215. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DnctfFZL.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DTzw2x50.js} +1 -1
  216. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-pSG7lnvH.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-d8aETPbZ.js} +1 -1
  217. package/build/assets/{vendor~launch-DqoOsAhA.js → vendor~launch-CHXA9cJu.js} +1 -1
  218. package/build/assets/vendor~root-layout~conversation-panel~conversation-CpiTHpHl.js +1 -0
  219. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-BJl81v7J.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-_TdZcNMD.js} +1 -1
  220. package/build/assets/vendor~root-layout~home~conversation-panel~conversation-Cn2jwSga.js +1 -0
  221. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~enjl5xdm-mMKDm94D.js +48 -0
  222. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~ki5qnp0d-DRld6s9c.js → vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~ki5qnp0d-DJHl5b-B.js} +236 -17
  223. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-9d2kA26V.js → vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CZM4hwUT.js} +1 -1
  224. package/build/assets/vendor~root-layout~home~mcp~automations-list~onboarding-modal-L2sdihTY.js +1 -0
  225. package/build/assets/verification-settings-DZQ-JvKH.js +1 -0
  226. package/build/assets/x-Cb0WAtak.js +1 -0
  227. package/build/assets/x-mark-Batp6gXa.js +1 -0
  228. package/build/index.html +4 -4
  229. package/build/locales/ar/openhands.json +138 -1
  230. package/build/locales/ca/openhands.json +138 -1
  231. package/build/locales/de/openhands.json +138 -1
  232. package/build/locales/en/openhands.json +138 -1
  233. package/build/locales/es/openhands.json +138 -1
  234. package/build/locales/fr/openhands.json +138 -1
  235. package/build/locales/it/openhands.json +138 -1
  236. package/build/locales/ja/openhands.json +138 -1
  237. package/build/locales/ko-KR/openhands.json +138 -1
  238. package/build/locales/no/openhands.json +138 -1
  239. package/build/locales/pt/openhands.json +138 -1
  240. package/build/locales/tr/openhands.json +138 -1
  241. package/build/locales/uk/openhands.json +138 -1
  242. package/build/locales/zh-CN/openhands.json +138 -1
  243. package/build/locales/zh-TW/openhands.json +138 -1
  244. package/config/defaults.json +7 -9
  245. package/dist/_virtual/__vite-browser-external.cjs +2 -0
  246. package/dist/_virtual/__vite-browser-external.cjs.map +1 -0
  247. package/dist/_virtual/__vite-browser-external.js +9 -0
  248. package/dist/_virtual/__vite-browser-external.js.map +1 -0
  249. package/dist/api/agent-profiles-service/agent-profiles-service.api.cjs +2 -0
  250. package/dist/api/agent-profiles-service/agent-profiles-service.api.cjs.map +1 -0
  251. package/dist/api/agent-profiles-service/agent-profiles-service.api.d.ts +22 -0
  252. package/dist/api/agent-profiles-service/agent-profiles-service.api.js +35 -0
  253. package/dist/api/agent-profiles-service/agent-profiles-service.api.js.map +1 -0
  254. package/dist/api/agent-server-adapter.cjs +2 -2
  255. package/dist/api/agent-server-adapter.cjs.map +1 -1
  256. package/dist/api/agent-server-adapter.d.ts +11 -1
  257. package/dist/api/agent-server-adapter.js +60 -60
  258. package/dist/api/agent-server-adapter.js.map +1 -1
  259. package/dist/api/agent-server-compatibility.cjs +1 -1
  260. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  261. package/dist/api/agent-server-compatibility.js +1 -0
  262. package/dist/api/agent-server-compatibility.js.map +1 -1
  263. package/dist/api/agent-server-home.cjs +1 -1
  264. package/dist/api/agent-server-home.cjs.map +1 -1
  265. package/dist/api/agent-server-home.js +1 -0
  266. package/dist/api/agent-server-home.js.map +1 -1
  267. package/dist/api/cloud/agent-profiles-service.api.cjs +2 -0
  268. package/dist/api/cloud/agent-profiles-service.api.cjs.map +1 -0
  269. package/dist/api/cloud/agent-profiles-service.api.d.ts +7 -0
  270. package/dist/api/cloud/agent-profiles-service.api.js +58 -0
  271. package/dist/api/cloud/agent-profiles-service.api.js.map +1 -0
  272. package/dist/api/cloud/organization-service.api.cjs +1 -1
  273. package/dist/api/cloud/organization-service.api.cjs.map +1 -1
  274. package/dist/api/cloud/organization-service.api.d.ts +8 -0
  275. package/dist/api/cloud/organization-service.api.js +3 -1
  276. package/dist/api/cloud/organization-service.api.js.map +1 -1
  277. package/dist/api/cloud/profiles-service.api.cjs +2 -0
  278. package/dist/api/cloud/profiles-service.api.cjs.map +1 -0
  279. package/dist/api/cloud/profiles-service.api.d.ts +7 -0
  280. package/dist/api/cloud/profiles-service.api.js +75 -0
  281. package/dist/api/cloud/profiles-service.api.js.map +1 -0
  282. package/dist/api/cloud/settings-service.api.cjs +1 -1
  283. package/dist/api/cloud/settings-service.api.cjs.map +1 -1
  284. package/dist/api/cloud/settings-service.api.js +1 -1
  285. package/dist/api/cloud/settings-service.api.js.map +1 -1
  286. package/dist/api/config-service/config-service.api.cjs +1 -1
  287. package/dist/api/config-service/config-service.api.cjs.map +1 -1
  288. package/dist/api/config-service/config-service.api.js +1 -0
  289. package/dist/api/config-service/config-service.api.js.map +1 -1
  290. package/dist/api/conversation-metadata-store.cjs.map +1 -1
  291. package/dist/api/conversation-metadata-store.d.ts +11 -0
  292. package/dist/api/conversation-metadata-store.js.map +1 -1
  293. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  294. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  295. package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +20 -1
  296. package/dist/api/conversation-service/agent-server-conversation-service.api.js +134 -105
  297. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  298. package/dist/api/conversation-service/agent-server-conversation-service.types.d.ts +2 -0
  299. package/dist/api/conversation-service/conversation-service.api.cjs +1 -1
  300. package/dist/api/conversation-service/conversation-service.api.cjs.map +1 -1
  301. package/dist/api/conversation-service/conversation-service.api.d.ts +1 -0
  302. package/dist/api/conversation-service/conversation-service.api.js +4 -0
  303. package/dist/api/conversation-service/conversation-service.api.js.map +1 -1
  304. package/dist/api/device-flow-client.cjs +1 -1
  305. package/dist/api/device-flow-client.cjs.map +1 -1
  306. package/dist/api/device-flow-client.js +33 -25
  307. package/dist/api/device-flow-client.js.map +1 -1
  308. package/dist/api/event-service/event-service.api.cjs +1 -1
  309. package/dist/api/event-service/event-service.api.cjs.map +1 -1
  310. package/dist/api/event-service/event-service.api.js +1 -0
  311. package/dist/api/event-service/event-service.api.js.map +1 -1
  312. package/dist/api/mcp-service/mcp-redacted-credentials.cjs +1 -1
  313. package/dist/api/mcp-service/mcp-redacted-credentials.cjs.map +1 -1
  314. package/dist/api/mcp-service/mcp-redacted-credentials.d.ts +3 -3
  315. package/dist/api/mcp-service/mcp-redacted-credentials.js +29 -30
  316. package/dist/api/mcp-service/mcp-redacted-credentials.js.map +1 -1
  317. package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
  318. package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
  319. package/dist/api/mcp-service/mcp-service.api.d.ts +8 -1
  320. package/dist/api/mcp-service/mcp-service.api.js +129 -23
  321. package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
  322. package/dist/api/option-service/option-service.api.cjs +1 -1
  323. package/dist/api/option-service/option-service.api.cjs.map +1 -1
  324. package/dist/api/option-service/option-service.api.js +1 -0
  325. package/dist/api/option-service/option-service.api.js.map +1 -1
  326. package/dist/api/plugins-management-service.cjs +2 -0
  327. package/dist/api/plugins-management-service.cjs.map +1 -0
  328. package/dist/api/plugins-management-service.d.ts +50 -0
  329. package/dist/api/plugins-management-service.js +41 -0
  330. package/dist/api/plugins-management-service.js.map +1 -0
  331. package/dist/api/plugins-service.d.ts +49 -0
  332. package/dist/api/profiles-service/profiles-service.api.cjs +1 -1
  333. package/dist/api/profiles-service/profiles-service.api.cjs.map +1 -1
  334. package/dist/api/profiles-service/profiles-service.api.js +21 -14
  335. package/dist/api/profiles-service/profiles-service.api.js.map +1 -1
  336. package/dist/api/runtime-service/agent-server-runtime-service.cjs +1 -1
  337. package/dist/api/runtime-service/agent-server-runtime-service.cjs.map +1 -1
  338. package/dist/api/runtime-service/agent-server-runtime-service.js +1 -0
  339. package/dist/api/runtime-service/agent-server-runtime-service.js.map +1 -1
  340. package/dist/api/secrets-service.cjs +1 -1
  341. package/dist/api/secrets-service.cjs.map +1 -1
  342. package/dist/api/secrets-service.js +1 -0
  343. package/dist/api/secrets-service.js.map +1 -1
  344. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  345. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  346. package/dist/api/settings-service/settings-service.api.js +92 -50
  347. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  348. package/dist/api/skills-service.cjs +1 -1
  349. package/dist/api/skills-service.cjs.map +1 -1
  350. package/dist/api/skills-service.js +1 -0
  351. package/dist/api/skills-service.js.map +1 -1
  352. package/dist/api/workspaces-service/workspaces-service.api.cjs +1 -1
  353. package/dist/api/workspaces-service/workspaces-service.api.cjs.map +1 -1
  354. package/dist/api/workspaces-service/workspaces-service.api.js +1 -0
  355. package/dist/api/workspaces-service/workspaces-service.api.js.map +1 -1
  356. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
  357. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
  358. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +57 -38
  359. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
  360. package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs +2 -1
  361. package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs.map +1 -1
  362. package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js +13 -9
  363. package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js.map +1 -1
  364. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs +1 -1
  365. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs.map +1 -1
  366. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js +65 -26
  367. package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js.map +1 -1
  368. package/dist/components/conversation-events/chat/event-message.cjs +2 -2
  369. package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
  370. package/dist/components/conversation-events/chat/event-message.js +78 -76
  371. package/dist/components/conversation-events/chat/event-message.js.map +1 -1
  372. package/dist/components/features/analytics/telemetry-consent-banner.cjs +1 -1
  373. package/dist/components/features/analytics/telemetry-consent-banner.cjs.map +1 -1
  374. package/dist/components/features/analytics/telemetry-consent-banner.js +1 -0
  375. package/dist/components/features/analytics/telemetry-consent-banner.js.map +1 -1
  376. package/dist/components/features/automations/detail/activity-log-item.d.ts +3 -2
  377. package/dist/components/features/automations/detail/activity-log-section.d.ts +3 -2
  378. package/dist/components/features/automations/detail/debug-automation-button.d.ts +17 -0
  379. package/dist/components/features/automations/detail/run-logs-modal.d.ts +6 -1
  380. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  381. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  382. package/dist/components/features/backends/backend-form-modal.d.ts +6 -2
  383. package/dist/components/features/backends/backend-form-modal.js +198 -161
  384. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  385. package/dist/components/features/backends/backend-row.cjs +1 -1
  386. package/dist/components/features/backends/backend-row.cjs.map +1 -1
  387. package/dist/components/features/backends/backend-row.d.ts +2 -1
  388. package/dist/components/features/backends/backend-row.js +60 -54
  389. package/dist/components/features/backends/backend-row.js.map +1 -1
  390. package/dist/components/features/backends/backend-selector.cjs +1 -1
  391. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  392. package/dist/components/features/backends/backend-selector.js +4 -4
  393. package/dist/components/features/backends/backend-version.cjs +1 -1
  394. package/dist/components/features/backends/backend-version.cjs.map +1 -1
  395. package/dist/components/features/backends/backend-version.js +1 -0
  396. package/dist/components/features/backends/backend-version.js.map +1 -1
  397. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  398. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  399. package/dist/components/features/backends/manage-backends-modal.js +72 -61
  400. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  401. package/dist/components/features/chat/change-agent-button.cjs +1 -1
  402. package/dist/components/features/chat/change-agent-button.js +9 -9
  403. package/dist/components/features/chat/chat-add-file-button.cjs +1 -1
  404. package/dist/components/features/chat/chat-add-file-button.cjs.map +1 -1
  405. package/dist/components/features/chat/chat-add-file-button.js +38 -34
  406. package/dist/components/features/chat/chat-add-file-button.js.map +1 -1
  407. package/dist/components/features/chat/chat-interface.cjs +2 -2
  408. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  409. package/dist/components/features/chat/chat-interface.js +136 -129
  410. package/dist/components/features/chat/chat-interface.js.map +1 -1
  411. package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
  412. package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
  413. package/dist/components/features/chat/components/chat-input-actions.js +100 -87
  414. package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
  415. package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs +2 -0
  416. package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -0
  417. package/dist/components/features/chat/components/chat-input-llm-profile-picker.d.ts +15 -0
  418. package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +118 -0
  419. package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -0
  420. package/dist/components/features/chat/components/chat-input-model.cjs +1 -1
  421. package/dist/components/features/chat/components/chat-input-model.js +17 -17
  422. package/dist/components/features/chat/components/chat-input-profile-picker.cjs +2 -0
  423. package/dist/components/features/chat/components/chat-input-profile-picker.cjs.map +1 -0
  424. package/dist/components/features/chat/components/chat-input-profile-picker.d.ts +9 -0
  425. package/dist/components/features/chat/components/chat-input-profile-picker.js +112 -0
  426. package/dist/components/features/chat/components/chat-input-profile-picker.js.map +1 -0
  427. package/dist/components/features/chat/components/resolve-picker-kind.cjs +2 -0
  428. package/dist/components/features/chat/components/resolve-picker-kind.cjs.map +1 -0
  429. package/dist/components/features/chat/components/resolve-picker-kind.d.ts +29 -0
  430. package/dist/components/features/chat/components/resolve-picker-kind.js +8 -0
  431. package/dist/components/features/chat/components/resolve-picker-kind.js.map +1 -0
  432. package/dist/components/features/chat/goal-status-banner.cjs +2 -0
  433. package/dist/components/features/chat/goal-status-banner.cjs.map +1 -0
  434. package/dist/components/features/chat/goal-status-banner.d.ts +11 -0
  435. package/dist/components/features/chat/goal-status-banner.js +12 -0
  436. package/dist/components/features/chat/goal-status-banner.js.map +1 -0
  437. package/dist/components/features/chat/goal-status-content.cjs +2 -0
  438. package/dist/components/features/chat/goal-status-content.cjs.map +1 -0
  439. package/dist/components/features/chat/goal-status-content.d.ts +21 -0
  440. package/dist/components/features/chat/goal-status-content.js +98 -0
  441. package/dist/components/features/chat/goal-status-content.js.map +1 -0
  442. package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
  443. package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
  444. package/dist/components/features/chat/interactive-chat-box.js +20 -19
  445. package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
  446. package/dist/components/features/chat/tool-visualizers/primitives/code-block.cjs +1 -1
  447. package/dist/components/features/chat/tool-visualizers/primitives/code-block.cjs.map +1 -1
  448. package/dist/components/features/chat/tool-visualizers/primitives/code-block.d.ts +10 -3
  449. package/dist/components/features/chat/tool-visualizers/primitives/code-block.js +29 -16
  450. package/dist/components/features/chat/tool-visualizers/primitives/code-block.js.map +1 -1
  451. package/dist/components/features/chat/tool-visualizers/primitives/output-pane.cjs +1 -1
  452. package/dist/components/features/chat/tool-visualizers/primitives/output-pane.cjs.map +1 -1
  453. package/dist/components/features/chat/tool-visualizers/primitives/output-pane.d.ts +2 -2
  454. package/dist/components/features/chat/tool-visualizers/primitives/output-pane.js +16 -16
  455. package/dist/components/features/chat/tool-visualizers/primitives/output-pane.js.map +1 -1
  456. package/dist/components/features/chat/user-message-body.cjs +1 -1
  457. package/dist/components/features/chat/user-message-body.cjs.map +1 -1
  458. package/dist/components/features/chat/user-message-body.js +20 -20
  459. package/dist/components/features/chat/user-message-body.js.map +1 -1
  460. package/dist/components/features/command-menu/command-menu-items.d.ts +32 -0
  461. package/dist/components/features/command-menu/command-menu-trigger.cjs +2 -0
  462. package/dist/components/features/command-menu/command-menu-trigger.cjs.map +1 -0
  463. package/dist/components/features/command-menu/command-menu-trigger.d.ts +5 -0
  464. package/dist/components/features/command-menu/command-menu-trigger.js +53 -0
  465. package/dist/components/features/command-menu/command-menu-trigger.js.map +1 -0
  466. package/dist/components/features/command-menu/command-menu.d.ts +2 -0
  467. package/dist/components/features/command-menu/index.d.ts +2 -0
  468. package/dist/components/features/controls/tools-context-menu.cjs +1 -1
  469. package/dist/components/features/controls/tools-context-menu.cjs.map +1 -1
  470. package/dist/components/features/controls/tools-context-menu.d.ts +3 -1
  471. package/dist/components/features/controls/tools-context-menu.js +94 -77
  472. package/dist/components/features/controls/tools-context-menu.js.map +1 -1
  473. package/dist/components/features/conversation-panel/cloud-new-conversation-menu.cjs +1 -1
  474. package/dist/components/features/conversation-panel/cloud-new-conversation-menu.cjs.map +1 -1
  475. package/dist/components/features/conversation-panel/cloud-new-conversation-menu.js +8 -5
  476. package/dist/components/features/conversation-panel/cloud-new-conversation-menu.js.map +1 -1
  477. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
  478. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +1 -1
  479. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
  480. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  481. package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
  482. package/dist/components/features/conversation-panel/conversation-panel.js +2 -1
  483. package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
  484. package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs +1 -1
  485. package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs.map +1 -1
  486. package/dist/components/features/conversation-panel/local-new-conversation-menu.js +4 -1
  487. package/dist/components/features/conversation-panel/local-new-conversation-menu.js.map +1 -1
  488. package/dist/components/features/conversation-panel/plugins-modal.cjs +2 -0
  489. package/dist/components/features/conversation-panel/plugins-modal.cjs.map +1 -0
  490. package/dist/components/features/conversation-panel/plugins-modal.d.ts +12 -0
  491. package/dist/components/features/conversation-panel/plugins-modal.js +62 -0
  492. package/dist/components/features/conversation-panel/plugins-modal.js.map +1 -0
  493. package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.cjs +1 -1
  494. package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.cjs.map +1 -1
  495. package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.js +4 -4
  496. package/dist/components/features/mcp-logo-badge.cjs +1 -1
  497. package/dist/components/features/mcp-logo-badge.cjs.map +1 -1
  498. package/dist/components/features/mcp-logo-badge.js +17 -15
  499. package/dist/components/features/mcp-logo-badge.js.map +1 -1
  500. package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
  501. package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
  502. package/dist/components/features/mcp-page/custom-server-editor.js +102 -59
  503. package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
  504. package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
  505. package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
  506. package/dist/components/features/mcp-page/install-server-modal.js +284 -169
  507. package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
  508. package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
  509. package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
  510. package/dist/components/features/mcp-page/installed-server-card.js +16 -18
  511. package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
  512. package/dist/components/features/onboarding/onboarding-host.d.ts +3 -13
  513. package/dist/components/features/plugins/add-plugin-modal.d.ts +6 -0
  514. package/dist/components/features/plugins/build-plugins-view-model.d.ts +39 -0
  515. package/dist/components/features/plugins/plugin-card.d.ts +13 -0
  516. package/dist/components/features/plugins/plugin-detail-modal.d.ts +13 -0
  517. package/dist/components/features/plugins/plugin-picker-card.d.ts +10 -0
  518. package/dist/components/features/plugins/plugin-picker-modal.d.ts +9 -0
  519. package/dist/components/features/plugins/plugin-picker-trigger.d.ts +9 -0
  520. package/dist/components/features/plugins/plugin-picker.d.ts +18 -0
  521. package/dist/components/features/plugins/plugin-spec-identity.d.ts +28 -0
  522. package/dist/components/features/plugins/plugins-toolbar.d.ts +9 -0
  523. package/dist/components/features/settings/agent-profiles/agent-profile-actions-menu.d.ts +16 -0
  524. package/dist/components/features/settings/agent-profiles/agent-profile-row.d.ts +13 -0
  525. package/dist/components/features/settings/agent-profiles/agent-profiles-body.d.ts +15 -0
  526. package/dist/components/features/settings/agent-profiles/agent-profiles-local-view.d.ts +7 -0
  527. package/dist/components/features/settings/agent-profiles/agent-profiles-manager.d.ts +7 -0
  528. package/dist/components/features/settings/agent-profiles/delete-agent-profile-modal.d.ts +7 -0
  529. package/dist/components/features/settings/agent-profiles/index.d.ts +6 -0
  530. package/dist/components/features/settings/agent-profiles/merge-agent-profile-save-input.d.ts +18 -0
  531. package/dist/components/features/settings/llm-profiles/llm-profiles-manager.cjs +1 -1
  532. package/dist/components/features/settings/llm-profiles/llm-profiles-manager.js +1 -0
  533. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
  534. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +1 -1
  535. package/dist/components/features/settings/llm-profiles/profile-row.d.ts +3 -1
  536. package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +3 -1
  537. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.cjs +1 -1
  538. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.cjs.map +1 -1
  539. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.js +3 -2
  540. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.js.map +1 -1
  541. package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +7 -7
  542. package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
  543. package/dist/components/features/settings/mcp-settings/mcp-server-form.js +279 -130
  544. package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
  545. package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +1 -12
  546. package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +1 -11
  547. package/dist/components/features/settings/settings-dropdown-input.cjs +1 -1
  548. package/dist/components/features/settings/settings-dropdown-input.js +6 -6
  549. package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
  550. package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
  551. package/dist/components/features/sidebar/sidebar-rail-body.d.ts +1 -2
  552. package/dist/components/features/sidebar/sidebar-rail-body.js +81 -82
  553. package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
  554. package/dist/components/features/sidebar/sidebar.cjs +1 -1
  555. package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
  556. package/dist/components/features/sidebar/sidebar.js +45 -46
  557. package/dist/components/features/sidebar/sidebar.js.map +1 -1
  558. package/dist/components/features/skills/extensions-navigation.cjs +1 -1
  559. package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
  560. package/dist/components/features/skills/extensions-navigation.js +1 -2
  561. package/dist/components/features/skills/extensions-navigation.js.map +1 -1
  562. package/dist/components/shared/modals/modal-backdrop.cjs +1 -1
  563. package/dist/components/shared/modals/modal-backdrop.cjs.map +1 -1
  564. package/dist/components/shared/modals/modal-backdrop.d.ts +5 -1
  565. package/dist/components/shared/modals/modal-backdrop.js +3 -3
  566. package/dist/components/shared/modals/modal-backdrop.js.map +1 -1
  567. package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
  568. package/dist/components/shared/modals/settings/model-selector.js +16 -16
  569. package/dist/config/defaults.cjs +1 -1
  570. package/dist/config/defaults.cjs.map +1 -1
  571. package/dist/config/defaults.js +7 -3
  572. package/dist/config/defaults.js.map +1 -1
  573. package/dist/contexts/conversation-websocket-context.cjs +3 -3
  574. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  575. package/dist/contexts/conversation-websocket-context.js +200 -197
  576. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  577. package/dist/hooks/chat/use-goal-interceptor.cjs +2 -0
  578. package/dist/hooks/chat/use-goal-interceptor.cjs.map +1 -0
  579. package/dist/hooks/chat/use-goal-interceptor.d.ts +8 -0
  580. package/dist/hooks/chat/use-goal-interceptor.js +37 -0
  581. package/dist/hooks/chat/use-goal-interceptor.js.map +1 -0
  582. package/dist/hooks/chat/use-grip-resize.cjs +1 -1
  583. package/dist/hooks/chat/use-grip-resize.cjs.map +1 -1
  584. package/dist/hooks/chat/use-grip-resize.js +17 -16
  585. package/dist/hooks/chat/use-grip-resize.js.map +1 -1
  586. package/dist/hooks/chat/use-model-interceptor.cjs +1 -1
  587. package/dist/hooks/chat/use-model-interceptor.cjs.map +1 -1
  588. package/dist/hooks/chat/use-model-interceptor.d.ts +3 -3
  589. package/dist/hooks/chat/use-model-interceptor.js +8 -9
  590. package/dist/hooks/chat/use-model-interceptor.js.map +1 -1
  591. package/dist/hooks/chat/use-slash-command.cjs +1 -1
  592. package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
  593. package/dist/hooks/chat/use-slash-command.js +4 -4
  594. package/dist/hooks/chat/use-slash-command.js.map +1 -1
  595. package/dist/hooks/mutation/conversation-mutation-utils.cjs +1 -1
  596. package/dist/hooks/mutation/conversation-mutation-utils.cjs.map +1 -1
  597. package/dist/hooks/mutation/conversation-mutation-utils.d.ts +17 -0
  598. package/dist/hooks/mutation/conversation-mutation-utils.js +23 -4
  599. package/dist/hooks/mutation/conversation-mutation-utils.js.map +1 -1
  600. package/dist/hooks/mutation/use-activate-agent-profile.cjs +2 -0
  601. package/dist/hooks/mutation/use-activate-agent-profile.cjs.map +1 -0
  602. package/dist/hooks/mutation/use-activate-agent-profile.d.ts +23 -0
  603. package/dist/hooks/mutation/use-activate-agent-profile.js +34 -0
  604. package/dist/hooks/mutation/use-activate-agent-profile.js.map +1 -0
  605. package/dist/hooks/mutation/use-activate-llm-profile.cjs +1 -1
  606. package/dist/hooks/mutation/use-activate-llm-profile.js +1 -1
  607. package/dist/hooks/mutation/use-add-mcp-server.cjs +1 -1
  608. package/dist/hooks/mutation/use-add-mcp-server.cjs.map +1 -1
  609. package/dist/hooks/mutation/use-add-mcp-server.d.ts +1 -12
  610. package/dist/hooks/mutation/use-add-mcp-server.js +10 -34
  611. package/dist/hooks/mutation/use-add-mcp-server.js.map +1 -1
  612. package/dist/hooks/mutation/use-apply-onboarding-agent-profile.d.ts +20 -0
  613. package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
  614. package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
  615. package/dist/hooks/mutation/use-create-conversation.d.ts +2 -0
  616. package/dist/hooks/mutation/use-create-conversation.js +94 -25
  617. package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
  618. package/dist/hooks/mutation/use-delete-agent-profile.d.ts +1 -0
  619. package/dist/hooks/mutation/use-delete-llm-profile.cjs +1 -1
  620. package/dist/hooks/mutation/use-delete-llm-profile.js +1 -1
  621. package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
  622. package/dist/hooks/mutation/use-delete-mcp-server.js +4 -4
  623. package/dist/hooks/mutation/use-fork-conversation.cjs +2 -0
  624. package/dist/hooks/mutation/use-fork-conversation.cjs.map +1 -0
  625. package/dist/hooks/mutation/use-fork-conversation.d.ts +24 -0
  626. package/dist/hooks/mutation/use-fork-conversation.js +29 -0
  627. package/dist/hooks/mutation/use-fork-conversation.js.map +1 -0
  628. package/dist/hooks/mutation/use-install-plugin.d.ts +7 -0
  629. package/dist/hooks/mutation/use-new-conversation-command.cjs +1 -1
  630. package/dist/hooks/mutation/use-new-conversation-command.cjs.map +1 -1
  631. package/dist/hooks/mutation/use-new-conversation-command.d.ts +1 -0
  632. package/dist/hooks/mutation/use-new-conversation-command.js +20 -10
  633. package/dist/hooks/mutation/use-new-conversation-command.js.map +1 -1
  634. package/dist/hooks/mutation/use-rename-agent-profile.d.ts +6 -0
  635. package/dist/hooks/mutation/use-rename-llm-profile.cjs +1 -1
  636. package/dist/hooks/mutation/use-rename-llm-profile.js +1 -1
  637. package/dist/hooks/mutation/use-save-agent-profile.d.ts +5 -0
  638. package/dist/hooks/mutation/use-save-llm-profile.cjs +1 -1
  639. package/dist/hooks/mutation/use-save-llm-profile.js +1 -1
  640. package/dist/hooks/mutation/use-switch-acp-model.cjs.map +1 -1
  641. package/dist/hooks/mutation/use-switch-acp-model.js.map +1 -1
  642. package/dist/hooks/mutation/use-switch-llm-profile-and-log.cjs +1 -1
  643. package/dist/hooks/mutation/use-switch-llm-profile-and-log.cjs.map +1 -1
  644. package/dist/hooks/mutation/use-switch-llm-profile-and-log.d.ts +3 -4
  645. package/dist/hooks/mutation/use-switch-llm-profile-and-log.js +10 -35
  646. package/dist/hooks/mutation/use-switch-llm-profile-and-log.js.map +1 -1
  647. package/dist/hooks/mutation/use-switch-llm-profile.cjs +1 -1
  648. package/dist/hooks/mutation/use-switch-llm-profile.cjs.map +1 -1
  649. package/dist/hooks/mutation/use-switch-llm-profile.d.ts +20 -5
  650. package/dist/hooks/mutation/use-switch-llm-profile.js +38 -14
  651. package/dist/hooks/mutation/use-switch-llm-profile.js.map +1 -1
  652. package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
  653. package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
  654. package/dist/hooks/mutation/use-update-mcp-server.js +11 -37
  655. package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
  656. package/dist/hooks/query/query-keys.cjs +1 -1
  657. package/dist/hooks/query/query-keys.cjs.map +1 -1
  658. package/dist/hooks/query/query-keys.d.ts +21 -0
  659. package/dist/hooks/query/query-keys.js +7 -3
  660. package/dist/hooks/query/query-keys.js.map +1 -1
  661. package/dist/hooks/query/use-active-conversation.cjs +1 -1
  662. package/dist/hooks/query/use-active-conversation.cjs.map +1 -1
  663. package/dist/hooks/query/use-active-conversation.js +17 -16
  664. package/dist/hooks/query/use-active-conversation.js.map +1 -1
  665. package/dist/hooks/query/use-agent-profiles.cjs +2 -0
  666. package/dist/hooks/query/use-agent-profiles.cjs.map +1 -0
  667. package/dist/hooks/query/use-agent-profiles.d.ts +13 -0
  668. package/dist/hooks/query/use-agent-profiles.js +24 -0
  669. package/dist/hooks/query/use-agent-profiles.js.map +1 -0
  670. package/dist/hooks/query/use-backends-health.cjs +1 -1
  671. package/dist/hooks/query/use-backends-health.cjs.map +1 -1
  672. package/dist/hooks/query/use-backends-health.js +18 -3
  673. package/dist/hooks/query/use-backends-health.js.map +1 -1
  674. package/dist/hooks/query/use-conversation-history.cjs +1 -1
  675. package/dist/hooks/query/use-conversation-history.cjs.map +1 -1
  676. package/dist/hooks/query/use-conversation-history.js +4 -2
  677. package/dist/hooks/query/use-conversation-history.js.map +1 -1
  678. package/dist/hooks/query/use-local-workspaces.cjs +1 -1
  679. package/dist/hooks/query/use-local-workspaces.cjs.map +1 -1
  680. package/dist/hooks/query/use-local-workspaces.js +1 -0
  681. package/dist/hooks/query/use-local-workspaces.js.map +1 -1
  682. package/dist/hooks/query/use-plugins-marketplace.d.ts +7 -0
  683. package/dist/hooks/query/use-resolved-workspaces.cjs +1 -1
  684. package/dist/hooks/query/use-resolved-workspaces.cjs.map +1 -1
  685. package/dist/hooks/query/use-resolved-workspaces.js +7 -6
  686. package/dist/hooks/query/use-resolved-workspaces.js.map +1 -1
  687. package/dist/hooks/query/use-search-subdirs.cjs +1 -1
  688. package/dist/hooks/query/use-search-subdirs.cjs.map +1 -1
  689. package/dist/hooks/query/use-search-subdirs.js +1 -0
  690. package/dist/hooks/query/use-search-subdirs.js.map +1 -1
  691. package/dist/hooks/query/use-settings.cjs +1 -1
  692. package/dist/hooks/query/use-settings.cjs.map +1 -1
  693. package/dist/hooks/query/use-settings.js +11 -11
  694. package/dist/hooks/query/use-settings.js.map +1 -1
  695. package/dist/hooks/query/use-verified-models.cjs +1 -1
  696. package/dist/hooks/query/use-verified-models.cjs.map +1 -1
  697. package/dist/hooks/query/use-verified-models.js +1 -0
  698. package/dist/hooks/query/use-verified-models.js.map +1 -1
  699. package/dist/hooks/use-acp-model-context.cjs +1 -1
  700. package/dist/hooks/use-acp-model-context.cjs.map +1 -1
  701. package/dist/hooks/use-acp-model-context.d.ts +1 -1
  702. package/dist/hooks/use-acp-model-context.js +9 -8
  703. package/dist/hooks/use-acp-model-context.js.map +1 -1
  704. package/dist/hooks/use-active-agent-profile.cjs +2 -0
  705. package/dist/hooks/use-active-agent-profile.cjs.map +1 -0
  706. package/dist/hooks/use-active-agent-profile.d.ts +20 -0
  707. package/dist/hooks/use-active-agent-profile.js +17 -0
  708. package/dist/hooks/use-active-agent-profile.js.map +1 -0
  709. package/dist/hooks/use-auto-resize.cjs +1 -1
  710. package/dist/hooks/use-auto-resize.cjs.map +1 -1
  711. package/dist/hooks/use-auto-resize.d.ts +2 -0
  712. package/dist/hooks/use-auto-resize.js +49 -45
  713. package/dist/hooks/use-auto-resize.js.map +1 -1
  714. package/dist/hooks/use-can-manage-org-profiles.cjs +1 -0
  715. package/dist/hooks/use-can-manage-org-profiles.d.ts +18 -0
  716. package/dist/hooks/use-can-manage-org-profiles.js +2 -0
  717. package/dist/hooks/use-chat-input-llm-profile-state.cjs +2 -0
  718. package/dist/hooks/use-chat-input-llm-profile-state.cjs.map +1 -0
  719. package/dist/hooks/use-chat-input-llm-profile-state.d.ts +23 -0
  720. package/dist/hooks/use-chat-input-llm-profile-state.js +30 -0
  721. package/dist/hooks/use-chat-input-llm-profile-state.js.map +1 -0
  722. package/dist/hooks/use-chat-input-model-state.cjs.map +1 -1
  723. package/dist/hooks/use-chat-input-model-state.d.ts +1 -1
  724. package/dist/hooks/use-chat-input-model-state.js.map +1 -1
  725. package/dist/hooks/use-chat-input-profile-state.cjs +2 -0
  726. package/dist/hooks/use-chat-input-profile-state.cjs.map +1 -0
  727. package/dist/hooks/use-chat-input-profile-state.d.ts +20 -0
  728. package/dist/hooks/use-chat-input-profile-state.js +22 -0
  729. package/dist/hooks/use-chat-input-profile-state.js.map +1 -0
  730. package/dist/hooks/use-conversation-name-context-menu.cjs +1 -1
  731. package/dist/hooks/use-conversation-name-context-menu.cjs.map +1 -1
  732. package/dist/hooks/use-conversation-name-context-menu.d.ts +4 -0
  733. package/dist/hooks/use-conversation-name-context-menu.js +44 -37
  734. package/dist/hooks/use-conversation-name-context-menu.js.map +1 -1
  735. package/dist/hooks/use-conversation-plugins.cjs +2 -0
  736. package/dist/hooks/use-conversation-plugins.cjs.map +1 -0
  737. package/dist/hooks/use-conversation-plugins.d.ts +9 -0
  738. package/dist/hooks/use-conversation-plugins.js +12 -0
  739. package/dist/hooks/use-conversation-plugins.js.map +1 -0
  740. package/dist/hooks/use-handle-plan-click.cjs +1 -1
  741. package/dist/hooks/use-handle-plan-click.cjs.map +1 -1
  742. package/dist/hooks/use-handle-plan-click.js +2 -1
  743. package/dist/hooks/use-handle-plan-click.js.map +1 -1
  744. package/dist/hooks/use-llm-configured.cjs +1 -1
  745. package/dist/hooks/use-llm-configured.cjs.map +1 -1
  746. package/dist/hooks/use-llm-configured.js +17 -16
  747. package/dist/hooks/use-llm-configured.js.map +1 -1
  748. package/dist/hooks/use-tracking.cjs +1 -1
  749. package/dist/hooks/use-tracking.cjs.map +1 -1
  750. package/dist/hooks/use-tracking.d.ts +51 -1
  751. package/dist/hooks/use-tracking.js +61 -2
  752. package/dist/hooks/use-tracking.js.map +1 -1
  753. package/dist/i18n/declaration.cjs +1 -1
  754. package/dist/i18n/declaration.cjs.map +1 -1
  755. package/dist/i18n/declaration.d.ts +138 -1
  756. package/dist/i18n/declaration.js +1 -1
  757. package/dist/i18n/declaration.js.map +1 -1
  758. package/dist/i18n/translation.cjs +18 -3
  759. package/dist/i18n/translation.cjs.map +1 -1
  760. package/dist/i18n/translation.js +2329 -0
  761. package/dist/i18n/translation.js.map +1 -1
  762. package/dist/icons/slack.cjs +2 -0
  763. package/dist/icons/slack.cjs.map +1 -0
  764. package/dist/icons/slack.js +19 -0
  765. package/dist/icons/slack.js.map +1 -0
  766. package/dist/icons/u-puzzle-piece.cjs +2 -0
  767. package/dist/icons/u-puzzle-piece.cjs.map +1 -0
  768. package/dist/icons/u-puzzle-piece.js +19 -0
  769. package/dist/icons/u-puzzle-piece.js.map +1 -0
  770. package/dist/icons/x-circle-solid.cjs +2 -0
  771. package/dist/icons/x-circle-solid.cjs.map +1 -0
  772. package/dist/icons/x-circle-solid.js +13 -0
  773. package/dist/icons/x-circle-solid.js.map +1 -0
  774. package/dist/locales/ar/openhands.json +138 -1
  775. package/dist/locales/ca/openhands.json +138 -1
  776. package/dist/locales/de/openhands.json +138 -1
  777. package/dist/locales/en/openhands.json +138 -1
  778. package/dist/locales/es/openhands.json +138 -1
  779. package/dist/locales/fr/openhands.json +138 -1
  780. package/dist/locales/it/openhands.json +138 -1
  781. package/dist/locales/ja/openhands.json +138 -1
  782. package/dist/locales/ko-KR/openhands.json +138 -1
  783. package/dist/locales/no/openhands.json +138 -1
  784. package/dist/locales/pt/openhands.json +138 -1
  785. package/dist/locales/tr/openhands.json +138 -1
  786. package/dist/locales/uk/openhands.json +138 -1
  787. package/dist/locales/zh-CN/openhands.json +138 -1
  788. package/dist/locales/zh-TW/openhands.json +138 -1
  789. package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.cjs +1 -1
  790. package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.cjs.map +1 -1
  791. package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.js +0 -20
  792. package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.js.map +1 -1
  793. package/dist/node_modules/@openhands/extensions/integrations/catalog/asana.cjs +1 -1
  794. package/dist/node_modules/@openhands/extensions/integrations/catalog/asana.cjs.map +1 -1
  795. package/dist/node_modules/@openhands/extensions/integrations/catalog/asana.js +1 -6
  796. package/dist/node_modules/@openhands/extensions/integrations/catalog/asana.js.map +1 -1
  797. package/dist/node_modules/@openhands/extensions/integrations/catalog/bitbucket.cjs +1 -1
  798. package/dist/node_modules/@openhands/extensions/integrations/catalog/bitbucket.cjs.map +1 -1
  799. package/dist/node_modules/@openhands/extensions/integrations/catalog/bitbucket.js +1 -6
  800. package/dist/node_modules/@openhands/extensions/integrations/catalog/bitbucket.js.map +1 -1
  801. package/dist/node_modules/@openhands/extensions/integrations/catalog/box.cjs +1 -1
  802. package/dist/node_modules/@openhands/extensions/integrations/catalog/box.cjs.map +1 -1
  803. package/dist/node_modules/@openhands/extensions/integrations/catalog/box.js +1 -6
  804. package/dist/node_modules/@openhands/extensions/integrations/catalog/box.js.map +1 -1
  805. package/dist/node_modules/@openhands/extensions/integrations/catalog/canva.cjs +1 -1
  806. package/dist/node_modules/@openhands/extensions/integrations/catalog/canva.cjs.map +1 -1
  807. package/dist/node_modules/@openhands/extensions/integrations/catalog/canva.js +3 -7
  808. package/dist/node_modules/@openhands/extensions/integrations/catalog/canva.js.map +1 -1
  809. package/dist/node_modules/@openhands/extensions/integrations/catalog/confluence.cjs +1 -1
  810. package/dist/node_modules/@openhands/extensions/integrations/catalog/confluence.cjs.map +1 -1
  811. package/dist/node_modules/@openhands/extensions/integrations/catalog/confluence.js +1 -6
  812. package/dist/node_modules/@openhands/extensions/integrations/catalog/confluence.js.map +1 -1
  813. package/dist/node_modules/@openhands/extensions/integrations/catalog/discord.cjs +1 -1
  814. package/dist/node_modules/@openhands/extensions/integrations/catalog/discord.cjs.map +1 -1
  815. package/dist/node_modules/@openhands/extensions/integrations/catalog/discord.js +1 -6
  816. package/dist/node_modules/@openhands/extensions/integrations/catalog/discord.js.map +1 -1
  817. package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.cjs +1 -1
  818. package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.cjs.map +1 -1
  819. package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.js +20 -26
  820. package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.js.map +1 -1
  821. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +1 -1
  822. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -1
  823. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +0 -9
  824. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -1
  825. package/dist/node_modules/@openhands/extensions/integrations/catalog/gmail.cjs +1 -1
  826. package/dist/node_modules/@openhands/extensions/integrations/catalog/gmail.cjs.map +1 -1
  827. package/dist/node_modules/@openhands/extensions/integrations/catalog/gmail.js +1 -6
  828. package/dist/node_modules/@openhands/extensions/integrations/catalog/gmail.js.map +1 -1
  829. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-calendar.cjs +1 -1
  830. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-calendar.cjs.map +1 -1
  831. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-calendar.js +1 -6
  832. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-calendar.js.map +1 -1
  833. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-docs.cjs +1 -1
  834. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-docs.cjs.map +1 -1
  835. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-docs.js +1 -6
  836. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-docs.js.map +1 -1
  837. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-drive.cjs +1 -1
  838. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-drive.cjs.map +1 -1
  839. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-drive.js +1 -6
  840. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-drive.js.map +1 -1
  841. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-sheets.cjs +1 -1
  842. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-sheets.cjs.map +1 -1
  843. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-sheets.js +1 -6
  844. package/dist/node_modules/@openhands/extensions/integrations/catalog/google-sheets.js.map +1 -1
  845. package/dist/node_modules/@openhands/extensions/integrations/catalog/intercom.cjs +1 -1
  846. package/dist/node_modules/@openhands/extensions/integrations/catalog/intercom.cjs.map +1 -1
  847. package/dist/node_modules/@openhands/extensions/integrations/catalog/intercom.js +1 -6
  848. package/dist/node_modules/@openhands/extensions/integrations/catalog/intercom.js.map +1 -1
  849. package/dist/node_modules/@openhands/extensions/integrations/catalog/jira.cjs +1 -1
  850. package/dist/node_modules/@openhands/extensions/integrations/catalog/jira.cjs.map +1 -1
  851. package/dist/node_modules/@openhands/extensions/integrations/catalog/jira.js +1 -6
  852. package/dist/node_modules/@openhands/extensions/integrations/catalog/jira.js.map +1 -1
  853. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs +1 -1
  854. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs.map +1 -1
  855. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js +13 -13
  856. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js.map +1 -1
  857. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs +1 -1
  858. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs.map +1 -1
  859. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js +1 -6
  860. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js.map +1 -1
  861. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs +1 -1
  862. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs.map +1 -1
  863. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js +1 -6
  864. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js.map +1 -1
  865. package/dist/node_modules/@openhands/extensions/integrations/catalog/miro.cjs +1 -1
  866. package/dist/node_modules/@openhands/extensions/integrations/catalog/miro.cjs.map +1 -1
  867. package/dist/node_modules/@openhands/extensions/integrations/catalog/miro.js +14 -10
  868. package/dist/node_modules/@openhands/extensions/integrations/catalog/miro.js.map +1 -1
  869. package/dist/node_modules/@openhands/extensions/integrations/catalog/monday.cjs +1 -1
  870. package/dist/node_modules/@openhands/extensions/integrations/catalog/monday.cjs.map +1 -1
  871. package/dist/node_modules/@openhands/extensions/integrations/catalog/monday.js +13 -10
  872. package/dist/node_modules/@openhands/extensions/integrations/catalog/monday.js.map +1 -1
  873. package/dist/node_modules/@openhands/extensions/integrations/catalog/netlify.cjs +1 -1
  874. package/dist/node_modules/@openhands/extensions/integrations/catalog/netlify.cjs.map +1 -1
  875. package/dist/node_modules/@openhands/extensions/integrations/catalog/netlify.js +1 -6
  876. package/dist/node_modules/@openhands/extensions/integrations/catalog/netlify.js.map +1 -1
  877. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
  878. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
  879. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +1 -8
  880. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
  881. package/dist/node_modules/@openhands/extensions/integrations/catalog/okta.cjs +1 -1
  882. package/dist/node_modules/@openhands/extensions/integrations/catalog/okta.cjs.map +1 -1
  883. package/dist/node_modules/@openhands/extensions/integrations/catalog/okta.js +1 -6
  884. package/dist/node_modules/@openhands/extensions/integrations/catalog/okta.js.map +1 -1
  885. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs +1 -1
  886. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs.map +1 -1
  887. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js +1 -6
  888. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js.map +1 -1
  889. package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.cjs +1 -1
  890. package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.cjs.map +1 -1
  891. package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.js +20 -18
  892. package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.js.map +1 -1
  893. package/dist/node_modules/@openhands/extensions/integrations/catalog/quickbooks.cjs +1 -1
  894. package/dist/node_modules/@openhands/extensions/integrations/catalog/quickbooks.cjs.map +1 -1
  895. package/dist/node_modules/@openhands/extensions/integrations/catalog/quickbooks.js +66 -21
  896. package/dist/node_modules/@openhands/extensions/integrations/catalog/quickbooks.js.map +1 -1
  897. package/dist/node_modules/@openhands/extensions/integrations/catalog/salesforce.cjs +1 -1
  898. package/dist/node_modules/@openhands/extensions/integrations/catalog/salesforce.cjs.map +1 -1
  899. package/dist/node_modules/@openhands/extensions/integrations/catalog/salesforce.js +17 -11
  900. package/dist/node_modules/@openhands/extensions/integrations/catalog/salesforce.js.map +1 -1
  901. package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.cjs +1 -1
  902. package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.cjs.map +1 -1
  903. package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.js +12 -17
  904. package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.js.map +1 -1
  905. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs +1 -1
  906. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs.map +1 -1
  907. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js +1 -6
  908. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js.map +1 -1
  909. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs +1 -1
  910. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs.map +1 -1
  911. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js +1 -1
  912. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js.map +1 -1
  913. package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.cjs +1 -1
  914. package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.cjs.map +1 -1
  915. package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.js +14 -19
  916. package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.js.map +1 -1
  917. package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.cjs +1 -1
  918. package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.cjs.map +1 -1
  919. package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.js +15 -20
  920. package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.js.map +1 -1
  921. package/dist/node_modules/@openhands/extensions/integrations/catalog/trello.cjs +1 -1
  922. package/dist/node_modules/@openhands/extensions/integrations/catalog/trello.cjs.map +1 -1
  923. package/dist/node_modules/@openhands/extensions/integrations/catalog/trello.js +10 -8
  924. package/dist/node_modules/@openhands/extensions/integrations/catalog/trello.js.map +1 -1
  925. package/dist/node_modules/@openhands/extensions/integrations/catalog/vercel.cjs +1 -1
  926. package/dist/node_modules/@openhands/extensions/integrations/catalog/vercel.cjs.map +1 -1
  927. package/dist/node_modules/@openhands/extensions/integrations/catalog/vercel.js +1 -6
  928. package/dist/node_modules/@openhands/extensions/integrations/catalog/vercel.js.map +1 -1
  929. package/dist/node_modules/@openhands/extensions/integrations/catalog/xero.cjs +1 -1
  930. package/dist/node_modules/@openhands/extensions/integrations/catalog/xero.cjs.map +1 -1
  931. package/dist/node_modules/@openhands/extensions/integrations/catalog/xero.js +1 -6
  932. package/dist/node_modules/@openhands/extensions/integrations/catalog/xero.js.map +1 -1
  933. package/dist/node_modules/@openhands/extensions/integrations/catalog/zoom.cjs +1 -1
  934. package/dist/node_modules/@openhands/extensions/integrations/catalog/zoom.cjs.map +1 -1
  935. package/dist/node_modules/@openhands/extensions/integrations/catalog/zoom.js +1 -6
  936. package/dist/node_modules/@openhands/extensions/integrations/catalog/zoom.js.map +1 -1
  937. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
  938. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
  939. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +67 -87
  940. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
  941. package/dist/node_modules/@openhands/extensions/integrations/index.cjs +1 -1
  942. package/dist/node_modules/@openhands/extensions/integrations/index.cjs.map +1 -1
  943. package/dist/node_modules/@openhands/extensions/integrations/index.js +4 -4
  944. package/dist/node_modules/@openhands/extensions/integrations/index.js.map +1 -1
  945. package/dist/node_modules/@openhands/extensions/skills/index.cjs +236 -17
  946. package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
  947. package/dist/node_modules/@openhands/extensions/skills/index.js +24 -5
  948. package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
  949. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-profiles-client.cjs +2 -0
  950. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-profiles-client.cjs.map +1 -0
  951. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-profiles-client.js +40 -0
  952. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-profiles-client.js.map +1 -0
  953. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs +1 -1
  954. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs.map +1 -1
  955. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js +4 -4
  956. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js.map +1 -1
  957. package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs +1 -1
  958. package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs.map +1 -1
  959. package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js +3 -0
  960. package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js.map +1 -1
  961. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs +1 -1
  962. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs.map +1 -1
  963. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js +3 -0
  964. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js.map +1 -1
  965. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +1 -0
  966. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +1 -0
  967. package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs +1 -0
  968. package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js +1 -0
  969. package/dist/node_modules/@openhands/typescript-client/dist/client/http-client.cjs +1 -1
  970. package/dist/node_modules/@openhands/typescript-client/dist/client/http-client.cjs.map +1 -1
  971. package/dist/node_modules/@openhands/typescript-client/dist/client/http-client.js +84 -27
  972. package/dist/node_modules/@openhands/typescript-client/dist/client/http-client.js.map +1 -1
  973. package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.cjs +1 -1
  974. package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.cjs.map +1 -1
  975. package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.js +9 -0
  976. package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.js.map +1 -1
  977. package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs +1 -0
  978. package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js +1 -0
  979. package/dist/node_modules/@openhands/typescript-client/dist/client/plugins-client.cjs +2 -0
  980. package/dist/node_modules/@openhands/typescript-client/dist/client/plugins-client.cjs.map +1 -0
  981. package/dist/node_modules/@openhands/typescript-client/dist/client/plugins-client.js +42 -0
  982. package/dist/node_modules/@openhands/typescript-client/dist/client/plugins-client.js.map +1 -0
  983. package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs +1 -0
  984. package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js +1 -0
  985. package/dist/node_modules/@openhands/typescript-client/dist/client/skills-client.cjs +1 -1
  986. package/dist/node_modules/@openhands/typescript-client/dist/client/skills-client.cjs.map +1 -1
  987. package/dist/node_modules/@openhands/typescript-client/dist/client/skills-client.js +1 -1
  988. package/dist/node_modules/@openhands/typescript-client/dist/client/skills-client.js.map +1 -1
  989. package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs +1 -0
  990. package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js +1 -0
  991. package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs +1 -0
  992. package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js +1 -0
  993. package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -0
  994. package/dist/node_modules/@openhands/typescript-client/dist/clients.js +20 -0
  995. package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation-manager.cjs +1 -1
  996. package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation-manager.js +18 -0
  997. package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation.cjs +1 -1
  998. package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation.js +1 -0
  999. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.cjs +1 -1
  1000. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.js +2 -0
  1001. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs +1 -1
  1002. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs.map +1 -1
  1003. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.js +15 -17
  1004. package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.js.map +1 -1
  1005. package/dist/node_modules/@openhands/typescript-client/dist/index.cjs +1 -1
  1006. package/dist/node_modules/@openhands/typescript-client/dist/index.js +3 -0
  1007. package/dist/node_modules/@openhands/typescript-client/dist/workspace/workspace.cjs +1 -0
  1008. package/dist/node_modules/@openhands/typescript-client/dist/workspace/workspace.js +1 -0
  1009. package/dist/package.cjs +1 -1
  1010. package/dist/package.cjs.map +1 -1
  1011. package/dist/package.js +7 -4
  1012. package/dist/package.js.map +1 -1
  1013. package/dist/routes/agent-settings.d.ts +106 -0
  1014. package/dist/routes/files-tab.cjs +1 -1
  1015. package/dist/routes/files-tab.js +23 -23
  1016. package/dist/routes/llm-settings.cjs +1 -1
  1017. package/dist/routes/llm-settings.cjs.map +1 -1
  1018. package/dist/routes/llm-settings.d.ts +6 -4
  1019. package/dist/routes/llm-settings.js +0 -1
  1020. package/dist/routes/llm-settings.js.map +1 -1
  1021. package/dist/routes/mcp.cjs.map +1 -1
  1022. package/dist/routes/mcp.js.map +1 -1
  1023. package/dist/services/settings.cjs +1 -1
  1024. package/dist/services/settings.cjs.map +1 -1
  1025. package/dist/services/settings.js +2 -6
  1026. package/dist/services/settings.js.map +1 -1
  1027. package/dist/stores/command-menu-store.cjs +2 -0
  1028. package/dist/stores/command-menu-store.cjs.map +1 -0
  1029. package/dist/stores/command-menu-store.d.ts +8 -0
  1030. package/dist/stores/command-menu-store.js +12 -0
  1031. package/dist/stores/command-menu-store.js.map +1 -0
  1032. package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
  1033. package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
  1034. package/dist/stores/conversation-panel-preferences-store.js +1 -1
  1035. package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
  1036. package/dist/stores/conversation-store.cjs +1 -1
  1037. package/dist/stores/conversation-store.cjs.map +1 -1
  1038. package/dist/stores/conversation-store.d.ts +1 -0
  1039. package/dist/stores/conversation-store.js +1 -0
  1040. package/dist/stores/conversation-store.js.map +1 -1
  1041. package/dist/stores/goal-store.cjs +2 -0
  1042. package/dist/stores/goal-store.cjs.map +1 -0
  1043. package/dist/stores/goal-store.d.ts +28 -0
  1044. package/dist/stores/goal-store.js +14 -0
  1045. package/dist/stores/goal-store.js.map +1 -0
  1046. package/dist/types/agent-server/core/events/conversation-state-event.d.ts +39 -3
  1047. package/dist/types/agent-server/type-guards.cjs +1 -1
  1048. package/dist/types/agent-server/type-guards.cjs.map +1 -1
  1049. package/dist/types/agent-server/type-guards.d.ts +2 -1
  1050. package/dist/types/agent-server/type-guards.js +3 -3
  1051. package/dist/types/agent-server/type-guards.js.map +1 -1
  1052. package/dist/types/mcp-auth.cjs +2 -0
  1053. package/dist/types/mcp-auth.cjs.map +1 -0
  1054. package/dist/types/mcp-auth.d.ts +43 -0
  1055. package/dist/types/mcp-auth.js +13 -0
  1056. package/dist/types/mcp-auth.js.map +1 -0
  1057. package/dist/types/mcp-server.d.ts +22 -1
  1058. package/dist/types/settings.d.ts +6 -4
  1059. package/dist/ui/context-menu.d.ts +1 -1
  1060. package/dist/utils/acp-command.d.ts +64 -0
  1061. package/dist/utils/automation-debug-prompt.d.ts +18 -0
  1062. package/dist/utils/constants.cjs +1 -1
  1063. package/dist/utils/constants.cjs.map +1 -1
  1064. package/dist/utils/constants.d.ts +2 -0
  1065. package/dist/utils/constants.js +12 -3
  1066. package/dist/utils/constants.js.map +1 -1
  1067. package/dist/utils/dropdown-classes.cjs +1 -1
  1068. package/dist/utils/dropdown-classes.cjs.map +1 -1
  1069. package/dist/utils/dropdown-classes.js +4 -2
  1070. package/dist/utils/dropdown-classes.js.map +1 -1
  1071. package/dist/utils/form-control-classes.cjs +1 -1
  1072. package/dist/utils/form-control-classes.js +1 -1
  1073. package/dist/utils/handle-event-for-ui.cjs +1 -1
  1074. package/dist/utils/handle-event-for-ui.cjs.map +1 -1
  1075. package/dist/utils/handle-event-for-ui.js +72 -37
  1076. package/dist/utils/handle-event-for-ui.js.map +1 -1
  1077. package/dist/utils/mcp-config.cjs +1 -1
  1078. package/dist/utils/mcp-config.cjs.map +1 -1
  1079. package/dist/utils/mcp-config.d.ts +15 -9
  1080. package/dist/utils/mcp-config.js +124 -53
  1081. package/dist/utils/mcp-config.js.map +1 -1
  1082. package/dist/utils/mcp-installed-server-display.cjs +2 -0
  1083. package/dist/utils/mcp-installed-server-display.cjs.map +1 -0
  1084. package/dist/utils/mcp-installed-server-display.d.ts +8 -0
  1085. package/dist/utils/mcp-installed-server-display.js +12 -0
  1086. package/dist/utils/mcp-installed-server-display.js.map +1 -0
  1087. package/dist/utils/mcp-installed-servers.cjs +1 -1
  1088. package/dist/utils/mcp-installed-servers.cjs.map +1 -1
  1089. package/dist/utils/mcp-installed-servers.js +4 -4
  1090. package/dist/utils/mcp-installed-servers.js.map +1 -1
  1091. package/dist/utils/mcp-marketplace-utils.cjs +1 -1
  1092. package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
  1093. package/dist/utils/mcp-marketplace-utils.d.ts +2 -0
  1094. package/dist/utils/mcp-marketplace-utils.js +31 -16
  1095. package/dist/utils/mcp-marketplace-utils.js.map +1 -1
  1096. package/dist/utils/mcp-server-name.cjs +2 -0
  1097. package/dist/utils/mcp-server-name.cjs.map +1 -0
  1098. package/dist/utils/mcp-server-name.d.ts +3 -0
  1099. package/dist/utils/mcp-server-name.js +12 -0
  1100. package/dist/utils/mcp-server-name.js.map +1 -0
  1101. package/dist/utils/plugin-display.cjs +2 -0
  1102. package/dist/utils/plugin-display.cjs.map +1 -0
  1103. package/dist/utils/plugin-display.d.ts +20 -0
  1104. package/dist/utils/plugin-display.js +29 -0
  1105. package/dist/utils/plugin-display.js.map +1 -0
  1106. package/dist/utils/settings-utils.cjs.map +1 -1
  1107. package/dist/utils/settings-utils.js.map +1 -1
  1108. package/dist/utils/workspaces-compatibility.cjs +1 -1
  1109. package/dist/utils/workspaces-compatibility.cjs.map +1 -1
  1110. package/dist/utils/workspaces-compatibility.js +1 -0
  1111. package/dist/utils/workspaces-compatibility.js.map +1 -1
  1112. package/package.json +7 -4
  1113. package/scripts/check-sdk-version-sync.mjs +6 -6
  1114. package/scripts/check-translation-completeness.cjs +6 -0
  1115. package/scripts/dev-safe.mjs +14 -3
  1116. package/scripts/dev-with-automation.mjs +4 -0
  1117. package/scripts/gen-acp-docker-env.mjs +107 -0
  1118. package/scripts/ingress.mjs +66 -226
  1119. package/scripts/proxy-utils.mjs +171 -0
  1120. package/scripts/static-server.mjs +127 -283
  1121. package/build/assets/Trans-CiZR6eVI.js +0 -1
  1122. package/build/assets/active-backend-context-CEuva6ZJ.js +0 -1
  1123. package/build/assets/add-backend-modal-b_eiVk3A.js +0 -1
  1124. package/build/assets/agent-server-conversation-service.api-D_uJ7BKc.js +0 -5
  1125. package/build/assets/agent-settings-DyfziYyM.js +0 -2
  1126. package/build/assets/alert-banner-BFayS5vM.js +0 -1
  1127. package/build/assets/analytics-consent-form-modal-CQ22qlFF.js +0 -1
  1128. package/build/assets/api-key-entry-screen-KnIwP0vN.js +0 -1
  1129. package/build/assets/app-settings-CBaHJ5vJ.js +0 -1
  1130. package/build/assets/automation-detail-DgQswnXg.js +0 -1
  1131. package/build/assets/automations-list-D99p6CoQ.js +0 -1
  1132. package/build/assets/back-nav-button-Cp9z-wsG.js +0 -1
  1133. package/build/assets/backend-form-modal-BABAz-zH.js +0 -1
  1134. package/build/assets/backend-synced-settings-badge-DzwWQC4T.js +0 -1
  1135. package/build/assets/base-modal-1bHiB5Wf.js +0 -1
  1136. package/build/assets/brand-button-FHWgEb4Q.js +0 -1
  1137. package/build/assets/browser-store-B9h0eW79.js +0 -1
  1138. package/build/assets/browser-tab-JiCXo0Nc.js +0 -1
  1139. package/build/assets/chat-send-button-QtyofqFt.js +0 -1
  1140. package/build/assets/check-6ieIiPhW.js +0 -1
  1141. package/build/assets/checkmark-BfgRVMHK.js +0 -1
  1142. package/build/assets/circle-plus-check-toggle-CmINKfZj.js +0 -1
  1143. package/build/assets/close-DhH0uMa7.js +0 -1
  1144. package/build/assets/code-tag-CnORXDJj.js +0 -1
  1145. package/build/assets/combobox-caret-BB15S7zY.js +0 -1
  1146. package/build/assets/condenser-settings-BOKNShD9.js +0 -1
  1147. package/build/assets/confirmation-modal-CofmThy4.js +0 -1
  1148. package/build/assets/context-menu-list-item-DO12IEaK.js +0 -1
  1149. package/build/assets/conversation-DIzv-jq8.js +0 -1
  1150. package/build/assets/conversation-DV3odvMe.js +0 -19
  1151. package/build/assets/conversation-local-storage-DK7yJr5N.js +0 -1
  1152. package/build/assets/conversation-panel-CgCarTAn.js +0 -1
  1153. package/build/assets/conversation-service.api-RV_bOKNz.js +0 -1
  1154. package/build/assets/conversation-state-store-4obo4ZMf.js +0 -1
  1155. package/build/assets/conversation-store-CXrL0v-X.js +0 -6
  1156. package/build/assets/conversation-tab-empty-state-CqT5ur_H.js +0 -1
  1157. package/build/assets/copy-C5tBqfWu.js +0 -1
  1158. package/build/assets/copy-to-clipboard-button-BVFYcsg_.js +0 -1
  1159. package/build/assets/createLucideIcon-D3nkdIAN.js +0 -1
  1160. package/build/assets/declaration-B0yY_dkQ.js +0 -1
  1161. package/build/assets/device-verify-DRupI_hz.js +0 -1
  1162. package/build/assets/dist-D5d5zm8o.js +0 -1
  1163. package/build/assets/dist-fV7trlfb.js +0 -1
  1164. package/build/assets/dropdown-classes-5IsMjYYw.js +0 -1
  1165. package/build/assets/edit-automation-modal-BG-gd82b.js +0 -1
  1166. package/build/assets/ellipsis-button-DWvVZO_r.js +0 -1
  1167. package/build/assets/entry.client-uhbVfCtd.js +0 -2
  1168. package/build/assets/enum-filter-dropdown-CB2fqz_e.js +0 -1
  1169. package/build/assets/environment-switch-overlay-Oeal5TVq.js +0 -1
  1170. package/build/assets/extensions-hub-DxiE0AZR.js +0 -1
  1171. package/build/assets/files-tab-1F2OlNeH.js +0 -1
  1172. package/build/assets/files-tab-store-C1q5Rbx3.js +0 -1
  1173. package/build/assets/folder-C5tr7xyN.js +0 -1
  1174. package/build/assets/get-language-from-path-E1JKsbeE.js +0 -1
  1175. package/build/assets/git-provider-icon-CKs-22Ts.js +0 -1
  1176. package/build/assets/home-B3E0le0g.js +0 -1
  1177. package/build/assets/iconBase-DMoh3FEg.js +0 -1
  1178. package/build/assets/index-redirect-DhuK5mhS.js +0 -1
  1179. package/build/assets/install-server-modal-DjintV14.js +0 -1
  1180. package/build/assets/is-backend-llm-ready-Bj44pekN.js +0 -1
  1181. package/build/assets/launch-DCU3S84p.js +0 -1
  1182. package/build/assets/lesson-plan-BUUPKVsa.js +0 -3
  1183. package/build/assets/link-external-CF4KHxx-.js +0 -1
  1184. package/build/assets/llm-client-BakM_czF.js +0 -1
  1185. package/build/assets/llm-not-configured-banner-BV-NIjfR.js +0 -27
  1186. package/build/assets/llm-settings-B5d7PHzz.js +0 -1
  1187. package/build/assets/llm-settings-C5whb-0p.js +0 -1
  1188. package/build/assets/loader-circle-DyX8DmLg.js +0 -1
  1189. package/build/assets/loading-spinner-BvOAco8a.js +0 -1
  1190. package/build/assets/manage-backends-modal-D9ClxVpM.js +0 -1
  1191. package/build/assets/manifest-38a873aa.js +0 -1
  1192. package/build/assets/mcp-7rk44GRS.js +0 -9
  1193. package/build/assets/mcp-client-DxHXYNOw.js +0 -1
  1194. package/build/assets/messages-DgBEaXil.js +0 -43
  1195. package/build/assets/modal-backdrop-DjAC2zOZ.js +0 -1
  1196. package/build/assets/modal-body-OJdIUJ68.js +0 -1
  1197. package/build/assets/modal-close-button-BNjGesHc.js +0 -1
  1198. package/build/assets/model-selector-w2uGPM5y.js +0 -1
  1199. package/build/assets/navigation-context-CUJ60pLI.js +0 -1
  1200. package/build/assets/navigation-link-BiPKTOHF.js +0 -1
  1201. package/build/assets/onboarding-Cit87z8g.js +0 -1
  1202. package/build/assets/onboarding-modal-JPrzvr8W.js +0 -1
  1203. package/build/assets/openhands-logo-uNs9g6LY.js +0 -1
  1204. package/build/assets/option-service.api-BLYUhnCF.js +0 -1
  1205. package/build/assets/organization-service.api-DpSSwlZu.js +0 -1
  1206. package/build/assets/path-utils-B4WAVqvK.js +0 -1
  1207. package/build/assets/plan-components-DSOTFW2D.js +0 -1
  1208. package/build/assets/planner-tab-LmoxgKKe.js +0 -1
  1209. package/build/assets/preload-helper-D_sPnjeL.js +0 -1
  1210. package/build/assets/profiles-client-B4SJ4ZAf.js +0 -1
  1211. package/build/assets/providers-BGUAB8kf.js +0 -1
  1212. package/build/assets/react-Dn-iWFF5.js +0 -1
  1213. package/build/assets/react-dom-BBXlXOZX.js +0 -1
  1214. package/build/assets/react-uQK8du1l.js +0 -1
  1215. package/build/assets/recommended-automations-launcher-Df9MXUpX.js +0 -50
  1216. package/build/assets/root-BShAdYGY.css +0 -1
  1217. package/build/assets/root-C99reK-P.js +0 -2
  1218. package/build/assets/root-layout-BtH64XeC.js +0 -2
  1219. package/build/assets/runtime-waiting-state-C7MjXDeW.js +0 -1
  1220. package/build/assets/schema-field-BCDuEMrl.js +0 -1
  1221. package/build/assets/sdk-section-page-XJN9mGju.js +0 -1
  1222. package/build/assets/sdk-settings-schema-B15AE1GH.js +0 -1
  1223. package/build/assets/search-rob4u9f8.js +0 -1
  1224. package/build/assets/secrets-service-CrPyCR8u.js +0 -1
  1225. package/build/assets/secrets-settings-UJn15N7E.js +0 -1
  1226. package/build/assets/settings-C5aUD_sQ.js +0 -1
  1227. package/build/assets/settings-dropdown-input-DQRt2_RA.js +0 -1
  1228. package/build/assets/settings-gear-B7bZDo_8.js +0 -1
  1229. package/build/assets/settings-index-zP_rYIW1.js +0 -1
  1230. package/build/assets/settings-input-n8FzVso3.js +0 -1
  1231. package/build/assets/settings-list-classes-DquY3fwm.js +0 -1
  1232. package/build/assets/settings-modal-szlQ6LpE.js +0 -1
  1233. package/build/assets/settings-section-header-context-DrXgyNC-.js +0 -1
  1234. package/build/assets/settings-service.api-B4G8NzCM.js +0 -1
  1235. package/build/assets/settings-switch-DsbEm3ie.js +0 -1
  1236. package/build/assets/shared-conversation-BrAvqeaI.js +0 -1
  1237. package/build/assets/sidebar-mobile-menu-toggle-BRZGCe-l.js +0 -1
  1238. package/build/assets/sidebar-nav-link-B_EygIce.js +0 -1
  1239. package/build/assets/skill-card-pill-row-Bq9Imkdh.js +0 -1
  1240. package/build/assets/skills-Wg6i0kbu.js +0 -1
  1241. package/build/assets/skills-client-DNd444Bm.js +0 -1
  1242. package/build/assets/skills-plugins-DaGkVI7-.js +0 -1
  1243. package/build/assets/skills-settings-Dlp0WFaT.js +0 -2
  1244. package/build/assets/styled-tooltip-ulgpZDga.js +0 -1
  1245. package/build/assets/suspense-BqBQEuKs.js +0 -1
  1246. package/build/assets/switch-skeleton-C49gVWOQ.js +0 -1
  1247. package/build/assets/task-list-tab-Bz-UlCm2.js +0 -1
  1248. package/build/assets/telemetry-DD3HKMgf.js +0 -2
  1249. package/build/assets/terminal-BwLvVzyJ.js +0 -1
  1250. package/build/assets/toggle-switch-CxW8-lBI.js +0 -1
  1251. package/build/assets/typography-BLf_mRKH.js +0 -1
  1252. package/build/assets/u-check-circle-CxTAJuY9.js +0 -1
  1253. package/build/assets/u-check-circle-half-Bj73jfUG.js +0 -1
  1254. package/build/assets/u-circuit-C-6V9H9C.js +0 -1
  1255. package/build/assets/u-edit-C7OnK2sa.js +0 -1
  1256. package/build/assets/use-acp-credential-form-oehc057O.js +0 -1
  1257. package/build/assets/use-active-conversation-CFXVX2on.js +0 -1
  1258. package/build/assets/use-agent-state-D6xfZA4-.js +0 -1
  1259. package/build/assets/use-backends-health-93yRIOWs.js +0 -1
  1260. package/build/assets/use-breakpoint-Xdy_aZHE.js +0 -1
  1261. package/build/assets/use-click-outside-element-CADb_gCP.js +0 -1
  1262. package/build/assets/use-cloud-current-user-id-CzOXsy04.js +0 -1
  1263. package/build/assets/use-config-oXjEWyb6.js +0 -1
  1264. package/build/assets/use-create-conversation-D-YkgrxS.js +0 -1
  1265. package/build/assets/use-create-secret-CX7Ij7W4.js +0 -1
  1266. package/build/assets/use-event-store-DMRAQQi8.js +0 -1
  1267. package/build/assets/use-handle-plan-click-CwW2Ijc2.js +0 -1
  1268. package/build/assets/use-is-authed-CNbX1KMm.js +0 -1
  1269. package/build/assets/use-launch-skill-in-chat-xI9byRUw.js +0 -1
  1270. package/build/assets/use-llm-profiles-BXRZ2rBh.js +0 -1
  1271. package/build/assets/use-runtime-is-ready-Dwzs9_vp.js +0 -1
  1272. package/build/assets/use-settings-_usWr_qn.js +0 -1
  1273. package/build/assets/use-settings-nav-items-DoB5iH-7.js +0 -16
  1274. package/build/assets/use-skills-BtorhoCN.js +0 -1
  1275. package/build/assets/use-task-list-u46BhYBC.js +0 -1
  1276. package/build/assets/use-tracking-Ca7p71hH.js +0 -1
  1277. package/build/assets/use-user-conversation-U-16WF6G.js +0 -1
  1278. package/build/assets/useMutation-CseCrRRO.js +0 -1
  1279. package/build/assets/useQuery-bowvACed.js +0 -1
  1280. package/build/assets/useTranslation-KhTtKmnv.js +0 -1
  1281. package/build/assets/utils-cRyMoFbz.js +0 -1
  1282. package/build/assets/vendor~conversation-panel~conversation~alert-banner-CjfR7T3x.js +0 -1
  1283. package/build/assets/vendor~entry.client-_zl82x5T.js +0 -1
  1284. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~dj9x5fm9-CgCGB-3J.js +0 -177
  1285. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~jfvr34cq-BJdsUTJG.js +0 -1
  1286. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~m3df9r20-BynFAJ_S.js +0 -1
  1287. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~nk00xiud-MfCRtPrK.js +0 -9
  1288. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~ghtfhmuy-BHDILMe2.js +0 -1
  1289. package/build/assets/vendor~root-layout~conversation-panel~conversation-BFZmbXpq.js +0 -1
  1290. package/build/assets/vendor~root-layout~conversation-panel~conversation~index-BPY-kNjK.js +0 -1
  1291. package/build/assets/vendor~root-layout~home~conversation-panel~conversation-BhWqQNmF.js +0 -1
  1292. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~cfyi58ut-CnnEa0dP.js +0 -1
  1293. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~clac83qc-DMX6XUwI.js +0 -2
  1294. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ldu51w4e-Cqp6k3RG.js +0 -1
  1295. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ldu51w4e-DS4GWhCz.js +0 -9
  1296. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~ji28rqgb-DVffa9Ks.js +0 -48
  1297. package/build/assets/vendor~root-layout~home~mcp~automations-list~onboarding-modal-BzR6ypP3.js +0 -1
  1298. package/build/assets/vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~hzfcl1q6-BcvHZmEZ.js +0 -2
  1299. package/build/assets/vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~hzfcl1q6-Cuvp6wqR.js +0 -14
  1300. package/build/assets/verification-settings-DKZnUHD6.js +0 -1
  1301. package/build/assets/x-DpnGZyVW.js +0 -1
  1302. package/build/assets/x-mark-x3tvCZzc.js +0 -1
  1303. package/dist/components/features/analytics/analytics-consent-form-modal.d.ts +0 -5
  1304. package/dist/components/features/chat/switch-profile-button.cjs +0 -2
  1305. package/dist/components/features/chat/switch-profile-button.cjs.map +0 -1
  1306. package/dist/components/features/chat/switch-profile-button.d.ts +0 -1
  1307. package/dist/components/features/chat/switch-profile-button.js +0 -48
  1308. package/dist/components/features/chat/switch-profile-button.js.map +0 -1
  1309. package/dist/components/features/chat/switch-profile-context-menu.cjs +0 -2
  1310. package/dist/components/features/chat/switch-profile-context-menu.cjs.map +0 -1
  1311. package/dist/components/features/chat/switch-profile-context-menu.d.ts +0 -9
  1312. package/dist/components/features/chat/switch-profile-context-menu.js +0 -106
  1313. package/dist/components/features/chat/switch-profile-context-menu.js.map +0 -1
  1314. package/dist/components/features/onboarding/is-backend-llm-ready.d.ts +0 -30
  1315. package/dist/icons/u-circuit.cjs +0 -2
  1316. package/dist/icons/u-circuit.cjs.map +0 -1
  1317. package/dist/icons/u-circuit.js +0 -19
  1318. package/dist/icons/u-circuit.js.map +0 -1
  1319. package/dist/node_modules/@openhands/extensions/integrations/catalog/clickup.cjs +0 -2
  1320. package/dist/node_modules/@openhands/extensions/integrations/catalog/clickup.cjs.map +0 -1
  1321. package/dist/node_modules/@openhands/extensions/integrations/catalog/clickup.js +0 -35
  1322. package/dist/node_modules/@openhands/extensions/integrations/catalog/clickup.js.map +0 -1
  1323. package/dist/node_modules/@openhands/extensions/integrations/catalog/dropbox.cjs +0 -2
  1324. package/dist/node_modules/@openhands/extensions/integrations/catalog/dropbox.cjs.map +0 -1
  1325. package/dist/node_modules/@openhands/extensions/integrations/catalog/dropbox.js +0 -35
  1326. package/dist/node_modules/@openhands/extensions/integrations/catalog/dropbox.js.map +0 -1
  1327. package/dist/node_modules/@openhands/extensions/integrations/catalog/freshdesk.cjs +0 -2
  1328. package/dist/node_modules/@openhands/extensions/integrations/catalog/freshdesk.cjs.map +0 -1
  1329. package/dist/node_modules/@openhands/extensions/integrations/catalog/freshdesk.js +0 -35
  1330. package/dist/node_modules/@openhands/extensions/integrations/catalog/freshdesk.js.map +0 -1
  1331. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs +0 -2
  1332. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +0 -1
  1333. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +0 -35
  1334. package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +0 -1
  1335. package/dist/node_modules/@openhands/extensions/integrations/catalog/mailchimp.cjs +0 -2
  1336. package/dist/node_modules/@openhands/extensions/integrations/catalog/mailchimp.cjs.map +0 -1
  1337. package/dist/node_modules/@openhands/extensions/integrations/catalog/mailchimp.js +0 -35
  1338. package/dist/node_modules/@openhands/extensions/integrations/catalog/mailchimp.js.map +0 -1
  1339. package/dist/node_modules/@openhands/extensions/integrations/catalog/pipedrive.cjs +0 -2
  1340. package/dist/node_modules/@openhands/extensions/integrations/catalog/pipedrive.cjs.map +0 -1
  1341. package/dist/node_modules/@openhands/extensions/integrations/catalog/pipedrive.js +0 -35
  1342. package/dist/node_modules/@openhands/extensions/integrations/catalog/pipedrive.js.map +0 -1
  1343. package/dist/node_modules/@openhands/extensions/integrations/catalog/plaid.cjs +0 -2
  1344. package/dist/node_modules/@openhands/extensions/integrations/catalog/plaid.cjs.map +0 -1
  1345. package/dist/node_modules/@openhands/extensions/integrations/catalog/plaid.js +0 -28
  1346. package/dist/node_modules/@openhands/extensions/integrations/catalog/plaid.js.map +0 -1
  1347. package/dist/node_modules/@openhands/extensions/integrations/catalog/servicenow.cjs +0 -2
  1348. package/dist/node_modules/@openhands/extensions/integrations/catalog/servicenow.cjs.map +0 -1
  1349. package/dist/node_modules/@openhands/extensions/integrations/catalog/servicenow.js +0 -35
  1350. package/dist/node_modules/@openhands/extensions/integrations/catalog/servicenow.js.map +0 -1
  1351. package/dist/node_modules/@openhands/extensions/integrations/catalog/shopify.cjs +0 -2
  1352. package/dist/node_modules/@openhands/extensions/integrations/catalog/shopify.cjs.map +0 -1
  1353. package/dist/node_modules/@openhands/extensions/integrations/catalog/shopify.js +0 -35
  1354. package/dist/node_modules/@openhands/extensions/integrations/catalog/shopify.js.map +0 -1
  1355. package/dist/node_modules/@openhands/extensions/integrations/catalog/zendesk.cjs +0 -2
  1356. package/dist/node_modules/@openhands/extensions/integrations/catalog/zendesk.cjs.map +0 -1
  1357. package/dist/node_modules/@openhands/extensions/integrations/catalog/zendesk.js +0 -35
  1358. package/dist/node_modules/@openhands/extensions/integrations/catalog/zendesk.js.map +0 -1
  1359. /package/build/assets/{agent-server-ui-style-scope-CIDFDeQb.js → agent-server-ui-style-scope-COnDHTm5.js} +0 -0
  1360. /package/build/assets/{automation-DNgDxqtq.js → automation-BU8zu-FP.js} +0 -0
  1361. /package/build/assets/{common-KeiA2Rod.js → common-Dh7OqABE.js} +0 -0
  1362. /package/build/assets/{environment-switch-store-BpKxp6Xq.js → environment-switch-store-DkjlKWzN.js} +0 -0
  1363. /package/build/assets/{extension-module-card-classes-DvvyImGv.js → extension-module-card-classes-9V3J9J_b.js} +0 -0
  1364. /package/build/assets/{git-status-mapper-B3_HbzUT.js → git-status-mapper-BI8FyUVp.js} +0 -0
  1365. /package/build/assets/{handle-capture-consent-BChvj6mt.js → handle-capture-consent-CPMXU29K.js} +0 -0
  1366. /package/build/assets/{llm-subscription-C1xDoa3K.js → llm-subscription-DtsX5Lhg.js} +0 -0
  1367. /package/build/assets/{map-provider-MonJL5SS.js → map-provider-BM2SJarp.js} +0 -0
  1368. /package/build/assets/{objectWithoutPropertiesLoose-BRYudkUn.js → objectWithoutPropertiesLoose-BgYIAs2y.js} +0 -0
  1369. /package/build/assets/{rolldown-runtime-wFmyQBCi.js → rolldown-runtime-BFRubm34.js} +0 -0
  1370. /package/build/assets/{settings-like-page-layout-classes-DNg2vKSM.js → settings-like-page-layout-classes-DENKlZpD.js} +0 -0
  1371. /package/build/assets/{v4-BMWDcIWQ.js → v4-DbCkTSoU.js} +0 -0
  1372. /package/build/assets/{vendor~browser-yZEspfT9.js → vendor~browser-Dqd33JyP.js} +0 -0
  1373. /package/build/assets/{vendor~terminal-CcUoOdAH.js → vendor~terminal-aeP3PnKf.js} +0 -0
@@ -0,0 +1,27 @@
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n,xt as r}from"./vendor-styling-CI0PQ3ab.js";import{n as i}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~i3v2mlbw-BrJQ3XZH.js";import{a,c as o,h as s,m as c,r as l,s as u}from"./path-utils-CBaRYg35.js";import{t as d}from"./useMutation-DCE9RcgK.js";import{t as f}from"./useQuery-CpjHYtZc.js";import{t as p}from"./useMutationState-BUab8Kxr.js";import{t as m}from"./useTranslation-Cgy4JA_g.js";import{t as h}from"./declaration-B9kpCaYl.js";import{A as g,H as _,N as v,W as y,f as b,j as x,n as S,o as C,s as w,z as T}from"./active-backend-context-DRFevVIj.js";import{n as E,t as D}from"./chat-send-button-DxuZIoW8.js";import{t as O}from"./check-Bvi71siz.js";import{t as k}from"./chevron-down-CI8A6tet.js";import{i as A,n as j,r as M,t as N}from"./vendor~home~conversation-panel~conversation-CYMF9JYB.js";import{n as P,t as F}from"./vendor~root-layout~home~conversation-panel~conversation-Cn2jwSga.js";import{t as I}from"./loader-circle-BEykUKYG.js";import{n as ee,t as te}from"./refresh-cw-DM82EIyx.js";import{C as L,D as ne,N as R,O as re,a as ie,b as ae,c as z,f as B,g as V,h as H,j as oe,l as se,m as ce,n as le,o as ue,p as de,r as fe,s as pe,t as U,v as me}from"./utils-CE0lDWtb.js";import{w as he}from"./agent-server-client-options-DVLRd9sw.js";import{t as ge}from"./modal-backdrop-zVwfOJZr.js";import{n as _e}from"./modal-body-Dcu5McCa.js";import{r as ve}from"./base-modal-CC5Pp8CF.js";import{_ as ye,n as be,s as xe,t as Se}from"./form-control-classes-9rkU4usZ.js";import{t as Ce}from"./brand-button-DKPMEKcW.js";import{t as we}from"./use-config-Dwf5gla-.js";import{n as Te}from"./navigation-context-DPs2G0X8.js";import{t as Ee}from"./navigation-link-D8hfwvxI.js";import{t as De}from"./styled-tooltip-DsKsFjuq.js";import{c as Oe,i as ke,r as Ae,u as je}from"./dropdown-classes-CgQ45JmQ.js";import{n as Me,r as Ne,t as Pe}from"./combobox-caret-CLGvOs32.js";import{t as Fe}from"./dist-CodhvuAP.js";import{_ as Ie,a as Le,c as Re,f as ze,g as Be,h as Ve,i as He,l as Ue,m as We,n as Ge,o as Ke,p as qe,r as Je,s as Ye,t as Xe,u as Ze}from"./git-provider-icon-CGU7_KiU.js";import{t as Qe}from"./react-DPDgL6du.js";import{a as $e,n as et,r as tt,s as nt}from"./conversation-local-storage-F6zVMM--.js";import{t as W}from"./conversation-store-LptbOvKa.js";import{t as rt}from"./modal-close-button-CTCX4nCH.js";import{t as it}from"./settings-service.api-DldkFI1x.js";import{r as at}from"./use-settings-B07msZ2Z.js";import{a as ot,o as st,t as ct}from"./agent-server-conversation-service.api-DfH2k6Sx.js";import{t as lt}from"./profiles-service.api-CeYEmSM3.js";import{f as ut,o as dt,s as ft,u as pt}from"./acp-providers-D_D8VUpP.js";import{f as mt}from"./llm-subscription-DtsX5Lhg.js";import{t as ht}from"./use-click-outside-element-Bf4Omzot.js";import{t as gt}from"./use-llm-profiles-BcLibtGb.js";import{t as _t}from"./use-agent-profiles-DnH16_Vm.js";import{a as vt,i as yt,n as bt,r as xt}from"./use-create-conversation-CvAXfA3T.js";import{n as St,r as Ct}from"./conversation-service.api-Ch9kR9aE.js";import{n as G,t as K}from"./context-menu-list-item-DBFzplWW.js";import{n as wt}from"./ellipsis-button-1BV9Sga8.js";import{t as Tt}from"./skills-9cDZONKh.js";import{c as Et}from"./vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CZM4hwUT.js";import{t as Dt}from"./checkmark-h7udgXMM.js";import{n as Ot,r as q}from"./typography-YGPBGzOG.js";import{n as kt,t as At}from"./use-activate-agent-profile-DY0txItX.js";import{n as jt,r as J,t as Y}from"./use-active-conversation-DvcFBqFe.js";import{t as Mt}from"./use-skills-Aoaoq_ei.js";import{n as Nt}from"./files-tab-store-DJsPxYdg.js";import{t as Pt}from"./use-agent-state-BvRcEzY4.js";import{f as Ft,i as It,m as Lt,o as Rt,r as zt,t as Bt,u as Vt}from"./lesson-plan-HD886V64.js";import{D as Ht,t as Ut}from"./use-event-store-YSOxy9FC.js";import{t as Wt}from"./code-tag-DYlAhEQY.js";import{t as Gt}from"./use-handle-plan-click-cAXS-Hft.js";import{n as Kt,t as qt}from"./use-active-agent-profile-Cp5AFONR.js";import{t as Jt}from"./settings-gear-MXCyZW0x.js";import{t as Yt}from"./markdown-renderer-D8mayGjI.js";import{t as Xt}from"./runtime-waiting-state-DkzLgvMn.js";import{r as Zt}from"./settings-utils-BMdG65By.js";import{t as Qt}from"./link-external-DfKQroKX.js";var X=e(t(),1),$t={"image/png":`png`,"image/jpeg":`jpg`,"image/jpg":`jpg`,"image/gif":`gif`,"image/webp":`webp`,"image/bmp":`bmp`};function en(e){if(e.name.trim())return e;let t=$t[e.type]??(e.type.startsWith(`image/`)?`png`:`bin`);return new File([e],`pasted-image-${Date.now()}.${t}`,{type:e.type,lastModified:e.lastModified})}function tn(e,t){let n=new Set(t),r=[],i=[];for(let t of e)n.has(t.name)?i.push(t):r.push(t);return{imagesToEmbed:r,imagesAsFiles:i}}function nn(e){let t=Array.from(e.files);if(t.length>0)return t.map(en);let n=[];for(let t=0;t<e.items.length;t+=1){let r=e.items[t];if(r.kind!==`file`)continue;let i=r.getAsFile();i&&n.push(en(i))}return n}var rn=e=>e?(e.innerText||e.textContent||``).trim()===``:!0,an=e=>{e&&rn(e)&&(e.innerHTML=``,e.textContent=``)},Z=e=>e?.innerText||``,on=e=>{e&&(e.textContent=``)},sn=e=>{e&&(e.value=``)},cn=e=>{if(!e)return;let t=window.getSelection();if(!t||t.rangeCount===0)return;let n=t.getRangeAt(0);if(!n.getBoundingClientRect||!e.getBoundingClientRect)return;let r=n.getBoundingClientRect(),i=e.getBoundingClientRect();r.bottom>i.bottom&&(e.scrollTop=e.scrollHeight-e.clientHeight)},ln=e=>{if(!e)return;e.focus();let t=window.getSelection();if(!t)return;let n=document.createRange();n.selectNodeContents(e),n.collapse(!1),t.removeAllRanges(),t.addRange(n),cn(e)},un=e=>e.startsWith(`task-`),dn=500,fn=`oh:home-prompt-draft`,pn=(e,t)=>{let{state:n,setDraftMessage:r}=nt(e??``),i=(0,X.useRef)(null),a=(0,X.useRef)(!1),[o,s]=(0,X.useState)(!1),c=(0,X.useRef)(e),l=(0,X.useRef)(!0),u=(0,X.useRef)(``);(0,X.useEffect)(()=>{if(!e)return;let n=c.current,r=l.current;c.current=e,l.current=!1,i.current&&=(clearTimeout(i.current),null);let o=t.current;if(!r&&n&&n!==e){let t=un(n),r=!un(e);if(t&&r&&o){let t=Z(o).trim();if(t){$e(e,{draftMessage:t}),a.current=!0,s(!0);return}}}o&&(o.textContent=``),a.current=!1,s(!1)},[e,t]),(0,X.useEffect)(()=>{if(a.current)return;let n=t.current;if(!n)return;if(!e){try{let e=sessionStorage.getItem(fn);if(e&&Z(n).trim()===``){n.textContent=e;let t=window.getSelection(),r=document.createRange();r.selectNodeContents(n),r.collapse(!1),t?.removeAllRanges(),t?.addRange(r),u.current=e}}catch{}a.current=!0,s(!0);return}let{draftMessage:r}=tt(e);r&&Z(n).trim()===``&&(n.textContent=r,ln(n)),a.current=!0,s(!0)},[t,e]);let d=(0,X.useCallback)(()=>{if(i.current&&clearTimeout(i.current),!e){let e=t.current;if(e){let t=Z(e).trim();u.current=t;try{t?sessionStorage.setItem(fn,t):sessionStorage.removeItem(fn)}catch{}}return}let a=e;i.current=setTimeout(()=>{if(a!==c.current)return;let e=t.current;if(!e)return;let i=Z(e).trim();i!==(n.draftMessage||``)&&r(i||null)},dn)},[t,n.draftMessage,r,e]),f=(0,X.useCallback)(()=>{if(i.current&&=(clearTimeout(i.current),null),!e){try{sessionStorage.removeItem(fn)}catch{}return}r(null)},[e,r]);return(0,X.useEffect)(()=>()=>{if(i.current&&clearTimeout(i.current),!c.current){let e=u.current;try{e?sessionStorage.getItem(`oh:home-prompt-draft`)!==null&&sessionStorage.setItem(fn,e):sessionStorage.removeItem(fn)}catch{}}},[]),{saveDraft:d,clearDraft:f,isRestored:o,hasDraft:!!n.draftMessage}},mn=()=>{let e=(0,X.useRef)(null),{conversationId:t}=J(),{messageToSend:n,messageRestoreIfEmpty:r,hasRightPanelToggled:i,setMessageToSend:a,clearMessageRestoreIfEmpty:o,setIsRightPanelShown:s}=W(),{saveDraft:c,clearDraft:l}=pn(t,e),u=t?n:null;return(0,X.useEffect)(()=>{!t||!r||(Z(e.current).trim().length===0&&a(r.text),o())},[t,r,a,o]),(0,X.useEffect)(()=>{t&&e.current&&(a(Z(e.current)),s(i))},[t,i,a,s]),{chatInputRef:e,messageToSend:u,checkIsContentEmpty:(0,X.useCallback)(()=>rn(e.current),[]),clearEmptyContentHandler:(0,X.useCallback)(()=>{an(e.current)},[]),getCurrentMessage:(0,X.useCallback)(()=>Z(e.current),[]),saveDraft:c,clearDraft:l}},hn=e=>{let t=(0,X.useRef)(null),n=(0,X.useRef)(null),[r,i]=(0,X.useState)(!1),a=(0,X.useCallback)((t,n)=>{e&&t.length>0&&e(t,n)},[e]);return(0,X.useEffect)(()=>{let e=e=>{let t=e.detail.files;t&&t.length>0&&a(t,{fromPaste:!0})};return document.addEventListener(`pasteFiles`,e),()=>{document.removeEventListener(`pasteFiles`,e)}},[a]),{fileInputRef:t,chatContainerRef:n,isDragOver:r,handleFileIconClick:(0,X.useCallback)(e=>{!e&&t.current&&t.current.click()},[]),handleFileInputChange:(0,X.useCallback)(e=>{a(Array.from(e.target.files||[]))},[a]),handleDragOver:(0,X.useCallback)((e,t)=>{t||(e.preventDefault(),i(!0))},[]),handleDragLeave:(0,X.useCallback)((e,t)=>{t||n.current?.contains(e.relatedTarget)||(e.preventDefault(),i(!1))},[]),handleDrop:(0,X.useCallback)((e,t)=>{t||(e.preventDefault(),i(!1),a(Array.from(e.dataTransfer.files)))},[a])}},gn=2,_n=({elementRef:e,minHeight:t,maxHeight:n,onGripDragStart:r,onGripDragEnd:i,onHeightChange:a,onReachedMinHeight:o})=>{let s=e=>`touches`in e&&e.touches.length>0?e.touches[0].clientY:e.clientY,c=(e,t)=>{let n=document.getElementById(`resize-grip`);n&&(n.addEventListener(`touchmove`,e,{passive:!1,capture:!0}),n.addEventListener(`touchend`,t,{capture:!0}))},l=(e,t)=>{document.addEventListener(`mousemove`,e),document.addEventListener(`mouseup`,t)},u=u=>{let d=de(),f=e.current?.offsetHeight||t,p=!1,m=i=>{if(i.preventDefault(),!p){let e=s(i);if(Math.abs(e-u)<gn)return;p=!0,r?.()}let c=s(i)-u,l=Math.max(t,Math.min(n,f-c)),d=e.current;if(!d)return;d.style.height=`${l}px`;let m=d.scrollHeight>l||l>=n;d.style.overflowY=m?`auto`:`hidden`,a&&a(l),o&&Math.abs(l-t)<=1.5&&o()},h=()=>{if(p&&i?.(),d){let e=document.getElementById(`resize-grip`);if(!e)return;e.removeEventListener(`mousemove`,m),e.removeEventListener(`mouseup`,h),e.removeEventListener(`touchmove`,m),e.removeEventListener(`touchend`,h)}else document.removeEventListener(`mousemove`,m),document.removeEventListener(`mouseup`,h),document.removeEventListener(`touchmove`,m),document.removeEventListener(`touchend`,h)};d?c(m,h):l(m,h)};return{handleGripMouseDown:e=>{e.preventDefault(),u(e.clientY)},handleGripTouchStart:e=>{e.preventDefault(),u(e.touches[0].clientY)}}},vn=20,yn=120,bn=20,xn=50,Sn=()=>({hasUserResizedRef:(0,X.useRef)(!1),manualHeightRef:(0,X.useRef)(null)}),Cn=(e,t,n)=>{let{minHeight:r,maxHeight:i}=n,a=Math.max(r,Math.min(t,i));return e.style.setProperty(`height`,`${a}px`),e.style.setProperty(`overflow-y`,a>=i?`auto`:`hidden`),a},wn=(e,t,n=xn)=>e>t+n,Tn=(e,t)=>{let n=B(e,t),r=n;e.style.setProperty(`height`,`auto`);let i=e.scrollHeight;return V(e,n),{currentHeight:r,currentStyleHeight:n,contentHeight:i}},En=(e,t)=>{let{finalHeight:n,overflowY:r}=t,i=e;i.style.height=`${n}px`,i.style.overflowY=r},Dn=(e,t)=>{t&&t(e)},On=(e,t={})=>{let n=(0,X.useRef)(null),{minHeight:r=vn,maxHeight:i=yn,enableManualResize:a=!1,value:o,onValueApplied:s,onGripDragStart:c,onGripDragEnd:l,onHeightChange:u}=t,d={minHeight:r,maxHeight:i},{hasUserResizedRef:f,manualHeightRef:p}=Sn(),m=()=>{f.current=!1,p.current=null},h=(0,X.useCallback)(e=>{u?.(e),f.current&&(p.current=e)},[u]),g=(0,X.useCallback)(()=>{f.current=!0,c?.()},[c]),_=(0,X.useCallback)(()=>{let t=e.current;if(t){let e=B(t,r);Math.abs(e-r)<=1.5&&(f.current=!1,p.current=null)}l?.()},[r,l]),{handleGripMouseDown:v,handleGripTouchStart:y}=_n({elementRef:e,minHeight:r,maxHeight:i,onGripDragStart:a?g:void 0,onGripDragEnd:a?_:void 0,onHeightChange:h}),b=(0,X.useCallback)((e,t,n)=>{if(f.current&&t>r){En(e,{finalHeight:t,overflowY:`hidden`}),Dn(t,u);return}let i=Math.max(n,r);En(e,{finalHeight:i,overflowY:`hidden`}),Dn(i,u)},[r,u]),x=(0,X.useCallback)((e,t,n)=>{if(!wn(t,n)){let t=Math.max(n,r);En(e,{finalHeight:t,overflowY:`hidden`}),Dn(t,u);return}En(e,{finalHeight:t,overflowY:`auto`}),Dn(t,u)},[r,u]),S=(0,X.useCallback)(e=>{En(e,{finalHeight:i,overflowY:`auto`}),Dn(i,u)},[i,u]),C=(0,X.useCallback)(()=>{let t=e.current;if(!t)return;if((t.textContent??``).trim().length===0&&f.current&&p.current&&p.current>r+1.5){V(t,p.current),t.style.overflowY=`hidden`,Dn(p.current,u);return}let{currentHeight:n,contentHeight:a}=Tn(t,r);if(a<=n){b(t,n,a);return}if(a<=i){x(t,n,a);return}S(t)},[e,r,i,u,b,x,S]),w=(0,X.useCallback)(()=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{n.current=null,C()})},[C]);return(0,X.useEffect)(()=>{if(o===void 0)return;let t=0,n=()=>{let t=e.current;return t?(t.textContent=o.text,w(),ln(t),s?.(),!0):!1};return n()||(t=requestAnimationFrame(()=>{n()})),()=>{t&&cancelAnimationFrame(t)}},[o,w,s]),(0,X.useEffect)(()=>{w()},[w]),{smartResize:w,handleGripMouseDown:v,handleGripTouchStart:y,increaseHeightForEmptyContent:()=>{let t=e.current;if(!t)return;let n=B(t,r),a=Math.min(n+bn,i);if(a>n){let e=Cn(t,a,d);Dn(e,u),f.current=!0,p.current=e}},resetManualResize:m}},kn=(e,t)=>{let[n,r]=(0,X.useState)(!1),[i,a]=(0,X.useState)(!1),{setShouldHideSuggestions:o,clearMessageToSend:s}=W(),c=(0,X.useRef)(null),l=(0,X.useRef)(!1),u=(0,X.useCallback)(()=>{a(!0)},[]),d=(0,X.useCallback)(()=>{a(!1),l.current=!0},[]),f=(0,X.useCallback)(e=>{if(l.current){l.current=!1,e.preventDefault(),e.stopPropagation();return}e.stopPropagation(),r(e=>!e)},[]),{smartResize:p,handleGripMouseDown:m,handleGripTouchStart:h,increaseHeightForEmptyContent:g,resetManualResize:_}=On(e,{minHeight:20,maxHeight:400,onHeightChange:(0,X.useCallback)(e=>{o(e>re.HEIGHT_THRESHOLD)},[o]),onGripDragStart:u,onGripDragEnd:d,value:t??void 0,onValueApplied:s,enableManualResize:!0});return{gripRef:c,isGripVisible:n,isGripDragging:i,handleTopEdgeClick:f,smartResize:p,handleGripMouseDown:m,handleGripTouchStart:h,increaseHeightForEmptyContent:g,resetManualResize:_}},An=(e,t,n,r,i,a,o)=>({handleInput:(0,X.useCallback)(()=>{t(),e.current&&an(e.current),cn(e.current)},[t,e]),handlePaste:(0,X.useCallback)(e=>{e.preventDefault();let n=nn(e.clipboardData);if(n.length>0){let e=new CustomEvent(`pasteFiles`,{detail:{files:n}});document.dispatchEvent(e);return}let r=e.clipboardData.getData(`text/plain`);r&&(document.execCommand(`insertText`,!1,r),setTimeout(t,0))},[t]),handleKeyDown:(0,X.useCallback)((e,t,i)=>{if(e.key===`Enter`&&!e.nativeEvent.isComposing){if(r()){e.preventDefault(),n();return}!ce()&&!e.shiftKey&&!t&&(e.preventDefault(),i())}},[r,n]),handleBlur:(0,X.useCallback)(()=>{e.current&&an(e.current),o&&o()},[e,o]),handleFocus:(0,X.useCallback)(()=>{a&&a()},[a])}),jn=(e,t,n,r,i)=>({handleSubmit:(0,X.useCallback)(()=>{let a=e.current?.innerText||``,o=a.trim(),{images:s,files:c}=W.getState(),l=s.length>0||c.length>0;!o&&!l||(r(a),on(e.current),sn(t.current),n(),i?.())},[e,t,n,r,i]),handleStop:(0,X.useCallback)(e=>{e&&e()},[])}),Mn=()=>Mt(Y().data?.selected_workspace??void 0);function Nn(e){let t=window.getSelection();if(!t||t.rangeCount===0)return-1;let n=t.getRangeAt(0),r=n.cloneRange();return r.selectNodeContents(e),r.setEnd(n.startContainer,n.startOffset),r.toString().length}var Pn=e=>{let{data:t,isLoading:n}=Mn(),r=S().backend.kind===`cloud`,{data:i,isLoading:a}=gt(),[o,s]=(0,X.useState)(!1),[c,l]=(0,X.useState)(``),[u,d]=(0,X.useState)(`command`),[f,p]=(0,X.useState)(0),m=(0,X.useMemo)(()=>{let e=ne.filter(e=>e.command===`/new`?r:!0);return n||!t||t.forEach(t=>{let n=(t.triggers||[]).filter(e=>e.startsWith(`/`));n.length>0?n.forEach(n=>{e.push({skill:t,command:n})}):t.type===`agentskills`&&e.push({skill:t,command:`/${t.name}`})}),e},[t,n,r]),h=(0,X.useMemo)(()=>(i?.profiles??[]).map(e=>{let t=`${R} ${e.name}`;return{command:t,skill:{name:e.name,type:`agentskills`,content:e.model?`Switch to ${e.model}`:`Switch to this LLM profile`,triggers:[t]}}}),[i?.profiles]),g=(0,X.useMemo)(()=>{let e=u===`model-profile`?h:m;if(!c)return e;let t=c.toLowerCase();return e.filter(e=>e.command.toLowerCase().includes(t)||e.skill.name.toLowerCase().includes(t)||e.skill.content?.toLowerCase().includes(t))},[u,h,m,c]),_=(0,X.useRef)(o);_.current=o;let v=(0,X.useRef)(g);v.current=g;let y=(0,X.useRef)(f);y.current=f,(0,X.useEffect)(()=>{p(0)},[c]);let b=(0,X.useRef)(null),x=(0,X.useCallback)(()=>{let t=e.current;if(!t)return null;let n=(t.innerText||``).replace(/[\n\r]+$/,``),r=Nn(t);if(r<0)return null;let i=n.slice(0,r),a=i.match(/(^|\s)(\/model(?:\s+\S*)?)$/);if(a){let e=a[2],t=i.length-e.length,o=n.slice(r).match(/^\S*/),s=r+(o?o[0].length:0);return{kind:`model-profile`,text:e.replace(/^\/model(?:\s+)?/,``),start:t,end:s}}let o=i.match(/(^|\s)(\/\S*)$/);if(!o)return null;let s=o[2],c=i.length-s.length,l=n.slice(r).match(/^\S*/),u=r+(l?l[0].length:0);return{kind:`command`,text:s.slice(1),start:c,end:u}},[e]),C=(0,X.useCallback)(()=>{let e=x(),t=e?.kind===`model-profile`?h.length>0||a:m.length>0;e!==null&&t?(d(e.kind),l(e.text),b.current={start:e.start,end:e.end},s(!0)):(s(!1),l(``),d(`command`),b.current=null)},[x,a,h.length,m.length]),w=(0,X.useCallback)(t=>{let n=e.current;if(!n)return;let r=b.current,i=(n.innerText||``).replace(/[\n\r]+$/,``),a=`${t.command} `;if(r){n.textContent=i.slice(0,r.start)+a+i.slice(r.end);let e=r.start+a.length,t=n.firstChild;if(t){let n=document.createRange(),r=window.getSelection(),i=Math.min(e,t.textContent.length);n.setStart(t,i),n.collapse(!0),r?.removeAllRanges(),r?.addRange(n)}}else{n.textContent=a;let e=document.createRange(),t=window.getSelection();e.selectNodeContents(n),e.collapse(!1),t?.removeAllRanges(),t?.addRange(e)}s(!1),l(``),d(`command`),p(0),b.current=null,n.dispatchEvent(new InputEvent(`input`,{bubbles:!0})),n.focus()},[e]);return{isMenuOpen:o,filteredItems:g,selectedIndex:f,updateSlashMenu:C,selectItem:w,handleSlashKeyDown:(0,X.useCallback)(e=>{let t=v.current;if(!_.current||t.length===0)return!1;switch(e.key){case`ArrowDown`:return e.preventDefault(),p(e=>e<t.length-1?e+1:0),!0;case`ArrowUp`:return e.preventDefault(),p(e=>e>0?e-1:t.length-1),!0;case`Enter`:case`Tab`:{let n=t[y.current];return n?(e.preventDefault(),w(n),!0):!1}case`Escape`:return e.preventDefault(),s(!1),!0;case`ArrowLeft`:case`ArrowRight`:case`Home`:case`End`:return s(!1),!1;default:return!1}},[w]),closeMenu:(0,X.useCallback)(()=>s(!1),[])}},Q=n();function Fn({gripRef:e,isGripVisible:t,isGripDragging:n,handleTopEdgeClick:r,handleGripMouseDown:i,handleGripTouchStart:a}){return(0,Q.jsxs)(`div`,{className:`absolute top-0 left-0 w-full h-3 z-20 group`,id:`resize-grip`,onClick:r,children:[(0,Q.jsx)(`div`,{className:`absolute inset-0 z-[1] cursor-ns-resize select-none`,onMouseDown:i,onTouchStart:a,"aria-hidden":!0}),(0,Q.jsx)(`div`,{ref:e,className:U(`pointer-events-none absolute top-0 left-0 w-full h-px bg-white z-[2] transition-opacity duration-200`,t||n?`opacity-100`:`opacity-0 group-hover:opacity-100`)})]})}var In=e=>(0,Q.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,Q.jsx)(`path`,{d:`M15.5 10C16.3284 10 17 9.32843 17 8.5C17 7.67157 16.3284 7 15.5 7C14.6716 7 14 7.67157 14 8.5C14 9.32843 14.6716 10 15.5 10Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M3 5C3 3.89543 3.89543 3 5 3H19C20.1046 3 21 3.89543 21 5V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5ZM19 5H5V12.9194L8.37534 10.2191C8.74056 9.92696 9.25951 9.92696 9.62473 10.2191L13.9258 13.66L15.2929 12.2929C15.6835 11.9024 16.3166 11.9024 16.7071 12.2929L19 14.5857V5ZM5 19H19V17.4142L16 14.4142L14.7071 15.7071C14.3468 16.0674 13.7732 16.0992 13.3753 15.7809L9.00004 12.2806L5 15.4807V19Z`,fill:`currentColor`})]}),Ln=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:17,height:17,viewBox:`0 0 17 17`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{d:`M14.2541 0.99075C15.0629 0.811957 15.8642 1.32275 16.0432 2.13138C16.222 2.94015 15.7113 3.74145 14.9026 3.92044C10.5163 4.8902 8.31751 8.22203 8.09593 11.8745L10.343 9.62942C10.863 9.10947 11.7057 9.10867 12.2258 9.62845C12.7459 10.1486 12.7459 10.9921 12.2258 11.5122L7.52073 16.2173C7.03316 16.7049 6.26163 16.7357 5.73851 16.3091L5.63694 16.2173L0.93089 11.5122C0.411068 10.9922 0.411047 10.1485 0.93089 9.62845C1.45095 9.10851 2.29457 9.10859 2.81468 9.62845L5.09691 11.9107C5.32362 7.06867 8.20704 2.32786 14.2541 0.99075Z`,fill:`currentColor`})});function Rn(){let{t:e}=m(`openhands`);return(0,Q.jsx)(`div`,{className:`drag-over`,children:(0,Q.jsxs)(`div`,{className:`drag-over-content-wrapper`,children:[(0,Q.jsxs)(`div`,{className:`relative`,children:[(0,Q.jsx)(In,{width:36,height:36,className:`rotate-[-27deg] absolute top-[-40px] left-[-10px]`}),(0,Q.jsx)(Ln,{width:16,height:16,className:`absolute top-[-16px] left-[-20px]`})]}),(0,Q.jsx)(`div`,{className:`drag-over-content`,children:(0,Q.jsx)(`p`,{children:e(h.COMMON$DROP_YOUR_FILES_HERE)})})]})})}function zn({onClick:e}){return(0,Q.jsx)(`button`,{type:`button`,onClick:e,className:U(`z-10 flex w-4 h-4 rounded-full items-center justify-center bg-[var(--oh-surface)] hover:bg-[var(--oh-muted)] cursor-pointer absolute top-1 right-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200`,de()&&`opacity-100`),children:(0,Q.jsx)(ze,{width:10,height:10,color:`#ffffff`})})}function Bn({file:e,onRemove:t,isLoading:n=!1}){let r=pe(e.name);return(0,Q.jsxs)(`div`,{className:`group flex gap-2 rounded-lg bg-[var(--oh-interactive-hover)] max-w-[160px] px-3 py-1 relative`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col justify-center gap-0.25`,children:[(0,Q.jsx)(zn,{onClick:t}),(0,Q.jsx)(`div`,{className:`flex items-center gap-2 w-full`,children:(0,Q.jsx)(`span`,{className:U(`text-sm font-normal leading-5 flex-1 max-w-[136px] truncate`,n?`max-w-[108px] text-[var(--oh-muted)]`:`text-white`),children:e.name})}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(Nt,{width:12,height:12,color:`var(--oh-muted)`}),(0,Q.jsx)(`span`,{className:`text-[9px] font-normal leading-5 text-[var(--oh-muted)]`,children:r})]})]}),n&&(0,Q.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,Q.jsx)(I,{className:`animate-spin w-5 h-5`,color:`white`})})]})}function Vn({active:e,onToggle:t}){let{t:n}=m(`openhands`),r=n(h.CHAT_INTERFACE$UPLOAD_IMAGES_AS_FILES),i=n(h.CHAT_INTERFACE$DO_NOT_UPLOAD_AS_FILE),a=e?i:r;return(0,Q.jsx)(`div`,{className:`absolute bottom-2 left-1 z-10 h-4 w-4`,children:(0,Q.jsx)(De,{content:a,placement:`bottom`,offset:10,shouldFlip:!1,tooltipClassName:`bg-white text-black text-xs font-medium leading-5`,children:(0,Q.jsx)(`button`,{type:`button`,"aria-label":a,"aria-pressed":e,onClick:e=>{e.stopPropagation(),t()},className:U(`flex h-4 w-4 items-center justify-center rounded-full bg-[var(--oh-surface)] text-[var(--oh-foreground)] transition-colors cursor-pointer hover:bg-[var(--oh-muted)]`),children:e?(0,Q.jsx)(O,{width:10,height:10,strokeWidth:2.5,"aria-hidden":!0}):(0,Q.jsx)(M,{width:10,height:10,strokeWidth:2.5,"aria-hidden":!0})})})})}function Hn({image:e,onRemove:t,isLoading:n=!1,showUploadAsFileToggle:r=!1,uploadAsFileActive:i=!1,onToggleUploadAsFile:a}){let[o,s]=X.useState(``);return X.useEffect(()=>{let t=URL.createObjectURL(e);return s(t),()=>{URL.revokeObjectURL(t)}},[e]),(0,Q.jsxs)(`div`,{className:`group relative flex h-[49px] w-[51px] min-h-[49px] min-w-[51px] items-center justify-center rounded-lg bg-[var(--oh-interactive-hover)]`,children:[n?(0,Q.jsx)(I,{className:`animate-spin w-5 h-5`,color:`white`}):o&&(0,Q.jsx)(`img`,{src:o,alt:e.name,className:`h-full w-full rounded-lg object-cover`}),(0,Q.jsx)(zn,{onClick:t}),r&&a&&(0,Q.jsx)(Vn,{active:i,onToggle:a})]})}function Un(){let{images:e,files:t,loadingFiles:n,loadingImages:r,imagesMarkedUploadAsFile:i,removeFile:a,removeImage:o,toggleImageUploadAsFile:s}=W(),c=e=>{a(e)},l=e=>{o(e)};return e.length===0&&t.length===0&&n.length===0&&r.length===0?null:(0,Q.jsx)(`div`,{className:`flex w-full flex-col gap-2 pb-4`,children:(0,Q.jsxs)(`div`,{className:`flex w-full items-center gap-4 overflow-x-auto custom-scrollbar`,children:[t.map((e,t)=>(0,Q.jsx)(Bn,{file:e,onRemove:()=>c(t),isLoading:n.includes(e.name)},`file-${t}-${e.name}`)),n.map((e,t)=>(0,Q.jsx)(Bn,{file:new File([],e),onRemove:()=>{},isLoading:!0},`loading-file-${t}-${e}`)),e.map((e,t)=>(0,Q.jsx)(Hn,{image:e,onRemove:()=>l(t),isLoading:r.includes(e.name),showUploadAsFileToggle:!0,uploadAsFileActive:i.includes(e.name),onToggleUploadAsFile:()=>s(e.name)},`image-${t}-${e.name}`)),r.map((e,t)=>(0,Q.jsx)(Hn,{image:new File([],e),onRemove:()=>{},isLoading:!0,showUploadAsFileToggle:!0,uploadAsFileActive:i.includes(e),onToggleUploadAsFile:()=>s(e)},`loading-image-${t}-${e}`))]})})}function Wn({chatInputRef:e,disabled:t=!1,onInput:n,onPaste:r,onKeyDown:i,onFocus:a,onBlur:o}){let{t:s}=m(`openhands`),c=W(e=>e.conversationMode)===`plan`;return X.useEffect(()=>{t||ln(e.current)},[]),(0,Q.jsx)(`div`,{className:`box-border content-stretch flex flex-row items-center justify-start min-h-6 p-0 relative shrink-0 flex-1`,"data-name":`Text & caret`,children:(0,Q.jsx)(`div`,{className:`basis-0 flex flex-col font-normal grow justify-center leading-[0] min-h-px min-w-px overflow-ellipsis overflow-hidden relative shrink-0 text-[var(--oh-text-tertiary)] text-[16px] text-left`,children:(0,Q.jsx)(`div`,{ref:e,className:U(`chat-input bg-transparent text-white text-[16px] font-normal leading-[20px] outline-none resize-none custom-scrollbar min-h-[20px] max-h-[400px] [text-overflow:inherit] [text-wrap-mode:inherit] [white-space-collapse:inherit] block whitespace-pre-wrap`,t&&`cursor-not-allowed opacity-50`),contentEditable:!t,"data-placeholder":s(c?h.COMMON$LET_S_WORK_ON_A_PLAN:h.SUGGESTIONS$WHAT_TO_BUILD),"data-testid":`chat-input`,onInput:n,onPaste:r,onKeyDown:i,onFocus:a,onBlur:o})})})}function Gn({chatInputRef:e,isNewConversationPending:t=!1,onInput:n,onPaste:r,onKeyDown:i,onFocus:a,onBlur:o}){return(0,Q.jsx)(`div`,{className:`box-border content-stretch flex flex-row items-end justify-between p-0 relative shrink-0 w-full pb-[18px] gap-2`,children:(0,Q.jsx)(`div`,{className:`basis-0 box-border content-stretch flex flex-row gap-4 grow items-end justify-start min-h-px min-w-px p-0 relative shrink-0`,children:(0,Q.jsx)(Wn,{chatInputRef:e,disabled:t,onInput:n,onPaste:r,onKeyDown:i,onFocus:a,onBlur:o})})})}var Kn=e(r(),1),qn=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{d:`M9 6C9.55228 6 10 6.44772 10 7V17C10 17.5523 9.55228 18 9 18C8.44772 18 8 17.5523 8 17V7C8 6.44772 8.44772 6 9 6ZM15 6C15.5523 6 16 6.44772 16 7V17C16 17.5523 15.5523 18 15 18C14.4477 18 14 17.5523 14 17V7C14 6.44772 14.4477 6 15 6Z`,fill:`currentColor`})});function Jn({handleStop:e}){return(0,Q.jsx)(`button`,{type:`button`,onClick:e,"data-testid":`stop-button`,className:`cursor-pointer`,children:(0,Q.jsx)(qn,{className:`block max-w-none w-4 h-4 text-current`})})}var Yn=e=>(0,Q.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Q.jsx)(`path`,{d:`M15 11H13V7C13 6.73478 12.8946 6.48043 12.7071 6.29289C12.5196 6.10536 12.2652 6 12 6C11.7348 6 11.4804 6.10536 11.2929 6.29289C11.1054 6.48043 11 6.73478 11 7V12C11 12.2652 11.1054 12.5196 11.2929 12.7071C11.4804 12.8946 11.7348 13 12 13H15C15.2652 13 15.5196 12.8946 15.7071 12.7071C15.8946 12.5196 16 12.2652 16 12C16 11.7348 15.8946 11.4804 15.7071 11.2929C15.5196 11.1054 15.2652 11 15 11ZM12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM12 20C10.4178 20 8.87104 19.5308 7.55544 18.6518C6.23985 17.7727 5.21447 16.5233 4.60897 15.0615C4.00347 13.5997 3.84504 11.9911 4.15372 10.4393C4.4624 8.88743 5.22433 7.46197 6.34315 6.34315C7.46197 5.22433 8.88743 4.4624 10.4393 4.15372C11.9911 3.84504 13.5997 4.00346 15.0615 4.60896C16.5233 5.21447 17.7727 6.23984 18.6518 7.55544C19.5308 8.87103 20 10.4177 20 12C20 14.1217 19.1572 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20Z`,fill:`currentColor`})}),Xn=e=>(0,Q.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Q.jsx)(`path`,{d:`M8 8.37911C8 7.31633 9.15785 6.65415 10.0798 7.18966L16.3139 10.8105C17.2287 11.3419 17.2287 12.6581 16.3139 13.1895L10.0798 16.8103C9.15785 17.3459 8 16.6837 8 15.6209V8.37911Z`,fill:`currentColor`})});function Zn({onAgentResumed:e,disabled:t=!1}){return(0,Q.jsx)(`button`,{type:`button`,onClick:e,"data-testid":`play-button`,disabled:t,className:U(`cursor-pointer`,t&&`cursor-not-allowed`),children:(0,Q.jsx)(Xn,{className:`block max-w-none w-4 h-4 text-current`})})}function Qn(){return(0,Q.jsx)(`div`,{"data-testid":`agent-loading-spinner`,children:(0,Q.jsx)(I,{className:`animate-spin w-4 h-4 text-current`})})}function $n(){let e=zt();return e?e.connectionState:`CLOSED`}var er=Qe()((e,t)=>({byTaskId:{},setPendingTaskAttachments:(t,n)=>e(e=>({byTaskId:{...e.byTaskId,[t]:n}})),consumePendingTaskAttachments:n=>{let r=t().byTaskId[n];return r?(e(e=>{let{[n]:t,...r}=e.byTaskId;return{byTaskId:r}}),r):null}}));function tr(e,t){er.getState().setPendingTaskAttachments(e,t)}function nr(e){return er.getState().consumePendingTaskAttachments(e)}var rr=e=>new Promise((t,n)=>{let r=new FileReader;r.onloadend=()=>{t(r.result)},r.onerror=n,r.readAsDataURL(e)}),ir=3*1024*1024,ar=3*1024*1024;function or(e){let t=e.filter(e=>e.size>ir);if(t.length>0){let e=t.map(e=>e.name);return{isValid:!1,errorMessage:`Files exceeding 3MB are not allowed: ${e.join(`, `)}`,oversizedFiles:e}}return{isValid:!0}}function sr(e,t=[]){let n=t.reduce((e,t)=>e+t.size,0)+e.reduce((e,t)=>e+t.size,0);return n>ar?{isValid:!1,errorMessage:`Total file size would be ${(n/(1024*1024)).toFixed(1)}MB, exceeding the 3MB limit. Please select fewer or smaller files.`}:{isValid:!0}}function cr(e,t=[]){let n=or(e);return n.isValid?sr(e,t):n}async function lr(e){let{conversationId:t,content:n,images:r,files:i,imagesMarkedUploadAsFile:a,t:o}=e,{imagesToEmbed:s,imagesAsFiles:c}=tn(r,a),l=[...i,...c],u=cr([...s,...l]);if(!u.isValid)throw Error(u.errorMessage??`Invalid attachments`);let d=await Promise.all(s.map(e=>rr(e))),f=await St(t),{skipped_files:p,uploaded_files:m}=l.length>0?await Ct(t,l):{skipped_files:[],uploaded_files:[]};p.forEach(e=>g(e.reason));let _=`${o(h.CHAT_INTERFACE$AUGMENTED_PROMPT_FILES_TITLE)}: ${m.join(`
2
+
3
+ `)}`,v=m.length>0?`${n}\n\n${_}`:n,y=new Date().toISOString(),b={role:`user`,content:[{type:`text`,text:v}]};return d.length>0&&b.content.push({type:`image`,image_urls:d}),await ct.sendMessage(t,b,f),{text:n,content:v,imageUrls:d,fileUrls:m,timestamp:y}}async function ur(e,t){let n=nr(e);if(n)try{await y(),await lr({conversationId:t,content:n.content,images:n.images,files:n.files,imagesMarkedUploadAsFile:n.imagesMarkedUploadAsFile,t:_.getFixedT(null,T)})}catch(e){throw g(e instanceof Error?e.message:null),e}}var dr=new Map,fr=null;function pr(e,t){dr.set(e,t)}function mr(e){dr.delete(e)}function hr(e,t){fr={fromConversationId:e,toConversationId:t}}function gr(e){if(fr?.toConversationId!==e)return null;let t=fr;return fr=null,t}function _r(e,t){return t===e?!0:dr.get(e)===t}var vr=()=>{let{conversationId:e}=J(),{navigate:t}=Te(),n=!!e&&e.startsWith(`task-`),r=n?e.replace(`task-`,``):null,i=f({queryKey:[`start-task`,r],queryFn:async()=>r?ct.getStartTask(r):null,enabled:!!r,refetchInterval:e=>{let t=e.state.data;return!t||t.status===`READY`||t.status===`ERROR`?!1:3e3},retry:!1}),a=(0,X.useRef)(null);return(0,X.useLayoutEffect)(()=>{if(!e)return;let t=gr(e);t&&(Lt.getState().reassignPendingMessages(t.fromConversationId,t.toConversationId),mr(t.toConversationId))},[e]),(0,X.useEffect)(()=>{let e=i.data;!r||e?.status!==`READY`||!e.app_conversation_id||a.current===r||(a.current=r,(async()=>{await ur(r,e.app_conversation_id);let n=`task-${r}`;pr(e.app_conversation_id,n),hr(n,e.app_conversation_id);let i=et(r);i&&$e(e.app_conversation_id,{draftMessage:i}),t(`/conversations/${e.app_conversation_id}`,{replace:!0})})())},[i.data,t,r]),(0,X.useEffect)(()=>{a.current=null},[r]),{isTask:n,taskId:r,conversationId:n?null:e??null,task:i.data,taskStatus:i.data?.status,taskDetail:i.data?.detail,taskError:i.error,isLoadingTask:i.isLoading,repositoryInfo:{selectedRepository:i.data?.request?.selected_repository,selectedBranch:i.data?.request?.selected_branch,gitProvider:i.data?.request?.git_provider}}},yr=(e,t)=>{let n=f({queryKey:[`sub-conversation-task`,e],queryFn:async()=>e?ct.getStartTask(e):null,enabled:!!e&&!!t,refetchInterval:e=>{let t=e.state.data;return!t||t.status===`READY`||t.status===`ERROR`?!1:3e3},retry:!1});return{task:n.data,taskStatus:n.data?.status,taskDetail:n.data?.detail,taskError:n.error,isLoadingTask:n.isLoading,subConversationId:n.data?.app_conversation_id}},br=`/assets/notification-Cyeyy5ud.mp3`,xr=[L.AWAITING_USER_INPUT,L.FINISHED,L.AWAITING_USER_CONFIRMATION];function Sr(e){let{data:t}=at(),n=(0,X.useRef)(void 0),r=(0,X.useRef)(void 0);(0,X.useEffect)(()=>{typeof window<`u`&&!n.current&&(n.current=new Audio(br),n.current.volume=.5)},[]);let i=t?.enable_sound_notifications??!1;(0,X.useEffect)(()=>{r.current!==e&&(r.current=e,xr.includes(e)&&i&&n.current&&(n.current.currentTime=0,n.current.play().catch(()=>{})))},[e,i])}function Cr({className:e=``,handleStop:t,handleResumeAgent:n,disabled:r=!1,isPausing:i=!1}){let{t:a}=m(`openhands`),{setShouldShownAgentLoading:o}=W(),{curAgentState:s,executionStatus:c}=Pt();Sr(s);let l=$n(),{data:u}=Y(),{taskStatus:d}=vr(),{subConversationTaskId:f}=W(),{taskStatus:p}=yr(f,u?.id||null),g=me(l,c??null,d,p),_=s===L.INIT||s===L.LOADING||l===`CONNECTING`&&d!==`ERROR`||H(d)||H(p),v=_||i,y=s===L.ERROR||s===L.RATE_LIMITED||l===`CLOSED`||d===`ERROR`,b=!y&&s===L.RUNNING,x=!y&&(s===L.STOPPED||s===L.PAUSED),S=!v&&(b||x),C=g===h.CHAT_INTERFACE$AGENT_FINISHED_MESSAGE,w=g===h.AGENT_STATUS$WAITING_FOR_TASK,T=C||w,[D,O]=(0,X.useState)(!0),[k,A]=(0,X.useState)(!1);return(0,X.useEffect)(()=>{o(!!_)},[_,o]),(0,X.useEffect)(()=>{if(!T){O(!0),A(!1);return}O(!0),A(!1);let e=window.setTimeout(()=>{A(!0)},1e3),t=window.setTimeout(()=>{O(!1)},1500);return()=>{window.clearTimeout(e),window.clearTimeout(t)}},[T]),T&&!D?null:(0,Q.jsxs)(`div`,{className:U(`flex items-center gap-1 min-w-0`,T&&`transition-opacity duration-500`,k&&`opacity-0`,e),children:[(0,Q.jsx)(`span`,{className:`text-[11px] text-[var(--oh-muted)] font-normal leading-5 min-w-0 max-w-full truncate`,title:a(g),children:a(g)}),(0,Q.jsxs)(`div`,{className:U(`box-border content-stretch flex flex-row gap-[3px] items-center justify-center overflow-clip px-0.5 py-1 relative rounded-[100px] shrink-0 size-6 transition-all duration-200 active:scale-95 bg-transparent text-[var(--oh-muted)] hover:bg-white/10 hover:text-white`,S?`cursor-pointer`:`cursor-default`),children:[v&&(0,Q.jsx)(Qn,{}),!v&&b&&(0,Q.jsx)(Jn,{handleStop:t}),!v&&x&&(0,Q.jsx)(Zn,{onAgentResumed:n,disabled:r}),!v&&y&&(0,Q.jsx)(Ze,{className:`w-4 h-4 text-current`,"data-testid":`circle-error-icon`}),!v&&!b&&!x&&!y&&(T?(0,Q.jsx)(E,{className:`w-4 h-4 text-current`}):(0,Q.jsx)(Yn,{className:`w-4 h-4 text-current`}))]})]})}function wr(e){return(0,Q.jsx)(`svg`,{viewBox:`0 0 257 183`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,...e,children:(0,Q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M151.663 5.36257C158.763 -1.73743 170.363 -1.83743 177.563 5.36257L250.663 78.4626C257.763 85.5626 257.863 97.1626 250.663 104.363L177.563 177.463C170.363 184.563 158.863 184.563 151.663 177.463C144.563 170.263 144.563 158.763 151.663 151.563L211.863 91.3626L151.663 31.1626C144.563 24.1626 144.563 12.5626 151.663 5.36257ZM104.463 5.36257C97.3626 -1.73743 85.7626 -1.83743 78.5626 5.36257L5.36257 78.4626C-1.73743 85.5626 -1.83743 97.1626 5.36257 104.363L78.4626 177.463C85.6626 184.563 97.1626 184.563 104.363 177.463C111.463 170.263 111.463 158.763 104.363 151.563L44.1626 91.4626L104.363 31.2626C111.563 24.1626 111.563 12.5626 104.463 5.36257Z`,fill:`currentColor`})})}function Tr({icon:e,text:t,className:n,iconClassName:r,isActive:i=!1}){return(0,Q.jsxs)(`div`,{className:U(`flex min-w-0 items-center`,Oe,n),children:[(0,Q.jsx)(e,{className:U(`h-4 w-4`,je,r)}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 leading-5`,children:t}),i&&(0,Q.jsx)(Dt,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]})}function Er({icon:e,title:t,description:n,className:r,iconClassName:i,isActive:a=!1}){return(0,Q.jsxs)(`div`,{className:U(`flex min-w-0 w-full flex-col justify-center gap-1`,r),children:[(0,Q.jsx)(Tr,{icon:e,text:t,className:`px-0`,iconClassName:i,isActive:a}),(0,Q.jsx)(q.Text,{className:`text-[var(--oh-muted)] text-[10px] font-normal whitespace-pre-wrap break-words`,children:n})]})}function Dr({activeMode:e,onClose:t,onCodeClick:n,onPlanClick:r}){let{t:i}=m(`openhands`),a=ht(t);return(0,Q.jsxs)(G,{ref:a,testId:`change-agent-context-menu`,position:`top`,alignment:`left`,className:`min-h-fit mb-2 min-w-[195px] max-w-[195px]`,children:[(0,Q.jsx)(K,{testId:`code-option`,onClick:e=>{e.preventDefault(),e.stopPropagation(),n?.(e),t()},className:U(e===`code`&&`bg-[var(--oh-interactive-hover)]`),children:(0,Q.jsx)(Er,{icon:Wt,title:i(h.COMMON$CODE),description:i(h.COMMON$CODE_AGENT_DESCRIPTION),isActive:e===`code`})}),(0,Q.jsx)(K,{testId:`plan-option`,onClick:e=>{e.preventDefault(),e.stopPropagation(),r?.(e),t()},className:U(e===`plan`&&`bg-[var(--oh-interactive-hover)]`),children:(0,Q.jsx)(Er,{icon:Bt,title:i(h.COMMON$PLAN),description:i(h.COMMON$PLAN_AGENT_DESCRIPTION),isActive:e===`plan`})})]})}function Or(){let[e,t]=(0,X.useState)(!1),{conversationMode:n,setConversationMode:r,subConversationTaskId:a}=W(),{conversationId:o}=J(),s=!o,c=$n()===`OPEN`,{curAgentState:l}=Pt(),{t:u}=m(`openhands`),d=l===L.RUNNING,{data:f}=Y(),p=i(),g=(0,X.useRef)(null),{taskStatus:_,subConversationId:v}=yr(a,f?.id||null);(0,X.useEffect)(()=>{_===`READY`&&v&&f?.id&&a&&g.current!==a&&(g.current=a,p.invalidateQueries({queryKey:[`user`,`conversation`,f.id]}))},[_,v,f?.id,a,p]);let{handlePlanClick:y,isCreatingConversation:b}=Gt();(0,X.useEffect)(()=>{(d||!c)&&e&&t(!1)},[d,e,c]);let x=s||d||b||!c;(0,X.useEffect)(()=>{if(x)return;let e=e=>{if(e.shiftKey&&e.key===`Tab`){e.preventDefault(),e.stopPropagation();let t=n===`code`?`plan`:`code`;t===`plan`?y(e):r(t)}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[x,n,r,y]);let S=n=>{n.preventDefault(),n.stopPropagation(),t(!e)},C=e=>{e.preventDefault(),e.stopPropagation(),r(`code`)},w=n===`code`,T=(0,X.useMemo)(()=>u(w?h.COMMON$CODE:h.COMMON$PLAN),[w,u]),E=(0,X.useMemo)(()=>w?(0,Q.jsx)(wr,{className:`h-[11px] w-[11px] shrink-0`}):(0,Q.jsx)(Bt,{width:18,height:18,color:`currentColor`}),[w]),D=(0,Q.jsxs)(`div`,{className:`relative`,children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:S,disabled:x,className:U(`flex items-center rounded-[100px]`,ye,w?`border border-transparent text-[var(--oh-muted)]`:`border border-[#597FF4] bg-[#4A67BD]`,!x&&w&&U(`cursor-pointer`,`hover:text-white hover:bg-white/10`),!x&&!w&&`cursor-pointer text-white hover:bg-[#597FF4]`,x&&U(`opacity-50 cursor-not-allowed`,w&&`border-transparent`)),children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 pl-1.5`,children:[E,(0,Q.jsx)(q.Text,{className:`text-2.75 not-italic font-normal leading-5`,children:T})]}),(0,Q.jsx)(Me,{isOpen:e})]}),e&&(0,Q.jsx)(Dr,{activeMode:n,onClose:()=>t(!1),onCodeClick:C,onPlanClick:y})]});return s?(0,Q.jsx)(De,{content:u(h.CHANGE_AGENT$SWITCH_AFTER_CONVERSATION),placement:`top`,children:D}):D}function kr(){let{t:e}=m(`openhands`),{backend:t}=S(),{data:n}=Y(),{data:r}=at(),i=qt(),a=n?.agent_kind===`acp`,o=!n&&(i??r?.agent_settings?.agent_kind)===`acp`,s=a||o;return{isActiveAcpConversation:a,isHomeAcp:o,isAcpContext:s,destinationPath:s?`/settings/agents`:`/settings`,destinationLabel:e(s?h.SETTINGS$NAV_AGENT:t.kind===`cloud`?h.SETTINGS$LLM_SETTINGS:h.SETTINGS$LLM_PROFILES)}}function Ar(){let{data:e}=Y(),{data:t}=at(),{conversationId:n}=J(),{isActiveAcpConversation:r,isHomeAcp:i,isAcpContext:a,destinationPath:o,destinationLabel:s}=kr(),c=r?e?.acp_server:i&&typeof t?.agent_settings?.acp_server==`string`?t.agent_settings.acp_server:null,l=a?ft(c):void 0,u=typeof t?.agent_settings?.acp_model==`string`?t.agent_settings.acp_model:null,d=null;d=r?e?.llm_model??ut({configured:u,providerDefault:dt(c)}):i?ut({configured:u,providerDefault:dt(c)}):e?.llm_model??t?.llm_model??null;let f=d&&a?pt(c,d)??d:d,p=l?.available_models??[],m=a&&p.length>0;return{isAcpContext:a,displayModel:f,currentModelId:d,availableAcpModels:p,showAcpPicker:m,switchConversationId:r?n??null:null,destinationPath:o,destinationLabel:s}}var jr=()=>{let e=i();return d({mutationFn:async({conversationId:e,model:t})=>{if(e){await ct.switchAcpModel(e,t);return}await it.saveSettings({agent_settings_diff:{acp_model:t}})},onSuccess:(t,{conversationId:n})=>{n?a(e,n):(it.invalidateCache(),e.invalidateQueries({queryKey:b.personal()}))}})},Mr=10,Nr=22;function Pr(e,t=Mr){return e.length<=t?e:`${e.slice(0,t)}…`}function Fr({model:e,onClose:t,dividerInset:n,settingsLinkClassName:r,settingsIconClassName:i}){let{t:a}=m(`openhands`),o=jr(),s=e.showAcpPicker||!!e.displayModel,c=n=>{n!==e.currentModelId&&o.mutate({conversationId:e.switchConversationId,model:n}),t()};return(0,Q.jsxs)(Q.Fragment,{children:[e.showAcpPicker?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`li`,{role:`presentation`,className:`px-2 pt-1 pb-0.5`,children:(0,Q.jsx)(q.Text,{className:`text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4`,children:a(h.MODEL$AVAILABLE_MODELS)})}),e.availableAcpModels.map(t=>{let n=t.id===e.currentModelId;return(0,Q.jsxs)(K,{testId:`chat-input-acp-model-option-${t.id}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),c(t.id)},className:U(`flex items-center gap-2`,n&&`bg-[var(--oh-interactive-hover)]`),children:[(0,Q.jsx)(`span`,{className:`flex-1 truncate text-sm leading-5`,title:t.label,children:t.label}),n&&(0,Q.jsx)(Dt,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]},t.id)})]}):e.displayModel?(0,Q.jsx)(`li`,{className:`text-sm`,children:(0,Q.jsx)(`div`,{className:`p-2 leading-5 text-[var(--oh-foreground)] break-all`,children:e.displayModel})}):null,s&&(0,Q.jsx)(Ie,{inset:n}),(0,Q.jsx)(`li`,{className:`text-sm`,children:(0,Q.jsxs)(Ee,{to:e.destinationPath,onClick:t,className:U(`flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors`,r),children:[(0,Q.jsx)(Jt,{width:16,height:16,className:U(`shrink-0`,i),"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:e.destinationLabel})]})})]})}function Ir(){let e=Ar(),[t,n]=X.useState(!1),r=X.useRef(null),i=ht(()=>n(!1),r);if(!e.displayModel)return null;let a=Pr(e.displayModel,e.isAcpContext?Nr:Mr);return(0,Q.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,Q.jsxs)(`button`,{ref:r,type:`button`,className:be,title:e.displayModel,"data-testid":`chat-input-llm-model`,"aria-expanded":t,"aria-haspopup":`dialog`,onClick:e=>{e.preventDefault(),e.stopPropagation(),n(e=>!e)},children:[(0,Q.jsx)(`span`,{children:a}),(0,Q.jsx)(Me,{isOpen:t})]}),t&&(0,Q.jsx)(G,{ref:i,testId:`chat-input-llm-model-popover`,position:`top`,alignment:`left`,spacing:`none`,className:`z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto`,children:(0,Q.jsx)(Fr,{model:e,onClose:()=>n(!1)})})]})}function Lr(){let{data:e,isLoading:t}=_t(),n=kt(),r=p({mutationKey:At})>0,i=e?.profiles??[],a=e?.active_agent_profile_id??null;return{profiles:i,currentProfileId:a,currentProfileName:i.find(e=>e.id!=null&&e.id===a)?.name??null,isLoading:t,isSwitching:r,selectProfile:(0,X.useCallback)(e=>{!e.id||e.id===a||n.mutate(e.id)},[a,n])}}var Rr=18;function zr(e){return e.length<=Rr?e:`${e.slice(0,Rr)}…`}function Br({onClose:e,dividerInset:t,settingsLinkClassName:n,settingsIconClassName:r}){let{t:i}=m(`openhands`),{profiles:a,currentProfileId:o,selectProfile:s}=Lr(),c=t=>{s(t),e()};return(0,Q.jsxs)(Q.Fragment,{children:[a.length>0&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`li`,{role:`presentation`,className:`px-2 pt-1 pb-0.5`,children:(0,Q.jsx)(q.Text,{className:`text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4`,children:i(h.SETTINGS$AVAILABLE_PROFILES)})}),a.map(t=>{let n=t.id!=null&&t.id===o;return(0,Q.jsxs)(K,{testId:`chat-input-agent-profile-option-${t.name}`,onClick:r=>{if(r.preventDefault(),r.stopPropagation(),n){e();return}c(t)},className:U(`flex items-center gap-2`,n&&`bg-[var(--oh-interactive-hover)]`),children:[(0,Q.jsx)(`span`,{className:`flex-1 truncate text-sm leading-5`,title:t.name,children:t.name}),n&&(0,Q.jsx)(Dt,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]},t.id??t.name)})]}),a.length>0&&(0,Q.jsx)(Ie,{inset:t}),(0,Q.jsx)(`li`,{className:`text-sm`,children:(0,Q.jsxs)(Ee,{to:`/settings/agents`,onClick:e,className:U(`flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors`,n),children:[(0,Q.jsx)(Jt,{width:16,height:16,className:U(`shrink-0`,r),"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:i(h.CHAT$MANAGE_AGENT_PROFILES)})]})})]})}function Vr(){let{t:e}=m(`openhands`),{profiles:t,currentProfileName:n,isLoading:r,isSwitching:i}=Lr(),[a,o]=X.useState(!1),s=X.useRef(null),c=ht(()=>o(!1),s);if(r||t.length===0)return null;let l=n??e(h.CHAT$AGENT_PROFILE_PLACEHOLDER);return(0,Q.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,Q.jsxs)(`button`,{ref:s,type:`button`,className:U(be,`max-w-[200px]`),title:n??void 0,"data-testid":`chat-input-agent-profile`,"aria-expanded":a,"aria-haspopup":`dialog`,disabled:i,"aria-busy":i,onClick:e=>{e.preventDefault(),e.stopPropagation(),o(e=>!e)},children:[(0,Q.jsx)(`span`,{className:`truncate`,children:zr(l)}),(0,Q.jsx)(Me,{isOpen:a})]}),a&&(0,Q.jsx)(G,{ref:c,testId:`chat-input-agent-profile-popover`,position:`top`,alignment:`left`,spacing:`none`,className:`z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto`,children:(0,Q.jsx)(Br,{onClose:()=>o(!1)})})]})}var Hr=[`switch-llm-profile`],Ur=()=>{let e=i(),{t}=m();return d({mutationKey:Hr,mutationFn:({conversationId:e,profileName:t})=>ct.switchProfile(e,t),meta:{disableToast:!0},onMutate:({conversationId:e})=>({anchorEventId:e?Rt():null}),onError:(e,{profileName:n})=>{let r=t(h.MODEL$SWITCH_FAILED,{name:n});g(v(e)||r)},onSuccess:(t,{conversationId:n,profileName:r},i)=>{if(e.invalidateQueries({queryKey:w.all}),n){a(e,n),It(n,r,i?.anchorEventId??null);let t=ot(n);st(n,{selected_repository:t?.selected_repository??null,selected_branch:t?.selected_branch??null,git_provider:t?.git_provider??null,selected_workspace:t?.selected_workspace??null,active_profile:r,plugins:t?.plugins??null})}else it.invalidateCache(),e.invalidateQueries({queryKey:b.personal()})}})};function Wr(){let{mutate:e,isPending:t}=Ur();return{switchAndLog:(0,X.useCallback)((t,n)=>{e({conversationId:t,profileName:n})},[e]),isPending:t}}function Gr(){let{conversationId:e}=J(),{data:t}=Y(),{data:n,isLoading:r}=gt(),{switchAndLog:i}=Wr(),a=p({mutationKey:Hr})>0,o=Ft(t=>e?t.activeProfileByConversation[e]:void 0),s=n?.profiles??[],c=t?.llm_model??null,l=t?.active_profile??null,u=l&&s.some(e=>e.name===l)?l:null,d=o??u??(c?s.find(e=>e.model===c)?.name??null:n?.active_profile??null);return{profiles:s,currentProfileName:d,currentProfileModel:s.find(e=>e.name===d)?.model??c??null,isLoading:r,isSwitching:a,selectProfile:(0,X.useCallback)(t=>{t!==d&&i(e,t)},[e,d,i])}}var Kr=18;function qr(e){return e.length<=Kr?e:`${e.slice(0,Kr)}…`}function Jr({onClose:e,dividerInset:t,settingsLinkClassName:n,settingsIconClassName:r}){let{t:i}=m(`openhands`),{profiles:a,currentProfileName:o,selectProfile:s}=Gr(),c=t=>{s(t),e()};return(0,Q.jsxs)(Q.Fragment,{children:[a.length>0&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`li`,{role:`presentation`,className:`px-2 pt-1 pb-0.5`,children:(0,Q.jsx)(q.Text,{className:`text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4`,children:i(h.SETTINGS$AVAILABLE_PROFILES)})}),a.map(t=>{let n=t.name===o;return(0,Q.jsxs)(K,{testId:`chat-input-llm-profile-option-${t.name}`,onClick:r=>{if(r.preventDefault(),r.stopPropagation(),n){e();return}c(t.name)},className:U(`flex flex-col items-stretch gap-0.5`,n&&`bg-[var(--oh-interactive-hover)]`),children:[(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`flex-1 truncate text-sm leading-5`,title:t.model??t.name,children:t.name}),n&&(0,Q.jsx)(Dt,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]}),t.model&&(0,Q.jsx)(`span`,{className:`block truncate text-xs leading-4 text-[var(--oh-muted)]`,children:t.model})]},t.name)})]}),a.length>0&&(0,Q.jsx)(Ie,{inset:t}),(0,Q.jsx)(`li`,{className:`text-sm`,children:(0,Q.jsxs)(Ee,{to:`/settings/llm`,onClick:e,className:U(`flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors`,n),children:[(0,Q.jsx)(Jt,{width:16,height:16,className:U(`shrink-0`,r),"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:i(h.SETTINGS$LLM_PROFILES)})]})})]})}function Yr(){let{t:e}=m(`openhands`),{profiles:t,currentProfileName:n,isLoading:r,isSwitching:i}=Gr(),[a,o]=X.useState(!1),s=X.useRef(null),c=ht(()=>o(!1),s);if(r||t.length===0)return null;let l=n??e(h.LLM$SELECT_MODEL_PLACEHOLDER);return(0,Q.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,Q.jsxs)(`button`,{ref:s,type:`button`,className:U(be,`max-w-[200px]`),title:n??void 0,"data-testid":`chat-input-llm-profile`,"aria-expanded":a,"aria-haspopup":`dialog`,disabled:i,"aria-busy":i,onClick:e=>{e.preventDefault(),e.stopPropagation(),o(e=>!e)},children:[(0,Q.jsx)(`span`,{className:`truncate`,children:qr(l)}),(0,Q.jsx)(Me,{isOpen:a})]}),a&&(0,Q.jsx)(G,{ref:c,testId:`chat-input-llm-profile-popover`,position:`top`,alignment:`left`,spacing:`none`,className:`z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto`,children:(0,Q.jsx)(Jr,{onClose:()=>o(!1)})})]})}function Xr({hasConversation:e,isCloud:t,isAcp:n,profilesAvailable:r}){return e?n?`model`:`llm-profile`:r?`agent-profile`:t?`model`:`llm-profile`}var Zr=()=>{let e=i(),{t}=m();return d({mutationFn:e=>ct.updateConversationPublicFlag(e.conversationId,e.isPublic),onMutate:async t=>{let n=[`user`,`conversation`,t.conversationId];await e.cancelQueries({queryKey:n});let r=e.getQueriesData({queryKey:n});return e.setQueriesData({queryKey:n},e=>e&&typeof e==`object`?{...e,public:t.isPublic}:e),{previousEntries:r}},onError:(n,r,i)=>{i?.previousEntries?.forEach(([t,n])=>{e.setQueryData(t,n)}),g(t(h.CONVERSATION$FAILED_TO_UPDATE_PUBLIC_SHARING))},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]}),e.invalidateQueries({queryKey:[`user`,`conversations`]})}})},Qr=`<secret-hidden>`;function $r(e){let t=/(<CUSTOM_SECRETS>)([\s\S]*?)(<\/CUSTOM_SECRETS>|$)/gi,n=/^(\s*[^=:\n]+?\s*[:=]\s*)(.+?)\s*$/gm;return e.replace(t,(e,t,r,i)=>`${t}${r.replace(n,(e,t,n)=>n===Qr?e:`${t}${Qr}`)}${i}`)}function ei(e){let t=e.find(Ht);if(!t)return null;let n=t.dynamic_context?.text;return{content:n?`${t.system_prompt.text.trimEnd()}\n\n${$r(n)}`:t.system_prompt.text,tools:t.tools??null,openhands_version:null,agent_class:null}}function ti({conversationId:e,executionStatus:t,showOptions:n=!1,onContextMenuToggle:r}){let{t:i}=m(),{conversationId:a,navigate:o}=Te(),{backend:s}=S(),c=Ut(e=>e.events),{mutate:l}=Be(),{mutate:u}=Ve(),{mutate:d}=Zr(),{data:f}=Y(),p=Vt(),[g,_]=X.useState(!1),[v,y]=X.useState(!1),[b,C]=X.useState(!1),[w,T]=X.useState(!1),[E,D]=X.useState(!1),[O,k]=X.useState(!1),[A,j]=X.useState(!1),{mutateAsync:M}=Ue(),N=ei(c),P=e=>{e.preventDefault(),e.stopPropagation(),k(!0),r?.(!1)},F=e=>{e.preventDefault(),e.stopPropagation(),j(!0),r?.(!1)},I=()=>{e&&l({conversationId:e},{onSuccess:()=>{e===a&&o(`/conversations`)}}),k(!1)},ee=()=>{e&&u({conversationId:e}),j(!1)},te=e=>{e.preventDefault(),e.stopPropagation(),r?.(!1)},L=async t=>{t.preventDefault(),t.stopPropagation(),e&&await M(e),r?.(!1)},ne=e=>{e.stopPropagation(),_(!0),r?.(!1)},R=e=>{e.stopPropagation(),y(!0),r?.(!1)},re=e=>{e.stopPropagation(),C(!0),r?.(!1)},ie=e=>{e.stopPropagation(),T(!0),r?.(!1)},z=e=>{e.stopPropagation(),D(!0),r?.(!1)},B=t=>{e&&f&&d({conversationId:e,isPublic:t??!f.public})},V=X.useMemo(()=>e?`${s.kind===`cloud`?s.host.replace(/\/+$/,``):window.location.origin}/shared/conversations/${e}`:``,[e,s.kind,s.host]);return{handleDelete:P,handleStop:F,handleEdit:te,handleDownloadConversation:L,handleDisplayCost:ne,handleShowAgentTools:R,handleShowSkills:re,handleShowPlugins:ie,handleShowHooks:z,handleTogglePublic:B,handleCopyShareLink:e=>{if(e.preventDefault(),e.stopPropagation(),!V){r?.(!1);return}navigator.clipboard.writeText(V),x(i(h.CONVERSATION$LINK_COPIED))},shareUrl:V,handleConfirmDelete:I,handleConfirmStop:ee,metricsModalVisible:g,setMetricsModalVisible:_,systemModalVisible:v,setSystemModalVisible:y,skillsModalVisible:b,setSkillsModalVisible:C,pluginsModalVisible:w,setPluginsModalVisible:T,hooksModalVisible:E,setHooksModalVisible:D,confirmDeleteModalVisible:O,setConfirmDeleteModalVisible:k,confirmStopModalVisible:A,setConfirmStopModalVisible:j,metrics:p,systemMessage:N,shouldShowStop:ae(t),shouldShowDownloadConversation:!!(e&&n),shouldShowDisplayCost:n,shouldShowAgentTools:!!(n&&N),shouldShowSkills:!!(n&&e),shouldShowPlugins:!!(n&&e&&(ot(e)?.plugins?.length??0)>0),shouldShowHooks:!!(n&&e&&ae(t))}}var ni=e=>(0,Q.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Q.jsx)(`path`,{d:`M17 6.05994C16.3065 6.0604 15.6345 6.30114 15.0985 6.74118C14.5625 7.18123 14.1954 7.7934 14.0599 8.47355C13.9243 9.1537 14.0286 9.85981 14.355 10.4717C14.6813 11.0837 15.2097 11.5636 15.85 11.8299C15.6978 12.1949 15.4408 12.5065 15.1115 12.7254C14.7822 12.9444 14.3954 13.0608 14 13.0599H10C9.29505 13.0629 8.604 13.2564 8.00001 13.6199V7.87994C8.66722 7.64405 9.22956 7.17987 9.58764 6.56946C9.94571 5.95905 10.0765 5.2417 9.9568 4.54421C9.83713 3.84671 9.47473 3.21398 8.93367 2.75784C8.3926 2.30169 7.70769 2.05151 7.00001 2.05151C6.29232 2.05151 5.60741 2.30169 5.06635 2.75784C4.52528 3.21398 4.16288 3.84671 4.04321 4.54421C3.92354 5.2417 4.0543 5.95905 4.41237 6.56946C4.77045 7.17987 5.33279 7.64405 6.00001 7.87994V16.2399C5.34099 16.4769 4.78566 16.937 4.43026 17.5405C4.07485 18.1439 3.94176 18.8527 4.05406 19.544C4.16635 20.2352 4.51695 20.8654 5.0451 21.3254C5.57325 21.7853 6.24567 22.0459 6.94581 22.0621C7.64596 22.0783 8.32971 21.8491 8.87857 21.4141C9.42744 20.9791 9.80683 20.3658 9.95099 19.6805C10.0952 18.9951 9.995 18.281 9.6679 17.6617C9.34079 17.0425 8.80735 16.5572 8.16001 16.2899C8.31158 15.9266 8.56704 15.616 8.89436 15.3972C9.22168 15.1784 9.60629 15.0611 10 15.0599H14C14.9148 15.0598 15.802 14.746 16.5135 14.171C17.225 13.5959 17.7179 12.7944 17.91 11.8999C18.5786 11.6728 19.1456 11.217 19.5113 10.613C19.8769 10.0089 20.0178 9.29524 19.9091 8.59754C19.8004 7.89984 19.449 7.26285 18.9169 6.79869C18.3848 6.33452 17.706 6.07292 17 6.05994ZM7.00001 4.05994C7.19779 4.05994 7.39113 4.11859 7.55558 4.22847C7.72003 4.33835 7.8482 4.49453 7.92389 4.67726C7.99957 4.85998 8.01938 5.06105 7.98079 5.25503C7.94221 5.44901 7.84697 5.6272 7.70711 5.76705C7.56726 5.9069 7.38908 6.00214 7.1951 6.04073C7.00112 6.07931 6.80005 6.05951 6.61732 5.98382C6.4346 5.90813 6.27842 5.77996 6.16854 5.61551C6.05866 5.45106 6.00001 5.25772 6.00001 5.05994C6.00001 4.79472 6.10536 4.54037 6.2929 4.35283C6.48044 4.1653 6.73479 4.05994 7.00001 4.05994ZM7.00001 20.0599C6.80222 20.0599 6.60889 20.0013 6.44444 19.8914C6.27999 19.7815 6.15181 19.6254 6.07613 19.4426C6.00044 19.2599 5.98064 19.0588 6.01922 18.8649C6.05781 18.6709 6.15305 18.4927 6.2929 18.3528C6.43275 18.213 6.61093 18.1177 6.80492 18.0792C6.9989 18.0406 7.19996 18.0604 7.38269 18.1361C7.56542 18.2117 7.72159 18.3399 7.83148 18.5044C7.94136 18.6688 8.00001 18.8622 8.00001 19.0599C8.00001 19.3252 7.89465 19.5795 7.70711 19.767C7.51958 19.9546 7.26522 20.0599 7.00001 20.0599ZM17 10.0599C16.8022 10.0599 16.6089 10.0013 16.4444 9.89141C16.28 9.78153 16.1518 9.62535 16.0761 9.44262C16.0004 9.2599 15.9806 9.05883 16.0192 8.86485C16.0578 8.67087 16.153 8.49269 16.2929 8.35283C16.4328 8.21298 16.6109 8.11774 16.8049 8.07916C16.9989 8.04057 17.2 8.06037 17.3827 8.13606C17.5654 8.21175 17.7216 8.33992 17.8315 8.50437C17.9414 8.66882 18 8.86216 18 9.05994C18 9.32516 17.8947 9.57951 17.7071 9.76705C17.5196 9.95458 17.2652 10.0599 17 10.0599Z`,fill:`currentColor`})}),ri=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{d:`M17 22H5C4.20435 22 3.44129 21.6839 2.87868 21.1213C2.31607 20.5587 2 19.7956 2 19V8.99997C2 8.20432 2.31607 7.44125 2.87868 6.87864C3.44129 6.31604 4.20435 5.99997 5 5.99997H6C6.01682 5.1526 6.30235 4.33248 6.81541 3.65789C7.32848 2.98331 8.04255 2.48911 8.85464 2.2466C9.66673 2.00408 10.5349 2.02578 11.3338 2.30856C12.1328 2.59134 12.8213 3.12059 13.3 3.81997C13.7484 4.45911 13.9925 5.21923 14 5.99997H17C17.2652 5.99997 17.5196 6.10532 17.7071 6.29286C17.8946 6.48039 18 6.73475 18 6.99997V9.99997C18.8474 10.0168 19.6675 10.3023 20.3421 10.8154C21.0167 11.3284 21.5109 12.0425 21.7534 12.8546C21.9959 13.6667 21.9742 14.5348 21.6914 15.3338C21.4086 16.1328 20.8794 16.8212 20.18 17.3C19.5409 17.7484 18.7807 17.9925 18 18V21C18 21.2652 17.8946 21.5195 17.7071 21.7071C17.5196 21.8946 17.2652 22 17 22ZM5 7.99997C4.73478 7.99997 4.48043 8.10532 4.29289 8.29286C4.10536 8.48039 4 8.73475 4 8.99997V19C4 19.2652 4.10536 19.5195 4.29289 19.7071C4.48043 19.8946 4.73478 20 5 20H16V16.82C15.9991 16.6596 16.0368 16.5014 16.1099 16.3587C16.183 16.216 16.2894 16.093 16.42 16C16.5502 15.9071 16.7008 15.8468 16.8592 15.8242C17.0175 15.8016 17.179 15.8173 17.33 15.87C17.615 15.9862 17.9254 16.0262 18.2305 15.9858C18.5357 15.9455 18.825 15.8263 19.07 15.64C19.3139 15.4913 19.523 15.292 19.6834 15.0557C19.8439 14.8194 19.9518 14.5515 20 14.27C20.0386 13.986 20.0157 13.6971 19.9329 13.4228C19.85 13.1485 19.7092 12.8951 19.52 12.68C19.2641 12.3691 18.9155 12.1481 18.5252 12.0491C18.1349 11.9502 17.7231 11.9785 17.35 12.13C17.199 12.1827 17.0375 12.1983 16.8792 12.1757C16.7208 12.1531 16.5702 12.0928 16.44 12C16.3094 11.907 16.203 11.7839 16.1299 11.6412C16.0568 11.4985 16.0191 11.3403 16.02 11.18V7.99997H12.82C12.6557 8.00928 12.4915 7.97788 12.3422 7.90855C12.1929 7.83922 12.0631 7.7341 11.9641 7.60253C11.8652 7.47096 11.8003 7.317 11.7752 7.15432C11.75 6.99164 11.7654 6.82526 11.82 6.66997C11.9363 6.38497 11.9762 6.07459 11.9359 5.76945C11.8955 5.46431 11.7763 5.17496 11.59 4.92997C11.4424 4.67913 11.2402 4.46473 10.9984 4.30266C10.7566 4.14058 10.4815 4.03499 10.1934 3.99369C9.90527 3.95239 9.61155 3.97645 9.33399 4.06409C9.05644 4.15173 8.80216 4.3007 8.59 4.49997C8.39298 4.69538 8.23877 4.92966 8.1372 5.1879C8.03562 5.44614 7.9889 5.72269 8 5.99997C8.00232 6.22934 8.04637 6.45637 8.13 6.66997C8.18287 6.82118 8.19863 6.98289 8.17597 7.14147C8.1533 7.30005 8.09287 7.45087 7.99976 7.58122C7.90665 7.71158 7.78358 7.81765 7.64093 7.89053C7.49827 7.9634 7.34019 8.00093 7.18 7.99997H5Z`,fill:`currentColor`})}),ii=e=>(0,Q.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...e,children:[(0,Q.jsx)(`path`,{d:`m17.586 11.414-5.93 5.93a1 1 0 0 1-8-8l3.137-3.137a.707.707 0 0 1 1.207.5V10`}),(0,Q.jsx)(`path`,{d:`M20.414 8.586 22 7`}),(0,Q.jsx)(`circle`,{cx:19,cy:10,r:2})]}),ai=e=>(0,Q.jsxs)(`svg`,{width:29,height:28,viewBox:`0 0 29 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,Q.jsx)(`path`,{d:`M14.5 18.375C12.085 18.375 10.125 16.415 10.125 14C10.125 11.585 12.085 9.625 14.5 9.625C16.915 9.625 18.875 11.585 18.875 14C18.875 16.415 16.915 18.375 14.5 18.375ZM14.5 11.375C13.0533 11.375 11.875 12.5533 11.875 14C11.875 15.4467 13.0533 16.625 14.5 16.625C15.9467 16.625 17.125 15.4467 17.125 14C17.125 12.5533 15.9467 11.375 14.5 11.375Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M18.245 25.8883C18 25.8883 17.755 25.8533 17.51 25.795C16.7867 25.5967 16.18 25.1417 15.795 24.5L15.655 24.2667C14.9667 23.0767 14.0217 23.0767 13.3333 24.2667L13.205 24.4883C12.82 25.1417 12.2133 25.6083 11.49 25.795C10.755 25.9933 9.99668 25.8883 9.35501 25.5033L7.34834 24.3483C6.63668 23.94 6.12334 23.275 5.90168 22.47C5.69168 21.665 5.79668 20.8367 6.20501 20.125C6.54334 19.53 6.63668 18.9933 6.43834 18.655C6.24001 18.3167 5.73834 18.1183 5.05001 18.1183C3.34668 18.1183 1.95834 16.73 1.95834 15.0267V12.9733C1.95834 11.27 3.34668 9.88168 5.05001 9.88168C5.73834 9.88168 6.24001 9.68334 6.43834 9.34501C6.63668 9.00668 6.55501 8.47001 6.20501 7.87501C5.79668 7.16334 5.69168 6.32334 5.90168 5.53001C6.11168 4.72501 6.62501 4.06001 7.34834 3.65168L9.36668 2.49668C10.685 1.71501 12.4233 2.17001 13.2167 3.51168L13.3567 3.74501C14.045 4.93501 14.99 4.93501 15.6783 3.74501L15.8067 3.52334C16.6 2.17001 18.3383 1.71501 19.6683 2.50834L21.675 3.66334C22.3867 4.07168 22.9 4.73668 23.1217 5.54168C23.3317 6.34668 23.2267 7.17501 22.8183 7.88668C22.48 8.48168 22.3867 9.01834 22.585 9.35668C22.7833 9.69501 23.285 9.89334 23.9733 9.89334C25.6767 9.89334 27.065 11.2817 27.065 12.985V15.0383C27.065 16.7417 25.6767 18.13 23.9733 18.13C23.285 18.13 22.7833 18.3283 22.585 18.6667C22.3867 19.005 22.4683 19.5417 22.8183 20.1367C23.2267 20.8483 23.3433 21.6883 23.1217 22.4817C22.9117 23.2867 22.3983 23.9517 21.675 24.36L19.6567 25.515C19.2133 25.76 18.735 25.8883 18.245 25.8883ZM14.5 21.5717C15.5383 21.5717 16.5067 22.225 17.1717 23.38L17.3 23.6017C17.44 23.8467 17.6733 24.0217 17.9533 24.0917C18.2333 24.1617 18.5133 24.1267 18.7467 23.9867L20.765 22.82C21.0683 22.645 21.3017 22.3533 21.395 22.0033C21.4883 21.6533 21.4417 21.2917 21.2667 20.9883C20.6017 19.845 20.52 18.6667 21.0333 17.7683C21.5467 16.87 22.6083 16.3567 23.9383 16.3567C24.685 16.3567 25.28 15.7617 25.28 15.015V12.9617C25.28 12.2267 24.685 11.62 23.9383 11.62C22.6083 11.62 21.5467 11.1067 21.0333 10.2083C20.52 9.31001 20.6017 8.13168 21.2667 6.98834C21.4417 6.68501 21.4883 6.32334 21.395 5.97334C21.3017 5.62334 21.08 5.34334 20.7767 5.15668L18.7583 4.00168C18.2567 3.69834 17.5917 3.87334 17.2883 4.38668L17.16 4.60834C16.495 5.76334 15.5267 6.41668 14.4883 6.41668C13.45 6.41668 12.4817 5.76334 11.8167 4.60834L11.6883 4.37501C11.3967 3.88501 10.7433 3.71001 10.2417 4.00168L8.22334 5.16834C7.92001 5.34334 7.68668 5.63501 7.59334 5.98501C7.50001 6.33501 7.54668 6.69668 7.72168 7.00001C8.38668 8.14334 8.46834 9.32168 7.95501 10.22C7.44168 11.1183 6.38001 11.6317 5.05001 11.6317C4.30334 11.6317 3.70834 12.2267 3.70834 12.9733V15.0267C3.70834 15.7617 4.30334 16.3683 5.05001 16.3683C6.38001 16.3683 7.44168 16.8817 7.95501 17.78C8.46834 18.6783 8.38668 19.8567 7.72168 21C7.54668 21.3033 7.50001 21.665 7.59334 22.015C7.68668 22.365 7.90834 22.645 8.21168 22.8317L10.23 23.9867C10.475 24.1383 10.7667 24.1733 11.035 24.1033C11.315 24.0333 11.5483 23.8467 11.7 23.6017L11.8283 23.38C12.4933 22.2367 13.4617 21.5717 14.5 21.5717Z`,fill:`currentColor`})]}),oi=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{d:`M18.2099 13.1289L9.98776 20.3232C9.01788 21.1719 7.5 20.4831 7.5 19.1943L7.5 4.80565C7.5 3.51691 9.01788 2.82815 9.98775 3.67678L18.2099 10.8711C18.8929 11.4688 18.8929 12.5312 18.2099 13.1289Z`,fill:`currentColor`})});function $({icon:e,text:t,rightIcon:n,className:r}){return(0,Q.jsxs)(`div`,{className:U(`flex min-w-0 w-full items-center justify-between`,Oe,r),children:[(0,Q.jsxs)(`div`,{className:U(`flex min-w-0 items-center`,Oe),children:[(0,Q.jsx)(`span`,{className:je,"aria-hidden":!0,children:e}),(0,Q.jsx)(`span`,{className:`text-sm font-normal leading-5`,children:t})]}),n?(0,Q.jsx)(`span`,{className:je,"aria-hidden":!0,children:n}):null]})}var si=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M20.781 10.5L13.281 3H12.2205L4.72049 10.5L5.78099 11.5605L12 5.3415V21H13.5V5.34L19.719 11.5605L20.781 10.5Z`,fill:`currentColor`})}),ci=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4.72049 13.5L12.2205 21H13.281L20.781 13.5L19.7205 12.4395L13.5 18.6585V3H12V18.66L5.78099 12.438L4.72049 13.5Z`,fill:`currentcolor`})}),li=e=>(0,Q.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 12 14`,fill:`none`,...e,children:[(0,Q.jsx)(`path`,{d:`M9.79249 10.1936C10.2876 10.1936 10.6902 10.5962 10.6902 11.0913C10.6902 11.5864 10.2876 11.989 9.79249 11.989C9.29739 11.989 8.89478 11.5864 8.89478 11.0913C8.89478 10.5962 9.29739 10.1936 9.79249 10.1936ZM9.79249 9.10547C8.69891 9.10547 7.80664 9.99774 7.80664 11.0913C7.80664 12.1849 8.69891 13.0772 9.79249 13.0772C10.8861 13.0772 11.7783 12.1849 11.7783 11.0913C11.7783 9.99774 10.8861 9.10547 9.79249 9.10547Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M2.23585 10.1936C2.73095 10.1936 3.13356 10.5962 3.13356 11.0913C3.13356 11.5864 2.73095 11.989 2.23585 11.989C1.74075 11.989 1.33814 11.5864 1.33814 11.0913C1.33814 10.5962 1.74075 10.1936 2.23585 10.1936ZM2.23585 9.10547C1.14227 9.10547 0.25 9.99774 0.25 11.0913C0.25 12.1849 1.14227 13.0772 2.23585 13.0772C3.32943 13.0772 4.2217 12.1849 4.2217 11.0913C4.2217 9.99774 3.32943 9.10547 2.23585 9.10547Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M2.23585 2.16846C2.73095 2.16846 3.13356 2.57107 3.13356 3.06617C3.13356 3.56128 2.73095 3.96389 2.23585 3.96389C1.74075 3.96389 1.33814 3.56128 1.33814 3.06617C1.33814 2.57107 1.74075 2.16846 2.23585 2.16846ZM2.23585 1.08032C1.14227 1.08032 0.25 1.97259 0.25 3.06617C0.25 4.15975 1.14227 5.05202 2.23585 5.05202C3.32943 5.05202 4.2217 4.15975 4.2217 3.06617C4.2217 1.97259 3.32943 1.08032 2.23585 1.08032Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M2.23633 9.17627V4.55713`,stroke:`currentColor`,strokeMiterlimit:10}),(0,Q.jsx)(`path`,{d:`M9.79304 9.17605V4.33928C9.79304 3.63743 9.22176 3.06616 8.51992 3.06616H7.38281`,stroke:`currentColor`,strokeMiterlimit:10}),(0,Q.jsx)(`path`,{d:`M7.38191 5.21531L5.23828 3.06624L7.38191 0.922607V5.21531Z`,fill:`currentColor`})]}),ui=`!w-auto whitespace-nowrap`;function di({onClose:e}){let{t}=m(`openhands`),{setMessageToSend:n}=W(),{data:r}=Y(),i=r?.git_provider;return(0,Q.jsxs)(G,{testId:`git-tools-submenu`,className:`w-max`,children:[(0,Q.jsx)(K,{testId:`git-pull-button`,onClick:()=>{n(z()),e()},className:ui,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(ci,{width:16,height:16}),text:t(h.COMMON$GIT_PULL)})}),(0,Q.jsx)(K,{testId:`git-push-button`,onClick:()=>{n(se(i)),e()},className:ui,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(si,{width:16,height:16}),text:t(h.COMMON$GIT_PUSH)})}),(0,Q.jsx)(K,{testId:`create-pr-button`,onClick:()=>{n(ue(i)),e()},className:ui,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(li,{width:16,height:16}),text:t(h.COMMON$CREATE_PR)})}),(0,Q.jsx)(K,{testId:`create-new-branch-button`,onClick:()=>{n(ie()),e()},className:ui,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(ni,{width:16,height:16}),text:t(h.COMMON$CREATE_NEW_BRANCH)})})]})}var fi=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:25,viewBox:`0 0 24 25`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{d:`M15.29 10.79L12.51 13.57C12.3436 13.5257 12.1723 13.5022 12 13.5C11.4696 13.5 10.9609 13.7107 10.5858 14.0858C10.2107 14.4609 10 14.9696 10 15.5C10.0023 15.6722 10.0258 15.8435 10.07 16.01L9.29003 16.79C9.1963 16.883 9.12191 16.9936 9.07114 17.1154C9.02037 17.2373 8.99423 17.368 8.99423 17.5C8.99423 17.632 9.02037 17.7627 9.07114 17.8846C9.12191 18.0064 9.1963 18.117 9.29003 18.21C9.38299 18.3037 9.49359 18.3781 9.61545 18.4289C9.73731 18.4797 9.86802 18.5058 10 18.5058C10.132 18.5058 10.2627 18.4797 10.3846 18.4289C10.5065 18.3781 10.6171 18.3037 10.71 18.21L11.49 17.43C11.6565 17.4743 11.8278 17.4978 12 17.5C12.5305 17.5 13.0392 17.2893 13.4142 16.9142C13.7893 16.5391 14 16.0304 14 15.5C13.9978 15.3278 13.9743 15.1565 13.93 14.99L16.71 12.21C16.8983 12.0217 17.0041 11.7663 17.0041 11.5C17.0041 11.2337 16.8983 10.9783 16.71 10.79C16.5217 10.6017 16.2663 10.4959 16 10.4959C15.7337 10.4959 15.4783 10.6017 15.29 10.79ZM12 4.5C10.6868 4.5 9.38645 4.75866 8.1732 5.2612C6.95994 5.76375 5.85755 6.50035 4.92896 7.42893C3.0536 9.3043 2.00003 11.8478 2.00003 14.5C1.99511 16.4806 2.58375 18.4172 3.69003 20.06C3.83855 20.2801 4.06844 20.4322 4.32911 20.4829C4.58979 20.5335 4.8599 20.4785 5.08003 20.33C5.30016 20.1815 5.45227 19.9516 5.50291 19.6909C5.55354 19.4302 5.49855 19.1601 5.35003 18.94C4.54455 17.7355 4.08131 16.3349 4.00978 14.8877C3.93826 13.4405 4.26113 12.001 4.94392 10.723C5.62671 9.44501 6.64378 8.37643 7.88653 7.63139C9.12928 6.88634 10.5511 6.49281 12 6.49281C13.449 6.49281 14.8708 6.88634 16.1135 7.63139C17.3563 8.37643 18.3734 9.44501 19.0561 10.723C19.7389 12.001 20.0618 13.4405 19.9903 14.8877C19.9188 16.3349 19.4555 17.7355 18.65 18.94C18.5763 19.0489 18.5248 19.1714 18.4985 19.3002C18.4722 19.4291 18.4716 19.5619 18.4966 19.691C18.5217 19.8201 18.572 19.943 18.6447 20.0527C18.7173 20.1623 18.8109 20.2566 18.92 20.33C19.0856 20.4412 19.2806 20.5004 19.48 20.5C19.6438 20.5002 19.8052 20.4603 19.9499 20.3835C20.0946 20.3068 20.2183 20.1957 20.31 20.06C21.4163 18.4172 22.005 16.4806 22 14.5C22 11.8478 20.9465 9.3043 19.0711 7.42893C17.1957 5.55357 14.6522 4.5 12 4.5Z`,fill:`currentColor`})}),pi=e=>(0,Q.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 20 21`,fill:`none`,...e,children:[(0,Q.jsx)(`path`,{d:`M15.9532 15.8037C16.7679 15.8037 17.4304 16.4662 17.4304 17.2809C17.4304 18.0955 16.7679 18.758 15.9532 18.758C15.1385 18.758 14.4761 18.0955 14.4761 17.2809C14.4761 16.4662 15.1385 15.8037 15.9532 15.8037ZM15.9532 14.0132C14.1538 14.0132 12.6855 15.4814 12.6855 17.2809C12.6855 19.0803 14.1538 20.5485 15.9532 20.5485C17.7527 20.5485 19.2209 19.0803 19.2209 17.2809C19.2209 15.4814 17.7527 14.0132 15.9532 14.0132Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M3.51768 15.8037C4.33236 15.8037 4.99485 16.4662 4.99485 17.2809C4.99485 18.0955 4.33236 18.758 3.51768 18.758C2.703 18.758 2.04051 18.0955 2.04051 17.2809C2.04051 16.4662 2.703 15.8037 3.51768 15.8037ZM3.51768 14.0132C1.71822 14.0132 0.25 15.4814 0.25 17.2809C0.25 19.0803 1.71822 20.5485 3.51768 20.5485C5.31714 20.5485 6.78536 19.0803 6.78536 17.2809C6.78536 15.4814 5.31714 14.0132 3.51768 14.0132Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M3.51768 2.59862C4.33236 2.59862 4.99485 3.2611 4.99485 4.07579C4.99485 4.89047 4.33236 5.55296 3.51768 5.55296C2.703 5.55296 2.04051 4.89047 2.04051 4.07579C2.04051 3.2611 2.703 2.59862 3.51768 2.59862ZM3.51768 0.808105C1.71822 0.808105 0.25 2.27632 0.25 4.07579C0.25 5.87525 1.71822 7.34347 3.51768 7.34347C5.31714 7.34347 6.78536 5.87525 6.78536 4.07579C6.78536 2.27632 5.31714 0.808105 3.51768 0.808105Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M3.51758 14.1295V6.52881`,stroke:`currentColor`,strokeWidth:2,strokeMiterlimit:10}),(0,Q.jsx)(`path`,{d:`M15.9523 14.1294V6.17058C15.9523 5.0157 15.0123 4.07568 13.8574 4.07568H11.9863`,stroke:`currentColor`,strokeWidth:2,strokeMiterlimit:10}),(0,Q.jsx)(`path`,{d:`M11.9863 7.6119L8.45898 4.07565L11.9863 0.54834V7.6119Z`,fill:`currentColor`})]}),mi=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{d:`M4 4C4 2.89543 4.89543 2 6 2H14C14.2652 2 14.5196 2.10536 14.7071 2.29289L19.7071 7.29289C19.8946 7.48043 20 7.73478 20 8V20C20 21.1046 19.1046 22 18 22H6C4.89543 22 4 21.1046 4 20V4ZM17.5858 8L14 4.41421V8H17.5858ZM12 4L6 4V20H18V10H13C12.4477 10 12 9.55228 12 9V4ZM8 13C8 12.4477 8.44772 12 9 12H15C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14H9C8.44772 14 8 13.5523 8 13ZM8 17C8 16.4477 8.44772 16 9 16H15C15.5523 16 16 16.4477 16 17C16 17.5523 15.5523 18 15 18H9C8.44772 18 8 17.5523 8 17Z`,fill:`currentColor`})}),hi=e=>(0,Q.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Q.jsx)(`path`,{d:`M2.71996 7.64998C2.91552 7.7074 3.10351 7.78797 3.27996 7.88998C3.89978 8.25991 4.60814 8.45523 5.32996 8.45523C6.05178 8.45523 6.76015 8.25991 7.37996 7.88998C7.77042 7.66914 8.21137 7.55307 8.65996 7.55307C9.10855 7.55307 9.5495 7.66914 9.93996 7.88998C10.5673 8.24867 11.2773 8.43735 12 8.43735C12.7226 8.43735 13.4327 8.24867 14.06 7.88998C14.4504 7.66914 14.8914 7.55307 15.34 7.55307C15.7885 7.55307 16.2295 7.66914 16.62 7.88998C17.2537 8.25217 17.97 8.44503 18.7 8.44998C19.4051 8.44852 20.0966 8.25492 20.7 7.88998C20.8764 7.78797 21.0644 7.7074 21.26 7.64998C21.5146 7.57572 21.7292 7.40336 21.8568 7.17081C21.9843 6.93827 22.0142 6.66459 21.94 6.40998C21.8657 6.15537 21.6933 5.94069 21.4608 5.81317C21.2282 5.68564 20.9546 5.65572 20.7 5.72998C20.3494 5.83818 20.0135 5.98932 19.7 6.17998C19.3814 6.36627 19.019 6.46446 18.65 6.46446C18.2809 6.46446 17.9185 6.36627 17.6 6.17998C16.9066 5.79105 16.1249 5.58679 15.33 5.58679C14.535 5.58679 13.7533 5.79105 13.06 6.17998C12.738 6.36703 12.3723 6.46556 12 6.46556C11.6276 6.46556 11.2619 6.36703 10.94 6.17998C10.2466 5.79105 9.46495 5.58679 8.66996 5.58679C7.87497 5.58679 7.09332 5.79105 6.39996 6.17998C6.08139 6.36627 5.719 6.46446 5.34996 6.46446C4.98092 6.46446 4.61853 6.36627 4.29996 6.17998C3.98645 5.98932 3.65057 5.83818 3.29996 5.72998C3.04535 5.65572 2.77167 5.68564 2.53913 5.81317C2.30658 5.94069 2.13422 6.15537 2.05996 6.40998C1.9857 6.66459 2.01562 6.93827 2.14315 7.17081C2.27067 7.40336 2.48535 7.57572 2.73996 7.64998H2.71996ZM20.72 15.73C20.3694 15.8382 20.0335 15.9893 19.72 16.18C19.4014 16.3663 19.039 16.4645 18.67 16.4645C18.3009 16.4645 17.9385 16.3663 17.62 16.18C16.9266 15.7911 16.1449 15.5868 15.35 15.5868C14.555 15.5868 13.7733 15.7911 13.08 16.18C12.758 16.367 12.3923 16.4656 12.02 16.4656C11.6476 16.4656 11.2819 16.367 10.96 16.18C10.2666 15.7911 9.48495 15.5868 8.68996 15.5868C7.89497 15.5868 7.11332 15.7911 6.41996 16.18C6.10139 16.3663 5.739 16.4645 5.36996 16.4645C5.00092 16.4645 4.63853 16.3663 4.31996 16.18C4.00645 15.9893 3.67057 15.8382 3.31996 15.73C3.19389 15.6932 3.06182 15.6816 2.93127 15.6959C2.80073 15.7102 2.67427 15.75 2.55913 15.8132C2.44398 15.8763 2.3424 15.9615 2.26019 16.0639C2.17797 16.1663 2.11673 16.2839 2.07996 16.41C2.04319 16.536 2.03161 16.6681 2.04589 16.7987C2.06016 16.9292 2.1 17.0557 2.16315 17.1708C2.22629 17.286 2.3115 17.3875 2.4139 17.4698C2.5163 17.552 2.63389 17.6132 2.75996 17.65C2.95552 17.7074 3.14351 17.788 3.31996 17.89C3.93978 18.2599 4.64814 18.4552 5.36996 18.4552C6.09178 18.4552 6.80015 18.2599 7.41996 17.89C7.81042 17.6691 8.25137 17.5531 8.69996 17.5531C9.14855 17.5531 9.5895 17.6691 9.97996 17.89C10.6073 18.2487 11.3173 18.4374 12.04 18.4374C12.7626 18.4374 13.4727 18.2487 14.1 17.89C14.4904 17.6691 14.9314 17.5531 15.38 17.5531C15.8285 17.5531 16.2695 17.6691 16.66 17.89C17.2937 18.2522 18.01 18.445 18.74 18.45C19.4451 18.4485 20.1366 18.2549 20.74 17.89C20.9164 17.788 21.1044 17.7074 21.3 17.65C21.5546 17.5757 21.7692 17.4034 21.8968 17.1708C22.0243 16.9383 22.0542 16.6646 21.98 16.41C21.9057 16.1554 21.7333 15.9407 21.5008 15.8132C21.2682 15.6856 20.9946 15.6557 20.74 15.73H20.72ZM20.72 10.73C20.3694 10.8382 20.0335 10.9893 19.72 11.18C19.4014 11.3663 19.039 11.4645 18.67 11.4645C18.3009 11.4645 17.9385 11.3663 17.62 11.18C16.9266 10.7911 16.1449 10.5868 15.35 10.5868C14.555 10.5868 13.7733 10.7911 13.08 11.18C12.758 11.367 12.3923 11.4656 12.02 11.4656C11.6476 11.4656 11.2819 11.367 10.96 11.18C10.2666 10.7911 9.48495 10.5868 8.68996 10.5868C7.89497 10.5868 7.11332 10.7911 6.41996 11.18C6.10139 11.3663 5.739 11.4645 5.36996 11.4645C5.00092 11.4645 4.63853 11.3663 4.31996 11.18C4.00645 10.9893 3.67057 10.8382 3.31996 10.73C3.18902 10.6805 3.04917 10.6591 2.90944 10.6672C2.76971 10.6752 2.63322 10.7125 2.5088 10.7766C2.38438 10.8406 2.2748 10.9301 2.18715 11.0393C2.0995 11.1484 2.03573 11.2747 1.99996 11.41C1.96319 11.536 1.95161 11.6681 1.96589 11.7987C1.98016 11.9292 2.02 12.0557 2.08315 12.1708C2.14629 12.286 2.2315 12.3875 2.3339 12.4698C2.4363 12.552 2.55389 12.6132 2.67996 12.65C2.87552 12.7074 3.06351 12.788 3.23996 12.89C3.85978 13.2599 4.56814 13.4552 5.28996 13.4552C6.01178 13.4552 6.72015 13.2599 7.33996 12.89C7.73042 12.6691 8.17137 12.5531 8.61996 12.5531C9.06855 12.5531 9.5095 12.6691 9.89996 12.89C10.5273 13.2487 11.2373 13.4374 11.96 13.4374C12.6826 13.4374 13.3927 13.2487 14.02 12.89C14.4104 12.6691 14.8514 12.5531 15.3 12.5531C15.7485 12.5531 16.1895 12.6691 16.58 12.89C17.2137 13.2522 17.93 13.445 18.66 13.45C19.3651 13.4485 20.0566 13.2549 20.66 12.89C20.8364 12.788 21.0244 12.7074 21.22 12.65C21.4746 12.5757 21.6892 12.4034 21.8168 12.1708C21.9443 11.9383 21.9742 11.6646 21.9 11.41C21.8257 11.1554 21.6533 10.9407 21.4208 10.8132C21.1882 10.6856 20.9146 10.6557 20.66 10.73H20.72Z`,fill:`currentColor`})}),gi=`INCREASE_TEST_COVERAGE`,_i=`I want to increase the test coverage of the repository in the current directory.
4
+
5
+ Please investigate the repo to figure out what language is being used, and where tests are located, if there are any.
6
+
7
+ If there are no tests already in the repo, add a very basic test, using typical testing strategies for the language involved.
8
+
9
+ If there are existing tests, find a function or method which lacks adequate unit tests, and add unit tests for it. Be sure to respect the projects existing test structures.
10
+
11
+ Make sure the tests pass before you finish.`,vi=`AUTO_MERGE_PRS`,yi=`Please add a GitHub action to this repository which automatically merges pull requests from Dependabot so long as the tests are passing.`,bi=`FIX_README`,xi=`Please look at the README and make the following improvements, if they make sense:
12
+ * correct any typos that you find
13
+ * add missing language annotations on codeblocks
14
+ * if there are references to other files or other sections of the README, turn them into links
15
+ * make sure the readme has an h1 title towards the top
16
+ * make sure any existing sections in the readme are appropriately separated with headings
17
+
18
+ If there are no obvious ways to improve the README, make at least one small change to make the wording clearer or friendlier`,Si=`CLEAN_DEPENDENCIES`,Ci=`Examine the dependencies of the current codebase. Make sure you can run the code and any tests.
19
+
20
+ Then run any commands necessary to update all dependencies to the latest versions, and make sure the code continues to run correctly and the tests pass. If changes need to be made to the codebase, go ahead and make those changes. You can look up documentation for new versions using the browser if you need to.
21
+
22
+ If a particular dependency update is causing trouble (e.g. breaking changes that you can't fix), you can revert it and send a message to the user explaining why.
23
+
24
+ Additionally, if you're able to prune any dependencies that are obviously unused, please do so. You may use third party tools to check for unused dependencies.`,wi=`ADD_DOCS`,Ti=`Investigate the documentation in the root of the current repo. Please add a CODE_OF_CONDUCT.md and CONTRIBUTORS.md with good defaults if they are not present. Use information in the README to inform the CONTRIBUTORS doc. If there is no LICENSE currently in the repo, please add the Apache 2.0 license. Add links to all these documents into the README`,Ei=`ADD_DOCKERFILE`,Di=`Investigate the current repo to understand the installation instructions. Then create a Dockerfile that runs the application, using best practices like arguments and multi-stage builds wherever appropriate.
25
+
26
+ If there is an existing Dockerfile, and there are ways to improve it according to best practices, do so.`,Oi={[gi]:_i,[vi]:yi,[bi]:xi,[Si]:Ci,[wi]:Ti,[Ei]:Di},ki=`!w-auto whitespace-nowrap`;function Ai({onClose:e}){let{t}=m(`openhands`),{setMessageToSend:n}=W();return(0,Q.jsxs)(G,{testId:`macros-submenu`,className:`overflow-visible`,children:[(0,Q.jsx)(K,{testId:`increase-test-coverage-button`,onClick:()=>{n(Oi.INCREASE_TEST_COVERAGE),e()},className:ki,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(fi,{width:16,height:16}),text:t(h.INCREASE_TEST_COVERAGE)})}),(0,Q.jsx)(K,{testId:`fix-readme-button`,onClick:()=>{n(Oi.FIX_README),e()},className:ki,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(mi,{width:16,height:16}),text:t(h.FIX_README)})}),(0,Q.jsx)(K,{testId:`auto-merge-prs-button`,onClick:()=>{n(Oi.AUTO_MERGE_PRS),e()},className:ki,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(pi,{width:16,height:16}),text:t(h.AUTO_MERGE_PRS)})}),(0,Q.jsx)(K,{testId:`clean-dependencies-button`,onClick:()=>{n(Oi.CLEAN_DEPENDENCIES),e()},className:ki,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(hi,{width:16,height:16}),text:t(h.CLEAN_DEPENDENCIES)})})]})}function ji({isDisabled:e,children:t,placement:n=`right`}){let{t:r}=m(`openhands`);return e?(0,Q.jsx)(De,{content:r(h.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES),placement:n,tooltipClassName:`bg-white text-black text-xs font-medium leading-5`,children:(0,Q.jsx)(`span`,{className:`block w-full`,children:t})}):t}function Mi(){let{data:e}=Y();return We(e?.sandbox_status)}function Ni({onClose:e,onShowSkills:t,onShowPlugins:n,onShowHooks:r,onShowAgentTools:i,shouldShowAgentTools:a=!0,shouldShowHooks:o=!1,shouldShowPlugins:s=!1,footerAction:c}){let{t:l}=m(`openhands`),{data:u}=Y(),{providers:d}=Ye(),f=Mi(),[p,g]=(0,X.useState)(null),_=!!u?.selected_repository,v=d.length>0,y=_&&v,b=e=>{f||g(p===e?null:e)},x=()=>{g(null),e()};return(0,Q.jsxs)(G,{ref:ht(x),testId:`tools-context-menu`,position:`top`,alignment:`left`,className:`left-[-16px] mb-2 bottom-full overflow-visible min-w-[200px]`,children:[y&&(0,Q.jsxs)(`div`,{className:`relative group/git`,children:[(0,Q.jsx)(ji,{isDisabled:f,children:(0,Q.jsx)(K,{testId:`git-tools-button`,onClick:()=>b(`git`),isDisabled:f,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(ni,{width:16,height:16}),text:l(h.COMMON$GIT_TOOLS),rightIcon:(0,Q.jsx)(oi,{width:10,height:10})})})}),!f&&(0,Q.jsx)(`div`,{className:U(`absolute left-full top-[-6px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/git:opacity-100 group-hover/git:visible group-hover/git:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,p===`git`&&`opacity-100 visible pointer-events-auto`),children:(0,Q.jsx)(di,{onClose:x})})]}),(0,Q.jsxs)(`div`,{className:`relative group/macros`,children:[(0,Q.jsx)(ji,{isDisabled:f,children:(0,Q.jsx)(K,{testId:`macros-button`,onClick:()=>b(`macros`),isDisabled:f,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(ai,{width:16,height:16}),text:l(h.COMMON$MACROS),rightIcon:(0,Q.jsx)(oi,{width:10,height:10})})})}),!f&&(0,Q.jsx)(`div`,{className:U(`absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/macros:opacity-100 group-hover/macros:visible group-hover/macros:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,p===`macros`&&`opacity-100 visible pointer-events-auto`),children:(0,Q.jsx)(Ai,{onClose:x})})]}),a&&(0,Q.jsx)(Ie,{inset:`menu`}),(0,Q.jsx)(ji,{isDisabled:f,children:(0,Q.jsx)(K,{testId:`show-skills-button`,onClick:t,isDisabled:f,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(Tt,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:l(h.CONVERSATION$SHOW_SKILLS)})})}),s&&(0,Q.jsx)(ji,{isDisabled:f,children:(0,Q.jsx)(K,{testId:`show-plugins-button`,onClick:n,isDisabled:f,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(ri,{width:16,height:16,"aria-hidden":!0}),text:l(h.CONVERSATION$SHOW_PLUGINS)})})}),o&&(0,Q.jsx)(ji,{isDisabled:f,children:(0,Q.jsx)(K,{testId:`show-hooks-button`,onClick:r,isDisabled:f,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(ii,{width:16,height:16,"aria-hidden":!0}),text:l(h.CONVERSATION$SHOW_HOOKS)})})}),a&&(0,Q.jsx)(ji,{isDisabled:f,children:(0,Q.jsx)(K,{testId:`show-agent-tools-button`,onClick:i,isDisabled:f,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(qe,{width:16,height:16}),text:l(h.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})})}),c&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Ie,{}),(0,Q.jsx)(K,{testId:c.testId,onClick:e=>{e.preventDefault(),e.stopPropagation(),c.onClick(),x()},children:(0,Q.jsx)($,{icon:c.icon,text:c.label})})]})]})}function Pi({agentClass:e,openhandsVersion:t,onClose:n}){let{t:r}=m(`openhands`);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(rt,{onClose:n,testId:`close-system-message-modal`}),(0,Q.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col gap-2 pr-6`,children:[(0,Q.jsx)(ve,{title:r(h.SYSTEM_MESSAGE_MODAL$TITLE)}),(e||t)&&(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e&&(0,Q.jsxs)(`div`,{className:`text-sm`,children:[(0,Q.jsx)(q.Text,{className:`font-semibold text-[var(--oh-text-tertiary)]`,children:r(h.SYSTEM_MESSAGE_MODAL$AGENT_CLASS)}),` `,(0,Q.jsx)(q.Text,{className:`font-medium text-content-2`,children:e})]}),t&&(0,Q.jsxs)(`div`,{className:`text-sm`,children:[(0,Q.jsx)(q.Text,{className:`font-semibold text-[var(--oh-text-tertiary)]`,children:r(h.SYSTEM_MESSAGE_MODAL$OPENHANDS_VERSION)}),` `,(0,Q.jsx)(q.Text,{className:`text-content-2`,children:t})]})]})]})]})}function Fi({isActive:e,children:t,onClick:n,className:r,disabled:i=!1}){return(0,Q.jsx)(`button`,{type:`button`,disabled:i,className:U(`px-4 py-2 font-normal border-b-2 transition-colors`,e?`border-foreground text-foreground`:`border-transparent text-[var(--oh-muted)] hover:text-[var(--oh-foreground)]`,i&&`opacity-50 cursor-not-allowed`,r),onClick:n,"aria-selected":e,role:`tab`,children:t})}function Ii({activeTab:e,onTabChange:t,hasTools:n}){let{t:r}=m(`openhands`);return(0,Q.jsxs)(`div`,{className:`mb-2 flex border-b border-[var(--oh-border)]`,role:`tablist`,children:[(0,Q.jsx)(Fi,{isActive:e===`system`,onClick:()=>t(`system`),children:r(h.SYSTEM_MESSAGE_MODAL$SYSTEM_MESSAGE_TAB)}),n&&(0,Q.jsx)(Fi,{isActive:e===`tools`,onClick:()=>t(`tools`),children:r(h.SYSTEM_MESSAGE_MODAL$TOOLS_TAB)})]})}var Li=Fe(`whitespace-pre-wrap`,{variants:{size:{default:`text-sm`,small:`text-xs`},font:{default:``,mono:`font-mono`},lineHeight:{default:``,relaxed:`leading-relaxed`},background:{default:``,dark:`bg-base`},textColor:{default:``,light:`text-[var(--oh-text-tertiary)]`},padding:{default:``,medium:`p-3`,large:`px-5`},borderRadius:{default:``,medium:`rounded-md`},shadow:{default:``,inner:`shadow-inner`},maxHeight:{default:``,small:`max-h-[400px]`,large:`max-h-[60vh]`},overflow:{default:``,auto:`overflow-auto`}},defaultVariants:{size:`default`,font:`default`,lineHeight:`default`,background:`default`,textColor:`default`,padding:`default`,borderRadius:`default`,shadow:`default`,maxHeight:`default`,overflow:`default`}});function Ri({size:e,font:t,lineHeight:n,background:r,textColor:i,padding:a,borderRadius:o,shadow:s,maxHeight:c,overflow:l,className:u,testId:d,children:f}){return(0,Q.jsx)(`pre`,{"data-testid":d,className:U(Li({size:e,font:t,lineHeight:n,background:r,textColor:i,padding:a,borderRadius:o,shadow:s,maxHeight:c,overflow:l}),u),children:f})}function zi({content:e}){return(0,Q.jsx)(Ri,{size:`small`,font:`mono`,lineHeight:`relaxed`,padding:`medium`,className:`text-[var(--oh-text-tertiary)]`,children:e})}function Bi({parameters:e}){let{t}=m(`openhands`);return(0,Q.jsxs)(`div`,{className:`mt-2`,"data-testid":`tool-parameters`,children:[(0,Q.jsx)(q.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)]`,children:t(h.SYSTEM_MESSAGE_MODAL$PARAMETERS)}),(0,Q.jsx)(`div`,{className:`text-sm mt-2 p-3 bg-base rounded-md overflow-auto text-[var(--oh-text-tertiary)] max-h-[400px] border border-[var(--oh-border)]`,children:(0,Q.jsx)(N,{name:!1,src:e,theme:oe})})]})}function Vi({title:e,isExpanded:t,onClick:n,className:r}){return(0,Q.jsxs)(`button`,{type:`button`,"data-testid":`toggle-button`,onClick:n,className:U(`w-full py-3 px-3 text-left flex items-center justify-between hover:bg-tertiary transition-colors`,r),children:[(0,Q.jsx)(`div`,{className:`flex items-center`,children:(0,Q.jsx)(q.Text,{className:`font-bold text-content-2`,children:e})}),(0,Q.jsx)(q.Text,{className:`text-[var(--oh-text-tertiary)]`,children:t?(0,Q.jsx)(k,{size:18}):(0,Q.jsx)(c,{size:18})})]})}function Hi({tool:e,index:t,isExpanded:n,onToggle:r}){let i=e,a=i.function||i,o=i.title||i.annotations?.title||a.name||i.type===`function`&&i.function?.name||``,s=i.description||a.description||i.type===`function`&&i.function?.description||``,c=a.parameters||i.type===`function`&&i.function?.parameters||i.parameters||null;return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Vi,{title:String(o),isExpanded:n,onClick:()=>r(t)}),n&&(0,Q.jsxs)(`div`,{className:`px-3 pb-3 pt-1 border-t border-[var(--oh-border)]`,children:[(0,Q.jsx)(`div`,{className:`mt-2 mb-3 text-sm text-[var(--oh-text-tertiary)] leading-relaxed`,children:(0,Q.jsx)(Yt,{children:String(s)})}),c&&(0,Q.jsx)(Bi,{parameters:c})]})]})}function Ui({tools:e,expandedTools:t,onToggleTool:n}){return(0,Q.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:e.map((e,r)=>(0,Q.jsx)(Hi,{tool:e,index:r,isExpanded:t[r]||!1,onToggle:n},r))})}function Wi(){let{t:e}=m(`openhands`);return(0,Q.jsx)(`div`,{className:`flex items-center justify-center h-full p-4`,children:(0,Q.jsx)(q.Text,{className:`text-[var(--oh-muted)]`,children:e(h.SYSTEM_MESSAGE_MODAL$NO_TOOLS)})})}function Gi({activeTab:e,systemMessage:t,expandedTools:n,onToggleTool:r}){return e===`system`?(0,Q.jsx)(zi,{content:t.content}):e===`tools`?t.tools&&t.tools.length>0?(0,Q.jsx)(Ui,{tools:t.tools,expandedTools:n,onToggleTool:r}):(0,Q.jsx)(Wi,{}):null}function Ki({isOpen:e,onClose:t,systemMessage:n}){let[r,i]=(0,X.useState)(`system`),[a,o]=(0,X.useState)({});return n?e&&(0,Q.jsx)(ge,{onClose:t,children:(0,Q.jsxs)(_e,{width:`lg`,className:`relative max-h-[80vh] flex flex-col items-start border border-[var(--oh-border)]`,testID:`system-message-modal`,children:[(0,Q.jsx)(Pi,{agentClass:n.agent_class,openhandsVersion:n.openhands_version,onClose:t}),(0,Q.jsxs)(`div`,{className:`w-full`,children:[(0,Q.jsx)(Ii,{activeTab:r,onTabChange:i,hasTools:!!(n.tools&&n.tools.length>0)}),(0,Q.jsx)(`div`,{className:`h-[60vh] overflow-auto rounded-md border border-[var(--oh-border)] bg-surface-raised custom-scrollbar-always`,children:(0,Q.jsx)(Gi,{activeTab:r,systemMessage:n,expandedTools:a,onToggleTool:e=>{o(t=>({...t,[e]:!t[e]}))}})})]})]})}):null}var qi=[`project`,`personal`,`public`],Ji=[`/.agents/skills/`,`/.openhands/skills/`,`/.openhands/microagents/`];function Yi(e){return e.replace(/\\/g,`/`)}function Xi(e){let t=Yi(e).toLowerCase();return t===`public`?!0:t.includes(`public-skills`)||t.includes(`/.openhands/cache/skills/`)}function Zi(e){let t=Yi(e);return/^\/Users\/[^/]+\/\.(agents|openhands)\//.test(t)||/^\/home\/[^/]+\/\.(agents|openhands)\//.test(t)?!0:Ji.some(e=>{let n=t.indexOf(e);if(n===-1)return!1;let r=t.slice(0,n);return/^\/Users\/[^/]+$/.test(r)||/^\/home\/[^/]+$/.test(r)})}function Qi(e,t){let n=Yi(e);if(!Ji.some(e=>n.includes(e))||Zi(e))return!1;if(t){let e=Yi(t).replace(/\/$/,``);if(n.startsWith(e))return!0}return!0}function $i(e,t){let n=e.source?.trim();if(!n)return e.type===`repo`?`project`:`public`;let r=n.toLowerCase();return Xi(n)?`public`:r===`user`||r===`global`?`personal`:r===`project`||r===`repo`||r===`sandbox`?`project`:Zi(n)?`personal`:Qi(n,t)?`project`:`public`}function ea(e,t){let n={project:[],personal:[],public:[]};for(let r of e)n[$i(r,t)].push(r);for(let e of qi)n[e].sort((e,t)=>e.name.localeCompare(t.name));return n}var ta=`rounded-md p-1 text-white hover:bg-tertiary cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed`;function na({isLoading:e,isRefetching:t,onRefresh:n,onClose:r}){let{t:i}=m(`openhands`),a=i(h.BUTTON$REFRESH);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(rt,{onClose:r,testId:`close-skills-modal`}),(0,Q.jsxs)(`div`,{className:`flex w-full items-start justify-between gap-4 pr-10`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[(0,Q.jsx)(ve,{title:i(h.SKILLS_MODAL$TITLE)}),(0,Q.jsx)(q.Text,{className:`text-sm text-[var(--oh-muted)]`,children:i(h.SKILLS_MODAL$WARNING)})]}),(0,Q.jsx)(De,{content:a,placement:`bottom`,children:(0,Q.jsx)(`button`,{type:`button`,"data-testid":`refresh-skills`,onClick:n,disabled:e||t,"aria-label":a,className:ta,children:(0,Q.jsx)(te,{size:18,className:U(t&&`animate-spin`),"aria-hidden":!0})})})]})]})}function ra({title:e,count:t,children:n}){return(0,Q.jsxs)(`section`,{className:`w-full`,children:[(0,Q.jsx)(`div`,{className:`sticky top-0 z-10 border-b border-[var(--oh-border)] bg-surface-raised px-3 py-2`,children:(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,Q.jsx)(q.Text,{className:`text-xs font-medium tracking-[0.01em] text-tertiary-light`,children:e}),(0,Q.jsx)(`span`,{className:`inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`,children:t})]})}),(0,Q.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:n})]})}function ia(){return(0,Q.jsx)(`div`,{className:`flex justify-center items-center py-8`,children:(0,Q.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-white`})})}function aa({isError:e}){let{t}=m(`openhands`);return(0,Q.jsx)(`div`,{className:`flex items-center justify-center h-full p-4`,children:(0,Q.jsx)(q.Text,{className:`text-[var(--oh-muted)]`,children:t(e?h.COMMON$FETCH_ERROR:h.CONVERSATION$NO_SKILLS)})})}function oa({triggers:e}){let{t}=m(`openhands`);return!e||e.length===0?null:(0,Q.jsxs)(`div`,{className:`mt-2 mb-3`,children:[(0,Q.jsx)(q.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)] mb-2`,children:t(h.COMMON$TRIGGERS)}),(0,Q.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:e.map(e=>(0,Q.jsx)(`span`,{className:`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`,children:e},e))})]})}function sa({content:e}){let{t}=m(`openhands`);return(0,Q.jsxs)(`div`,{className:`mt-2`,children:[(0,Q.jsx)(q.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)] mb-2`,children:t(h.COMMON$CONTENT)}),(0,Q.jsx)(Ri,{size:`small`,font:`mono`,lineHeight:`relaxed`,padding:`medium`,borderRadius:`medium`,maxHeight:`small`,overflow:`auto`,className:`mt-2 border border-[var(--oh-border)] bg-base text-[var(--oh-text-tertiary)]`,children:e||t(h.SKILLS_MODAL$NO_CONTENT)})]})}var ca={knowledge:`Knowledge`,repo:`Repository`,agentskills:`AgentSkills`},la=`inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`;function ua({skill:e,isExpanded:t,onToggle:n}){return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>n(e.name),className:`w-full py-3 px-3 text-left flex items-center justify-between hover:bg-tertiary transition-colors`,children:[(0,Q.jsx)(`div`,{className:`flex items-center`,children:(0,Q.jsx)(q.Text,{className:`font-bold text-content-2`,children:e.name})}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:la,children:ca[e.type]}),(0,Q.jsx)(q.Text,{className:`text-[var(--oh-text-tertiary)]`,children:t?(0,Q.jsx)(k,{size:18}):(0,Q.jsx)(c,{size:18})})]})]}),t&&(0,Q.jsxs)(`div`,{className:`px-3 pb-3 pt-1 border-t border-[var(--oh-border)]`,children:[(0,Q.jsx)(oa,{triggers:e.triggers??[]}),(0,Q.jsx)(sa,{content:e.content??``})]})]})}var da={project:h.SKILLS_MODAL$SECTION_PROJECT,personal:h.SKILLS_MODAL$SECTION_USER,public:h.SKILLS_MODAL$SECTION_PUBLIC};function fa({onClose:e}){let{t}=m(`openhands`),n=he(),[r,i]=(0,X.useState)({}),{data:a,isLoading:o,isError:s,refetch:c,isRefetching:l}=Mn(),u=(0,X.useMemo)(()=>a?ea(a,n):null,[a,n]),d=e=>{i(t=>({...t,[e]:!t[e]}))};return(0,Q.jsx)(ge,{onClose:e,children:(0,Q.jsxs)(_e,{width:`lg`,className:`relative max-h-[80vh] flex flex-col items-start border border-[var(--oh-border)]`,testID:`skills-modal`,children:[(0,Q.jsx)(na,{isLoading:o,isRefetching:l,onRefresh:c,onClose:e}),(0,Q.jsx)(`div`,{className:`w-full h-[60vh] overflow-auto rounded-md border border-[var(--oh-border)] bg-surface-raised custom-scrollbar-always`,children:o?(0,Q.jsx)(ia,{}):s||!a||a.length===0?(0,Q.jsx)(aa,{isError:s}):u&&(0,Q.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:qi.map(e=>{let n=u[e];return n.length===0?null:(0,Q.jsx)(ra,{title:t(da[e]),count:n.length,children:n.map(t=>(0,Q.jsx)(ua,{skill:t,isExpanded:r[t.name]||!1,onToggle:d},`${e}-${t.name}`))},e)})})})]})})}function pa(){let{conversationId:e}=J();return(0,X.useMemo)(()=>e?ot(e)?.plugins??[]:[],[e])}function ma({onClose:e}){let{t}=m(`openhands`),n=pa();return(0,Q.jsx)(ge,{onClose:e,children:(0,Q.jsxs)(_e,{width:`lg`,className:`relative flex max-h-[80vh] flex-col items-start border border-[var(--oh-border)]`,testID:`plugins-modal`,children:[(0,Q.jsx)(rt,{onClose:e,testId:`close-plugins-modal`}),(0,Q.jsxs)(`div`,{className:`flex w-full flex-col gap-2 pr-10`,children:[(0,Q.jsx)(ve,{title:t(h.PLUGINS_MODAL$TITLE)}),(0,Q.jsx)(q.Text,{className:`text-sm text-[var(--oh-muted)]`,children:t(h.PLUGINS_MODAL$DESCRIPTION)})]}),(0,Q.jsx)(`div`,{className:`w-full overflow-auto rounded-md border border-[var(--oh-border)] bg-surface-raised custom-scrollbar-always`,children:n.length===0?(0,Q.jsx)(`div`,{className:`flex items-center justify-center p-6`,children:(0,Q.jsx)(q.Text,{className:`text-[var(--oh-muted)]`,children:t(h.PLUGINS_MODAL$EMPTY)})}):(0,Q.jsx)(`ul`,{className:`divide-y divide-[var(--oh-border)]`,children:n.map(e=>(0,Q.jsxs)(`li`,{"data-testid":`active-plugin-${bt(e)}`,className:`flex flex-col gap-1 p-4`,children:[(0,Q.jsx)(q.Text,{className:`font-semibold text-white`,children:bt(e)}),(0,Q.jsx)(q.Text,{className:`text-xs text-tertiary-alt`,children:yt(e)?t(h.PLUGINS_MODAL$SOURCE_LOCAL):xt(e)})]},vt(e)))})})]})})}var ha=()=>{let{conversationId:e}=jt(),{curAgentState:t}=Pt();return f({queryKey:[`conversation`,e,`hooks`],queryFn:async()=>{if(!e)throw Error(`No conversation ID provided`);let{hooks:t}=await ct.getHooks(e);return t},enabled:!!e&&t!==L.LOADING&&t!==L.INIT,staleTime:1e3*60*5,gcTime:1e3*60*15})},ga=`rounded-md p-1 text-white hover:bg-tertiary cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed`;function _a({isLoading:e,isRefetching:t,onRefresh:n,onClose:r}){let{t:i}=m(`openhands`),a=i(h.BUTTON$REFRESH);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(rt,{onClose:r,testId:`close-hooks-modal`}),(0,Q.jsxs)(`div`,{className:`flex w-full items-start justify-between gap-4 pr-10`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[(0,Q.jsx)(ve,{title:i(h.HOOKS_MODAL$TITLE)}),(0,Q.jsx)(q.Text,{className:`text-sm text-[var(--oh-muted)]`,children:i(h.HOOKS_MODAL$WARNING)})]}),(0,Q.jsx)(De,{content:a,placement:`bottom`,children:(0,Q.jsx)(`button`,{type:`button`,"data-testid":`refresh-hooks`,onClick:n,disabled:e||t,"aria-label":a,className:ga,children:(0,Q.jsx)(te,{size:18,className:U(t&&`animate-spin`),"aria-hidden":!0})})})]})]})}function va(){return(0,Q.jsx)(`div`,{className:`flex justify-center items-center py-8`,children:(0,Q.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-white`})})}function ya({isError:e}){let{t}=m(`openhands`);return(0,Q.jsx)(`div`,{className:`flex items-center justify-center h-full p-4`,children:(0,Q.jsx)(q.Text,{className:`text-[var(--oh-muted)]`,children:t(e?h.COMMON$FETCH_ERROR:h.CONVERSATION$NO_HOOKS)})})}var ba=`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`;function xa({matcher:e}){let{t}=m(`openhands`);return(0,Q.jsxs)(`div`,{className:`py-3`,children:[(0,Q.jsxs)(`div`,{className:`mb-2`,children:[(0,Q.jsx)(q.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)]`,children:t(h.HOOKS_MODAL$MATCHER)}),(0,Q.jsx)(`span`,{className:`ml-2 ${ba}`,children:e.matcher})]}),(0,Q.jsxs)(`div`,{className:`mt-2`,children:[(0,Q.jsx)(q.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)] mb-2`,children:t(h.HOOKS_MODAL$COMMANDS)}),(e.hooks??[]).map((e,n)=>(0,Q.jsxs)(`div`,{className:`mt-2`,children:[(0,Q.jsx)(Ri,{size:`small`,font:`mono`,lineHeight:`relaxed`,padding:`medium`,borderRadius:`medium`,maxHeight:`small`,overflow:`auto`,className:`border border-[var(--oh-border)] bg-base text-[var(--oh-text-tertiary)]`,children:e.command}),(0,Q.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2 text-xs text-[var(--oh-muted)]`,children:[(0,Q.jsx)(`span`,{className:ba,children:t(h.HOOKS_MODAL$TYPE,{type:e.type})}),(0,Q.jsx)(`span`,{className:ba,children:t(h.HOOKS_MODAL$TIMEOUT,{timeout:e.timeout})}),e.async?(0,Q.jsx)(`span`,{className:ba,children:t(h.HOOKS_MODAL$ASYNC)}):null]})]},`${e.command}-${n}`))]})]})}var Sa={pre_tool_use:h.HOOKS_MODAL$EVENT_PRE_TOOL_USE,post_tool_use:h.HOOKS_MODAL$EVENT_POST_TOOL_USE,user_prompt_submit:h.HOOKS_MODAL$EVENT_USER_PROMPT_SUBMIT,session_start:h.HOOKS_MODAL$EVENT_SESSION_START,session_end:h.HOOKS_MODAL$EVENT_SESSION_END,stop:h.HOOKS_MODAL$EVENT_STOP},Ca=`inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`,wa=`HOOKS_MODAL$HOOK_COUNT`;function Ta({hookEvent:e,isExpanded:t,onToggle:n}){let{t:r}=m(`openhands`),i=Sa[e.event_type],a=i?r(i):e.event_type,o=e.matchers.reduce((e,t)=>e+(t.hooks??[]).length,0);return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>n(e.event_type),className:`w-full py-3 px-3 text-left flex items-center justify-between hover:bg-tertiary transition-colors`,children:[(0,Q.jsx)(`div`,{className:`flex items-center`,children:(0,Q.jsx)(q.Text,{className:`font-bold text-content-2`,children:a})}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:Ca,children:r(wa,{count:o})}),(0,Q.jsx)(q.Text,{className:`text-[var(--oh-text-tertiary)]`,children:t?(0,Q.jsx)(k,{size:18}):(0,Q.jsx)(c,{size:18})})]})]}),t&&(0,Q.jsx)(`div`,{className:`border-t border-[var(--oh-border)] px-3 pt-3 pb-3`,children:(0,Q.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:e.matchers.map((t,n)=>(0,Q.jsx)(xa,{matcher:t},`${e.event_type}-${t.matcher}-${n}`))})})]})}function Ea({onClose:e}){let{curAgentState:t}=Pt(),[n,r]=(0,X.useState)({}),{data:i,isLoading:a,isError:o,refetch:s,isRefetching:c}=ha(),l=e=>{r(t=>({...t,[e]:!t[e]}))},u=![L.LOADING,L.INIT].includes(t);return(0,Q.jsx)(ge,{onClose:e,children:(0,Q.jsxs)(_e,{width:`lg`,className:`relative max-h-[80vh] flex flex-col items-start border border-[var(--oh-border)]`,testID:`hooks-modal`,children:[(0,Q.jsx)(_a,{isLoading:a,isRefetching:c,onRefresh:s,onClose:e}),(0,Q.jsx)(`div`,{className:`w-full h-[60vh] overflow-auto rounded-md border border-[var(--oh-border)] bg-surface-raised custom-scrollbar-always`,children:u?a?(0,Q.jsx)(va,{}):o||!i||i.length===0?(0,Q.jsx)(ya,{isError:o}):(0,Q.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:i.map(e=>(0,Q.jsx)(Ta,{hookEvent:e,isExpanded:n[e.event_type]||!1,onToggle:l},e.event_type))}):(0,Q.jsx)(Xt,{testId:`hooks-runtime-waiting`})})]})})}function Da({handleFileIconClick:e,disabled:t=!1}){let{t:n}=m(`openhands`),{conversationId:r}=J(),{data:i}=Y(),[a,o]=X.useState(!1),{handleShowAgentTools:s,handleShowSkills:c,handleShowPlugins:l,handleShowHooks:u,systemModalVisible:d,setSystemModalVisible:f,skillsModalVisible:p,setSkillsModalVisible:g,pluginsModalVisible:_,setPluginsModalVisible:v,hooksModalVisible:y,setHooksModalVisible:b,systemMessage:x,shouldShowAgentTools:S,shouldShowHooks:C,shouldShowPlugins:w}=ti({conversationId:r??void 0,executionStatus:i?.execution_status,showOptions:!0,onContextMenuToggle:o});return(0,Q.jsxs)(`div`,{className:`relative`,children:[(0,Q.jsx)(`button`,{type:`button`,className:U(Se,`relative shrink-0 size-6`,t?`cursor-not-allowed text-[var(--oh-text-subtle)]`:void 0,a&&!t&&`text-white bg-white/10`),"aria-label":n(h.CHAT_INTERFACE$PLUS_MENU),"aria-expanded":a,"aria-haspopup":`menu`,"data-testid":`chat-plus-button`,onClick:e=>{e.preventDefault(),e.stopPropagation(),!t&&o(e=>!e)},disabled:t,children:(0,Q.jsx)(`span`,{className:`flex h-full w-full items-center justify-center`,children:(0,Q.jsx)(ee,{className:`h-[13px] w-[13px] shrink-0`,strokeWidth:2})})}),a&&(0,Q.jsx)(Ni,{onClose:()=>o(!1),onShowSkills:c,onShowPlugins:l,onShowHooks:u,onShowAgentTools:s,shouldShowAgentTools:S,shouldShowHooks:C,shouldShowPlugins:w,footerAction:{testId:`add-files-and-images-button`,icon:(0,Q.jsx)(j,{className:`h-4 w-4 shrink-0`,strokeWidth:2,"aria-hidden":!0}),label:n(h.CHAT_INTERFACE$ADD_FILES_AND_IMAGES),onClick:e}}),(0,Q.jsx)(Ki,{isOpen:d,onClose:()=>f(!1),systemMessage:x||null}),p&&(0,Q.jsx)(fa,{onClose:()=>g(!1)}),_&&(0,Q.jsx)(ma,{onClose:()=>v(!1)}),y&&(0,Q.jsx)(Ea,{onClose:()=>b(!1)})]})}var Oa=()=>{let e=i();return d({mutationFn:e=>u(e.conversationId),onMutate:async()=>(await e.cancelQueries({queryKey:[`user`,`conversations`]}),{previousConversations:e.getQueryData([`user`,`conversations`])}),onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]})}})},ka=()=>{let e=i();return d({mutationFn:e=>o(e.conversationId),onMutate:async()=>(await e.cancelQueries({queryKey:[`user`,`conversations`]}),{previousConversations:e.getQueryData([`user`,`conversations`])}),onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]}),e.invalidateQueries({queryKey:[`unified`,`vscode_url`]})}})};function Aa({disabled:e,canSubmit:t=!0,onAddFileClick:n=()=>{},showButton:r=!0,buttonClassName:i=``,handleSubmit:a=()=>{}}){let{t:o}=m(`openhands`),s=Ve(),c=Oa(),l=ka(),{conversationId:u}=J(),{backend:d}=S(),f=d.kind===`cloud`,p=Ar(),g=_t({enabled:!u}),_=g.isFetched&&(g.data?.profiles?.length??0)===0,v=f&&!p.isAcpContext,y=$n(),{curAgentState:b}=Pt(),{conversationMode:x,setConversationMode:C}=W(),{handlePlanClick:w,isCreatingConversation:T}=Gt(),E=X.useRef(null),O=X.useRef(null),k=X.useRef(null),j=X.useRef(null),M=X.useRef(null),N=X.useRef(null),[P,F]=X.useState(1/0),[I,ee]=X.useState(0),[te,ne]=X.useState(32),[R,re]=X.useState(96),[ie,ae]=X.useState(120),[z,B]=X.useState(!1),[V,H]=X.useState(null),[oe,se]=X.useState();X.useEffect(()=>{let e=E.current,t=O.current,n=k.current,r=j.current,i=M.current;if(!e||!t||!n||!i||v&&!r||typeof ResizeObserver>`u`)return;let a=()=>{let a=e.getBoundingClientRect().width,o=t.getBoundingClientRect().width,s=n.getBoundingClientRect().width,c=i.getBoundingClientRect().width;if(a>0&&F(a),o>0&&ee(o),s>0&&ne(s),c>0&&ae(c),r){let e=r.getBoundingClientRect().width;e>0&&re(e)}},o=new ResizeObserver(()=>{a()});return o.observe(e),o.observe(t),o.observe(n),o.observe(i),r&&o.observe(r),a(),()=>o.disconnect()},[v]);let ce=()=>{u&&c.mutate({conversationId:u})},le=()=>{u&&l.mutate({conversationId:u})},ue=s.isPending||c.isPending,de=X.useCallback(e=>{let t=e,n={showCodeInline:!1,showModelInline:!1};return v&&t>=R&&(n.showCodeInline=!0,t-=R+12),t>=ie&&(n.showModelInline=!0),n},[v,R,ie]),fe=P-I-8-te-12,pe=de(fe),me=(!v||pe.showCodeInline)&&pe.showModelInline?pe:de(fe-28-12),he=v?me.showCodeInline:!1,ge=me.showModelInline,_e=P>=360,ve=v&&!he||!ge;X.useEffect(()=>{ve||(B(!1),H(null))},[ve]);let be=ht(()=>{B(!1),H(null)}),xe=b===L.RUNNING||T||y!==`OPEN`,Ce=()=>{H(null),B(!1)},we=Xr({hasConversation:!!u,isCloud:f,isAcp:p.isAcpContext,profilesAvailable:!_}),Te=U(`group`,ye),Ee=U(`text-[var(--oh-muted)] group-hover:text-[var(--oh-foreground)]`,ye);X.useLayoutEffect(()=>{if(!z||!N.current)return;let e=N.current,t=()=>{let t=e.getBoundingClientRect();se({position:`fixed`,top:t.top-8,left:t.left,transform:`translateY(-100%)`,zIndex:9999})};return t(),window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0)}},[z]);let De=(0,Q.jsxs)(G,{ref:be,testId:`chat-input-overflow-menu`,position:`top`,alignment:`left`,className:`!static !top-auto !bottom-auto !left-auto !right-auto !mt-0 overflow-visible min-w-[200px]`,children:[v&&!he&&(0,Q.jsxs)(`div`,{className:`relative group/overflow-agent`,children:[(0,Q.jsx)(K,{testId:`overflow-agent-button`,onClick:()=>H(e=>e===`agent`?null:`agent`),isDisabled:xe,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(wr,{className:`h-[11px] w-[11px]`}),text:o(x===`code`?h.COMMON$CODE:h.COMMON$PLAN),rightIcon:(0,Q.jsx)(oi,{width:10,height:10})})}),!xe&&(0,Q.jsx)(`div`,{className:U(`absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/overflow-agent:opacity-100 group-hover/overflow-agent:visible group-hover/overflow-agent:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,V===`agent`&&`opacity-100 visible pointer-events-auto`),children:(0,Q.jsxs)(G,{testId:`overflow-agent-submenu`,className:`overflow-visible min-w-[195px]`,children:[(0,Q.jsx)(K,{testId:`overflow-agent-code`,onClick:e=>{e.preventDefault(),e.stopPropagation(),C(`code`),Ce()},children:(0,Q.jsx)($,{icon:(0,Q.jsx)(wr,{className:`h-[11px] w-[11px]`}),text:o(h.COMMON$CODE)})}),(0,Q.jsx)(K,{testId:`overflow-agent-plan`,onClick:e=>{w(e),Ce()},children:(0,Q.jsx)($,{icon:(0,Q.jsx)(Bt,{width:16,height:16,color:`currentColor`}),text:o(h.COMMON$PLAN)})})]})})]}),!ge&&(0,Q.jsxs)(`div`,{className:`relative group/overflow-model`,children:[(0,Q.jsx)(K,{testId:`overflow-model-button`,onClick:()=>H(e=>e===`model`?null:`model`),children:(0,Q.jsx)($,{icon:(0,Q.jsx)(A,{width:16,height:16,strokeWidth:2,"aria-hidden":!0}),text:o(h.SETTINGS$AGENT_MODEL),rightIcon:(0,Q.jsx)(oi,{width:10,height:10})})}),(0,Q.jsx)(`div`,{className:U(`absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/overflow-model:opacity-100 group-hover/overflow-model:visible group-hover/overflow-model:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,V===`model`&&`opacity-100 visible pointer-events-auto`),children:(0,Q.jsx)(G,{testId:`overflow-model-submenu`,className:`min-w-[220px] max-w-[320px] max-h-[60vh] overflow-y-auto gap-0`,children:we===`model`?(0,Q.jsx)(Fr,{model:p,onClose:Ce,dividerInset:`menu`,settingsLinkClassName:Te,settingsIconClassName:Ee}):we===`agent-profile`?(0,Q.jsx)(Br,{onClose:Ce,dividerInset:`menu`,settingsLinkClassName:Te,settingsIconClassName:Ee}):(0,Q.jsx)(Jr,{onClose:Ce,dividerInset:`menu`,settingsLinkClassName:Te,settingsIconClassName:Ee})})})]})]});return(0,Q.jsxs)(`div`,{ref:E,className:`w-full min-w-0 flex items-center justify-between gap-2`,children:[(0,Q.jsx)(`div`,{className:`flex min-w-0 items-center gap-1`,children:(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,Q.jsx)(`div`,{ref:k,className:U(!1),children:(0,Q.jsx)(Da,{disabled:e,handleFileIconClick:n})}),v&&(0,Q.jsx)(`div`,{ref:j,className:U(!he&&`hidden`),children:(0,Q.jsx)(Or,{})}),(0,Q.jsx)(`div`,{ref:M,className:U(!ge&&`hidden`),children:we===`model`?(0,Q.jsx)(Ir,{}):we===`agent-profile`?(0,Q.jsx)(Vr,{}):(0,Q.jsx)(Yr,{})}),ve&&(0,Q.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,Q.jsx)(`button`,{ref:N,type:`button`,className:U(Se,`size-6`),"aria-label":o(h.CHAT_INTERFACE$MORE_INPUT_ACTIONS),"aria-expanded":z,"aria-haspopup":`menu`,onClick:e=>{e.preventDefault(),e.stopPropagation(),B(e=>!e)},children:(0,Q.jsx)(wt,{width:16,height:16,color:`currentColor`})}),z&&typeof document<`u`&&oe&&Kn.createPortal((0,Q.jsx)(`div`,{style:oe,children:De}),document.body)]})]})}),(0,Q.jsxs)(`div`,{ref:O,className:`ml-auto flex shrink-0 items-center gap-2`,children:[_e&&u&&(0,Q.jsx)(Cr,{handleStop:ce,handleResumeAgent:le,disabled:e,isPausing:ue}),r&&(0,Q.jsx)(D,{buttonClassName:i,handleSubmit:a,disabled:e||!t})]})]})}function ja(e){return e.replace(/!\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\*{3}(.+?)\*{3}/g,`$1`).replace(/\*{2}(.+?)\*{2}/g,`$1`).replace(/\*(.+?)\*/g,`$1`).replace(/_{3}(.+?)_{3}/g,`$1`).replace(/_{2}(.+?)_{2}/g,`$1`).replace(/_(.+?)_/g,`$1`).replace(/`(.+?)`/g,`$1`).replace(/~~(.+?)~~/g,`$1`)}function Ma(e){let t=e,n=e.match(/^---\s*\n([\s\S]*?)\n---/);if(n){let r=n[1].match(/^description:\s*(.+)$/m);if(r){let e=r[1].trim();return(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))&&(e=e.slice(1,-1)),ja(e)}t=e.slice(n[0].length)}let r=t.split(`
27
+ `).map(e=>e.trim()).find(e=>e.length>0&&!e.startsWith(`#`)&&e!==`---`);if(!r)return null;let i=ja(r);return i.match(/^[^.!?\n]*[.!?]/)?.[0]||i}function Na({item:e,isSelected:t,onSelect:n,ref:r}){let i=(0,X.useMemo)(()=>`description`in e.skill&&e.skill.description?ja(e.skill.description):`content`in e.skill&&e.skill.content?Ma(e.skill.content):null,[e.skill]);return(0,Q.jsxs)(`button`,{role:`option`,"aria-selected":t,ref:r,type:`button`,className:U(`w-full px-3 py-2.5 text-left`,Ae,t?`bg-tertiary`:`hover:bg-[var(--oh-surface-raised)]`),onMouseDown:t=>{t.preventDefault(),n(e)},children:[(0,Q.jsx)(Ot,{className:`font-normal`,children:e.command}),i&&(0,Q.jsx)(Ot,{className:`text-xs text-[var(--oh-muted)] mt-0.5 truncate block`,children:i})]})}function Pa({items:e,selectedIndex:t,onSelect:n}){let{t:r}=m(`openhands`),i=(0,X.useRef)([]);return(0,X.useEffect)(()=>{i.current=i.current.slice(0,e.length)},[e.length]),(0,X.useEffect)(()=>{let e=i.current[t];e&&e.scrollIntoView({block:`nearest`})},[t]),e.length===0?null:(0,Q.jsxs)(`div`,{role:`listbox`,"aria-label":r(h.CHAT_INTERFACE$COMMANDS),className:`absolute bottom-full left-0 w-full mb-1 bg-[var(--oh-surface)] border border-[var(--oh-border-subtle)] rounded-lg shadow-lg max-h-[300px] overflow-y-auto custom-scrollbar z-50`,"data-testid":`slash-command-menu`,children:[(0,Q.jsx)(`div`,{className:`px-3 py-2 text-xs text-[var(--oh-muted)] border-b border-[var(--oh-border-subtle)]`,children:r(h.CHAT_INTERFACE$COMMANDS)}),(0,Q.jsx)(`div`,{className:ke,children:e.map((e,r)=>(0,Q.jsx)(Na,{item:e,isSelected:r===t,onSelect:n,ref:e=>{i.current[r]=e}},e.command))})]})}function Fa({chatContainerRef:e,isDragOver:t,disabled:n,canSubmit:r,isNewConversationPending:i=!1,showButton:a,buttonClassName:o,chatInputRef:s,handleFileIconClick:c,handleSubmit:l,onDragOver:u,onDragLeave:d,onDrop:f,onInput:p,onPaste:m,onKeyDown:h,onFocus:g,onBlur:_,isSlashMenuOpen:v=!1,slashItems:y=[],slashSelectedIndex:b=0,onSlashSelect:x}){return(0,Q.jsxs)(`div`,{ref:e,className:U(`bg-[var(--oh-surface)] box-border content-stretch flex flex-col items-start justify-center p-4 relative rounded-[15px] w-full`,W(e=>e.conversationMode)===`plan`&&`border border-[#597FF4]`),onDragOver:e=>u(e,n),onDragLeave:e=>d(e,n),onDrop:e=>f(e,n),children:[t&&(0,Q.jsx)(Rn,{}),(0,Q.jsx)(Un,{}),(0,Q.jsxs)(`div`,{className:`relative w-full`,children:[v&&x&&(0,Q.jsx)(Pa,{items:y,selectedIndex:b,onSelect:x}),(0,Q.jsx)(Gn,{chatInputRef:s,isNewConversationPending:i,onInput:p,onPaste:m,onKeyDown:h,onFocus:g,onBlur:_})]}),(0,Q.jsx)(Aa,{disabled:n,canSubmit:r,onAddFileClick:()=>c(n),showButton:a,buttonClassName:o,handleSubmit:l})]})}function Ia({fileInputRef:e,onChange:t}){return(0,Q.jsx)(`input`,{type:`file`,ref:e,multiple:!0,accept:`*/*`,className:`hidden`,onChange:t,"data-testid":`upload-image-input`})}function La({disabled:e=!1,isNewConversationPending:t=!1,showButton:n=!0,onSubmit:r,onFocus:i,onBlur:a,onFilesPaste:o,className:s=``,buttonClassName:c=``}){let[l,u]=X.useState(!1),{submittedMessage:d,clearAllFiles:f,setShouldHideSuggestions:p,setSubmittedMessage:m,images:h,files:g}=W(),_=e,v=(0,X.useRef)(r);(0,X.useEffect)(()=>{v.current=r},[r]),(0,X.useEffect)(()=>{!d||e||(v.current(d),m(null))},[d,e,m]);let{chatInputRef:y,messageToSend:b,checkIsContentEmpty:x,clearEmptyContentHandler:S,saveDraft:C}=mn(),w=X.useCallback(()=>{let e=y.current?.innerText??``,t=h.length>0||g.length>0;u(e.trim().length>0||t)},[y,h,g]),{fileInputRef:T,chatContainerRef:E,isDragOver:D,handleFileIconClick:O,handleFileInputChange:k,handleDragOver:A,handleDragLeave:j,handleDrop:M}=hn(o),{gripRef:N,isGripVisible:P,isGripDragging:F,handleTopEdgeClick:I,smartResize:ee,handleGripMouseDown:te,handleGripTouchStart:L,increaseHeightForEmptyContent:ne,resetManualResize:R}=kn(y,b),{handleSubmit:re}=jn(y,T,ee,r,R),ie=X.useCallback(()=>{re(),w()},[re,w]),{handleInput:ae,handlePaste:z,handleKeyDown:B,handleBlur:V,handleFocus:H}=An(y,ee,ne,x,S,i,a),{isMenuOpen:oe,filteredItems:se,selectedIndex:ce,updateSlashMenu:le,selectItem:ue,handleSlashKeyDown:de,closeMenu:fe}=Pn(y);return(0,X.useEffect)(()=>()=>{p(!1),f()},[p,f]),(0,X.useEffect)(()=>{w()},[w,h.length,g.length]),(0,Q.jsxs)(`div`,{className:U(`w-full`,s),children:[(0,Q.jsx)(Ia,{fileInputRef:T,onChange:k}),(0,Q.jsxs)(`div`,{className:`relative w-full`,children:[(0,Q.jsx)(Fn,{gripRef:N,isGripVisible:P,isGripDragging:F,handleTopEdgeClick:I,handleGripMouseDown:te,handleGripTouchStart:L}),(0,Q.jsx)(Fa,{chatContainerRef:E,isDragOver:D,disabled:_,canSubmit:l,isNewConversationPending:t,showButton:n,buttonClassName:c,chatInputRef:y,handleFileIconClick:O,handleSubmit:ie,onDragOver:A,onDragLeave:j,onDrop:M,onInput:()=>{ae(),le(),C(),w()},onPaste:z,onKeyDown:e=>{de(e)||B(e,_,ie)},onFocus:H,onBlur:()=>{V(),fe(),w()},isSlashMenuOpen:oe,slashItems:se,slashSelectedIndex:ce,onSlashSelect:ue})]})]})}var Ra=`${R} `,za=(e,t)=>{let n=Ft(e=>e.show),r=i(),{switchAndLog:a}=Wr(),{backend:o,orgId:s}=S(),{t:c}=m();return(0,X.useCallback)(i=>{let l=i.trim();if(!(l===`/model`||l.startsWith(Ra))){t(i);return}let u=l.slice(R.length).trim();if(u){a(e??null,u);return}if(!e)return;let d=Rt();r.fetchQuery({queryKey:[...w.all,o.id,s],queryFn:lt.listProfiles,staleTime:0}).then(({profiles:t})=>n(e,d,t)).catch(e=>{let t=c(h.MODEL$LIST_FAILED);g(e instanceof Error&&e.message?e.message:t)})},[e,t,n,r,a,o.id,s,c])};function Ba(){let{data:e,isLoading:t,isError:n}=at(),{data:r,isLoading:i,isError:a}=we(),{data:o,isLoading:s,isError:c}=gt(),{backend:l,orgId:u}=S(),d=l.kind===`local`,{activeProfile:p,isLoading:m}=Kt(),h=(p?.agent_kind??e?.agent_settings?.agent_kind)===`acp`,g=e?.llm_api_key_set===!0,_=p?.agent_kind===`openhands`?p.llm_profile_ref:void 0,v=(_?o?.profiles.find(e=>e.name===_):void 0)??o?.profiles.find(e=>e.name===o?.active_profile),y=v?.api_key_set===!0,b=d&&!!v&&!y,{data:x,isLoading:T,isError:E}=f({queryKey:[...w.all,l.id,u,`detail`,v?.name],queryFn:()=>lt.getProfile(v.name),...C,enabled:b,meta:{disableToast:!0}}),D=b&&mt(x?.config),O=Zt(`/settings/llm`,r?.feature_flags);return{isConfigured:h||O||(d?y||D:g),isLoading:t||n&&!e||i||a&&!r||s||c&&!o||m||b&&(T||E&&!x)}}var Va=e=>e.type.startsWith(`image/`),Ha=async e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{t()},r.onerror=()=>{n(Error(`Failed to read file: ${e.name}`))},r.onabort=()=>{n(Error(`File reading was aborted: ${e.name}`))},r.readAsArrayBuffer(e)}),Ua=async e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{t()},r.onerror=()=>{n(Error(`Failed to read image: ${e.name}`))},r.onabort=()=>{n(Error(`Image reading was aborted: ${e.name}`))},r.readAsDataURL(e)}),Wa=async e=>{let t=await Promise.allSettled(e.map(async e=>(await Ha(e),e))),n=[],r=[];return t.forEach((t,i)=>{t.status===`fulfilled`?n.push(t.value):r.push({file:e[i],error:t.reason})}),{successful:n,failed:r}},Ga=async e=>{let t=await Promise.allSettled(e.map(async e=>(await Ua(e),e))),n=[],r=[];return t.forEach((t,i)=>{t.status===`fulfilled`?n.push(t.value):r.push({file:e[i],error:t.reason})}),{successful:n,failed:r}};function Ka(){let{images:e,files:t,addImages:n,addFiles:r,addFileLoading:i,removeFileLoading:a,addImageLoading:o,removeImageLoading:s,markImagesAsPasted:c}=W();return{handleUpload:(0,X.useCallback)(async(l,u)=>{let d=cr(l,[...e,...t]);if(!d.isValid){g(`Error: ${d.errorMessage}`);return}let f=l.filter(e=>!Va(e)),p=l.filter(e=>Va(e));p.length>0&&c(p.map(e=>e.name)),f.forEach(e=>i(e.name)),p.forEach(e=>o(e.name));try{let[e,t]=await Promise.all([Wa(f),Ga(p)]);e.successful.length>0&&(r(e.successful),e.successful.forEach(e=>a(e.name))),t.successful.length>0&&(n(t.successful),t.successful.forEach(e=>s(e.name))),e.failed.forEach(({file:e,error:t})=>{a(e.name),g(`Failed to process file ${e.name}: ${t.message}`)}),t.failed.forEach(({file:e,error:t})=>{s(e.name),g(`Failed to process image ${e.name}: ${t.message}`)})}catch{f.forEach(e=>a(e.name)),p.forEach(e=>s(e.name)),g(`An unexpected error occurred while processing files`)}},[e,t,n,r,i,a,o,s,c])}}function qa({disabled:e,onClear:t,testId:n=`dropdown-clear`}){let{t:r}=m(`openhands`);return(0,Q.jsx)(`button`,{onClick:e=>{e.stopPropagation(),t()},disabled:e,className:U(`p-1 text-[#fff]`,`cursor-pointer disabled:cursor-not-allowed disabled:opacity-60`),type:`button`,"aria-label":r(h.COMMON$CLEAR_SELECTION),"data-testid":n,children:(0,Q.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,Q.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})}function Ja({isOpen:e,disabled:t,getToggleButtonProps:n,iconClassName:r}){let{t:i}=m(`openhands`);return(0,Q.jsx)(`button`,{...n({disabled:t,className:U(Ne,`text-current`,e&&`rotate-180`,t&&`cursor-not-allowed opacity-60`)}),type:`button`,"aria-label":i(h.COMMON$TOGGLE_MENU),children:(0,Q.jsx)(Pe,{className:r})})}function Ya({item:e,index:t,isSelected:n,getItemProps:r,getDisplayText:i,getItemKey:a,isProviderDropdown:o=!1,renderIcon:s,itemClassName:c}){return(0,Q.jsx)(`li`,{...r({index:t,item:e,className:U(o?`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`,Ae,{"bg-[var(--oh-interactive-selected)] text-white":n,"hover:bg-[var(--oh-interactive-hover)]":!n},c)}),children:(0,Q.jsxs)(`div`,{className:U(`flex items-center`,Oe),children:[s?(0,Q.jsx)(`span`,{className:je,children:s(e)}):null,(0,Q.jsx)(`span`,{className:`font-normal`,children:i(e)})]})},a(e))}function Xa({inputValue:e,searchMessage:t=`No items found`,emptyMessage:n=`No items available`,testId:r=`dropdown-empty`}){return(0,Q.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 Za({isOpen:e,filteredItems:t,inputValue:n,highlightedIndex:r,selectedItem:i,getMenuProps:a,getItemProps:o,onScroll:s,menuRef:c,renderItem:l,renderEmptyState:u,stickyTopItem:d,stickyFooterItem:f,testId:p,numberOfRecentItems:m=0,itemKey:h}){let g=!(t.length>0)&&!d&&!f;return e?(0,Q.jsx)(`div`,{className:`relative`,children:(0,Q.jsxs)(`div`,{className:U(`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,Q.jsx)(`ul`,{...a({ref:c,className:U(`w-full overflow-auto p-1 custom-scrollbar-always`,ke,d||f?`max-h-[calc(15rem-3rem)]`:`max-h-60`),onScroll:s,"data-testid":p}),children:g?u(n):(0,Q.jsxs)(Q.Fragment,{children:[d,t.map((e,t)=>{let n=h(e);return(0,Q.jsxs)(X.Fragment,{children:[l(e,t,r,i,o),m>0&&t===m-1&&(0,Q.jsx)(`div`,{className:`border-b border-[var(--oh-border-input)] bg-tertiary pb-1 mb-1 h-[1px]`})]},n)})]})}),f&&(0,Q.jsx)(`div`,{className:`border-t border-[var(--oh-border-input)] bg-tertiary p-1 rounded-b-lg`,children:f})]})}):(0,Q.jsx)(`div`,{className:`relative`,children:(0,Q.jsx)(`ul`,{...a({ref:c,className:`hidden`,"data-testid":p})})})}function Qa({hasSelection:e,testId:t=`dropdown-loading`}){return(0,Q.jsx)(`div`,{className:U(`absolute top-1/2 transform -translate-y-1/2`,e?`right-11`:`right-6`),children:(0,Q.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`,"data-testid":t})})}function $a({isError:e,message:t=`Failed to load data`,testId:n=`dropdown-error`}){return e?(0,Q.jsx)(`div`,{className:`text-red-500 text-sm mt-1`,"data-testid":n,children:t}):null}function eo({providers:e,value:t,placeholder:n,className:r,errorMessage:i,disabled:a=!1,isLoading:o=!1,onChange:s,inputClassName:c,toggleButtonClassName:l,itemClassName:u}){let{t:d}=m(`openhands`),[f,p]=(0,X.useState)(``),[g,_]=(0,X.useState)(t||null),v=e=>{switch(e){case`github`:return`GitHub`;case`gitlab`:return`GitLab`;case`bitbucket`:return`Bitbucket`;case`bitbucket_data_center`:return`Bitbucket Data Center`;case`azure_devops`:return`Azure DevOps`;default:return e.charAt(0).toUpperCase()+e.slice(1)}},y=(0,X.useMemo)(()=>g&&f===v(g)||!f?.trim()?e:e.filter(e=>v(e).toLowerCase().includes(f.toLowerCase())),[e,f,g]),{isOpen:b,getToggleButtonProps:x,getMenuProps:S,getInputProps:C,highlightedIndex:w,getItemProps:T,selectedItem:E}=F({items:y,itemToString:e=>e?v(e):``,selectedItem:g,onSelectedItemChange:({selectedItem:e})=>{_(e||null),s?.(e||null)},onInputValueChange:({inputValue:e})=>{p(e||``)},inputValue:f});(0,X.useEffect)(()=>{t!==g&&_(t||null)},[t,g]),(0,X.useEffect)(()=>{E&&!b?p(v(E)):E||p(``)},[E,b]);let D=(e,t,n,r,i)=>(0,Q.jsx)(Ya,{item:e,index:t,isSelected:e===r,getItemProps:i,getDisplayText:v,getItemKey:e=>e,isProviderDropdown:!0,itemClassName:u},e),O=e=>(0,Q.jsx)(Xa,{inputValue:e,searchMessage:`No providers found`,emptyMessage:`No providers available`,testId:`git-provider-dropdown-empty`});return(0,Q.jsxs)(`div`,{className:U(`relative`,r),children:[(0,Q.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[E&&(0,Q.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:(0,Q.jsx)(Xe,{gitProvider:E,className:`min-w-[14px] min-h-[14px] w-[14px] h-[14px]`})}),(0,Q.jsx)(`input`,{...C({disabled:a,placeholder:n??d(h.COMMON$SELECT_PROVIDER_PLACEHOLDER),readOnly:!0,className:U(`w-29.5 h-6 py-0 border border-[var(--oh-border-input)] rounded shadow-none h-6 min-h-6 max-h-6 `,`text-inherit bg-tertiary placeholder:text-[var(--oh-muted)]`,`focus:outline-none focus:ring-0 focus:border-[var(--oh-border-input)]`,`disabled:bg-tertiary disabled:cursor-not-allowed disabled:opacity-60`,`pl-1.5 pr-[1px] cursor-pointer text-xs font-normal leading-5`,E&&`pl-6`,c)}),"data-testid":`git-provider-dropdown`}),(0,Q.jsx)(`div`,{className:`absolute right-0 top-1/2 transform -translate-y-1/2 flex items-center gap-1`,children:(0,Q.jsx)(Ja,{isOpen:b,disabled:a,getToggleButtonProps:x,iconClassName:l})}),o&&(0,Q.jsx)(Qa,{hasSelection:!!E})]}),(0,Q.jsx)(Za,{isOpen:b,filteredItems:y,inputValue:f,highlightedIndex:w,selectedItem:E,getMenuProps:S,getItemProps:T,renderItem:D,renderEmptyState:O,itemKey:e=>e}),(0,Q.jsx)($a,{isError:!!i,message:i})]})}var to=(e,t=30,n)=>s({queryKey:[`repository`,e,`branches`,`paginated`,t,n],queryFn:async({pageParam:r})=>!e||!n?{items:[],next_page_id:null}:Ke.getRepositoryBranches(e,n,``,r??void 0,t),enabled:!!e&&!!n,staleTime:1e3*60*5,getNextPageParam:e=>e.next_page_id?e.next_page_id:void 0,initialPageParam:null});function no(e,t,n=30,r){return f({queryKey:[`repository`,e,`branches`,`search`,t,n,r],queryFn:async()=>!e||!t||!r?[]:(await Ke.searchRepositoryBranches(e,r,t,void 0,n)).items,enabled:!!e&&!!t&&!!r,staleTime:1e3*60*5,gcTime:1e3*60*15})}function ro(e,t,n,r,i,a){let{data:o,fetchNextPage:s,hasNextPage:c,isLoading:l,isFetchingNextPage:u,isError:d}=to(e,30,t),{data:f,isLoading:p}=no(e,r,30,t),m=(0,X.useMemo)(()=>o?.pages?.flatMap(e=>e.items)||[],[o]),h=(0,X.useMemo)(()=>n?m.find(e=>e.name===n):null,[m,n]),{data:g,isLoading:_}=no(e,n&&!h&&m.length>0&&!r?n:``,30,t);return{branches:(0,X.useMemo)(()=>{let e=r&&f&&i!==a?.name,t=e?f:m;if(n){let r=e?t.find(e=>e.name===n):h;if(!r&&g&&g.length>0)r=g.find(e=>e.name===n),r&&(t=[r,...t]);else if(r){let e=t.filter(e=>e.name!==n);t=[r,...e]}}return t},[r,f,m,a,i,n,h,g]),allBranches:m,fetchNextPage:s,hasNextPage:c,isLoading:l||_,isFetchingNextPage:u,isError:d,isSearchLoading:p}}function io({isOpen:e,filteredBranches:t,inputValue:n,highlightedIndex:r,selectedItem:i,getMenuProps:a,getItemProps:o,onScroll:s,menuRef:c}){return(0,Q.jsx)(`div`,{"data-testid":`git-branch-dropdown-menu`,children:(0,Q.jsx)(Za,{isOpen:e,filteredItems:t,inputValue:n,highlightedIndex:r,selectedItem:i,getMenuProps:a,getItemProps:o,onScroll:s,menuRef:c,renderItem:(e,t,n,r,i)=>(0,Q.jsx)(Ya,{item:e,index:t,isSelected:r?.name===e.name,getItemProps:i,getDisplayText:e=>e.name,getItemKey:e=>e.name},e.name),renderEmptyState:e=>(0,Q.jsx)(`li`,{className:`px-3 py-2`,children:(0,Q.jsx)(Xa,{inputValue:e,searchMessage:`No branches found`,emptyMessage:`No branches available`,testId:`git-branch-dropdown-empty`})}),itemKey:e=>e.name})})}function ao({repository:e,provider:t,selectedBranch:n,onBranchSelect:r,defaultBranch:i,placeholder:a,disabled:o=!1,className:s}){let{t:c}=m(`openhands`),[l,u]=(0,X.useState)(``),[d,f]=(0,X.useState)(!1),p=Je(l,300),g=(0,X.useRef)(null),_=(0,X.useMemo)(()=>p.trim().length>0?p.trim():``,[p]),{branches:v,isLoading:y,isError:b,fetchNextPage:x,hasNextPage:S,isFetchingNextPage:C,isSearchLoading:w}=ro(e,t,i||null,_,l,n),T=b?Error(`Failed to load branches`):null,E=(0,X.useCallback)(()=>{u(``),r(null),f(!0)},[r]),D=(0,X.useCallback)(e=>{r(e),u(``)},[r]),O=(0,X.useCallback)(e=>{let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;n-t<=r*1.5&&S&&!C&&x()},[S,C,x]),{isOpen:k,selectedItem:A,highlightedIndex:j,getInputProps:M,getItemProps:N,getMenuProps:P,getToggleButtonProps:I}=F({items:v,selectedItem:n,itemToString:e=>e?.name||``,onSelectedItemChange:({selectedItem:e})=>{D(e||null)},inputValue:l,stateReducer:(e,t)=>t.type===F.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes});(0,X.useEffect)(()=>{e&&(r(null),f(!1))},[e,r]),(0,X.useEffect)(()=>{if(e&&i&&!n&&!d&&v.length>0&&!y){let e=v.find(e=>e.name===i);e&&r(e)}},[e,i,n,d,v,r,y]),(0,X.useEffect)(()=>{u(``)},[e]),(0,X.useEffect)(()=>{n&&!k?u(n.name):!n&&!k&&u(``)},[n,k]);let ee=y||w||C;return(0,Q.jsxs)(`div`,{className:U(`relative`,s),children:[(0,Q.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[(0,Q.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:ee?(0,Q.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`}):(0,Q.jsx)(ni,{width:16,height:16})}),(0,Q.jsx)(`input`,{...M({disabled:o||!e,placeholder:a??c(h.COMMON$SELECT_BRANCH_PLACEHOLDER),className:U(xe,`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=>{u(e.target.value)}}),"data-testid":`git-branch-dropdown-input`}),(0,Q.jsxs)(`div`,{className:`absolute right-1 top-1/2 transform -translate-y-1/2 flex items-center`,children:[n&&(0,Q.jsx)(qa,{disabled:o,onClear:E}),(0,Q.jsx)(Ja,{isOpen:k,disabled:o||!e,getToggleButtonProps:I})]})]}),(0,Q.jsx)(io,{isOpen:k,filteredBranches:v,inputValue:l,highlightedIndex:j,selectedItem:A,getMenuProps:P,getItemProps:N,onScroll:O,menuRef:g}),(0,Q.jsx)($a,{isError:!!T})]})}function oo(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 Ke.searchGitRepositories(e,t,3)).items)}catch{r([])}finally{a(!1)}}}else r([])})()},[e,t]),{urlSearchResults:n,isUrlSearchLoading:i}}function so(e,t,n,r,i,a,o){let{data:s,fetchNextPage:c,hasNextPage:l,isLoading:u,isFetchingNextPage:d,isError:f}=Le({provider:e,enabled:!t}),{data:p,isLoading:m}=He(n,e,(0,X.useMemo)(()=>i===o,[o,i])),h=(0,X.useMemo)(()=>s?.pages?.flatMap(e=>e.items)||[],[s]),g=(0,X.useMemo)(()=>a&&[...h,...r,...p||[]].find(e=>e.id===a)||null,[h,r,p,a]),_=(0,X.useMemo)(()=>r.length>0?r:n&&p&&i!==g?.full_name?p:h,[r,n,p,h,g,i]);return(0,X.useEffect)(()=>{!t&&!u&&!d&&!m&&l&&!n&&r.length===0&&_.length>0&&_.length<10&&c()},[t,u,d,m,l,n,r.length,_.length,c]),{repositories:_,allRepositories:h,selectedRepository:g,fetchNextPage:c,hasNextPage:l,isLoading:u,isFetchingNextPage:d,isError:f,isSearchLoading:m}}function co({provider:e,value:t,repositoryName:n,placeholder:r,className:i,disabled:a=!1,onChange:o}){let{t:s}=m(`openhands`),{recentRepositories:c}=Ge(),[l,u]=(0,X.useState)(``),[d,f]=(0,X.useState)(null),p=Je(l,300),g=(0,X.useRef)(null),_=(0,X.useMemo)(()=>{if(p.startsWith(`https://`)){let e=p.match(/https:\/\/[^/]+\/([^/]+\/[^/]+)/);return e?e[1]:p}return p},[p]),{urlSearchResults:v,isUrlSearchLoading:y}=oo(l,e),{repositories:b,selectedRepository:x,fetchNextPage:S,hasNextPage:C,isLoading:w,isFetchingNextPage:T,isError:E,isSearchLoading:D}=so(e,a,_,v,l,t,n),O=x??d,k=(0,X.useMemo)(()=>{let t=c.filter(t=>t.git_provider===e);if(!l?.trim())return t;let n=l.startsWith(`https://`)?_:l;return t.filter(e=>e.full_name.toLowerCase().includes(n.toLowerCase()))},[c,e,l,_]),A=(0,X.useCallback)(e=>{let t=new Set(k.map(e=>e.id)),n=e.filter(e=>!t.has(e.id));return[...k,...n]},[k]),j=(0,X.useMemo)(()=>{let e;if(v.length>0)e=b;else if(l===x?.full_name)e=b;else if(!l?.trim())e=b;else{let t=l.startsWith(`https://`)?_:l;e=b.filter(e=>e.full_name.toLowerCase().includes(t.toLowerCase()))}return A(e)},[b,l,x,v,_,A]),M=(0,X.useCallback)(e=>{f(e),o?.(e||void 0),e&&u(e.full_name)},[o]),N=(0,X.useCallback)(()=>{f(null),M(null),u(``)},[M]),P=(0,X.useCallback)(e=>{let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;t+r>=n-10&&C&&!T&&S()},[C,T,S]),{isOpen:I,getToggleButtonProps:ee,getMenuProps:te,getInputProps:L,highlightedIndex:ne,getItemProps:R,selectedItem:re}=F({items:j,itemToString:e=>e?.full_name||``,selectedItem:d,onSelectedItemChange:({selectedItem:e})=>{M(e)},inputValue:l,stateReducer:(e,t)=>t.type===F.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes});(0,X.useEffect)(()=>{x?f(x):t===null&&f(null)},[x,t]),(0,X.useEffect)(()=>{I||u(O?.full_name??``)},[O,I]);let ie=w||D||T||y,ae=(e,t,n,r,i)=>(0,Q.jsx)(Ya,{item:e,index:t,isSelected:r?.id===e.id,getItemProps:i,getDisplayText:e=>e.full_name,getItemKey:e=>e.id},e.id),z=e=>(0,Q.jsx)(Xa,{inputValue:e,searchMessage:s(h.HOME$NO_REPOSITORY_FOUND),emptyMessage:s(h.COMMON$NO_REPOSITORY),testId:`git-repo-dropdown-empty`}),B=(0,X.useMemo)(()=>k.length===0?null:(0,Q.jsx)(`div`,{children:(0,Q.jsx)(q.Text,{className:`text-xs text-content-2 font-semibold leading-4 pl-2`,children:s(h.COMMON$MOST_RECENT)})}),[k,d,R,s]);return(0,Q.jsxs)(`div`,{className:U(`relative`,i),children:[(0,Q.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[(0,Q.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:ie?(0,Q.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`}):(0,Q.jsx)(Re,{width:16,height:16})}),(0,Q.jsx)(`input`,{...L({disabled:a,placeholder:r??s(h.COMMON$SEARCH_REPOSITORIES_PLACEHOLDER),className:U(xe,`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=>{u(e.target.value)}}),"data-testid":`git-repo-dropdown`}),(0,Q.jsxs)(`div`,{className:`absolute right-1 top-1/2 transform -translate-y-1/2 flex items-center`,children:[O&&(0,Q.jsx)(qa,{disabled:a,onClear:N}),(0,Q.jsx)(Ja,{isOpen:I,disabled:a,getToggleButtonProps:ee})]})]}),(0,Q.jsx)(Za,{isOpen:I,filteredItems:j,inputValue:l,highlightedIndex:ne,selectedItem:re,getMenuProps:te,getItemProps:R,onScroll:P,menuRef:g,renderItem:ae,renderEmptyState:z,stickyTopItem:B,testId:`git-repo-dropdown-menu`,numberOfRecentItems:k.length,itemKey:e=>e.id}),(0,Q.jsx)($a,{isError:E})]})}function lo({className:e}){return(0,Q.jsx)(`div`,{className:U(`w-3 h-3 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300 absolute right-0 top-1/2 -translate-y-1/2 h-full w-10.5 pr-2.5 justify-end git-external-link-icon`,e),children:(0,Q.jsx)(Qt,{width:12,height:12,color:`white`})})}function uo({selectedRepository:e,gitProvider:t,workspaceName:n,emptyStateLabel:r,onClick:i,disabled:a}){let{t:o}=m(`openhands`),{data:s}=at(),c=!!e&&!!t,u=t?s?.provider_tokens_set[t]:null,d=c?fe(t,e,u):void 0,f=!e&&!n,p=e||n||o(h.COMMON$CONNECT_REPO);return c?(0,Q.jsxs)(`a`,{href:d,target:`_blank`,rel:`noopener noreferrer`,className:U(`group flex flex-row items-center justify-between gap-2 pl-2.5 pr-2.5 py-1 rounded-[100px] flex-1 truncate relative`,`border border-[var(--oh-border)] bg-transparent hover:border-[var(--oh-border-subtle)] cursor-pointer`),children:[(0,Q.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center flex-shrink-0`,children:(0,Q.jsx)(Xe,{gitProvider:t,className:`w-3 h-3 inline-flex`})}),(0,Q.jsx)(`div`,{className:`font-normal text-white text-sm leading-5 truncate flex-1 min-w-0`,title:p,children:p}),(0,Q.jsx)(lo,{})]}):(0,Q.jsxs)(`button`,{type:`button`,onClick:i,disabled:a,className:U(`group flex flex-row items-center justify-between gap-2 pl-2.5 pr-2.5 py-1 rounded-[100px] truncate relative`,`border border-[rgba(71,74,84,0.50)] bg-transparent`,a?`cursor-not-allowed opacity-50`:`cursor-pointer hover:border-[var(--oh-border-subtle)]`),children:[(0,Q.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center flex-shrink-0 text-white`,children:f?(0,Q.jsx)(P,{className:`w-3 h-3`,strokeWidth:2,"aria-hidden":!0,"data-testid":`git-control-bar-connect-repo-icon`}):(0,Q.jsx)(l,{width:12,height:12,color:`white`})}),(0,Q.jsx)(`div`,{className:`font-normal text-white text-sm leading-5 truncate flex-1 min-w-0`,title:p,children:p})]})}function fo({selectedBranch:e,selectedRepository:t,gitProvider:n}){let{t:r}=m(`openhands`),{data:i}=at(),a=n?i?.provider_tokens_set[n]:null,o=!!e&&!!t&&!!n,s=o?le(n,t,e,a):void 0,c=e||r(h.COMMON$NO_BRANCH);return(0,Q.jsxs)(`a`,{href:o?s:void 0,target:`_blank`,rel:`noopener noreferrer`,className:U(`group flex flex-row items-center justify-between gap-2 pl-2.5 pr-2.5 py-1 rounded-[100px] w-fit flex-shrink-0 max-w-[200px] truncate relative`,o?`border border-[var(--oh-border)] bg-transparent hover:border-[var(--oh-border-subtle)] cursor-pointer`:`border border-[rgba(71,74,84,0.50)] bg-transparent cursor-not-allowed min-w-[108px]`),children:[(0,Q.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center flex-shrink-0`,children:(0,Q.jsx)(ni,{width:12,height:12,color:`white`})}),(0,Q.jsx)(`div`,{className:`font-normal text-white text-sm leading-5 truncate`,title:c,children:c}),o&&(0,Q.jsx)(lo,{})]})}function po(){let{t:e}=m(`openhands`),{navigate:t}=Te(),{isConfigured:n,isLoading:r}=Ba();return r||n?null:(0,Q.jsxs)(`div`,{"data-testid":`home-llm-not-configured-banner`,role:`alert`,className:`mt-3 flex w-full flex-col gap-3 rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] px-4 py-3 text-[var(--oh-foreground)] sm:flex-row sm:items-center sm:justify-between sm:py-4`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-start sm:items-center`,children:[(0,Q.jsx)(`div`,{className:`flex-shrink-0`,children:(0,Q.jsx)(Et,{className:`align-middle text-yellow-400`})}),(0,Q.jsx)(q.Text,{className:`ml-3 text-sm font-medium`,children:e(h.HOME$LLM_NOT_CONFIGURED_MESSAGE)})]}),(0,Q.jsx)(Ce,{testId:`home-llm-not-configured-action`,type:`button`,variant:`primary`,className:`w-fit shrink-0 self-start whitespace-nowrap sm:self-auto`,onClick:()=>t(`/settings/llm`),children:e(h.HOME$LLM_NOT_CONFIGURED_ACTION)})]})}export{ri as A,fn as B,mi as C,ci as D,li as E,lr as F,cr as I,rr as L,yr as M,vr as N,si as O,_r as P,tr as R,hi as S,fi as T,tn as V,fa as _,ao as a,ji as b,Xa as c,qa as d,Ka as f,Ea as g,La as h,co as i,ti as j,ii as k,Ya as l,za as m,fo as n,eo as o,Ba as p,uo as r,Za as s,po as t,Ja as u,Ki as v,pi as w,Oi as x,Mi as y,$n as z};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n,xt as r}from"./vendor-styling-CI0PQ3ab.js";import{L as i}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js";import{n as a}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~i3v2mlbw-BrJQ3XZH.js";import{t as o}from"./useMutation-DCE9RcgK.js";import{t as s}from"./useQuery-CpjHYtZc.js";import{t as c}from"./useTranslation-Cgy4JA_g.js";import{t as l}from"./declaration-B9kpCaYl.js";import{A as u,c as d,f,j as p,s as m}from"./active-backend-context-DRFevVIj.js";import{t as h}from"./createLucideIcon-CVAsW2Yo.js";import{t as g}from"./back-nav-button-BYmxFxGt.js";import{t as _}from"./copy-3JCw_XFB.js";import{t as v}from"./external-link-D2zJjE9G.js";import{t as y}from"./utils-CE0lDWtb.js";import{t as b}from"./brand-button-DKPMEKcW.js";import{t as x}from"./loading-spinner-DHAIPZkP.js";import{i as S}from"./dropdown-classes-CgQ45JmQ.js";import{t as C}from"./settings-input-DYs7t3oK.js";import{t as w}from"./settings-mQUckT0g.js";import{t as T}from"./settings-service.api-DldkFI1x.js";import{r as E}from"./use-settings-B07msZ2Z.js";import{t as D}from"./profiles-service.api-CeYEmSM3.js";import{a as O,d as k,n as A,p as j,r as M,t as N}from"./llm-subscription-DtsX5Lhg.js";import{t as P}from"./llm-subscription-service-CKyaV24y.js";import{t as F}from"./use-llm-profiles-BcLibtGb.js";import{r as I,t as L}from"./ellipsis-button-1BV9Sga8.js";import{t as R}from"./u-edit-DJ90xc8Z.js";import{n as z,t as B}from"./model-selector-VDHBytb6.js";import{d as ee,g as V,l as te}from"./sdk-settings-schema-BjBkMHzZ.js";import{r as H}from"./schema-field-DwUzlw6b.js";import{t as U}from"./settings-dropdown-input-xzoZwgUe.js";import{t as ne}from"./copy-to-clipboard-button-Aj9wFmt2.js";import{r as W}from"./typography-YGPBGzOG.js";import{t as re}from"./sdk-section-page-BUXONTx6.js";import{o as G}from"./extension-module-card-classes-9V3J9J_b.js";import{a as K,i as q,n as ie,o as ae,r as J,s as Y,t as oe}from"./use-can-manage-org-profiles-OIhplvQ0.js";import{t as se}from"./u-check-circle-BqoIxNz_.js";import{i as ce,n as le,r as ue,t as de}from"./settings-list-classes-DvQr5jVS.js";import{n as fe}from"./settings-section-header-context-COMOIaxV.js";var pe=h(`text-cursor`,[[`path`,{d:`M17 22h-1a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4h1`,key:`uvaxm9`}],[`path`,{d:`M7 22h1a4 4 0 0 0 4-4v-1`,key:`11xy8d`}],[`path`,{d:`M7 2h1a4 4 0 0 1 4 4v1`,key:`1uw06m`}]]);function X(){let e=a();return o({mutationFn:e=>D.activateProfile(e),onSuccess:async()=>{T.invalidateCache(),await e.invalidateQueries({queryKey:m.all}),await e.invalidateQueries({queryKey:f.personal()})},meta:{disableToast:!0}})}function me(){return o({mutationFn:P.startOpenAIDeviceLogin})}function he(){let e=a();return o({mutationFn:P.pollOpenAIDeviceLogin,onSuccess:()=>{e.invalidateQueries({queryKey:d.openaiStatus})}})}function ge(){let e=a();return o({mutationFn:P.logoutOpenAI,onSuccess:()=>{e.invalidateQueries({queryKey:d.openaiStatus})}})}function _e({enabled:e=!0}={}){return s({queryKey:d.openaiStatus,queryFn:P.getOpenAIStatus,enabled:e,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*5,meta:{disableToast:!0}})}var Z=e(t(),1),Q=n(),ve=5,ye=1;function be(e){let t=e.verificationUriComplete??e.verificationUri;window.open(t,`_blank`,`noopener,noreferrer`)}function xe({isDisabled:e=!1}){let{t}=c(`openhands`),n=_e(),r=me(),i=he(),a=ge(),[o,s]=Z.useState(null),[d,f]=Z.useState(!1),[m,h]=Z.useState(!1),g=Z.useRef(null),_=Z.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null)},[]),y=()=>{o&&(navigator.clipboard.writeText(o.userCode),f(!0),setTimeout(()=>f(!1),2e3))},x=r.isPending||i.isPending||a.isPending,S=!!n.data?.connected,C=Z.useCallback(async e=>{try{return(await i.mutateAsync(e)).connected?(s(null),h(!1),p(t(l.SETTINGS$SUBSCRIPTION_CONNECTED_TOAST)),!0):(h(!0),!1)}catch{return u(t(l.SETTINGS$SUBSCRIPTION_CONNECT_ERROR)),!0}},[i,t]);return Z.useEffect(()=>{if(!o||S||e)return;let t=!1,n=Math.max(o.intervalSeconds??ve,ye),r=()=>{_(),g.current=window.setTimeout(async()=>{if(t)return;let e=await C(o.deviceCode);!t&&!e&&r()},n*1e3)};return r(),()=>{t=!0,_()}},[o,_,S,e,C]),(0,Q.jsxs)(`section`,{"data-testid":`openai-subscription-auth-card`,className:`flex flex-col gap-4 rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Q.jsx)(W.H3,{children:t(l.SETTINGS$SUBSCRIPTION_CARD_TITLE)}),(0,Q.jsx)(W.Paragraph,{className:`text-tertiary-alt text-sm leading-5`,children:t(l.SETTINGS$SUBSCRIPTION_CARD_DESCRIPTION)})]}),(0,Q.jsx)(`div`,{className:`flex flex-col gap-1 text-sm`,"data-testid":`subscription-status`,children:n.isLoading?(0,Q.jsx)(`span`,{className:`text-tertiary-light`,children:t(l.SETTINGS$SUBSCRIPTION_STATUS_CHECKING)}):n.isError?(0,Q.jsx)(`span`,{className:`text-danger`,children:t(l.SETTINGS$SUBSCRIPTION_STATUS_UNAVAILABLE)}):S?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`text-success`,children:t(l.SETTINGS$SUBSCRIPTION_STATUS_CONNECTED)}),n.data?.accountEmail?(0,Q.jsx)(`span`,{className:`text-tertiary-light`,children:t(l.SETTINGS$SUBSCRIPTION_ACCOUNT,{account:n.data.accountEmail})}):null]}):(0,Q.jsx)(`span`,{className:`text-warning`,children:t(l.SETTINGS$SUBSCRIPTION_STATUS_DISCONNECTED)})}),o?(0,Q.jsxs)(`div`,{"data-testid":`subscription-device-challenge`,className:`flex flex-col gap-2 rounded-lg border border-[var(--oh-border-subtle)] p-3 text-sm`,children:[(0,Q.jsx)(`span`,{children:t(l.SETTINGS$SUBSCRIPTION_DEVICE_INSTRUCTIONS)}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg bg-[var(--oh-surface-deep)] px-3 py-2 font-mono text-base font-semibold text-white`,children:[(0,Q.jsx)(`span`,{"data-testid":`subscription-user-code`,className:`flex-1 select-all tracking-[0.08em]`,children:o.userCode}),(0,Q.jsx)(ne,{isHidden:!1,isDisabled:!1,onClick:y,mode:d?`copied`:`copy`})]}),(0,Q.jsxs)(`a`,{href:o.verificationUriComplete??o.verificationUri,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-sm text-[var(--oh-accent)] underline`,children:[t(l.SETTINGS$SUBSCRIPTION_OPEN_LOGIN),(0,Q.jsx)(v,{size:14,"aria-hidden":!0})]}),m?(0,Q.jsx)(`span`,{className:`text-warning`,children:t(l.SETTINGS$SUBSCRIPTION_PENDING_TOAST)}):null]}):null,(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[S?(0,Q.jsx)(b,{testId:`subscription-disconnect`,type:`button`,variant:`tertiary`,isDisabled:e||x,onClick:async()=>{try{await a.mutateAsync(),_(),s(null),h(!1),p(t(l.SETTINGS$SUBSCRIPTION_DISCONNECTED_TOAST))}catch{u(t(l.ERROR$GENERIC))}},children:t(l.SETTINGS$SUBSCRIPTION_DISCONNECT)}):(0,Q.jsx)(b,{testId:`subscription-connect`,type:`button`,variant:`primary`,isDisabled:e||x,onClick:async()=>{try{let e=await r.mutateAsync();s(e),h(!0),be(e)}catch{u(t(l.SETTINGS$SUBSCRIPTION_CONNECT_ERROR))}},children:t(l.SETTINGS$SUBSCRIPTION_CONNECT)}),o?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(b,{testId:`subscription-poll`,type:`button`,variant:`secondary`,isDisabled:e||x,onClick:async()=>{o&&(_(),C(o.deviceCode))},children:t(l.SETTINGS$SUBSCRIPTION_FINISH_SIGN_IN)}),(0,Q.jsx)(b,{testId:`subscription-cancel`,type:`button`,variant:`tertiary`,isDisabled:e||x,onClick:()=>{_(),s(null),h(!1)},children:t(l.BUTTON$CANCEL)})]}):null]})]})}var Se=e=>(0,Q.jsxs)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,Q.jsx)(`path`,{d:`M9.9509 15.588H10.8349L16.5125 9.91042L15.6285 9.0264L10.3991 14.2681L8.00867 11.8777L7.12465 12.7617L9.9509 15.588Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.8521 3.29895C14.8443 3.42346 16.712 4.41954 18.0816 5.78916C19.7002 7.53231 20.5718 9.64898 20.5718 12.1392C20.5718 14.1314 19.8247 15.999 18.5796 17.6177C17.3345 19.1118 15.5914 20.2324 13.5992 20.6059C11.607 20.9794 9.61486 20.7304 7.87171 19.7343C6.12856 18.7382 4.75895 17.2441 4.01189 15.3765C3.26482 13.5088 3.14031 11.3921 3.76286 9.52447C4.38542 7.53231 5.50601 5.91367 7.24916 4.79308C8.86779 3.67248 10.86 3.17444 12.8521 3.29895ZM13.4747 19.3608C15.0933 18.9873 16.5874 18.1157 17.708 16.7461C18.7041 15.3765 19.3267 13.7578 19.2022 12.0147C19.2022 10.0225 18.4551 8.03035 17.0855 6.66073C15.8404 5.41563 14.3463 4.66857 12.6031 4.54405C10.9845 4.41954 9.24132 4.79308 7.87171 5.78916C6.50209 6.78524 5.50601 8.15486 5.00797 9.89801C4.50993 11.5166 4.50993 13.2598 5.25699 14.8784C6.00405 16.4971 7.12465 17.7422 8.61877 18.6137C10.1129 19.4853 11.856 19.7343 13.4747 19.3608Z`,fill:`currentColor`})]});function Ce({testId:e,isSet:t}){return(0,Q.jsx)(`span`,{"data-testid":e||(t?`set-indicator`:`unset-indicator`),children:(0,Q.jsx)(Se,{className:y(t?`text-success`:`text-danger`)})})}function we(){let e=a();return o({mutationFn:({name:e,newName:t})=>D.renameProfile(e,t),onSuccess:async()=>{T.invalidateCache(),await e.invalidateQueries({queryKey:m.all}),await e.invalidateQueries({queryKey:f.personal()})},meta:{disableToast:!0}})}function Te({profile:e,onClose:t}){let{t:n}=c(`openhands`),[r,i]=(0,Z.useState)(``),a=we(),o=(0,Z.useRef)(null);if((0,Z.useEffect)(()=>{i(e?.name??``)},[e?.name]),!e)return null;let s=Y(r,{isRequired:!0}),d=r===e.name,f=async()=>{if(!s){u(n(l.SETTINGS$PROFILE_NAME_RULE));return}if(d){t();return}try{await a.mutateAsync({name:e.name,newName:r}),p(n(l.SETTINGS$PROFILE_RENAMED,{name:r})),t()}catch(e){u(e instanceof Error?e.message:n(l.ERROR$GENERIC))}},m=()=>{a.isPending||t()},h=(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(b,{type:`button`,variant:`tertiary`,onClick:m,isDisabled:a.isPending,children:n(l.BUTTON$CANCEL)}),(0,Q.jsx)(b,{testId:`rename-profile-submit`,type:`button`,variant:`primary`,onClick:f,isDisabled:a.isPending||!s,children:a.isPending?(0,Q.jsx)(x,{size:`small`}):n(l.BUTTON$RENAME)})]});return(0,Q.jsx)(q,{isOpen:!0,title:n(l.SETTINGS$PROFILE_RENAME_TITLE),footer:h,onClose:m,initialFocusRef:o,children:(0,Q.jsx)(`div`,{"data-testid":`rename-profile-modal`,className:`flex flex-col gap-3`,children:(0,Q.jsx)(K,{ref:o,testId:`rename-profile-input`,ruleTestId:`rename-profile-rule`,value:r,onChange:i,isRequired:!0,onKeyDown:e=>{e.key===`Enter`&&!a.isPending&&s&&f()}})})})}function Ee(){let e=a();return o({mutationFn:e=>D.deleteProfile(e),onSuccess:async()=>{T.invalidateCache(),await e.invalidateQueries({queryKey:m.all}),await e.invalidateQueries({queryKey:f.personal()})},meta:{disableToast:!0}})}function De({profile:e,onClose:t}){let{t:n}=c(`openhands`),r=Ee(),i=(0,Z.useRef)(null);if(!e)return null;let a=async()=>{try{await r.mutateAsync(e.name),p(n(l.SETTINGS$PROFILE_DELETED,{name:e.name})),t()}catch(e){u(e instanceof Error?e.message:n(l.ERROR$GENERIC))}},o=()=>{r.isPending||t()},s=(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(b,{ref:i,type:`button`,variant:`tertiary`,onClick:o,isDisabled:r.isPending,children:n(l.BUTTON$CANCEL)}),(0,Q.jsx)(b,{testId:`delete-profile-confirm`,type:`button`,variant:`danger`,onClick:a,isDisabled:r.isPending,"aria-busy":r.isPending,children:r.isPending?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(x,{size:`small`}),(0,Q.jsx)(`span`,{className:`sr-only`,children:n(l.BUTTON$DELETE)})]}):n(l.BUTTON$DELETE)})]});return(0,Q.jsx)(q,{isOpen:!0,title:n(l.SETTINGS$PROFILE_DELETE_TITLE),footer:s,onClose:o,initialFocusRef:i,children:(0,Q.jsx)(`p`,{className:`text-sm break-all`,children:n(l.SETTINGS$PROFILE_DELETE_CONFIRMATION,{name:e.name})})})}var Oe=e(r(),1);function ke({onEdit:e,onRename:t,onDuplicate:n,onSetActive:r,onDelete:i,isActive:a,isActivating:o,onClose:s,anchorRef:u}){let{t:d}=c(`openhands`),f=(0,Z.useRef)(null),p=(0,Z.useRef)([]),m=u?.current??null,[h,g]=(0,Z.useState)();(0,Z.useLayoutEffect)(()=>{if(!m)return;let e=()=>{let e=m.getBoundingClientRect();e&&g({position:`fixed`,zIndex:9999,top:e.bottom+8,right:window.innerWidth-e.right,width:`max-content`})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[m]),(0,Z.useEffect)(()=>{p.current[0]?.focus()},[]),(0,Z.useEffect)(()=>{let e=e=>{let t=e.target;f.current&&!f.current.contains(t)&&s()},t=e=>{e.key===`Escape`&&s()};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[s]);let v=e=>{e(),s()},b=(0,Z.useCallback)((e,t)=>{if(e.key===`Tab`){s();return}let n=p.current.filter(Boolean).length;if(e.key===`ArrowDown`){e.preventDefault();let r=(t+1)%n;p.current[r]?.focus()}else if(e.key===`ArrowUp`){e.preventDefault();let r=(t-1+n)%n;p.current[r]?.focus()}},[s]),x=a||o,C=!!m,w=(0,Q.jsxs)(`div`,{ref:f,className:y(`absolute right-0 top-full z-10 mt-2 w-[160px] rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 shadow-lg`,S,C&&`!static !top-auto !bottom-auto !left-auto !right-auto !mt-0`),role:`menu`,"aria-orientation":`vertical`,"data-testid":`profile-actions-menu`,children:[(0,Q.jsx)(J,{index:0,icon:(0,Q.jsx)(R,{width:16,height:16}),label:d(l.SETTINGS$PROFILE_EDIT),onClick:()=>v(e),onKeyDown:b,menuItemsRef:p,testId:`profile-edit`}),(0,Q.jsx)(J,{index:1,icon:(0,Q.jsx)(pe,{"aria-hidden":!0,className:`size-4`,strokeWidth:2}),label:d(l.BUTTON$RENAME),onClick:()=>v(t),onKeyDown:b,menuItemsRef:p,testId:`profile-rename`}),(0,Q.jsx)(J,{index:2,icon:(0,Q.jsx)(_,{"aria-hidden":!0,className:`size-4`,strokeWidth:2}),label:d(l.BUTTON$DUPLICATE),onClick:()=>v(n),onKeyDown:b,menuItemsRef:p,testId:`profile-duplicate`}),(0,Q.jsx)(J,{index:3,icon:(0,Q.jsx)(se,{width:16,height:16}),label:d(l.SETTINGS$PROFILE_SET_DEFAULT),onClick:()=>v(r),onKeyDown:b,menuItemsRef:p,disabled:x,testId:`profile-set-active`}),(0,Q.jsx)(J,{index:4,icon:(0,Q.jsx)(I,{width:16,height:16}),label:d(l.BUTTON$DELETE),onClick:()=>v(i),onKeyDown:b,menuItemsRef:p,testId:`profile-delete`})]});return C?typeof document>`u`||!h?null:Oe.createPortal((0,Q.jsx)(`div`,{style:h,children:w}),document.body):w}function Ae({profile:e,isActive:t,canManage:n,onActivate:r,onEdit:i,onRename:a,onDuplicate:o,onDelete:s,isActivating:u}){let{t:d}=c(`openhands`),[f,p]=(0,Z.useState)(!1),m=(0,Z.useRef)(null);return(0,Q.jsxs)(`div`,{"data-testid":`profile-row`,className:y(ce,`justify-between gap-3`),children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 max-w-full truncate text-sm font-medium text-white`,title:e.name,children:e.name}),e.model?(0,Q.jsx)(`span`,{className:`min-w-0 max-w-full truncate text-sm text-[var(--oh-muted)]`,title:e.model,children:e.model}):null,t&&(0,Q.jsx)(ie,{className:`shrink-0 whitespace-nowrap px-2.5 py-1 text-xs`,"data-testid":`profile-active-badge`,children:d(l.SETTINGS$PROFILE_DEFAULT)})]}),n&&(0,Q.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,Q.jsx)(L,{ref:m,onClick:()=>p(e=>!e),ariaLabel:d(l.SETTINGS$PROFILE_MENU),testId:`profile-menu-trigger`,className:ue}),f&&(0,Q.jsx)(ke,{anchorRef:m,onEdit:()=>i(e),onRename:()=>a(e),onDuplicate:()=>o(e),onSetActive:()=>r(e.name),onDelete:()=>s(e),isActive:t,isActivating:u,onClose:()=>p(!1)})]})]})}function je({isLoading:e,loadError:t,profiles:n,active:r,canManage:i,onActivate:a,onEdit:o,onRename:s,onDuplicate:u,onDelete:d,isActivating:f}){let{t:p}=c(`openhands`);return e?(0,Q.jsx)(`div`,{className:`flex justify-center p-4`,children:(0,Q.jsx)(x,{size:`large`})}):t?(0,Q.jsx)(`div`,{"data-testid":`profiles-load-error`,className:G,children:(0,Q.jsx)(`p`,{className:`text-sm text-red-400`,children:p(l.SETTINGS$PROFILES_LOAD_ERROR)})}):n.length===0?(0,Q.jsx)(`div`,{"data-testid":`profiles-empty`,className:G,children:(0,Q.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:p(l.SETTINGS$PROFILES_EMPTY)})}):(0,Q.jsx)(`div`,{className:y(de,le),children:n.map(e=>(0,Q.jsx)(Ae,{profile:e,isActive:e.name===r,canManage:i,onActivate:a,onEdit:o,onRename:s,onDuplicate:u,onDelete:d,isActivating:f},e.name))})}function $(){let e=a();return o({mutationFn:({name:e,request:t})=>D.saveProfile(e,t),onSuccess:async()=>{T.invalidateCache(),await e.invalidateQueries({queryKey:m.all}),await e.invalidateQueries({queryKey:f.personal()})},meta:{disableToast:!0}})}function Me({onAddProfile:e,onEditProfile:t}){let{t:n}=c(`openhands`),{data:r,isLoading:i,error:a}=F(),o=X(),s=$(),d=oe(),[f,m]=(0,Z.useState)(null),[h,g]=(0,Z.useState)(null),_=r?.profiles??[],v=r?.active_profile??null;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Q.jsx)(`h2`,{className:`text-base font-medium text-white`,children:n(l.SETTINGS$AVAILABLE_PROFILES)}),e&&d?(0,Q.jsx)(b,{testId:`add-llm-profile`,type:`button`,variant:`secondary`,className:`ml-auto`,onClick:e,children:n(l.SETTINGS$ADD_LLM_PROFILE)}):null]}),(0,Q.jsx)(je,{isLoading:i,loadError:a??null,profiles:_,active:v,canManage:d,onActivate:async e=>{try{await o.mutateAsync(e),p(n(l.SETTINGS$PROFILE_ACTIVATED,{name:e}))}catch(e){console.error(`Failed to activate profile:`,e),u(n(l.ERROR$GENERIC))}},onEdit:e=>{t?.(e)},onRename:m,onDuplicate:async e=>{try{let t=await D.getProfile(e.name,`encrypted`),r=new Set(_.map(e=>e.name)),i=`${e.name}-copy`,a=1;for(;r.has(i);)i=`${e.name}-copy-${a}`,a+=1;await s.mutateAsync({name:i,request:{llm:t.config,include_secrets:!0}}),p(n(l.SETTINGS$PROFILE_DUPLICATED,{name:i}))}catch(e){console.error(`Failed to duplicate profile:`,e),u(n(l.ERROR$GENERIC))}},onDelete:g,isActivating:o.isPending})]}),(0,Q.jsx)(Te,{profile:f,onClose:()=>m(null)}),(0,Q.jsx)(De,{profile:h,onClose:()=>g(null)})]})}function Ne({activeProfileName:e,originalName:t,savedName:n}){return e?t?e===t:e===n:!1}function Pe(){let{t:e}=c(`openhands`),{setHideSectionHeader:t}=fe(),n=$(),r=X(),{data:i}=F(),{data:a}=E(),{data:o}=H(a?.agent_settings_schema),s=(0,Z.useRef)(o);s.current=o;let[d,f]=(0,Z.useState)(`list`),[m,h]=(0,Z.useState)(``),[_,v]=(0,Z.useState)(null),[y,x]=(0,Z.useState)(null),[S,C]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>(t(d!==`list`),()=>t(!1)),[d,t]);let w=(0,Z.useMemo)(()=>new Set(i?.profiles.map(e=>e.name)??[]),[i]),T=(0,Z.useMemo)(()=>!(!Y(m,{isRequired:!0})||d===`create`&&w.has(m)||d===`edit`&&m!==_?.profile.name&&w.has(m)),[m,d,w,_?.profile.name]),P=(0,Z.useCallback)(()=>{h(``),v(null),f(`create`)},[]),I=(0,Z.useCallback)(async t=>{try{let e=(await D.getProfile(t.name,`encrypted`)).config??{},n=s.current?.sections.find(e=>e.key===`llm`)?.fields??[],r={};for(let t of n){let n=t.key.startsWith(`llm.`)?t.key.slice(4):t.key;r[t.key]=ee(t,e[n])}n.length===0&&(r[`llm.model`]=e.model??``,r[`llm.api_key`]=e.api_key??``,r[`llm.base_url`]=e.base_url??``,r[A]=j(e.auth_type),r[O]=e.subscription_vendor??`openai`),v({profile:t,initialValues:r,baseConfig:e}),h(t.name),f(`edit`)}catch(t){console.error(`Failed to fetch profile details:`,t),u(e(l.ERROR$GENERIC))}},[e]),L=(0,Z.useCallback)(()=>{f(`list`),v(null),h(``),x(null)},[]),R=(0,Z.useCallback)(e=>{if(x(e),d===`create`&&!m){let t=e.values[`llm.model`];if(typeof t==`string`&&t){let e=ae(t);w.has(e)||h(e)}}},[d,m,w]),z=(0,Z.useCallback)(async()=>{if(!y||!T)return;let t;try{t=y.getDirtyPayload().llm??{}}catch(t){u(t instanceof Error?t.message:e(l.ERROR$GENERIC));return}let a=d===`edit`&&_?.baseConfig?{..._.baseConfig}:{},o=y.view===`basic`&&Object.prototype.hasOwnProperty.call(t,`model`)&&t.model!==a.model,s={...a,...t};if(j(s.auth_type)===`subscription`)s.auth_type=M,s.subscription_vendor=k,delete s.api_key,delete s.base_url;else if(s.auth_type=N,s.subscription_vendor=null,o&&delete s.base_url,typeof s.api_key!=`string`||s.api_key.trim()===``){let e=typeof a.api_key==`string`?a.api_key:``;e?s.api_key=e:delete s.api_key}if(!(typeof s.model==`string`&&s.model)){u(e(l.SETTINGS$MODEL_REQUIRED));return}let c=m.trim(),f=_?.profile.name,h=d===`edit`&&f&&f!==c,g=Ne({activeProfileName:i?.active_profile,originalName:f,savedName:c});C(!0);try{h&&await D.renameProfile(f,c),await n.mutateAsync({name:c,request:{llm:s,include_secrets:!0}}),g&&await r.mutateAsync(c),p(e(d===`create`?l.SETTINGS$PROFILE_CREATED:l.SETTINGS$PROFILE_UPDATED,{name:c})),L()}catch(t){console.error(`Failed to save profile:`,t),u(e(l.ERROR$GENERIC))}finally{C(!1)}},[y,T,m,d,_,i?.active_profile,n,r,e,L]);if(d===`list`)return(0,Q.jsx)(Me,{onAddProfile:P,onEditProfile:I});let B=e(d===`edit`?l.SETTINGS$EDIT_LLM_PROFILE:l.SETTINGS$ADD_LLM_PROFILE),V=d===`edit`&&_?e(l.SETTINGS$PROFILE_LOADED,{name:_.profile.name}):e(l.SETTINGS$PROFILE_SAVE_HINT);return(0,Q.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Q.jsx)(g,{testId:`back-to-profiles`,onClick:L,children:e(l.BUTTON$BACK)}),(0,Q.jsx)(W.H2,{testId:`profile-editor-title`,children:B}),(0,Q.jsx)(`p`,{"data-testid":`profile-editor-description`,className:`text-sm leading-5 text-tertiary-light`,children:V})]}),(0,Q.jsx)(K,{testId:`profile-name-input`,value:m,onChange:h,isRequired:!0}),(0,Q.jsx)(Ue,{embedded:!0,hideSaveButton:!0,initialValueOverrides:d===`edit`&&_?.initialValues?_.initialValues:{"llm.model":``,"llm.api_key":``,"llm.base_url":``,[A]:N,[O]:k},onSaveControlChange:R},d===`edit`?`edit-${_?.profile.name}`:`new-profile`),(0,Q.jsxs)(`div`,{className:`flex justify-start gap-3 pt-4`,children:[(0,Q.jsx)(b,{testId:`cancel-profile-btn`,type:`button`,variant:`secondary`,onClick:L,children:e(l.BUTTON$CANCEL)}),(0,Q.jsx)(b,{testId:`save-profile-btn`,type:`button`,variant:`primary`,onClick:z,isDisabled:!T||S||!y,"aria-busy":S,children:e(S?l.STATUS$SAVING:l.BUTTON$SAVE)})]})]})}function Fe({enabled:e=!0}={}){return s({queryKey:d.openaiModels,queryFn:P.getOpenAIModels,enabled:e,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*5,meta:{disableToast:!0}})}var Ie=new Set([`llm.model`,`llm.api_key`,`llm.base_url`,A,O]),Le=(e,t)=>!e||!t?null:`${e}/${t}`,Re=(e,t)=>e?.sections.flatMap(e=>e.fields).find(e=>e.key===t)?.default??null,ze={openai:new Set([`https://api.openai.com`,`https://api.openai.com/v1`])},Be=e=>{try{let t=new URL(e),n=t.pathname.replace(/\/+$/,``)||``;return`${t.origin}${n}`}catch{return e.trim().replace(/\/+$/,``)}},Ve=(e,t)=>{let n=Be(t),{provider:r}=z(e);if(r){let e=ze[r];if(e)return e.has(n)}return Object.values(ze).some(e=>e?.has(n))};function He({testId:e}){let{t}=c(`openhands`);return(0,Q.jsx)(V,{testId:e,text:t(l.SETTINGS$OPENHANDS_API_KEY_HELP_TEXT),linkText:t(l.SETTINGS$NAV_API_KEYS),href:`https://app.all-hands.dev/settings/api-keys`,suffix:` ${t(l.SETTINGS$OPENHANDS_API_KEY_HELP_SUFFIX)}`})}function Ue({scope:e=`personal`,onSaveSuccess:t,initialValueOverrides:n,embedded:r,hideSaveButton:i,suppressSuccessToast:a,onSaveControlChange:o}){let{t:s}=c(`openhands`),{data:u}=E(e),{data:d}=H(u?.agent_settings_schema),f=u?.agent_settings?.llm,p=j(n?.[`llm.auth_type`]??f?.auth_type),[m,h]=Z.useState(p===M),{data:g,isLoading:_,isFetching:v}=Fe({enabled:m}),y=m&&!g&&(_||v),b=Z.useRef(null),x=Z.useRef(null);Z.useEffect(()=>{p===`subscription`&&h(!0)},[p]);let S=String(w.agent_settings?.llm?.model??``),T=Z.useCallback((e,t)=>{let n=te(e,t);if(n!==`basic`)return n;let r=e.llm_model??``,i=e.llm_base_url?.trim()??``;return i.length>0&&!Ve(r,i)?`all`:`basic`},[]),D=Z.useCallback(({values:e,isDisabled:t,view:n,onChange:i})=>{let a=typeof e[`llm.model`]==`string`?e[`llm.model`]:``,o=typeof e[`llm.base_url`]==`string`?e[`llm.base_url`]:``,c=a.startsWith(`openhands/`),d=j(e[A]),f=d===M,p=t||f&&y,m=g?.includes(a)?a:g?.[0]??``,_=typeof e[`llm.api_key`]==`string`?e[`llm.api_key`]:``,v=r?_.length>0:!!u?.llm_api_key_set,w=(e,n)=>(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(C,{testId:e,label:s(l.SETTINGS_FORM$API_KEY),type:`password`,className:`w-full`,value:_,placeholder:v?`<hidden>`:``,onChange:e=>i(`llm.api_key`,e),isDisabled:t,startContent:v?(0,Q.jsx)(Ce,{isSet:v}):void 0}),(0,Q.jsx)(V,{testId:n,text:s(l.SETTINGS$DONT_KNOW_API_KEY),linkText:s(l.SETTINGS$CLICK_FOR_INSTRUCTIONS),href:`https://docs.openhands.dev/usage/local-setup#getting-an-api-key`})]}),T=e=>{let t=e===`subscription`?M:N;if(i(A,t),t===`subscription`){h(!0),a&&!g?.includes(a)&&(b.current=a);let e=x.current&&g?.includes(x.current)?x.current:g?.[0];i(O,k),!g?.includes(a)&&e&&i(`llm.model`,e);return}a&&g?.includes(a)&&(x.current=a,i(`llm.model`,b.current??S))},E=()=>(0,Q.jsx)(U,{testId:`llm-auth-type-input`,name:A,label:s(l.SETTINGS$LLM_AUTH_TYPE),items:[{key:N,label:s(l.SETTINGS$LLM_AUTH_TYPE_API_KEY)},{key:M,label:s(l.SETTINGS$LLM_AUTH_TYPE_SUBSCRIPTION)}],selectedKey:d,isClearable:!1,required:!0,isDisabled:p,onSelectionChange:T}),D=()=>(0,Q.jsxs)(`div`,{className:`flex flex-col gap-6`,"data-testid":`llm-subscription-settings`,children:[(0,Q.jsx)(U,{testId:`llm-subscription-model-input`,name:`llm.subscription_model`,label:s(l.SETTINGS$SUBSCRIPTION_MODEL),items:(g??[]).map(e=>({key:e,label:e})),selectedKey:m,isClearable:!1,required:!0,isDisabled:p||!g?.length,onSelectionChange:e=>{let t=typeof e==`string`?e:g?.[0];t&&i(`llm.model`,t)}}),(0,Q.jsx)(xe,{isDisabled:t})]});return(0,Q.jsx)(`div`,{className:`flex flex-col gap-6`,children:n===`basic`?(0,Q.jsxs)(`div`,{className:`flex flex-col gap-6`,"data-testid":`llm-settings-form-basic`,children:[E(),f?D():(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(B,{currentModel:a||void 0,onChange:(e,t)=>{let n=Le(e,t);n&&i(`llm.model`,n)},wrapperClassName:`!flex-col !gap-6`,isDisabled:t}),c?(0,Q.jsx)(He,{testId:`openhands-api-key-help`}):null,w(`llm-api-key-input`,`llm-api-key-help-anchor`)]})]}):(0,Q.jsxs)(`div`,{className:`flex flex-col gap-6`,"data-testid":`llm-settings-form-advanced`,children:[E(),f?D():(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(C,{testId:`llm-custom-model-input`,label:s(l.SETTINGS$CUSTOM_MODEL),type:`text`,className:`w-full`,value:a,placeholder:S,onChange:e=>i(`llm.model`,e),isDisabled:t}),c?(0,Q.jsx)(He,{testId:`openhands-api-key-help-2`}):null,(0,Q.jsx)(C,{testId:`base-url-input`,label:s(l.SETTINGS$BASE_URL),type:`text`,className:`w-full`,value:o,placeholder:`https://api.openai.com`,onChange:e=>i(`llm.base_url`,e),isDisabled:t}),w(`llm-api-key-input`,`llm-api-key-help-anchor-advanced`)]})]})})},[S,r,y,u?.llm_api_key_set,g,s]),P=Z.useCallback((e,t)=>{let n=structuredClone(e.agent_settings_diff??{}),r=n.llm??{};if(j(t.values[`llm.auth_type`])===`subscription`){r.auth_type=M,r.subscription_vendor=k;let e=typeof r.model==`string`?r.model:String(t.values[`llm.model`]??``),n=g?.[0];if(!g?.includes(e)&&!n)throw Error(`Subscription models are not loaded yet.`);r.model=g?.includes(e)?e:n,delete r.api_key,delete r.base_url}else t.dirty[`llm.auth_type`]&&(r.auth_type=N,r.subscription_vendor=null),t.view===`basic`&&r.model!==void 0&&(r.base_url=Re(d,`llm.base_url`));return n.llm=r,{agent_settings_diff:n}},[d,g]);return(0,Q.jsx)(re,{scope:e,settingsSources:[{settingsSource:`agent_settings`,sectionKeys:[`llm`],excludeKeys:Ie}],header:D,buildPayload:P,getInitialView:T,forceShowAdvancedView:!0,allowAllView:!0,onSaveSuccess:t,initialValueOverrides:n,embedded:r,hideSaveButton:i,suppressSuccessToast:a,onSaveControlChange:o,testId:`llm-settings-screen`})}var We=i(function(){return(0,Q.jsx)(Pe,{})});export{X as i,We as n,$ as r,Ue as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./llm-settings-BgSFkbHC.js";export{e as default};
@@ -1 +1 @@
1
- import{n as e}from"./agent-server-client-options-CxnCYyIW.js";import{c as t,d as n,l as r,o as i,s as a,u as o}from"./llm-subscription-C1xDoa3K.js";function s(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var c=(e,t)=>{for(let n of t){let t=e[n];if(typeof t==`string`&&t.trim().length>0)return t.trim()}return null},l=(e,t)=>{for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t}return null},u=(e,t)=>{for(let n of t){let t=e[n];if(typeof t==`boolean`)return t}return!1};async function d(t,n={}){let{host:r,apiKey:i}=e(),a=new Headers(n.headers);a.set(`Accept`,`application/json`),n.body&&!a.has(`Content-Type`)&&a.set(`Content-Type`,`application/json`),i&&a.set(`X-Session-API-Key`,i);let o=await fetch(`${r}${t}`,{...n,headers:a});if(!o.ok)throw Error(`Subscription request failed with ${o.status}`);return o.json()}function f(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):s(e)&&Array.isArray(e.models)?e.models.filter(e=>typeof e==`string`):[]}function p(e){return{vendor:n,connected:u(e,[`connected`,`authenticated`,`is_connected`]),accountEmail:c(e,[`account_email`,`email`,`account`]),expiresAt:c(e,[`expires_at`,`expiresAt`])??l(e,[`expires_at`,`expiresAt`])}}function m(e){let t=c(e,[`device_code`,`deviceCode`]),n=c(e,[`user_code`,`userCode`]),r=c(e,[`verification_uri`,`verificationUri`,`verification_url`,`verificationUrl`]);if(!t||!n||!r)throw Error(`Subscription device login response is incomplete`);return{deviceCode:t,userCode:n,verificationUri:r,verificationUriComplete:c(e,[`verification_uri_complete`,`verificationUriComplete`,`verification_url_complete`,`verificationUrlComplete`]),expiresAt:c(e,[`expires_at`,`expiresAt`])??l(e,[`expires_at`,`expiresAt`,`expires_in`,`expiresIn`]),intervalSeconds:l(e,[`interval`,`interval_seconds`,`intervalSeconds`])}}var h=class{static async getOpenAIModels(){return f(await d(r))}static async getOpenAIStatus(){return p(await d(o))}static async startOpenAIDeviceLogin(){return m(await d(a,{method:`POST`}))}static async pollOpenAIDeviceLogin(e){return p(await d(i,{method:`POST`,body:JSON.stringify({device_code:e})}))}static async logoutOpenAI(){return p(await d(t,{method:`POST`}))}};export{h as t};
1
+ import{n as e}from"./agent-server-client-options-DVLRd9sw.js";import{c as t,d as n,l as r,o as i,s as a,u as o}from"./llm-subscription-DtsX5Lhg.js";function s(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var c=(e,t)=>{for(let n of t){let t=e[n];if(typeof t==`string`&&t.trim().length>0)return t.trim()}return null},l=(e,t)=>{for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t}return null},u=(e,t)=>{for(let n of t){let t=e[n];if(typeof t==`boolean`)return t}return!1};async function d(t,n={}){let{host:r,apiKey:i}=e(),a=new Headers(n.headers);a.set(`Accept`,`application/json`),n.body&&!a.has(`Content-Type`)&&a.set(`Content-Type`,`application/json`),i&&a.set(`X-Session-API-Key`,i);let o=await fetch(`${r}${t}`,{...n,headers:a});if(!o.ok)throw Error(`Subscription request failed with ${o.status}`);return o.json()}function f(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):s(e)&&Array.isArray(e.models)?e.models.filter(e=>typeof e==`string`):[]}function p(e){return{vendor:n,connected:u(e,[`connected`,`authenticated`,`is_connected`]),accountEmail:c(e,[`account_email`,`email`,`account`]),expiresAt:c(e,[`expires_at`,`expiresAt`])??l(e,[`expires_at`,`expiresAt`])}}function m(e){let t=c(e,[`device_code`,`deviceCode`]),n=c(e,[`user_code`,`userCode`]),r=c(e,[`verification_uri`,`verificationUri`,`verification_url`,`verificationUrl`]);if(!t||!n||!r)throw Error(`Subscription device login response is incomplete`);return{deviceCode:t,userCode:n,verificationUri:r,verificationUriComplete:c(e,[`verification_uri_complete`,`verificationUriComplete`,`verification_url_complete`,`verificationUrlComplete`]),expiresAt:c(e,[`expires_at`,`expiresAt`])??l(e,[`expires_at`,`expiresAt`,`expires_in`,`expiresIn`]),intervalSeconds:l(e,[`interval`,`interval_seconds`,`intervalSeconds`])}}var h=class{static async getOpenAIModels(){return f(await d(r))}static async getOpenAIStatus(){return p(await d(o))}static async startOpenAIDeviceLogin(){return m(await d(a,{method:`POST`}))}static async pollOpenAIDeviceLogin(e){return p(await d(i,{method:`POST`,body:JSON.stringify({device_code:e})}))}static async logoutOpenAI(){return p(await d(t,{method:`POST`}))}};export{h as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./createLucideIcon-CVAsW2Yo.js";var t=e(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]);export{t};
@@ -0,0 +1 @@
1
+ import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./utils-CE0lDWtb.js";e();var r=t(),i=e=>(0,r.jsx)(`svg`,{width:66,height:66,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,r.jsx)(`path`,{d:`M63 33C63 16.4315 49.5685 3 33 3C16.4315 3 3 16.4315 3 33C3 49.5685 16.4315 63 33 63`,stroke:`currentColor`,strokeWidth:6,strokeLinecap:`round`})});function a({size:e,className:t,outerClassName:a}){let o=e===`small`?`w-[25px] h-[25px]`:`w-[50px] h-[50px]`;return(0,r.jsx)(`div`,{"data-testid":`loading-spinner`,className:n(`relative`,o,t),children:(0,r.jsx)(i,{className:n(`absolute animate-spin`,o,a)})})}export{a as t};
@@ -0,0 +1 @@
1
+ import{a as e,r as t}from"./rolldown-runtime-BFRubm34.js";import{Ct as n,bt as r}from"./vendor-styling-CI0PQ3ab.js";import{t as i}from"./useQuery-CpjHYtZc.js";import{t as a}from"./useTranslation-Cgy4JA_g.js";import{t as o}from"./declaration-B9kpCaYl.js";import{m as s}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~ncdxw0bh-ClHnt5lR.js";import{h as c,r as l}from"./active-backend-context-DRFevVIj.js";import{t as u}from"./pencil-Dj2XjKmI.js";import{n as d,t as f}from"./refresh-cw-DM82EIyx.js";import{t as p}from"./trash-2-Be_7y3Mn.js";import{t as m}from"./utils-CE0lDWtb.js";import{T as h,n as g}from"./agent-server-client-options-DVLRd9sw.js";import{a as _,n as v,r as y}from"./use-backends-health-e-Ull4wz.js";import{t as b}from"./modal-backdrop-zVwfOJZr.js";import{r as x,t as S}from"./modal-body-Dcu5McCa.js";import{n as C}from"./modal-classes-DPqxSyuP.js";import{t as w}from"./brand-button-DKPMEKcW.js";import{n as T,t as E}from"./use-cloud-current-user-id-ekU7UXDT.js";import{a as D,i as O,o as k,r as A}from"./backend-form-modal-D2EDGVAc.js";import{t as j}from"./modal-close-button-CTCX4nCH.js";import{t as M}from"./confirmation-modal-BK1F0A68.js";var N=e(n(),1),P=r();function F({backend:e}){let{t}=a(`openhands`),{data:n}=i({queryKey:[`backend-version`,e.host,e.apiKey],queryFn:async()=>c(await new s(g({host:e.host,sessionApiKey:e.apiKey||null,timeout:5e3})).getServerInfo()),retry:!1,staleTime:6e4,enabled:e.kind===`local`});return n?(0,P.jsx)(`span`,{className:`inline-flex shrink-0 items-center rounded-full border border-[var(--oh-border)] bg-[var(--oh-surface)] px-1.5 py-0.5 text-[10px] font-medium leading-none text-[var(--oh-text-dim)]`,"data-testid":`manage-backends-version-${e.name}`,children:t(o.BACKEND$VERSION_LABEL,{version:n})}):null}var I=`inline-flex cursor-pointer items-center justify-center rounded-md p-1 text-muted transition-colors hover:bg-interactive-hover hover:text-white`;function L({backend:e,health:t,orgLabel:n,onSelect:r,onEdit:i,onRemove:s,onLogin:c}){let{t:l}=a(`openhands`),d=y(t?.lastError),g=e.kind===`cloud`&&v(t?.lastError),_=!d&&!g&&t?.isConnected===!1&&t.lastError?t.lastError:null,b=g?l(o.BACKEND$LOGGED_OUT):k(l,e,t),x=t?.isConnected===!0?`text-green-300`:t?.isConnected===!1?`text-red-300`:`text-[var(--oh-muted)]`,S=d?!1:t?.isConnected??null,C=t?.isConnected===!0&&!d,w=h();return(0,P.jsxs)(`li`,{className:`flex items-stretch`,"data-testid":`manage-backends-row-${e.name}`,children:[(0,P.jsxs)(`button`,{type:`button`,disabled:!C,onClick:r,className:m(`flex min-w-0 flex-1 items-center gap-3 px-3 py-3 text-left`,C?`cursor-pointer transition-colors hover:bg-interactive-hover focus-visible:bg-interactive-hover focus-visible:outline-none`:`cursor-default`),children:[(0,P.jsx)(D,{isConnected:S}),(0,P.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,P.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,P.jsx)(`span`,{className:`truncate text-sm text-white`,children:e.name}),(0,P.jsx)(F,{backend:e})]}),n?(0,P.jsx)(`span`,{"data-testid":`manage-backends-org-${e.name}`,className:`truncate text-xs text-[var(--oh-text-secondary)]`,children:n}):null,(0,P.jsx)(`span`,{className:`truncate text-xs text-[var(--oh-muted)]`,children:e.host}),(0,P.jsx)(`span`,{"data-testid":`manage-backends-status-${e.name}`,className:m(`truncate text-xs`,x),children:b}),_?(0,P.jsx)(`span`,{"data-testid":`manage-backends-status-detail-${e.name}`,title:_,className:`text-xs text-red-300/80 whitespace-normal break-words`,children:_}):null]}),(0,P.jsx)(`span`,{className:`px-2 py-1 rounded-full text-[11px] uppercase tracking-wide text-[var(--oh-text-tertiary)] bg-[var(--oh-surface)] border border-[var(--oh-border)]`,children:e.kind===`cloud`?l(o.BACKEND$KIND_CLOUD):l(o.BACKEND$KIND_LOCAL)})]}),(0,P.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 px-3 py-3`,children:[g&&c?(0,P.jsx)(O,{host:e.host,onSuccess:c,testIdRoot:`manage-backends-login-${e.id}`,idleButtonLabel:l(o.BACKEND$LOG_BACK_IN),idleButtonContent:(0,P.jsx)(f,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}),className:`w-auto`,buttonVariant:`unstyled`,buttonClassName:I,statusDisplay:`modal`}):null,!w&&(0,P.jsx)(`button`,{type:`button`,onClick:i,"aria-label":l(o.BACKEND$EDIT),"data-testid":`manage-backends-edit-${e.name}`,className:I,children:(0,P.jsx)(u,{"aria-hidden":!0,className:`size-4`,strokeWidth:2})}),!w&&(0,P.jsx)(`button`,{type:`button`,onClick:s,"aria-label":l(o.BACKEND$REMOVE),"data-testid":`manage-backends-remove-${e.name}`,className:I,children:(0,P.jsx)(p,{"aria-hidden":!0,className:`size-4`,strokeWidth:2})})]})]})}var R=t({ManageBackendsModal:()=>B});function z(e,t,n,r){if(e.kind!==`cloud`)return;let i=t[e.id];if(!i||i.orgs.length===0)return;let a=n[e.id]?.userId??null;return i.orgs.map(e=>a&&a===e.id?r:e.name).join(`, `)}function B({onClose:e,recoveryMode:t=!1}){let{t:n}=a(`openhands`),{backends:r,active:i,removeBackend:s,setActive:c,updateBackend:u}=l(),f=_(r,{probeDisabledOnce:!0}),p=T(),h=E(),g=n(o.BACKEND$PERSONAL_WORKSPACE),[v,y]=N.useState(null),[D,O]=N.useState(null),[k,F]=N.useState(!1),I=()=>{v&&(s(v.id),y(null))},R=N.useCallback(t=>{(i.backend.id!==t.id||i.orgId!==null)&&c(t.id),e()},[i.backend.id,i.orgId,e,c]),B=N.useCallback((e,t)=>{u(e.id,{apiKey:t})},[u]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(b,{onClose:t?void 0:e,closeOnEscape:!t,closeOnBackdropClick:!t,"aria-label":n(o.BACKEND$MANAGE_TITLE),children:(0,P.jsxs)(`div`,{"data-testid":`manage-backends-modal`,className:m(`relative flex flex-col bg-[var(--oh-surface)] border border-[var(--oh-border)] rounded-xl`,x(`lg`),S,`max-h-[70vh]`),children:[t?null:(0,P.jsx)(j,{onClose:e,testId:`close-manage-backends-modal`}),(0,P.jsx)(`div`,{className:m(`p-5`,!t&&`pr-12`),children:(0,P.jsx)(`h2`,{className:C,children:n(o.BACKEND$MANAGE_TITLE)})}),(0,P.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col px-5`,children:(0,P.jsx)(`div`,{className:`flex-1 overflow-auto rounded-md border border-[var(--oh-border)] bg-surface-raised custom-scrollbar-always`,"data-testid":`manage-backends-list`,children:r.length===0?(0,P.jsx)(`p`,{className:`px-3 py-6 text-center text-sm text-[var(--oh-text-secondary)]`,children:n(o.BACKEND$MANAGE_EMPTY)}):(0,P.jsx)(`ul`,{className:`divide-y divide-[var(--oh-border)]`,children:r.map(e=>(0,P.jsx)(L,{backend:e,health:f[e.id],orgLabel:z(e,p,h,g),onSelect:()=>R(e),onEdit:()=>O(e),onRemove:()=>y({id:e.id,name:e.name}),onLogin:t=>B(e,t)},e.id))})})}),(0,P.jsxs)(`div`,{className:`flex justify-end gap-2 p-5`,children:[(0,P.jsx)(w,{type:`button`,variant:t?`primary`:`secondary`,onClick:()=>F(!0),testId:`manage-backends-add`,startContent:(0,P.jsx)(d,{width:14,height:14}),children:n(o.BACKEND$ADD)}),t?null:(0,P.jsx)(w,{type:`button`,variant:`primary`,onClick:e,testId:`manage-backends-done`,children:n(o.HOME$DONE)})]})]})}),k?(0,P.jsx)(A,{mode:`add`,source:`manage_backends_modal`,onClose:()=>F(!1)}):null,D?(0,P.jsx)(A,{mode:`edit`,backend:D,onClose:()=>O(null)}):null,v?(0,P.jsx)(M,{text:n(o.BACKEND$REMOVE_CONFIRMATION,{name:v.name}),onConfirm:I,onCancel:()=>y(null)}):null]})}export{R as n,B as t};