@openhands/agent-canvas 1.5.1 → 1.6.1

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 (720) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{Trans-DqF_OEZB.js → Trans-52HCczKK.js} +1 -1
  4. package/build/assets/{acp-providers-DerAmTyY.js → acp-providers-xACMK9ZP.js} +1 -1
  5. package/build/assets/{active-backend-context-B8rMv0X9.js → active-backend-context-Cd1qcZsb.js} +1 -1
  6. package/build/assets/{add-backend-modal-CxC7BNEc.js → add-backend-modal-5chsfln3.js} +1 -1
  7. package/build/assets/{agent-profiles-settings-BJb8YXR1.js → agent-profiles-settings-BWK4H3kR.js} +1 -1
  8. package/build/assets/agent-server-compatibility-DMY0CihN.js +1 -0
  9. package/build/assets/agent-server-conversation-service.api-CI5-xmIX.js +41 -0
  10. package/build/assets/agent-settings-CMd8-O4f.js +2 -0
  11. package/build/assets/agent-settings-CdrhQJXX.js +1 -0
  12. package/build/assets/{alert-banner-Dh51WURQ.js → alert-banner-CLfWuIAX.js} +1 -1
  13. package/build/assets/api-key-entry-screen-Cc3aC7DZ.js +1 -0
  14. package/build/assets/app-settings-B-DQcBoB.js +1 -0
  15. package/build/assets/{automation-detail-CZsu2CoM.js → automation-detail-BgxBIpyK.js} +2 -2
  16. package/build/assets/automation-export-Dbur8OHa.js +2 -0
  17. package/build/assets/automations-list-BWfjizlp.js +1 -0
  18. package/build/assets/{back-nav-button-DVknCcSP.js → back-nav-button-CaKvsD1E.js} +1 -1
  19. package/build/assets/backend-form-modal-YcfpuBZo.js +1 -0
  20. package/build/assets/{backend-synced-settings-badge-BSfN0AZA.js → backend-synced-settings-badge-BellMmgC.js} +1 -1
  21. package/build/assets/{base-modal-CIF_785P.js → base-modal-Cw7enAHz.js} +1 -1
  22. package/build/assets/{brand-button-B1izLAdR.js → brand-button-BulEFHr3.js} +1 -1
  23. package/build/assets/{browser-DKaeq_sT.js → browser-DfVgUREb.js} +2 -2
  24. package/build/assets/browser-store-CBqI3tNR.js +1 -0
  25. package/build/assets/{browser-tab-qb_ftCxW.js → browser-tab-CmIKQB7S.js} +1 -1
  26. package/build/assets/chat-send-button-BchSSwuD.js +1 -0
  27. package/build/assets/circle-check-BXbQ5nEH.js +1 -0
  28. package/build/assets/{circle-plus-check-toggle-DoFIjVE0.js → circle-plus-check-toggle-BhpPjkh9.js} +1 -1
  29. package/build/assets/client-source-DAUgyJsi.js +1 -0
  30. package/build/assets/cloud-funnel-analytics-B5OeWh4y.js +1 -0
  31. package/build/assets/{color-themes-CHizm1xF.js → color-themes-QKMSVfDU.js} +1 -1
  32. package/build/assets/{combobox-caret-CxZpqoSR.js → combobox-caret-kNZtp53R.js} +1 -1
  33. package/build/assets/{command-menu-oTvKDU3Y.js → command-menu-tUsn23zy.js} +1 -1
  34. package/build/assets/{command-store-D8J5LMW1.js → command-store-B0hrIWMN.js} +1 -1
  35. package/build/assets/{condenser-settings-BGlWn93P.js → condenser-settings-BBizzfIH.js} +1 -1
  36. package/build/assets/{confirmation-modal-DGBWM2Ls.js → confirmation-modal-108xng7X.js} +1 -1
  37. package/build/assets/{context-menu-list-item-6psNyl7X.js → context-menu-list-item-BbKfFuN1.js} +1 -1
  38. package/build/assets/conversation-CTzSrLMq.js +1 -0
  39. package/build/assets/conversation-CgcXNb-Z.js +90 -0
  40. package/build/assets/conversation-panel-bscjGQda.js +1 -0
  41. package/build/assets/{conversation-service.api-_f9GlIEi.js → conversation-service.api-DbBvscJA.js} +1 -1
  42. package/build/assets/conversation-state-store-C5GagZHT.js +1 -0
  43. package/build/assets/{conversation-store-LptbOvKa.js → conversation-store-CyVqoa0d.js} +1 -1
  44. package/build/assets/{conversation-tab-empty-state-CNUmIms2.js → conversation-tab-empty-state-2KYlk5Bh.js} +1 -1
  45. package/build/assets/{copy-to-clipboard-button-CFzH_NOX.js → copy-to-clipboard-button-C54YRPMg.js} +1 -1
  46. package/build/assets/declaration-_yumYLEx.js +1 -0
  47. package/build/assets/{device-verify-WBSjJBLH.js → device-verify-D6FW_KZq.js} +1 -1
  48. package/build/assets/{dropdown-classes-D3wMJlXT.js → dropdown-classes-9uONlOg1.js} +1 -1
  49. package/build/assets/{ellipsis-button-CbNnHlIq.js → ellipsis-button-CoaUrKmQ.js} +1 -1
  50. package/build/assets/{entry.client-DNlPGxsu.js → entry.client-BJSVzw7V.js} +2 -2
  51. package/build/assets/{enum-filter-dropdown-JLYv1t8L.js → enum-filter-dropdown-qQzyjk_q.js} +1 -1
  52. package/build/assets/{environment-switch-overlay-B1PFO8P8.js → environment-switch-overlay-XRWCClLu.js} +1 -1
  53. package/build/assets/extensions-hub-DUp9sWQY.js +1 -0
  54. package/build/assets/extensions-navigation-DmkftjAx.js +1 -0
  55. package/build/assets/file-tUAzhmJ3.js +1 -0
  56. package/build/assets/files-tab-GV5hwiIM.js +1 -0
  57. package/build/assets/files-tab-store-DehyITNC.js +1 -0
  58. package/build/assets/{form-control-classes-CbdN5aO3.js → form-control-classes-BPUnoYyg.js} +1 -1
  59. package/build/assets/git-provider-icon-DDkru3b_.js +1 -0
  60. package/build/assets/highlighted-source-view-CYkPZUxr.js +1 -0
  61. package/build/assets/home-C53WekZ2.js +1 -0
  62. package/build/assets/home-EAwq8ah2.js +1 -0
  63. package/build/assets/index-home-kBdZGKtu.js +1 -0
  64. package/build/assets/install-server-modal-DYk4VP3-.js +1 -0
  65. package/build/assets/{launch-CAGavYl-.js → launch-CIecOy_y.js} +1 -1
  66. package/build/assets/lesson-plan-BSEUwflx.js +4 -0
  67. package/build/assets/llm-not-configured-banner-C8uv1PHT.js +27 -0
  68. package/build/assets/llm-settings-0Bb97NCk.js +1 -0
  69. package/build/assets/llm-settings-D4toJ90k.js +1 -0
  70. package/build/assets/{llm-subscription-service-Casyzgn1.js → llm-subscription-service-BPRw3u3H.js} +1 -1
  71. package/build/assets/{loading-spinner-BcdnT0mN.js → loading-spinner-BCInDEXB.js} +1 -1
  72. package/build/assets/manage-backends-modal-Bon32JYr.js +1 -0
  73. package/build/assets/manifest-ec000ae3.js +1 -0
  74. package/build/assets/markdown-renderer-BlaJOAI2.js +2 -0
  75. package/build/assets/mcp-CFIpOkn2.js +9 -0
  76. package/build/assets/messages-eRPeR4pW.js +40 -0
  77. package/build/assets/{modal-body-Cc2zp0xb.js → modal-body-Bg9UCeoV.js} +1 -1
  78. package/build/assets/{modal-classes-3qT9Ap7Q.js → modal-classes-H1KbJkeC.js} +1 -1
  79. package/build/assets/{modal-close-button-BcIBUdSq.js → modal-close-button-BMLYvo0C.js} +1 -1
  80. package/build/assets/{model-selector-DJrMrFAr.js → model-selector-BqX2RvEr.js} +1 -1
  81. package/build/assets/{navigation-link-D8hfwvxI.js → navigation-link-DoJzTCEz.js} +1 -1
  82. package/build/assets/onboarding-3KO4qE6R.js +1 -0
  83. package/build/assets/onboarding-modal-D4vqkJeT.js +1 -0
  84. package/build/assets/{organization-service.api-vrRNwOma.js → organization-service.api-CvfQugOt.js} +1 -1
  85. package/build/assets/{path-utils-PNfCKQDV.js → path-utils-DRgexxnX.js} +1 -1
  86. package/build/assets/{plan-components-BdZXPyZU.js → plan-components-qkMiGs_-.js} +1 -1
  87. package/build/assets/{planner-tab-ByOw1he8.js → planner-tab-ZrjiirRr.js} +1 -1
  88. package/build/assets/{plugins-management-service-B75jyC56.js → plugins-management-service-9qT-r_37.js} +1 -1
  89. package/build/assets/plus-CzE1b-wl.js +1 -0
  90. package/build/assets/{profiles-service.api-BQTklD5D.js → profiles-service.api-CRVlrQpT.js} +1 -1
  91. package/build/assets/{providers-DfTB2gPd.js → providers-C2DFGBrf.js} +1 -1
  92. package/build/assets/{proxy-B3tCGf0X.js → proxy-DnnDqkwn.js} +1 -1
  93. package/build/assets/puzzle-IHQnD54C.js +1 -0
  94. package/build/assets/recommended-automations-launcher-B97vgHuN.js +58 -0
  95. package/build/assets/refresh-cw-DxbAs3SK.js +1 -0
  96. package/build/assets/root-BbONavTg.css +1 -0
  97. package/build/assets/root-D01rpqZU.js +2 -0
  98. package/build/assets/root-layout-BiHbCIkS.js +2 -0
  99. package/build/assets/{runtime-waiting-state-CnyVhX4T.js → runtime-waiting-state-CbUV9txX.js} +1 -1
  100. package/build/assets/{schema-field-CUwk4wrQ.js → schema-field-B9-9Ta9u.js} +1 -1
  101. package/build/assets/sdk-section-page-DG1s25Pr.js +1 -0
  102. package/build/assets/{sdk-settings-schema-CLR01YIK.js → sdk-settings-schema-B42JFr5Y.js} +1 -1
  103. package/build/assets/{secrets-service-CvyPWJhg.js → secrets-service-DvyS6-mV.js} +1 -1
  104. package/build/assets/secrets-settings-CeSq6cQw.js +1 -0
  105. package/build/assets/{segmented-toggle-kzwZkLaj.js → segmented-toggle-DRVJBNy0.js} +1 -1
  106. package/build/assets/settings-Dzo0dJKM.js +1 -0
  107. package/build/assets/{settings-mQUckT0g.js → settings-HcwfqMjJ.js} +1 -1
  108. package/build/assets/{settings-dropdown-input-Dhx9ErGd.js → settings-dropdown-input-B6RL_mt0.js} +1 -1
  109. package/build/assets/settings-index-uAKHyijw.js +1 -0
  110. package/build/assets/{settings-input-BsgQWS5R.js → settings-input-ZoaAPNQh.js} +1 -1
  111. package/build/assets/{settings-list-classes-DSJJX99U.js → settings-list-classes-Dr8LgITi.js} +1 -1
  112. package/build/assets/settings-modal-BVX2G_IT.js +1 -0
  113. package/build/assets/{settings-service.api-DXk5TdeJ.js → settings-service.api-BY7ncxIz.js} +1 -1
  114. package/build/assets/{settings-switch-Bes8dIlV.js → settings-switch-DUlGnP0B.js} +1 -1
  115. package/build/assets/{settings-utils-DzCVfiR3.js → settings-utils-kWEEvcdv.js} +1 -1
  116. package/build/assets/shared-conversation-CV4Rtdz2.js +1 -0
  117. package/build/assets/{sidebar-layout-Bm7pa3Vk.js → sidebar-layout-BhGooCga.js} +1 -1
  118. package/build/assets/sidebar-mobile-menu-toggle-BntOJphE.js +1 -0
  119. package/build/assets/{sidebar-nav-link-CHqyFXwV.js → sidebar-nav-link-DkA1XWV8.js} +1 -1
  120. package/build/assets/{sidebar-store-uiUXBU1N.js → sidebar-store-CF3b12-m.js} +1 -1
  121. package/build/assets/{skill-card-pill-row-BPYKQ3IN.js → skill-card-pill-row-_gWe1Tws.js} +1 -1
  122. package/build/assets/skill-icon-badge-C-zbaXbD.js +1 -0
  123. package/build/assets/skills-plugins-BwoXKtrR.js +1 -0
  124. package/build/assets/skills-settings-Crq-fZSt.js +2 -0
  125. package/build/assets/{styled-tooltip-B14i_Uac.js → styled-tooltip-CdnCJ67u.js} +1 -1
  126. package/build/assets/syntax-highlighter-CZK2ab-O.js +1 -0
  127. package/build/assets/{task-list-tab-DyfgG4MC.js → task-list-tab-CONOO9iI.js} +1 -1
  128. package/build/assets/telemetry-CC32dJYW.js +2 -0
  129. package/build/assets/{terminal-DRXt2Lr4.js → terminal-CTkDpIU-.js} +1 -1
  130. package/build/assets/{toggle-switch-DX_k418f.js → toggle-switch-yVIzmJLM.js} +1 -1
  131. package/build/assets/{typography-CzfoD9DY.js → typography-BBVEW0un.js} +1 -1
  132. package/build/assets/{use-acp-credential-form-Bm8qXdlc.js → use-acp-credential-form-CIsp8hJe.js} +1 -1
  133. package/build/assets/use-activate-agent-profile-BfcTTJJG.js +1 -0
  134. package/build/assets/{use-active-agent-profile-hI-x-UBa.js → use-active-agent-profile-CCeFtmk9.js} +1 -1
  135. package/build/assets/{use-active-conversation-2qeez40F.js → use-active-conversation-Badxj8w4.js} +1 -1
  136. package/build/assets/{use-agent-profiles-0pr5bLS7.js → use-agent-profiles-BSWVN6hH.js} +1 -1
  137. package/build/assets/{use-agent-state-C6peDXUm.js → use-agent-state-BzRrhoPd.js} +1 -1
  138. package/build/assets/use-backends-health-BsZikyFW.js +1 -0
  139. package/build/assets/{use-can-manage-org-profiles-Ck_bsNbH.js → use-can-manage-org-profiles-Do6mYf6P.js} +1 -1
  140. package/build/assets/{use-cloud-current-user-id-DUCSxNjY.js → use-cloud-current-user-id-Cx3B_0-w.js} +1 -1
  141. package/build/assets/use-config-D9zUVw5b.js +1 -0
  142. package/build/assets/{use-create-conversation-r1JHfKO5.js → use-create-conversation-vvl0kvu7.js} +1 -1
  143. package/build/assets/{use-create-secret-Cf2N11d2.js → use-create-secret-CB7Dvd4s.js} +1 -1
  144. package/build/assets/use-event-store-BlpSUF7N.js +4 -0
  145. package/build/assets/{use-handle-plan-click-CsAW3FlH.js → use-handle-plan-click-DDZkew9p.js} +1 -1
  146. package/build/assets/use-is-creating-conversation-fxSzN778.js +1 -0
  147. package/build/assets/{use-launch-skill-in-chat-DJWEfVc5.js → use-launch-skill-in-chat-D6_n1fs3.js} +1 -1
  148. package/build/assets/use-llm-profiles-CNQm7HYS.js +1 -0
  149. package/build/assets/use-plugins-marketplace-CloojomS.js +1 -0
  150. package/build/assets/use-runtime-is-ready-Bx_4cfar.js +1 -0
  151. package/build/assets/{use-save-agent-profile-RqUGqTv6.js → use-save-agent-profile-Bj7N-1jS.js} +1 -1
  152. package/build/assets/{use-save-settings-Chvzeu2s.js → use-save-settings-BMsb2wk_.js} +1 -1
  153. package/build/assets/use-settings-B9XEmh7i.js +1 -0
  154. package/build/assets/use-settings-nav-items-BGfBS0yL.js +16 -0
  155. package/build/assets/{use-skills-xrVoKYrF.js → use-skills-CSRbvPle.js} +1 -1
  156. package/build/assets/{use-task-list-CfisapBW.js → use-task-list-CTIVLrQA.js} +1 -1
  157. package/build/assets/use-tracking-DjdCssvp.js +1 -0
  158. package/build/assets/{use-user-conversation-CnE4zhOA.js → use-user-conversation-BCpFn-Ei.js} +1 -1
  159. package/build/assets/{useTranslation-Cbf5AGg_.js → useTranslation-CHm_6BRr.js} +1 -1
  160. package/build/assets/{utils-DB9LsAzA.js → utils-CrRpzbM2.js} +1 -1
  161. package/build/assets/vendor-markdown-DzO4uO_0.js +37 -0
  162. package/build/assets/{vendor~browser-wXQ-WZEC.js → vendor~browser-Byfuq5J-.js} +1 -1
  163. package/build/assets/{vendor~browser-tab-CsMb-pta.js → vendor~browser-tab-BLk3qxhw.js} +1 -1
  164. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js} +2 -2
  165. package/build/assets/{vendor~files-tab-B-5fBohe.js → vendor~files-tab-XmnauIZI.js} +1 -1
  166. package/build/assets/{vendor~launch-_Km3J77E.js → vendor~launch-DeC8QhXQ.js} +1 -1
  167. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-BrguKXCn.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DDmLzCzm.js} +1 -1
  168. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-YrfJYTQw.js +1 -0
  169. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-DoaS51iW.js} +123 -3
  170. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-DEYwoy8u.js} +1 -1
  171. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-DZHLw5Sr.js +1 -0
  172. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-UJ4BNDJP.js} +1 -1
  173. package/build/assets/{verification-settings-CfkrXoSa.js → verification-settings-uwOfc16F.js} +1 -1
  174. package/build/index.html +4 -4
  175. package/build/locales/ar/openhands.json +38 -4
  176. package/build/locales/ca/openhands.json +38 -4
  177. package/build/locales/de/openhands.json +38 -4
  178. package/build/locales/en/openhands.json +38 -4
  179. package/build/locales/es/openhands.json +38 -4
  180. package/build/locales/fr/openhands.json +38 -4
  181. package/build/locales/it/openhands.json +38 -4
  182. package/build/locales/ja/openhands.json +38 -4
  183. package/build/locales/ko-KR/openhands.json +38 -4
  184. package/build/locales/no/openhands.json +38 -4
  185. package/build/locales/pt/openhands.json +38 -4
  186. package/build/locales/tr/openhands.json +38 -4
  187. package/build/locales/uk/openhands.json +38 -4
  188. package/build/locales/zh-CN/openhands.json +38 -4
  189. package/build/locales/zh-TW/openhands.json +38 -4
  190. package/config/defaults.json +7 -3
  191. package/dist/api/agent-canvas-updates.cjs +2 -0
  192. package/dist/api/agent-canvas-updates.cjs.map +1 -0
  193. package/dist/api/agent-canvas-updates.d.ts +7 -0
  194. package/dist/api/agent-canvas-updates.js +19 -0
  195. package/dist/api/agent-canvas-updates.js.map +1 -0
  196. package/dist/api/agent-server-adapter.cjs +1 -1
  197. package/dist/api/agent-server-adapter.cjs.map +1 -1
  198. package/dist/api/agent-server-adapter.d.ts +3 -0
  199. package/dist/api/agent-server-adapter.js +1 -0
  200. package/dist/api/agent-server-adapter.js.map +1 -1
  201. package/dist/api/agent-server-compatibility.cjs +1 -1
  202. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  203. package/dist/api/agent-server-compatibility.d.ts +5 -0
  204. package/dist/api/agent-server-compatibility.js +24 -15
  205. package/dist/api/agent-server-compatibility.js.map +1 -1
  206. package/dist/api/agent-server-config.cjs +1 -1
  207. package/dist/api/agent-server-config.cjs.map +1 -1
  208. package/dist/api/agent-server-config.js +11 -8
  209. package/dist/api/agent-server-config.js.map +1 -1
  210. package/dist/api/automation-service/automation-service.api.cjs +2 -0
  211. package/dist/api/automation-service/automation-service.api.cjs.map +1 -0
  212. package/dist/api/automation-service/automation-service.api.d.ts +3 -0
  213. package/dist/api/automation-service/automation-service.api.js +283 -0
  214. package/dist/api/automation-service/automation-service.api.js.map +1 -0
  215. package/dist/api/client-source.cjs +1 -1
  216. package/dist/api/client-source.cjs.map +1 -1
  217. package/dist/api/client-source.d.ts +3 -0
  218. package/dist/api/client-source.js +4 -4
  219. package/dist/api/client-source.js.map +1 -1
  220. package/dist/api/cloud/settings-service.api.cjs.map +1 -1
  221. package/dist/api/cloud/settings-service.api.js.map +1 -1
  222. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  223. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  224. package/dist/api/conversation-service/agent-server-conversation-service.api.js +111 -109
  225. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  226. package/dist/api/mcp-health/mcp-health-store.cjs +2 -0
  227. package/dist/api/mcp-health/mcp-health-store.cjs.map +1 -0
  228. package/dist/api/mcp-health/mcp-health-store.d.ts +22 -0
  229. package/dist/api/mcp-health/mcp-health-store.js +45 -0
  230. package/dist/api/mcp-health/mcp-health-store.js.map +1 -0
  231. package/dist/api/mcp-health/probe-mcp-server-health.cjs +2 -0
  232. package/dist/api/mcp-health/probe-mcp-server-health.cjs.map +1 -0
  233. package/dist/api/mcp-health/probe-mcp-server-health.d.ts +31 -0
  234. package/dist/api/mcp-health/probe-mcp-server-health.js +57 -0
  235. package/dist/api/mcp-health/probe-mcp-server-health.js.map +1 -0
  236. package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
  237. package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
  238. package/dist/api/mcp-service/mcp-service.api.js +66 -46
  239. package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
  240. package/dist/api/plugins-management-service.cjs.map +1 -1
  241. package/dist/api/plugins-management-service.d.ts +6 -1
  242. package/dist/api/plugins-management-service.js.map +1 -1
  243. package/dist/api/plugins-service.d.ts +30 -2
  244. package/dist/api/secrets-service.cjs +1 -1
  245. package/dist/api/secrets-service.cjs.map +1 -1
  246. package/dist/api/secrets-service.d.ts +6 -6
  247. package/dist/api/secrets-service.js +8 -3
  248. package/dist/api/secrets-service.js.map +1 -1
  249. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  250. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  251. package/dist/api/settings-service/settings-service.api.d.ts +1 -1
  252. package/dist/api/settings-service/settings-service.api.js +1 -0
  253. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  254. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
  255. package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
  256. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  257. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  258. package/dist/components/features/backends/backend-form-modal.d.ts +4 -1
  259. package/dist/components/features/backends/backend-form-modal.js +15 -16
  260. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  261. package/dist/components/features/backends/backend-selector.cjs +1 -1
  262. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  263. package/dist/components/features/backends/backend-selector.js +103 -102
  264. package/dist/components/features/backends/backend-selector.js.map +1 -1
  265. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  266. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  267. package/dist/components/features/backends/manage-backends-modal.js +85 -73
  268. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  269. package/dist/components/features/chat/chat-interface.cjs +2 -2
  270. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  271. package/dist/components/features/chat/chat-interface.js +131 -129
  272. package/dist/components/features/chat/chat-interface.js.map +1 -1
  273. package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
  274. package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
  275. package/dist/components/features/chat/skill-install-restart-banner.cjs +2 -0
  276. package/dist/components/features/chat/skill-install-restart-banner.cjs.map +1 -0
  277. package/dist/components/features/chat/skill-install-restart-banner.d.ts +11 -0
  278. package/dist/components/features/chat/skill-install-restart-banner.js +63 -0
  279. package/dist/components/features/chat/skill-install-restart-banner.js.map +1 -0
  280. package/dist/components/features/conversation/right-panel-toggle.cjs +1 -1
  281. package/dist/components/features/conversation/right-panel-toggle.cjs.map +1 -1
  282. package/dist/components/features/conversation/right-panel-toggle.js +1 -1
  283. package/dist/components/features/conversation/right-panel-toggle.js.map +1 -1
  284. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  285. package/dist/components/features/conversation-panel/conversation-panel.js +10 -10
  286. package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
  287. package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
  288. package/dist/components/features/mcp-page/custom-server-editor.js +78 -77
  289. package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
  290. package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
  291. package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
  292. package/dist/components/features/mcp-page/install-server-modal.d.ts +4 -1
  293. package/dist/components/features/mcp-page/install-server-modal.js +135 -136
  294. package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
  295. package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
  296. package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
  297. package/dist/components/features/mcp-page/installed-server-card.js +40 -34
  298. package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
  299. package/dist/components/features/mcp-page/mcp-server-health.cjs +2 -0
  300. package/dist/components/features/mcp-page/mcp-server-health.cjs.map +1 -0
  301. package/dist/components/features/mcp-page/mcp-server-health.d.ts +18 -0
  302. package/dist/components/features/mcp-page/mcp-server-health.js +117 -0
  303. package/dist/components/features/mcp-page/mcp-server-health.js.map +1 -0
  304. package/dist/components/features/plugins/build-plugins-view-model.d.ts +10 -1
  305. package/dist/components/features/plugins/plugin-files-section.d.ts +13 -0
  306. package/dist/components/features/settings/agent-canvas-update-card.cjs +2 -0
  307. package/dist/components/features/settings/agent-canvas-update-card.cjs.map +1 -0
  308. package/dist/components/features/settings/agent-canvas-update-card.d.ts +7 -0
  309. package/dist/components/features/settings/agent-canvas-update-card.js +170 -0
  310. package/dist/components/features/settings/agent-canvas-update-card.js.map +1 -0
  311. package/dist/components/features/settings/integrations-settings-link.cjs +2 -0
  312. package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -0
  313. package/dist/components/features/settings/integrations-settings-link.d.ts +5 -0
  314. package/dist/components/features/settings/integrations-settings-link.js +41 -0
  315. package/dist/components/features/settings/integrations-settings-link.js.map +1 -0
  316. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
  317. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +1 -1
  318. package/dist/components/features/settings/settings-desktop-sidebar.cjs +1 -1
  319. package/dist/components/features/settings/settings-desktop-sidebar.cjs.map +1 -1
  320. package/dist/components/features/settings/settings-desktop-sidebar.js +31 -21
  321. package/dist/components/features/settings/settings-desktop-sidebar.js.map +1 -1
  322. package/dist/components/features/settings/settings-mobile-drawer.cjs +1 -1
  323. package/dist/components/features/settings/settings-mobile-drawer.cjs.map +1 -1
  324. package/dist/components/features/settings/settings-mobile-drawer.js +40 -30
  325. package/dist/components/features/settings/settings-mobile-drawer.js.map +1 -1
  326. package/dist/components/features/skills/extensions-navigation.cjs +1 -1
  327. package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
  328. package/dist/components/features/skills/extensions-navigation.js +54 -33
  329. package/dist/components/features/skills/extensions-navigation.js.map +1 -1
  330. package/dist/config/defaults.cjs +1 -1
  331. package/dist/config/defaults.cjs.map +1 -1
  332. package/dist/config/defaults.js +7 -3
  333. package/dist/config/defaults.js.map +1 -1
  334. package/dist/constants/acp-providers.cjs.map +1 -1
  335. package/dist/constants/acp-providers.js.map +1 -1
  336. package/dist/contexts/conversation-websocket-context.cjs +2 -2
  337. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  338. package/dist/contexts/conversation-websocket-context.js +169 -166
  339. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  340. package/dist/hooks/mutation/use-delete-llm-profile.cjs +1 -1
  341. package/dist/hooks/mutation/use-delete-llm-profile.js +1 -0
  342. package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
  343. package/dist/hooks/mutation/use-delete-mcp-server.cjs.map +1 -1
  344. package/dist/hooks/mutation/use-delete-mcp-server.js +8 -6
  345. package/dist/hooks/mutation/use-delete-mcp-server.js.map +1 -1
  346. package/dist/hooks/mutation/use-rename-llm-profile.cjs +1 -1
  347. package/dist/hooks/mutation/use-rename-llm-profile.js +1 -0
  348. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  349. package/dist/hooks/mutation/use-save-settings.js +3 -3
  350. package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
  351. package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
  352. package/dist/hooks/mutation/use-update-mcp-server.js +11 -9
  353. package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
  354. package/dist/hooks/query/query-keys.cjs +1 -1
  355. package/dist/hooks/query/query-keys.cjs.map +1 -1
  356. package/dist/hooks/query/query-keys.d.ts +4 -0
  357. package/dist/hooks/query/query-keys.js +2 -2
  358. package/dist/hooks/query/query-keys.js.map +1 -1
  359. package/dist/hooks/query/use-automation-sdk-version.cjs +2 -0
  360. package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -0
  361. package/dist/hooks/query/use-automation-sdk-version.d.ts +3 -0
  362. package/dist/hooks/query/use-automation-sdk-version.js +63 -0
  363. package/dist/hooks/query/use-automation-sdk-version.js.map +1 -0
  364. package/dist/hooks/query/use-latest-agent-canvas-version.cjs +2 -0
  365. package/dist/hooks/query/use-latest-agent-canvas-version.cjs.map +1 -0
  366. package/dist/hooks/query/use-latest-agent-canvas-version.d.ts +10 -0
  367. package/dist/hooks/query/use-latest-agent-canvas-version.js +19 -0
  368. package/dist/hooks/query/use-latest-agent-canvas-version.js.map +1 -0
  369. package/dist/hooks/query/use-plugin-file-content.d.ts +7 -0
  370. package/dist/hooks/query/use-resolved-workspaces.cjs +1 -1
  371. package/dist/hooks/query/use-resolved-workspaces.cjs.map +1 -1
  372. package/dist/hooks/query/use-resolved-workspaces.js +25 -26
  373. package/dist/hooks/query/use-resolved-workspaces.js.map +1 -1
  374. package/dist/hooks/query/use-search-subdirs.cjs +1 -1
  375. package/dist/hooks/query/use-search-subdirs.cjs.map +1 -1
  376. package/dist/hooks/query/use-search-subdirs.d.ts +5 -0
  377. package/dist/hooks/query/use-search-subdirs.js +16 -4
  378. package/dist/hooks/query/use-search-subdirs.js.map +1 -1
  379. package/dist/hooks/query/use-task-polling.cjs +1 -1
  380. package/dist/hooks/query/use-task-polling.cjs.map +1 -1
  381. package/dist/hooks/query/use-task-polling.d.ts +19 -3
  382. package/dist/hooks/query/use-task-polling.js +36 -35
  383. package/dist/hooks/query/use-task-polling.js.map +1 -1
  384. package/dist/hooks/use-device-flow.cjs +1 -1
  385. package/dist/hooks/use-device-flow.js +6 -6
  386. package/dist/hooks/use-llm-configured.cjs +1 -1
  387. package/dist/hooks/use-llm-configured.js +3 -3
  388. package/dist/hooks/use-mcp-server-health.cjs +2 -0
  389. package/dist/hooks/use-mcp-server-health.cjs.map +1 -0
  390. package/dist/hooks/use-mcp-server-health.d.ts +11 -0
  391. package/dist/hooks/use-mcp-server-health.js +18 -0
  392. package/dist/hooks/use-mcp-server-health.js.map +1 -0
  393. package/dist/hooks/use-skill-installs.cjs +2 -0
  394. package/dist/hooks/use-skill-installs.cjs.map +1 -0
  395. package/dist/hooks/use-skill-installs.d.ts +10 -0
  396. package/dist/hooks/use-skill-installs.js +21 -0
  397. package/dist/hooks/use-skill-installs.js.map +1 -0
  398. package/dist/hooks/use-tracking.cjs +1 -1
  399. package/dist/hooks/use-tracking.cjs.map +1 -1
  400. package/dist/hooks/use-tracking.d.ts +3 -3
  401. package/dist/hooks/use-tracking.js +67 -52
  402. package/dist/hooks/use-tracking.js.map +1 -1
  403. package/dist/i18n/declaration.cjs +1 -1
  404. package/dist/i18n/declaration.cjs.map +1 -1
  405. package/dist/i18n/declaration.d.ts +35 -1
  406. package/dist/i18n/declaration.js +1 -1
  407. package/dist/i18n/declaration.js.map +1 -1
  408. package/dist/i18n/translation.cjs +3 -3
  409. package/dist/i18n/translation.cjs.map +1 -1
  410. package/dist/i18n/translation.js +623 -45
  411. package/dist/i18n/translation.js.map +1 -1
  412. package/dist/index.cjs +1 -1
  413. package/dist/index.js +1 -2
  414. package/dist/lib/index.cjs +1 -1
  415. package/dist/lib/index.d.ts +0 -1
  416. package/dist/lib/index.js +0 -1
  417. package/dist/locales/ar/openhands.json +38 -4
  418. package/dist/locales/ca/openhands.json +38 -4
  419. package/dist/locales/de/openhands.json +38 -4
  420. package/dist/locales/en/openhands.json +38 -4
  421. package/dist/locales/es/openhands.json +38 -4
  422. package/dist/locales/fr/openhands.json +38 -4
  423. package/dist/locales/it/openhands.json +38 -4
  424. package/dist/locales/ja/openhands.json +38 -4
  425. package/dist/locales/ko-KR/openhands.json +38 -4
  426. package/dist/locales/no/openhands.json +38 -4
  427. package/dist/locales/pt/openhands.json +38 -4
  428. package/dist/locales/tr/openhands.json +38 -4
  429. package/dist/locales/uk/openhands.json +38 -4
  430. package/dist/locales/zh-CN/openhands.json +38 -4
  431. package/dist/locales/zh-TW/openhands.json +38 -4
  432. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs +2 -0
  433. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs.map +1 -0
  434. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js +44 -0
  435. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js.map +1 -0
  436. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs +1 -1
  437. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs.map +1 -1
  438. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js +13 -0
  439. package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js.map +1 -1
  440. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +1 -1
  441. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -1
  442. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +21 -1
  443. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -1
  444. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs +1 -1
  445. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs.map +1 -1
  446. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js +1 -1
  447. package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js.map +1 -1
  448. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs +1 -1
  449. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs.map +1 -1
  450. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js +13 -0
  451. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js.map +1 -1
  452. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs +1 -1
  453. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs.map +1 -1
  454. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js +13 -0
  455. package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js.map +1 -1
  456. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
  457. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
  458. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +13 -0
  459. package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
  460. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs +1 -1
  461. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs.map +1 -1
  462. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js +13 -0
  463. package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js.map +1 -1
  464. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs +1 -1
  465. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs.map +1 -1
  466. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js +13 -0
  467. package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js.map +1 -1
  468. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs +1 -1
  469. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs.map +1 -1
  470. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js +16 -2
  471. package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js.map +1 -1
  472. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs +2 -0
  473. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs.map +1 -0
  474. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js +46 -0
  475. package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js.map +1 -0
  476. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
  477. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
  478. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +74 -70
  479. package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
  480. package/dist/node_modules/@openhands/extensions/skills/index.cjs +123 -3
  481. package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
  482. package/dist/node_modules/@openhands/extensions/skills/index.js +7 -1
  483. package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
  484. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs +2 -0
  485. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs.map +1 -0
  486. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +9 -0
  487. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +1 -0
  488. package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs +2 -0
  489. package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs.map +1 -0
  490. package/dist/node_modules/lucide-react/dist/esm/icons/info.js +21 -0
  491. package/dist/node_modules/lucide-react/dist/esm/icons/info.js.map +1 -0
  492. package/dist/package.cjs +1 -1
  493. package/dist/package.cjs.map +1 -1
  494. package/dist/package.js +10 -3
  495. package/dist/package.js.map +1 -1
  496. package/dist/routes/app-settings.cjs +1 -1
  497. package/dist/routes/app-settings.cjs.map +1 -1
  498. package/dist/routes/app-settings.js +113 -67
  499. package/dist/routes/app-settings.js.map +1 -1
  500. package/dist/routes/conversation.cjs +1 -1
  501. package/dist/routes/conversation.cjs.map +1 -1
  502. package/dist/routes/conversation.js +1 -1
  503. package/dist/routes/conversation.js.map +1 -1
  504. package/dist/routes/mcp.cjs +1 -1
  505. package/dist/routes/mcp.cjs.map +1 -1
  506. package/dist/routes/mcp.js +1 -0
  507. package/dist/routes/mcp.js.map +1 -1
  508. package/dist/services/cloud-funnel-analytics.cjs +1 -1
  509. package/dist/services/cloud-funnel-analytics.cjs.map +1 -1
  510. package/dist/services/cloud-funnel-analytics.d.ts +2 -2
  511. package/dist/services/cloud-funnel-analytics.js +18 -16
  512. package/dist/services/cloud-funnel-analytics.js.map +1 -1
  513. package/dist/services/settings.cjs +1 -1
  514. package/dist/services/settings.cjs.map +1 -1
  515. package/dist/services/settings.js +1 -0
  516. package/dist/services/settings.js.map +1 -1
  517. package/dist/services/telemetry-context.cjs +2 -0
  518. package/dist/services/telemetry-context.cjs.map +1 -0
  519. package/dist/services/telemetry-context.d.ts +17 -0
  520. package/dist/services/telemetry-context.js +27 -0
  521. package/dist/services/telemetry-context.js.map +1 -0
  522. package/dist/services/telemetry.cjs +1 -1
  523. package/dist/services/telemetry.cjs.map +1 -1
  524. package/dist/services/telemetry.d.ts +7 -5
  525. package/dist/services/telemetry.js +132 -123
  526. package/dist/services/telemetry.js.map +1 -1
  527. package/dist/stores/skill-install-banner-store.cjs +2 -0
  528. package/dist/stores/skill-install-banner-store.cjs.map +1 -0
  529. package/dist/stores/skill-install-banner-store.d.ts +32 -0
  530. package/dist/stores/skill-install-banner-store.js +14 -0
  531. package/dist/stores/skill-install-banner-store.js.map +1 -0
  532. package/dist/stores/use-event-store.cjs +1 -1
  533. package/dist/stores/use-event-store.cjs.map +1 -1
  534. package/dist/stores/use-event-store.js +35 -35
  535. package/dist/stores/use-event-store.js.map +1 -1
  536. package/dist/types/mcp-health.cjs +2 -0
  537. package/dist/types/mcp-health.cjs.map +1 -0
  538. package/dist/types/mcp-health.d.ts +21 -0
  539. package/dist/types/mcp-health.js +6 -0
  540. package/dist/types/mcp-health.js.map +1 -0
  541. package/dist/types/settings.d.ts +1 -0
  542. package/dist/utils/handle-event-for-ui.cjs +1 -1
  543. package/dist/utils/handle-event-for-ui.cjs.map +1 -1
  544. package/dist/utils/handle-event-for-ui.d.ts +5 -0
  545. package/dist/utils/handle-event-for-ui.js +71 -57
  546. package/dist/utils/handle-event-for-ui.js.map +1 -1
  547. package/dist/utils/mcp-credential-validation.cjs +1 -1
  548. package/dist/utils/mcp-credential-validation.cjs.map +1 -1
  549. package/dist/utils/mcp-credential-validation.js +32 -16
  550. package/dist/utils/mcp-credential-validation.js.map +1 -1
  551. package/dist/utils/mcp-server-health-key.cjs +2 -0
  552. package/dist/utils/mcp-server-health-key.cjs.map +1 -0
  553. package/dist/utils/mcp-server-health-key.d.ts +16 -0
  554. package/dist/utils/mcp-server-health-key.js +23 -0
  555. package/dist/utils/mcp-server-health-key.js.map +1 -0
  556. package/dist/utils/mcp-test-error-message.cjs +2 -0
  557. package/dist/utils/mcp-test-error-message.cjs.map +1 -0
  558. package/dist/utils/mcp-test-error-message.d.ts +8 -0
  559. package/dist/utils/mcp-test-error-message.js +14 -0
  560. package/dist/utils/mcp-test-error-message.js.map +1 -0
  561. package/dist/utils/redact-mcp-secrets.cjs +2 -0
  562. package/dist/utils/redact-mcp-secrets.cjs.map +1 -0
  563. package/dist/utils/redact-mcp-secrets.d.ts +13 -0
  564. package/dist/utils/redact-mcp-secrets.js +57 -0
  565. package/dist/utils/redact-mcp-secrets.js.map +1 -0
  566. package/dist/utils/settings-utils.cjs.map +1 -1
  567. package/dist/utils/settings-utils.js.map +1 -1
  568. package/dist/utils/skill-install-events.cjs +3 -0
  569. package/dist/utils/skill-install-events.cjs.map +1 -0
  570. package/dist/utils/skill-install-events.d.ts +16 -0
  571. package/dist/utils/skill-install-events.js +26 -0
  572. package/dist/utils/skill-install-events.js.map +1 -0
  573. package/dist/utils/title-llm-profile.cjs +2 -0
  574. package/dist/utils/title-llm-profile.cjs.map +1 -0
  575. package/dist/utils/title-llm-profile.d.ts +2 -0
  576. package/dist/utils/title-llm-profile.js +11 -0
  577. package/dist/utils/title-llm-profile.js.map +1 -0
  578. package/package.json +10 -3
  579. package/scripts/check-sdk-version-sync.mjs +6 -6
  580. package/scripts/check-translation-completeness.cjs +2 -0
  581. package/scripts/dev-process-utils.mjs +62 -1
  582. package/scripts/dev-safe.mjs +2 -2
  583. package/scripts/dev-static.mjs +5 -3
  584. package/scripts/dev-with-automation.mjs +98 -14
  585. package/scripts/download-node.mjs +382 -0
  586. package/scripts/download-uv.mjs +204 -0
  587. package/scripts/logger.mjs +64 -35
  588. package/build/assets/agent-server-compatibility-BWN-EIQn.js +0 -1
  589. package/build/assets/agent-server-conversation-service.api-DSPIkMwJ.js +0 -41
  590. package/build/assets/agent-settings-CgCnqaAA.js +0 -2
  591. package/build/assets/agent-settings-DDkSavD7.js +0 -1
  592. package/build/assets/api-key-entry-screen-iZc7n8AI.js +0 -1
  593. package/build/assets/app-settings-B5zyipxJ.js +0 -1
  594. package/build/assets/automation-export-BwRX6H32.js +0 -2
  595. package/build/assets/automations-list-lHAVzMoA.js +0 -1
  596. package/build/assets/backend-form-modal-RGcu909r.js +0 -1
  597. package/build/assets/browser-store-BI6uklCG.js +0 -1
  598. package/build/assets/chat-send-button-BZHG2hAW.js +0 -1
  599. package/build/assets/client-source-BZK8vRs2.js +0 -1
  600. package/build/assets/cloud-funnel-analytics-Zcv57hfT.js +0 -1
  601. package/build/assets/conversation-BoCYx8n2.js +0 -89
  602. package/build/assets/conversation-DgHqMjnY.js +0 -1
  603. package/build/assets/conversation-panel-78Rxh_-I.js +0 -1
  604. package/build/assets/conversation-state-store-B2Bp32XI.js +0 -1
  605. package/build/assets/declaration-BGsHjPEW.js +0 -1
  606. package/build/assets/extensions-hub-CCbLA7IM.js +0 -1
  607. package/build/assets/extensions-navigation-CPNjMNvR.js +0 -1
  608. package/build/assets/files-tab-store-DJsPxYdg.js +0 -1
  609. package/build/assets/files-tab-y4K7EXBO.js +0 -1
  610. package/build/assets/git-provider-icon-ITvsH4Ko.js +0 -1
  611. package/build/assets/home-BwbeOWwU.js +0 -1
  612. package/build/assets/home-DKPGQ5P3.js +0 -1
  613. package/build/assets/index-home-Bko2Itv5.js +0 -1
  614. package/build/assets/install-server-modal-Qk1gwyI8.js +0 -1
  615. package/build/assets/lesson-plan-DMCPdtrf.js +0 -4
  616. package/build/assets/llm-not-configured-banner-C1ktyb3C.js +0 -27
  617. package/build/assets/llm-settings-BBsZFi9l.js +0 -1
  618. package/build/assets/llm-settings-DFkJQr_w.js +0 -1
  619. package/build/assets/manage-backends-modal-CKQ46rvw.js +0 -1
  620. package/build/assets/manifest-03478bbf.js +0 -1
  621. package/build/assets/markdown-renderer-B4V2OMFP.js +0 -2
  622. package/build/assets/mcp-BapoJsDc.js +0 -9
  623. package/build/assets/messages-CUBFMY5o.js +0 -40
  624. package/build/assets/objectWithoutPropertiesLoose-BgYIAs2y.js +0 -1
  625. package/build/assets/onboarding-6NMkdNxV.js +0 -1
  626. package/build/assets/onboarding-modal-Q4AnpIdg.js +0 -1
  627. package/build/assets/recommended-automations-launcher-Bj7PuHY1.js +0 -58
  628. package/build/assets/refresh-cw-B9B7-vsy.js +0 -1
  629. package/build/assets/root-CDnuTToz.js +0 -2
  630. package/build/assets/root-CYWeTrWE.css +0 -1
  631. package/build/assets/root-layout-DfYVlcRG.js +0 -2
  632. package/build/assets/sdk-section-page-DLLNrYjI.js +0 -1
  633. package/build/assets/secrets-settings-CHy72A5C.js +0 -1
  634. package/build/assets/settings-B9S8UVQr.js +0 -1
  635. package/build/assets/settings-index-BKDl2CQ-.js +0 -1
  636. package/build/assets/settings-modal-DeK11CyT.js +0 -1
  637. package/build/assets/shared-conversation-9atDzTR4.js +0 -1
  638. package/build/assets/sidebar-mobile-menu-toggle-giMMZctn.js +0 -1
  639. package/build/assets/skills-plugins-Tropusio.js +0 -1
  640. package/build/assets/skills-settings-BvzBBCWk.js +0 -2
  641. package/build/assets/telemetry-C5JMEfqB.js +0 -2
  642. package/build/assets/use-activate-agent-profile-DlykqEfN.js +0 -1
  643. package/build/assets/use-backends-health-CLHPitJM.js +0 -1
  644. package/build/assets/use-config-B5r8erYt.js +0 -1
  645. package/build/assets/use-event-store-Bbaz51GR.js +0 -4
  646. package/build/assets/use-llm-profiles-Dr5__SlZ.js +0 -1
  647. package/build/assets/use-plugins-marketplace-BplU65ae.js +0 -1
  648. package/build/assets/use-runtime-is-ready-vCFOcLFa.js +0 -1
  649. package/build/assets/use-settings-CyxSlyTQ.js +0 -1
  650. package/build/assets/use-settings-nav-items-zEkSO_Bf.js +0 -16
  651. package/build/assets/use-tracking-D2Qg5Lpd.js +0 -1
  652. package/build/assets/useMutationState-OnAsCLA_.js +0 -1
  653. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD7v71DM.js +0 -2
  654. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BT05Osu4.js +0 -28
  655. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js +0 -2
  656. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js +0 -2
  657. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DqZatR3B.js +0 -7
  658. package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-FghQ3Z1a.js +0 -1
  659. package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js +0 -1
  660. package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js +0 -1
  661. package/dist/components/features/analytics/telemetry-consent-banner.cjs +0 -2
  662. package/dist/components/features/analytics/telemetry-consent-banner.cjs.map +0 -1
  663. package/dist/components/features/analytics/telemetry-consent-banner.d.ts +0 -29
  664. package/dist/components/features/analytics/telemetry-consent-banner.js +0 -59
  665. package/dist/components/features/analytics/telemetry-consent-banner.js.map +0 -1
  666. /package/build/assets/{__vite-browser-external-BQUj0sYu.js → __vite-browser-external-CKHVBTNC.js} +0 -0
  667. /package/build/assets/{agent-server-ui-style-scope-qhnhZHBV.js → agent-server-ui-style-scope-BvSa9on7.js} +0 -0
  668. /package/build/assets/{automation-LZB0MjdV.js → automation-BGiPmxFR.js} +0 -0
  669. /package/build/assets/{canvas-ui-COgjltGz.js → canvas-ui-CC4EJo-H.js} +0 -0
  670. /package/build/assets/{checkmark-h7udgXMM.js → checkmark-ygQB1AtV.js} +0 -0
  671. /package/build/assets/{close-DLFb5kfv.js → close-BjSA0HWT.js} +0 -0
  672. /package/build/assets/{code-tag-DYlAhEQY.js → code-tag-D9aPPbOe.js} +0 -0
  673. /package/build/assets/{common-CxbUL3nR.js → common-CCuqQy_S.js} +0 -0
  674. /package/build/assets/{conversation-local-storage-F6zVMM--.js → conversation-local-storage-BDjWPg0Z.js} +0 -0
  675. /package/build/assets/{copy-BLmGeJcd.js → copy-Dce7sOvS.js} +0 -0
  676. /package/build/assets/{copy-D1YGjP-C.js → copy-iPJAncAj.js} +0 -0
  677. /package/build/assets/{dist-CodhvuAP.js → dist-D9PhjOaq.js} +0 -0
  678. /package/build/assets/{environment-switch-store-DkjlKWzN.js → environment-switch-store-DHfcz4M4.js} +0 -0
  679. /package/build/assets/{extension-module-card-classes-9V3J9J_b.js → extension-module-card-classes-BpebKiN6.js} +0 -0
  680. /package/build/assets/{external-link-lhdITPqq.js → external-link-CpPMXxrV.js} +0 -0
  681. /package/build/assets/{folder-Bk311brm.js → folder-BabbYnbF.js} +0 -0
  682. /package/build/assets/{format-time-delta-DhDbkD7V.js → format-time-delta-BkAmJEPT.js} +0 -0
  683. /package/build/assets/{get-language-from-path-DBqBsCWH.js → get-language-from-path-CPNnuVhI.js} +0 -0
  684. /package/build/assets/{git-status-mapper-DnL9OC8_.js → git-status-mapper-BIXK0AAG.js} +0 -0
  685. /package/build/assets/{iconBase-Dz51Zn5x.js → iconBase-Ch-fOe8B.js} +0 -0
  686. /package/build/assets/{link-external-CaBmUEs_.js → link-external-DfKQroKX.js} +0 -0
  687. /package/build/assets/{list-todo-CAtvkzcy.js → list-todo-6J6zc8oS.js} +0 -0
  688. /package/build/assets/{llm-subscription-DtsX5Lhg.js → llm-subscription-Bvu8BLXc.js} +0 -0
  689. /package/build/assets/{loader-circle-CsAsfLIs.js → loader-circle-DGsqG5qw.js} +0 -0
  690. /package/build/assets/{map-provider-BbIb12oh.js → map-provider-BSvXvVR0.js} +0 -0
  691. /package/build/assets/{middleware-DYHYNAnP.js → middleware-_izt7V6U.js} +0 -0
  692. /package/build/assets/{modal-backdrop-zVwfOJZr.js → modal-backdrop-B7H42xHG.js} +0 -0
  693. /package/build/assets/{navigation-context-DPs2G0X8.js → navigation-context-cvyvI1WA.js} +0 -0
  694. /package/build/assets/{openhands-logo-bcNw5bkY.js → openhands-logo-pEw0nKFP.js} +0 -0
  695. /package/build/assets/{pencil-CWhApFIT.js → pencil-DmSqWUA3.js} +0 -0
  696. /package/build/assets/{react-DPDgL6du.js → react-MKQOkha9.js} +0 -0
  697. /package/build/assets/{search-BgOCR7_c.js → search-B5D5EuSn.js} +0 -0
  698. /package/build/assets/{search-dIQ09UY2.js → search-vnYL5jwV.js} +0 -0
  699. /package/build/assets/{settings-gear-MXCyZW0x.js → settings-gear-BOwF59Bs.js} +0 -0
  700. /package/build/assets/{settings-section-header-context-COMOIaxV.js → settings-section-header-context-CGgHZXrf.js} +0 -0
  701. /package/build/assets/{skills-EqzxYBvT.js → skills-arUOHLcS.js} +0 -0
  702. /package/build/assets/{square-chevron-right-DE-JN-2Z.js → square-chevron-right-EizCGtgq.js} +0 -0
  703. /package/build/assets/{switch-skeleton-DqQwalyu.js → switch-skeleton-BjPRx1QD.js} +0 -0
  704. /package/build/assets/{terminal-Cgf___rK.js → terminal-a57bHgZs.js} +0 -0
  705. /package/build/assets/{trash-2-BU6BlW4i.js → trash-2-CF3hilrY.js} +0 -0
  706. /package/build/assets/{u-check-circle-BqoIxNz_.js → u-check-circle-WGqHdtfO.js} +0 -0
  707. /package/build/assets/{u-check-circle-half-MsShT8Ec.js → u-check-circle-half-LiwZkuFe.js} +0 -0
  708. /package/build/assets/{u-edit-DL5LgKon.js → u-edit-BwHepAPi.js} +0 -0
  709. /package/build/assets/{use-breakpoint-BP3lqLMx.js → use-breakpoint-B-O0lQ84.js} +0 -0
  710. /package/build/assets/{use-click-outside-element-D9BYdANT.js → use-click-outside-element-DLQIMQrz.js} +0 -0
  711. /package/build/assets/{use-is-authed-BezEyfeh.js → use-is-authed-BSeo4coy.js} +0 -0
  712. /package/build/assets/{use-onboarding-completion-C_Swglzp.js → use-onboarding-completion-C0hPNGpw.js} +0 -0
  713. /package/build/assets/{v4-DbCkTSoU.js → v4-q4yWTlMz.js} +0 -0
  714. /package/build/assets/{vendor~browser-By2MVv_N.js → vendor~browser-UwB1jbAZ.js} +0 -0
  715. /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js → vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js} +0 -0
  716. /package/build/assets/{vendor~index-home~home~conversation-panel~conversation-ChmYLVgz.js → vendor~index-home~home~conversation-panel~conversation-Bff9cq5J.js} +0 -0
  717. /package/build/assets/{vendor~module-D5a_AClf.js → vendor~module-D4DeFV4J.js} +0 -0
  718. /package/build/assets/{vendor~terminal-CnKZILnC.js → vendor~terminal-B7Eiak0-.js} +0 -0
  719. /package/build/assets/{x-ZE4iplpF.js → x-DQB_00VJ.js} +0 -0
  720. /package/build/assets/{x-mark-Batp6gXa.js → x-mark-B32XuEwS.js} +0 -0
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/manage-backends-modal-Bon32JYr.js","assets/rolldown-runtime-BFRubm34.js","assets/vendor-styling-CI0PQ3ab.js","assets/agent-server-compatibility-DMY0CihN.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js","assets/useQuery-D5pEZbY0.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js","assets/suspense-DmZ3MSSh.js","assets/pencil-DmSqWUA3.js","assets/createLucideIcon-D4Tak8A1.js","assets/plus-CzE1b-wl.js","assets/refresh-cw-DxbAs3SK.js","assets/trash-2-CF3hilrY.js","assets/declaration-_yumYLEx.js","assets/useTranslation-CHm_6BRr.js","assets/active-backend-context-Cd1qcZsb.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js","assets/utils-CrRpzbM2.js","assets/common-CCuqQy_S.js","assets/backend-form-modal-YcfpuBZo.js","assets/client-source-DAUgyJsi.js","assets/use-tracking-DjdCssvp.js","assets/proxy-DnnDqkwn.js","assets/telemetry-CC32dJYW.js","assets/segmented-toggle-DRVJBNy0.js","assets/brand-button-BulEFHr3.js","assets/form-control-classes-BPUnoYyg.js","assets/settings-input-ZoaAPNQh.js","assets/modal-backdrop-B7H42xHG.js","assets/modal-body-Bg9UCeoV.js","assets/modal-close-button-BMLYvo0C.js","assets/navigation-context-cvyvI1WA.js","assets/use-backends-health-BsZikyFW.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-UJ4BNDJP.js","assets/useQueries-BpIlT8Mt.js","assets/organization-service.api-CvfQugOt.js","assets/cloud-funnel-analytics-B5OeWh4y.js","assets/modal-classes-H1KbJkeC.js","assets/confirmation-modal-108xng7X.js","assets/use-cloud-current-user-id-Cx3B_0-w.js","assets/api-key-entry-screen-Cc3aC7DZ.js","assets/onboarding-modal-D4vqkJeT.js","assets/recommended-automations-launcher-B97vgHuN.js","assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-DZHLw5Sr.js","assets/use-is-creating-conversation-fxSzN778.js","assets/settings-service.api-BY7ncxIz.js","assets/settings-HcwfqMjJ.js","assets/install-server-modal-DYk4VP3-.js","assets/useMutation-u8UgRgDK.js","assets/bot-C-EA6685.js","assets/v4-q4yWTlMz.js","assets/secrets-service-DvyS6-mV.js","assets/styled-tooltip-CdnCJ67u.js","assets/use-settings-B9XEmh7i.js","assets/skill-card-pill-row-_gWe1Tws.js","assets/extension-module-card-classes-BpebKiN6.js","assets/circle-plus-check-toggle-BhpPjkh9.js","assets/checkmark-ygQB1AtV.js","assets/x-mark-B32XuEwS.js","assets/use-create-conversation-vvl0kvu7.js","assets/use-agent-profiles-BSWVN6hH.js","assets/agent-server-conversation-service.api-CI5-xmIX.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-DoaS51iW.js","assets/profiles-service.api-CRVlrQpT.js","assets/llm-subscription-service-BPRw3u3H.js","assets/llm-subscription-Bvu8BLXc.js","assets/acp-providers-xACMK9ZP.js","assets/canvas-ui-CC4EJo-H.js","assets/plugins-management-service-9qT-r_37.js","assets/use-llm-profiles-CNQm7HYS.js","assets/conversation-store-CyVqoa0d.js","assets/middleware-_izt7V6U.js","assets/react-MKQOkha9.js","assets/conversation-local-storage-BDjWPg0Z.js","assets/chat-send-button-BchSSwuD.js","assets/check-TbOEtHKj.js","assets/circle-check-BXbQ5nEH.js","assets/loader-circle-DGsqG5qw.js","assets/llm-settings-0Bb97NCk.js","assets/back-nav-button-CaKvsD1E.js","assets/navigation-link-DoJzTCEz.js","assets/copy-iPJAncAj.js","assets/external-link-CpPMXxrV.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js","assets/model-selector-BqX2RvEr.js","assets/combobox-caret-kNZtp53R.js","assets/sdk-settings-schema-B42JFr5Y.js","assets/dist-D9PhjOaq.js","assets/map-provider-BSvXvVR0.js","assets/ellipsis-button-CoaUrKmQ.js","assets/dropdown-classes-9uONlOg1.js","assets/use-can-manage-org-profiles-Do6mYf6P.js","assets/base-modal-Cw7enAHz.js","assets/sdk-section-page-DG1s25Pr.js","assets/switch-skeleton-BjPRx1QD.js","assets/schema-field-B9-9Ta9u.js","assets/settings-dropdown-input-B6RL_mt0.js","assets/settings-switch-DUlGnP0B.js","assets/toggle-switch-yVIzmJLM.js","assets/use-is-authed-BSeo4coy.js","assets/typography-BBVEW0un.js","assets/use-save-settings-BMsb2wk_.js","assets/copy-to-clipboard-button-C54YRPMg.js","assets/copy-Dce7sOvS.js","assets/loading-spinner-BCInDEXB.js","assets/settings-section-header-context-CGgHZXrf.js","assets/u-check-circle-WGqHdtfO.js","assets/u-edit-BwHepAPi.js","assets/settings-list-classes-Dr8LgITi.js","assets/use-acp-credential-form-CIsp8hJe.js","assets/use-create-secret-CB7Dvd4s.js","assets/openhands-logo-pEw0nKFP.js","assets/use-activate-agent-profile-BfcTTJJG.js","assets/use-save-agent-profile-Bj7N-1jS.js","assets/terminal-a57bHgZs.js"])))=>i.map(i=>d[i]);
2
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,St as n,bt as r}from"./vendor-styling-CI0PQ3ab.js";import{L as i,M as a,N as o,a as s,c,d as l,f as u,i as d,k as f}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{n as p}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{c as m,t as h}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js";import{t as g}from"./useQuery-D5pEZbY0.js";import{r as _}from"./providers-C2DFGBrf.js";import{S as v,f as y,r as b,z as x}from"./active-backend-context-Cd1qcZsb.js";import{B as S,I as C,L as w,c as T,n as E,o as ee,x as D,z as O}from"./agent-server-compatibility-DMY0CihN.js";import{a as k,n as A,t as j}from"./use-backends-health-BsZikyFW.js";import{t as M}from"./loading-spinner-BCInDEXB.js";import{t as N}from"./use-config-D9zUVw5b.js";import{t as P}from"./use-onboarding-completion-C0hPNGpw.js";import{t as F}from"./navigation-context-cvyvI1WA.js";import{i as I,n as L}from"./color-themes-QKMSVfDU.js";var R=e(t(),1),z=`/api/authenticate`,B=`/login`,V=`returnTo`,H=new Set([`localhost`,`127.0.0.1`,`::1`]);function te(){return typeof window>`u`?`/`:`${window.location.pathname}${window.location.search}${window.location.hash}`}function U(){return typeof window>`u`?!1:H.has(window.location.hostname)}function W(){return C()===`cookie`&&!U()}async function G(){try{return await m.post(z,null,{withCredentials:!0}),!0}catch(e){if(m.isAxiosError(e)&&e.response?.status===401)return!1;throw e}}function K(e=te()){return`${B}?${new URLSearchParams({[V]:e}).toString()}`}function q(){typeof window>`u`||window.location.assign(K())}var J=r();function Y(){return R.useEffect(()=>{L(I())},[]),null}var X=R.lazy(()=>n(()=>import(`./manage-backends-modal-Bon32JYr.js`).then(e=>e.n).then(e=>({default:e.ManageBackendsModal})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39]))),Z=R.lazy(()=>n(()=>import(`./api-key-entry-screen-Cc3aC7DZ.js`),__vite__mapDeps([40,1,2,3,4,13,14,15,16,6,9,17,18,19,5,7,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]))),Q=R.lazy(()=>n(()=>import(`./onboarding-modal-D4vqkJeT.js`).then(e=>e.n).then(e=>({default:e.OnboardingModal})),__vite__mapDeps([41,1,2,3,4,42,43,44,6,31,13,14,21,16,9,20,15,17,18,22,23,45,46,47,48,49,50,51,25,26,27,52,28,30,53,5,7,37,54,55,56,57,58,59,60,61,62,33,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,35,92,29,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,19,24,32,34,36,111,112,113,114]))),ne=R.lazy(()=>n(()=>import(`./backend-form-modal-YcfpuBZo.js`).then(e=>e.i).then(e=>({default:e.BackendFormModal})),__vite__mapDeps([19,1,2,3,4,5,6,7,13,14,20,21,16,9,15,17,18,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37])));function re({children:e}){return(0,J.jsxs)(`html`,{lang:`en`,children:[(0,J.jsxs)(`head`,{children:[(0,J.jsx)(`meta`,{charSet:`utf-8`}),(0,J.jsx)(`meta`,{name:`viewport`,content:`width=device-width, initial-scale=1`}),(0,J.jsx)(s,{}),(0,J.jsx)(d,{})]}),(0,J.jsxs)(`body`,{"data-agent-server-ui":``,className:`m-0`,children:[(0,J.jsxs)(_,{contentClassName:`min-h-screen`,children:[(0,J.jsx)(Y,{}),e,(0,J.jsx)(h,{toastOptions:v}),(0,J.jsx)(`div`,{id:`modal-portal-exit`})]}),(0,J.jsx)(u,{}),(0,J.jsx)(l,{})]})]})}function $(){return(0,J.jsx)(`main`,{className:`min-h-screen bg-base px-6 py-10 text-white`,children:(0,J.jsx)(`div`,{className:`mx-auto flex min-h-screen max-w-6xl items-center justify-center`,children:(0,J.jsx)(`div`,{className:`rounded-3xl border border-white/10 bg-base/80 px-8 py-10 shadow-2xl`,children:(0,J.jsx)(M,{size:`large`})})})})}function ie(){let e=p(),t=R.useCallback(()=>{D()&&(E(),e.invalidateQueries({queryKey:y.WEB_CLIENT_CONFIG}))},[e]);return(0,J.jsx)(`main`,{"data-testid":`agent-server-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,J.jsx)(R.Suspense,{fallback:null,children:(0,J.jsx)(X,{onClose:t,recoveryMode:!0})})})}function ae({onClose:e}){let t=f(),n=a(),r=o(),i=t.pathname.match(/^\/conversations\/([^/]+)/)?.[1]??null,s=R.useMemo(()=>({currentPath:t.pathname,conversationId:i,isNavigating:!!r.location,navigate:(e,t)=>n(e,t)}),[i,t.pathname,n,r.location]);return w()===null?(0,J.jsx)(`main`,{"data-testid":`first-run-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,J.jsx)(F,{value:s,children:(0,J.jsx)(R.Suspense,{fallback:(0,J.jsx)($,{}),children:(0,J.jsx)(Q,{onClose:e})})})}):(0,J.jsx)(`main`,{"data-testid":`first-run-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,J.jsx)(R.Suspense,{fallback:(0,J.jsx)($,{}),children:(0,J.jsx)(ne,{mode:`add`,onClose:e,source:`manage_backends_modal`,hideCloseButton:!0})})})}var oe=()=>[{rel:`icon`,type:`image/svg+xml`,href:x(`/favicon.svg`)}],se=()=>[{title:`OpenHands`},{name:`description`,content:`Let's Start Building!`}],ce=i(function(){let e=O(),t=!!D()?.apiKey,n=e&&!t,{active:r}=b(),i=w(),a=C(),o=i!==null,s=o&&r.backend.kind===`cloud`&&S(r.backend.host,i),{isCompleted:l,markCompleted:u}=P(),d=W(),f=o?!d&&(!s||a!==`cookie`&&!l):!l,p=g({queryKey:y.MAIN_APP_COOKIE_AUTH,queryFn:G,enabled:d&&!f,retry:!1,staleTime:1e3*60*5,meta:{disableToast:!0}}),m=d&&!f&&p.isPending&&!p.isError,h=d&&p.data===!1,_=!d||p.data===!0||p.isError;R.useEffect(()=>{h&&q()},[h]);let v=N({enabled:!n&&!f&&_}),x=k(r.backend.kind===`cloud`&&_?[r.backend]:[])[r.backend.id],E=r.backend.kind===`cloud`&&x?.isConnected===!1&&A(x.lastError),M=r.backend.kind===`cloud`&&x?.disabled===!0&&j(x.lastError);return f?(0,J.jsx)(ae,{onClose:u}):m||h?(0,J.jsx)($,{}):n||ee(v.error)?(0,J.jsx)(R.Suspense,{fallback:(0,J.jsx)($,{}),children:(0,J.jsx)(Z,{})}):v.isPending||v.isLoading?(0,J.jsx)($,{}):E||M||T(v.error)?(0,J.jsx)(ie,{}):(0,J.jsx)(c,{})});export{re as Layout,ce as default,oe as links,se as meta};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/settings-modal-BVX2G_IT.js","assets/rolldown-runtime-BFRubm34.js","assets/vendor-styling-CI0PQ3ab.js","assets/declaration-_yumYLEx.js","assets/useTranslation-CHm_6BRr.js","assets/use-tracking-DjdCssvp.js","assets/agent-server-compatibility-DMY0CihN.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js","assets/createLucideIcon-D4Tak8A1.js","assets/client-source-DAUgyJsi.js","assets/active-backend-context-Cd1qcZsb.js","assets/utils-CrRpzbM2.js","assets/common-CCuqQy_S.js","assets/proxy-DnnDqkwn.js","assets/telemetry-CC32dJYW.js","assets/model-selector-BqX2RvEr.js","assets/useQuery-D5pEZbY0.js","assets/suspense-DmZ3MSSh.js","assets/combobox-caret-kNZtp53R.js","assets/form-control-classes-BPUnoYyg.js","assets/sdk-settings-schema-B42JFr5Y.js","assets/dist-D9PhjOaq.js","assets/llm-subscription-Bvu8BLXc.js","assets/map-provider-BSvXvVR0.js","assets/brand-button-BulEFHr3.js","assets/settings-input-ZoaAPNQh.js","assets/base-modal-Cw7enAHz.js","assets/modal-body-Bg9UCeoV.js","assets/modal-classes-H1KbJkeC.js","assets/modal-backdrop-B7H42xHG.js","assets/navigation-context-cvyvI1WA.js","assets/use-save-settings-BMsb2wk_.js","assets/useMutation-u8UgRgDK.js","assets/settings-service.api-BY7ncxIz.js","assets/settings-HcwfqMjJ.js","assets/use-settings-B9XEmh7i.js","assets/settings-utils-kWEEvcdv.js","assets/add-backend-modal-5chsfln3.js","assets/backend-form-modal-YcfpuBZo.js","assets/segmented-toggle-DRVJBNy0.js","assets/modal-close-button-BMLYvo0C.js","assets/use-backends-health-BsZikyFW.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-UJ4BNDJP.js","assets/useQueries-BpIlT8Mt.js","assets/organization-service.api-CvfQugOt.js","assets/cloud-funnel-analytics-B5OeWh4y.js","assets/manage-backends-modal-Bon32JYr.js","assets/pencil-DmSqWUA3.js","assets/plus-CzE1b-wl.js","assets/refresh-cw-DxbAs3SK.js","assets/trash-2-CF3hilrY.js","assets/confirmation-modal-108xng7X.js","assets/use-cloud-current-user-id-Cx3B_0-w.js","assets/environment-switch-overlay-XRWCClLu.js","assets/environment-switch-store-DHfcz4M4.js","assets/alert-banner-CLfWuIAX.js","assets/vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-DEYwoy8u.js","assets/iconBase-Ch-fOe8B.js","assets/close-BjSA0HWT.js","assets/typography-BBVEW0un.js","assets/command-menu-tUsn23zy.js","assets/bot-C-EA6685.js","assets/list-todo-6J6zc8oS.js","assets/search-vnYL5jwV.js","assets/sidebar-store-CF3b12-m.js","assets/middleware-_izt7V6U.js","assets/react-MKQOkha9.js","assets/x-DQB_00VJ.js"])))=>i.map(i=>d[i]);
2
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,St as n,a as r,bt as i,xt as a}from"./vendor-styling-CI0PQ3ab.js";import{A as o,C as s,F as c,L as l,M as u,N as d,P as f,R as p,c as m,j as h,k as g}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{h as _,m as v,r as y,t as b}from"./path-utils-DRgexxnX.js";import{t as x}from"./useQuery-D5pEZbY0.js";import{t as S}from"./use-is-creating-conversation-fxSzN778.js";import{t as C}from"./useTranslation-CHm_6BRr.js";import{t as w}from"./declaration-_yumYLEx.js";import{C as T,I as E,n as D,r as O,w as k}from"./active-backend-context-Cd1qcZsb.js";import{t as A}from"./createLucideIcon-D4Tak8A1.js";import{t as j}from"./bot-C-EA6685.js";import{t as M}from"./check-TbOEtHKj.js";import{n as N,t as P}from"./vendor~root-layout~conversation-panel~conversation-8tIsyrPj.js";import{r as F}from"./onboarding-modal-D4vqkJeT.js";import{n as I,t as L}from"./vendor~root-layout~index-home~home~conversation-panel~conversation-YrfJYTQw.js";import{a as ee,c as R,d as z,f as B,i as V,l as te,n as ne,o as re,p as ie,r as ae,s as oe,t as H,u as se}from"./onboarding-3KO4qE6R.js";import{n as ce,t as le}from"./format-time-delta-BkAmJEPT.js";import{t as ue}from"./plus-CzE1b-wl.js";import{t as de}from"./search-vnYL5jwV.js";import{n as fe,r as pe,t as me}from"./sidebar-store-CF3b12-m.js";import{i as he}from"./llm-settings-0Bb97NCk.js";import{t as ge}from"./trash-2-CF3hilrY.js";import{t as _e}from"./x-DQB_00VJ.js";import{S as ve,b as ye,t as U,y as be}from"./utils-CrRpzbM2.js";import{t as W}from"./common-CCuqQy_S.js";import{L as xe,w as Se}from"./agent-server-compatibility-DMY0CihN.js";import{a as Ce,d as we,f as Te,i as G,t as Ee,u as De}from"./telemetry-CC32dJYW.js";import{a as K}from"./use-backends-health-BsZikyFW.js";import{t as Oe}from"./loading-spinner-BCInDEXB.js";import{t as ke}from"./use-config-D9zUVw5b.js";import{n as Ae,t as je}from"./navigation-context-cvyvI1WA.js";import{t as Me}from"./openhands-logo-pEw0nKFP.js";import{t as Ne}from"./navigation-link-DoJzTCEz.js";import{a as q,d as Pe,f as Fe,i as Ie,l as Le,n as Re,r as ze,u as Be}from"./sidebar-layout-BhGooCga.js";import{n as Ve,t as He}from"./sidebar-nav-link-DkA1XWV8.js";import{t as Ue}from"./styled-tooltip-CdnCJ67u.js";import{_ as We,c as Ge}from"./form-control-classes-BPUnoYyg.js";import{a as Ke,d as qe,f as Je,i as Ye,l as Xe,n as Ze,o as Qe,r as $e,u as et}from"./dropdown-classes-9uONlOg1.js";import{r as tt,t as nt}from"./combobox-caret-kNZtp53R.js";import{_ as rt,a as it,c as at,d as ot,f as st,g as ct,h as lt,i as ut,l as dt,m as ft,n as pt,p as mt,r as ht,s as gt,t as _t,u as vt}from"./git-provider-icon-DDkru3b_.js";import{n as yt,t as bt}from"./use-cloud-current-user-id-Cx3B_0-w.js";import{s as xt}from"./environment-switch-store-DHfcz4M4.js";import{t as St}from"./react-MKQOkha9.js";import{r as Ct,t as wt}from"./middleware-_izt7V6U.js";import{t as Tt}from"./conversation-store-CyVqoa0d.js";import{o as Et}from"./backend-form-modal-YcfpuBZo.js";import{t as Dt}from"./modal-backdrop-B7H42xHG.js";import{n as Ot}from"./modal-body-Bg9UCeoV.js";import{n as kt,t as At}from"./use-tracking-DjdCssvp.js";import{t as jt}from"./add-backend-modal-5chsfln3.js";import{t as Mt}from"./manage-backends-modal-Bon32JYr.js";import{t as Nt}from"./agent-server-conversation-service.api-CI5-xmIX.js";import{c as Pt,d as Ft,u as It}from"./acp-providers-xACMK9ZP.js";import{t as Lt}from"./use-is-authed-BSeo4coy.js";import{i as Rt,r as zt}from"./base-modal-Cw7enAHz.js";import{a as Bt,c as Vt,d as Ht,f as Ut,i as Wt,l as Gt,o as Kt,r as qt,s as Jt,t as Yt,u as Xt}from"./sidebar-mobile-menu-toggle-BntOJphE.js";import{t as Zt}from"./use-click-outside-element-DLQIMQrz.js";import{t as Qt}from"./use-llm-profiles-CNQm7HYS.js";import{n as $t}from"./use-create-conversation-vvl0kvu7.js";import{t as en}from"./conversation-service.api-DbBvscJA.js";import{r as tn,t as nn}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-DDmLzCzm.js";import{n as rn,t as an}from"./context-menu-list-item-BbKfFuN1.js";import{i as J,r as on,t as sn}from"./ellipsis-button-CoaUrKmQ.js";import{t as cn}from"./u-edit-BwHepAPi.js";import{t as ln}from"./skills-arUOHLcS.js";import{a as un,o as dn,t as fn}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-DEYwoy8u.js";import{r as pn,t as mn}from"./use-settings-B9XEmh7i.js";import{t as hn}from"./search-B5D5EuSn.js";import{t as gn}from"./use-save-settings-BMsb2wk_.js";import{t as _n}from"./use-user-conversation-BCpFn-Ei.js";import{t as vn}from"./conversation-state-store-C5GagZHT.js";var yn=A(`calendar-arrow-down`,[[`path`,{d:`m14 18 4 4 4-4`,key:`1waygx`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M18 14v8`,key:`irew45`}],[`path`,{d:`M21 11.354V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.343`,key:`bse4f3`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}]]),bn=A(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),xn=A(`clock-arrow-down`,[[`path`,{d:`M12 6v6l2 1`,key:`19cm8n`}],[`path`,{d:`M12.337 21.994a10 10 0 1 1 9.588-8.767`,key:`28moa`}],[`path`,{d:`m14 18 4 4 4-4`,key:`1waygx`}],[`path`,{d:`M18 14v8`,key:`irew45`}]]),Sn=A(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Cn=A(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),wn=A(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Tn=A(`list-filter`,[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]),En=A(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),Dn=A(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),On=A(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),kn=A(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Y=e(t(),1),X=i(),An=46,jn=30;function Mn({className:e,logoClassName:t,logoWidth:n=An,logoHeight:r=jn}={}){let{t:i}=C(`openhands`);return(0,X.jsx)(Ne,{to:`/conversations`,"aria-label":i(w.BRANDING$OPENHANDS_LOGO),className:U(e),children:(0,X.jsx)(Me,{width:n,height:r,className:U(`shrink-0`,t)})})}function Nn(){return(0,X.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`,"data-testid":`dropdown-loading`})}function Pn({onClear:e}){return(0,X.jsx)(`button`,{type:`button`,"data-testid":`dropdown-clear`,onClick:e,"aria-label":`Clear selection`,className:`text-white hover:text-[var(--oh-text-tertiary)]`,children:(0,X.jsx)(_e,{size:14})})}function Fn({isOpen:e,isDisabled:t,getToggleButtonProps:n}){return(0,X.jsx)(`button`,{type:`button`,"data-testid":`dropdown-trigger`,...n({disabled:t,className:U(tt,`text-current`,e&&`rotate-180`,t&&`cursor-not-allowed`)}),children:(0,X.jsx)(nt,{})})}function In({isOpen:e,filteredOptions:t,selectedItem:n,emptyMessage:r,getMenuProps:i,getItemProps:a,footer:o,openUpward:s=!1,fitContent:c=!1}){return(0,X.jsxs)(`div`,{className:U(`absolute z-50 overflow-hidden text-white`,c?`min-w-full w-max`:`w-full`,s?`bottom-full mb-1`:`mt-1`,`bg-tertiary rounded-[6px] context-menu-box-shadow p-1`,`max-h-60 overflow-auto`,!e&&`hidden`),children:[(0,X.jsxs)(`ul`,{...i({className:U(`p-0`,Ye)}),children:[e&&t.length===0&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[var(--oh-muted)] italic`,children:r}),e&&t.map((e,t)=>(0,X.jsxs)(`li`,{...a({item:e,index:t,className:U(Qe,`focus:outline-none`,n?.value===e.value&&`bg-[var(--oh-interactive-selected)] text-white`)}),children:[e.prefix?(0,X.jsx)(`span`,{className:et,children:e.prefix}):null,(0,X.jsx)(`span`,{className:`min-w-0 truncate`,children:e.label})]},e.value))]}),e&&o?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(rt,{inset:`menu`}),(0,X.jsx)(`div`,{className:`p-0`,children:o})]}):null]})}function Ln({placeholder:e,isDisabled:t,getInputProps:n,italicPlaceholder:r=!0,fitContent:i=!1}){return(0,X.jsx)(`input`,{...n({placeholder:e,disabled:t,className:U(`outline-none bg-transparent text-white not-italic`,i?`w-auto field-sizing-content whitespace-nowrap text-sm`:`flex-1 min-w-0`,r&&`placeholder:italic placeholder:text-tertiary-alt`,!r&&`placeholder:text-tertiary-alt`,Ge,`px-0 not-italic text-inherit`)})})}var Rn={position:`absolute`,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,border:0};function zn({options:e,emptyMessage:t=`No options`,clearable:n=!1,loading:r=!1,disabled:i=!1,placeholder:a,defaultValue:o,onChange:s,testId:c,className:l,footer:u,openUpward:d=!1,hideTrigger:f=!1,defaultOpen:p=!1,openOnHover:m=!1,italicPlaceholder:h=!0,fitContent:g=!1}){let _=Y.useRef(null),[v,y]=(0,Y.useState)(o?.label??``),[b,x]=(0,Y.useState)(``);Y.useEffect(()=>()=>{_.current&&=(clearTimeout(_.current),null)},[]);let S=e.filter(e=>e.label.toLowerCase().includes(b.toLowerCase())),{isOpen:C,selectedItem:w,selectItem:T,openMenu:E,closeMenu:D,getToggleButtonProps:O,getMenuProps:k,getItemProps:A,getInputProps:j}=L({items:S,itemToString:e=>e?.label??``,inputValue:v,stateReducer:(e,t)=>t.type===L.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes,initialIsOpen:p,onInputValueChange:({inputValue:e})=>{y(e??``),x(e??``)},defaultSelectedItem:o,onSelectedItemChange:({selectedItem:e})=>{s?.(e??null)},onIsOpenChange:({isOpen:e,selectedItem:t})=>{e?(y(``),x(``)):(y(t?.label??``),x(``))}}),M=r||i,N=w?e.find(e=>e.value===w.value)??w:null,P=e=>j({...e,onChange:e=>{y(e.target.value),x(e.target.value)}});return(0,X.jsxs)(`div`,{className:U(`relative`,g?`inline-block w-auto`:`w-full`),"data-testid":c,onMouseEnter:m?()=>{_.current&&=(clearTimeout(_.current),null),E()}:void 0,onMouseLeave:m?()=>{_.current&&clearTimeout(_.current),_.current=setTimeout(()=>D(),150)}:void 0,children:[f?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`input`,{...P({"aria-label":a??`Filter options`,tabIndex:-1}),style:Rn}),(0,X.jsx)(`button`,{type:`button`,...O({tabIndex:-1}),style:Rn,"aria-hidden":!0})]}):(0,X.jsxs)(`div`,{className:U(Je,g?`w-auto`:`w-full`,M&&`cursor-not-allowed opacity-60`,l),children:[N?.prefix?(0,X.jsx)(`span`,{className:`flex items-center shrink-0`,children:N.prefix}):null,(0,X.jsx)(Ln,{placeholder:a,isDisabled:M,getInputProps:P,italicPlaceholder:h,fitContent:g}),r&&(0,X.jsx)(Nn,{}),n&&w&&(0,X.jsx)(Pn,{onClear:()=>T(null)}),(0,X.jsx)(Fn,{isOpen:C,isDisabled:M,getToggleButtonProps:O})]}),(0,X.jsx)(In,{isOpen:C,filteredOptions:S,selectedItem:w,emptyMessage:t,getMenuProps:k,getItemProps:A,footer:u,openUpward:d,fitContent:g})]})}var Bn=`::`;function Vn(e,t){return t?`${e}${Bn}${t}`:e}function Hn(e){let[t,n]=e.split(Bn);return{backendId:t,orgId:n??null}}function Un(e){return(0,X.jsx)(Et,{isConnected:e?.isConnected??null})}function Wn(){return(0,X.jsx)(Et,{isConnected:`unavailable`})}function Gn(e,t,n,r,i){let a=[],o=e.filter(e=>e.kind===`local`),s=e.filter(e=>e.kind===`cloud`);for(let e of o)a.push({value:Vn(e.id,null),label:e.name,prefix:Un(i[e.id])});for(let e of s){let o=n[e.id],s=Un(i[e.id]);if(!o||o.orgs.length===0)a.push({value:Vn(e.id,null),label:e.name,prefix:s});else{let n=r[e.id]?.userId??null;for(let r of o.orgs){let i=n&&n===r.id?t:r.name;a.push({value:Vn(e.id,r.id),label:`${e.name} – ${i}`,prefix:s})}}}return a}function Kn({openUpward:e=!1,hideTrigger:t=!1,defaultOpen:n=!1,onSelectOption:r,onOpenAddBackend:i,onOpenManageBackends:a,sidebarCollapsed:s=!1}={}){let{t:c}=C(`openhands`),{backends:l,active:d,setActive:f}=O(),p=yt(),m=bt(),h=K(l),g=u(),_=o(`/settings`),v=o(`/settings/*`),y=o(`/conversations/:conversationId`),b=o(`/automations/:automationId`),[x,S]=Y.useState(!1),[T,E]=Y.useState(!1),D=c(w.BACKEND$PERSONAL_WORKSPACE),k=Y.useMemo(()=>Gn(l,D,p,m,h),[l,D,p,m,h]),A=Se(d.backend),j=c(w.BACKEND$NO_BACKEND_AVAILABLE),M=Vn(d.backend.id,d.orgId),N=A?void 0:k.find(e=>e.value===M),P=!!(_||v),F=c(w.SIDEBAR$SETTINGS),I=Tt(e=>e.isRightPanelShown),L=!s||y&&I?`top`:`left`,ee=Object.values(p).some(e=>e.isLoading);Y.useEffect(()=>{if(A||d.backend.kind!==`cloud`||d.orgId)return;let{backend:e}=d,t=p[e.id];if(!t||t.orgs.length===0)return;let n=t.currentOrgId?t.orgs.find(e=>e.id===t.currentOrgId):void 0,r=m[e.id]?.userId??null,i=r?t.orgs.find(e=>e.id===r):void 0,a=n??i??t.orgs[0];a&&f(e.id,a.id)},[d,p,m,f,A]);let R=Y.useCallback(()=>{if(i){i(),r?.();return}S(!0)},[i,r]),z=Y.useCallback(()=>{if(a){a(),r?.();return}E(!0)},[a,r]),B=xe()!==null,V=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),te=Y.useCallback(e=>{V(e),R()},[R,V]),ne=Y.useCallback(e=>{V(e),R()},[R,V]),re=Y.useCallback(e=>{V(e),z()},[z,V]),ie=Y.useCallback(e=>{V(e),z()},[z,V]),ae=(0,X.jsxs)(`div`,{className:Ye,children:[B?null:(0,X.jsxs)(`button`,{type:`button`,"data-testid":`add-backend-menu-item`,onMouseDown:V,onTouchStart:V,onTouchEnd:ne,onClick:te,className:U(Ze,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:et,"aria-hidden":!0,children:(0,X.jsx)(ue,{width:16,height:16})}),c(w.BACKEND$ADD)]}),(0,X.jsxs)(`button`,{type:`button`,"data-testid":`manage-backends-menu-item`,onMouseDown:V,onTouchStart:V,onTouchEnd:ie,onClick:re,className:U(Ze,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:et,"aria-hidden":!0,children:(0,X.jsx)(pe,{width:16,height:16})}),c(B?w.BACKEND$RECONNECT_CLOUD:w.BACKEND$MANAGE)]})]}),oe=Y.useCallback(async e=>{if(e===M)return;let{backendId:t,orgId:n}=Hn(e),i=l.find(e=>e.id===t);i&&(xt(k.find(t=>t.value===e)?.label??i.name),await new Promise(e=>{setTimeout(e,400)}),y?g(`/conversations`):b&&g(`/automations`),f(i.id,n),r?.())},[M,l,y,b,g,k,f,c,r]);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 w-full`,children:[(0,X.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,X.jsx)(zn,{testId:`backend-selector`,defaultValue:N??{value:M,label:A?j:d.backend.name,prefix:A?Wn():Un(h[d.backend.id])},footer:ae,openUpward:e,hideTrigger:t,defaultOpen:n,openOnHover:!t,onChange:e=>{e&&oe(e.value)},placeholder:A?j:d.backend.name,loading:ee,options:k,className:`h-10 px-2 py-0 bg-transparent border-transparent hover:bg-[var(--oh-surface-raised)] focus-within:bg-[var(--oh-surface-raised)] focus-within:border-transparent focus-within:ring-0`},`${M}-${N?.label??``}`)}),t?null:(0,X.jsx)(Ue,{content:F,placement:L,offset:10,children:(0,X.jsx)(Ne,{to:`/settings`,"data-testid":`backend-selector-settings-link`,"data-active":P,"aria-label":F,className:U(P?`inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md bg-tertiary text-white font-normal cursor-pointer`:`inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)] cursor-pointer`,We),children:(0,X.jsx)(pe,{width:16,height:16})})})]}),x?(0,X.jsx)(jt,{onClose:()=>S(!1)}):null,T?(0,X.jsx)(Mt,{onClose:()=>E(!1)}):null]})}var qn=`command-menu-trigger`,Jn=18;function Yn({collapsed:e}){let{t}=C(`openhands`),n=fe(e=>e.open),r=t(w.COMMAND_MENU$OPEN_LABEL),i=(0,X.jsxs)(`button`,{type:`button`,"data-testid":qn,"aria-label":r,onClick:n,className:U(Fe({collapsed:e}),e?`cursor-pointer`:`group justify-between border border-[var(--oh-border-subtle)] bg-[var(--oh-surface)]/50 hover:border-[var(--oh-border)] hover:bg-[var(--oh-surface-raised)]`),children:[(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[e?(0,X.jsx)(Ve,{active:!1,children:(0,X.jsx)(de,{width:Jn,height:Jn})}):(0,X.jsx)(`span`,{className:U(q,`text-[var(--oh-muted)] group-hover:text-white`),"aria-hidden":`true`,children:(0,X.jsx)(de,{width:Jn,height:Jn})}),(0,X.jsx)(`span`,{className:Be(e),children:r})]}),e?null:(0,X.jsx)(`kbd`,{className:`rounded-md border border-[var(--oh-border)] bg-black/20 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.12em] text-[var(--oh-text-dim)]`,children:t(w.COMMAND_MENU$SHORTCUT)})]});return e?(0,X.jsx)(Ue,{content:r,placement:`right`,children:i}):i}var Xn=(e=20)=>{let{data:t}=Lt(),n=D(),r=!Se(n.backend);return _({queryKey:[`user`,`conversations`,`paginated`,e,n.backend.id,n.orgId],queryFn:async({pageParam:t})=>await Nt.searchConversations(e,t),enabled:!!t&&r,getNextPageParam:e=>e.next_page_id,initialPageParam:void 0,refetchInterval:1e4,meta:{backendId:n.backend.id}})},Zn=(e=10)=>x({queryKey:[`start-tasks`,`search`,e],queryFn:()=>[],select:e=>e.filter(e=>e.status!==`READY`&&e.status!==`ERROR`)});function Qn({onConfirm:e,onClose:t,onCancel:n}){let{t:r}=C(`openhands`);return(0,X.jsx)(Dt,{onClose:n,children:(0,X.jsxs)(Ot,{testID:`confirm-new-conversation-modal`,children:[(0,X.jsx)(zt,{title:r(w.CONVERSATION$EXIT_WARNING)}),(0,X.jsxs)(`div`,{className:`flex w-full justify-end gap-2`,children:[(0,X.jsx)(Rt,{text:r(w.BUTTON$CANCEL),onClick:t,className:`bg-tertiary`}),(0,X.jsx)(Rt,{text:r(w.ACTION$CONFIRM),onClick:e,className:`bg-[#C63143]`})]})]})})}function $n({titleMode:e,title:t,onSave:n,isConversationArchived:r}){return e===`edit`?(0,X.jsx)(`input`,{autoFocus:!0,"data-testid":`conversation-card-title`,onClick:e=>{e.preventDefault(),e.stopPropagation()},onBlur:e=>{n(e.currentTarget?.value?.trim?.()??``)},onKeyUp:e=>{e.nativeEvent.isComposing||e.key===`Enter`&&e.currentTarget.blur()},type:`text`,defaultValue:t,className:`text-sm leading-6 font-semibold bg-transparent w-full`}):(0,X.jsx)(`p`,{"data-testid":`conversation-card-title`,className:U(`text-xs leading-6 font-semibold bg-transparent truncate overflow-hidden`,r&&`opacity-60`),children:t})}var er=e=>{switch(e){case W.FINISHED:return`check`;case W.RUNNING:return`working`;case W.IDLE:case W.WAITING_FOR_CONFIRMATION:return`active`;case W.PAUSED:return`paused`;case W.ERROR:case W.STUCK:return`error`;default:return`unknown`}},tr=(e,t)=>{if(t)return`COMMON$ARCHIVED`;switch(e){case`check`:return`COMMON$FINISHED`;case`working`:case`active`:return`COMMON$WORKING`;case`paused`:return`COMMON$PAUSED`;case`error`:return`COMMON$ERROR`;default:return`COMMON$STOPPED`}};function nr(e){switch(e){case`check`:return(0,X.jsx)(`svg`,{"data-testid":`conversation-status-check`,viewBox:`0 0 12 12`,className:`w-2.5 h-2.5 stroke-[var(--oh-status-success)]`,fill:`none`,strokeWidth:2.25,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,X.jsx)(`path`,{d:`M2.5 6.5 5 9l4.5-5.5`})});case`working`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-working`,className:`w-1.5 h-1.5 rounded-full animate-pulse bg-[var(--oh-status-success)]`});case`active`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-active`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-status-success)]`});case`paused`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-paused`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-muted)]`});case`error`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-error`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-status-error)]`});default:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-unknown`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-color-tertiary)]`})}}function rr({executionStatus:e,sandboxStatus:t,showTooltip:n=!0}){let{t:r}=C(`openhands`),i=t===`MISSING`,a=t===`ERROR`?`error`:i?`paused`:er(e),o=r(tr(a,i)),s=(0,X.jsx)(`div`,{className:`w-2.5 h-2.5 flex items-center justify-center shrink-0`,children:i?(0,X.jsx)(nn,{"data-testid":`conversation-status-archived`,size:10,className:`shrink-0 text-[var(--oh-muted)] opacity-60`,"aria-hidden":!0}):nr(a)});return n?(0,X.jsx)(Ue,{content:o,placement:`right`,showArrow:!0,tooltipClassName:`bg-base text-white text-xs shadow-lg`,children:s}):s}function ir({title:e,titleMode:t,onTitleSave:n,executionStatus:r,sandboxStatus:i}){let a=ft(i);return(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 overflow-hidden`,children:[r!==void 0&&(0,X.jsx)(`div`,{className:`flex w-[18px] shrink-0 items-center justify-center`,children:(0,X.jsx)(rr,{executionStatus:r,sandboxStatus:i,showTooltip:!1})}),(0,X.jsx)($n,{title:e,titleMode:t,onSave:n,isConversationArchived:a})]})}var ar=e(a(),1);function or({onClose:e,onDelete:t,onStop:n,onEdit:r,onDisplayCost:i,onShowAgentTools:a,onShowSkills:o,onDownloadViaVSCode:s,onDownloadConversation:c,position:l=`bottom`,floatingStyle:u,ignoreOutsideClickRef:d}){let{t:f}=C(`openhands`),{backend:p}=D(),m=Zt(e,d),h=p.kind===`cloud`?w.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME:w.COMMON$STOP_CONVERSATION,g=(0,Y.useCallback)((e,t,n)=>{let r=e.filter(e=>e!=null);return r.length>0?n?(0,X.jsx)(Y.Fragment,{children:r},t):(0,X.jsxs)(Y.Fragment,{children:[r,(0,X.jsx)(rt,{inset:`menu`})]},t):null},[]),_=u!=null;return(0,X.jsxs)(rn,{ref:m,testId:`context-menu`,style:_?u:void 0,theme:_?`popover`:`default`,position:_?`none`:l,alignment:_?`none`:`right`,spacing:_?`none`:`default`,className:_?`mt-0 min-w-[200px] w-max max-w-[min(280px,100vw-16px)]`:`z-[200] mt-0`,children:[g([r&&(0,X.jsx)(an,{testId:`edit-button`,onClick:r,children:(0,X.jsx)(J,{icon:(0,X.jsx)(cn,{width:16,height:16}),text:f(w.BUTTON$RENAME)})},`edit-button`)],`edit-section`),g([a&&(0,X.jsx)(an,{testId:`show-agent-tools-button`,onClick:a,children:(0,X.jsx)(J,{icon:(0,X.jsx)(mt,{width:16,height:16}),text:f(w.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})},`show-agent-tools-button`),o&&(0,X.jsx)(an,{testId:`show-skills-button`,onClick:o,children:(0,X.jsx)(J,{icon:(0,X.jsx)(ln,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:f(w.CONVERSATION$SHOW_SKILLS)})},`show-skills-button`)],`tools-section`),g([n&&(0,X.jsx)(an,{testId:`stop-button`,onClick:n,children:(0,X.jsx)(J,{icon:(0,X.jsx)(st,{width:16,height:16}),text:f(h)})},`stop-button`),s&&(0,X.jsx)(an,{testId:`download-vscode-button`,onClick:s,children:(0,X.jsx)(J,{icon:(0,X.jsx)(Vt,{width:16,height:16}),text:f(w.BUTTON$DOWNLOAD_VIA_VSCODE)})},`download-vscode-button`),c&&(0,X.jsx)(an,{testId:`download-trajectory-button`,onClick:c,children:(0,X.jsx)(J,{icon:(0,X.jsx)(Vt,{width:16,height:16}),text:f(w.BUTTON$DOWNLOAD_CONVERSATION_DATA)})},`download-trajectory-button`)],`control-section`),g([i&&(0,X.jsx)(an,{testId:`display-cost-button`,onClick:i,children:(0,X.jsx)(J,{icon:(0,X.jsx)(Jt,{width:16,height:16}),text:f(w.BUTTON$DISPLAY_COST)})},`display-cost-button`),t&&(0,X.jsx)(an,{testId:`delete-button`,onClick:t,children:(0,X.jsx)(J,{icon:(0,X.jsx)(on,{width:16,height:16}),text:f(w.COMMON$DELETE_CONVERSATION)})},`delete-button`)],`info-section`,!0)]})}function sr({contextMenuOpen:e,onContextMenuToggle:t,onDelete:n,onStop:r,onEdit:i,onDownloadViaVSCode:a,onDownloadConversation:o,executionStatus:s,conversationId:c,showOptions:l}){let u=ve(s),d=ye(s),f=(0,Y.useRef)(null),[,p]=(0,Y.useReducer)(e=>e+1,0);(0,Y.useLayoutEffect)(()=>{if(!e)return;p();let t=0,n=()=>{t||=window.requestAnimationFrame(()=>{t=0,p()})};return window.addEventListener(`resize`,n),window.addEventListener(`scroll`,n,!0),()=>{t&&window.cancelAnimationFrame(t),window.removeEventListener(`resize`,n),window.removeEventListener(`scroll`,n,!0)}},[e]);let m=(()=>{if(!e||!f.current)return;let t=f.current.getBoundingClientRect(),n=Number(window.innerWidth)||0,r=Number(window.innerHeight)||0,i=Number(t.bottom)||0,a=Number(t.right)||0;return{position:`fixed`,top:i+280+8>r?Math.max(8,t.top-280-4):i+4,right:Math.max(8,n-a),zIndex:1e5}})(),h=typeof document<`u`?document.body:null;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(sn,{ref:f,onClick:n=>{n.preventDefault(),n.stopPropagation(),t(!e)},className:U(u&&`opacity-60`)}),e&&m&&h?(0,ar.createPortal)((0,X.jsx)(or,{ignoreOutsideClickRef:f,floatingStyle:m,onClose:()=>t(!1),onDelete:n,onStop:d?r:void 0,onEdit:i,onDownloadViaVSCode:c&&l?a:void 0,onDownloadConversation:c?o:void 0,position:`bottom`}),h):null]})}function cr(e){return e?e.split(`/`).pop()||e:null}var lr={bitbucket:fn,bitbucket_data_center:fn,github:un,gitlab:dn};function ur({selectedRepository:e}){let t=e.git_provider?lr[e.git_provider]:null;return(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 overflow-hidden`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[t&&(0,X.jsx)(t,{size:14,className:`shrink-0 text-[var(--oh-muted)]`}),e.git_provider===`azure_devops`&&(0,X.jsx)(ot,{className:`h-[14px] w-[14px] shrink-0 text-[var(--oh-muted)]`}),(0,X.jsx)(`span`,{"data-testid":`conversation-card-selected-repository`,className:`min-w-0 truncate text-xs text-[var(--oh-muted)]`,children:e.selected_repository})]}),(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[(0,X.jsx)(tn,{size:12,className:`shrink-0 text-[var(--oh-muted)]`}),(0,X.jsx)(`span`,{"data-testid":`conversation-card-selected-branch`,className:`min-w-0 truncate text-xs text-[var(--oh-muted)]`,children:e.selected_branch})]})]})}function dr({workspaceWorkingDir:e}){let{t}=C(`openhands`),n=e?b(e).trim():``;return n?(0,X.jsx)(`span`,{className:`truncate min-w-0 text-xs text-[var(--oh-muted)] flex-1`,title:e??void 0,children:n}):(0,X.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-[var(--oh-muted)] flex-1 min-w-0 overflow-hidden`,children:[(0,X.jsx)(y,{width:14,height:14,className:`text-[var(--oh-muted)]`}),(0,X.jsx)(`span`,{className:`truncate min-w-0`,children:t(w.COMMON$NO_REPOSITORY)})]})}function fr({selectedRepository:e,lastUpdatedAt:t,createdAt:n,executionStatus:r,workspaceWorkingDir:i,showRepositoryMetadata:a=!0,showTimestamp:o=!0,llmModel:s,showAgentChip:c=!1,agentKind:l=null,acpServer:u=null}){let{t:d}=C(`openhands`),f=ve(r),p=null;if(c)if(l===`acp`){let e=Pt(u)??d(w.CONVERSATION$ACP_AGENT_GENERIC),t=It(u,s),n=t??e;p={kind:Ft(u),text:n,tooltip:t?`${e} · ${t}`:e}}else s&&(p={kind:`openhands`,text:cr(s)??s,tooltip:s});let m=r===void 0?void 0:`pl-[26px]`;return(0,X.jsxs)(`div`,{className:U(`flex flex-col gap-0.5 mt-0.5 w-full min-w-0`,f&&`opacity-60`),children:[p?(0,X.jsx)(`div`,{className:m,children:(0,X.jsxs)(`span`,{"data-testid":`conversation-card-agent-chip`,className:`inline-flex items-center gap-1 text-xs text-[var(--oh-muted)] max-w-full min-w-0`,title:p.tooltip,children:[(0,X.jsx)(F,{kind:p.kind}),(0,X.jsx)(`span`,{className:`truncate`,children:p.text})]})}):null,(0,X.jsxs)(`div`,{className:U(`flex flex-row items-center gap-2 w-full min-w-0`,a&&m),children:[a&&(e?.selected_repository?(0,X.jsx)(ur,{selectedRepository:e}):(0,X.jsx)(dr,{workspaceWorkingDir:i})),(0,X.jsx)(`div`,{className:`flex items-center gap-2 shrink-0 ml-auto`,children:o&&(n??t)&&(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] text-right`,children:(0,X.jsx)(`time`,{children:`${le(t??n)} ${d(w.CONVERSATION$AGO)}`})})})]})]})}function pr(){let{t:e}=C(`openhands`);return(0,X.jsxs)(`span`,{"data-testid":`error-badge`,className:`flex items-center gap-1 px-1.5 py-0.5 bg-[var(--oh-status-error)] text-white text-xs font-medium rounded-full`,children:[(0,X.jsx)(vt,{className:`text-white w-3 h-3`}),(0,X.jsx)(`span`,{children:e(w.COMMON$ERROR)})]})}function mr({onClick:e,onDelete:t,onStop:n,onChangeTitle:r,showOptions:i,title:a,selectedRepository:o,lastUpdatedAt:s,createdAt:c,conversationId:l,executionStatus:u,sandboxStatus:d,contextMenuOpen:f=!1,onContextMenuToggle:p,isActive:m=!1,workspaceWorkingDir:h,showRepositoryMetadata:g=!0,llmModel:_=null,showLlmProfiles:v=!1,agentKind:y=null,acpServer:b=null,isPinned:x=!1,onTogglePin:S,alwaysShowPinIcon:T=!1}){let{t:E}=C(`openhands`),{trackDownloadVsCodeButtonClicked:D}=At(),[O,k]=Y.useState(`view`),{mutateAsync:A}=dt(),j=e=>{e!==``&&e!==a&&r?.(e),k(`view`)},M=e=>{e.preventDefault(),e.stopPropagation(),t?.(),p?.(!1)},N=e=>{e.preventDefault(),e.stopPropagation(),n?.(),p?.(!1)},P=e=>{e.preventDefault(),e.stopPropagation(),k(`edit`),p?.(!1)},F=async e=>{if(e.preventDefault(),e.stopPropagation(),D(),l)try{let e=await en.getVSCodeUrl(l);if(e.vscode_url){let t=Gt(e.vscode_url);t&&window.open(t,`_blank`)}}catch{}p?.(!1)},I=async e=>{e.preventDefault(),e.stopPropagation(),l&&await A(l),p?.(!1)},L=e=>{e.preventDefault(),e.stopPropagation(),S?.()},ee=()=>(0,X.jsx)(`button`,{type:`button`,"data-testid":l?`conversation-pin-toggle-${l}`:`conversation-pin-toggle`,"aria-pressed":x,"aria-label":E(x?w.CONVERSATION_PANEL$UNPIN_CONVERSATION:w.CONVERSATION_PANEL$PIN_CONVERSATION),onClick:L,className:U(`flex shrink-0 cursor-pointer items-center justify-center rounded-md p-1`,`text-[var(--oh-muted)] hover:bg-white/10 hover:text-white`),children:(0,X.jsx)(Dn,{className:U(`h-3.5 w-3.5`,x&&`fill-current`),"aria-hidden":!0})}),R=!!(t||r||i),z=R||!!S,B=T&&x&&!!S,V=g||v&&(y===`acp`||!!_);return(0,X.jsxs)(`div`,{"data-testid":`conversation-card`,"data-context-menu-open":f.toString(),"data-active":m?`true`:`false`,onClick:e,className:U(`group relative h-auto w-full cursor-pointer rounded-md py-1 pl-2 pr-1 transition-colors`,!f&&`hover:bg-[var(--oh-surface)]`,(m||f)&&`bg-[var(--oh-surface)]`),children:[(0,X.jsxs)(`div`,{className:`flex items-center w-full min-w-0`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 overflow-hidden`,children:[(0,X.jsx)(ir,{title:a,titleMode:O,onTitleSave:j,executionStatus:u,sandboxStatus:d}),d===`ERROR`&&(0,X.jsx)(pr,{})]}),(0,X.jsxs)(`div`,{className:U(`relative ml-auto pl-2 flex items-center justify-end shrink-0`,B?`min-w-[3.75rem]`:z&&`group-hover:min-w-[3.75rem] group-focus-within:min-w-[3.75rem]`,f&&`min-w-[3.75rem]`),children:[!B&&(c??s)&&(0,X.jsx)(`p`,{className:U(`text-xs text-[var(--oh-muted)] text-right whitespace-nowrap transition-opacity -translate-x-1.5`,z&&`group-hover:opacity-0 group-focus-within:opacity-0`,f&&`opacity-0`),children:(0,X.jsx)(`time`,{children:le(s??c)})}),z?(0,X.jsxs)(`div`,{className:U(`absolute right-0 top-1/2 flex -translate-y-1/2 items-center gap-0.5 transition-opacity`,B?`pointer-events-auto visible opacity-100`:U(`pointer-events-none opacity-0 invisible`,`group-hover:pointer-events-auto group-hover:opacity-100 group-hover:visible`,`group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-focus-within:visible`),f&&`pointer-events-auto visible opacity-100`),children:[S?ee():null,B&&(c??s)&&R?(0,X.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,X.jsx)(`div`,{className:U(!f&&`invisible pointer-events-none group-hover:visible group-hover:pointer-events-auto group-focus-within:visible group-focus-within:pointer-events-auto`),children:(0,X.jsx)(sr,{contextMenuOpen:f,onContextMenuToggle:p||(()=>{}),onDelete:t&&M,onStop:n&&N,onEdit:r&&P,onDownloadViaVSCode:F,onDownloadConversation:I,executionStatus:u,conversationId:l,showOptions:i})}),(0,X.jsx)(`p`,{className:U(`pointer-events-none absolute inset-0 flex items-center justify-end`,`text-xs text-[var(--oh-muted)] whitespace-nowrap -translate-x-1.5`,`group-hover:hidden group-focus-within:hidden`,f&&`hidden`),children:(0,X.jsx)(`time`,{children:le(s??c)})})]}):null,!B&&R?(0,X.jsx)(sr,{contextMenuOpen:f,onContextMenuToggle:p||(()=>{}),onDelete:t&&M,onStop:n&&N,onEdit:r&&P,onDownloadViaVSCode:F,onDownloadConversation:I,executionStatus:u,conversationId:l,showOptions:i}):null]}):null]})]}),V&&(0,X.jsx)(fr,{selectedRepository:o,lastUpdatedAt:s,createdAt:c,executionStatus:u,workspaceWorkingDir:h,showRepositoryMetadata:g,showTimestamp:!1,llmModel:_,showAgentChip:v,agentKind:y,acpServer:b})]})}var hr={bitbucket:fn,bitbucket_data_center:fn,github:un,gitlab:dn};function gr({label:e,children:t}){return(0,X.jsxs)(`div`,{className:`flex items-start gap-2 text-xs`,children:[(0,X.jsx)(`span`,{className:`w-20 shrink-0 text-[var(--oh-muted)]`,children:e}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 break-words text-[var(--oh-foreground)]`,children:t})]})}function _r({title:e,executionStatus:t,sandboxStatus:n,selectedRepository:r,workspaceWorkingDir:i,llmModel:a,createdAt:o}){let{t:s}=C(`openhands`),c=r?.selected_repository??null,l=r?.selected_branch??null,u=r?.git_provider??null,d=u?hr[u]:null,f=o?new Date(o).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`}):null;return(0,X.jsxs)(`div`,{className:`flex w-[280px] flex-col gap-3 p-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-start gap-2`,children:[t===void 0?null:(0,X.jsx)(`div`,{className:`mt-0.5`,children:(0,X.jsx)(rr,{executionStatus:t,sandboxStatus:n,showTooltip:!1})}),(0,X.jsx)(`span`,{className:`break-words text-sm font-medium text-white`,children:e})]}),(0,X.jsxs)(`dl`,{className:`flex flex-col gap-1.5`,children:[c?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(gr,{label:s(w.CONVERSATION$REPOSITORY),children:(0,X.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[d?(0,X.jsx)(d,{size:12,className:`mt-0.5 shrink-0`}):null,u===`azure_devops`?(0,X.jsx)(ot,{className:`mt-0.5 h-3 w-3 shrink-0`}):null,(0,X.jsx)(`span`,{className:`break-all`,children:c})]})}),l?(0,X.jsx)(gr,{label:s(w.CONVERSATION$BRANCH),children:(0,X.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[(0,X.jsx)(tn,{size:11,className:`mt-0.5 shrink-0`}),(0,X.jsx)(`span`,{className:`break-all`,children:l})]})}):null]}):i?(0,X.jsx)(gr,{label:s(w.CONVERSATION_PANEL$PREVIEW_DIRECTORY),children:(0,X.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[(0,X.jsx)(ie,{size:12,className:`mt-0.5 shrink-0`}),(0,X.jsx)(`span`,{className:`break-all`,children:i})]})}):null,a?(0,X.jsx)(gr,{label:s(w.CONVERSATION_PANEL$PREVIEW_MODEL),children:(0,X.jsx)(`span`,{className:`break-all`,children:a})}):null,f?(0,X.jsx)(gr,{label:s(w.CONVERSATION$CREATED),children:f}):null]})]})}function vr({taskStatus:e}){return(0,X.jsx)(`div`,{className:U(`w-2 h-2 rounded-full flex-shrink-0`,(()=>{switch(e){case`READY`:return`bg-green-500`;case`ERROR`:return`bg-red-500`;case`WORKING`:case`WAITING_FOR_SANDBOX`:case`PREPARING_REPOSITORY`:case`RUNNING_SETUP_SCRIPT`:case`SETTING_UP_GIT_HOOKS`:case`SETTING_UP_SKILLS`:case`STARTING_CONVERSATION`:return`bg-yellow-500 animate-pulse`;default:return`bg-[var(--oh-interactive-selected)]`}})()),"aria-label":`Task status: ${e}`})}function yr({taskStatus:e}){let{t}=C(`openhands`);return e===`WORKING`?null:(0,X.jsx)(`span`,{className:U(`text-xs font-medium px-2 py-0.5 rounded border flex-shrink-0`,(()=>{switch(e){case`READY`:return`bg-green-500/10 text-green-400 border-green-500/20`;case`ERROR`:return`bg-red-500/10 text-red-400 border-red-500/20`;default:return`bg-yellow-500/10 text-yellow-400 border-yellow-500/20`}})()),children:t(be(e))})}function br({title:e,taskStatus:t}){return(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 overflow-hidden mr-2`,children:[(0,X.jsx)(`div`,{className:`flex items-center`,children:(0,X.jsx)(vr,{taskStatus:t})}),(0,X.jsx)(`h3`,{className:`text-sm font-medium text-content-2 truncate flex-1`,children:e}),(0,X.jsx)(yr,{taskStatus:t})]})}function xr({selectedRepository:e,createdAt:t,detail:n}){let{t:r}=C(`openhands`);return(0,X.jsxs)(`div`,{className:U(`flex flex-col gap-1 mt-1`),children:[(0,X.jsxs)(`div`,{className:`flex flex-row justify-between items-center`,children:[e?(0,X.jsx)(ur,{selectedRepository:e}):(0,X.jsx)(dr,{}),t&&(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] flex-1 text-right`,children:(0,X.jsx)(`time`,{children:`${le(t)} ${r(w.CONVERSATION$AGO)}`})})]}),n&&(0,X.jsx)(`div`,{className:`text-xs text-[var(--oh-text-subtle)] truncate`,children:n})]})}function Sr({task:e,onClick:t}){let{t:n}=C(`openhands`),r=e.request.title||e.detail||n(w.CONVERSATION$STARTING_CONVERSATION),i=e.request.selected_repository?{selected_repository:e.request.selected_repository,selected_branch:e.request.selected_branch||null,git_provider:e.request.git_provider||null}:null;return(0,X.jsxs)(`div`,{"data-testid":`start-task-card`,onClick:t,className:U(`relative h-auto w-full p-3.5 border-b border-[var(--oh-border)] cursor-pointer`,`hover:bg-tertiary`),children:[(0,X.jsx)(`div`,{className:`flex items-center justify-between w-full`,children:(0,X.jsx)(br,{title:r,taskStatus:e.status})}),(0,X.jsx)(xr,{selectedRepository:i,createdAt:e.created_at,detail:e.detail})]})}function Cr({compact:e=!1}){return e?(0,X.jsx)(`div`,{"data-testid":`conversation-card-skeleton-compact`,className:`skeleton-stagger flex flex-col items-center gap-1.5 py-1`,"aria-hidden":!0,children:[0,1,2].map(e=>(0,X.jsx)(`div`,{className:`h-1.5 w-7 shrink-0 skeleton`},`conversation-skeleton-compact-${e}`))}):(0,X.jsx)(`div`,{"data-testid":`conversation-card-skeleton`,className:`skeleton-stagger flex flex-col gap-1.5 py-0.5`,"aria-hidden":!0,children:[0,1,2].map(e=>(0,X.jsx)(`div`,{className:`h-6 min-h-6 w-full skeleton`},`conversation-skeleton-row-${e}`))})}function wr({conversationId:e,title:t,selectedRepository:n,executionStatus:i,sandboxStatus:a,lastUpdatedAt:o,createdAt:s,workspaceWorkingDir:c,isActive:l=!1,onClose:u,showRepositoryMetadata:d=!0,llmModel:f=null,showLlmProfiles:p=!1,agentKind:m=null,acpServer:h=null}){let{t:g}=C(`openhands`);return(0,X.jsx)(r,{content:(0,X.jsxs)(`div`,{className:`w-[260px] p-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,X.jsx)(rr,{executionStatus:i,sandboxStatus:a,showTooltip:!1}),(0,X.jsx)(`span`,{className:`text-sm font-medium text-white truncate`,title:t,children:t||g(w.CONVERSATION$UNTITLED)})]}),(0,X.jsx)(fr,{selectedRepository:n,lastUpdatedAt:o,createdAt:s,executionStatus:i,workspaceWorkingDir:c,showRepositoryMetadata:d,llmModel:f,showAgentChip:p,agentKind:m,acpServer:h})]}),placement:`right`,closeDelay:100,className:`bg-[var(--oh-surface)] text-white border border-[var(--oh-border-subtle)] shadow-xl p-0`,disableAnimation:!1,children:(0,X.jsx)(Ne,{to:`/conversations/${e}`,onClick:u,"data-testid":`compact-conversation-row`,"data-conversation-id":e,"aria-label":t||e,className:({isActive:e})=>U(`flex items-center justify-center w-10 h-9 mx-auto rounded-md`,`transition-colors cursor-pointer`,e||l?`bg-tertiary`:`hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(rr,{executionStatus:i,sandboxStatus:a,showTooltip:!1})})})}var Tr={showOlderConversations:!0,showRepoBranchMetadata:!1,showLlmProfiles:!0,showHoverMetadata:!0,organizeMode:`chronological`,conversationSort:`updated`,threadScope:`all`,groupFolderOrder:[]},Z=St()(Ct(e=>({...Tr,setShowOlderConversations:t=>e(()=>({showOlderConversations:t})),toggleShowOlderConversations:()=>e(e=>({showOlderConversations:!e.showOlderConversations})),setShowRepoBranchMetadata:t=>e(()=>({showRepoBranchMetadata:t})),toggleShowRepoBranchMetadata:()=>e(e=>({showRepoBranchMetadata:!e.showRepoBranchMetadata})),setShowLlmProfiles:t=>e(()=>({showLlmProfiles:t})),toggleShowLlmProfiles:()=>e(e=>({showLlmProfiles:!e.showLlmProfiles})),setShowHoverMetadata:t=>e(()=>({showHoverMetadata:t})),toggleShowHoverMetadata:()=>e(e=>({showHoverMetadata:!e.showHoverMetadata})),setOrganizeMode:t=>e(()=>({organizeMode:t})),setConversationSort:t=>e(()=>({conversationSort:t})),setThreadScope:t=>e(()=>({threadScope:t})),setGroupFolderOrder:t=>e(()=>({groupFolderOrder:[...t]}))}),{name:`conversation-panel-preferences`,storage:wt(()=>localStorage),partialize:e=>({showOlderConversations:e.showOlderConversations,showRepoBranchMetadata:e.showRepoBranchMetadata,showLlmProfiles:e.showLlmProfiles,showHoverMetadata:e.showHoverMetadata,organizeMode:e.organizeMode,conversationSort:e.conversationSort,threadScope:e.threadScope,groupFolderOrder:e.groupFolderOrder})})),Er=`px-2 pb-1 pt-1`,Dr=`text-[11px] font-semibold uppercase tracking-wide text-[var(--oh-muted)]`;function Or({children:e,suffix:t}){return t==null?(0,X.jsx)(`div`,{role:`presentation`,className:U(Er,Dr),children:e}):(0,X.jsxs)(`div`,{role:`presentation`,className:U(`flex items-baseline justify-between gap-2`,Er),children:[(0,X.jsx)(`span`,{className:U(`min-w-0 truncate text-left`,Dr),children:e}),t]})}function kr(){return(0,X.jsx)(rt,{inset:`menu`})}function Q({icon:e,label:t,selected:n,onClick:r,testId:i,disabled:a}){return(0,X.jsxs)(`button`,{type:`button`,role:n===void 0?`menuitem`:`menuitemradio`,"aria-checked":n===void 0?void 0:!!n,"data-testid":i,disabled:a,onClick:r,className:U(`group`,Qe,`text-[var(--oh-foreground)] disabled:opacity-50`),children:[(0,X.jsx)(e,{className:U(`h-3.5 w-3.5`,Xe),"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),n?(0,X.jsx)(M,{className:`ml-auto h-3.5 w-3.5 shrink-0 text-white`,"aria-hidden":!0}):null]})}var Ar=e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1):e;function jr({filterMenuOpen:e,setFilterMenuOpen:t,menuRef:n,backendKind:r,organizeMode:i,setOrganizeMode:a,conversationSort:o,setConversationSort:s,threadScope:c,setThreadScope:l,showOlderConversations:u,toggleShowOlderConversations:d,showRepoBranchMetadata:f,toggleShowRepoBranchMetadata:p,showLlmProfiles:m,toggleShowLlmProfiles:h,showHoverMetadata:g,toggleShowHoverMetadata:_,totalConversationsCount:v,onRequestDeleteAll:y}){let{t:b}=C(`openhands`),x=b(r===`local`?w.CONVERSATION_PANEL$BY_WORKSPACE:w.CONVERSATION_PANEL$BY_REPOSITORY),S=Y.useRef(null),T=Y.useRef(null),E=Y.useRef(e);return Y.useEffect(()=>{e?(T.current?.querySelector(`[role="menuitem"], [role="menuitemradio"]`))?.focus():E.current&&S.current?.focus(),E.current=e},[e]),(0,X.jsxs)(`div`,{ref:n,className:`relative shrink-0 pr-0.5`,children:[(0,X.jsx)(`button`,{ref:S,type:`button`,"data-testid":`older-conversations-filter-toggle`,"aria-label":b(w.CONVERSATION_PANEL$FILTER_LABEL),"aria-haspopup":`menu`,"aria-expanded":e,onClick:()=>t(!e),className:U(`inline-flex h-7 w-7 items-center justify-center rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`,$e),children:(0,X.jsx)(Tn,{className:`lucide lucide-list-filter shrink-0`,width:14,height:14,strokeWidth:2,"aria-hidden":!0})}),e?(0,X.jsxs)(`div`,{ref:T,role:`menu`,"aria-orientation":`vertical`,"aria-label":b(w.CONVERSATION_PANEL$FILTER_LABEL),tabIndex:-1,"data-testid":`older-conversations-filter-menu`,onKeyDown:e=>{if(e.key===`Escape`){e.preventDefault(),t(!1);return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;let n=T.current;if(!n)return;let r=Array.from(n.querySelectorAll(`[role="menuitem"], [role="menuitemradio"]`)).filter(e=>!e.disabled);if(r.length===0)return;let i=r.indexOf(document.activeElement),a=e.key===`ArrowDown`?1:-1,o=((i===-1?0:i)+a+r.length)%r.length;e.preventDefault(),r[o]?.focus()},className:U(`absolute right-0 top-full z-50 mt-0 w-64 rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-[var(--oh-foreground)] shadow-lg`,Ye,qe),children:[(0,X.jsx)(Or,{children:b(w.CONVERSATION_PANEL$ORGANIZE)}),(0,X.jsx)(Q,{icon:ie,label:x,selected:i===`grouped`,onClick:()=>{a(`grouped`),t(!1)}}),(0,X.jsx)(Q,{icon:bn,label:b(w.CONVERSATION_PANEL$CHRONOLOGICAL),selected:i===`chronological`,onClick:()=>{a(`chronological`),t(!1)}}),(0,X.jsx)(kr,{}),(0,X.jsx)(Or,{children:b(w.CONVERSATION_PANEL$SORT_BY)}),(0,X.jsx)(Q,{icon:yn,label:b(w.CONVERSATION_PANEL$SORT_CREATED),selected:o===`created`,onClick:()=>{s(`created`),t(!1)}}),(0,X.jsx)(Q,{icon:xn,label:b(w.CONVERSATION_PANEL$SORT_UPDATED),selected:o===`updated`,onClick:()=>{s(`updated`),t(!1)}}),(0,X.jsx)(kr,{}),(0,X.jsx)(Or,{children:b(w.CONVERSATION_PANEL$SHOW)}),(0,X.jsx)(Q,{icon:En,label:b(w.CONVERSATION_PANEL$ALL_THREADS),selected:c===`all`,onClick:()=>{l(`all`),t(!1)}}),(0,X.jsx)(Q,{icon:kn,label:b(w.CONVERSATION_PANEL$RELEVANT_THREADS),selected:c===`relevant`,onClick:()=>{l(`relevant`),t(!1)}}),(0,X.jsx)(kr,{}),(0,X.jsx)(Or,{children:b(w.CONVERSATION_PANEL$METADATA)}),(0,X.jsx)(Q,{icon:j,label:b(w.CONVERSATION_PANEL$LLM_MODEL),selected:m,testId:`toggle-llm-profiles`,onClick:()=>{h(),t(!1)}}),(0,X.jsx)(Q,{icon:B,label:b(w.CONVERSATION_PANEL$REPO_BRANCH),selected:f,testId:`toggle-repo-branch-metadata`,onClick:()=>{p(),t(!1)}}),(0,X.jsx)(Q,{icon:ce,label:b(w.CONVERSATION_PANEL$HOVER_METADATA),selected:g,testId:`toggle-hover-metadata`,onClick:()=>{_(),t(!1)}}),(0,X.jsx)(kr,{}),(0,X.jsx)(Or,{suffix:(0,X.jsx)(`span`,{className:`shrink-0 text-right text-[10px] font-medium normal-case tracking-normal text-[var(--oh-muted)]/70`,children:b(w.CONVERSATION_PANEL$OLDER_OVER_ONE_HOUR)}),children:b(w.CONVERSATION_PANEL$OLDER_SECTION)}),(0,X.jsx)(Q,{testId:`toggle-older-conversations`,icon:u?Sn:Cn,label:Ar(b(u?w.CONVERSATION$HIDE:w.CONVERSATION$SHOW_ALL)),onClick:()=>{d(),t(!1)}}),(0,X.jsx)(kr,{}),(0,X.jsx)(Q,{testId:`delete-all-conversations`,icon:ge,label:Ar(b(w.CONVERSATION$DELETE_ALL)),disabled:v===0,onClick:()=>{v!==0&&(y(),t(!1))}})]}):null]})}var Mr=U(`z-50 flex flex-col rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-white shadow-lg`,Ke);function Nr(e,t){let{open:n,enabled:r,targetWidth:i=256}=t,[a,o]=Y.useState(null),s=Y.useCallback(()=>{let t=e.current;if(!t)return;let n=t.getBoundingClientRect(),r=Math.min(i,window.innerWidth-16),a=n.right-r;a<8&&(a=8),a+r>window.innerWidth-8&&(a=Math.max(8,window.innerWidth-8-r)),o({top:n.bottom+4,left:a,width:r})},[e,i]);return Y.useLayoutEffect(()=>{if(!n||!r){o(null);return}return s(),window.addEventListener(`resize`,s),window.addEventListener(`scroll`,s,!0),()=>{window.removeEventListener(`resize`,s),window.removeEventListener(`scroll`,s,!0)}},[n,r,s]),a}function Pr({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=C(`openhands`),{navigate:o}=Ae(),[s,c]=Y.useState(!1),l=Y.useRef(null),u=Y.useRef(null),d=Nr(u,{open:s,enabled:i}),{data:f,error:p}=oe(),m=f?.workspaceParents??[],{mutate:h}=te(),{mutate:g}=se(),{mutate:_}=R(),{mutate:v}=z(),{workspaces:y}=re(),b=ee(p,a),[x,T]=Y.useState(!1),[E,D]=Y.useState(!1),{mutate:O,isPending:k}=$t(),A=S(),j=k||A;Y.useEffect(()=>{if(!s||x||E)return;let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[s,x,E]),Y.useEffect(()=>{if(!s||x||E)return;let e=e=>{e.key===`Escape`&&c(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[s,x,E]);let M=e=>{j||O({workingDir:e,entryPoint:`sidebar_local_menu`},{onSuccess:e=>{c(!1),o(`/conversations/${e.conversation_id}`)}})},N=Qe,P=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),F=Y.useCallback(()=>{c(e=>!e)},[]),I=s&&(!i||d!==null),L=!!b,B=i&&d?{position:`fixed`,top:d.top,left:d.left,width:d.width}:void 0,ne=(0,X.jsx)(`button`,{type:`button`,"data-testid":`add-workspaces-button`,disabled:L,onMouseDown:P,onClick:e=>{e.preventDefault(),e.stopPropagation(),!L&&T(!0)},className:N,children:a(w.HOME$ADD_WORKSPACES)}),ie=b?(0,X.jsx)(Ue,{content:b,placement:`top`,children:(0,X.jsx)(`span`,{className:`block`,children:ne})}):ne;return(0,X.jsxs)(`div`,{className:U(!i&&`relative`,t),ref:l,children:[(0,X.jsx)(`span`,{ref:u,className:`inline-flex`,children:e({onClick:F,"aria-expanded":s,"aria-haspopup":`menu`,disabled:j})}),I&&(0,X.jsxs)(`div`,{"data-testid":r,className:U(Mr,!i&&U(`absolute top-full mt-0`,n)),style:B,children:[(0,X.jsxs)(`ul`,{className:U(`max-h-[40vh] overflow-y-auto sm:max-h-[280px]`,Ye),children:[(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,disabled:j,"data-testid":`launch-no-workspace`,onClick:()=>M(),className:N,children:(0,X.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:a(w.HOME$NO_WORKSPACE_OPTION)})})}),y.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,disabled:j,"data-testid":`launch-workspace`,"data-workspace-path":e.path,onClick:()=>M(e.path),className:N,children:[(0,X.jsx)(`span`,{className:et,"aria-hidden":!0,children:(0,X.jsx)(at,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.name})]})},e.id))]}),(0,X.jsxs)(`div`,{className:U(`flex flex-col`,Ye),"data-testid":`new-conversation-menu-footer`,children:[(0,X.jsx)(rt,{inset:`menu`,testId:`new-conversation-menu-footer-divider`}),ie,(y.length>0||m.length>0)&&(0,X.jsx)(`button`,{type:`button`,"data-testid":`manage-workspaces-button`,onMouseDown:P,onClick:e=>{e.preventDefault(),e.stopPropagation(),D(!0)},className:N,children:a(w.HOME$MANAGE_WORKSPACES)})]})]}),(0,X.jsx)(V,{isOpen:x,onClose:()=>T(!1),onAdd:e=>h(e),onAddParent:e=>_(e)}),(0,X.jsx)(ae,{isOpen:E,workspaces:y,workspaceParents:m,onClose:()=>D(!1),onRemove:e=>g(e),onRemoveParent:e=>v(e)})]})}function Fr({repo:e,disabled:t,onSelect:n,itemClass:r}){return(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,disabled:t,"data-testid":`launch-repository`,"data-repo-name":e.full_name,onClick:()=>n(e),className:r,children:[(0,X.jsx)(`span`,{className:et,"aria-hidden":!0,children:(0,X.jsx)(at,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.full_name})]})})}function Ir({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=C(`openhands`),{navigate:o}=Ae(),{providers:s}=gt(),{lastSelectedProvider:c,setLastSelectedProvider:l}=pt(),[u,d]=Y.useState(!1),f=Y.useRef(null),p=Y.useRef(null),m=Nr(p,{open:u,enabled:i}),[h,g]=Y.useState(c??null),[_,v]=Y.useState(``),y=ht(_,300);Y.useEffect(()=>{if(s.length===0){h!==null&&g(null);return}h&&s.includes(h)||g(c&&s.includes(c)?c:s[0])},[s,h,c]);let{data:b,isLoading:x,isError:T,hasNextPage:E,isFetchingNextPage:D,fetchNextPage:O}=it({provider:h}),{data:k,isLoading:A}=ut(y,h),j=Y.useMemo(()=>b?.pages.flatMap(e=>e.items)??[],[b]),M=y?k??[]:j,{mutate:N,isPending:P}=$t(),F=S(),I=P||F;Y.useEffect(()=>{if(!u)return;let e=e=>{f.current&&!f.current.contains(e.target)&&d(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[u]),Y.useEffect(()=>{if(!u)return;let e=e=>{e.key===`Escape`&&d(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[u]);let L=e=>{I||N({repository:{name:e.full_name,gitProvider:e.git_provider,branch:e.main_branch??`main`},entryPoint:`sidebar_cloud_menu`},{onSuccess:e=>{d(!1),o(`/conversations/${e.conversation_id}`)}})},ee=e=>{g(e),l(e),v(``)},R=Qe;Y.useEffect(()=>{u&&(y||!E||D||x||M.length===0||M.length>=10||O())},[u,y,E,D,x,M.length,O]);let z=y?A:x,B=!y&&E&&M.length>0,V=Y.useCallback(()=>{d(e=>!e)},[]),te=u&&(!i||m!==null),ne=i&&m?{position:`fixed`,top:m.top,left:m.left,width:m.width}:void 0;return(0,X.jsxs)(`div`,{className:U(!i&&`relative`,t),ref:f,children:[(0,X.jsx)(`span`,{ref:p,className:`inline-flex`,children:e({onClick:V,"aria-expanded":u,"aria-haspopup":`menu`,disabled:I})}),te&&(0,X.jsxs)(`div`,{"data-testid":r,className:U(Mr,!i&&U(`absolute top-full mt-0`,n)),style:ne,children:[s.length>1&&(0,X.jsx)(`div`,{className:`flex items-center gap-1 px-1 py-1`,"data-testid":`cloud-provider-tabs`,children:s.map(e=>{let t=e===h;return(0,X.jsxs)(`button`,{type:`button`,"data-testid":`cloud-provider-tab-${e}`,onClick:()=>ee(e),className:U(`flex items-center gap-1 rounded border px-2 py-1 text-xs`,`transition-none`,t?`border-[var(--oh-border-subtle)] bg-[var(--oh-interactive-hover)] text-white`:`border-transparent text-[var(--oh-text-secondary)] hover:text-white`),children:[(0,X.jsx)(_t,{gitProvider:e}),(0,X.jsx)(`span`,{className:`capitalize`,children:e})]},e)})}),(0,X.jsx)(`div`,{className:`px-2`,children:(0,X.jsxs)(`div`,{className:`relative`,children:[(0,X.jsx)(hn,{width:16,height:16,"aria-hidden":!0,className:`pointer-events-none absolute left-0 top-1/2 -translate-y-1/2 text-[var(--oh-muted)]`}),(0,X.jsx)(`input`,{type:`text`,"data-testid":`cloud-repo-search-input`,value:_,onChange:e=>v(e.target.value),placeholder:a(w.COMMON$SEARCH_REPOSITORIES),disabled:!h,className:U(`w-full border-0 bg-transparent py-1.5 pl-6 pr-0 text-sm text-white`,`outline-none placeholder:text-[var(--oh-muted)]`,`focus:outline-none focus:ring-0`,`disabled:cursor-not-allowed disabled:opacity-60`)})]})}),(0,X.jsx)(rt,{inset:`menu`}),(0,X.jsxs)(`ul`,{className:U(`max-h-[40vh] overflow-y-auto custom-scrollbar-always sm:max-h-[280px]`,Ye),children:[z&&M.length===0&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[var(--oh-muted)] italic`,"data-testid":`cloud-repo-loading`,children:a(w.HOME$LOADING_REPOSITORIES)}),T&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[#F87171]`,"data-testid":`cloud-repo-error`,children:a(w.HOME$FAILED_TO_LOAD_REPOSITORIES)}),!z&&!T&&M.length===0&&!!h&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[var(--oh-muted)] italic`,"data-testid":`cloud-repo-empty`,children:a(w.GITHUB$NO_RESULTS)}),M.map(e=>(0,X.jsx)(Fr,{repo:e,disabled:I,onSelect:L,itemClass:R},`${e.git_provider}:${e.id}`)),B&&(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`cloud-repo-load-more`,disabled:D,onClick:()=>O(),className:R,children:(0,X.jsx)(`span`,{className:`text-[var(--oh-text-secondary)]`,children:a(D?w.HOME$LOADING_MORE_REPOSITORIES:w.CONVERSATION$LOAD_MORE)})})})]})]})]})}var Lr=U(`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md`,`text-[var(--oh-muted)] transition-colors`,`hover:bg-[var(--oh-surface-raised)] hover:text-white`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--oh-border)]`,`disabled:cursor-not-allowed disabled:opacity-50`);function Rr({backendKind:e}){let{t}=C(`openhands`),n=t(w.CONVERSATION_PANEL$NEW_THREAD_FOLDER_ARIA),r=(0,X.jsx)(wn,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0,strokeWidth:2});return e===`local`?(0,X.jsx)(Pr,{useFixedPlacement:!0,popoverTestId:`conversation-panel-new-thread-popover`,popoverClassName:``,trigger:({onClick:e,"aria-expanded":t,disabled:i,"aria-haspopup":a})=>(0,X.jsx)(`button`,{type:`button`,className:Lr,"aria-label":n,"aria-expanded":t,"aria-haspopup":a,disabled:i,"data-testid":`conversation-panel-new-thread-picker`,onClick:e,children:r})}):(0,X.jsx)(Ir,{useFixedPlacement:!0,popoverTestId:`conversation-panel-new-thread-popover`,popoverClassName:``,trigger:({onClick:e,"aria-expanded":t,disabled:i,"aria-haspopup":a})=>(0,X.jsx)(`button`,{type:`button`,className:Lr,"aria-label":n,"aria-expanded":t,"aria-haspopup":a,disabled:i,"data-testid":`conversation-panel-new-thread-picker`,onClick:e,children:r})})}function zr(e,t){let n=t.limit??5;if(t.expanded||e.length<=n)return{visibleConversations:[...e],isPreviewTruncated:e.length>n,isShowingAll:!0};let r=t.activeConversationId==null?-1:e.findIndex(e=>e.id===t.activeConversationId);if(r>=n){let t=e[r];return{visibleConversations:[...e.slice(0,n-1),t],isPreviewTruncated:!0,isShowingAll:!1}}return{visibleConversations:e.slice(0,n),isPreviewTruncated:e.length>n,isShowingAll:!1}}function Br(e,t){let n=new Map(t.map(e=>[e.id,e]));return e.map(e=>n.get(e)).filter(e=>e!=null)}function Vr(e,t){if(t.length===0)return[...e];let n=new Set(t);return e.filter(e=>!n.has(e.id))}function Hr(e,t,n){if(t===`local`)return e===`__none_workspace`?{}:e.startsWith(`ws:`)?{workingDir:e.slice(3)}:{};if(e===`__none_repo`)return{};if(e.startsWith(`repo:`)){let t=e.slice(5),r=n[0];return{repository:{name:t,gitProvider:r?.git_provider??`github`,branch:r?.selected_branch??`main`}}}return{}}function Ur(e){if(!e)return 0;let t=Date.parse(e);return Number.isFinite(t)?t:0}function Wr(e,t){let n=t===`created`?`created_at`:`updated_at`;return[...e].sort((e,t)=>Ur(t[n])-Ur(e[n]))}function Gr(e){let t=e.selected_workspace?.trim().replace(/\/+$/,``);if(!t)return{id:`__none_workspace`,label:``};let n=t.split(`/`).filter(Boolean).pop()??t;return{id:`ws:${t}`,label:n}}function Kr(e){let t=e.selected_repository?.trim().replace(/\/+$/,``);if(!t)return{id:`__none_repo`,label:``};let n=t.split(`/`).filter(Boolean),r=n.length?(n[n.length-1]??t).replace(/\.git$/,``):t.replace(/\.git$/,``);return{id:`repo:${t}`,label:r}}function qr(e,t,n,r){let i=new Map;for(let n of e){let{id:e,label:a}=t===`local`?Gr(n):Kr(n),o=e===`__none_workspace`?r.emptyWorkspace:e===`__none_repo`?r.emptyRepository:a,s=i.get(e);s?s.conversations.push(n):i.set(e,{label:o,conversations:[n]})}let a=[...i.entries()].map(([e,r])=>{let i=Wr(r.conversations,n);return{id:e,label:r.label,conversations:i,launch:Hr(e,t,i)}}),o=e=>e.conversations.reduce((e,t)=>Math.max(e,Ur(n===`created`?t.created_at:t.updated_at)),0);return a.sort((e,t)=>o(t)-o(e)),a}function Jr(e,t){if(t.length===0)return[...e];let n=new Map(e.map(e=>[e.id,e])),r=[],i=new Set;for(let e of t){let t=n.get(e);t&&(r.push(t),i.add(e))}for(let t of e)i.has(t.id)||r.push(t);return r}function Yr(e,t,n,r,i=`after`){if(n===r)return[...e];let a=Jr(t.map(e=>({id:e})),e).map(e=>e.id),o=a.indexOf(n),s=a.indexOf(r);if(o<0||s<0)return[...e];let c=[...a];c.splice(o,1);let l=c.indexOf(r),u=i===`before`?l:l+1;return c.splice(u,0,n),c}function Xr({group:e,expanded:t,previewExpanded:n,isDragging:r,dropIndicatorPosition:i,animateLayout:a,isCreatingConversationFlow:o,activeConversationId:s,onToggleExpanded:c,onDragStart:l,onDragEnd:u,onDragOver:d,onDragLeave:f,onDrop:p,onTogglePreviewExpanded:m,onLaunchFromGroup:h,renderConversationCard:g}){let{t:_}=C(`openhands`),v=(0,Y.useRef)(null),y=`thread-folder-${e.id.replace(/[^a-zA-Z0-9_-]/g,`-`)}`,b=e.id.replace(/[^a-zA-Z0-9_-]/g,`-`),{visibleConversations:x,isPreviewTruncated:S,isShowingAll:T}=zr(e.conversations,{expanded:n,activeConversationId:s});return(0,X.jsxs)(P.section,{ref:v,layout:a?`position`:!1,transition:{type:`spring`,stiffness:600,damping:45},"aria-labelledby":y,"data-testid":`thread-folder-${b}`,onDragOver:d,onDragLeave:f,onDrop:p,className:`relative rounded-md`,children:[i?(0,X.jsx)(`div`,{"aria-hidden":!0,"data-testid":`thread-folder-drop-indicator-${b}`,className:U(`pointer-events-none absolute inset-x-0 z-10 h-0.5 rounded-full bg-[var(--oh-accent)]`,i===`before`?`-top-0.5`:`-bottom-0.5`)}):null,(0,X.jsxs)(`div`,{className:U(r&&`opacity-0`),children:[(0,X.jsxs)(`div`,{className:U(`flex h-8 w-full min-w-0 items-center gap-0.5 rounded-md pl-2 pr-1 text-sm font-normal`,`text-[var(--oh-muted)] transition-colors hover:bg-[var(--oh-surface-raised)] hover:text-white`),children:[(0,X.jsxs)(`button`,{type:`button`,draggable:!0,id:y,"aria-expanded":t,"aria-controls":`thread-folder-content-${b}`,"data-testid":`thread-folder-drag-${b}`,"aria-label":_(t?w.CONVERSATION_PANEL$COLLAPSE_FOLDER:w.CONVERSATION_PANEL$EXPAND_FOLDER,{label:e.label}),onClick:c,onDragStart:t=>{t.stopPropagation();let{dataTransfer:n}=t;if(n){n.effectAllowed=`move`,n.setData(`text/plain`,e.id);let r=v.current;if(r&&typeof n.setDragImage==`function`){let e=r.getBoundingClientRect(),i=r.cloneNode(!0);i.style.position=`fixed`,i.style.top=`0`,i.style.left=`-9999px`,i.style.width=`${e.width}px`,i.style.margin=`0`,i.style.pointerEvents=`none`,i.style.borderRadius=`0.5rem`,i.style.padding=`0.25rem`,i.style.backgroundColor=`var(--oh-surface-raised)`,i.style.boxShadow=`0 8px 24px rgba(0, 0, 0, 0.35)`,document.body.appendChild(i),n.setDragImage(i,t.clientX-e.left,t.clientY-e.top),window.setTimeout(()=>i.remove(),0)}}l()},onDragEnd:e=>{e.stopPropagation(),u()},className:U(`group/folder flex min-h-8 min-w-0 flex-1 cursor-grab items-center gap-2 rounded-md py-1 text-left text-inherit outline-none active:cursor-grabbing`,`focus-visible:ring-1 focus-visible:ring-[var(--oh-border)]`),children:[(0,X.jsx)(ie,{className:U(`h-4 w-4 shrink-0`,t?`hidden group-hover/folder:block`:`block group-hover/folder:hidden`),"aria-hidden":!0}),(0,X.jsx)(I,{className:U(`h-4 w-4 shrink-0`,t?`block group-hover/folder:hidden`:`hidden group-hover/folder:block`),"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`truncate`,children:e.label})]}),(0,X.jsx)(`button`,{type:`button`,className:U(`inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md`,`text-inherit transition-colors`,`hover:bg-white/10 hover:text-white`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--oh-border)]`,`disabled:cursor-not-allowed disabled:opacity-50`),disabled:o,"aria-label":_(w.CONVERSATION_PANEL$ADD_CONVERSATION_TO_GROUP,{label:e.label}),"data-testid":`add-conversation-to-group-${b}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),h()},children:(0,X.jsx)(ue,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0,strokeWidth:2})})]}),t?(0,X.jsxs)(`div`,{id:`thread-folder-content-${b}`,className:`mt-0.5 space-y-0.5`,children:[x.map(g),S?(0,X.jsx)(`div`,{className:`pl-2`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`thread-folder-view-more-${b}`,onClick:m,className:`cursor-pointer text-xs text-[var(--oh-text-dim)] hover:text-white`,children:_(T?w.CONVERSATION_PANEL$LESS:w.CONVERSATION_PANEL$MORE)})}):null]}):null]})]})}function Zr({groups:e,groupIds:t,groupFolderOrder:n,setGroupFolderOrder:r,collapsedGroupIds:i,expandedGroupPreviewIds:a,onToggleGroupCollapsed:o,onToggleGroupPreviewExpanded:s,isCreatingConversationFlow:c,activeConversationId:l,onLaunchFromGroup:u,renderConversationCard:d}){let{t:f}=C(`openhands`),[p,m]=(0,Y.useState)(null),[h,g]=(0,Y.useState)(null),[_,v]=(0,Y.useState)(null),[y,b]=(0,Y.useState)(!1),x=(0,Y.useRef)(null);(0,Y.useEffect)(()=>()=>{x.current&&clearTimeout(x.current)},[]);let S=(0,Y.useCallback)(()=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{b(!1),x.current=null},300)},[]),T=(0,Y.useCallback)(()=>{m(null),g(null),v(null)},[]),E=(0,Y.useCallback)(e=>{let t=e.currentTarget.getBoundingClientRect();return e.clientY<t.top+t.height/2?`before`:`after`},[]),D=(0,Y.useCallback)((e,i)=>{if(!p||p===e){T(),S();return}r(Yr(n,t,p,e,i)),T(),S()},[p,n,t,T,r,S]);return(0,X.jsx)(`nav`,{"aria-label":f(w.SIDEBAR$CONVERSATIONS),className:`space-y-1 md:space-y-0.5 pb-1`,children:e.map(e=>(0,X.jsx)(Xr,{group:e,expanded:!i.has(e.id),previewExpanded:a.has(e.id),isDragging:p===e.id,dropIndicatorPosition:h===e.id&&p!==e.id?_:null,animateLayout:y,isCreatingConversationFlow:c,activeConversationId:l,onToggleExpanded:()=>o(e.id),onDragStart:()=>{b(!0),m(e.id)},onDragEnd:()=>{T(),S()},onDragOver:t=>{t.preventDefault();let{dataTransfer:n}=t;n&&(n.dropEffect=`move`),g(e.id),v(E(t))},onDragLeave:()=>{g(t=>t===e.id?null:t)},onDrop:t=>{t.preventDefault(),D(e.id,E(t))},onTogglePreviewExpanded:()=>s(e.id),onLaunchFromGroup:()=>u(e.launch),renderConversationCard:d},e.id))})}function Qr({pinnedConversations:e,isPreviewExpanded:t,onTogglePreviewExpanded:n,activeConversationId:r,showDivider:i=!1,renderConversationCard:a}){let{t:o}=C(`openhands`),{visibleConversations:s,isPreviewTruncated:c,isShowingAll:l}=zr(e,{limit:5,expanded:t,activeConversationId:r});return(0,X.jsxs)(`section`,{"data-testid":`conversation-panel-pinned-section`,className:U(`pt-1`,i?`mb-2 border-b border-[var(--oh-border-subtle)] pb-2`:`pb-2`),children:[(0,X.jsxs)(`h3`,{className:`flex items-center gap-1.5 py-1.5 pl-2 text-sm font-normal text-[var(--oh-muted)]`,children:[(0,X.jsx)(Dn,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0}),o(w.CONVERSATION_PANEL$PINNED)]}),(0,X.jsx)(`div`,{className:`space-y-0.5`,children:s.map(a)}),c?(0,X.jsx)(`div`,{className:`pl-2 pt-0.5`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`conversation-panel-pinned-view-more`,onClick:n,className:`cursor-pointer text-xs text-[var(--oh-text-dim)] hover:text-white`,children:o(l?w.CONVERSATION_PANEL$LESS:w.CONVERSATION_PANEL$MORE)})}):null]})}var $r={pinsByBackendId:{}};function ei(e,t){return e[t]??[]}var ti=St()(Ct((e,t)=>({...$r,pinConversation:(n,r)=>{let i=ei(t().pinsByBackendId,n);i.includes(r)||e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:[r,...i]}}))},unpinConversation:(n,r)=>{let i=ei(t().pinsByBackendId,n);i.includes(r)&&e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:i.filter(e=>e!==r)}}))},togglePin:(e,n)=>{ei(t().pinsByBackendId,e).includes(n)?t().unpinConversation(e,n):t().pinConversation(e,n)},pruneMissingConversations:(n,r)=>{let i=new Set(r),a=ei(t().pinsByBackendId,n),o=a.filter(e=>i.has(e));o.length!==a.length&&e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:o}}))}}),{name:`pinned-conversations`,storage:wt(()=>localStorage),partialize:e=>({pinsByBackendId:e.pinsByBackendId})})),ni=()=>{},ri=[],ii=3600*1e3,ai=e=>{let t=Date.now()-ii,n=[],r=[];for(let i of e){let e=i.updated_at?Date.parse(i.updated_at):NaN;Number.isFinite(e)&&e<t?r.push(i):n.push(i)}return{recent:n,older:r}};function oi({onClose:e,compact:t=!1}){let{t:n}=C(`openhands`),{conversationId:i,navigate:a}=Ae(),{backend:o}=D(),s=Zt(e??ni),[c,l]=Y.useState(!1),[u,d]=Y.useState(!1),[f,p]=Y.useState(!1),[m,h]=Y.useState(!1),g=Z(e=>e.showOlderConversations),_=Z(e=>e.toggleShowOlderConversations),v=Z(e=>e.showRepoBranchMetadata),y=Z(e=>e.toggleShowRepoBranchMetadata),b=Z(e=>e.showLlmProfiles),x=Z(e=>e.toggleShowLlmProfiles),E=Z(e=>e.showHoverMetadata),O=Z(e=>e.toggleShowHoverMetadata),A=Z(e=>e.organizeMode),j=Z(e=>e.setOrganizeMode),M=Z(e=>e.conversationSort),N=Z(e=>e.setConversationSort),P=Z(e=>e.threadScope),F=Z(e=>e.setThreadScope),I=Z(e=>e.groupFolderOrder),L=Z(e=>e.setGroupFolderOrder),[ee,R]=Y.useState(!1),[z,B]=Y.useState(!1),V=Zt(()=>{R(!1)}),[te,ne]=Y.useState(()=>new Set),[re,ie]=Y.useState(()=>new Set),[ae,oe]=Y.useState(!1),H=ti(e=>e.pinsByBackendId[o.id]??ri),se=ti(e=>e.togglePin),ce=ti(e=>e.pruneMissingConversations),le=Y.useCallback(e=>{ne(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),ue=Y.useCallback(e=>{ie(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);Y.useEffect(()=>{A!==`grouped`&&(ne(new Set),ie(new Set))},[A]);let de=Y.useRef(null),[fe,pe]=Y.useState(null),[me,he]=Y.useState(null),[ge,_e]=Y.useState(null),{data:ve,isLoading:be,isFetched:W,hasNextPage:xe,isFetching:Se,isFetchingNextPage:Ce,fetchNextPage:we}=Xn(),{data:Te}=Zn(),G=Y.useMemo(()=>{let e=ve?.pages.flatMap(e=>e.items)??[],t=new Set;return e.filter(e=>t.has(e.id)?!1:(t.add(e.id),!0))},[ve]),Ee=Y.useMemo(()=>Br(H,G),[G,H]);Y.useEffect(()=>{W&&ce(o.id,G.map(e=>e.id))},[o.id,G,W,ce]),Y.useEffect(()=>{H.length===0&&oe(!1)},[H.length]);let De=Y.useMemo(()=>{let e=P===`relevant`?G.filter(e=>ye(e.execution_status)):G;return t?e:Vr(e,H)},[t,G,H,P]),{recent:K,older:Oe}=Y.useMemo(()=>ai(De),[De]),ke=Y.useMemo(()=>Wr(g?[...K,...Oe]:K,M),[K,Oe,g,M]),je=Y.useMemo(()=>({emptyWorkspace:n(w.CONVERSATION_PANEL$NO_WORKSPACE),emptyRepository:n(w.CONVERSATION_PANEL$NO_REPOSITORY)}),[n]),Me=Y.useMemo(()=>t||A!==`grouped`?null:qr([...K,...g?Oe:[]],o.kind,M,je),[o.kind,t,M,je,Oe,A,K,g]),q=Y.useMemo(()=>Me?Jr(Me,I):null,[Me,I]),Pe=Y.useMemo(()=>Me?.map(e=>e.id)??[],[Me]),Fe=Y.useMemo(()=>Wr(K.filter(e=>ye(e.execution_status)),M),[M,K]),Ie=ke.length,Le=Y.useMemo(()=>q?q.reduce((e,t)=>e+t.conversations.length,0):0,[q]),Re=A===`grouped`&&!t?Le===0:Ie===0,ze=A===`grouped`&&!t?Le:Ie,[Be,Ve]=Y.useState(null),He=Y.useRef(ze);He.current=ze;let Ue=Y.useCallback(()=>{xe&&Ve(He.current)},[xe]);Y.useEffect(()=>{if(Be!==null){if(ze>Be){Ve(null);return}if(!xe){Ve(null);return}Se||Ce||we()}},[Be,ze,xe,Se,Ce,we]);let We=Be!==null||Ce,{mutate:Ge,mutateAsync:Ke}=ct(),{mutate:qe}=lt(),{mutate:Je}=Xt(),Ye=Oe.length>0&&!g,Xe=!!xe&&!Ye&&!t&&!Re,{mutate:Ze}=$t(),Qe=S(),$e=Y.useCallback(e=>{Qe||Ze({workingDir:e.workingDir,repository:e.repository,entryPoint:`sidebar_relaunch_project`},{onSuccess:e=>{a(`/conversations/${e.conversation_id}`)}})},[Ze,Qe,a]),et=Y.useCallback((e,t)=>{l(!0),pe(e),he(t)},[]),tt=Y.useCallback(e=>{d(!0),pe(e)},[]),nt=Y.useCallback((e,t)=>{Je({conversationId:e,newTitle:t},{onSuccess:()=>{k(n(w.CONVERSATION$TITLE_UPDATED))}})},[n,Je]),rt=()=>{fe&&Ge({conversationId:fe},{onSuccess:()=>{fe===i&&a(`/conversations`)}})},it=()=>{fe&&qe({conversationId:fe})},at=async()=>{let e=G.map(e=>e.id),t=await Promise.allSettled(e.map(e=>Ke({conversationId:e}))),n=t.flatMap((t,n)=>t.status===`fulfilled`?[e[n]]:[]),r=t.length-n.length;i!==null&&n.includes(i)&&a(`/conversations`),r>0&&T(`${r} conversation${r===1?``:`s`} could not be deleted.`)},ot=Y.useCallback((n,a)=>{let s=H.includes(n.id);return t?(0,X.jsx)(wr,{conversationId:n.id,title:n.title??``,selectedRepository:{selected_repository:n.selected_repository,selected_branch:n.selected_branch,git_provider:n.git_provider},executionStatus:n.execution_status,sandboxStatus:n.sandbox_status,lastUpdatedAt:n.updated_at,createdAt:n.created_at,workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,isActive:n.id===i,onClose:e,showRepositoryMetadata:v,llmModel:n.llm_model,showLlmProfiles:b,agentKind:n.agent_kind,acpServer:n.acp_server},n.id):(0,X.jsx)(r,{placement:`right-start`,delay:1e3,closeDelay:100,isDisabled:!E||ge===n.id,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,content:(0,X.jsx)(_r,{title:n.title??``,executionStatus:n.execution_status,sandboxStatus:n.sandbox_status,selectedRepository:{selected_repository:n.selected_repository,selected_branch:n.selected_branch,git_provider:n.git_provider},workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,llmModel:n.llm_model,createdAt:n.created_at}),children:(0,X.jsx)(Ne,{to:`/conversations/${n.id}`,onClick:e,className:U(`block rounded-md transition-colors`,ge!==n.id&&`hover:bg-[var(--oh-surface)]`,(n.id===i||ge===n.id)&&`bg-[var(--oh-surface)]`),children:(0,X.jsx)(mr,{onDelete:()=>et(n.id,n.title??``),onStop:()=>tt(n.id),onChangeTitle:e=>nt(n.id,e),title:n.title??``,selectedRepository:{selected_repository:n.selected_repository,selected_branch:n.selected_branch,git_provider:n.git_provider},lastUpdatedAt:n.updated_at,createdAt:n.created_at,executionStatus:n.execution_status,sandboxStatus:n.sandbox_status,conversationId:n.id,contextMenuOpen:ge===n.id,onContextMenuToggle:e=>_e(e?n.id:null),isActive:n.id===i,workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,showRepositoryMetadata:v,llmModel:n.llm_model,showLlmProfiles:b,agentKind:n.agent_kind,acpServer:n.acp_server,isPinned:s,onTogglePin:()=>se(o.id,n.id),alwaysShowPinIcon:s&&!a?.inPinnedSection})})},n.id)},[o.id,t,i,nt,et,tt,e,ge,H,v,b,E,se]),st=be||!W,ut=!t&&!st&&Ee.length>0,dt=W&&!be&&!t&&Re&&!ut&&!Te?.length;return(0,X.jsxs)(`div`,{ref:s,"data-testid":`conversation-panel`,className:`flex h-full min-h-0 w-full flex-col`,children:[!t&&(0,X.jsx)(`div`,{className:U(`-ml-2.5 w-[calc(100%+0.625rem)] max-w-none box-border border-b`,z?`border-[var(--oh-border)]`:`border-transparent`),children:(0,X.jsxs)(`div`,{"data-testid":`older-conversations-summary`,className:`flex min-w-0 flex-nowrap items-center gap-x-2 py-2 pl-4 pr-2.5 text-[var(--oh-muted)]`,children:[(0,X.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-[var(--oh-muted)]`,children:n(w.SIDEBAR$CONVERSATIONS)}),(0,X.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,X.jsx)(Rr,{backendKind:o.kind}),(0,X.jsx)(jr,{filterMenuOpen:ee,setFilterMenuOpen:R,menuRef:V,backendKind:o.kind,organizeMode:A,setOrganizeMode:j,conversationSort:M,setConversationSort:N,threadScope:P,setThreadScope:F,showOlderConversations:g,toggleShowOlderConversations:_,showRepoBranchMetadata:v,toggleShowRepoBranchMetadata:y,showLlmProfiles:b,toggleShowLlmProfiles:x,showHoverMetadata:E,toggleShowHoverMetadata:O,totalConversationsCount:G.length,onRequestDeleteAll:()=>h(!0)})]})]})}),(0,X.jsxs)(`div`,{ref:de,"data-testid":`conversation-panel-list-scroll`,onScroll:e=>{B(e.currentTarget.scrollTop>0)},className:U(`flex min-h-0 flex-1 flex-col overflow-y-auto overflow-x-hidden overscroll-contain custom-scrollbar-always`,!t&&`conversation-panel-list-scroll`),children:[st&&(0,X.jsx)(Cr,{compact:t}),!t&&dt&&(0,X.jsx)(`div`,{"data-testid":`conversation-panel-empty-state`,className:`flex min-h-0 flex-1 flex-col items-center justify-center px-4 py-8`,children:(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:n(w.CONVERSATION$NO_CONVERSATIONS)})}),ut?(0,X.jsx)(Qr,{pinnedConversations:Ee,isPreviewExpanded:ae,onTogglePreviewExpanded:()=>oe(e=>!e),activeConversationId:i,showDivider:!t&&A===`chronological`,renderConversationCard:e=>ot(e,{inPinnedSection:!0})}):null,!t&&Te?.map(t=>(0,X.jsx)(Ne,{to:`/conversations/task-${t.id}`,onClick:e,className:`block`,children:(0,X.jsx)(Sr,{task:t})},t.id)),!st&&t?Fe.map(e=>ot(e)):null,!st&&!t&&A===`grouped`&&q&&q.length>0?(0,X.jsx)(Zr,{groups:q,groupIds:Pe,groupFolderOrder:I,setGroupFolderOrder:L,collapsedGroupIds:te,expandedGroupPreviewIds:re,onToggleGroupCollapsed:le,onToggleGroupPreviewExpanded:ue,isCreatingConversationFlow:Qe,activeConversationId:i,onLaunchFromGroup:$e,renderConversationCard:e=>ot(e)}):null,!st&&!t&&A===`chronological`?(0,X.jsx)(`div`,{className:`space-y-0.5`,children:ke.map(e=>ot(e))}):null,Xe&&(We?(0,X.jsx)(`div`,{className:`py-1`,children:(0,X.jsx)(Cr,{compact:t})}):(0,X.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`load-more-conversations`,onClick:Ue,className:`text-xs text-[var(--oh-muted)] hover:text-white`,children:n(w.CONVERSATION$LOAD_MORE)})}))]}),c&&(0,X.jsx)(Ut,{onConfirm:()=>{rt(),l(!1),he(null)},onCancel:()=>{l(!1),he(null)},conversationTitle:me??void 0}),m&&(0,X.jsx)(Ut,{title:n(w.CONVERSATION$CONFIRM_DELETE_ALL_TITLE),description:n(w.CONVERSATION$CONFIRM_DELETE_ALL_DESC,{count:G.length}),onConfirm:async()=>{await at(),h(!1)},onCancel:()=>h(!1)}),u&&(0,X.jsx)(Ht,{onConfirm:()=>{it(),d(!1)},onCancel:()=>d(!1)}),f&&(0,X.jsx)(Qn,{onConfirm:()=>{e?.()},onClose:()=>p(!1),onCancel:()=>p(!1)})]})}function si({collapsed:e}){return e?null:(0,X.jsx)(`div`,{className:`flex flex-col flex-1 min-h-0`,children:(0,X.jsx)(`div`,{className:`flex min-h-0 w-full flex-1 flex-col`,children:(0,X.jsx)(oi,{})})})}var ci=e=>(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 20 20`,fill:`none`,...e,children:[(0,X.jsx)(`mask`,{id:`mask0_18339_1445`,style:{maskType:`luminance`},maskUnits:`userSpaceOnUse`,x:1,y:1,width:18,height:18,children:(0,X.jsx)(`path`,{d:`M19 1H1V19H19V1Z`,fill:`white`})}),(0,X.jsxs)(`g`,{mask:`url(#mask0_18339_1445)`,children:[(0,X.jsx)(`path`,{d:`M10 18.1818V16.5454`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M10 1.81836V3.45472`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M1.81824 10H3.4546`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M18.1818 10H16.5454`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M5.93359 17.1019L6.74359 15.6782`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M14.0663 2.89844L13.2563 4.32208`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M2.89819 5.93359L4.32183 6.74359`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M17.1019 14.0663L15.6782 13.2563`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M5.92542 2.90625L6.7436 4.3217`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M14.0909 17.0854L13.2727 15.6699`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M17.0855 5.90918L15.67 6.72736`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M2.91455 14.0911L4.33001 13.2729`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M10 16.5455C13.615 16.5455 16.5455 13.615 16.5455 10C16.5455 6.38509 13.615 3.45459 10 3.45459C6.38509 3.45459 3.45459 6.38509 3.45459 10C3.45459 13.615 6.38509 16.5455 10 16.5455Z`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M12.5854 9.77916L8.80545 7.59461C8.63363 7.49643 8.41272 7.61916 8.41272 7.81552V12.1846C8.41272 12.381 8.62545 12.5119 8.80545 12.4055L12.5854 10.221C12.7573 10.1228 12.7573 9.86916 12.5854 9.77098V9.77916Z`,fill:`currentColor`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`})]})]}),$=18,li=34,ui=Math.round(li*30/46);function di({collapsed:e,showCollapseToggle:t,showMobileCloseButton:n=!1,onCloseMobile:r,collapseToggleLabel:i,onCollapse:a,onExpand:o,showCollapsedExpandButton:s,isExtensionsActive:c,currentPath:l,activeBackendHealth:u,collapsedBackendPopoverOpen:d,setCollapsedBackendPopoverOpen:f,collapsedBackendPopoverRef:p,collapsedBackendCloseTimer:m,onOpenAddBackend:h,onOpenManageBackends:g}){let{t:_}=C(`openhands`),y=m;return(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,X.jsxs)(`div`,{className:Le(e),children:[(0,X.jsxs)(`div`,{className:U(e&&t?Re:`flex min-w-0 shrink-0 items-center`),children:[(0,X.jsx)(`div`,{className:U(e&&t&&`flex h-full w-full items-center justify-start pl-2.5 transition-opacity duration-150`,e&&s&&`opacity-0`),children:(0,X.jsx)(Mn,{logoWidth:li,logoHeight:ui,logoClassName:`max-w-none`,className:U(q,`overflow-visible`)})}),e&&t?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-collapse-toggle`,"aria-pressed":e,"aria-label":i,onClick:o,className:U(ze,s?`opacity-100 pointer-events-auto`:`opacity-0 pointer-events-none`),children:(0,X.jsx)(v,{width:14,height:14})}):null]}),!e&&t?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-collapse-toggle`,"aria-pressed":e,"aria-label":i,onClick:a,className:U(`hidden md:inline-flex ml-auto`,Ie,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(N,{width:14,height:14})}):null,!e&&n?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-drawer-close`,onClick:r,"aria-label":_(w.SIDEBAR$CLOSE_MENU),className:U(`inline-flex ml-auto`,Ie,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(N,{width:14,height:14})}):null]}),(0,X.jsxs)(`nav`,{className:Pe(e),children:[(0,X.jsx)(Yn,{collapsed:e}),(0,X.jsx)(He,{to:`/conversations`,end:!0,label:_(w.SIDEBAR$NEW_CHAT),testId:`sidebar-conversations-link`,collapsed:e,icon:(0,X.jsx)(ue,{width:$,height:$})}),(0,X.jsx)(He,{to:`/customize`,label:_(w.NAV$CUSTOMIZE),testId:`sidebar-skills-link`,collapsed:e,forceActive:c,icon:(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:$,height:$,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,X.jsx)(`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`}),(0,X.jsx)(`path`,{d:`m7 16.5-4.74-2.85`}),(0,X.jsx)(`path`,{d:`m7 16.5 5-3`}),(0,X.jsx)(`path`,{d:`M7 16.5v5.17`}),(0,X.jsx)(`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`}),(0,X.jsx)(`path`,{d:`m17 16.5-5-3`}),(0,X.jsx)(`path`,{d:`m17 16.5 4.74-2.85`}),(0,X.jsx)(`path`,{d:`m17 16.5v5.17`}),(0,X.jsx)(`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`}),(0,X.jsx)(`path`,{d:`M12 8 7.26 5.15`}),(0,X.jsx)(`path`,{d:`m12 8 4.74-2.85`}),(0,X.jsx)(`path`,{d:`M12 13.5V8`})]})}),(0,X.jsx)(He,{to:`/automations`,label:_(w.SIDEBAR$AUTOMATIONS),testId:`sidebar-automations-link`,collapsed:e,icon:(0,X.jsx)(ci,{width:$,height:$})})]}),(0,X.jsx)(si,{collapsed:e}),e&&t?(0,X.jsxs)(`nav`,{className:U(Pe(e),`mt-auto pb-2 cursor-pointer`),children:[(0,X.jsx)(Ue,{content:_(w.SIDEBAR$SETTINGS),placement:`right`,children:(0,X.jsxs)(Ne,{to:`/settings`,"data-testid":`collapsed-settings-link`,"aria-label":_(w.SIDEBAR$SETTINGS),className:Fe({collapsed:!0}),children:[(0,X.jsx)(Ve,{active:l.startsWith(`/settings`),children:(0,X.jsx)(pe,{width:$,height:$})}),(0,X.jsx)(`span`,{className:Be(!0),children:_(w.SIDEBAR$SETTINGS)})]})}),(0,X.jsxs)(`div`,{className:`relative`,ref:p,onMouseEnter:()=>{y.current&&=(clearTimeout(y.current),null),f(!0)},onMouseLeave:()=>{y.current=setTimeout(()=>f(!1),150)},children:[(0,X.jsxs)(`button`,{type:`button`,"data-testid":`collapsed-backend-selector-link`,"aria-label":_(w.BACKEND$MANAGE),"aria-expanded":d,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>e.stopPropagation(),className:U(Fe({collapsed:!0}),`relative`),children:[(0,X.jsx)(Ve,{active:d,children:(0,X.jsxs)(`span`,{className:`relative inline-flex size-[18px] shrink-0 items-center justify-center`,children:[(0,X.jsx)(Et,{isConnected:u?.isConnected??null,className:`absolute -left-0.5 -top-0.5 z-[1] pointer-events-none`}),(0,X.jsx)(On,{width:$,height:$})]})}),(0,X.jsx)(`span`,{className:Be(!0),children:_(w.BACKEND$MANAGE)})]}),d?(0,X.jsx)(`div`,{className:`absolute bottom-[-4px] left-full pl-2.5 z-40 w-[272px]`,onClick:e=>e.stopPropagation(),children:(0,X.jsx)(Kn,{sidebarCollapsed:e,hideTrigger:!0,defaultOpen:!0,openUpward:!0,onSelectOption:()=>f(!1),onOpenAddBackend:h,onOpenManageBackends:g})}):null]})]}):null,e?null:(0,X.jsx)(`div`,{className:U(`flex flex-col items-stretch max-w-none box-border shrink-0`,`-ml-2.5 w-[calc(100%+0.625rem)] border-t border-[var(--oh-border)] pt-2 px-2.5`),children:(0,X.jsx)(Kn,{sidebarCollapsed:e,openUpward:!0})})]})}var fi=Y.lazy(()=>n(()=>import(`./settings-modal-BVX2G_IT.js`).then(e=>({default:e.SettingsModal})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38]))),pi=Y.lazy(()=>n(()=>import(`./add-backend-modal-5chsfln3.js`).then(e=>e.n).then(e=>({default:e.AddBackendModal})),__vite__mapDeps([39,1,2,40,6,7,18,9,19,3,4,11,5,8,10,12,13,14,15,16,41,26,21,27,31,29,42,32,43,44,45,46,47,30]))),mi=Y.lazy(()=>n(()=>import(`./manage-backends-modal-Bon32JYr.js`).then(e=>e.n).then(e=>({default:e.ManageBackendsModal})),__vite__mapDeps([48,1,2,6,7,18,9,19,49,10,50,51,52,3,4,12,8,13,14,40,11,5,15,16,41,26,21,27,31,29,42,32,43,44,45,46,47,30,53,54]))),hi=250;function gi(){let{t:e}=C(`openhands`),{currentPath:t}=Ae(),{data:n}=ke(),{data:r,error:i,isError:a,isFetching:o}=pn(),{backends:s,active:c}=O(),l=K(s)[c.backend.id],u=me(e=>e.collapsed),d=me(e=>e.setCollapsed),[f,p]=Y.useState(!1),[m,h]=Y.useState(!1),g=Y.useRef(null),[_,v]=Y.useState(!1),[y,b]=Y.useState(!1),[x,S]=Y.useState(!1),E=Y.useRef(!1),[,D]=Y.useReducer(e=>e+1,0),{isOpen:k,close:A}=Kt(),[j,M]=Y.useState(!1),[N,P]=Y.useState(!1),F=Zt(()=>h(!1)),I=mn(i);Y.useEffect(()=>{A()},[t,A]),Y.useEffect(()=>{if(k){M(!0);let e=requestAnimationFrame(()=>{P(!0)});return()=>cancelAnimationFrame(e)}P(!1);let e=window.setTimeout(()=>{M(!1)},hi);return()=>window.clearTimeout(e)},[k]),Y.useEffect(()=>{if(!k)return;let e=e=>{e.key===`Escape`&&A()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[k,A]),Y.useEffect(()=>{t===`/settings`?p(!1):!o&&a&&I!==404?T(e(w.SETTINGS$FETCH_ERROR)):I===404&&!n?.feature_flags?.hide_llm_settings&&p(!0)},[t,o,a,I,n?.feature_flags?.hide_llm_settings,e]);let L=e(u?w.SIDEBAR$EXPAND:w.SIDEBAR$COLLAPSE),ee=Y.useCallback(e=>{if(!u)return;let t=e.target;t instanceof HTMLElement&&(t.closest(`a,button,input,textarea,select,[role='button'],[role='link']`)||d(!1))},[u,d]),R={collapseToggleLabel:L,onCollapse:Y.useCallback(()=>{S(!1),E.current=!0,D(),d(!0),window.setTimeout(()=>{E.current=!1,D()},250)},[d]),onExpand:()=>d(!1),showCollapsedExpandButton:u&&x&&!E.current,isExtensionsActive:t===`/customize`||t.startsWith(`/skills`)||t===`/plugins`||t===`/mcp`,currentPath:t,activeBackendHealth:l,collapsedBackendPopoverOpen:m,setCollapsedBackendPopoverOpen:h,collapsedBackendPopoverRef:F,collapsedBackendCloseTimer:g,onOpenAddBackend:()=>v(!0),onOpenManageBackends:()=>b(!0)};return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`aside`,{"aria-label":e(w.SIDEBAR$NAVIGATION_LABEL),"data-collapsed":u?`true`:`false`,onClick:ee,onMouseEnter:()=>{u&&S(!0)},onMouseLeave:()=>{S(!1)},className:U(`max-md:hidden flex bg-base flex-col min-h-0 transition-[width,min-width] duration-200`,`md:border-r md:border-[var(--oh-border)] md:h-full`,u?`md:w-[60px] md:min-w-[60px] md:px-2.5`:`md:w-[300px] md:min-w-[300px] pb-2 md:pl-2.5 md:pr-0`,t===`/`&&`md:pb-3`),children:(0,X.jsx)(di,{collapsed:u,showCollapseToggle:!0,...R})}),j?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{className:U(`fixed inset-0 z-40 bg-black/50 md:hidden`,`transition-opacity ease-in-out motion-reduce:transition-none`,N?`opacity-100`:`pointer-events-none opacity-0`),style:{transitionDuration:`${hi}ms`},onClick:A,"aria-hidden":!N}),(0,X.jsx)(`aside`,{"aria-label":e(w.SIDEBAR$NAVIGATION_LABEL),"data-testid":`sidebar-mobile-drawer`,"aria-hidden":!N,className:U(`fixed inset-y-0 left-0 z-50 flex min-h-0 w-[min(300px,85vw)] flex-col bg-base`,`border-r border-[var(--oh-border)] pb-2 pl-2.5 pr-0 md:hidden`,`transition-transform ease-in-out motion-reduce:transition-none`,N?`translate-x-0`:`-translate-x-full`),style:{transitionDuration:`${hi}ms`},children:(0,X.jsx)(di,{collapsed:!1,showCollapseToggle:!1,showMobileCloseButton:!0,onCloseMobile:A,...R})})]}):null,f&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(fi,{settings:r,onClose:()=>p(!1)})}),_&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(pi,{onClose:()=>v(!1)})}),y&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(mi,{onClose:()=>b(!1)})})]})}var _i=`/settings`,vi=`/customize`,yi=[`/skills`,`/mcp`,`/plugins`];function bi(e){return e===_i?{mode:`menu`}:e.startsWith(`${_i}/`)&&e.length>9?{mode:`back`,backTo:_i,backLabelKey:w.SETTINGS$TITLE}:e===vi?{mode:`menu`}:yi.some(t=>e===t||e.startsWith(`${t}/`))?{mode:`back`,backTo:vi,backLabelKey:w.NAV$CUSTOMIZE}:{mode:`menu`}}function xi(){let{t:e}=C(`openhands`),{currentPath:t,navigate:n}=Ae(),r=bi(t);return(0,X.jsxs)(`header`,{className:`flex md:hidden h-12 shrink-0 items-center gap-2 px-2.5`,"aria-label":e(w.SIDEBAR$NAVIGATION_LABEL),children:[(0,X.jsx)(Yt,{}),r.mode===`back`&&r.backTo?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-back-button`,onClick:()=>n(r.backTo),"aria-label":e(r.backLabelKey??w.COMMON$BACK),className:qt,children:(0,X.jsx)(N,{size:20,className:Wt,"aria-hidden":!0,strokeWidth:2})}):null]})}function Si(){let{backend:e}=D(),t=e.kind===`local`,{data:n}=Qt(),{mutate:r,isPending:i}=he(),a=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{a.current=null},[e.id]),(0,Y.useEffect)(()=>{if(!t||i||!n)return;let{profiles:e,active_profile:o}=n,s=o!=null&&e.some(e=>e.name===o);if(e.length===0||s){a.current=null;return}let c=e.find(e=>e.api_key_set)??e[0];a.current!==c.name&&(a.current=c.name,r(c.name))},[t,n,i,r])}var Ci=()=>{let{backend:e}=D(),{data:t}=pn(),{mutate:n,isPending:r}=gn(`personal`,{retry:2}),i=Y.useSyncExternalStore(Te,G,()=>null),a=Y.useRef(null);Y.useEffect(()=>{if(t!==void 0){if(i!==null){if((t.user_consents_to_analytics===!0?`granted`:t.user_consents_to_analytics===!1?`denied`:null)===i){a.current=null,e.kind===`cloud`&&Ee(i);return}let o=`${e.id}:${i}`;if(r||a.current===o)return;a.current=o,n({user_consents_to_analytics:i===`granted`});return}we(t.user_consents_to_analytics===!0?`granted`:`denied`,{syncToCloud:!1})}},[e.id,e.kind,r,i,n,t])};function wi(){let{backend:e}=D(),t=Y.useSyncExternalStore(Te,Ce,()=>`pending`),n=Y.useRef(null);Y.useEffect(()=>{if(e.kind!==`local`||t===`pending`)return;let r=`${e.id}:${e.host}:${e.apiKey??``}:${t}`;n.current!==r&&(n.current=r,kt.syncTelemetryConsent(t).catch(()=>{}))},[e.apiKey,e.host,e.id,e.kind,t])}var Ti=()=>{let{backend:e,orgId:t}=D(),{data:n}=pn(),r=bt(),i=e.kind===`cloud`?r[e.id]:void 0,a=i?.isLoading??!0,o=i?.userId??null,s=n?.email||n?.git_user_email||void 0;Y.useEffect(()=>{if(e.kind!==`cloud`){De(null);return}if(!a){if(!o){De(null);return}De({userId:o,email:s,orgId:t})}},[e.kind,s,a,t,o])};function Ei(e){switch(e){case W.RUNNING:return`🟢`;case W.FINISHED:case W.IDLE:case W.WAITING_FOR_CONFIRMATION:return`✅`;case W.PAUSED:return`⚪`;case W.ERROR:case W.STUCK:return`🔴`;default:return null}}var Di=`OpenHands`,Oi=()=>{let{conversationId:e}=f(),{data:t}=_n(e??null),n=vn(e=>e.execution_status),r=t?.title,i=e&&r?`${r} | ${Di}`:Di;if(!e)return i;let a=Ei(n??t?.execution_status??null);return a?`${a} ${i}`:i};function ki({children:e}){let{pathname:t}=g(),n=u(),r=d(),i=h(),a=Y.useMemo(()=>{for(let e=i.length-1;e>=0;--e){let t=i[e]?.params?.conversationId;if(t)return t}return null},[i]);return(0,X.jsx)(je,{value:Y.useMemo(()=>({currentPath:t,conversationId:a,isNavigating:!!r.location,navigate:(e,t)=>n(e,t)}),[t,a,r.location,n]),children:e})}var Ai=Y.lazy(()=>n(()=>import(`./environment-switch-overlay-XRWCClLu.js`),__vite__mapDeps([55,1,2,3,4,56]))),ji=Y.lazy(()=>n(()=>import(`./alert-banner-CLfWuIAX.js`).then(e=>({default:e.AlertBanner})),__vite__mapDeps([57,1,2,58,3,4,59,60,13,14,32,61,62,23]))),Mi=Y.lazy(()=>n(()=>import(`./command-menu-tUsn23zy.js`).then(e=>({default:e.CommandMenu})),__vite__mapDeps([63,1,2,10,64,65,66,67,68,69,70,3,4,13,14,32]))),Ni=p(function(){let e=c(),{t}=C(`openhands`);return s(e)?(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h1`,{children:e.status}),(0,X.jsx)(`p`,{children:e.statusText}),(0,X.jsx)(`pre`,{children:e.data instanceof Object?JSON.stringify(e.data):e.data})]}):e instanceof Error?(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h1`,{children:t(w.ERROR$GENERIC)}),(0,X.jsx)(`pre`,{children:e.message})]}):(0,X.jsx)(`div`,{children:(0,X.jsx)(`h1`,{children:t(w.ERROR$UNKNOWN)})})}),Pi=l(function(){let e=g(),t=Oi(),{data:n}=pn(),r=ke();if(wi(),Ci(),Ti(),Si(),Y.useEffect(()=>{n?.language&&E.changeLanguage(n.language)},[n?.language]),r.isLoading)return(0,X.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-base`,children:(0,X.jsx)(Oe,{size:`large`})});let i=/^\/conversations\/[^/]+/.test(e.pathname),a=ne(e.search);return(0,X.jsx)(ki,{children:(0,X.jsxs)(Bt,{children:[(0,X.jsxs)(`div`,{"data-testid":`root-layout`,className:`h-screen lg:min-w-5xl flex flex-col md:flex-row bg-base overflow-hidden p-0`,children:[(0,X.jsx)(`title`,{children:t}),(0,X.jsx)(gi,{}),(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-col w-full min-w-0 h-full gap-3`,children:[i?null:(0,X.jsx)(xi,{}),r.data&&(r.data.maintenance_start_time||r.data.faulty_models&&r.data.faulty_models.length>0||r.data.error_message)&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(ji,{maintenanceStartTime:r.data.maintenance_start_time,faultyModels:r.data.faulty_models,errorMessage:r.data.error_message,updatedAt:r.data.updated_at})}),(0,X.jsx)(`div`,{id:`root-outlet`,className:`relative flex-1 overflow-auto px-0 custom-scrollbar`,children:(0,X.jsx)(m,{})})]})]}),(0,X.jsxs)(Y.Suspense,{fallback:null,children:[(0,X.jsx)(Ai,{}),(0,X.jsx)(Mi,{})]}),a?(0,X.jsx)(H,{}):null]})})});export{Ni as ErrorBoundary,Pi as default};
@@ -1 +1 @@
1
- import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./useTranslation-Cbf5AGg_.js";import{t as n}from"./declaration-BGsHjPEW.js";import{t as r}from"./utils-DB9LsAzA.js";import{t as i}from"./loading-spinner-BcdnT0mN.js";import{r as a}from"./typography-CzfoD9DY.js";var o=e();function s({testId:e=`runtime-waiting`,messageKey:s=n.DIFF_VIEWER$WAITING_FOR_RUNTIME,className:c}){let{t:l}=t(`openhands`);return(0,o.jsxs)(`div`,{"data-testid":e,className:r(`flex h-full w-full flex-col items-center justify-center gap-3 py-8 text-center`,c),children:[(0,o.jsx)(i,{size:`small`}),(0,o.jsx)(a.Text,{className:`text-sm text-[var(--oh-muted)]`,children:l(s)})]})}export{s as t};
1
+ import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./useTranslation-CHm_6BRr.js";import{t as n}from"./declaration-_yumYLEx.js";import{t as r}from"./utils-CrRpzbM2.js";import{t as i}from"./loading-spinner-BCInDEXB.js";import{r as a}from"./typography-BBVEW0un.js";var o=e();function s({testId:e=`runtime-waiting`,messageKey:s=n.DIFF_VIEWER$WAITING_FOR_RUNTIME,className:c}){let{t:l}=t(`openhands`);return(0,o.jsxs)(`div`,{"data-testid":e,className:r(`flex h-full w-full flex-col items-center justify-center gap-3 py-8 text-center`,c),children:[(0,o.jsx)(i,{size:`small`}),(0,o.jsx)(a.Text,{className:`text-sm text-[var(--oh-muted)]`,children:l(s)})]})}export{s as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useQuery-D5pEZbY0.js";import{t as i}from"./useTranslation-Cbf5AGg_.js";import{n as a}from"./active-backend-context-B8rMv0X9.js";import{t as o}from"./utils-DB9LsAzA.js";import{S as s}from"./agent-server-compatibility-BWN-EIQn.js";import{h as c,l}from"./form-control-classes-CbdN5aO3.js";import{n as u,t as d}from"./settings-input-BsgQWS5R.js";import{t as f}from"./settings-service.api-DXk5TdeJ.js";import{i as p}from"./llm-subscription-DtsX5Lhg.js";import{t as m}from"./use-is-authed-BezEyfeh.js";import{f as h,g,h as _,m as v,p as y}from"./sdk-settings-schema-CLR01YIK.js";import{t as b}from"./settings-dropdown-input-Dhx9ErGd.js";import{r as x}from"./typography-CzfoD9DY.js";import{t as S}from"./settings-switch-Bes8dIlV.js";var C=e(t(),1),w=`llm`;function T(e){if(!e?.sections)return e;let t=!1,n=e.sections.map(e=>{if(e.key!==w)return e;let n=new Set(e.fields.map(e=>e.key)),r=p.filter(e=>!n.has(e.key));return r.length===0?e:(t=!0,{...e,fields:[...e.fields,...r]})});return t?{...e,sections:n}:e}var E=(e,t)=>{let{data:n}=m(),{backend:i,orgId:o}=a(),c=!s(i),{data:l,error:u,isLoading:d,isFetching:p}=r({queryKey:[`settings-schema`,e,i.id,o,i.kind,i.host,i.apiKey],queryFn:e===`conversation`?f.getConversationSettingsSchema:f.getSettingsSchema,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,enabled:!t&&!!n&&c,meta:{disableToast:!0}}),h=(0,C.useMemo)(()=>e===`agent`?T(t):t,[t,e]),g=(0,C.useMemo)(()=>e===`agent`?T(l):l,[l,e]);return t?{data:h,error:null,isLoading:!1,isFetching:!1}:{data:g,error:u,isLoading:d,isFetching:p}},D=e=>E(`agent`,e),O=e=>E(`conversation`,e),k=n(),A={"llm.api_key":{textKey:`SCHEMA$LLM$API_KEY$HELP_TEXT`,linkTextKey:`SCHEMA$LLM$API_KEY$HELP_LINK_TEXT`,href:`https://docs.openhands.dev/usage/local-setup#getting-an-api-key`},"verification.critic_api_key":{textKey:`SCHEMA$VERIFICATION$CRITIC_API_KEY$HELP_TEXT`,linkTextKey:`SETTINGS$NAV_API_KEYS`,suffixKey:`SCHEMA$VERIFICATION$CRITIC_API_KEY$HELP_SUFFIX`,href:`https://app.all-hands.dev/settings/api-keys`,hideDescription:!0}};function j({field:e}){let{t}=i(`openhands`),n=A[e.key],r=v(t,e.key,e.description);return(0,k.jsxs)(k.Fragment,{children:[r&&!n?.hideDescription?(0,k.jsx)(x.Paragraph,{className:`text-tertiary-alt text-xs leading-5`,children:r}):null,n?(0,k.jsx)(g,{testId:`help-link-${e.key}`,text:t(n.textKey),linkText:t(n.linkTextKey),href:n.href,suffix:n.suffixKey?` ${t(n.suffixKey)}`:void 0,size:`settings`,linkColor:`white`}):null]})}var M=new Set([`verification.critic_api_key`]);function N(e){return e.choices.length>0}function P(e){return e.value_type===`boolean`&&!N(e)}function F(e){return e.value_type===`array`||e.value_type===`object`}function I(e){return e.key.endsWith(`url`)||e.key.endsWith(`_url`)}function L(e){return e.secret?`password`:e.value_type===`integer`||e.value_type===`number`?`number`:e.value_type===`string`&&I(e)?`url`:`text`}function R({field:e,value:t,isDisabled:n,onChange:r}){let{t:a}=i(`openhands`),s=_(a,e.key,e.label),f=h(e.key);return P(e)?(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(S,{testId:`sdk-settings-${e.key}`,isToggled:!!t,isDisabled:n,onToggle:r,children:s}),(0,k.jsx)(`div`,{className:c,children:(0,k.jsx)(j,{field:e})})]}):N(e)?(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(b,{testId:`sdk-settings-${e.key}`,name:e.key,label:s,items:e.choices.map(t=>({key:String(t.value),label:y(a,e.key,t.value,t.label)})),selectedKey:t===``?void 0:String(t),isClearable:!e.required,required:e.required,showOptionalTag:!e.required,isDisabled:n,onSelectionChange:e=>r(String(e??``))}),(0,k.jsx)(j,{field:e})]}):F(e)?(0,k.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`text-sm`,children:s}),e.required?null:(0,k.jsx)(u,{})]}),(0,k.jsx)(`textarea`,{"data-testid":`sdk-settings-${e.key}`,name:e.key,value:String(t??``),required:e.required,disabled:n,onChange:e=>r(e.target.value),className:o(l,`min-h-32 font-mono placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)}),(0,k.jsx)(j,{field:e})]}):(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(d,{testId:`sdk-settings-${e.key}`,name:e.key,label:s,type:L(e),value:String(t??``),required:e.required,showOptionalTag:!e.required,isDisabled:n,onChange:r,className:`w-full`,min:f?.min,max:f?.max,step:f?.step}),(0,k.jsx)(j,{field:e})]})}export{O as i,R as n,D as r,M as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useQuery-D5pEZbY0.js";import{t as i}from"./useTranslation-CHm_6BRr.js";import{n as a}from"./active-backend-context-Cd1qcZsb.js";import{t as o}from"./utils-CrRpzbM2.js";import{w as s}from"./agent-server-compatibility-DMY0CihN.js";import{h as c,l}from"./form-control-classes-BPUnoYyg.js";import{n as u,t as d}from"./settings-input-ZoaAPNQh.js";import{t as f}from"./settings-service.api-BY7ncxIz.js";import{i as p}from"./llm-subscription-Bvu8BLXc.js";import{t as m}from"./use-is-authed-BSeo4coy.js";import{f as h,g,h as _,m as v,p as y}from"./sdk-settings-schema-B42JFr5Y.js";import{t as b}from"./settings-dropdown-input-B6RL_mt0.js";import{r as x}from"./typography-BBVEW0un.js";import{t as S}from"./settings-switch-DUlGnP0B.js";var C=e(t(),1),w=`llm`;function T(e){if(!e?.sections)return e;let t=!1,n=e.sections.map(e=>{if(e.key!==w)return e;let n=new Set(e.fields.map(e=>e.key)),r=p.filter(e=>!n.has(e.key));return r.length===0?e:(t=!0,{...e,fields:[...e.fields,...r]})});return t?{...e,sections:n}:e}var E=(e,t)=>{let{data:n}=m(),{backend:i,orgId:o}=a(),c=!s(i),{data:l,error:u,isLoading:d,isFetching:p}=r({queryKey:[`settings-schema`,e,i.id,o,i.kind,i.host,i.apiKey],queryFn:e===`conversation`?f.getConversationSettingsSchema:f.getSettingsSchema,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,enabled:!t&&!!n&&c,meta:{disableToast:!0}}),h=(0,C.useMemo)(()=>e===`agent`?T(t):t,[t,e]),g=(0,C.useMemo)(()=>e===`agent`?T(l):l,[l,e]);return t?{data:h,error:null,isLoading:!1,isFetching:!1}:{data:g,error:u,isLoading:d,isFetching:p}},D=e=>E(`agent`,e),O=e=>E(`conversation`,e),k=n(),A={"llm.api_key":{textKey:`SCHEMA$LLM$API_KEY$HELP_TEXT`,linkTextKey:`SCHEMA$LLM$API_KEY$HELP_LINK_TEXT`,href:`https://docs.openhands.dev/usage/local-setup#getting-an-api-key`},"verification.critic_api_key":{textKey:`SCHEMA$VERIFICATION$CRITIC_API_KEY$HELP_TEXT`,linkTextKey:`SETTINGS$NAV_API_KEYS`,suffixKey:`SCHEMA$VERIFICATION$CRITIC_API_KEY$HELP_SUFFIX`,href:`https://app.all-hands.dev/settings/api-keys`,hideDescription:!0}};function j({field:e}){let{t}=i(`openhands`),n=A[e.key],r=v(t,e.key,e.description);return(0,k.jsxs)(k.Fragment,{children:[r&&!n?.hideDescription?(0,k.jsx)(x.Paragraph,{className:`text-tertiary-alt text-xs leading-5`,children:r}):null,n?(0,k.jsx)(g,{testId:`help-link-${e.key}`,text:t(n.textKey),linkText:t(n.linkTextKey),href:n.href,suffix:n.suffixKey?` ${t(n.suffixKey)}`:void 0,size:`settings`,linkColor:`white`}):null]})}var M=new Set([`verification.critic_api_key`]);function N(e){return e.choices.length>0}function P(e){return e.value_type===`boolean`&&!N(e)}function F(e){return e.value_type===`array`||e.value_type===`object`}function I(e){return e.key.endsWith(`url`)||e.key.endsWith(`_url`)}function L(e){return e.secret?`password`:e.value_type===`integer`||e.value_type===`number`?`number`:e.value_type===`string`&&I(e)?`url`:`text`}function R({field:e,value:t,isDisabled:n,onChange:r}){let{t:a}=i(`openhands`),s=_(a,e.key,e.label),f=h(e.key);return P(e)?(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(S,{testId:`sdk-settings-${e.key}`,isToggled:!!t,isDisabled:n,onToggle:r,children:s}),(0,k.jsx)(`div`,{className:c,children:(0,k.jsx)(j,{field:e})})]}):N(e)?(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(b,{testId:`sdk-settings-${e.key}`,name:e.key,label:s,items:e.choices.map(t=>({key:String(t.value),label:y(a,e.key,t.value,t.label)})),selectedKey:t===``?void 0:String(t),isClearable:!e.required,required:e.required,showOptionalTag:!e.required,isDisabled:n,onSelectionChange:e=>r(String(e??``))}),(0,k.jsx)(j,{field:e})]}):F(e)?(0,k.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsx)(`span`,{className:`text-sm`,children:s}),e.required?null:(0,k.jsx)(u,{})]}),(0,k.jsx)(`textarea`,{"data-testid":`sdk-settings-${e.key}`,name:e.key,value:String(t??``),required:e.required,disabled:n,onChange:e=>r(e.target.value),className:o(l,`min-h-32 font-mono placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)}),(0,k.jsx)(j,{field:e})]}):(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(d,{testId:`sdk-settings-${e.key}`,name:e.key,label:s,type:L(e),value:String(t??``),required:e.required,showOptionalTag:!e.required,isDisabled:n,onChange:r,className:`w-full`,min:f?.min,max:f?.max,step:f?.step}),(0,k.jsx)(j,{field:e})]})}export{O as i,R as n,D as r,M as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{o as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js";import{t as i}from"./useTranslation-CHm_6BRr.js";import{t as a}from"./declaration-_yumYLEx.js";import{C as o,D as s,w as ee}from"./active-backend-context-Cd1qcZsb.js";import{t as c}from"./utils-CrRpzbM2.js";import{_ as l}from"./form-control-classes-BPUnoYyg.js";import{t as te}from"./brand-button-BulEFHr3.js";import{r as ne}from"./use-settings-B9XEmh7i.js";import{t as re}from"./use-save-settings-BMsb2wk_.js";import{c as ie,l as ae,n as oe,o as u,r as d,s as f,t as se,u as ce}from"./sdk-settings-schema-B42JFr5Y.js";import{i as p,n as le,r as ue,t as de}from"./schema-field-B9-9Ta9u.js";import{n as m,t as h}from"./switch-skeleton-BjPRx1QD.js";import{o as fe}from"./extension-module-card-classes-BpebKiN6.js";var g=e(t(),1),_=n();function v(){return(0,_.jsx)(`div`,{className:`w-[250px] h-[20px] skeleton`})}function y(){return(0,_.jsxs)(`div`,{"data-testid":`app-settings-skeleton`,className:`px-11 py-9 flex flex-col gap-6`,children:[(0,_.jsx)(h,{}),(0,_.jsx)(m,{}),(0,_.jsx)(m,{}),(0,_.jsx)(m,{}),(0,_.jsx)(v,{}),(0,_.jsx)(h,{}),(0,_.jsx)(h,{}),(0,_.jsx)(m,{})]})}var b=(e,t)=>c(`w-fit px-2 py-2 text-sm cursor-pointer rounded-none bg-transparent`,l,`border-b-2 pb-2`,e?`text-white border-white`:`text-[var(--oh-muted)] border-transparent hover:text-white`,t&&`pointer-events-none opacity-30 cursor-not-allowed`);function pe({view:e,setView:t,showAdvanced:n,showAll:r,isDisabled:o=!1}){let{t:s}=i(`openhands`);return!n&&!r?null:(0,_.jsxs)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:`mb-6 flex items-center gap-2`,children:[(0,_.jsx)(`button`,{"data-testid":`sdk-section-basic-toggle`,type:`button`,role:`tab`,"aria-selected":e===`basic`,disabled:o,className:b(e===`basic`,o),onClick:()=>t(`basic`),children:s(a.SETTINGS$BASIC)}),n?(0,_.jsx)(`button`,{"data-testid":`sdk-section-advanced-toggle`,type:`button`,role:`tab`,"aria-selected":e===`advanced`,disabled:o,className:b(e===`advanced`,o),onClick:()=>t(`advanced`),children:s(a.SETTINGS$ADVANCED)}):null,r?(0,_.jsx)(`button`,{"data-testid":`sdk-section-all-toggle`,type:`button`,role:`tab`,"aria-selected":e===`all`,disabled:o,className:b(e===`all`,o),onClick:()=>t(`all`),children:s(a.SETTINGS$ALL)}):null]})}var me=new Set,x={basic:0,advanced:1,all:2},he=(e,t)=>x[t]<x[e]?t:e,ge=(e,t)=>x[t]>x[e]?t:e,_e=(e,{showAdvanced:t,showAll:n})=>e===`all`?n?`all`:t?`advanced`:`basic`:e===`advanced`?t?`advanced`:n?`all`:`basic`:`basic`,ve={agent_settings:`agent_settings_diff`,conversation_settings:`conversation_settings_diff`},ye=(e,t)=>e instanceof r?e.response?.status===401?`${t} This agent server requires X-Session-API-Key. Set VITE_SESSION_API_KEY in the frontend to the same value used by the backend SESSION_API_KEY or OH_SESSION_API_KEYS_0.`:e.response?.status===404?`${t} This backend does not expose /api/settings/* schema endpoints. Upgrade to a recent openhands-agent-server release.`:t:t;function S({settingsSources:e,scope:t=`personal`,header:n,extraDirty:r=!1,buildPayload:c,onSaveSuccess:l,getInitialView:m,forceShowAdvancedView:h=!1,allowAllView:v=!0,initialValueOverrides:b,embedded:x=!1,hideSaveButton:S=!1,suppressSuccessToast:be=!1,onSaveControlChange:C,testId:xe=`sdk-section-settings-screen`}){let{t:w}=i(`openhands`),{mutate:Se,isPending:T}=re(t),{data:E,isLoading:Ce,isFetching:D}=ne(t),O=ue(E?.agent_settings_schema),k=p(E?.conversation_settings_schema),A=g.useMemo(()=>JSON.stringify(e.map(e=>({source:e.settingsSource,sectionKeys:e.sectionKeys,excludeKeys:e.excludeKeys?Array.from(e.excludeKeys).sort():null}))),[e]),j=g.useMemo(()=>JSON.parse(A).map(e=>({settingsSource:e.source,sectionKeys:e.sectionKeys,excludeKeys:e.excludeKeys?new Set(e.excludeKeys):void 0})),[A]),M=g.useCallback(e=>e===`conversation_settings`?k.data:O.data,[O.data,k.data]),we=j.some(e=>e.settingsSource===`conversation_settings`?k.isLoading:O.isLoading),N=g.useMemo(()=>j.map(e=>{let t=M(e.settingsSource);if(!ce(t))return{...e,filteredSchema:null};let n=new Set(e.sectionKeys),r={...t,sections:t.sections.filter(e=>n.has(e.key))};return{...e,filteredSchema:r}}),[j,M]),P=h||N.some(e=>f(e.filteredSchema)),F=v&&N.some(e=>ie(e.filteredSchema)),Te=g.useMemo(()=>ye(j.reduce((e,t)=>e??(t.settingsSource===`conversation_settings`?k.error:O.error),null),w(a.SETTINGS$SDK_SCHEMA_UNAVAILABLE)),[j,O.error,k.error,w]),Ee=g.useMemo(()=>b?JSON.stringify(b):``,[b]),[I,L]=g.useState(`basic`),[R,z]=g.useState({}),[B,V]=g.useState({}),H=g.useRef(!1),U=g.useMemo(()=>{if(!E)return null;let e={};for(let t of N){if(!t.filteredSchema)return null;e[t.settingsSource]={...e[t.settingsSource]??{},...se(E,t.filteredSchema,t.settingsSource)}}if(b){let t=N[0]?.settingsSource;t&&e[t]&&(e[t]={...e[t],...b})}return e},[E,N,Ee]),W=g.useMemo(()=>{if(!E)return null;let e=null;for(let t of N){if(!t.filteredSchema)return null;let n=m?m(E,t.filteredSchema):ae(E,t.filteredSchema,t.settingsSource);e=e?ge(e,n):n}return e?_e(e,{showAdvanced:P,showAll:F}):null},[E,N,m,P,F]);g.useEffect(()=>{H.current=!1,L(`basic`),z({}),V({})},[t,A]),g.useEffect(()=>{if(!(!U||!W)){if(z(U),b){let e=N[0]?.settingsSource;if(e){let t=Object.fromEntries(Object.keys(b).map(e=>[e,!0]));V({[e]:t})}else V({})}else V({});L(e=>H.current?he(e,W):(H.current=!0,W))}},[U,W]);let G=g.useMemo(()=>{let e=new Map;for(let t of N)if(t.filteredSchema)for(let n of t.filteredSchema.sections)for(let r of n.fields)e.has(r.key)||e.set(r.key,t.settingsSource);return e},[N]),K=g.useMemo(()=>{let e={};for(let t of N)Object.assign(e,R[t.settingsSource]??{});return e},[N,R]),q=g.useMemo(()=>{let e={};for(let t of N)Object.assign(e,B[t.settingsSource]??{});return e},[N,B]),J=g.useCallback((e,t)=>{let n=G.get(e);n&&(z(r=>({...r,[n]:{...r[n]??{},[e]:t}})),V(t=>({...t,[n]:{...t[n]??{},[e]:!0}})))},[G]),De=g.useCallback(e=>{o(s(e)||w(a.ERROR$GENERIC))},[w]),Y=g.useRef(()=>{}),Oe=g.useCallback(()=>{Y.current()},[]),X=g.useRef(()=>({})),ke=g.useCallback(()=>X.current(),[]),Z=()=>{if(N.some(e=>!e.filteredSchema))return;let e;try{let t={};for(let e of N){let n=e.filteredSchema,r=d(n,R[e.settingsSource]??{},B[e.settingsSource]??{},I);if(Object.keys(r).length>0){let n=ve[e.settingsSource];t[n]={...t[n]??{},...r}}}e=c?c(t,{values:K,dirty:q,view:I}):t}catch(e){o(e instanceof Error?e.message:w(a.ERROR$GENERIC));return}Object.keys(e).length!==0&&Se(e,{onError:De,onSuccess:()=>{be||ee(w(a.SETTINGS$SAVED_WARNING)),V({}),l?.()}})};Y.current=Z,X.current=()=>{let e={};for(let t of N){if(!t.filteredSchema)continue;let n=R[t.settingsSource]??{},r=B[t.settingsSource]??{};Object.assign(e,oe(t.filteredSchema,n,r))}return e};let Q=Object.keys(q).length>0,$=Q||r;return g.useEffect(()=>{C&&C({save:Oe,isSaving:T,isDirty:$,values:K,view:I,getDirtyPayload:ke})},[T,$,K,I]),(Ce||D)&&!E||we?(0,_.jsx)(y,{}):N.some(e=>e.filteredSchema&&e.filteredSchema.sections.length>0)?Object.keys(K).length===0?(0,_.jsx)(y,{}):(0,_.jsxs)(`div`,{"data-testid":xe,className:x?`relative flex min-h-0 w-full flex-1 flex-col`:`relative w-full min-h-0`,children:[(0,_.jsx)(pe,{view:I,setView:L,showAdvanced:P,showAll:F,isDisabled:!1}),(0,_.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[n?.({values:K,isDisabled:!1,view:I,onChange:J}),N.map(e=>{if(!e.filteredSchema)return null;let t=R[e.settingsSource]??{};return u(e.filteredSchema,{...K,...t},I,e.excludeKeys??me).map(n=>(0,_.jsx)(`section`,{className:`flex flex-col gap-4`,children:(0,_.jsx)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:n.fields.map(e=>(0,_.jsx)(`div`,{className:de.has(e.key)?`xl:col-span-2`:void 0,children:(0,_.jsx)(le,{field:e,value:t[e.key],isDisabled:!1,onChange:t=>J(e.key,t)})},e.key))})},`${e.settingsSource}:${n.key}`))}),S?null:(0,_.jsx)(`div`,{className:`flex justify-start pt-2`,children:(0,_.jsx)(te,{testId:`save-button`,type:`button`,variant:`primary`,isDisabled:T||!Q&&!r,onClick:Z,children:w(T?a.SETTINGS$SAVING:a.SETTINGS$SAVE_CHANGES)})})]})]}):(0,_.jsx)(`div`,{"data-testid":`sdk-schema-unavailable`,className:fe,children:(0,_.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:Te})})}export{S as t};
@@ -1 +1 @@
1
- import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./utils-DB9LsAzA.js";import{t as n}from"./dist-CodhvuAP.js";import{a as r,n as i}from"./llm-subscription-DtsX5Lhg.js";var a=e(),o=n(``,{variants:{size:{default:`text-xs`,settings:`text-sm text-[var(--oh-muted)] font-normal leading-5.5`},linkColor:{default:``,white:`text-white`}},defaultVariants:{size:`default`,linkColor:`default`}});function s({testId:e,text:n,linkText:r,href:i,suffix:s,size:c,linkColor:l,className:u,linkTextClassName:d,suffixClassName:f}){return(0,a.jsxs)(`p`,{"data-testid":e,className:t(o({size:c}),u),children:[n,` `,(0,a.jsx)(`a`,{href:i,rel:`noreferrer noopener`,target:`_blank`,className:t(`underline underline-offset-2`,o({size:c,linkColor:l}),d),children:r}),s&&(0,a.jsx)(`span`,{className:f,children:s})]})}function c(e,t){return`SCHEMA$${e.replace(/\./g,`$`).toUpperCase()}$${t}`}var l=e=>!!e?.includes(`$`),u={tool_concurrency_limit:{constraints:{min:1,step:1}},"llm.top_p":{constraints:{min:0,max:1,step:.01}},"llm.temperature":{constraints:{min:0,max:2,step:.1}}};function d(e){return u[e]?.constraints}function f(e,t,n,r){if(l(r))return e(r);let i=c(t,n);return e(i,{defaultValue:``})||(r&&console.warn(`[i18n] Missing translation for key "${i}", falling back to: "${r}"`),r??null)}function p(e,t,n){return f(e,t,`LABEL`,n)??``}function m(e,t,n){return f(e,t,`DESCRIPTION`,n)}function h(e,t,n,r){if(l(r))return e(r);let i=`SCHEMA$${t.replace(/\./g,`$`).toUpperCase()}$CHOICE$${String(n).toUpperCase()}`;return e(i,{defaultValue:``})||(console.warn(`[i18n] Missing translation for key "${i}", falling back to: "${r}"`),r)}var g=new Set([`llm.model`,`llm.api_key`,`llm.base_url`,i,r]),_={basic:new Set([`critical`]),advanced:new Set([`critical`,`major`]),all:new Set([`critical`,`major`,`minor`])};function v(e){return!!e&&Array.isArray(e.sections)}function y(e){return v(e)?e.sections.flatMap(e=>e.fields):[]}function b(e,t){if(!e)return;let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r}function x(e,t,n){let r=t.split(`.`),i=e;for(let e=0;e<r.length-1;e+=1){let t=r[e];(i[t]==null||typeof i[t]!=`object`||Array.isArray(i[t]))&&(i[t]={}),i=i[t]}i[r[r.length-1]]=n}function S(e,t,n=`agent_settings`){return b(e[n],t)??null}function C(e,t){return S(e,t,`agent_settings`)}function w(e){return e.choices.length>0}function T(e){return e.prominence===`critical`}function E(e){return e.prominence===`minor`}function D(e,t){let n=t??e.default;return w(e)?n==null?``:String(n):e.value_type===`boolean`?!!(n??!1):n==null?``:e.value_type===`array`||e.value_type===`object`?JSON.stringify(n,null,2):String(n)}function O(e,t){if(t===void 0)return null;if(e.value_type===`boolean`){if(typeof t==`string`){if(t===`true`)return!0;if(t===`false`)return!1}return t===null?null:!!t}if(e.value_type===`integer`||e.value_type===`number`){if(t===``||t===null)return null;let e=typeof t==`number`?t:Number(String(t));return Number.isNaN(e)?null:e}if(e.value_type===`array`||e.value_type===`object`){if(t===null||e.value_type===`object`&&typeof t==`object`&&!Array.isArray(t)&&Object.keys(t).length===0)return null;if(typeof t==`string`){let n=t.trim();if(!n)return null;try{let t=JSON.parse(n);return e.value_type===`object`&&typeof t==`object`&&t&&!Array.isArray(t)&&Object.keys(t).length===0?null:JSON.stringify(t)}catch{return n}}return JSON.stringify(t)}return t===null?null:String(t)}function k(e,t,n=`agent_settings`){let r=t??(n===`conversation_settings`?e.conversation_settings_schema:e.agent_settings_schema);return r?Object.fromEntries(y(r).map(t=>[t.key,D(t,S(e,t.key,n))])):{}}function A(e,t,n=`agent_settings`){let r=t??(n===`conversation_settings`?e.conversation_settings_schema:e.agent_settings_schema);if(!r)return`basic`;let i=!1,a=!1;for(let t of y(r))T(t)||O(t,S(e,t.key,n)??t.default??null)!==O(t,t.default??null)&&(E(t)?i=!0:a=!0);return i?`all`:a?`advanced`:`basic`}function j(e,t){return e.depends_on.every(e=>t[e]===!0)}function M(e){if(typeof e==`boolean`)return e;let t=e.trim().toLowerCase();if(!t)return null;if(t===`true`)return!0;if(t===`false`)return!1;throw Error(`Expected a boolean value, received: ${e}`)}function N(e,t){if(e.value_type===`boolean`)return M(t);if(e.value_type===`integer`||e.value_type===`number`){let n=String(t).trim();if(!n)return null;let r=Number(n);if(Number.isNaN(r))throw Error(`Expected a numeric value, received: ${n}`);if(e.value_type===`integer`&&!Number.isInteger(r))throw Error(`Expected an integer value, received: ${n}`);let i=d(e.key);if(i?.min!=null&&r<i.min)throw Error(`${e.label} must be at least ${i.min}`);if(i?.max!=null&&r>i.max)throw Error(`${e.label} must be at most ${i.max}`);return r}if(e.value_type===`array`||e.value_type===`object`){let n=String(t).trim();if(!n)return null;let r;try{r=JSON.parse(n)}catch{throw Error(`Invalid JSON for ${e.label}`)}if(e.value_type===`array`){if(!Array.isArray(r))throw Error(`${e.label} must be a JSON array`);return r}if(r===null||Array.isArray(r)||typeof r!=`object`)throw Error(`${e.label} must be a JSON object`);return r}let n=String(t);return n===``&&!e.secret?null:n}function P(e,t,n){let r={};for(let i of y(e))n[i.key]&&x(r,i.key,N(i,t[i.key]));return r}function F(e,t){return _[t].has(e.prominence)}function I(e,t,n,r){let i=P(e,t,n);for(let t of y(e))F(t,r)||x(i,t.key,t.default??null);return i}function L(e,t,n,r=g){return v(e)?e.sections.map(e=>({...e,fields:e.fields.filter(e=>!r.has(e.key)&&F(e,n)&&j(e,t))})).filter(e=>e.fields.length>0):[]}function R(e){return e?y(e).some(e=>e.prominence===`major`):!1}function z(e){return e?y(e).some(e=>e.prominence===`minor`):!1}export{C as a,z as c,D as d,d as f,s as g,p as h,N as i,A as l,m,P as n,L as o,h as p,I as r,R as s,k as t,v as u};
1
+ import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./utils-CrRpzbM2.js";import{t as n}from"./dist-D9PhjOaq.js";import{a as r,n as i}from"./llm-subscription-Bvu8BLXc.js";var a=e(),o=n(``,{variants:{size:{default:`text-xs`,settings:`text-sm text-[var(--oh-muted)] font-normal leading-5.5`},linkColor:{default:``,white:`text-white`}},defaultVariants:{size:`default`,linkColor:`default`}});function s({testId:e,text:n,linkText:r,href:i,suffix:s,size:c,linkColor:l,className:u,linkTextClassName:d,suffixClassName:f}){return(0,a.jsxs)(`p`,{"data-testid":e,className:t(o({size:c}),u),children:[n,` `,(0,a.jsx)(`a`,{href:i,rel:`noreferrer noopener`,target:`_blank`,className:t(`underline underline-offset-2`,o({size:c,linkColor:l}),d),children:r}),s&&(0,a.jsx)(`span`,{className:f,children:s})]})}function c(e,t){return`SCHEMA$${e.replace(/\./g,`$`).toUpperCase()}$${t}`}var l=e=>!!e?.includes(`$`),u={tool_concurrency_limit:{constraints:{min:1,step:1}},"llm.top_p":{constraints:{min:0,max:1,step:.01}},"llm.temperature":{constraints:{min:0,max:2,step:.1}}};function d(e){return u[e]?.constraints}function f(e,t,n,r){if(l(r))return e(r);let i=c(t,n);return e(i,{defaultValue:``})||(r&&console.warn(`[i18n] Missing translation for key "${i}", falling back to: "${r}"`),r??null)}function p(e,t,n){return f(e,t,`LABEL`,n)??``}function m(e,t,n){return f(e,t,`DESCRIPTION`,n)}function h(e,t,n,r){if(l(r))return e(r);let i=`SCHEMA$${t.replace(/\./g,`$`).toUpperCase()}$CHOICE$${String(n).toUpperCase()}`;return e(i,{defaultValue:``})||(console.warn(`[i18n] Missing translation for key "${i}", falling back to: "${r}"`),r)}var g=new Set([`llm.model`,`llm.api_key`,`llm.base_url`,i,r]),_={basic:new Set([`critical`]),advanced:new Set([`critical`,`major`]),all:new Set([`critical`,`major`,`minor`])};function v(e){return!!e&&Array.isArray(e.sections)}function y(e){return v(e)?e.sections.flatMap(e=>e.fields):[]}function b(e,t){if(!e)return;let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r}function x(e,t,n){let r=t.split(`.`),i=e;for(let e=0;e<r.length-1;e+=1){let t=r[e];(i[t]==null||typeof i[t]!=`object`||Array.isArray(i[t]))&&(i[t]={}),i=i[t]}i[r[r.length-1]]=n}function S(e,t,n=`agent_settings`){return b(e[n],t)??null}function C(e,t){return S(e,t,`agent_settings`)}function w(e){return e.choices.length>0}function T(e){return e.prominence===`critical`}function E(e){return e.prominence===`minor`}function D(e,t){let n=t??e.default;return w(e)?n==null?``:String(n):e.value_type===`boolean`?!!(n??!1):n==null?``:e.value_type===`array`||e.value_type===`object`?JSON.stringify(n,null,2):String(n)}function O(e,t){if(t===void 0)return null;if(e.value_type===`boolean`){if(typeof t==`string`){if(t===`true`)return!0;if(t===`false`)return!1}return t===null?null:!!t}if(e.value_type===`integer`||e.value_type===`number`){if(t===``||t===null)return null;let e=typeof t==`number`?t:Number(String(t));return Number.isNaN(e)?null:e}if(e.value_type===`array`||e.value_type===`object`){if(t===null||e.value_type===`object`&&typeof t==`object`&&!Array.isArray(t)&&Object.keys(t).length===0)return null;if(typeof t==`string`){let n=t.trim();if(!n)return null;try{let t=JSON.parse(n);return e.value_type===`object`&&typeof t==`object`&&t&&!Array.isArray(t)&&Object.keys(t).length===0?null:JSON.stringify(t)}catch{return n}}return JSON.stringify(t)}return t===null?null:String(t)}function k(e,t,n=`agent_settings`){let r=t??(n===`conversation_settings`?e.conversation_settings_schema:e.agent_settings_schema);return r?Object.fromEntries(y(r).map(t=>[t.key,D(t,S(e,t.key,n))])):{}}function A(e,t,n=`agent_settings`){let r=t??(n===`conversation_settings`?e.conversation_settings_schema:e.agent_settings_schema);if(!r)return`basic`;let i=!1,a=!1;for(let t of y(r))T(t)||O(t,S(e,t.key,n)??t.default??null)!==O(t,t.default??null)&&(E(t)?i=!0:a=!0);return i?`all`:a?`advanced`:`basic`}function j(e,t){return e.depends_on.every(e=>t[e]===!0)}function M(e){if(typeof e==`boolean`)return e;let t=e.trim().toLowerCase();if(!t)return null;if(t===`true`)return!0;if(t===`false`)return!1;throw Error(`Expected a boolean value, received: ${e}`)}function N(e,t){if(e.value_type===`boolean`)return M(t);if(e.value_type===`integer`||e.value_type===`number`){let n=String(t).trim();if(!n)return null;let r=Number(n);if(Number.isNaN(r))throw Error(`Expected a numeric value, received: ${n}`);if(e.value_type===`integer`&&!Number.isInteger(r))throw Error(`Expected an integer value, received: ${n}`);let i=d(e.key);if(i?.min!=null&&r<i.min)throw Error(`${e.label} must be at least ${i.min}`);if(i?.max!=null&&r>i.max)throw Error(`${e.label} must be at most ${i.max}`);return r}if(e.value_type===`array`||e.value_type===`object`){let n=String(t).trim();if(!n)return null;let r;try{r=JSON.parse(n)}catch{throw Error(`Invalid JSON for ${e.label}`)}if(e.value_type===`array`){if(!Array.isArray(r))throw Error(`${e.label} must be a JSON array`);return r}if(r===null||Array.isArray(r)||typeof r!=`object`)throw Error(`${e.label} must be a JSON object`);return r}let n=String(t);return n===``&&!e.secret?null:n}function P(e,t,n){let r={};for(let i of y(e))n[i.key]&&x(r,i.key,N(i,t[i.key]));return r}function F(e,t){return _[t].has(e.prominence)}function I(e,t,n,r){let i=P(e,t,n);for(let t of y(e))F(t,r)||x(i,t.key,t.default??null);return i}function L(e,t,n,r=g){return v(e)?e.sections.map(e=>({...e,fields:e.fields.filter(e=>!r.has(e.key)&&F(e,n)&&j(e,t))})).filter(e=>e.fields.length>0):[]}function R(e){return e?y(e).some(e=>e.prominence===`major`):!1}function z(e){return e?y(e).some(e=>e.prominence===`minor`):!1}export{C as a,z as c,D as d,d as f,s as g,p as h,N as i,A as l,m,P as n,L as o,h as p,I as r,R as s,k as t,v as u};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-BFRubm34.js";import{_ as t,c as n,d as r}from"./agent-server-compatibility-BWN-EIQn.js";import{d as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{t as a}from"./proxy-B3tCGf0X.js";var o=100;function s(){let e=t().backend;if(e.kind!==`cloud`)throw Error(`Cloud secrets call requires a cloud backend.`);return e}async function c(){let e=s(),t=[],n=null;do{let r=new URLSearchParams({limit:String(o)});n&&r.set(`page_id`,n);let i=await a({backend:e,method:`GET`,path:`/api/v1/secrets/search?${r.toString()}`});t.push(...i.items??[]),n=i.next_page_id}while(n);return t}async function l(e,t,n){await a({backend:s(),method:`POST`,path:`/api/v1/secrets`,body:{name:e,value:t,description:n}})}async function u(e,t,n){await a({backend:s(),method:`PUT`,path:`/api/v1/secrets/${encodeURIComponent(e)}`,body:{name:t,description:n}})}async function d(e){await a({backend:s(),method:`DELETE`,path:`/api/v1/secrets/${encodeURIComponent(e)}`})}var f=e({SecretsService:()=>m});async function p(e,t=3,n=500){for(let r=0;r<t;r+=1)try{return await e()}catch(e){if(r>=t-1)throw e;let i=n*2**r;await new Promise(e=>{setTimeout(e,i)})}throw Error(`Retry attempts exhausted`)}var m=class{static async getSecrets(){try{return t().backend.kind===`cloud`?await p(()=>c()):(await p(()=>new i(r()).listSecrets())).secrets.map(e=>({name:e.name,description:e.description}))}catch(e){return console.error(`Failed to fetch secrets after retries:`,e),[]}}static async createSecret(e,n,a){if(t().backend.kind===`cloud`){await p(()=>l(e,n,a));return}await p(()=>new i(r()).upsertSecret({name:e,value:n,description:a}))}static async updateSecret(e,n,r){if(t().backend.kind===`cloud`){await p(()=>u(e,n,r));return}await this.createSecret(e,n,r)}static async deleteSecret(e){try{if(t().backend.kind===`cloud`){await p(()=>d(e));return}await p(()=>new i(r()).deleteSecret(e))}catch(e){if(n(e,404)||e&&typeof e==`object`&&`response`in e&&e.response?.status===404)return;throw e}}};export{f as n,m as t};
1
+ import{r as e}from"./rolldown-runtime-BFRubm34.js";import{p as t,u as n,y as r}from"./agent-server-compatibility-DMY0CihN.js";import{d as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js";import{t as a}from"./proxy-DnnDqkwn.js";var o=100;function s(){let e=r().backend;if(e.kind!==`cloud`)throw Error(`Cloud secrets call requires a cloud backend.`);return e}async function c(){let e=s(),t=[],n=null;do{let r=new URLSearchParams({limit:String(o)});n&&r.set(`page_id`,n);let i=await a({backend:e,method:`GET`,path:`/api/v1/secrets/search?${r.toString()}`});t.push(...i.items??[]),n=i.next_page_id}while(n);return t}async function l(e,t,n){await a({backend:s(),method:`POST`,path:`/api/v1/secrets`,body:{name:e,value:t,description:n}})}async function u(e,t,n){await a({backend:s(),method:`PUT`,path:`/api/v1/secrets/${encodeURIComponent(e)}`,body:{name:t,description:n}})}async function d(e){await a({backend:s(),method:`DELETE`,path:`/api/v1/secrets/${encodeURIComponent(e)}`})}var f=e({SecretsService:()=>m});async function p(e,t=3,n=500){for(let r=0;r<t;r+=1)try{return await e()}catch(e){if(r>=t-1)throw e;let i=n*2**r;await new Promise(e=>{setTimeout(e,i)})}throw Error(`Retry attempts exhausted`)}var m=class{static async getSecrets(){try{return r().backend.kind===`cloud`?await p(()=>c()):(await p(()=>new i(t()).listSecrets())).secrets.map(e=>({name:e.name,description:e.description}))}catch(e){return console.error(`Failed to fetch secrets after retries:`,e),[]}}static async createSecret(e,n,a){if(r().backend.kind===`cloud`){await p(()=>l(e,n,a));return}await p(()=>new i(t()).upsertSecret({name:e,value:n,description:a}))}static async updateSecret(e,n,a){if(r().backend.kind===`cloud`){await p(()=>u(e,n,a));return}let o=new i(t()),s=await p(()=>o.getSecret(e));await p(()=>o.upsertSecret({name:n,value:s,description:a})),n!==e&&await this.deleteSecret(e)}static async deleteSecret(e){try{if(r().backend.kind===`cloud`){await p(()=>d(e));return}await p(()=>new i(t()).deleteSecret(e))}catch(e){if(n(e,404)||e&&typeof e==`object`&&`response`in e&&e.response?.status===404)return;throw e}}};export{f as n,m as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as a}from"./useMutation-u8UgRgDK.js";import{t as o}from"./useTranslation-CHm_6BRr.js";import{t as s}from"./declaration-_yumYLEx.js";import{t as c}from"./back-nav-button-CaKvsD1E.js";import{t as l}from"./pencil-DmSqWUA3.js";import{t as u}from"./trash-2-CF3hilrY.js";import{t as d}from"./utils-CrRpzbM2.js";import{t as f}from"./loading-spinner-BCInDEXB.js";import{f as p,l as m}from"./form-control-classes-BPUnoYyg.js";import{t as h}from"./brand-button-BulEFHr3.js";import{n as g,t as _}from"./settings-input-ZoaAPNQh.js";import{t as v}from"./confirmation-modal-108xng7X.js";import{r as y}from"./typography-BBVEW0un.js";import"./extension-module-card-classes-BpebKiN6.js";import{a as b,c as x,i as S,l as C,o as w,r as T,s as E}from"./settings-list-classes-Dr8LgITi.js";import{t as D}from"./secrets-service-DvyS6-mV.js";import{n as O,t as k}from"./use-create-secret-CB7Dvd4s.js";var A=e(t(),1),j=()=>a({mutationFn:e=>D.deleteSecret(e)}),M=()=>a({mutationFn:({secretToEdit:e,name:t,description:n})=>D.updateSecret(e,t,n)}),N=n();function P({mode:e,selectedSecret:t,onCancel:n}){let r=i(),{t:a}=o(`openhands`),{data:c}=O(),{mutate:l}=k(),{mutate:u}=M(),[f,v]=A.useState(null),y=e===`edit`&&t&&c?.find(e=>e.name===t)?.description?.trim()||``,b=()=>{r.invalidateQueries({queryKey:[`secrets-search`]}),r.invalidateQueries({queryKey:[`secrets`]})},x=(e,t,r)=>{l({name:e,value:t,description:r},{onSettled:n,onSuccess:b})},S=(e,t,r)=>{u({secretToEdit:e,name:t,description:r},{onSettled:n,onSuccess:b})};return(0,N.jsxs)(`form`,{"data-testid":e===`add`?`add-secret-form`:`edit-secret-form`,onSubmit:n=>{n.preventDefault();let r=new FormData(n.currentTarget),i=r.get(`secret-name`)?.toString(),o=r.get(`secret-value`)?.toString().trim(),l=r.get(`secret-description`)?.toString();if(i){if(v(null),c?.some(e=>e.name===i&&e.name!==t)){v(a(s.SECRETS$SECRET_ALREADY_EXISTS));return}if(e===`add`){if(!o){v(a(s.SECRETS$SECRET_VALUE_REQUIRED));return}x(i,o,l||void 0)}else e===`edit`&&t&&S(t,i,l||void 0)}},className:`flex flex-col items-start gap-6`,children:[(0,N.jsx)(_,{testId:`name-input`,name:`secret-name`,type:`text`,label:a(s.SETTINGS$NAME),className:`w-full min-w-0`,required:!0,defaultValue:e===`edit`&&t?t:``,placeholder:a(s.SECRETS$API_KEY_EXAMPLE),pattern:`^[a-zA-Z][a-zA-Z0-9_]{0,63}$`,title:a(s.SETTINGS$SECRET_NAME_PATTERN_TITLE)}),f&&(0,N.jsx)(`p`,{className:`text-red-500 text-sm`,children:f}),e===`add`&&(0,N.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,N.jsx)(`span`,{className:`text-sm`,children:a(s.FORM$VALUE)}),(0,N.jsx)(`textarea`,{"data-testid":`value-input`,name:`secret-value`,required:!0,className:d(`resize-none`,m,`placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)] disabled:cursor-not-allowed`),rows:8})]}),(0,N.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`span`,{className:`text-sm`,children:a(s.FORM$DESCRIPTION)}),(0,N.jsx)(g,{})]}),(0,N.jsx)(`input`,{"data-testid":`description-input`,name:`secret-description`,defaultValue:y,className:d(p,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,N.jsx)(h,{testId:`cancel-button`,type:`button`,variant:`secondary`,onClick:n,children:a(s.BUTTON$CANCEL)}),(0,N.jsxs)(h,{testId:`submit-button`,type:`submit`,variant:`primary`,children:[e===`add`&&a(s.SECRETS$ADD_SECRET),e===`edit`&&a(s.SECRETS$EDIT_SECRET)]})]})]})}function F(){return(0,N.jsxs)(`div`,{className:d(S,`justify-between border-t border-[var(--oh-border)] first:border-t-0`),children:[(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-4`,children:[(0,N.jsx)(`span`,{className:`skeleton h-4 w-1/4`}),(0,N.jsx)(`span`,{className:`skeleton h-4 w-1/2`})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,N.jsx)(`span`,{className:`skeleton h-4 w-4`}),(0,N.jsx)(`span`,{className:`skeleton h-4 w-4`})]})]})}function I({title:e,description:t,onEdit:n,onDelete:r}){return(0,N.jsxs)(`tr`,{"data-testid":`secret-item`,className:C,children:[(0,N.jsx)(`td`,{className:d(w,`text-content-2 truncate`),title:e,children:e}),(0,N.jsx)(`td`,{className:d(w,`truncate text-content-2 opacity-80`),title:t||``,children:t||``}),(0,N.jsx)(`td`,{className:w,children:(0,N.jsxs)(`div`,{className:`flex items-center justify-end gap-0.5`,children:[(0,N.jsx)(`button`,{"data-testid":`edit-secret-button`,type:`button`,onClick:n,"aria-label":`Edit ${e}`,className:T,children:(0,N.jsx)(l,{"aria-hidden":!0,className:`size-4`,strokeWidth:2})}),(0,N.jsx)(`button`,{"data-testid":`delete-secret-button`,type:`button`,onClick:r,"aria-label":`Delete ${e}`,className:T,children:(0,N.jsx)(u,{"aria-hidden":!0,className:`size-4`,strokeWidth:2})})]})})]})}var L={hideTitle:!0};function R(){let e=i(),{t}=o(`openhands`),n=(0,A.useRef)(null),{data:r,isLoading:a,hasNextPage:l,isFetchingNextPage:u,onLoadMore:p}=O(),{mutate:m}=j(),[g,_]=A.useState(`list`),[S,C]=A.useState(null),[w,T]=A.useState(!1),D=(0,A.useCallback)(e=>{let t=e.currentTarget;t.scrollHeight-t.scrollTop<=t.clientHeight+100&&l&&!u&&p()},[l,u,p]),k=()=>{e.invalidateQueries({queryKey:[`secrets-search`]}),e.invalidateQueries({queryKey:[`secrets`]})},M=e=>{m(e,{onSettled:()=>{T(!1)},onSuccess:k,onError:k})},L=()=>{S&&M(S)},R=()=>{T(!1)},z=()=>{_(`list`),C(null)},B=g===`add-secret-form`||g===`edit-secret-form`,V=t(g===`add-secret-form`?s.SECRETS$ADD_A_SECRET:s.SECRETS$EDIT_A_SECRET);return(0,N.jsxs)(`div`,{"data-testid":`secrets-settings-screen`,className:`flex flex-col gap-6`,children:[g===`list`?(0,N.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,N.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,N.jsx)(y.H2,{children:t(s.SETTINGS$NAV_SECRETS)}),(0,N.jsx)(`p`,{"data-testid":`settings-page-subtitle`,className:`text-sm leading-5 text-tertiary-light`,children:t(s.SETTINGS$PAGE_SECRETS_SUBLINE)})]}),(0,N.jsx)(h,{testId:`add-secret-button`,type:`button`,variant:`primary`,className:`shrink-0 whitespace-nowrap`,onClick:()=>_(`add-secret-form`),isDisabled:a,children:t(s.SECRETS$ADD_NEW_SECRET)})]}):null,B?(0,N.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,N.jsx)(c,{testId:`back-to-secrets`,onClick:z,children:t(s.BUTTON$BACK)}),(0,N.jsx)(y.H2,{testId:`secret-editor-title`,children:V})]}):null,a&&g===`list`&&(0,N.jsxs)(`ul`,{children:[(0,N.jsx)(F,{}),(0,N.jsx)(F,{}),(0,N.jsx)(F,{})]}),g===`list`&&!a&&r?.length===0&&(0,N.jsx)(`div`,{"data-testid":`secrets-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,N.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:t(s.SECRETS$EMPTY)})}),g===`list`&&!a&&(r?.length??0)>0&&(0,N.jsxs)(`div`,{ref:n,className:b,onScroll:D,children:[(0,N.jsxs)(`table`,{className:`w-full min-w-full table-fixed`,children:[(0,N.jsx)(`thead`,{className:E,children:(0,N.jsxs)(`tr`,{children:[(0,N.jsx)(`th`,{className:d(x,`w-1/4`),children:t(s.SETTINGS$NAME)}),(0,N.jsx)(`th`,{className:d(x,`w-1/2`),children:t(s.SECRETS$DESCRIPTION)}),(0,N.jsx)(`th`,{className:d(x,`w-1/4 text-right`),children:t(s.SETTINGS$ACTIONS)})]})}),(0,N.jsx)(`tbody`,{children:r?.map(e=>(0,N.jsx)(I,{title:e.name,description:e.description,onEdit:()=>{_(`edit-secret-form`),C(e.name)},onDelete:()=>{T(!0),C(e.name)}},e.name))})]}),u&&(0,N.jsx)(`div`,{className:`flex justify-center p-4`,children:(0,N.jsx)(f,{size:`small`})})]}),(g===`add-secret-form`||g===`edit-secret-form`)&&(0,N.jsx)(P,{mode:g===`add-secret-form`?`add`:`edit`,selectedSecret:S,onCancel:z}),w&&(0,N.jsx)(v,{text:t(s.SECRETS$CONFIRM_DELETE_KEY),onConfirm:L,onCancel:R})]})}var z=r(R);export{z as default,L as handle};
@@ -1 +1 @@
1
- import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./utils-DB9LsAzA.js";var n=e();function r({value:e,options:r,onChange:i,ariaLabel:a,testId:o}){return(0,n.jsx)(`div`,{role:`radiogroup`,"aria-label":a,"data-testid":o,className:`inline-flex items-center rounded-md bg-[var(--oh-surface-raised)] p-0.5 text-xs`,children:r.map(r=>{let a=r.value===e;return(0,n.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":a,"data-testid":o?`${o}-option-${r.value}`:void 0,onClick:()=>i(r.value),className:t(`px-2 py-0.5 rounded cursor-pointer transition-colors`,a?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:text-white`),children:r.label},r.value)})})}export{r as t};
1
+ import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./utils-CrRpzbM2.js";var n=e();function r({value:e,options:r,onChange:i,ariaLabel:a,testId:o}){return(0,n.jsx)(`div`,{role:`radiogroup`,"aria-label":a,"data-testid":o,className:`inline-flex items-center rounded-md bg-[var(--oh-surface-raised)] p-0.5 text-xs`,children:r.map(r=>{let a=r.value===e;return(0,n.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":a,"data-testid":o?`${o}-option-${r.value}`:void 0,onClick:()=>i(r.value),className:t(`px-2 py-0.5 rounded cursor-pointer transition-colors`,a?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:text-white`),children:r.label},r.value)})})}export{r as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{E as r,L as i,c as a,j as o,k as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{t as c}from"./useTranslation-CHm_6BRr.js";import{t as l}from"./declaration-_yumYLEx.js";import{a as u,f as d,g as f,i as p,p as m,s as h}from"./active-backend-context-Cd1qcZsb.js";import{a as g,i as _,n as v,r as y,t as b}from"./use-settings-nav-items-BGfBS0yL.js";import{t as x}from"./utils-CrRpzbM2.js";import{y as S}from"./agent-server-compatibility-DMY0CihN.js";import{n as C}from"./use-config-D9zUVw5b.js";import"./navigation-link-DoJzTCEz.js";import"./sidebar-layout-BhGooCga.js";import{t as w}from"./sidebar-nav-link-DkA1XWV8.js";import{n as T}from"./use-agent-profiles-BSWVN6hH.js";import"./close-BjSA0HWT.js";import{n as E}from"./use-settings-B9XEmh7i.js";import{r as D}from"./typography-BBVEW0un.js";import{t as O}from"./settings-section-header-context-CGgHZXrf.js";import"./settings-gear-BOwF59Bs.js";import{n as k,r as A}from"./settings-utils-kWEEvcdv.js";import{t as j}from"./use-breakpoint-B-O0lQ84.js";import{t as M}from"./backend-synced-settings-badge-BellMmgC.js";import{t as N}from"./settings-like-page-layout-classes-Cdl6jOe5.js";var P=e(t(),1),F=n();function I({navigationItems:e}){let{t}=c(`openhands`),n=e.filter(e=>e.type===`item`);return(0,F.jsxs)(`aside`,{"data-testid":`settings-navbar-desktop`,className:x(`hidden md:flex md:w-[260px] md:shrink-0 md:flex-col md:gap-2`,`md:sticky md:top-8 md:self-start md:pl-8`),children:[(0,F.jsx)(D.Text,{className:`px-2 text-sm font-normal text-white`,children:t(l.SETTINGS$TITLE)}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:[n.map(e=>(0,F.jsx)(w,{to:e.item.to,label:t(e.item.text),end:!0,testId:`sidebar-settings-${e.item.to}`,icon:e.item.icon,disabled:e.disabled,disabledReason:e.disabled&&e.disabledAgentName?t(l.SETTINGS$AGENT_DISABLED_TOOLTIP,{agentName:e.disabledAgentName}):void 0},e.item.to)),(0,F.jsx)(y,{}),(0,F.jsx)(_,{})]}),(0,F.jsx)(`div`,{className:`px-2 pt-3`,children:(0,F.jsx)(g,{})}),(0,F.jsx)(`div`,{className:`px-2 pt-3`,children:(0,F.jsx)(M,{})})]})}function L({children:e,navigationItems:t}){return(0,F.jsx)(`div`,{className:`flex h-full flex-col md:pt-8`,children:(0,F.jsxs)(`div`,{className:`flex min-h-0 flex-1 gap-10 md:items-start`,children:[(0,F.jsx)(I,{navigationItems:t}),(0,F.jsx)(`main`,{className:N,children:(0,F.jsx)(`div`,{className:`mx-auto w-full min-w-0 max-w-[800px]`,children:e})})]})})}async function R(){try{let e=S(),t;try{let n=await f.fetchQuery({queryKey:[...p.all,e.backend.id,e.orgId],queryFn:T.listProfiles,staleTime:0,...u}),r=n?.active_agent_profile_id??null,i=n?.profiles.find(e=>e.id!=null&&e.id===r);i&&(t=i.agent_kind===`acp`)}catch{}if(t===void 0&&(t=(await f.fetchQuery({queryKey:[...m.byScope(`personal`),e.backend.id,e.orgId],queryFn:()=>E(`personal`),staleTime:0}))?.agent_settings?.agent_kind===`acp`),t)return r(`/settings/agents`)}catch{}return null}var z=async({request:e})=>{let{pathname:t}=new URL(e.url),n=(await f.fetchQuery({queryKey:d.WEB_CLIENT_CONFIG,queryFn:C.getConfig,...h}))?.feature_flags;if(A(t,n)){let e=k(n);if(e&&e!==t)return r(e)}if(v.find(e=>e.to===t)?.disabledByAcp){let e=await R();if(e)return e}return null};function B(){let{t:e}=c(`openhands`),t=s(),n=o(),r=b(),i=j(768),[l,u]=(0,P.useState)(!1),{currentSectionTitle:d,currentSectionSubtitle:f}=(0,P.useMemo)(()=>{let e=r.find(e=>e.type===`item`&&e.item.to===t.pathname);if(e?.type===`item`)return{currentSectionTitle:e.item.text,currentSectionSubtitle:e.item.subtitle};let n=r.find(e=>e.type===`item`);return n?.type===`item`?{currentSectionTitle:n.item.text,currentSectionSubtitle:n.item.subtitle}:{currentSectionTitle:`SETTINGS$TITLE`,currentSectionSubtitle:null}},[r,t.pathname]),p=n.find(e=>e.pathname===t.pathname)?.handle,m=i&&t.pathname===`/settings`;return(0,F.jsx)(`main`,{"data-testid":`settings-screen`,className:`min-h-0`,children:(0,F.jsx)(O,{setHideSectionHeader:u,children:(0,F.jsx)(L,{navigationItems:r,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-6 pb-8`,children:[!(p?.hideTitle===!0||m||l)&&(0,F.jsxs)(`header`,{className:`space-y-1`,children:[(0,F.jsx)(D.H2,{children:e(d)}),f?(0,F.jsx)(`p`,{"data-testid":`settings-page-subtitle`,className:`text-sm leading-5 text-tertiary-light`,children:e(f)}):null]}),(0,F.jsx)(a,{})]})})})})}var V=i(B);export{z as clientLoader,V as default};
@@ -1 +1 @@
1
- var e={llm_model:`openhands/minimax-m2.7`,llm_base_url:``,agent:`CodeActAgent`,language:`en`,llm_api_key:null,llm_api_key_set:!1,search_api_key_set:!1,confirmation_mode:!1,security_analyzer:`llm`,max_iterations:null,remote_runtime_resource_factor:1,provider_tokens_set:{},enable_default_condenser:!0,condenser_max_size:240,enable_sound_notifications:!1,user_consents_to_analytics:!1,enable_proactive_conversation_starters:!1,enable_solvability_analysis:!1,search_api_key:``,is_new_user:!0,disabled_skills:[],mcp_config:{sse_servers:[],stdio_servers:[],shttp_servers:[]},max_budget_per_task:null,email:``,email_verified:!0,git_user_name:`openhands`,git_user_email:`openhands@all-hands.dev`,agent_settings_schema:null,agent_settings:{schema_version:6,agent_kind:`openhands`,agent:`CodeActAgent`,llm:{model:`openhands/minimax-m2.7`},condenser:{enabled:!0,max_size:240},verification:{critic_enabled:!1,enable_iterative_refinement:!1},enable_sub_agents:!1,mcp_config:{}},conversation_settings_schema:null,conversation_settings:{schema_version:1,confirmation_mode:!1,security_analyzer:`llm`}};export{e as t};
1
+ var e={llm_model:`openhands/minimax-m2.7`,llm_base_url:``,agent:`CodeActAgent`,language:`en`,llm_api_key:null,llm_api_key_set:!1,search_api_key_set:!1,confirmation_mode:!1,security_analyzer:`llm`,max_iterations:null,remote_runtime_resource_factor:1,provider_tokens_set:{},enable_default_condenser:!0,condenser_max_size:240,enable_sound_notifications:!1,user_consents_to_analytics:!1,enable_proactive_conversation_starters:!1,enable_solvability_analysis:!1,search_api_key:``,is_new_user:!0,disabled_skills:[],mcp_config:{sse_servers:[],stdio_servers:[],shttp_servers:[]},max_budget_per_task:null,email:``,email_verified:!0,git_user_name:`openhands`,git_user_email:`openhands@all-hands.dev`,title_llm_profile:null,agent_settings_schema:null,agent_settings:{schema_version:6,agent_kind:`openhands`,agent:`CodeActAgent`,llm:{model:`openhands/minimax-m2.7`},condenser:{enabled:!0,max_size:240},verification:{critic_enabled:!1,enable_iterative_refinement:!1},enable_sub_agents:!1,mcp_config:{}},conversation_settings_schema:null,conversation_settings:{schema_version:1,confirmation_mode:!1,security_analyzer:`llm`}};export{e as t};
@@ -1 +1 @@
1
- import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t,i as n,n as r}from"./vendor-styling-CI0PQ3ab.js";import{t as i}from"./useTranslation-Cbf5AGg_.js";import{t as a}from"./declaration-BGsHjPEW.js";import{t as o}from"./utils-DB9LsAzA.js";import{f as s}from"./form-control-classes-CbdN5aO3.js";import{i as c}from"./combobox-caret-CxZpqoSR.js";import{n as l}from"./settings-input-BsgQWS5R.js";e();var u=t();function d({testId:e,label:t,wrapperClassName:d,name:f,items:p,placeholder:m,showOptionalTag:h,isDisabled:g,isLoading:_,defaultSelectedKey:v,selectedKey:y,isClearable:b,allowsCustomValue:x,required:S,onSelectionChange:C,onInputChange:w,defaultFilter:T,startContent:E,inputWrapperClassName:D,inputClassName:O}){let{t:k}=i(`openhands`);return(0,u.jsxs)(`label`,{className:o(`flex flex-col gap-2.5 w-full min-w-0`,d),children:[t&&(0,u.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,u.jsx)(`span`,{className:`text-sm`,children:t}),h&&(0,u.jsx)(l,{})]}),(0,u.jsx)(r,{"aria-label":typeof t==`string`?t:f,"data-testid":e,name:f,defaultItems:p,defaultSelectedKey:v,selectedKey:y,onSelectionChange:C,onInputChange:w,isClearable:b,isDisabled:g||_,isLoading:_,placeholder:_?k(a.HOME$LOADING):m,allowsCustomValue:x,isRequired:S,className:`w-full`,classNames:{popoverContent:`bg-content1 rounded-xl`,selectorButton:c},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:o(s,D),input:O}},defaultFilter:T,startContent:E||null,children:e=>(0,u.jsx)(n,{children:e.label},e.key)})]})}export{d as t};
1
+ import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t,i as n,n as r}from"./vendor-styling-CI0PQ3ab.js";import{t as i}from"./useTranslation-CHm_6BRr.js";import{t as a}from"./declaration-_yumYLEx.js";import{t as o}from"./utils-CrRpzbM2.js";import{f as s}from"./form-control-classes-BPUnoYyg.js";import{i as c}from"./combobox-caret-kNZtp53R.js";import{n as l}from"./settings-input-ZoaAPNQh.js";e();var u=t();function d({testId:e,label:t,wrapperClassName:d,name:f,items:p,placeholder:m,showOptionalTag:h,isDisabled:g,isLoading:_,defaultSelectedKey:v,selectedKey:y,isClearable:b,allowsCustomValue:x,required:S,onSelectionChange:C,onInputChange:w,defaultFilter:T,startContent:E,inputWrapperClassName:D,inputClassName:O}){let{t:k}=i(`openhands`);return(0,u.jsxs)(`label`,{className:o(`flex flex-col gap-2.5 w-full min-w-0`,d),children:[t&&(0,u.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,u.jsx)(`span`,{className:`text-sm`,children:t}),h&&(0,u.jsx)(l,{})]}),(0,u.jsx)(r,{"aria-label":typeof t==`string`?t:f,"data-testid":e,name:f,defaultItems:p,defaultSelectedKey:v,selectedKey:y,onSelectionChange:C,onInputChange:w,isClearable:b,isDisabled:g||_,isLoading:_,placeholder:_?k(a.HOME$LOADING):m,allowsCustomValue:x,isRequired:S,className:`w-full`,classNames:{popoverContent:`bg-content1 rounded-xl`,selectorButton:c},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:o(s,D),input:O}},defaultFilter:T,startContent:E||null,children:e=>(0,u.jsx)(n,{children:e.label},e.key)})]})}export{d as t};
@@ -0,0 +1 @@
1
+ import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{L as t,s as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{t as r}from"./useTranslation-CHm_6BRr.js";import{t as i}from"./declaration-_yumYLEx.js";import{a,i as o,r as s,t as c}from"./use-settings-nav-items-BGfBS0yL.js";import{t as l}from"./use-config-D9zUVw5b.js";import{t as u}from"./sidebar-nav-link-DkA1XWV8.js";import{r as d}from"./typography-BBVEW0un.js";import{n as f}from"./settings-utils-kWEEvcdv.js";import{t as p}from"./use-breakpoint-B-O0lQ84.js";import{t as m}from"./backend-synced-settings-badge-BellMmgC.js";var h=e();function g({navigationItems:e}){let{t}=r(`openhands`),n=e.filter(e=>e.type===`item`);return(0,h.jsxs)(`div`,{"data-testid":`settings-mobile-hub`,className:`flex flex-col gap-4 px-4 py-2 md:hidden`,children:[(0,h.jsx)(d.H2,{children:t(i.SETTINGS$TITLE)}),(0,h.jsxs)(`nav`,{className:`flex flex-col gap-0.5`,children:[n.map(e=>(0,h.jsx)(u,{to:e.item.to,label:t(e.item.text),end:!0,testId:`sidebar-settings-${e.item.to}`,icon:e.item.icon},e.item.to)),(0,h.jsx)(s,{}),(0,h.jsx)(o,{})]}),(0,h.jsx)(a,{}),(0,h.jsx)(`div`,{className:`pt-1`,children:(0,h.jsx)(m,{})})]})}var _=t(function(){let e=p(768),t=c(),{data:r}=l();return e?(0,h.jsx)(g,{navigationItems:t}):(0,h.jsx)(n,{to:f(r?.feature_flags)??`/settings/app`,replace:!0})});export{_ as default};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{t as a}from"./utils-DB9LsAzA.js";import{f as o}from"./form-control-classes-CbdN5aO3.js";var s=e(t(),1),c=n();function l(){let{t:e}=r(`openhands`);return(0,c.jsx)(`span`,{className:`text-xs text-tertiary-alt`,children:e(i.COMMON$OPTIONAL)})}var u=(0,s.forwardRef)(function({testId:e,name:t,label:n,type:r,defaultValue:i,value:s,placeholder:u,showOptionalTag:d,isDisabled:f,startContent:p,className:m,onChange:h,onKeyDown:g,required:_,min:v,max:y,step:b,pattern:x,title:S,labelClassName:C,ariaDescribedBy:w,ariaInvalid:T,error:E,showRequiredTag:D,onBlur:O,inputClassName:k},A){let j=E&&e?`${e}-error`:void 0;return(0,c.jsxs)(`label`,{className:a(`flex flex-col gap-2.5 w-full min-w-0`,m),children:[(0,c.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p,(0,c.jsx)(`span`,{className:a(`text-sm`,C),children:n}),D&&(0,c.jsx)(`span`,{className:`text-red-400 text-sm leading-none`,"aria-hidden":!0,children:`*`}),d&&(0,c.jsx)(l,{})]}),(0,c.jsx)(`input`,{ref:A,"data-testid":e,onChange:e=>h?.(e.target.value),onKeyDown:g,onBlur:O,name:t,disabled:f,type:r,defaultValue:i,value:s,placeholder:u,min:v,max:y,step:b,required:_,pattern:x,title:S,"aria-describedby":j??w,"aria-invalid":!!E||T,className:a(o,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`,E&&`border-red-500`,k)}),E&&(0,c.jsx)(`p`,{id:j,role:`alert`,"data-testid":e?`${e}-error`:void 0,className:`text-xs text-red-400 -mt-1`,children:E})]})});export{l as n,u as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-CHm_6BRr.js";import{t as i}from"./declaration-_yumYLEx.js";import{t as a}from"./utils-CrRpzbM2.js";import{f as o}from"./form-control-classes-BPUnoYyg.js";var s=e(t(),1),c=n();function l(){let{t:e}=r(`openhands`);return(0,c.jsx)(`span`,{className:`text-xs text-tertiary-alt`,children:e(i.COMMON$OPTIONAL)})}var u=(0,s.forwardRef)(function({testId:e,name:t,label:n,type:r,defaultValue:i,value:s,placeholder:u,showOptionalTag:d,isDisabled:f,startContent:p,className:m,onChange:h,onKeyDown:g,required:_,min:v,max:y,step:b,pattern:x,title:S,labelClassName:C,ariaDescribedBy:w,ariaInvalid:T,error:E,showRequiredTag:D,onBlur:O,inputClassName:k},A){let j=E&&e?`${e}-error`:void 0;return(0,c.jsxs)(`label`,{className:a(`flex flex-col gap-2.5 w-full min-w-0`,m),children:[(0,c.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p,(0,c.jsx)(`span`,{className:a(`text-sm`,C),children:n}),D&&(0,c.jsx)(`span`,{className:`text-red-400 text-sm leading-none`,"aria-hidden":!0,children:`*`}),d&&(0,c.jsx)(l,{})]}),(0,c.jsx)(`input`,{ref:A,"data-testid":e,onChange:e=>h?.(e.target.value),onKeyDown:g,onBlur:O,name:t,disabled:f,type:r,defaultValue:i,value:s,placeholder:u,min:v,max:y,step:b,required:_,pattern:x,title:S,"aria-describedby":j??w,"aria-invalid":!!E||T,className:a(o,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`,E&&`border-red-500`,k)}),E&&(0,c.jsx)(`p`,{id:j,role:`alert`,"data-testid":e?`${e}-error`:void 0,className:`text-xs text-red-400 -mt-1`,children:E})]})});export{l as n,u as t};
@@ -1 +1 @@
1
- import{t as e}from"./utils-DB9LsAzA.js";import{_ as t,d as n,i as r,m as i}from"./form-control-classes-CbdN5aO3.js";var a=`h-12 min-h-12`,o=e(r,n,i,`overflow-hidden`),s=e(o,`overflow-auto max-h-[min(70vh,39rem)]`),c=`divide-y divide-[var(--oh-border)]`,l=`hover:bg-[var(--oh-interactive-hover-low)]`,u=e(a,`flex items-center px-3`,t,l),d=e(l,t,`border-t border-[var(--oh-border)] first:border-t-0`),f=e(i,`sticky top-0 z-10 border-b border-[var(--oh-border)]`),p=e(a,`px-3 text-left text-sm font-medium align-middle`),m=e(a,`px-3 text-sm align-middle min-w-0`),h=e(`inline-flex cursor-pointer items-center justify-center rounded-md p-1 text-muted`,t,`hover:bg-[var(--oh-interactive-hover-low)] hover:text-white`);export{s as a,p as c,u as i,d as l,c as n,m as o,h as r,f as s,o as t};
1
+ import{t as e}from"./utils-CrRpzbM2.js";import{_ as t,d as n,i as r,m as i}from"./form-control-classes-BPUnoYyg.js";var a=`h-12 min-h-12`,o=e(r,n,i,`overflow-hidden`),s=e(o,`overflow-auto max-h-[min(70vh,39rem)]`),c=`divide-y divide-[var(--oh-border)]`,l=`hover:bg-[var(--oh-interactive-hover-low)]`,u=e(a,`flex items-center px-3`,t,l),d=e(l,t,`border-t border-[var(--oh-border)] first:border-t-0`),f=e(i,`sticky top-0 z-10 border-b border-[var(--oh-border)]`),p=e(a,`px-3 text-left text-sm font-medium align-middle`),m=e(a,`px-3 text-sm align-middle min-w-0`),h=e(`inline-flex cursor-pointer items-center justify-center rounded-md p-1 text-muted`,t,`hover:bg-[var(--oh-interactive-hover-low)] hover:text-white`);export{s as a,p as c,u as i,d as l,c as n,m as o,h as r,f as s,o as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-CHm_6BRr.js";import{t as i}from"./declaration-_yumYLEx.js";import{z as a}from"./active-backend-context-Cd1qcZsb.js";import{F as o,t as s}from"./utils-CrRpzbM2.js";import{n as c}from"./navigation-context-cvyvI1WA.js";import{t as l}from"./modal-backdrop-B7H42xHG.js";import{r as u,t as d}from"./modal-body-Bg9UCeoV.js";import{t as f}from"./brand-button-BulEFHr3.js";import{t as p}from"./settings-input-ZoaAPNQh.js";import{t as m}from"./use-tracking-DjdCssvp.js";import{t as h}from"./modal-classes-H1KbJkeC.js";import{t as g}from"./settings-HcwfqMjJ.js";import{t as _}from"./base-modal-Cw7enAHz.js";import{t as v}from"./use-save-settings-BMsb2wk_.js";import{t as y}from"./model-selector-BqX2RvEr.js";import{a as b,g as x}from"./sdk-settings-schema-B42JFr5Y.js";import{t as S}from"./settings-utils-kWEEvcdv.js";var C=e(t(),1),w=n();function T({testId:e,title:t,description:n,buttons:r}){return(0,w.jsx)(_,{testId:e,title:t,description:n,buttons:[{text:r.danger.text,onClick:r.danger.onClick,className:`bg-danger`},{text:r.cancel.text,onClick:r.cancel.onClick,className:`bg-[var(--oh-interactive-selected)]`}]})}function E({settings:e,onClose:t}){let{trackSettingsSaved:n}=m(),{mutate:a}=v(),{currentPath:s}=c(),{t:u}=r(`openhands`),d=C.useRef(null),[h,g]=C.useState(!1),_=async e=>{let r=S(e);await a(r,{onSuccess:()=>{t();let e=r.agent_settings_diff?.llm??{};n({llmModel:e.model,llmApiKeySet:e.api_key?`SET`:`UNSET`,searchApiKeySet:r.search_api_key?`SET`:`UNSET`,remoteRuntimeResourceFactor:r.remote_runtime_resource_factor})}})},E=()=>{_(new FormData(d.current??void 0))},D=e=>{e.preventDefault();let t=new FormData(e.currentTarget);s.startsWith(`/conversations/`)?g(!0):_(t)},O=e.llm_api_key_set,k=b(e,`llm.model`);return(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`form`,{ref:d,"data-testid":`settings-form`,className:`flex flex-col gap-6`,onSubmit:D,children:[(0,w.jsxs)(`div`,{className:`flex flex-col gap-[17px]`,children:[(0,w.jsx)(y,{currentModel:typeof k==`string`?k:void 0,wrapperClassName:`!flex-col !gap-[17px]`,labelClassName:o.LABEL_CLASSNAME}),(0,w.jsx)(p,{testId:`llm-api-key-input`,name:`llm-api-key-input`,label:u(i.SETTINGS_FORM$API_KEY),type:`password`,className:`w-full`,placeholder:O?`<hidden>`:``,labelClassName:o.LABEL_CLASSNAME}),(0,w.jsx)(x,{testId:`llm-api-key-help-anchor`,text:u(i.SETTINGS$DONT_KNOW_API_KEY),linkText:u(i.SETTINGS$CLICK_FOR_INSTRUCTIONS),href:`https://docs.openhands.dev/usage/local-setup#getting-an-api-key`,size:`settings`,linkColor:`white`})]}),(0,w.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,w.jsx)(f,{testId:`save-settings-button`,type:`submit`,variant:`primary`,className:`w-full`,children:u(i.BUTTON$SAVE)})})]}),h&&(0,w.jsx)(l,{children:(0,w.jsx)(T,{title:u(i.MODAL$END_SESSION_TITLE),description:u(i.MODAL$END_SESSION_MESSAGE),buttons:{danger:{text:u(i.BUTTON$END_SESSION),onClick:E},cancel:{text:u(i.BUTTON$CANCEL),onClick:()=>g(!1)}}})})]})}function D({onClose:e,settings:t}){let{t:n}=r(`openhands`);return(0,w.jsx)(l,{children:(0,w.jsxs)(`div`,{"data-testid":`ai-config-modal`,className:s(`bg-[var(--oh-surface)] m-4 p-6 rounded-xl flex flex-col gap-[17px] border border-[var(--oh-border)] api-configuration-modal`,u(`md`),d),children:[(0,w.jsx)(`span`,{className:h,children:n(i.AI_SETTINGS$TITLE)}),(0,w.jsx)(x,{testId:`advanced-settings-link`,text:`${n(i.SETTINGS$DESCRIPTION)}. ${n(i.SETTINGS$FOR_OTHER_OPTIONS)} ${n(i.COMMON$SEE)}`,linkText:n(i.COMMON$ADVANCED_SETTINGS),href:a(`/settings`),suffix:`.`,size:`settings`,linkColor:`white`,suffixClassName:`text-white`}),(0,w.jsx)(E,{settings:t||g,onClose:e})]})})}export{D as SettingsModal};
@@ -1 +1 @@
1
- import{_ as e,d as t}from"./agent-server-compatibility-BWN-EIQn.js";import{d as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{t as r}from"./proxy-B3tCGf0X.js";import{t as i}from"./settings-mQUckT0g.js";var a=/^[a-zA-Z0-9_-]+$/;function o(e){return a.test(e)}function s(e,t=`mcp`){return e.trim().replace(/[^a-zA-Z0-9_-]+/g,`_`).replace(/_+/g,`_`).replace(/^_+|_+$/g,``)||t}var c={sse_servers:[],stdio_servers:[],shttp_servers:[]},l=`**********`;function u(e,t){return RegExp(`^${t}(_\\d+)?$`).test(e)?void 0:e}function d(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function f(e){if(!d(e))return null;let t=e.mcpServers;return d(t)&&!(`url`in t)&&!(`command`in t)?t:e}function p(e){if(!d(e))return;let t=Object.entries(e).filter(e=>typeof e[1]==`string`);return t.length>0?Object.fromEntries(t):void 0}function m(e){return e===`**********`?!0:Array.isArray(e)?e.some(m):d(e)?Object.values(e).some(m):!1}function h(e){if(!d(e))return;let t={};return d(e.tokens)&&(t.tokens=e.tokens),d(e.client_info)&&(t.client_info=e.client_info),(typeof e.token_expires_at==`number`||e.token_expires_at===null)&&(t.token_expires_at=e.token_expires_at),Object.keys(t).length>0?t:void 0}function g(e){if(d(e))switch(e.strategy){case`none`:return{strategy:`none`};case`api_key`:return typeof e.value==`string`?{strategy:`api_key`,value:e.value,...typeof e.header_name==`string`&&{header_name:e.header_name}}:void 0;case`bearer`:return typeof e.value==`string`?{strategy:`bearer`,value:e.value}:void 0;case`basic`:return typeof e.username!=`string`||typeof e.password!=`string`?void 0:{strategy:`basic`,username:e.username,password:e.password};case`header`:{let t=p(e.headers);return t?{strategy:`header`,headers:t}:void 0}case`oauth2`:{let t=C(e.authentication),n=h(e.state);return{strategy:`oauth2`,...t&&{authentication:t},...n&&{state:n}}}default:return}}function _(e){return g(e.auth)}function v(e){let t={};return e.auth&&!m(e.auth)&&(t.auth=e.auth),e.headers&&Object.keys(e.headers).length>0&&(t.headers=e.headers),t}function y(e){return{...e.name&&{name:e.name},url:e.url,...e.headers&&{headers:e.headers},...e.auth&&{auth:e.auth}}}function b(e){return y(e)}function x(e){return{...y(e),...e.timeout!==void 0&&{timeout:e.timeout}}}function S(e){return{name:e.name,command:e.command,...e.args&&{args:e.args},...e.env&&{env:e.env}}}function C(e){if(!e||typeof e!=`object`)return;let t=e;if(t.type!==`oauth`)return;let n={type:`oauth`};return(t.client_auth_method===`none`||t.client_auth_method===`client_secret_post`||t.client_auth_method===`client_secret_basic`||t.client_auth_method===`private_key_jwt`)&&(n.client_auth_method=t.client_auth_method),(typeof t.scopes==`string`||Array.isArray(t.scopes)&&t.scopes.every(e=>typeof e==`string`))&&(n.scopes=t.scopes),typeof t.client_name==`string`&&(n.client_name=t.client_name),typeof t.client_metadata_url==`string`&&(n.client_metadata_url=t.client_metadata_url),typeof t.client_id==`string`&&(n.client_id=t.client_id),typeof t.client_secret==`string`&&(n.client_secret=t.client_secret),t.additional_client_metadata&&typeof t.additional_client_metadata==`object`&&!Array.isArray(t.additional_client_metadata)&&(n.additional_client_metadata=t.additional_client_metadata),n}function w(e){let t=f(e);if(!t)return{...c};let n=[],r=[],i=[];for(let[e,a]of Object.entries(t)){if(!d(a))continue;let t=a.url;if(t){let r=a.transport,o=_(a),s=p(a.headers);if(r===`sse`){let r=u(e,`sse`),i={url:t};r&&(i.name=r),o&&(i.auth=o),s&&(i.headers=s),n.push(i)}else{let n=u(e,`shttp`),r={url:t};n&&(r.name=n),a.timeout!=null&&(r.timeout=a.timeout),o&&(r.auth=o),s&&(r.headers=s),i.push(r)}}else{if(typeof a.command!=`string`)continue;let t={name:e,command:a.command};a.args&&(t.args=a.args),a.env&&(t.env=a.env),r.push(t)}}return{sse_servers:n,stdio_servers:r,shttp_servers:i}}function T(e){let t={},n=e=>{let n=s(e);if(!(n in t))return n;let r=1;for(;`${n}_${r}`in t;)r+=1;return`${n}_${r}`};for(let r of e.sse_servers){let e={},i;typeof r==`string`?e.url=r:(i=r.name,e.url=r.url,Object.assign(e,v(r))),e.transport=`sse`,t[n(i||`sse`)]=e}for(let r of e.shttp_servers){let e={transport:`http`},i;typeof r==`string`?e.url=r:(i=r.name,e.url=r.url,Object.assign(e,v(r)),r.timeout!=null&&(e.timeout=r.timeout)),t[n(i||`shttp`)]=e}for(let r of e.stdio_servers){let e={command:r.command};r.args&&(e.args=r.args),r.env&&(e.env=r.env),t[n(r.name||`stdio`)]=e}return Object.keys(t).length>0?t:null}function E(){let t=e().backend;if(t.kind!==`cloud`)throw Error(`Cloud settings call requires a cloud backend.`);return t}function D(e){if(e.agent_settings&&Object.keys(e.agent_settings).length>0)return e.agent_settings;let t={},n={};typeof e.llm_model==`string`&&(n.model=e.llm_model),typeof e.llm_base_url==`string`&&(n.base_url=e.llm_base_url),typeof e.llm_api_key==`string`&&(n.api_key=e.llm_api_key),Object.keys(n).length>0&&(t.llm=n);let r={};return typeof e.enable_default_condenser==`boolean`&&(r.enabled=e.enable_default_condenser),typeof e.condenser_max_size==`number`&&(r.max_size=e.condenser_max_size),Object.keys(r).length>0&&(t.condenser=r),typeof e.agent==`string`&&(t.agent=e.agent),e.mcp_config&&Object.keys(e.mcp_config).length>0&&(t.mcp_config=e.mcp_config),t}function O(e){if(e.conversation_settings&&Object.keys(e.conversation_settings).length>0)return e.conversation_settings;let t={};return typeof e.confirmation_mode==`boolean`&&(t.confirmation_mode=e.confirmation_mode),(typeof e.security_analyzer==`string`||e.security_analyzer===null)&&(t.security_analyzer=e.security_analyzer),typeof e.max_iterations==`number`&&(t.max_iterations=e.max_iterations),t}async function k(){let e=await r({backend:E(),method:`GET`,path:`/api/v1/settings`});return{...e,agent_settings:D(e),conversation_settings:O(e),llm_api_key_set:!!e.llm_api_key_set,search_api_key_set:!!e.search_api_key_set,provider_tokens_set:e.provider_tokens_set}}async function A(e){let t=E(),n={};if(e.agent_settings_diff){let t={...e.agent_settings_diff};t.agent_context===null&&delete t.agent_context,Object.keys(t).length>0&&(n.agent_settings_diff=t)}if(e.conversation_settings_diff&&Object.keys(e.conversation_settings_diff).length>0&&(n.conversation_settings_diff=e.conversation_settings_diff),e.app_preferences)for(let[t,r]of Object.entries(e.app_preferences))r!==void 0&&(n[t]=r);await r({backend:t,method:`POST`,path:`/api/v1/settings`,body:n})}async function j(){return r({backend:E(),method:`GET`,path:`/api/v1/settings/agent-schema`})}async function M(){return r({backend:E(),method:`GET`,path:`/api/v1/settings/conversation-schema`})}var N=[`language`,`user_consents_to_analytics`,`enable_sound_notifications`,`git_user_name`,`git_user_email`,`disabled_skills`],P=new Set(N),F=e=>P.has(e),I=e=>{let t={},n={};for(let[r,i]of Object.entries(e))F(r)?t[r]=i:n[r]=i;return{extracted:t,rest:n}},L=e=>JSON.parse(JSON.stringify(e)),R=(e,t)=>({...e??{},...t??{}});async function z(e,t=3,n=500){for(let r=0;r<t;r+=1)try{return await e()}catch(e){if(r>=t-1)throw e;let i=n*2**r;await new Promise(e=>{setTimeout(e,i)})}throw Error(`Retry attempts exhausted`)}var B={redacted:null,encrypted:null,timestamp:0},V=300*1e3,H=()=>Date.now()-B.timestamp<V,U=()=>{B={redacted:null,encrypted:null,timestamp:0}},W=e=>!!e&&typeof e==`object`&&!Array.isArray(e),G=(e,t)=>`Basic ${btoa(`${e}:${t}`)}`,K=e=>{switch(e.strategy){case`none`:return{};case`api_key`:{if(typeof e.value!=`string`||!e.value)return null;let t=typeof e.header_name==`string`&&e.header_name?e.header_name:`Authorization`,n=t===`Authorization`?`Bearer ${e.value}`:e.value;return{[t]:n}}case`bearer`:return typeof e.value!=`string`||!e.value?null:{Authorization:`Bearer ${e.value}`};case`basic`:return typeof e.username!=`string`||typeof e.password!=`string`?null:{Authorization:G(e.username,e.password)};case`header`:return p(e.headers)??{};case`oauth2`:{let t=W(e.state)?e.state.tokens:void 0;return!W(t)||typeof t.access_token!=`string`?null:{Authorization:`Bearer ${t.access_token}`}}default:return null}},q=e=>{if(!W(e))return e;let t=W(e.mcpServers),n=t?e.mcpServers:e,r=Object.fromEntries(Object.entries(n).map(([e,t])=>{if(!W(t)||!W(t.auth))return[e,t];let n=K(t.auth);if(n===null)return[e,t];let r={...t},i={...p(t.headers)??{},...n};return delete r.auth,Object.keys(i).length>0?r.headers=i:delete r.headers,[e,r]}));return t?{...e,mcpServers:r}:r},J=e=>{let t=f(e);return t?Object.values(t).some(e=>m(W(e)?e.auth:void 0)||m(W(e)?e.headers:void 0)||m(W(e)?e.env:void 0)):!1},Y=(e,t)=>{let n=f(e),r=f(t);return!n||!r?!1:Object.keys(n).some(e=>!(e in r))},X=e=>{let t={agent_settings:e.agent_settings??{},conversation_settings:e.conversation_settings??{},llm_api_key_set:e.llm_api_key_is_set},n=e.misc_settings?.app_preferences;if(n)for(let e of N){let r=n[e];r!==void 0&&(t[e]=r)}return t},Z=e=>{let t=R(i.agent_settings??{},e.agent_settings??{}),n=R(i.conversation_settings??{},e.conversation_settings??{}),r={...L(i),...e,provider_tokens_set:{...i.provider_tokens_set??{},...e.provider_tokens_set??{}},agent_settings:t,conversation_settings:n},a=t.llm,o=t.condenser;return typeof t.agent==`string`&&(r.agent=t.agent),typeof a?.model==`string`&&a.model.length>0&&(r.llm_model=a.model),typeof a?.base_url==`string`&&(r.llm_base_url=a.base_url),typeof o?.enabled==`boolean`&&(r.enable_default_condenser=o.enabled),typeof o?.max_size==`number`&&(r.condenser_max_size=o.max_size),typeof n.confirmation_mode==`boolean`&&(r.confirmation_mode=n.confirmation_mode),(typeof n.security_analyzer==`string`||n.security_analyzer===null)&&(r.security_analyzer=n.security_analyzer),typeof n.max_iterations==`number`&&(r.max_iterations=n.max_iterations),r.search_api_key_set=!!r.search_api_key,r},Q=class r{static async fetchSettingsFromApi(e){return z(()=>new n(t()).getSettings({exposeSecrets:e}))}static async getSettings(){if(e().backend.kind===`cloud`)try{return Z(await z(()=>k()))}catch(e){return console.warn(`Failed to fetch cloud settings, using defaults:`,e),Z({})}if(H()&&B.redacted)return Z(X(B.redacted));try{let e=await this.fetchSettingsFromApi();return B.redacted=e,B.timestamp=Date.now(),Z(X(e))}catch(e){return console.warn(`Failed to fetch settings from API, using defaults:`,e),Z({})}}static async getSettingsForConversation(){if(H()&&B.encrypted)return{agentSettings:B.encrypted.agent_settings,conversationSettings:B.encrypted.conversation_settings,secretsEncrypted:!0};let e=await this.fetchSettingsFromApi(`encrypted`);return B.encrypted=e,B.timestamp||=Date.now(),{agentSettings:e.agent_settings,conversationSettings:e.conversation_settings,secretsEncrypted:!0}}static async getSettingsSchema(){return e().backend.kind===`cloud`?await j():await new n(t()).getAgentSchema()}static async getConversationSettingsSchema(){return e().backend.kind===`cloud`?await M():await new n(t()).getConversationSchema()}static async saveSettings(i){let{extracted:a,rest:o}=I(i),s=Object.keys(a).length>0,c={},l=o.agent_settings_diff;l&&Object.keys(l).length>0&&(c.agent_settings_diff=l);let u=o.conversation_settings_diff;u&&Object.keys(u).length>0&&(c.conversation_settings_diff=u),s&&(c.misc_settings_diff={app_preferences:a});let d=e().backend.kind===`cloud`,f=c.agent_settings_diff,p=!!f&&`mcp_config`in f&&f.mcp_config!==null,m;if(p)try{m=d?(await k())?.agent_settings?.mcp_config:(await r.fetchSettingsFromApi())?.agent_settings?.mcp_config}catch{}let h=d&&p&&J(m)&&!Y(m,f?.mcp_config),g=p&&!h;if(d){if(!(c.agent_settings_diff||c.conversation_settings_diff||s))return!0;g&&await z(()=>A({agent_settings_diff:{mcp_config:null}}));let e={};c.agent_settings_diff&&(e.agent_settings_diff={...c.agent_settings_diff},`mcp_config`in e.agent_settings_diff&&(e.agent_settings_diff.mcp_config=q(e.agent_settings_diff.mcp_config))),c.conversation_settings_diff&&(e.conversation_settings_diff=c.conversation_settings_diff),s&&(e.app_preferences=a);try{await z(()=>A(e))}catch(e){if(g&&m)try{await A({agent_settings_diff:{mcp_config:m}})}catch{}throw e}}else{if(!(c.agent_settings_diff||c.conversation_settings_diff||c.misc_settings_diff))return!0;g&&await z(()=>new n(t()).updateSettings({agent_settings_diff:{mcp_config:null}}));try{await z(()=>new n(t()).updateSettings(c))}catch(e){if(g&&m)try{await new n(t()).updateSettings({agent_settings_diff:{mcp_config:m}})}catch{}throw e}}return U(),!0}static invalidateCache(){U()}};export{x as a,T as c,s as d,w as i,a as l,l as n,b as o,m as r,S as s,Q as t,o as u};
1
+ import{p as e,y as t}from"./agent-server-compatibility-DMY0CihN.js";import{d as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js";import{t as r}from"./proxy-DnnDqkwn.js";import{t as i}from"./settings-HcwfqMjJ.js";var a=/^[a-zA-Z0-9_-]+$/;function o(e){return a.test(e)}function s(e,t=`mcp`){return e.trim().replace(/[^a-zA-Z0-9_-]+/g,`_`).replace(/_+/g,`_`).replace(/^_+|_+$/g,``)||t}var c={sse_servers:[],stdio_servers:[],shttp_servers:[]},l=`**********`;function u(e,t){return RegExp(`^${t}(_\\d+)?$`).test(e)?void 0:e}function d(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function f(e){if(!d(e))return null;let t=e.mcpServers;return d(t)&&!(`url`in t)&&!(`command`in t)?t:e}function p(e){if(!d(e))return;let t=Object.entries(e).filter(e=>typeof e[1]==`string`);return t.length>0?Object.fromEntries(t):void 0}function m(e){return e===`**********`?!0:Array.isArray(e)?e.some(m):d(e)?Object.values(e).some(m):!1}function h(e){if(!d(e))return;let t={};return d(e.tokens)&&(t.tokens=e.tokens),d(e.client_info)&&(t.client_info=e.client_info),(typeof e.token_expires_at==`number`||e.token_expires_at===null)&&(t.token_expires_at=e.token_expires_at),Object.keys(t).length>0?t:void 0}function g(e){if(d(e))switch(e.strategy){case`none`:return{strategy:`none`};case`api_key`:return typeof e.value==`string`?{strategy:`api_key`,value:e.value,...typeof e.header_name==`string`&&{header_name:e.header_name}}:void 0;case`bearer`:return typeof e.value==`string`?{strategy:`bearer`,value:e.value}:void 0;case`basic`:return typeof e.username!=`string`||typeof e.password!=`string`?void 0:{strategy:`basic`,username:e.username,password:e.password};case`header`:{let t=p(e.headers);return t?{strategy:`header`,headers:t}:void 0}case`oauth2`:{let t=C(e.authentication),n=h(e.state);return{strategy:`oauth2`,...t&&{authentication:t},...n&&{state:n}}}default:return}}function _(e){return g(e.auth)}function v(e){let t={};return e.auth&&!m(e.auth)&&(t.auth=e.auth),e.headers&&Object.keys(e.headers).length>0&&(t.headers=e.headers),t}function y(e){return{...e.name&&{name:e.name},url:e.url,...e.headers&&{headers:e.headers},...e.auth&&{auth:e.auth}}}function b(e){return y(e)}function x(e){return{...y(e),...e.timeout!==void 0&&{timeout:e.timeout}}}function S(e){return{name:e.name,command:e.command,...e.args&&{args:e.args},...e.env&&{env:e.env}}}function C(e){if(!e||typeof e!=`object`)return;let t=e;if(t.type!==`oauth`)return;let n={type:`oauth`};return(t.client_auth_method===`none`||t.client_auth_method===`client_secret_post`||t.client_auth_method===`client_secret_basic`||t.client_auth_method===`private_key_jwt`)&&(n.client_auth_method=t.client_auth_method),(typeof t.scopes==`string`||Array.isArray(t.scopes)&&t.scopes.every(e=>typeof e==`string`))&&(n.scopes=t.scopes),typeof t.client_name==`string`&&(n.client_name=t.client_name),typeof t.client_metadata_url==`string`&&(n.client_metadata_url=t.client_metadata_url),typeof t.client_id==`string`&&(n.client_id=t.client_id),typeof t.client_secret==`string`&&(n.client_secret=t.client_secret),t.additional_client_metadata&&typeof t.additional_client_metadata==`object`&&!Array.isArray(t.additional_client_metadata)&&(n.additional_client_metadata=t.additional_client_metadata),n}function w(e){let t=f(e);if(!t)return{...c};let n=[],r=[],i=[];for(let[e,a]of Object.entries(t)){if(!d(a))continue;let t=a.url;if(t){let r=a.transport,o=_(a),s=p(a.headers);if(r===`sse`){let r=u(e,`sse`),i={url:t};r&&(i.name=r),o&&(i.auth=o),s&&(i.headers=s),n.push(i)}else{let n=u(e,`shttp`),r={url:t};n&&(r.name=n),a.timeout!=null&&(r.timeout=a.timeout),o&&(r.auth=o),s&&(r.headers=s),i.push(r)}}else{if(typeof a.command!=`string`)continue;let t={name:e,command:a.command};a.args&&(t.args=a.args),a.env&&(t.env=a.env),r.push(t)}}return{sse_servers:n,stdio_servers:r,shttp_servers:i}}function T(e){let t={},n=e=>{let n=s(e);if(!(n in t))return n;let r=1;for(;`${n}_${r}`in t;)r+=1;return`${n}_${r}`};for(let r of e.sse_servers){let e={},i;typeof r==`string`?e.url=r:(i=r.name,e.url=r.url,Object.assign(e,v(r))),e.transport=`sse`,t[n(i||`sse`)]=e}for(let r of e.shttp_servers){let e={transport:`http`},i;typeof r==`string`?e.url=r:(i=r.name,e.url=r.url,Object.assign(e,v(r)),r.timeout!=null&&(e.timeout=r.timeout)),t[n(i||`shttp`)]=e}for(let r of e.stdio_servers){let e={command:r.command};r.args&&(e.args=r.args),r.env&&(e.env=r.env),t[n(r.name||`stdio`)]=e}return Object.keys(t).length>0?t:null}function E(){let e=t().backend;if(e.kind!==`cloud`)throw Error(`Cloud settings call requires a cloud backend.`);return e}function D(e){if(e.agent_settings&&Object.keys(e.agent_settings).length>0)return e.agent_settings;let t={},n={};typeof e.llm_model==`string`&&(n.model=e.llm_model),typeof e.llm_base_url==`string`&&(n.base_url=e.llm_base_url),typeof e.llm_api_key==`string`&&(n.api_key=e.llm_api_key),Object.keys(n).length>0&&(t.llm=n);let r={};return typeof e.enable_default_condenser==`boolean`&&(r.enabled=e.enable_default_condenser),typeof e.condenser_max_size==`number`&&(r.max_size=e.condenser_max_size),Object.keys(r).length>0&&(t.condenser=r),typeof e.agent==`string`&&(t.agent=e.agent),e.mcp_config&&Object.keys(e.mcp_config).length>0&&(t.mcp_config=e.mcp_config),t}function O(e){if(e.conversation_settings&&Object.keys(e.conversation_settings).length>0)return e.conversation_settings;let t={};return typeof e.confirmation_mode==`boolean`&&(t.confirmation_mode=e.confirmation_mode),(typeof e.security_analyzer==`string`||e.security_analyzer===null)&&(t.security_analyzer=e.security_analyzer),typeof e.max_iterations==`number`&&(t.max_iterations=e.max_iterations),t}async function k(){let e=await r({backend:E(),method:`GET`,path:`/api/v1/settings`});return{...e,agent_settings:D(e),conversation_settings:O(e),llm_api_key_set:!!e.llm_api_key_set,search_api_key_set:!!e.search_api_key_set,provider_tokens_set:e.provider_tokens_set}}async function A(e){let t=E(),n={};if(e.agent_settings_diff){let t={...e.agent_settings_diff};t.agent_context===null&&delete t.agent_context,Object.keys(t).length>0&&(n.agent_settings_diff=t)}if(e.conversation_settings_diff&&Object.keys(e.conversation_settings_diff).length>0&&(n.conversation_settings_diff=e.conversation_settings_diff),e.app_preferences)for(let[t,r]of Object.entries(e.app_preferences))r!==void 0&&(n[t]=r);await r({backend:t,method:`POST`,path:`/api/v1/settings`,body:n})}async function j(){return r({backend:E(),method:`GET`,path:`/api/v1/settings/agent-schema`})}async function M(){return r({backend:E(),method:`GET`,path:`/api/v1/settings/conversation-schema`})}var N=[`language`,`user_consents_to_analytics`,`enable_sound_notifications`,`git_user_name`,`git_user_email`,`title_llm_profile`,`disabled_skills`],P=new Set(N),F=e=>P.has(e),I=e=>{let t={},n={};for(let[r,i]of Object.entries(e))F(r)?t[r]=i:n[r]=i;return{extracted:t,rest:n}},L=e=>JSON.parse(JSON.stringify(e)),R=(e,t)=>({...e??{},...t??{}});async function z(e,t=3,n=500){for(let r=0;r<t;r+=1)try{return await e()}catch(e){if(r>=t-1)throw e;let i=n*2**r;await new Promise(e=>{setTimeout(e,i)})}throw Error(`Retry attempts exhausted`)}var B={redacted:null,encrypted:null,timestamp:0},V=300*1e3,H=()=>Date.now()-B.timestamp<V,U=()=>{B={redacted:null,encrypted:null,timestamp:0}},W=e=>!!e&&typeof e==`object`&&!Array.isArray(e),G=(e,t)=>`Basic ${btoa(`${e}:${t}`)}`,K=e=>{switch(e.strategy){case`none`:return{};case`api_key`:{if(typeof e.value!=`string`||!e.value)return null;let t=typeof e.header_name==`string`&&e.header_name?e.header_name:`Authorization`,n=t===`Authorization`?`Bearer ${e.value}`:e.value;return{[t]:n}}case`bearer`:return typeof e.value!=`string`||!e.value?null:{Authorization:`Bearer ${e.value}`};case`basic`:return typeof e.username!=`string`||typeof e.password!=`string`?null:{Authorization:G(e.username,e.password)};case`header`:return p(e.headers)??{};case`oauth2`:{let t=W(e.state)?e.state.tokens:void 0;return!W(t)||typeof t.access_token!=`string`?null:{Authorization:`Bearer ${t.access_token}`}}default:return null}},q=e=>{if(!W(e))return e;let t=W(e.mcpServers),n=t?e.mcpServers:e,r=Object.fromEntries(Object.entries(n).map(([e,t])=>{if(!W(t)||!W(t.auth))return[e,t];let n=K(t.auth);if(n===null)return[e,t];let r={...t},i={...p(t.headers)??{},...n};return delete r.auth,Object.keys(i).length>0?r.headers=i:delete r.headers,[e,r]}));return t?{...e,mcpServers:r}:r},J=e=>{let t=f(e);return t?Object.values(t).some(e=>m(W(e)?e.auth:void 0)||m(W(e)?e.headers:void 0)||m(W(e)?e.env:void 0)):!1},Y=(e,t)=>{let n=f(e),r=f(t);return!n||!r?!1:Object.keys(n).some(e=>!(e in r))},X=e=>{let t={agent_settings:e.agent_settings??{},conversation_settings:e.conversation_settings??{},llm_api_key_set:e.llm_api_key_is_set},n=e.misc_settings?.app_preferences;if(n)for(let e of N){let r=n[e];r!==void 0&&(t[e]=r)}return t},Z=e=>{let t=R(i.agent_settings??{},e.agent_settings??{}),n=R(i.conversation_settings??{},e.conversation_settings??{}),r={...L(i),...e,provider_tokens_set:{...i.provider_tokens_set??{},...e.provider_tokens_set??{}},agent_settings:t,conversation_settings:n},a=t.llm,o=t.condenser;return typeof t.agent==`string`&&(r.agent=t.agent),typeof a?.model==`string`&&a.model.length>0&&(r.llm_model=a.model),typeof a?.base_url==`string`&&(r.llm_base_url=a.base_url),typeof o?.enabled==`boolean`&&(r.enable_default_condenser=o.enabled),typeof o?.max_size==`number`&&(r.condenser_max_size=o.max_size),typeof n.confirmation_mode==`boolean`&&(r.confirmation_mode=n.confirmation_mode),(typeof n.security_analyzer==`string`||n.security_analyzer===null)&&(r.security_analyzer=n.security_analyzer),typeof n.max_iterations==`number`&&(r.max_iterations=n.max_iterations),r.search_api_key_set=!!r.search_api_key,r},Q=class r{static async fetchSettingsFromApi(t){return z(()=>new n(e()).getSettings({exposeSecrets:t}))}static async getSettings(){if(t().backend.kind===`cloud`)try{return Z(await z(()=>k()))}catch(e){return console.warn(`Failed to fetch cloud settings, using defaults:`,e),Z({})}if(H()&&B.redacted)return Z(X(B.redacted));try{let e=await this.fetchSettingsFromApi();return B.redacted=e,B.timestamp=Date.now(),Z(X(e))}catch(e){return console.warn(`Failed to fetch settings from API, using defaults:`,e),Z({})}}static async getSettingsForConversation(){if(H()&&B.encrypted)return{agentSettings:B.encrypted.agent_settings,conversationSettings:B.encrypted.conversation_settings,secretsEncrypted:!0};let e=await this.fetchSettingsFromApi(`encrypted`);return B.encrypted=e,B.timestamp||=Date.now(),{agentSettings:e.agent_settings,conversationSettings:e.conversation_settings,secretsEncrypted:!0}}static async getSettingsSchema(){return t().backend.kind===`cloud`?await j():await new n(e()).getAgentSchema()}static async getConversationSettingsSchema(){return t().backend.kind===`cloud`?await M():await new n(e()).getConversationSchema()}static async saveSettings(i){let{extracted:a,rest:o}=I(i),s=Object.keys(a).length>0,c={},l=o.agent_settings_diff;l&&Object.keys(l).length>0&&(c.agent_settings_diff=l);let u=o.conversation_settings_diff;u&&Object.keys(u).length>0&&(c.conversation_settings_diff=u),s&&(c.misc_settings_diff={app_preferences:a});let d=t().backend.kind===`cloud`,f=c.agent_settings_diff,p=!!f&&`mcp_config`in f&&f.mcp_config!==null,m;if(p)try{m=d?(await k())?.agent_settings?.mcp_config:(await r.fetchSettingsFromApi())?.agent_settings?.mcp_config}catch{}let h=d&&p&&J(m)&&!Y(m,f?.mcp_config),g=p&&!h;if(d){if(!(c.agent_settings_diff||c.conversation_settings_diff||s))return!0;g&&await z(()=>A({agent_settings_diff:{mcp_config:null}}));let e={};c.agent_settings_diff&&(e.agent_settings_diff={...c.agent_settings_diff},`mcp_config`in e.agent_settings_diff&&(e.agent_settings_diff.mcp_config=q(e.agent_settings_diff.mcp_config))),c.conversation_settings_diff&&(e.conversation_settings_diff=c.conversation_settings_diff),s&&(e.app_preferences=a);try{await z(()=>A(e))}catch(e){if(g&&m)try{await A({agent_settings_diff:{mcp_config:m}})}catch{}throw e}}else{if(!(c.agent_settings_diff||c.conversation_settings_diff||c.misc_settings_diff))return!0;g&&await z(()=>new n(e()).updateSettings({agent_settings_diff:{mcp_config:null}}));try{await z(()=>new n(e()).updateSettings(c))}catch(t){if(g&&m)try{await new n(e()).updateSettings({agent_settings_diff:{mcp_config:m}})}catch{}throw t}}return U(),!0}static invalidateCache(){U()}};export{x as a,T as c,s as d,w as i,a as l,l as n,b as o,m as r,S as s,Q as t,o as u};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{t as a}from"./utils-DB9LsAzA.js";import{n as o}from"./toggle-switch-DX_k418f.js";var s=e(t(),1),c=n();function l({children:e,testId:t,name:n,onToggle:l,defaultIsToggled:u,isToggled:d,isBeta:f,isDisabled:p,togglePosition:m=`left`}){let{t:h}=r(`openhands`),[g,_]=s.useState(u??!1),v=e=>{p||(_(e),l?.(e))},y=(0,c.jsx)(`input`,{hidden:!0,"data-testid":t,name:n,type:`checkbox`,onChange:e=>v(e.target.checked),checked:d??g,disabled:p}),b=(0,c.jsx)(o,{enabled:d??g}),x=e||f?(0,c.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,c.jsx)(`span`,{className:`text-sm`,children:e}),f&&(0,c.jsx)(`span`,{className:`text-[11px] leading-4 text-base font-[500] tracking-tighter bg-primary px-1 rounded-full`,children:h(i.BADGE$BETA)})]}):null;return(0,c.jsxs)(`label`,{className:a(`flex items-center gap-2`,m===`right`?`w-full justify-between`:`w-fit`,p?`cursor-not-allowed opacity-50`:`cursor-pointer`),children:[y,m===`right`?(0,c.jsxs)(c.Fragment,{children:[x,b]}):(0,c.jsxs)(c.Fragment,{children:[b,x]})]})}export{l as t};
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-CHm_6BRr.js";import{t as i}from"./declaration-_yumYLEx.js";import{t as a}from"./utils-CrRpzbM2.js";import{n as o}from"./toggle-switch-yVIzmJLM.js";var s=e(t(),1),c=n();function l({children:e,testId:t,name:n,onToggle:l,defaultIsToggled:u,isToggled:d,isBeta:f,isDisabled:p,togglePosition:m=`left`}){let{t:h}=r(`openhands`),[g,_]=s.useState(u??!1),v=e=>{p||(_(e),l?.(e))},y=(0,c.jsx)(`input`,{hidden:!0,"data-testid":t,name:n,type:`checkbox`,onChange:e=>v(e.target.checked),checked:d??g,disabled:p}),b=(0,c.jsx)(o,{enabled:d??g}),x=e||f?(0,c.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,c.jsx)(`span`,{className:`text-sm`,children:e}),f&&(0,c.jsx)(`span`,{className:`text-[11px] leading-4 text-base font-[500] tracking-tighter bg-primary px-1 rounded-full`,children:h(i.BADGE$BETA)})]}):null;return(0,c.jsxs)(`label`,{className:a(`flex items-center gap-2`,m===`right`?`w-full justify-between`:`w-fit`,p?`cursor-not-allowed opacity-50`:`cursor-pointer`),children:[y,m===`right`?(0,c.jsxs)(c.Fragment,{children:[x,b]}):(0,c.jsxs)(c.Fragment,{children:[b,x]})]})}export{l as t};
@@ -1 +1 @@
1
- import{t as e}from"./map-provider-BbIb12oh.js";var t=t=>{let n=t.get(`llm-provider-input`)?.toString(),r=n?e(n):void 0,i=t.get(`llm-model-input`)?.toString();return{llmModel:r&&i?`${r}/${i}`:void 0,llmApiKey:t.get(`llm-api-key-input`)?.toString(),agent:t.get(`agent`)?.toString(),language:t.get(`language`)?.toString()}},n=e=>{let{llmModel:n,llmApiKey:r,agent:i,language:a}=t(e),o={};n&&(o.model=n),r!==void 0&&(o.api_key=r);let s={};return Object.keys(o).length>0&&(s.llm=o),i&&(s.agent=i),{...Object.keys(s).length>0?{agent_settings_diff:s}:{},...a?{language:a}:{}}};function r(e,t){return!!(t?.hide_llm_settings&&e===`/settings/llm`)}function i(e){return[{path:`/settings/agents`,hidden:!1},{path:`/settings/llm`,hidden:!!e?.hide_llm_settings},{path:`/settings`,hidden:!!e?.hide_llm_settings},{path:`/settings/app`,hidden:!1},{path:`/settings/secrets`,hidden:!1}].find(e=>!e.hidden)?.path??null}export{i as n,r,n as t};
1
+ import{t as e}from"./map-provider-BSvXvVR0.js";var t=t=>{let n=t.get(`llm-provider-input`)?.toString(),r=n?e(n):void 0,i=t.get(`llm-model-input`)?.toString();return{llmModel:r&&i?`${r}/${i}`:void 0,llmApiKey:t.get(`llm-api-key-input`)?.toString(),agent:t.get(`agent`)?.toString(),language:t.get(`language`)?.toString()}},n=e=>{let{llmModel:n,llmApiKey:r,agent:i,language:a}=t(e),o={};n&&(o.model=n),r!==void 0&&(o.api_key=r);let s={};return Object.keys(o).length>0&&(s.llm=o),i&&(s.agent=i),{...Object.keys(s).length>0?{agent_settings_diff:s}:{},...a?{language:a}:{}}};function r(e,t){return!!(t?.hide_llm_settings&&e===`/settings/llm`)}function i(e){return[{path:`/settings/agents`,hidden:!1},{path:`/settings/llm`,hidden:!!e?.hide_llm_settings},{path:`/settings`,hidden:!!e?.hide_llm_settings},{path:`/settings/app`,hidden:!1},{path:`/settings/secrets`,hidden:!1}].find(e=>!e.hidden)?.path??null}export{i as n,r,n as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r,P as i,r as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{h as o}from"./path-utils-DRgexxnX.js";import{t as s}from"./useQuery-D5pEZbY0.js";import{t as c}from"./useTranslation-CHm_6BRr.js";import{t as l}from"./declaration-_yumYLEx.js";import{t as u}from"./messages-eRPeR4pW.js";import{p as d}from"./agent-server-compatibility-DMY0CihN.js";import{s as f}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js";import{t as p}from"./loading-spinner-BCInDEXB.js";import{t as m}from"./openhands-logo-pEw0nKFP.js";import{c as h}from"./lesson-plan-BSEUwflx.js";import{n as g}from"./use-event-store-BlpSUF7N.js";var _=e(t(),1),v=e=>s({queryKey:[`shared-conversation`,e],queryFn:()=>{if(!e)throw Error(`Conversation ID is required`);return new f(d()).getSharedConversation(e)},enabled:!!e,retry:!1}),y=e=>o({queryKey:[`shared-conversation-events`,e],queryFn:({pageParam:t})=>{if(!e)throw Error(`Conversation ID is required`);return new f(d()).searchSharedEvents({conversationId:e,limit:100,pageId:t})},initialPageParam:void 0,getNextPageParam:e=>e.next_page_id??void 0,enabled:!!e,retry:!1}),b=({hasNextPage:e,isFetchingNextPage:t,fetchNextPage:n,threshold:r=100})=>{let i=(0,_.useRef)(null),a=(0,_.useCallback)(()=>{if(!i.current||t||!e)return;let{scrollTop:a,scrollHeight:o,clientHeight:s}=i.current;a+s>=o-r&&n()},[e,t,n,r]);return(0,_.useEffect)(()=>{let e=i.current;if(e)return e.addEventListener(`scroll`,a),()=>{e.removeEventListener(`scroll`,a)}},[a]),i},x=n(),S=r(function(){let{t:e}=c(`openhands`),{conversationId:t}=i(),{data:n,isLoading:r,error:o}=v(t),{data:s,isLoading:d,error:f,hasNextPage:S,fetchNextPage:C,isFetchingNextPage:w}=y(t),T=r||d,E=o||f,D=_.useMemo(()=>s?.pages?s.pages.flatMap(e=>e.items):[],[s?.pages]),O=_.useMemo(()=>D.reduce((e,t)=>g(t,e),[]).filter(h),[D]),k=b({hasNextPage:!!S,isFetchingNextPage:w,fetchNextPage:C});return T?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(p,{size:`large`})}):E||!n?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(`div`,{className:`text-white`,children:e(l.CONVERSATION$NOT_FOUND)})}):(0,x.jsxs)(`div`,{className:`h-screen bg-base text-white flex flex-col`,children:[(0,x.jsx)(`div`,{className:`border-b border-[var(--oh-border-subtle)] p-4 flex-shrink-0`,children:(0,x.jsxs)(`div`,{className:`max-w-4xl mx-auto flex items-start gap-4`,children:[(0,x.jsx)(a,{to:`/conversations`,className:`flex-shrink-0`,"aria-label":e(l.BRANDING$OPENHANDS_LOGO),children:(0,x.jsx)(m,{width:46,height:30})}),(0,x.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,x.jsx)(`h1`,{className:`text-xl font-medium mb-2`,children:n?.title||e(l.CONVERSATION$SHARED_CONVERSATION)}),n?.selected_branch&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(l.CONVERSATION$BRANCH),`: `,n.selected_branch]}),n?.selected_repository&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(l.CONVERSATION$REPOSITORY),`:`,` `,n.selected_repository]}),n?.llm_model&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(l.LLM$MODEL),`: `,n.llm_model]})]})]})}),(0,x.jsx)(`div`,{ref:k,className:`flex-1 overflow-y-auto custom-scrollbar-always px-4 pt-4 gap-2`,children:(0,x.jsxs)(`div`,{className:`max-w-4xl mx-auto p-4 border border-[var(--oh-border-subtle)] rounded`,children:[O.length>0?(0,x.jsx)(u,{messages:O,allEvents:D}):(0,x.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,x.jsx)(`div`,{className:`text-center text-[var(--oh-muted)] py-8`,children:e(l.CONVERSATION$NO_HISTORY_AVAILABLE)})}),w&&(0,x.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,x.jsx)(p,{size:`small`})})]})})]})});export{S as default};