@openhands/agent-canvas 1.12.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (899) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{acp-providers-BkL3HWa3.js → acp-providers-CYy8qA2z.js} +1 -1
  4. package/build/assets/active-backend-context-BZDG15C0.js +2 -0
  5. package/build/assets/{agent-context-settings-CzWS1DgR.js → agent-context-settings-DGWBBbcp.js} +1 -1
  6. package/build/assets/agent-profiles-settings-DrkGdf4_.js +1 -0
  7. package/build/assets/agent-server-conversation-service.api-DK56YPTs.js +86 -0
  8. package/build/assets/{agent-settings-D2J1dKVd.js → agent-settings-DfcSgkLD.js} +2 -2
  9. package/build/assets/agent-settings-Lrc5-twS.js +1 -0
  10. package/build/assets/{alert-banner-lrK-2_0Y.js → alert-banner-BgDHhL7b.js} +1 -1
  11. package/build/assets/api-error-message-BEIE_yD1.js +1 -0
  12. package/build/assets/{api-key-entry-screen-D70oJj2c.js → api-key-entry-screen-DaZnOlVo.js} +1 -1
  13. package/build/assets/{app-settings-D0OKHB3M.js → app-settings-BG5NAUbC.js} +1 -1
  14. package/build/assets/automation-detail-D4Hs831Z.js +3 -0
  15. package/build/assets/automation-export-n0X6FB0C.js +2 -0
  16. package/build/assets/automation-git-sync-CDrm8WV7.js +1 -0
  17. package/build/assets/automation-setup-route-CZCl4ONs.js +1 -0
  18. package/build/assets/{automation-templates-D9gs6ihu.js → automation-templates-DFF96AdL.js} +1 -1
  19. package/build/assets/automations-list-Bl-oGOrV.js +1 -0
  20. package/build/assets/{back-nav-button-B3pYwmUJ.js → back-nav-button-H_ThtDA0.js} +1 -1
  21. package/build/assets/{backend-form-modal-HwclKrUS.js → backend-form-modal-CbCemvHt.js} +1 -1
  22. package/build/assets/backend-not-configured-DP8KLNq_.js +1 -0
  23. package/build/assets/{backend-synced-settings-badge-YI3k09Wr.js → backend-synced-settings-badge-BBASWqsb.js} +1 -1
  24. package/build/assets/{badge-Dpn3-LTV.js → badge-B-51h-SW.js} +1 -1
  25. package/build/assets/{base-modal-3NmIOKDm.js → base-modal-BbjycA8X.js} +1 -1
  26. package/build/assets/bot-CGPCg03p.js +1 -0
  27. package/build/assets/{brand-button-CJcwjnfb.js → brand-button-Blxv5nww.js} +1 -1
  28. package/build/assets/browser-CuW0nWvh.js +7 -0
  29. package/build/assets/{browser-tab-4CPdj3J3.js → browser-tab-D5G0ORwt.js} +1 -1
  30. package/build/assets/{chat-send-button-B8n6-DQA.js → chat-send-button-BD2tii1r.js} +1 -1
  31. package/build/assets/check-DSuS-lyr.js +1 -0
  32. package/build/assets/chevron-down-CgGcmtE2.js +1 -0
  33. package/build/assets/circle-check-CG5-NPw7.js +1 -0
  34. package/build/assets/{circle-plus-check-toggle-BVzv5EkZ.js → circle-plus-check-toggle-ASbpB8vN.js} +1 -1
  35. package/build/assets/cloud-funnel-analytics-GlCUG0gk.js +1 -0
  36. package/build/assets/cog-CZiR80uT.js +1 -0
  37. package/build/assets/{combobox-caret-BlmRwiM8.js → combobox-caret-DvpEsh2O.js} +1 -1
  38. package/build/assets/{command-menu-BKOLj-TC.js → command-menu-DwUQzjYP.js} +1 -1
  39. package/build/assets/{condenser-settings-DLQogFnB.js → condenser-settings-BptcoiLA.js} +1 -1
  40. package/build/assets/{confirmation-modal-DAH0XtOp.js → confirmation-modal-CiEwxZAA.js} +1 -1
  41. package/build/assets/{context-menu-list-item-BQhmFVEK.js → context-menu-list-item-CdcamfM1.js} +1 -1
  42. package/build/assets/conversation-DREHj4nT.js +1 -0
  43. package/build/assets/conversation-DotRfiDz.js +90 -0
  44. package/build/assets/conversation-panel-DREHj4nT.js +1 -0
  45. package/build/assets/conversation-state-store-DMLtlHbE.js +1 -0
  46. package/build/assets/conversation-store-Blc5xysY.js +6 -0
  47. package/build/assets/{conversation-tab-empty-state-C9sfDOlt.js → conversation-tab-empty-state-D-puECpY.js} +1 -1
  48. package/build/assets/{copy-to-clipboard-button-DatoElj8.js → copy-to-clipboard-button-BGxcUbgy.js} +1 -1
  49. package/build/assets/{device-verify-BIjXeW9N.js → device-verify-CZJfWaJf.js} +1 -1
  50. package/build/assets/{dropdown-classes-zFW7qPSK.js → dropdown-classes-tLhpwtxS.js} +1 -1
  51. package/build/assets/{entry.client-EBn3ZtNP.js → entry.client-D8GnI6GZ.js} +2 -2
  52. package/build/assets/{enum-filter-dropdown-CctILg5t.js → enum-filter-dropdown-Fk8k60nk.js} +1 -1
  53. package/build/assets/{environment-switch-overlay-Cvmo6clk.js → environment-switch-overlay-DeztVYuL.js} +1 -1
  54. package/build/assets/{extensions-hub-BZ3HYztk.js → extensions-hub-Cd6GCYzq.js} +1 -1
  55. package/build/assets/{extensions-navigation-Bnx32WAb.js → extensions-navigation-C4sgZg-y.js} +1 -1
  56. package/build/assets/external-link-C0UpBgsE.js +1 -0
  57. package/build/assets/{file-text-RecuaId_.js → file-text-C6WYtNdV.js} +1 -1
  58. package/build/assets/files-tab-BW_qzyAm.js +1 -0
  59. package/build/assets/{form-control-classes-DLN3Qgub.js → form-control-classes-CGXBLcn1.js} +1 -1
  60. package/build/assets/format-model-name-BNPKVsIq.js +1 -0
  61. package/build/assets/format-relative-time-ZhQD4rsl.js +1 -0
  62. package/build/assets/git-provider-icon-CaQ1yLPi.js +1 -0
  63. package/build/assets/{git-repo-dropdown-B5VnMftu.js → git-repo-dropdown-CgXR6M_E.js} +1 -1
  64. package/build/assets/git-repo-dropdown-D2Uei3CO.js +1 -0
  65. package/build/assets/{highlighted-source-view-CgJfD5VT.js → highlighted-source-view-C_YOp8Fo.js} +1 -1
  66. package/build/assets/home-DNzzJcMP.js +1 -0
  67. package/build/assets/home-aCos-5vc.js +1 -0
  68. package/build/assets/{home-store-Cubdq0uP.js → home-store-DgzViC3f.js} +1 -1
  69. package/build/assets/index-home-DNzzJcMP.js +1 -0
  70. package/build/assets/info-CLoC1LRo.js +1 -0
  71. package/build/assets/install-server-modal-D7zIqNKz.js +1 -0
  72. package/build/assets/kebab-menu-item-content-DERMdnDv.js +1 -0
  73. package/build/assets/{launch-c4GEP8oo.js → launch-5PjKeLak.js} +1 -1
  74. package/build/assets/{list-todo-CheUtB7F.js → list-todo-BF049YaY.js} +1 -1
  75. package/build/assets/llm-not-configured-banner-BK9z5eS0.js +27 -0
  76. package/build/assets/llm-settings-BLAMK2tR.js +1 -0
  77. package/build/assets/llm-settings-BWsbarGM.js +1 -0
  78. package/build/assets/llm-subscription-service-SfnEV9Uc.js +1 -0
  79. package/build/assets/loader-circle-D7IagAyF.js +1 -0
  80. package/build/assets/{loading-spinner-CN3riY7k.js → loading-spinner-DBgXgra0.js} +1 -1
  81. package/build/assets/{manage-backends-modal-DTCME_Pu.js → manage-backends-modal-BTqNPhzc.js} +1 -1
  82. package/build/assets/manifest-abebca3c.js +1 -0
  83. package/build/assets/manifest-subpage-layout-Rn-glaxV.js +1 -0
  84. package/build/assets/{map-provider-7Bp2aih5.js → map-provider-BK4HnqYz.js} +1 -1
  85. package/build/assets/markdown-renderer-Cp6DlHQN.js +8 -0
  86. package/build/assets/{mcp-Da7wFU7A.js → mcp-BC-Ixn4T.js} +2 -2
  87. package/build/assets/mcp-marketplace-utils-BJWJgbB6.js +1 -0
  88. package/build/assets/messages-CzFKrzPG.js +40 -0
  89. package/build/assets/{modal-body-duRaxj_K.js → modal-body-BdKfD3Hl.js} +1 -1
  90. package/build/assets/{modal-classes-CLEXO6dj.js → modal-classes-D5_b5vMi.js} +1 -1
  91. package/build/assets/{modal-close-button-D0aT02hs.js → modal-close-button-objukxk_.js} +1 -1
  92. package/build/assets/{mouse-pointer-click-Px-dXWcS.js → mouse-pointer-click-C_gXyLyD.js} +1 -1
  93. package/build/assets/{npm-Cswluf6-.js → npm-CHVHV1MC.js} +1 -1
  94. package/build/assets/{onboarding-BKbTYlW1.js → onboarding-Diw0V51A.js} +1 -1
  95. package/build/assets/onboarding-modal-Da4yHzsA.js +1 -0
  96. package/build/assets/{organization-service.api-DK8csGvK.js → organization-service.api-BztSy69u.js} +1 -1
  97. package/build/assets/parse-git-remote-url-BkXN9jzl.js +1 -0
  98. package/build/assets/pencil-49avMHlD.js +1 -0
  99. package/build/assets/{planner-tab-D-mZ1I7n.js → planner-tab-CJiSpNax.js} +1 -1
  100. package/build/assets/{plugins-management-service-CywqyfLK.js → plugins-management-service-lHdNKWNU.js} +1 -1
  101. package/build/assets/plus-C0BagBpV.js +1 -0
  102. package/build/assets/profiles-service.api-BLr7FXec.js +1 -0
  103. package/build/assets/providers-CWXnb7S3.js +1 -0
  104. package/build/assets/{proxy-b4aqL4SX.js → proxy-DYDXxtje.js} +1 -1
  105. package/build/assets/{puzzle-B3v361yY.js → puzzle-Bt2B1rzf.js} +1 -1
  106. package/build/assets/recommended-automations-launcher-CcFMfJRR.js +1 -0
  107. package/build/assets/refresh-cw-nmcesifB.js +1 -0
  108. package/build/assets/root-CT4t7apy.css +1 -0
  109. package/build/assets/root-DnRgLKpU.js +2 -0
  110. package/build/assets/root-layout-2L9tr-BN.js +2 -0
  111. package/build/assets/{schema-field-Z-rMg9ti.js → schema-field-C59lVZTA.js} +1 -1
  112. package/build/assets/{sdk-section-page-m_cjygxR.js → sdk-section-page-BbBEQQjq.js} +1 -1
  113. package/build/assets/search-CYSDBczG.js +1 -0
  114. package/build/assets/secrets-service-BtsgYSlj.js +1 -0
  115. package/build/assets/secrets-settings-DJ0OKa4_.js +1 -0
  116. package/build/assets/{segmented-toggle-SmvsR3jW.js → segmented-toggle-DiVfTZuN.js} +1 -1
  117. package/build/assets/{settings-CZPGNens.js → settings-CDqL_Uqh.js} +1 -1
  118. package/build/assets/{settings-CWFxymAf.js → settings-DcNPxz0v.js} +1 -1
  119. package/build/assets/{settings-dropdown-input-TWIeiG02.js → settings-dropdown-input-Ba1UN5Du.js} +1 -1
  120. package/build/assets/{settings-index-Dtlegd6s.js → settings-index-Cz2cKt2K.js} +1 -1
  121. package/build/assets/{settings-input-D61Vzp9e.js → settings-input-CWUEHHvS.js} +1 -1
  122. package/build/assets/{settings-list-classes-sE0ASr1s.js → settings-list-classes-DdcLXDGn.js} +1 -1
  123. package/build/assets/{settings-modal-CalzJP2l.js → settings-modal-nEEK1Kh1.js} +1 -1
  124. package/build/assets/{settings-service.api-DfPYaxZJ.js → settings-service.api-3yAUFcaP.js} +1 -1
  125. package/build/assets/{settings-switch-Drt-rF5s.js → settings-switch-Dk9hChx1.js} +1 -1
  126. package/build/assets/{settings-utils-gw2ppAvw.js → settings-utils-CxjtCSB3.js} +1 -1
  127. package/build/assets/shared-conversation-DbAcrx3s.js +1 -0
  128. package/build/assets/shield-check-CiOTXxV2.js +1 -0
  129. package/build/assets/{sidebar-layout-Dxg6zc2K.js → sidebar-layout-lrfPooIB.js} +1 -1
  130. package/build/assets/{sidebar-mobile-menu-toggle-C6HpQ55l.js → sidebar-mobile-menu-toggle-KERXfNu1.js} +1 -1
  131. package/build/assets/{sidebar-nav-link-CxLoG-dG.js → sidebar-nav-link-B8lFD6Cb.js} +1 -1
  132. package/build/assets/{sidebar-store-BJeYY-E9.js → sidebar-store-u6pUpxJ7.js} +1 -1
  133. package/build/assets/{skill-card-pill-row-B_BYBONu.js → skill-card-pill-row-dGIUzr_b.js} +1 -1
  134. package/build/assets/{skill-icon-badge-CN41Hy9l.js → skill-icon-badge-kkOWZ89w.js} +1 -1
  135. package/build/assets/{skill-scope-Dt1V5X2p.js → skill-scope-DWN1PBPH.js} +1 -1
  136. package/build/assets/{skills-plugins-B-H0cCOP.js → skills-plugins-DFjH2Nq6.js} +1 -1
  137. package/build/assets/{skills-settings-DthdIDUb.js → skills-settings-DIHpl3ol.js} +2 -2
  138. package/build/assets/{sparkles-g7y3r-Ut.js → sparkles-ntyMLnbj.js} +1 -1
  139. package/build/assets/{styled-tooltip-C5C07RQC.js → styled-tooltip-B6JXcsmL.js} +1 -1
  140. package/build/assets/{task-list-tab-BTde81Iu.js → task-list-tab-aEJzEcHD.js} +1 -1
  141. package/build/assets/{terminal-DRrJo-cR.js → terminal-Dch7Ty5K.js} +1 -1
  142. package/build/assets/{toggle-switch-CIioisto.js → toggle-switch-B2MLKsgt.js} +1 -1
  143. package/build/assets/trash-2-yZnDM4Ji.js +1 -0
  144. package/build/assets/{typography-D9tiHct7.js → typography-DB5HoCk0.js} +1 -1
  145. package/build/assets/usage-tab-DrEtBmBT.js +1 -0
  146. package/build/assets/use-acp-credential-form-c8KXAa8A.js +1 -0
  147. package/build/assets/{use-activate-agent-profile-DrPzIKJF.js → use-activate-agent-profile-B0p34N3q.js} +1 -1
  148. package/build/assets/use-agent-profiles-CPIc6wLH.js +1 -0
  149. package/build/assets/{use-can-manage-org-profiles-BzE28H3x.js → use-can-manage-org-profiles-Dz_8Eqkv.js} +1 -1
  150. package/build/assets/{use-cloud-current-user-id-U6HPjy50.js → use-cloud-current-user-id-DvUVqCle.js} +1 -1
  151. package/build/assets/use-config-C3PO4TBw.js +1 -0
  152. package/build/assets/use-create-conversation-DVrA_uLD.js +1 -0
  153. package/build/assets/use-create-secret-DbBIpaCR.js +1 -0
  154. package/build/assets/use-get-secrets-6PBitf54.js +1 -0
  155. package/build/assets/use-has-permission-CQ31Cl8j.js +1 -0
  156. package/build/assets/use-is-authed-2UrDIziV.js +1 -0
  157. package/build/assets/use-is-creating-conversation-BvYpmb3v.js +1 -0
  158. package/build/assets/{use-launch-skill-in-chat-BcKNjxxd.js → use-launch-skill-in-chat-COnDpxCQ.js} +1 -1
  159. package/build/assets/use-llm-profiles-diZS4FiN.js +1 -0
  160. package/build/assets/use-manifest-capabilities-HIWCtIUm.js +1 -0
  161. package/build/assets/{use-onboarding-completion-6kWOW3ul.js → use-onboarding-completion-Bs8PcXik.js} +1 -1
  162. package/build/assets/{use-plugins-marketplace-CqkR8kLE.js → use-plugins-marketplace-BCuNLFsr.js} +1 -1
  163. package/build/assets/use-save-agent-profile-BaMNSpBV.js +1 -0
  164. package/build/assets/{use-save-settings-DIEurJ3D.js → use-save-settings-BahvC2Gw.js} +1 -1
  165. package/build/assets/{use-settings-BmLzQjnC.js → use-settings-C6ZxpBDX.js} +1 -1
  166. package/build/assets/{use-settings-nav-items-DV9qgeu7.js → use-settings-nav-items-Bqn69Ggw.js} +2 -2
  167. package/build/assets/use-tracking-Bhu7gk2y.js +3 -0
  168. package/build/assets/{use-user-conversation-Dt-W6uNw.js → use-user-conversation-BkNXpXrd.js} +1 -1
  169. package/build/assets/{useInfiniteQuery-DbCv0Jzd.js → useInfiniteQuery-c_OmS3lK.js} +1 -1
  170. package/build/assets/{useMutation-ChpkYxI5.js → useMutation-6ZsQCqAn.js} +1 -1
  171. package/build/assets/{useQueries-Cjv3E8_1.js → useQueries-xDrGlTO_.js} +1 -1
  172. package/build/assets/{useQuery-BCnzy4LX.js → useQuery-Bs5NFz2s.js} +1 -1
  173. package/build/assets/utils-DUD5ScdA.js +1 -0
  174. package/build/assets/{vendor~browser-DJ1pl_wn.js → vendor~browser-B-fae1JU.js} +14 -14
  175. package/build/assets/{vendor~entry.client-CgNUwtQL.js → vendor~entry.client-BFE7Llz9.js} +1 -1
  176. package/build/assets/{vendor~entry.client-zSIea5EO.js → vendor~entry.client-BaKt_PIp.js} +1 -1
  177. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js} +3 -3
  178. package/build/assets/{vendor~files-tab-C87pjSpi.js → vendor~files-tab-B6POTS66.js} +1 -1
  179. package/build/assets/vendor~index-home~home~conversation-panel~conversation-53Q_U6uP.js +13 -0
  180. package/build/assets/vendor~root-layout-DeQACFVA.js +1 -0
  181. package/build/assets/{vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js → vendor~root-layout~conversation-panel~conversation-bv7ooVgH.js} +1 -1
  182. package/build/assets/{vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js → vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-e8pX05xf.js} +1 -1
  183. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-BvS6PCK2.js} +1 -1
  184. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-DOPLJMH9.js} +2 -2
  185. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js} +1 -1
  186. package/build/assets/{verification-settings-oi54wEc1.js → verification-settings-COueVXmM.js} +1 -1
  187. package/build/assets/{wrench-B1_H-tL1.js → wrench-C95ujnYo.js} +1 -1
  188. package/build/assets/x-86ZCfxKY.js +1 -0
  189. package/build/assets/zap-DRa-r-Tf.js +1 -0
  190. package/build/index.html +4 -4
  191. package/build/locales/ar/openhands.json +88 -3
  192. package/build/locales/ca/openhands.json +88 -3
  193. package/build/locales/de/openhands.json +88 -3
  194. package/build/locales/en/openhands.json +88 -3
  195. package/build/locales/es/openhands.json +88 -3
  196. package/build/locales/fr/openhands.json +88 -3
  197. package/build/locales/it/openhands.json +88 -3
  198. package/build/locales/ja/openhands.json +88 -3
  199. package/build/locales/ko-KR/openhands.json +88 -3
  200. package/build/locales/no/openhands.json +88 -3
  201. package/build/locales/pt/openhands.json +88 -3
  202. package/build/locales/tr/openhands.json +88 -3
  203. package/build/locales/uk/openhands.json +88 -3
  204. package/build/locales/zh-CN/openhands.json +88 -3
  205. package/build/locales/zh-TW/openhands.json +88 -3
  206. package/config/defaults.json +3 -3
  207. package/dist/api/agent-server-compatibility.cjs +1 -1
  208. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  209. package/dist/api/agent-server-compatibility.js +1 -1
  210. package/dist/api/agent-server-compatibility.js.map +1 -1
  211. package/dist/api/automation-service/automation-service.api.cjs +1 -1
  212. package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
  213. package/dist/api/automation-service/automation-service.api.d.ts +10 -0
  214. package/dist/api/automation-service/automation-service.api.js +42 -0
  215. package/dist/api/automation-service/automation-service.api.js.map +1 -1
  216. package/dist/api/cloud/conversation-service.api.cjs +1 -1
  217. package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
  218. package/dist/api/cloud/conversation-service.api.d.ts +9 -0
  219. package/dist/api/cloud/conversation-service.api.js +11 -1
  220. package/dist/api/cloud/conversation-service.api.js.map +1 -1
  221. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  222. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  223. package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +24 -1
  224. package/dist/api/conversation-service/agent-server-conversation-service.api.js +116 -97
  225. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  226. package/dist/api/llm-balance-service.cjs +2 -0
  227. package/dist/api/llm-balance-service.cjs.map +1 -0
  228. package/dist/api/llm-balance-service.d.ts +33 -0
  229. package/dist/api/llm-balance-service.js +53 -0
  230. package/dist/api/llm-balance-service.js.map +1 -0
  231. package/dist/api/llm-subscription-service.cjs +1 -1
  232. package/dist/api/llm-subscription-service.cjs.map +1 -1
  233. package/dist/api/llm-subscription-service.js +42 -34
  234. package/dist/api/llm-subscription-service.js.map +1 -1
  235. package/dist/api/profiles-service/profiles-service.api.cjs +1 -1
  236. package/dist/api/profiles-service/profiles-service.api.cjs.map +1 -1
  237. package/dist/api/profiles-service/profiles-service.api.d.ts +15 -2
  238. package/dist/api/profiles-service/profiles-service.api.js +25 -2
  239. package/dist/api/profiles-service/profiles-service.api.js.map +1 -1
  240. package/dist/api/secrets-service.cjs +1 -1
  241. package/dist/api/secrets-service.cjs.map +1 -1
  242. package/dist/api/secrets-service.d.ts +5 -0
  243. package/dist/api/secrets-service.js +12 -6
  244. package/dist/api/secrets-service.js.map +1 -1
  245. package/dist/components/conversation/index.cjs +1 -1
  246. package/dist/components/conversation/index.d.ts +0 -1
  247. package/dist/components/conversation/index.js +0 -1
  248. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
  249. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
  250. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +1 -1
  251. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
  252. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs +1 -1
  253. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs.map +1 -1
  254. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js +24 -23
  255. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js.map +1 -1
  256. package/dist/components/conversation-events/chat/event-message-components/index.d.ts +0 -1
  257. package/dist/components/conversation-events/chat/group-events.cjs +1 -1
  258. package/dist/components/conversation-events/chat/group-events.cjs.map +1 -1
  259. package/dist/components/conversation-events/chat/group-events.d.ts +3 -3
  260. package/dist/components/conversation-events/chat/group-events.js +27 -26
  261. package/dist/components/conversation-events/chat/group-events.js.map +1 -1
  262. package/dist/components/features/automations/git-sync/git-sync-activity-row.d.ts +15 -0
  263. package/dist/components/features/automations/git-sync/git-sync-config-form.d.ts +13 -0
  264. package/dist/components/features/automations/git-sync/git-sync-error-banner.d.ts +6 -0
  265. package/dist/components/features/automations/git-sync/git-sync-not-local-state.d.ts +1 -0
  266. package/dist/components/features/automations/git-sync/git-sync-overview-section.d.ts +12 -0
  267. package/dist/components/features/automations/git-sync/git-sync-skeleton.d.ts +1 -0
  268. package/dist/components/features/automations/git-sync/git-sync-status-pill.d.ts +7 -0
  269. package/dist/components/features/automations/git-sync/git-sync-unsupported-state.d.ts +7 -0
  270. package/dist/components/features/automations/recommended-automations-section.d.ts +7 -0
  271. package/dist/components/features/automations/responder-deployment-modal.d.ts +2 -1
  272. package/dist/components/features/chat/chat-interface.cjs +2 -2
  273. package/dist/components/features/chat/chat-interface.cjs.map +1 -1
  274. package/dist/components/features/chat/chat-interface.js +177 -176
  275. package/dist/components/features/chat/chat-interface.js.map +1 -1
  276. package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
  277. package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
  278. package/dist/components/features/chat/components/chat-input-actions.js +123 -118
  279. package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
  280. package/dist/components/features/chat/components/chat-input-grip.cjs +1 -1
  281. package/dist/components/features/chat/components/chat-input-grip.cjs.map +1 -1
  282. package/dist/components/features/chat/components/chat-input-grip.d.ts +2 -1
  283. package/dist/components/features/chat/components/chat-input-grip.js +7 -7
  284. package/dist/components/features/chat/components/chat-input-grip.js.map +1 -1
  285. package/dist/components/features/chat/components/context-window-meter.cjs +2 -0
  286. package/dist/components/features/chat/components/context-window-meter.cjs.map +1 -0
  287. package/dist/components/features/chat/components/context-window-meter.d.ts +2 -0
  288. package/dist/components/features/chat/components/context-window-meter.js +131 -0
  289. package/dist/components/features/chat/components/context-window-meter.js.map +1 -0
  290. package/dist/components/features/chat/components/context-window-ring.cjs +2 -0
  291. package/dist/components/features/chat/components/context-window-ring.cjs.map +1 -0
  292. package/dist/components/features/chat/components/context-window-ring.d.ts +26 -0
  293. package/dist/components/features/chat/components/context-window-ring.js +45 -0
  294. package/dist/components/features/chat/components/context-window-ring.js.map +1 -0
  295. package/dist/components/features/chat/custom-chat-input.cjs +1 -1
  296. package/dist/components/features/chat/custom-chat-input.cjs.map +1 -1
  297. package/dist/components/features/chat/custom-chat-input.js +68 -67
  298. package/dist/components/features/chat/custom-chat-input.js.map +1 -1
  299. package/dist/components/features/chat/error-message-banner.cjs +1 -1
  300. package/dist/components/features/chat/error-message-banner.cjs.map +1 -1
  301. package/dist/components/features/chat/error-message-banner.d.ts +3 -1
  302. package/dist/components/features/chat/error-message-banner.js +64 -58
  303. package/dist/components/features/chat/error-message-banner.js.map +1 -1
  304. package/dist/components/features/chat/path-component.cjs +1 -1
  305. package/dist/components/features/chat/path-component.cjs.map +1 -1
  306. package/dist/components/features/chat/path-component.js +9 -6
  307. package/dist/components/features/chat/path-component.js.map +1 -1
  308. package/dist/components/features/chat/plan-preview.cjs +1 -1
  309. package/dist/components/features/chat/plan-preview.js +4 -4
  310. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs +1 -1
  311. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs.map +1 -1
  312. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.d.ts +0 -8
  313. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js +92 -50
  314. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js.map +1 -1
  315. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs +1 -1
  316. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs.map +1 -1
  317. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +7 -2
  318. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js +15 -9
  319. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js.map +1 -1
  320. package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.cjs +2 -0
  321. package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.cjs.map +1 -0
  322. package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.d.ts +20 -0
  323. package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.js +76 -0
  324. package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.js.map +1 -0
  325. package/dist/components/features/controls/server-status-context-menu.cjs +1 -1
  326. package/dist/components/features/controls/server-status-context-menu.cjs.map +1 -1
  327. package/dist/components/features/controls/server-status-context-menu.d.ts +5 -3
  328. package/dist/components/features/controls/server-status-context-menu.js +8 -8
  329. package/dist/components/features/controls/server-status-context-menu.js.map +1 -1
  330. package/dist/components/features/conversation/conversation-name-context-menu.cjs +1 -1
  331. package/dist/components/features/conversation/conversation-name-context-menu.cjs.map +1 -1
  332. package/dist/components/features/conversation/conversation-name-context-menu.js +58 -61
  333. package/dist/components/features/conversation/conversation-name-context-menu.js.map +1 -1
  334. package/dist/components/features/conversation/conversation-name-with-status.cjs +1 -1
  335. package/dist/components/features/conversation/conversation-name-with-status.cjs.map +1 -1
  336. package/dist/components/features/conversation/conversation-name-with-status.js +74 -46
  337. package/dist/components/features/conversation/conversation-name-with-status.js.map +1 -1
  338. package/dist/components/features/conversation/conversation-name.cjs +1 -1
  339. package/dist/components/features/conversation/conversation-name.cjs.map +1 -1
  340. package/dist/components/features/conversation/conversation-name.js +69 -71
  341. package/dist/components/features/conversation/conversation-name.js.map +1 -1
  342. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs +1 -1
  343. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs.map +1 -1
  344. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js +7 -6
  345. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js.map +1 -1
  346. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
  347. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
  348. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +92 -86
  349. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
  350. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
  351. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
  352. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +81 -71
  353. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
  354. package/dist/components/features/conversation/metrics-modal/cost-section.cjs +1 -1
  355. package/dist/components/features/conversation/metrics-modal/cost-section.cjs.map +1 -1
  356. package/dist/components/features/conversation/metrics-modal/cost-section.js +6 -6
  357. package/dist/components/features/conversation/metrics-modal/cost-section.js.map +1 -1
  358. package/dist/components/features/conversation/metrics-modal/metric-row.cjs +1 -1
  359. package/dist/components/features/conversation/metrics-modal/metric-row.cjs.map +1 -1
  360. package/dist/components/features/conversation/metrics-modal/metric-row.d.ts +2 -1
  361. package/dist/components/features/conversation/metrics-modal/metric-row.js +10 -9
  362. package/dist/components/features/conversation/metrics-modal/metric-row.js.map +1 -1
  363. package/dist/components/features/conversation/metrics-modal/usage-section.cjs +1 -1
  364. package/dist/components/features/conversation/metrics-modal/usage-section.cjs.map +1 -1
  365. package/dist/components/features/conversation/metrics-modal/usage-section.js +2 -1
  366. package/dist/components/features/conversation/metrics-modal/usage-section.js.map +1 -1
  367. package/dist/components/features/conversation/usage-panel/compact-context-button.cjs +2 -0
  368. package/dist/components/features/conversation/usage-panel/compact-context-button.cjs.map +1 -0
  369. package/dist/components/features/conversation/usage-panel/compact-context-button.d.ts +16 -0
  370. package/dist/components/features/conversation/usage-panel/compact-context-button.js +59 -0
  371. package/dist/components/features/conversation/usage-panel/compact-context-button.js.map +1 -0
  372. package/dist/components/features/conversation/usage-panel/context-meter.cjs +2 -0
  373. package/dist/components/features/conversation/usage-panel/context-meter.cjs.map +1 -0
  374. package/dist/components/features/conversation/usage-panel/context-meter.d.ts +19 -0
  375. package/dist/components/features/conversation/usage-panel/context-meter.js +46 -0
  376. package/dist/components/features/conversation/usage-panel/context-meter.js.map +1 -0
  377. package/dist/components/features/conversation/usage-panel/provider-balance-card.cjs +2 -0
  378. package/dist/components/features/conversation/usage-panel/provider-balance-card.cjs.map +1 -0
  379. package/dist/components/features/conversation/usage-panel/provider-balance-card.d.ts +7 -0
  380. package/dist/components/features/conversation/usage-panel/provider-balance-card.js +57 -0
  381. package/dist/components/features/conversation/usage-panel/provider-balance-card.js.map +1 -0
  382. package/dist/components/features/conversation/usage-panel/usage-panel.cjs +2 -0
  383. package/dist/components/features/conversation/usage-panel/usage-panel.cjs.map +1 -0
  384. package/dist/components/features/conversation/usage-panel/usage-panel.d.ts +9 -0
  385. package/dist/components/features/conversation/usage-panel/usage-panel.js +68 -0
  386. package/dist/components/features/conversation/usage-panel/usage-panel.js.map +1 -0
  387. package/dist/components/features/conversation-panel/budget-display.cjs +1 -1
  388. package/dist/components/features/conversation-panel/budget-display.cjs.map +1 -1
  389. package/dist/components/features/conversation-panel/budget-display.js +10 -13
  390. package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
  391. package/dist/components/features/conversation-panel/budget-progress-bar.cjs +1 -1
  392. package/dist/components/features/conversation-panel/budget-progress-bar.cjs.map +1 -1
  393. package/dist/components/features/conversation-panel/budget-progress-bar.js +2 -2
  394. package/dist/components/features/conversation-panel/budget-progress-bar.js.map +1 -1
  395. package/dist/components/features/conversation-panel/compact-conversation-row.cjs +1 -1
  396. package/dist/components/features/conversation-panel/compact-conversation-row.js +6 -6
  397. package/dist/components/features/conversation-panel/confirm-archive-modal.cjs +2 -0
  398. package/dist/components/features/conversation-panel/confirm-archive-modal.cjs.map +1 -0
  399. package/dist/components/features/conversation-panel/confirm-archive-modal.d.ts +8 -0
  400. package/dist/components/features/conversation-panel/confirm-archive-modal.js +48 -0
  401. package/dist/components/features/conversation-panel/confirm-archive-modal.js.map +1 -0
  402. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
  403. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs.map +1 -1
  404. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +3 -1
  405. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +39 -34
  406. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js.map +1 -1
  407. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
  408. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
  409. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +3 -1
  410. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +104 -80
  411. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
  412. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
  413. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
  414. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +7 -1
  415. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +25 -17
  416. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
  417. package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs +1 -1
  418. package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs.map +1 -1
  419. package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +9 -1
  420. package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +94 -84
  421. package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
  422. package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs +1 -1
  423. package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs.map +1 -1
  424. package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +2 -1
  425. package/dist/components/features/conversation-panel/conversation-group-folder-list.js +32 -31
  426. package/dist/components/features/conversation-panel/conversation-group-folder-list.js.map +1 -1
  427. package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs +1 -1
  428. package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs.map +1 -1
  429. package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +2 -1
  430. package/dist/components/features/conversation-panel/conversation-group-folder-row.js +27 -26
  431. package/dist/components/features/conversation-panel/conversation-group-folder-row.js.map +1 -1
  432. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +1 -1
  433. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +1 -1
  434. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +3 -1
  435. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +116 -106
  436. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +1 -1
  437. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
  438. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
  439. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +27 -0
  440. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +69 -46
  441. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
  442. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  443. package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
  444. package/dist/components/features/conversation-panel/conversation-panel.js +240 -175
  445. package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
  446. package/dist/components/features/files-tab/file-content-viewer.cjs +1 -1
  447. package/dist/components/features/files-tab/file-content-viewer.cjs.map +1 -1
  448. package/dist/components/features/files-tab/file-content-viewer.js +22 -25
  449. package/dist/components/features/files-tab/file-content-viewer.js.map +1 -1
  450. package/dist/components/features/markdown/markdown-table-scroll.cjs +1 -1
  451. package/dist/components/features/markdown/markdown-table-scroll.cjs.map +1 -1
  452. package/dist/components/features/markdown/markdown-table-scroll.js +2 -2
  453. package/dist/components/features/markdown/markdown-table-scroll.js.map +1 -1
  454. package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +10 -7
  455. package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs +1 -1
  456. package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs.map +1 -1
  457. package/dist/components/shared/buttons/conversation-confirmation-buttons.js +2 -2
  458. package/dist/components/shared/buttons/conversation-confirmation-buttons.js.map +1 -1
  459. package/dist/components/shared/modals/confirmation-modals/base-modal.cjs +1 -1
  460. package/dist/components/shared/modals/confirmation-modals/base-modal.cjs.map +1 -1
  461. package/dist/components/shared/modals/confirmation-modals/base-modal.js +1 -1
  462. package/dist/components/shared/modals/confirmation-modals/base-modal.js.map +1 -1
  463. package/dist/config/defaults.cjs +1 -1
  464. package/dist/config/defaults.cjs.map +1 -1
  465. package/dist/config/defaults.js +3 -3
  466. package/dist/config/defaults.js.map +1 -1
  467. package/dist/constants/llm-balance.cjs +2 -0
  468. package/dist/constants/llm-balance.cjs.map +1 -0
  469. package/dist/constants/llm-balance.d.ts +13 -0
  470. package/dist/constants/llm-balance.js +6 -0
  471. package/dist/constants/llm-balance.js.map +1 -0
  472. package/dist/contexts/conversation-websocket-context.cjs +2 -2
  473. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  474. package/dist/contexts/conversation-websocket-context.js +227 -219
  475. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  476. package/dist/hooks/chat/use-grip-resize.cjs +1 -1
  477. package/dist/hooks/chat/use-grip-resize.cjs.map +1 -1
  478. package/dist/hooks/chat/use-grip-resize.d.ts +1 -0
  479. package/dist/hooks/chat/use-grip-resize.js +39 -30
  480. package/dist/hooks/chat/use-grip-resize.js.map +1 -1
  481. package/dist/hooks/mutation/use-condense-conversation.cjs +2 -0
  482. package/dist/hooks/mutation/use-condense-conversation.cjs.map +1 -0
  483. package/dist/hooks/mutation/use-condense-conversation.d.ts +12 -0
  484. package/dist/hooks/mutation/use-condense-conversation.js +17 -0
  485. package/dist/hooks/mutation/use-condense-conversation.js.map +1 -0
  486. package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
  487. package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
  488. package/dist/hooks/mutation/use-create-conversation.js +30 -21
  489. package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
  490. package/dist/hooks/mutation/use-new-conversation-command.cjs +1 -1
  491. package/dist/hooks/mutation/use-new-conversation-command.cjs.map +1 -1
  492. package/dist/hooks/mutation/use-new-conversation-command.js +1 -1
  493. package/dist/hooks/mutation/use-new-conversation-command.js.map +1 -1
  494. package/dist/hooks/query/use-commit-changes.cjs +1 -1
  495. package/dist/hooks/query/use-commit-changes.js +4 -4
  496. package/dist/hooks/query/use-conversation-metrics.cjs +1 -1
  497. package/dist/hooks/query/use-conversation-metrics.cjs.map +1 -1
  498. package/dist/hooks/query/use-conversation-metrics.js +1 -1
  499. package/dist/hooks/query/use-conversation-metrics.js.map +1 -1
  500. package/dist/hooks/query/use-git-sync.d.ts +19 -0
  501. package/dist/hooks/query/use-llm-balance.cjs +2 -0
  502. package/dist/hooks/query/use-llm-balance.cjs.map +1 -0
  503. package/dist/hooks/query/use-llm-balance.d.ts +10 -0
  504. package/dist/hooks/query/use-llm-balance.js +24 -0
  505. package/dist/hooks/query/use-llm-balance.js.map +1 -0
  506. package/dist/hooks/query/use-search-providers.cjs +1 -1
  507. package/dist/hooks/query/use-search-providers.cjs.map +1 -1
  508. package/dist/hooks/query/use-search-providers.js +1 -1
  509. package/dist/hooks/query/use-search-providers.js.map +1 -1
  510. package/dist/hooks/query/use-task-polling.cjs +1 -1
  511. package/dist/hooks/query/use-task-polling.cjs.map +1 -1
  512. package/dist/hooks/query/use-task-polling.js +12 -10
  513. package/dist/hooks/query/use-task-polling.js.map +1 -1
  514. package/dist/hooks/query/use-unified-get-git-changes.cjs +1 -1
  515. package/dist/hooks/query/use-unified-get-git-changes.js +4 -4
  516. package/dist/hooks/query/use-unified-git-commits.cjs +1 -1
  517. package/dist/hooks/query/use-unified-git-commits.js +4 -4
  518. package/dist/hooks/query/use-unified-git-diff.cjs +1 -1
  519. package/dist/hooks/query/use-unified-git-diff.js +4 -4
  520. package/dist/hooks/query/use-workspace-files.cjs +1 -1
  521. package/dist/hooks/query/use-workspace-files.cjs.map +1 -1
  522. package/dist/hooks/query/use-workspace-files.d.ts +14 -4
  523. package/dist/hooks/query/use-workspace-files.js +45 -32
  524. package/dist/hooks/query/use-workspace-files.js.map +1 -1
  525. package/dist/hooks/use-await-context-compaction.cjs +2 -0
  526. package/dist/hooks/use-await-context-compaction.cjs.map +1 -0
  527. package/dist/hooks/use-await-context-compaction.d.ts +38 -0
  528. package/dist/hooks/use-await-context-compaction.js +61 -0
  529. package/dist/hooks/use-await-context-compaction.js.map +1 -0
  530. package/dist/hooks/use-compact-context-action.cjs +2 -0
  531. package/dist/hooks/use-compact-context-action.cjs.map +1 -0
  532. package/dist/hooks/use-compact-context-action.d.ts +10 -0
  533. package/dist/hooks/use-compact-context-action.js +61 -0
  534. package/dist/hooks/use-compact-context-action.js.map +1 -0
  535. package/dist/hooks/use-context-window-usage.cjs +2 -0
  536. package/dist/hooks/use-context-window-usage.cjs.map +1 -0
  537. package/dist/hooks/use-context-window-usage.d.ts +5 -0
  538. package/dist/hooks/use-context-window-usage.js +20 -0
  539. package/dist/hooks/use-context-window-usage.js.map +1 -0
  540. package/dist/hooks/use-conversation-name-context-menu.cjs +1 -1
  541. package/dist/hooks/use-conversation-name-context-menu.cjs.map +1 -1
  542. package/dist/hooks/use-conversation-name-context-menu.d.ts +0 -3
  543. package/dist/hooks/use-conversation-name-context-menu.js +54 -57
  544. package/dist/hooks/use-conversation-name-context-menu.js.map +1 -1
  545. package/dist/hooks/use-drag-resize.cjs +1 -1
  546. package/dist/hooks/use-drag-resize.cjs.map +1 -1
  547. package/dist/hooks/use-drag-resize.d.ts +8 -0
  548. package/dist/hooks/use-drag-resize.js +21 -18
  549. package/dist/hooks/use-drag-resize.js.map +1 -1
  550. package/dist/hooks/use-live-conversation-metrics.cjs +2 -0
  551. package/dist/hooks/use-live-conversation-metrics.cjs.map +1 -0
  552. package/dist/hooks/use-live-conversation-metrics.d.ts +18 -0
  553. package/dist/hooks/use-live-conversation-metrics.js +37 -0
  554. package/dist/hooks/use-live-conversation-metrics.js.map +1 -0
  555. package/dist/hooks/use-responder-url-secret.d.ts +5 -0
  556. package/dist/hooks/use-select-conversation-tab.cjs +1 -1
  557. package/dist/hooks/use-select-conversation-tab.cjs.map +1 -1
  558. package/dist/hooks/use-select-conversation-tab.js +2 -2
  559. package/dist/hooks/use-select-conversation-tab.js.map +1 -1
  560. package/dist/hooks/use-tracking.cjs +1 -1
  561. package/dist/hooks/use-tracking.cjs.map +1 -1
  562. package/dist/hooks/use-tracking.d.ts +6 -0
  563. package/dist/hooks/use-tracking.js +6 -0
  564. package/dist/hooks/use-tracking.js.map +1 -1
  565. package/dist/i18n/declaration.cjs +1 -1
  566. package/dist/i18n/declaration.cjs.map +1 -1
  567. package/dist/i18n/declaration.d.ts +86 -1
  568. package/dist/i18n/declaration.js +1 -1
  569. package/dist/i18n/declaration.js.map +1 -1
  570. package/dist/i18n/translation.cjs +2 -2
  571. package/dist/i18n/translation.cjs.map +1 -1
  572. package/dist/i18n/translation.js +1475 -30
  573. package/dist/i18n/translation.js.map +1 -1
  574. package/dist/index.cjs +1 -1
  575. package/dist/index.js +28 -29
  576. package/dist/lib/index.cjs +1 -1
  577. package/dist/lib/index.js +0 -1
  578. package/dist/locales/ar/openhands.json +88 -3
  579. package/dist/locales/ca/openhands.json +88 -3
  580. package/dist/locales/de/openhands.json +88 -3
  581. package/dist/locales/en/openhands.json +88 -3
  582. package/dist/locales/es/openhands.json +88 -3
  583. package/dist/locales/fr/openhands.json +88 -3
  584. package/dist/locales/it/openhands.json +88 -3
  585. package/dist/locales/ja/openhands.json +88 -3
  586. package/dist/locales/ko-KR/openhands.json +88 -3
  587. package/dist/locales/no/openhands.json +88 -3
  588. package/dist/locales/pt/openhands.json +88 -3
  589. package/dist/locales/tr/openhands.json +88 -3
  590. package/dist/locales/uk/openhands.json +88 -3
  591. package/dist/locales/zh-CN/openhands.json +88 -3
  592. package/dist/locales/zh-TW/openhands.json +88 -3
  593. package/dist/node_modules/@microlink/react-json-view/dist/main.cjs +5 -5
  594. package/dist/node_modules/@microlink/react-json-view/dist/main.cjs.map +1 -1
  595. package/dist/node_modules/@microlink/react-json-view/dist/main.js +5194 -5187
  596. package/dist/node_modules/@microlink/react-json-view/dist/main.js.map +1 -1
  597. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +2 -1
  598. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs.map +1 -0
  599. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +21 -1
  600. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js.map +1 -0
  601. package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs +2 -1
  602. package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs.map +1 -0
  603. package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js +22 -1
  604. package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js.map +1 -0
  605. package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs +2 -1
  606. package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs.map +1 -0
  607. package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js +33 -1
  608. package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js.map +1 -0
  609. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs +1 -1
  610. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs.map +1 -1
  611. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js +56 -22
  612. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js.map +1 -1
  613. package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.cjs +1 -1
  614. package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.cjs.map +1 -1
  615. package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.js +3 -0
  616. package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.js.map +1 -1
  617. package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs +2 -1
  618. package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs.map +1 -0
  619. package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js +31 -1
  620. package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js.map +1 -0
  621. package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs +2 -1
  622. package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs.map +1 -0
  623. package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js +21 -1
  624. package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js.map +1 -0
  625. package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs +2 -1
  626. package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs.map +1 -0
  627. package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js +21 -1
  628. package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js.map +1 -0
  629. package/dist/node_modules/@openhands/typescript-client/dist/conversation/local-conversation.cjs.map +1 -1
  630. package/dist/node_modules/@openhands/typescript-client/dist/conversation/local-conversation.js.map +1 -1
  631. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
  632. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
  633. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +9 -5
  634. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
  635. package/dist/node_modules/i18next-http-backend/esm/index.cjs +1 -1
  636. package/dist/node_modules/i18next-http-backend/esm/index.cjs.map +1 -1
  637. package/dist/node_modules/i18next-http-backend/esm/index.js +2 -2
  638. package/dist/node_modules/i18next-http-backend/esm/index.js.map +1 -1
  639. package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.cjs +2 -0
  640. package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.cjs.map +1 -0
  641. package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.js +31 -0
  642. package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.js.map +1 -0
  643. package/dist/node_modules/lucide-react/dist/esm/icons/archive.cjs +2 -0
  644. package/dist/node_modules/lucide-react/dist/esm/icons/archive.cjs.map +1 -0
  645. package/dist/node_modules/lucide-react/dist/esm/icons/archive.js +23 -0
  646. package/dist/node_modules/lucide-react/dist/esm/icons/archive.js.map +1 -0
  647. package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs +2 -0
  648. package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs.map +1 -0
  649. package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +27 -0
  650. package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js.map +1 -0
  651. package/dist/node_modules/lucide-react/dist/esm/icons/gauge.cjs +2 -0
  652. package/dist/node_modules/lucide-react/dist/esm/icons/gauge.cjs.map +1 -0
  653. package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js +12 -0
  654. package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js.map +1 -0
  655. package/dist/node_modules/lucide-react/dist/esm/icons/minimize.cjs +2 -0
  656. package/dist/node_modules/lucide-react/dist/esm/icons/minimize.cjs.map +1 -0
  657. package/dist/node_modules/lucide-react/dist/esm/icons/minimize.js +23 -0
  658. package/dist/node_modules/lucide-react/dist/esm/icons/minimize.js.map +1 -0
  659. package/dist/node_modules/zustand/esm/middleware.cjs +3 -3
  660. package/dist/node_modules/zustand/esm/middleware.cjs.map +1 -1
  661. package/dist/node_modules/zustand/esm/middleware.js +33 -31
  662. package/dist/node_modules/zustand/esm/middleware.js.map +1 -1
  663. package/dist/package.cjs +1 -1
  664. package/dist/package.cjs.map +1 -1
  665. package/dist/package.js +17 -16
  666. package/dist/package.js.map +1 -1
  667. package/dist/routes/files-tab.cjs +1 -1
  668. package/dist/routes/files-tab.js +11 -11
  669. package/dist/routes/files-tab.js.map +1 -1
  670. package/dist/routes/usage-tab.cjs +2 -0
  671. package/dist/routes/usage-tab.cjs.map +1 -0
  672. package/dist/routes/usage-tab.d.ts +2 -0
  673. package/dist/routes/usage-tab.js +10 -0
  674. package/dist/routes/usage-tab.js.map +1 -0
  675. package/dist/services/child-conversation-launch.cjs +1 -1
  676. package/dist/services/child-conversation-launch.cjs.map +1 -1
  677. package/dist/services/child-conversation-launch.js +11 -5
  678. package/dist/services/child-conversation-launch.js.map +1 -1
  679. package/dist/services/settings.cjs +1 -1
  680. package/dist/services/settings.cjs.map +1 -1
  681. package/dist/services/settings.js +2 -2
  682. package/dist/services/settings.js.map +1 -1
  683. package/dist/services/telemetry.cjs +1 -1
  684. package/dist/services/telemetry.cjs.map +1 -1
  685. package/dist/services/telemetry.js +47 -51
  686. package/dist/services/telemetry.js.map +1 -1
  687. package/dist/stores/archived-conversations-store.cjs +2 -0
  688. package/dist/stores/archived-conversations-store.cjs.map +1 -0
  689. package/dist/stores/archived-conversations-store.d.ts +24 -0
  690. package/dist/stores/archived-conversations-store.js +33 -0
  691. package/dist/stores/archived-conversations-store.js.map +1 -0
  692. package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
  693. package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
  694. package/dist/stores/conversation-panel-preferences-store.d.ts +3 -0
  695. package/dist/stores/conversation-panel-preferences-store.js +4 -0
  696. package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
  697. package/dist/stores/conversation-store.cjs.map +1 -1
  698. package/dist/stores/conversation-store.d.ts +1 -1
  699. package/dist/stores/conversation-store.js.map +1 -1
  700. package/dist/stores/error-message-store.cjs +1 -1
  701. package/dist/stores/error-message-store.cjs.map +1 -1
  702. package/dist/stores/error-message-store.d.ts +3 -1
  703. package/dist/stores/error-message-store.js +5 -3
  704. package/dist/stores/error-message-store.js.map +1 -1
  705. package/dist/stores/metrics-store.cjs +1 -1
  706. package/dist/stores/metrics-store.cjs.map +1 -1
  707. package/dist/stores/metrics-store.d.ts +1 -0
  708. package/dist/stores/metrics-store.js +7 -4
  709. package/dist/stores/metrics-store.js.map +1 -1
  710. package/dist/types/agent-server/core/events/condensation-event.d.ts +3 -0
  711. package/dist/types/agent-server/core/events/conversation-state-event.d.ts +4 -6
  712. package/dist/types/agent-server/type-guards.cjs +1 -1
  713. package/dist/types/agent-server/type-guards.cjs.map +1 -1
  714. package/dist/types/agent-server/type-guards.d.ts +5 -0
  715. package/dist/types/agent-server/type-guards.js +3 -3
  716. package/dist/types/agent-server/type-guards.js.map +1 -1
  717. package/dist/types/git-sync.d.ts +51 -0
  718. package/dist/utils/conversation-local-storage.cjs +1 -1
  719. package/dist/utils/conversation-local-storage.cjs.map +1 -1
  720. package/dist/utils/conversation-local-storage.js +2 -1
  721. package/dist/utils/conversation-local-storage.js.map +1 -1
  722. package/dist/utils/error-handler.cjs +1 -1
  723. package/dist/utils/error-handler.cjs.map +1 -1
  724. package/dist/utils/error-handler.d.ts +3 -2
  725. package/dist/utils/error-handler.js +18 -5
  726. package/dist/utils/error-handler.js.map +1 -1
  727. package/dist/utils/format-model-name.cjs +1 -1
  728. package/dist/utils/format-model-name.cjs.map +1 -1
  729. package/dist/utils/format-model-name.d.ts +1 -0
  730. package/dist/utils/format-model-name.js +1 -0
  731. package/dist/utils/format-model-name.js.map +1 -1
  732. package/dist/utils/format-token-count.cjs +2 -0
  733. package/dist/utils/format-token-count.cjs.map +1 -0
  734. package/dist/utils/format-token-count.d.ts +3 -0
  735. package/dist/utils/format-token-count.js +19 -0
  736. package/dist/utils/format-token-count.js.map +1 -0
  737. package/dist/utils/hover-reveal-classes.cjs +2 -0
  738. package/dist/utils/hover-reveal-classes.cjs.map +1 -0
  739. package/dist/utils/hover-reveal-classes.d.ts +34 -0
  740. package/dist/utils/hover-reveal-classes.js +41 -0
  741. package/dist/utils/hover-reveal-classes.js.map +1 -0
  742. package/dist/utils/is-markdown-file-path.cjs +2 -0
  743. package/dist/utils/is-markdown-file-path.cjs.map +1 -0
  744. package/dist/utils/is-markdown-file-path.d.ts +4 -0
  745. package/dist/utils/is-markdown-file-path.js +14 -0
  746. package/dist/utils/is-markdown-file-path.js.map +1 -0
  747. package/dist/utils/mcp-marketplace-utils.cjs +1 -1
  748. package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
  749. package/dist/utils/mcp-marketplace-utils.d.ts +7 -0
  750. package/dist/utils/mcp-marketplace-utils.js +19 -16
  751. package/dist/utils/mcp-marketplace-utils.js.map +1 -1
  752. package/dist/utils/transcript-export/index.cjs +3 -3
  753. package/dist/utils/transcript-export/index.cjs.map +1 -1
  754. package/dist/utils/transcript-export/index.js +12 -12
  755. package/dist/utils/transcript-export/index.js.map +1 -1
  756. package/dist/utils/transcript-export/load-complete-events.cjs +1 -1
  757. package/dist/utils/transcript-export/load-complete-events.cjs.map +1 -1
  758. package/dist/utils/transcript-export/load-complete-events.js +25 -17
  759. package/dist/utils/transcript-export/load-complete-events.js.map +1 -1
  760. package/dist/utils/workspace-relative-path.cjs +2 -0
  761. package/dist/utils/workspace-relative-path.cjs.map +1 -0
  762. package/dist/utils/workspace-relative-path.d.ts +10 -0
  763. package/dist/utils/workspace-relative-path.js +22 -0
  764. package/dist/utils/workspace-relative-path.js.map +1 -0
  765. package/package.json +17 -16
  766. package/scripts/check-sdk-version-sync.mjs +6 -6
  767. package/scripts/check-translation-completeness.cjs +3 -0
  768. package/scripts/dev-process-utils.mjs +6 -1
  769. package/scripts/dev-safe.mjs +57 -2
  770. package/scripts/dev-with-automation.mjs +98 -9
  771. package/build/assets/active-backend-context-B_bg5h9O.js +0 -2
  772. package/build/assets/agent-profiles-settings-hd2cAIZM.js +0 -1
  773. package/build/assets/agent-server-conversation-service.api-BheU4HX3.js +0 -86
  774. package/build/assets/agent-settings-D_SVrWhI.js +0 -1
  775. package/build/assets/automation-detail-C0SxWTnQ.js +0 -3
  776. package/build/assets/automation-export-BjQa_fT6.js +0 -2
  777. package/build/assets/automation-setup-route-BzCNpljP.js +0 -1
  778. package/build/assets/automations-list-dZg8zOCl.js +0 -1
  779. package/build/assets/bot-DuN83i3p.js +0 -1
  780. package/build/assets/browser--eoQOo4M.js +0 -6
  781. package/build/assets/check-DLOKoFU9.js +0 -1
  782. package/build/assets/chevron-down-CnIbtM6i.js +0 -1
  783. package/build/assets/circle-check-CxCYJrpZ.js +0 -1
  784. package/build/assets/cloud-funnel-analytics-CcSez21r.js +0 -1
  785. package/build/assets/conversation-Cmyw9bFh.js +0 -90
  786. package/build/assets/conversation-CvoGZ5vC.js +0 -1
  787. package/build/assets/conversation-panel-CvoGZ5vC.js +0 -1
  788. package/build/assets/conversation-state-store-CtgILxWF.js +0 -1
  789. package/build/assets/conversation-store-B8Eahyeg.js +0 -6
  790. package/build/assets/external-link-zWbg5KXS.js +0 -1
  791. package/build/assets/files-tab-D5zuU5TY.js +0 -1
  792. package/build/assets/format-model-name-BN_rx1Y3.js +0 -1
  793. package/build/assets/format-relative-time-BerVamGl.js +0 -1
  794. package/build/assets/git-provider-icon-zuKz2cwo.js +0 -1
  795. package/build/assets/git-repo-dropdown-Bo7ciSNX.js +0 -1
  796. package/build/assets/home-DqyeeFA_.js +0 -1
  797. package/build/assets/home-Y0aDou-a.js +0 -1
  798. package/build/assets/index-home-DqyeeFA_.js +0 -1
  799. package/build/assets/info-C9lpK5pw.js +0 -1
  800. package/build/assets/install-server-modal-DW6dSyGr.js +0 -1
  801. package/build/assets/kebab-menu-item-content-CKydZrbH.js +0 -1
  802. package/build/assets/llm-not-configured-banner-DCE_0B4I.js +0 -27
  803. package/build/assets/llm-settings-8eWBF3Ij.js +0 -1
  804. package/build/assets/llm-settings-D9ko42Pi.js +0 -1
  805. package/build/assets/llm-subscription-service-B3K-97lP.js +0 -1
  806. package/build/assets/loader-circle-C5AnEN8r.js +0 -1
  807. package/build/assets/manifest-e1c3bc3b.js +0 -1
  808. package/build/assets/manifest-subpage-layout-Ds7G5GZ8.js +0 -1
  809. package/build/assets/markdown-renderer-DzvgdZey.js +0 -8
  810. package/build/assets/mcp-marketplace-utils-DSLou4n7.js +0 -1
  811. package/build/assets/messages-B2l0qLVk.js +0 -40
  812. package/build/assets/onboarding-modal-DrrGlEQq.js +0 -1
  813. package/build/assets/pencil-Bl3GWhgq.js +0 -1
  814. package/build/assets/plus-CtzlyAoF.js +0 -1
  815. package/build/assets/profiles-service.api-vcE_jJCe.js +0 -1
  816. package/build/assets/providers-CdrPPm0z.js +0 -1
  817. package/build/assets/recommended-automations-launcher-DIYgUdMm.js +0 -1
  818. package/build/assets/refresh-cw-B9GhC3QC.js +0 -1
  819. package/build/assets/root-CBBi6IAe.js +0 -2
  820. package/build/assets/root-CRK9fOFd.css +0 -1
  821. package/build/assets/root-layout-BFN2rCOy.js +0 -2
  822. package/build/assets/search-CYaiKHRp.js +0 -1
  823. package/build/assets/secrets-service-BHF4fxML.js +0 -1
  824. package/build/assets/secrets-settings-aBGXtQhX.js +0 -1
  825. package/build/assets/shared-conversation-BIAcuORk.js +0 -1
  826. package/build/assets/shield-check-D2cpEpv3.js +0 -1
  827. package/build/assets/trash-2-CzDVN-Iw.js +0 -1
  828. package/build/assets/use-acp-credential-form-DGyo0QvL.js +0 -1
  829. package/build/assets/use-agent-profiles-B37XWDLq.js +0 -1
  830. package/build/assets/use-config-DapX3pjC.js +0 -1
  831. package/build/assets/use-create-conversation-CRf1dCm5.js +0 -1
  832. package/build/assets/use-create-secret-DcpT3RPw.js +0 -1
  833. package/build/assets/use-is-authed-Bka89Xmm.js +0 -1
  834. package/build/assets/use-is-creating-conversation-CVefC9Ns.js +0 -1
  835. package/build/assets/use-llm-profiles-CHxqoHiN.js +0 -1
  836. package/build/assets/use-manifest-capabilities-zihHDbMW.js +0 -1
  837. package/build/assets/use-save-agent-profile-CH9_EXQG.js +0 -1
  838. package/build/assets/use-tracking-salbPJxT.js +0 -3
  839. package/build/assets/utils-DPQfkd-7.js +0 -1
  840. package/build/assets/vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js +0 -13
  841. package/build/assets/x-RYDBg-e2.js +0 -1
  842. package/build/assets/zap-tbKDzCe3.js +0 -1
  843. package/dist/api/cloud/suggestions-service.api.d.ts +0 -8
  844. package/dist/api/suggestions-service/suggestions-service.api.d.ts +0 -11
  845. package/dist/components/conversation-events/chat/event-message-components/observation-pair-event-message.d.ts +0 -7
  846. package/dist/components/conversation-events/index.d.ts +0 -1
  847. package/dist/components/features/automations/metadata-chip.d.ts +0 -6
  848. package/dist/components/features/chat/task-tracking/status-badge.d.ts +0 -5
  849. package/dist/components/features/chat/task-tracking/status-icon.d.ts +0 -5
  850. package/dist/components/features/chat/task-tracking/task-list-section.d.ts +0 -10
  851. package/dist/components/features/controls/tools.d.ts +0 -2
  852. package/dist/components/features/conversation/metrics-modal/context-window-section.cjs +0 -2
  853. package/dist/components/features/conversation/metrics-modal/context-window-section.cjs.map +0 -1
  854. package/dist/components/features/conversation/metrics-modal/context-window-section.d.ts +0 -6
  855. package/dist/components/features/conversation/metrics-modal/context-window-section.js +0 -46
  856. package/dist/components/features/conversation/metrics-modal/context-window-section.js.map +0 -1
  857. package/dist/components/features/conversation/metrics-modal/empty-state.cjs +0 -2
  858. package/dist/components/features/conversation/metrics-modal/empty-state.cjs.map +0 -1
  859. package/dist/components/features/conversation/metrics-modal/empty-state.d.ts +0 -1
  860. package/dist/components/features/conversation/metrics-modal/empty-state.js +0 -18
  861. package/dist/components/features/conversation/metrics-modal/empty-state.js.map +0 -1
  862. package/dist/components/features/conversation/metrics-modal/metrics-modal-header.cjs +0 -2
  863. package/dist/components/features/conversation/metrics-modal/metrics-modal-header.cjs.map +0 -1
  864. package/dist/components/features/conversation/metrics-modal/metrics-modal-header.d.ts +0 -5
  865. package/dist/components/features/conversation/metrics-modal/metrics-modal-header.js +0 -20
  866. package/dist/components/features/conversation/metrics-modal/metrics-modal-header.js.map +0 -1
  867. package/dist/components/features/conversation/metrics-modal/metrics-modal.cjs +0 -2
  868. package/dist/components/features/conversation/metrics-modal/metrics-modal.cjs.map +0 -1
  869. package/dist/components/features/conversation/metrics-modal/metrics-modal.d.ts +0 -6
  870. package/dist/components/features/conversation/metrics-modal/metrics-modal.js +0 -57
  871. package/dist/components/features/conversation/metrics-modal/metrics-modal.js.map +0 -1
  872. package/dist/components/features/conversation-panel/new-conversation-button.d.ts +0 -23
  873. package/dist/components/features/home/home-header/guide-message.d.ts +0 -1
  874. package/dist/components/features/home/home-header/home-header.d.ts +0 -1
  875. package/dist/components/features/home/new-conversation/create-conversation-button.d.ts +0 -1
  876. package/dist/components/features/home/new-conversation/new-conversation.d.ts +0 -1
  877. package/dist/components/features/home/new-conversation.d.ts +0 -1
  878. package/dist/components/features/home/tasks/task-card.d.ts +0 -6
  879. package/dist/components/features/home/tasks/task-group.d.ts +0 -7
  880. package/dist/components/features/home/tasks/task-issue-number.d.ts +0 -6
  881. package/dist/components/features/home/tasks/task-item-title.d.ts +0 -1
  882. package/dist/components/features/home/tasks/task-suggestions-skeleton.d.ts +0 -1
  883. package/dist/components/features/home/tasks/task-suggestions.d.ts +0 -6
  884. package/dist/components/features/settings/agent-server-onboarding.d.ts +0 -10
  885. package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +0 -6
  886. package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +0 -8
  887. package/dist/hooks/query/use-suggested-tasks.d.ts +0 -1
  888. package/dist/hooks/use-should-show-user-features.d.ts +0 -1
  889. package/dist/icons/u-credit-card.cjs +0 -2
  890. package/dist/icons/u-credit-card.cjs.map +0 -1
  891. package/dist/icons/u-credit-card.js +0 -21
  892. package/dist/icons/u-credit-card.js.map +0 -1
  893. package/dist/ui/card-title.d.ts +0 -16
  894. package/dist/ui/card.d.ts +0 -14
  895. package/dist/utils/group-suggested-tasks.d.ts +0 -7
  896. /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js} +0 -0
  897. /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js} +0 -0
  898. /package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BOVIFA_g.js} +0 -0
  899. /package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C0JXQb_q.js} +0 -0
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/manage-backends-modal-BTqNPhzc.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/vendor-styling-Ck5D_A2Q.js","assets/active-backend-context-BZDG15C0.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js","assets/utils-DUD5ScdA.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js","assets/useQuery-Bs5NFz2s.js","assets/backend-form-modal-CbCemvHt.js","assets/chevron-down-CgGcmtE2.js","assets/cloud-funnel-analytics-GlCUG0gk.js","assets/info-CLoC1LRo.js","assets/use-tracking-Bhu7gk2y.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BOVIFA_g.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C0JXQb_q.js","assets/proxy-DYDXxtje.js","assets/segmented-toggle-DiVfTZuN.js","assets/use-onboarding-completion-Bs8PcXik.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-DOPLJMH9.js","assets/useQueries-xDrGlTO_.js","assets/organization-service.api-BztSy69u.js","assets/brand-button-Blxv5nww.js","assets/form-control-classes-CGXBLcn1.js","assets/settings-input-CWUEHHvS.js","assets/modal-backdrop-BSzNhM4r.js","assets/modal-body-BdKfD3Hl.js","assets/modal-close-button-objukxk_.js","assets/navigation-context-CQZwH_tC.js","assets/modal-classes-D5_b5vMi.js","assets/pencil-49avMHlD.js","assets/plus-C0BagBpV.js","assets/refresh-cw-nmcesifB.js","assets/trash-2-yZnDM4Ji.js","assets/confirmation-modal-CiEwxZAA.js","assets/use-cloud-current-user-id-DvUVqCle.js","assets/api-key-entry-screen-DaZnOlVo.js","assets/onboarding-modal-Da4yHzsA.js","assets/use-is-creating-conversation-BvYpmb3v.js","assets/chat-send-button-BD2tii1r.js","assets/check-DSuS-lyr.js","assets/circle-check-CG5-NPw7.js","assets/loader-circle-D7IagAyF.js","assets/llm-settings-BLAMK2tR.js","assets/useMutation-6ZsQCqAn.js","assets/back-nav-button-H_ThtDA0.js","assets/navigation-link-Bxo3-4vo.js","assets/map-provider-BK4HnqYz.js","assets/external-link-C0UpBgsE.js","assets/profiles-service.api-BLr7FXec.js","assets/settings-service.api-3yAUFcaP.js","assets/settings-DcNPxz0v.js","assets/llm-subscription-service-SfnEV9Uc.js","assets/llm-subscription-DTqtBCWz.js","assets/use-can-manage-org-profiles-Dz_8Eqkv.js","assets/dropdown-classes-tLhpwtxS.js","assets/badge-B-51h-SW.js","assets/base-modal-BbjycA8X.js","assets/sdk-section-page-BbBEQQjq.js","assets/switch-skeleton-DwOoCqaL.js","assets/schema-field-C59lVZTA.js","assets/dist-Bl64nBZL.js","assets/settings-dropdown-input-Ba1UN5Du.js","assets/combobox-caret-DvpEsh2O.js","assets/settings-switch-Dk9hChx1.js","assets/toggle-switch-B2MLKsgt.js","assets/use-is-authed-2UrDIziV.js","assets/typography-DB5HoCk0.js","assets/use-save-settings-BahvC2Gw.js","assets/use-settings-C6ZxpBDX.js","assets/extension-module-card-classes-Bo43vY5V.js","assets/copy-to-clipboard-button-BGxcUbgy.js","assets/checkmark-XZyokq_Y.js","assets/copy-Drmhc2jD.js","assets/loading-spinner-DBgXgra0.js","assets/settings-section-header-context-BOJ_Fbak.js","assets/use-llm-profiles-diZS4FiN.js","assets/u-check-circle-BKn1spCL.js","assets/u-edit-DAkcF52u.js","assets/format-model-name-BNPKVsIq.js","assets/settings-list-classes-DdcLXDGn.js","assets/use-acp-credential-form-c8KXAa8A.js","assets/acp-providers-CYy8qA2z.js","assets/use-create-secret-DbBIpaCR.js","assets/secrets-service-BtsgYSlj.js","assets/use-get-secrets-6PBitf54.js","assets/use-agent-profiles-CPIc6wLH.js","assets/openhands-logo-BS-Epajy.js","assets/recommended-automations-launcher-CcFMfJRR.js","assets/vendor~root-layout~index-home~home~mcp~automations-list~automation-templates~automation-set~bxsimjx0-D7IDevqN.js","assets/conversation-store-Blc5xysY.js","assets/install-server-modal-D7zIqNKz.js","assets/bot-CGPCg03p.js","assets/styled-tooltip-B6JXcsmL.js","assets/mcp-marketplace-utils-BJWJgbB6.js","assets/skill-card-pill-row-dGIUzr_b.js","assets/circle-plus-check-toggle-ASbpB8vN.js","assets/x-mark-BopmFoBq.js","assets/use-create-conversation-DVrA_uLD.js","assets/agent-server-conversation-service.api-DK56YPTs.js","assets/plugins-management-service-lHdNKWNU.js","assets/use-activate-agent-profile-B0p34N3q.js","assets/use-save-agent-profile-BaMNSpBV.js","assets/terminal-BUpID2wS.js"])))=>i.map(i=>d[i]);
2
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,xt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{F as i,R as a,U as o,_ as s,g as c,l,p as u,u as d,z as f}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{n as p}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js";import{t as m}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{M as h,w as g}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{t as _}from"./useQuery-Bs5NFz2s.js";import{r as v}from"./providers-CWXnb7S3.js";import{At as y,B as b,G as x,I as S,St as C,Tt as w,Vt as T,_ as E,ct as D,n as ee,q as te,qt as ne,r as re,wt as O,xt as k}from"./active-backend-context-BZDG15C0.js";import{z as A}from"./utils-DUD5ScdA.js";import{n as j,o as M,r as N,t as P}from"./use-onboarding-completion-Bs8PcXik.js";import{t as F}from"./loading-spinner-DBgXgra0.js";import{t as I}from"./use-config-C3PO4TBw.js";import{n as L}from"./use-settings-C6ZxpBDX.js";import{t as R}from"./use-save-settings-BahvC2Gw.js";import{t as z}from"./modal-backdrop-BSzNhM4r.js";import{n as B}from"./modal-body-BdKfD3Hl.js";import{n as V,r as H}from"./base-modal-BbjycA8X.js";import{t as U}from"./brand-button-Blxv5nww.js";import{t as W}from"./navigation-context-CQZwH_tC.js";import{i as G,n as K}from"./color-themes-DTj5Ylbr.js";var q=e(t(),1),ie=`/api/authenticate`,J=`/login`,Y=`returnTo`,ae=new Set([`localhost`,`127.0.0.1`,`::1`]);function oe(){return typeof window>`u`?`/`:`${window.location.pathname}${window.location.search}${window.location.hash}`}function se(){return typeof window>`u`?!1:ae.has(window.location.hostname)}function ce(){return k()===`cookie`&&!se()}async function le(){try{return await h.post(ie,null,{withCredentials:!0}),!0}catch(e){if(h.isAxiosError(e)&&e.response?.status===401)return!1;throw e}}function ue(e=oe()){return`${J}?${new URLSearchParams({[Y]:e}).toString()}`}function de(){typeof window>`u`||window.location.assign(ue())}var X=r();function fe({backend:e,onChoice:t}){let{t:n,ready:r}=m(T),i=M([e])[e.id]?.isConnected===!0,{data:a,isSuccess:o}=L(),{mutateAsync:s,isPending:c}=R(),[l,u]=q.useState(!1),[d,f]=q.useState(!1);q.useEffect(()=>{f(!1)},[e.id]);let p=i&&o&&a?.user_consents_to_analytics===null&&!d;return q.useEffect(()=>{if(r&&p){let e=setTimeout(()=>u(!0),50);return()=>clearTimeout(e)}u(!1)},[r,p]),!p||!l?null:(0,X.jsx)(z,{elevated:!0,"aria-label":n(A.TELEMETRY$CONSENT_TITLE),children:(0,X.jsx)(`form`,{"data-testid":`telemetry-consent-form`,onSubmit:async e=>{e.preventDefault();let n=new FormData(e.currentTarget).get(`analytics`)===`on`;try{await s({user_consents_to_analytics:n})}catch{return}f(!0),await E(n?`granted`:`denied`),t?.(n)},className:`flex flex-col gap-2`,children:(0,X.jsxs)(B,{className:`border border-[var(--oh-border)]`,children:[(0,X.jsx)(H,{title:n(A.TELEMETRY$CONSENT_TITLE)}),(0,X.jsx)(V,{children:n(A.TELEMETRY$CONSENT_DESCRIPTION)}),(0,X.jsx)(`p`,{className:`text-xs text-neutral-400`,children:n(A.TELEMETRY$BACKEND_SCOPE,{name:e.name,host:e.host})}),(0,X.jsxs)(`label`,{className:`flex gap-2 items-center self-start text-sm cursor-pointer`,children:[(0,X.jsx)(`input`,{name:`analytics`,type:`checkbox`,defaultChecked:!0,className:`w-4 h-4 cursor-pointer`}),n(A.TELEMETRY$SEND_ANONYMOUS_DATA)]}),(0,X.jsx)(U,{testId:`confirm-telemetry-preferences`,type:`submit`,variant:`primary`,className:`w-full`,isDisabled:c,children:n(A.TELEMETRY$CONFIRM_PREFERENCES)})]})})})}function Z({onChoice:e}){let{backend:t}=ee();return C()!==null||t.kind!==`local`?null:(0,X.jsx)(fe,{backend:t,onChoice:e})}function pe(){return q.useEffect(()=>{K(G())},[]),null}var me=q.lazy(()=>n(()=>import(`./manage-backends-modal-BTqNPhzc.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]))),Q=q.lazy(()=>n(()=>import(`./api-key-entry-screen-DaZnOlVo.js`),__vite__mapDeps([37,1,2,3,4,5,6,7,8,10,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]))),he=q.lazy(()=>n(()=>import(`./onboarding-modal-Da4yHzsA.js`).then(e=>e.n).then(e=>({default:e.OnboardingModal})),__vite__mapDeps([38,1,2,3,4,5,6,7,8,39,29,40,41,42,43,10,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,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,92,93,94,95,96,97,98,99,100,101,102,103,104]))),ge=q.lazy(()=>n(()=>import(`./backend-form-modal-CbCemvHt.js`).then(e=>e.i).then(e=>({default:e.BackendFormModal})),__vite__mapDeps([10,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30])));function _e({children:e}){return(0,X.jsxs)(`html`,{lang:`en`,children:[(0,X.jsxs)(`head`,{children:[(0,X.jsx)(`meta`,{charSet:`utf-8`}),(0,X.jsx)(`meta`,{name:`viewport`,content:`width=device-width, initial-scale=1`}),(0,X.jsx)(d,{}),(0,X.jsx)(l,{})]}),(0,X.jsxs)(`body`,{"data-agent-server-ui":``,className:`m-0`,children:[(0,X.jsxs)(v,{contentClassName:`min-h-screen`,children:[(0,X.jsx)(pe,{}),e,(0,X.jsx)(g,{toastOptions:y}),(0,X.jsx)(`div`,{id:`modal-portal-exit`})]}),(0,X.jsx)(s,{}),(0,X.jsx)(c,{})]})]})}function $(){return(0,X.jsx)(`main`,{className:`min-h-screen bg-base px-6 py-10 text-white`,children:(0,X.jsx)(`div`,{className:`mx-auto flex min-h-screen max-w-6xl items-center justify-center`,children:(0,X.jsx)(`div`,{className:`rounded-3xl border border-white/10 bg-base/80 px-8 py-10 shadow-2xl`,children:(0,X.jsx)(F,{size:`large`})})})})}function ve(){let e=p(),t=q.useCallback(()=>{D()&&(b(),e.invalidateQueries({queryKey:S.WEB_CLIENT_CONFIG}))},[e]);return(0,X.jsx)(`main`,{"data-testid":`agent-server-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,X.jsx)(q.Suspense,{fallback:null,children:(0,X.jsx)(me,{onClose:t,recoveryMode:!0})})})}function ye({onClose:e}){let t=i(),n=a(),r=f(),o=t.pathname.match(/^\/conversations\/([^/]+)/)?.[1]??null,s=q.useMemo(()=>({currentPath:t.pathname,conversationId:o,isNavigating:!!r.location,navigate:(e,t)=>n(e,t)}),[o,t.pathname,n,r.location]);return C()===null?(0,X.jsx)(`main`,{"data-testid":`first-run-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,X.jsx)(W,{value:s,children:(0,X.jsx)(q.Suspense,{fallback:(0,X.jsx)($,{}),children:(0,X.jsx)(he,{onClose:e})})})}):(0,X.jsx)(`main`,{"data-testid":`first-run-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,X.jsx)(q.Suspense,{fallback:(0,X.jsx)($,{}),children:(0,X.jsx)(ge,{mode:`add`,onClose:e,source:`manage_backends_modal`,hideCloseButton:!0})})})}var be=()=>[{rel:`icon`,type:`image/svg+xml`,href:ne(`/favicon.svg`)}],xe=()=>[{title:`OpenHands`},{name:`description`,content:`Let's Start Building!`}],Se=o(function(){let e=O(),t=!!D()?.apiKey,n=e&&!t,{active:r}=re(),i=C(),a=k(),o=i!==null,s=o&&r.backend.kind===`cloud`&&w(r.backend.host,i),{isCompleted:c,markCompleted:l}=P(),d=ce(),f=o?!d&&(!s||a!==`cookie`&&!c):!c,p=_({queryKey:S.MAIN_APP_COOKIE_AUTH,queryFn:le,enabled:d&&!f,retry:!1,staleTime:1e3*60*5,meta:{disableToast:!0}}),m=d&&!f&&p.isPending&&!p.isError,h=d&&p.data===!1,g=!d||p.data===!0||p.isError;q.useEffect(()=>{h&&de()},[h]);let v=I({enabled:!n&&!f&&g}),y=M(r.backend.kind===`cloud`&&g?[r.backend]:[])[r.backend.id],b=r.backend.kind===`cloud`&&y?.isConnected===!1&&N(y.lastError),T=r.backend.kind===`cloud`&&y?.disabled===!0&&j(y.lastError);return f?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ye,{onClose:l}),(0,X.jsx)(Z,{})]}):m||h?(0,X.jsx)($,{}):n||x(v.error)?(0,X.jsx)(q.Suspense,{fallback:(0,X.jsx)($,{}),children:(0,X.jsx)(Q,{})}):v.isPending||v.isLoading?(0,X.jsx)($,{}):b||T||te(v.error)?(0,X.jsx)(ve,{}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(u,{}),(0,X.jsx)(Z,{})]})});export{_e as Layout,Se as default,be as links,xe as meta};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/settings-modal-nEEK1Kh1.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/vendor-styling-Ck5D_A2Q.js","assets/active-backend-context-BZDG15C0.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js","assets/utils-DUD5ScdA.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js","assets/llm-settings-BLAMK2tR.js","assets/useMutation-6ZsQCqAn.js","assets/useQuery-Bs5NFz2s.js","assets/back-nav-button-H_ThtDA0.js","assets/navigation-link-Bxo3-4vo.js","assets/navigation-context-CQZwH_tC.js","assets/form-control-classes-CGXBLcn1.js","assets/map-provider-BK4HnqYz.js","assets/external-link-C0UpBgsE.js","assets/info-CLoC1LRo.js","assets/proxy-DYDXxtje.js","assets/profiles-service.api-BLr7FXec.js","assets/settings-service.api-3yAUFcaP.js","assets/settings-DcNPxz0v.js","assets/llm-subscription-service-SfnEV9Uc.js","assets/llm-subscription-DTqtBCWz.js","assets/use-can-manage-org-profiles-Dz_8Eqkv.js","assets/organization-service.api-BztSy69u.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-DOPLJMH9.js","assets/dropdown-classes-tLhpwtxS.js","assets/badge-B-51h-SW.js","assets/settings-input-CWUEHHvS.js","assets/base-modal-BbjycA8X.js","assets/modal-body-BdKfD3Hl.js","assets/modal-classes-D5_b5vMi.js","assets/modal-backdrop-BSzNhM4r.js","assets/brand-button-Blxv5nww.js","assets/sdk-section-page-BbBEQQjq.js","assets/switch-skeleton-DwOoCqaL.js","assets/schema-field-C59lVZTA.js","assets/dist-Bl64nBZL.js","assets/settings-dropdown-input-Ba1UN5Du.js","assets/combobox-caret-DvpEsh2O.js","assets/settings-switch-Dk9hChx1.js","assets/toggle-switch-B2MLKsgt.js","assets/use-is-authed-2UrDIziV.js","assets/typography-DB5HoCk0.js","assets/use-save-settings-BahvC2Gw.js","assets/use-tracking-Bhu7gk2y.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BOVIFA_g.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C0JXQb_q.js","assets/use-settings-C6ZxpBDX.js","assets/extension-module-card-classes-Bo43vY5V.js","assets/copy-to-clipboard-button-BGxcUbgy.js","assets/checkmark-XZyokq_Y.js","assets/copy-Drmhc2jD.js","assets/loading-spinner-DBgXgra0.js","assets/settings-section-header-context-BOJ_Fbak.js","assets/use-llm-profiles-diZS4FiN.js","assets/u-check-circle-BKn1spCL.js","assets/u-edit-DAkcF52u.js","assets/format-model-name-BNPKVsIq.js","assets/settings-list-classes-DdcLXDGn.js","assets/settings-utils-CxjtCSB3.js","assets/manage-backends-modal-BTqNPhzc.js","assets/backend-form-modal-CbCemvHt.js","assets/chevron-down-CgGcmtE2.js","assets/cloud-funnel-analytics-GlCUG0gk.js","assets/segmented-toggle-DiVfTZuN.js","assets/use-onboarding-completion-Bs8PcXik.js","assets/useQueries-xDrGlTO_.js","assets/modal-close-button-objukxk_.js","assets/pencil-49avMHlD.js","assets/plus-C0BagBpV.js","assets/refresh-cw-nmcesifB.js","assets/trash-2-yZnDM4Ji.js","assets/confirmation-modal-CiEwxZAA.js","assets/use-cloud-current-user-id-DvUVqCle.js","assets/environment-switch-overlay-DeztVYuL.js","assets/environment-switch-store-DVQZLFbj.js","assets/alert-banner-BgDHhL7b.js","assets/vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-BvS6PCK2.js","assets/iconBase-C2sR-uAp.js","assets/close-ScPlnwyq.js","assets/command-menu-DwUQzjYP.js","assets/bot-CGPCg03p.js","assets/wrench-C95ujnYo.js","assets/sidebar-store-u6pUpxJ7.js","assets/conversation-store-Blc5xysY.js","assets/list-todo-BF049YaY.js","assets/search-CYSDBczG.js","assets/shield-check-CiOTXxV2.js","assets/sparkles-ntyMLnbj.js","assets/x-86ZCfxKY.js","assets/zap-DRa-r-Tf.js"])))=>i.map(i=>d[i]);
2
+ import{a as e,r as t}from"./rolldown-runtime-Cyuzqnbw.js";import{St as n,bt as r,i,xt as a,yt as o}from"./vendor-styling-Ck5D_A2Q.js";import{B as s,F as c,I as l,L as u,O as d,R as f,U as p,V as m,W as h,p as g,z as _}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as v}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as y}from"./useInfiniteQuery-c_OmS3lK.js";import{t as b}from"./useQuery-Bs5NFz2s.js";import{t as x}from"./use-is-creating-conversation-BvYpmb3v.js";import{t as S}from"./vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-e8pX05xf.js";import{E as C,Mt as w,St as T,V as E,Wt as D,_ as O,d as k,dt as A,g as j,i as M,jt as N,l as P,n as F,r as I,u as ee,v as L,y as te}from"./active-backend-context-BZDG15C0.js";import{C as R,S as z,b as ne,t as B,y as V,z as H}from"./utils-DUD5ScdA.js";import{A as re,C as ie,D as ae,E as U,O as oe,S as se,T as ce,_ as le,a as ue,b as de,c as fe,d as pe,f as me,g as he,h as ge,i as _e,j as ve,k as ye,l as be,m as xe,n as Se,o as Ce,p as we,r as Te,s as Ee,t as De,u as Oe,v as W,w as ke,x as Ae,y as je}from"./vendor~root-layout-DeQACFVA.js";import{t as Me}from"./bot-CGPCg03p.js";import{t as Ne}from"./check-DSuS-lyr.js";import{n as G,t as Pe}from"./vendor~root-layout~conversation-panel~conversation-bv7ooVgH.js";import{a as Fe,l as Ie,o as Le,t as Re}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-BvS6PCK2.js";import{a as ze,i as Be,n as Ve,o as He,r as Ue,t as We}from"./npm-CHVHV1MC.js";import{t as Ge}from"./circle-check-CG5-NPw7.js";import{r as Ke}from"./map-provider-BK4HnqYz.js";import{t as qe}from"./external-link-C0UpBgsE.js";import{a as Je,c as Ye,d as Xe,f as Ze,i as Qe,l as $e,n as et,o as tt,p as nt,r as rt,s as it,t as at,u as ot}from"./git-provider-icon-CaQ1yLPi.js";import{a as st,c as ct,d as lt,f as ut,h as K,i as dt,l as ft,m as pt,n as mt,o as ht,p as gt,r as _t,s as vt,t as yt,u as bt}from"./onboarding-Diw0V51A.js";import{a as xt,i as St,n as Ct,r as wt,t as Tt}from"./wrench-C95ujnYo.js";import{a as Et,i as Dt,n as Ot,r as kt,t as At}from"./sidebar-store-u6pUpxJ7.js";import{o as jt,r as Mt}from"./backend-form-modal-CbCemvHt.js";import{t as Nt}from"./mouse-pointer-click-C_gXyLyD.js";import{t as Pt}from"./plus-C0BagBpV.js";import{t as Ft}from"./refresh-cw-nmcesifB.js";import{t as It}from"./search-CYSDBczG.js";import{a as Lt}from"./llm-settings-BLAMK2tR.js";import{t as Rt}from"./trash-2-yZnDM4Ji.js";import{t as zt}from"./x-86ZCfxKY.js";import{t as Bt}from"./zap-DRa-r-Tf.js";import{o as Vt}from"./use-onboarding-completion-Bs8PcXik.js";import{t as Ht}from"./loading-spinner-DBgXgra0.js";import{t as Ut}from"./use-config-C3PO4TBw.js";import{m as Wt,n as Gt,t as Kt,x as qt}from"./use-tracking-Bhu7gk2y.js";import{n as Jt,t as Yt}from"./use-settings-C6ZxpBDX.js";import{t as Xt}from"./use-save-settings-BahvC2Gw.js";import{t as Zt}from"./modal-backdrop-BSzNhM4r.js";import{n as Qt}from"./modal-body-BdKfD3Hl.js";import{i as $t,n as en,r as tn}from"./base-modal-BbjycA8X.js";import{_ as nn,c as rn}from"./form-control-classes-CGXBLcn1.js";import{t as an}from"./brand-button-Blxv5nww.js";import{n as on,t as sn}from"./navigation-context-CQZwH_tC.js";import{t as cn}from"./openhands-logo-BS-Epajy.js";import{t as ln}from"./navigation-link-Bxo3-4vo.js";import{a as un,d as dn,f as fn,i as pn,l as mn,n as hn,r as gn,u as _n}from"./sidebar-layout-lrfPooIB.js";import{n as vn,t as yn}from"./sidebar-nav-link-B8lFD6Cb.js";import{t as bn}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js";import{t as xn}from"./styled-tooltip-B6JXcsmL.js";import{a as Sn,d as Cn,f as wn,i as Tn,l as En,n as Dn,o as On,r as kn,u as An}from"./dropdown-classes-tLhpwtxS.js";import{r as jn,t as Mn}from"./combobox-caret-DvpEsh2O.js";import{n as Nn,t as Pn}from"./use-cloud-current-user-id-DvUVqCle.js";import{s as Fn}from"./environment-switch-store-DVQZLFbj.js";import{d as In,f as Ln,l as Rn,t as zn}from"./conversation-store-Blc5xysY.js";import{t as Bn}from"./modal-close-button-objukxk_.js";import{t as Vn}from"./manage-backends-modal-BTqNPhzc.js";import{i as Hn,r as Un,t as Wn}from"./agent-server-conversation-service.api-DK56YPTs.js";import{c as Gn,d as Kn,u as qn}from"./acp-providers-CYy8qA2z.js";import{t as Jn}from"./use-is-authed-2UrDIziV.js";import{a as Yn,i as Xn,n as Zn,t as Qn}from"./conversation-state-store-DMLtlHbE.js";import{a as $n,c as er,d as tr,i as nr,l as rr,o as ir,r as ar,s as or,t as sr,u as cr}from"./sidebar-mobile-menu-toggle-KERXfNu1.js";import{t as lr}from"./use-click-outside-element-W6Os4Nlb.js";import{t as ur}from"./use-llm-profiles-diZS4FiN.js";import{n as dr}from"./use-create-conversation-DVrA_uLD.js";import{t as fr}from"./format-time-delta-BIR5Os7T.js";import{r as pr,t as mr}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-DOuig0C0.js";import{n as hr,t as q}from"./context-menu-list-item-CdcamfM1.js";import{a as J,i as gr,n as _r}from"./use-can-manage-org-profiles-Dz_8Eqkv.js";import{t as vr}from"./u-edit-DAkcF52u.js";import{t as yr}from"./skills-B0IliMxw.js";import{i as br}from"./format-model-name-BNPKVsIq.js";import{r as xr}from"./onboarding-modal-Da4yHzsA.js";import{m as Sr}from"./install-server-modal-D7zIqNKz.js";import{c as Cr,i as wr,n as Tr,r as Er,s as Dr,t as Or}from"./home-store-DgzViC3f.js";import{t as kr}from"./search-BatSpWed.js";import{t as Ar}from"./use-user-conversation-BkNXpXrd.js";var Y=e(n(),1),X=o(),jr=46,Mr=30;function Nr({className:e,logoClassName:t,logoWidth:n=jr,logoHeight:r=Mr}={}){let{t:i}=v(`openhands`);return(0,X.jsx)(ln,{to:`/conversations`,"aria-label":i(H.BRANDING$OPENHANDS_LOGO),className:B(e),children:(0,X.jsx)(cn,{width:n,height:r,className:B(`shrink-0`,t)})})}function Pr(){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 Fr({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)(zt,{size:14})})}function Ir({isOpen:e,isDisabled:t,getToggleButtonProps:n}){return(0,X.jsx)(`button`,{type:`button`,"data-testid":`dropdown-trigger`,...n({disabled:t,className:B(jn,`text-current`,e&&`rotate-180`,t&&`cursor-not-allowed`)}),children:(0,X.jsx)(Mn,{})})}function Lr({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:B(`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:B(`p-0`,Tn)}),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:B(On,`focus:outline-none`,n?.value===e.value&&`bg-[var(--oh-interactive-selected)] text-white`)}),children:[e.prefix?(0,X.jsx)(`span`,{className:An,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)(Xe,{inset:`menu`}),(0,X.jsx)(`div`,{className:`p-0`,children:o})]}):null]})}function Rr({placeholder:e,isDisabled:t,getInputProps:n,italicPlaceholder:r=!0,fitContent:i=!1}){return(0,X.jsx)(`input`,{...n({placeholder:e,disabled:t,className:B(`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`,rn,`px-0 not-italic text-inherit`)})})}var zr={position:`absolute`,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,border:0};function Br({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}=bn({items:S,itemToString:e=>e?.label??``,inputValue:v,stateReducer:(e,t)=>t.type===bn.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:B(`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:zr}),(0,X.jsx)(`button`,{type:`button`,...O({tabIndex:-1}),style:zr,"aria-hidden":!0})]}):(0,X.jsxs)(`div`,{className:B(wn,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)(Rr,{placeholder:a,isDisabled:M,getInputProps:P,italicPlaceholder:h,fitContent:g}),r&&(0,X.jsx)(Pr,{}),n&&w&&(0,X.jsx)(Fr,{onClear:()=>T(null)}),(0,X.jsx)(Ir,{isOpen:C,isDisabled:M,getToggleButtonProps:O})]}),(0,X.jsx)(Lr,{isOpen:C,filteredOptions:S,selectedItem:w,emptyMessage:t,getMenuProps:k,getItemProps:A,footer:u,openUpward:d,fitContent:g})]})}var Vr=t({AddBackendModal:()=>Hr});function Hr({onClose:e}){return(0,X.jsx)(Mt,{mode:`add`,onClose:e})}var Ur=`::`;function Wr(e,t){return t?`${e}${Ur}${t}`:e}function Gr(e){let[t,n]=e.split(Ur);return{backendId:t,orgId:n??null}}function Kr(e){return(0,X.jsx)(jt,{isConnected:e?.isConnected??null})}function qr(){return(0,X.jsx)(jt,{isConnected:`unavailable`})}function Jr(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:Wr(e.id,null),label:e.name,prefix:Kr(i[e.id])});for(let e of s){let o=n[e.id],s=Kr(i[e.id]);if(!o||o.orgs.length===0)a.push({value:Wr(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:Wr(e.id,r.id),label:`${e.name} – ${i}`,prefix:s})}}}return a}function Yr({openUpward:e=!1,hideTrigger:t=!1,defaultOpen:n=!1,onSelectOption:r,onOpenAddBackend:i,onOpenManageBackends:a,sidebarCollapsed:o=!1}={}){let{t:s}=v(`openhands`),{backends:c,active:u,setActive:d}=I(),p=Nn(),m=Pn(),h=Vt(c),g=f(),_=l(`/settings`),y=l(`/settings/*`),b=l(`/conversations/:conversationId`),x=l(`/automations/:automationId`),[S,C]=Y.useState(!1),[w,E]=Y.useState(!1),D=s(H.BACKEND$PERSONAL_WORKSPACE),O=Y.useMemo(()=>Jr(c,D,p,m,h),[c,D,p,m,h]),k=A(u.backend),j=s(H.BACKEND$NO_BACKEND_AVAILABLE),M=Wr(u.backend.id,u.orgId),N=k?void 0:O.find(e=>e.value===M),P=!!(_||y),F=s(H.SIDEBAR$SETTINGS),ee=zn(e=>e.isRightPanelShown),L=!o||b&&ee?`top`:`left`,te=Object.values(p).some(e=>e.isLoading);Y.useEffect(()=>{if(k||u.backend.kind!==`cloud`||u.orgId)return;let{backend:e}=u,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&&d(e.id,a.id)},[u,p,m,d,k]);let R=Y.useCallback(()=>{if(i){i(),r?.();return}C(!0)},[i,r]),z=Y.useCallback(()=>{if(a){a(),r?.();return}E(!0)},[a,r]),ne=T()!==null,V=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),re=Y.useCallback(e=>{V(e),R()},[R,V]),ie=Y.useCallback(e=>{V(e),R()},[R,V]),ae=Y.useCallback(e=>{V(e),z()},[z,V]),U=Y.useCallback(e=>{V(e),z()},[z,V]),oe=(0,X.jsxs)(`div`,{className:Tn,children:[ne?null:(0,X.jsxs)(`button`,{type:`button`,"data-testid":`add-backend-menu-item`,onMouseDown:V,onTouchStart:V,onTouchEnd:ie,onClick:re,className:B(Dn,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:An,"aria-hidden":!0,children:(0,X.jsx)(Pt,{width:16,height:16})}),s(H.BACKEND$ADD)]}),(0,X.jsxs)(`button`,{type:`button`,"data-testid":`manage-backends-menu-item`,onMouseDown:V,onTouchStart:V,onTouchEnd:U,onClick:ae,className:B(Dn,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:An,"aria-hidden":!0,children:(0,X.jsx)(kt,{width:16,height:16})}),s(ne?H.BACKEND$RECONNECT_CLOUD:H.BACKEND$MANAGE)]})]}),se=Y.useCallback(async e=>{if(e===M)return;let{backendId:t,orgId:n}=Gr(e),i=c.find(e=>e.id===t);i&&(Fn(O.find(t=>t.value===e)?.label??i.name),await new Promise(e=>{setTimeout(e,400)}),b?g(`/conversations`):x&&g(`/automations`),d(i.id,n),r?.())},[M,c,b,x,g,O,d,s,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)(Br,{testId:`backend-selector`,defaultValue:N??{value:M,label:k?j:u.backend.name,prefix:k?qr():Kr(h[u.backend.id])},footer:oe,openUpward:e,hideTrigger:t,defaultOpen:n,openOnHover:!t,onChange:e=>{e&&se(e.value)},placeholder:k?j:u.backend.name,loading:te,options:O,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)(xn,{content:F,placement:L,offset:10,children:(0,X.jsx)(ln,{to:`/settings`,"data-testid":`backend-selector-settings-link`,"data-active":P,"aria-label":F,className:B(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`,nn),children:(0,X.jsx)(kt,{width:16,height:16})})})]}),S?(0,X.jsx)(Hr,{onClose:()=>C(!1)}):null,w?(0,X.jsx)(Vn,{onClose:()=>E(!1)}):null]})}var Xr=`command-menu-trigger`,Zr=18;function Qr({collapsed:e}){let{t}=v(`openhands`),n=Ot(e=>e.open),r=t(H.COMMAND_MENU$OPEN_LABEL),i=(0,X.jsxs)(`button`,{type:`button`,"data-testid":Xr,"aria-label":r,onClick:n,className:B(fn({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)(vn,{active:!1,children:(0,X.jsx)(It,{width:Zr,height:Zr})}):(0,X.jsx)(`span`,{className:B(un,`text-[var(--oh-muted)] group-hover:text-white`),"aria-hidden":`true`,children:(0,X.jsx)(It,{width:Zr,height:Zr})}),(0,X.jsx)(`span`,{className:_n(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(H.COMMAND_MENU$SHORTCUT)})]});return e?(0,X.jsx)(xn,{content:r,placement:`right`,children:i}):i}var $r=2e3,ei=[`npm`,`docker`];function ti(e){return e===`npm`?H.SETTINGS$VERSION_NPM_RECOMMENDED:H.SETTINGS$VERSION_DOCKER}function ni({tab:e}){return e===`npm`?(0,X.jsx)(We,{className:`size-4 shrink-0`,"aria-hidden":!0}):(0,X.jsx)(Ve,{className:`size-5 shrink-0`,"aria-hidden":!0})}function ri({installedVersion:e,latestVersion:t,updateAvailable:n,isChecking:r,onCheckForUpdates:i,onClose:a}){let{t:o}=v(`openhands`),[s,c]=Y.useState(`npm`),[l,u]=Y.useState(!1),d=Y.useRef(null),f=s===`npm`?ze.npm:ze.docker;Y.useEffect(()=>()=>{d.current!==null&&window.clearTimeout(d.current)},[]),Y.useEffect(()=>{u(!1),d.current!==null&&(window.clearTimeout(d.current),d.current=null)},[s]);let p=Y.useCallback(()=>{navigator.clipboard?.writeText(f),u(!0),d.current!==null&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>{u(!1),d.current=null},$r)},[f]);return(0,X.jsx)(Zt,{onClose:a,"aria-label":o(H.SETTINGS$VERSION_MODAL_ARIA_LABEL),children:(0,X.jsxs)(`section`,{className:`relative flex w-[520px] max-w-[90vw] flex-col gap-5 rounded-xl border border-[var(--oh-border)] bg-base-secondary p-6 shadow-xl`,children:[(0,X.jsx)(Bn,{onClose:a,testId:`agent-canvas-version-modal-close`}),(0,X.jsxs)(`header`,{className:`flex items-center gap-3 pr-8`,children:[n?(0,X.jsx)(He,{className:`size-7 shrink-0 text-[#3B82F6]`,"aria-hidden":!0}):(0,X.jsx)(Ge,{className:`size-7 shrink-0 text-[var(--oh-status-success)]`,"aria-hidden":!0}),(0,X.jsx)(`h2`,{className:`text-base font-semibold leading-6 text-white`,children:o(n?H.SETTINGS$VERSION_UPDATE_AVAILABLE:H.SETTINGS$VERSION_UP_TO_DATE_TITLE)}),n&&t?(0,X.jsx)(`span`,{className:`rounded-full bg-[#1E3A5F] px-2 py-0.5 text-xs font-semibold text-[#3B82F6]`,children:t}):null]}),(0,X.jsx)(`div`,{className:`flex flex-col gap-1`,children:n&&t?(0,X.jsxs)(`p`,{className:`text-sm text-[var(--oh-text)]`,children:[o(H.SETTINGS$VERSION_UPDATE_MESSAGE,{installed:e,latest:t}),` `,(0,X.jsxs)(`a`,{href:Be,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 whitespace-nowrap font-medium text-white hover:text-[var(--oh-text)]`,children:[o(H.SETTINGS$VERSION_RELEASE_NOTES),(0,X.jsx)(qe,{className:`size-4 shrink-0`,"aria-hidden":!0})]})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`p`,{className:`text-sm text-[var(--oh-text)]`,children:o(H.SETTINGS$VERSION_INSTALLED,{version:e})}),t?(0,X.jsxs)(`p`,{className:`whitespace-nowrap text-sm text-[var(--oh-status-success)]`,children:[o(H.SETTINGS$VERSION_LATEST_MESSAGE),` `,(0,X.jsxs)(`a`,{href:Be,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 font-medium text-white hover:text-[var(--oh-text)]`,children:[o(H.SETTINGS$VERSION_RELEASE_NOTES),(0,X.jsx)(qe,{className:`size-4 shrink-0`,"aria-hidden":!0})]})]}):(0,X.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:o(H.SETTINGS$VERSION_CHECK_UNAVAILABLE)})]})}),n?(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`div`,{className:`flex justify-center`,children:ei.map(e=>(0,X.jsxs)(`button`,{type:`button`,onClick:()=>c(e),className:B(`inline-flex items-center gap-1.5 px-3 pb-2 text-sm font-medium`,s===e?`border-b border-white text-white`:`text-[var(--oh-muted)] hover:text-white`),children:[(0,X.jsx)(ni,{tab:e}),o(ti(e))]},e))}),(0,X.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-deep)] px-4 py-3`,children:[(0,X.jsx)(`code`,{className:`min-w-0 flex-1 overflow-visible whitespace-nowrap font-mono text-sm text-white`,children:f}),(0,X.jsx)(`button`,{type:`button`,onClick:p,"aria-label":o(l?H.BUTTON$COPIED:H.SETTINGS$VERSION_COPY_COMMAND),disabled:l,className:`shrink-0 text-[var(--oh-muted)] hover:text-white disabled:hover:text-[var(--oh-muted)]`,children:l?(0,X.jsx)(Ne,{className:`size-4 text-[var(--oh-status-success)]`,"aria-hidden":!0}):(0,X.jsx)(Ke,{className:`size-4`,"aria-hidden":!0})})]})]}):null,n?null:(0,X.jsx)(`div`,{className:`flex flex-wrap gap-x-8 gap-y-3`,children:(0,X.jsxs)(`button`,{type:`button`,onClick:i,className:`inline-flex items-center gap-2 text-sm font-medium text-white hover:text-[var(--oh-text)] disabled:cursor-wait disabled:text-[var(--oh-muted)]`,disabled:r,children:[o(H.SETTINGS$VERSION_CHECK_FOR_UPDATES),(0,X.jsx)(Ft,{className:B(`size-4 shrink-0`,r&&`animate-spin`),"aria-hidden":!0})]})})]})})}function ii({className:e,hideWhenUpToDate:t=!1}){let{t:n}=v(`openhands`),[r,i]=Y.useState(!1),a=T()!==null,o=Ue({enabled:!a});if(a)return null;let s=C,c=o.data??null,l=(c===null?null:E(c,s))===1;return t&&!l?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`button`,{type:`button`,"data-testid":`agent-canvas-version-tile`,onClick:()=>i(!0),"aria-label":n(H.SETTINGS$VERSION_TILE_ARIA_LABEL),className:B(`flex w-full items-center gap-3 rounded-md border border-[var(--oh-border)] bg-base-secondary px-3 py-2 text-left hover:bg-[var(--oh-surface-raised)]`,e),children:[(0,X.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,X.jsx)(`span`,{className:`block truncate text-sm font-semibold leading-5 text-white`,children:n(l?H.SETTINGS$VERSION_TILE_NEW_VERSION:H.SETTINGS$VERSION_PRODUCT_NAME)}),(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 truncate text-xs leading-5`,children:[(0,X.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:n(H.SETTINGS$APP_UPDATE_VERSION_LABEL)}),(0,X.jsx)(`span`,{className:`truncate text-white`,children:l&&c?c:s})]})]}),l?(0,X.jsx)(He,{className:`size-5 shrink-0 text-[#3B82F6]`,"aria-hidden":!0}):(0,X.jsx)(Ge,{className:`size-5 shrink-0 text-[var(--oh-status-success)]`,"aria-hidden":!0})]}),r?(0,X.jsx)(ri,{installedVersion:s,latestVersion:c,updateAvailable:l,isChecking:o.isFetching,onCheckForUpdates:()=>{o.refetch()},onClose:()=>i(!1)}):null]})}var ai=(e=20)=>{let{data:t}=Jn(),n=F(),r=!A(n.backend);return y({queryKey:[`user`,`conversations`,`paginated`,e,n.backend.id,n.orgId],queryFn:async({pageParam:t})=>await Wn.searchConversations(e,t),enabled:!!t&&r,getNextPageParam:e=>e.next_page_id,initialPageParam:void 0,refetchInterval:1e4,meta:{backendId:n.backend.id}})},oi=(e=10)=>b({queryKey:[`start-tasks`,`search`,e],queryFn:()=>[],select:e=>e.filter(e=>e.status!==`READY`&&e.status!==`ERROR`)});function si({onConfirm:e,onCancel:t,conversationTitle:n}){let{t:r}=v(`openhands`),i=n!=null&&n!==``?(0,X.jsx)(S,{ns:`openhands`,i18nKey:H.CONVERSATION$ARCHIVE_WARNING_WITH_TITLE,values:{title:n},components:{title:(0,X.jsx)(`span`,{className:`text-white`})}}):r(H.CONVERSATION$ARCHIVE_WARNING);return(0,X.jsx)(Zt,{onClose:t,children:(0,X.jsxs)(Qt,{className:`items-start border border-[var(--oh-border)]`,children:[(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,X.jsx)(tn,{title:r(H.CONVERSATION$CONFIRM_ARCHIVE)}),(0,X.jsx)(en,{children:i})]}),(0,X.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,X.jsx)(an,{type:`button`,variant:`secondary`,onClick:t,testId:`cancel-button`,children:r(H.BUTTON$CANCEL)}),(0,X.jsx)(an,{type:`button`,variant:`primary`,onClick:e,testId:`confirm-button`,children:r(H.ACTION$CONFIRM_ARCHIVE)})]})]})})}function ci({onConfirm:e,onClose:t,onCancel:n}){let{t:r}=v(`openhands`);return(0,X.jsx)(Zt,{onClose:n,children:(0,X.jsxs)(Qt,{testID:`confirm-new-conversation-modal`,children:[(0,X.jsx)(tn,{title:r(H.CONVERSATION$EXIT_WARNING)}),(0,X.jsxs)(`div`,{className:`flex w-full justify-end gap-2`,children:[(0,X.jsx)($t,{text:r(H.BUTTON$CANCEL),onClick:t,className:`bg-tertiary`}),(0,X.jsx)($t,{text:r(H.ACTION$CONFIRM),onClick:e,className:`bg-[#C63143]`})]})]})})}var li=[`[@media(hover:hover)_and_(pointer:fine)]:pointer-events-none`,`[@media(hover:hover)_and_(pointer:fine)]:invisible`,`[@media(hover:hover)_and_(pointer:fine)]:opacity-0`,`[@media(hover:hover)_and_(pointer:fine)]:group-hover:pointer-events-auto`,`[@media(hover:hover)_and_(pointer:fine)]:group-hover:visible`,`[@media(hover:hover)_and_(pointer:fine)]:group-hover:opacity-100`,`[@media(hover:hover)_and_(pointer:fine)]:group-focus-within:pointer-events-auto`,`[@media(hover:hover)_and_(pointer:fine)]:group-focus-within:visible`,`[@media(hover:hover)_and_(pointer:fine)]:group-focus-within:opacity-100`],ui=[`[@media(hover:hover)_and_(pointer:fine)]:opacity-100`,`[@media(hover:hover)_and_(pointer:fine)]:group-hover:opacity-0`,`[@media(hover:hover)_and_(pointer:fine)]:group-focus-within:opacity-0`],di=[`[@media(hover:hover)_and_(pointer:fine)]:min-w-0`,`[@media(hover:hover)_and_(pointer:fine)]:group-hover:min-w-[3.75rem]`,`[@media(hover:hover)_and_(pointer:fine)]:group-focus-within:min-w-[3.75rem]`],fi=[`[@media(hover:hover)_and_(pointer:fine)]:flex`,`[@media(hover:hover)_and_(pointer:fine)]:group-hover:hidden`,`[@media(hover:hover)_and_(pointer:fine)]:group-focus-within:hidden`];function pi(e=!1){return e?`pointer-events-auto visible opacity-100`:B(`pointer-events-auto visible opacity-100`,...li)}function mi(e=!1){return e?`opacity-0`:B(`opacity-0`,...ui)}function hi(e=!1){return e?`min-w-[3.75rem]`:B(`min-w-[3.75rem]`,...di)}function gi(e=!1){return e?`hidden`:B(`hidden`,...fi)}function _i({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:B(`text-xs leading-6 font-semibold bg-transparent truncate overflow-hidden`,r&&`opacity-60`),children:t})}var vi=e=>{switch(e){case R.FINISHED:return`check`;case R.RUNNING:return`working`;case R.IDLE:case R.WAITING_FOR_CONFIRMATION:return`active`;case R.PAUSED:return`paused`;case R.ERROR:case R.STUCK:return`error`;default:return`unknown`}},yi=(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 bi(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 xi({executionStatus:e,sandboxStatus:t,showTooltip:n=!0}){let{t:r}=v(`openhands`),i=t===`MISSING`,a=t===`ERROR`?`error`:i?`paused`:vi(e),o=r(yi(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)(mr,{"data-testid":`conversation-status-archived`,size:10,className:`shrink-0 text-[var(--oh-muted)] opacity-60`,"aria-hidden":!0}):bi(a)});return n?(0,X.jsx)(xn,{content:o,placement:`right`,showArrow:!0,tooltipClassName:`bg-base text-white text-xs shadow-lg`,children:s}):s}function Si({title:e,titleMode:t,onTitleSave:n,executionStatus:r,sandboxStatus:i}){let a=it(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)(xi,{executionStatus:r,sandboxStatus:i,showTooltip:!1})}),(0,X.jsx)(_i,{title:e,titleMode:t,onSave:n,isConversationArchived:a})]})}var Ci=e(r(),1);function wi({onClose:e,onDelete:t,onArchive:n,onUnarchive:r,onStop:i,onEdit:a,onDisplayCost:o,onShowAgentTools:s,onShowSkills:c,onDownloadViaVSCode:l,onDownloadConversation:u,position:d=`bottom`,floatingStyle:f,ignoreOutsideClickRef:p}){let{t:m}=v(`openhands`),{backend:h}=F(),g=lr(e,p),_=h.kind===`cloud`?H.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME:H.COMMON$STOP_CONVERSATION,y=(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)(Xe,{inset:`menu`})]},t):null},[]),b=f!=null;return(0,X.jsxs)(hr,{ref:g,testId:`context-menu`,style:b?f:void 0,theme:b?`popover`:`default`,position:b?`none`:d,alignment:b?`none`:`right`,spacing:b?`none`:`default`,className:b?`mt-0 min-w-[200px] w-max max-w-[min(280px,100vw-16px)]`:`z-[200] mt-0`,children:[y([a&&(0,X.jsx)(q,{testId:`edit-button`,onClick:a,children:(0,X.jsx)(J,{icon:(0,X.jsx)(vr,{width:16,height:16}),text:m(H.BUTTON$RENAME)})},`edit-button`)],`edit-section`),y([s&&(0,X.jsx)(q,{testId:`show-agent-tools-button`,onClick:s,children:(0,X.jsx)(J,{icon:(0,X.jsx)(tt,{width:16,height:16}),text:m(H.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})},`show-agent-tools-button`),c&&(0,X.jsx)(q,{testId:`show-skills-button`,onClick:c,children:(0,X.jsx)(J,{icon:(0,X.jsx)(yr,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:m(H.CONVERSATION$SHOW_SKILLS)})},`show-skills-button`)],`tools-section`),y([i&&(0,X.jsx)(q,{testId:`stop-button`,onClick:i,children:(0,X.jsx)(J,{icon:(0,X.jsx)(Je,{width:16,height:16}),text:m(_)})},`stop-button`),l&&(0,X.jsx)(q,{testId:`download-vscode-button`,onClick:l,children:(0,X.jsx)(J,{icon:(0,X.jsx)(or,{width:16,height:16}),text:m(H.BUTTON$DOWNLOAD_VIA_VSCODE)})},`download-vscode-button`),u&&(0,X.jsx)(q,{testId:`download-trajectory-button`,onClick:u,children:(0,X.jsx)(J,{icon:(0,X.jsx)(or,{width:16,height:16}),text:m(H.BUTTON$DOWNLOAD_CONVERSATION_DATA)})},`download-trajectory-button`)],`control-section`),y([o&&(0,X.jsx)(q,{testId:`display-cost-button`,onClick:o,children:(0,X.jsx)(J,{icon:(0,X.jsx)(Ze,{size:16}),text:m(H.BUTTON$DISPLAY_COST)})},`display-cost-button`),n&&(0,X.jsx)(q,{testId:`archive-button`,onClick:n,children:(0,X.jsx)(J,{icon:(0,X.jsx)(re,{className:`h-4 w-4`,"aria-hidden":!0}),text:m(H.COMMON$ARCHIVE_CONVERSATION)})},`archive-button`),r&&(0,X.jsx)(q,{testId:`unarchive-button`,onClick:r,children:(0,X.jsx)(J,{icon:(0,X.jsx)(ve,{className:`h-4 w-4`,"aria-hidden":!0}),text:m(H.COMMON$UNARCHIVE_CONVERSATION)})},`unarchive-button`),t&&(0,X.jsx)(q,{testId:`delete-button`,onClick:t,children:(0,X.jsx)(J,{icon:(0,X.jsx)(gr,{width:16,height:16}),text:m(H.COMMON$DELETE_CONVERSATION)})},`delete-button`)],`info-section`,!0)]})}function Ti({contextMenuOpen:e,onContextMenuToggle:t,onDelete:n,onArchive:r,onUnarchive:i,onStop:a,onEdit:o,onDownloadViaVSCode:s,onDownloadConversation:c,executionStatus:l,conversationId:u,showOptions:d}){let{t:f}=v(`openhands`),p=z(l),m=ne(l),h=(0,Y.useRef)(null),[,g]=(0,Y.useReducer)(e=>e+1,0);(0,Y.useLayoutEffect)(()=>{if(!e)return;g();let t=0,n=()=>{t||=window.requestAnimationFrame(()=>{t=0,g()})};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 _=(()=>{if(!e||!h.current)return;let t=h.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+320+8>r?Math.max(8,t.top-320-4):i+4,right:Math.max(8,n-a),zIndex:1e5}})(),y=typeof document<`u`?document.body:null;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(_r,{ref:h,onClick:n=>{n.preventDefault(),n.stopPropagation(),t(!e)},ariaLabel:f(H.COMMON$MORE_OPTIONS),className:B(p&&`opacity-60`)}),e&&_&&y?(0,Ci.createPortal)((0,X.jsx)(wi,{ignoreOutsideClickRef:h,floatingStyle:_,onClose:()=>t(!1),onDelete:n,onArchive:r,onUnarchive:i,onStop:m?a:void 0,onEdit:o,onDownloadViaVSCode:u&&d?s:void 0,onDownloadConversation:u?c:void 0,position:`bottom`}),y):null]})}var Ei=`inline-flex max-w-full min-w-0 shrink-0 items-center gap-0.5 rounded-sm bg-[var(--oh-surface-raised)] px-1 py-px text-[10px] leading-4 text-[var(--oh-muted)]`,Di=`inline-flex h-4 w-3 shrink-0 items-center justify-center [&_svg]:block`,Oi=`h-3 w-3`,ki=B(Ei,`shrink`),Ai={bitbucket:Re,bitbucket_data_center:Re,github:Fe,gitlab:Le};function ji({selectedRepository:e}){let t=e.git_provider?Ai[e.git_provider]:null,n=e.selected_repository,r=e.selected_branch;return(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1 overflow-hidden`,children:[n?(0,X.jsxs)(`span`,{"data-testid":`conversation-card-selected-repository`,title:n,className:ki,children:[(t||e.git_provider===`azure_devops`)&&(0,X.jsx)(`span`,{className:`inline-flex h-4 w-3 shrink-0 items-center justify-center [&_svg]:block`,"aria-hidden":!0,children:t?(0,X.jsx)(t,{className:`h-3 w-3`}):(0,X.jsx)(Qe,{className:`h-3 w-3`})}),(0,X.jsx)(`span`,{className:`truncate leading-4`,children:n})]}):null,r?(0,X.jsxs)(`span`,{"data-testid":`conversation-card-selected-branch`,title:r,className:ki,children:[(0,X.jsx)(`span`,{className:Di,"aria-hidden":!0,children:(0,X.jsx)(pr,{className:Oi})}),(0,X.jsx)(`span`,{className:`truncate leading-4`,children:r})]}):null]})}function Mi({workspaceWorkingDir:e}){let{t}=v(`openhands`),n=e?Zn(e).trim():``;return n?(0,X.jsxs)(`span`,{"data-testid":`conversation-card-workspace-folder`,className:Ei,title:e??void 0,children:[(0,X.jsx)(`span`,{className:Di,"aria-hidden":!0,children:(0,X.jsx)(K,{className:Oi})}),(0,X.jsx)(`span`,{className:`truncate leading-4`,children:n})]}):(0,X.jsxs)(`span`,{"data-testid":`conversation-card-no-repository`,className:Ei,children:[(0,X.jsx)(`span`,{className:Di,"aria-hidden":!0,children:(0,X.jsx)(Xn,{className:Oi})}),(0,X.jsx)(`span`,{className:`truncate leading-4`,children:t(H.COMMON$NO_REPOSITORY)})]})}function Ni(e){switch(e.trim().toLowerCase()){case`git_provider`:return`git`;case`repo_name`:case`repo`:case`repository`:return`repo`;case`selected_branch`:case`branch`:return`branch`;case`archiveworkspacepath`:case`workspace`:case`working_dir`:return`workspace`;case`appmode`:case`app_mode`:case`mode`:return`app_mode`;case`worktools`:case`work_tools`:case`tools`:return`work_tools`;case`workwsid`:case`work_wsid`:case`wsid`:case`workspace_id`:return`work_wsid`;default:return`other`}}function Pi(e){let t=e.trim();if(!t)return t;let n=t.replace(/[_-]+/g,` `).replace(/\s+/g,` `);return n.charAt(0).toUpperCase()+n.slice(1)}function Fi(e,t){switch(Ni(e)){case`git`:return t(H.CONVERSATION_PANEL$PREVIEW_GIT);case`repo`:return t(H.CONVERSATION_PANEL$PREVIEW_REPO);case`branch`:return t(H.CONVERSATION_PANEL$PREVIEW_BRANCH);case`workspace`:return t(H.CONVERSATION_PANEL$PREVIEW_WORKSPACE);case`app_mode`:return t(H.CONVERSATION_PANEL$PREVIEW_APP_MODE);case`work_tools`:return t(H.CONVERSATION_PANEL$PREVIEW_WORK_TOOLS);case`work_wsid`:return t(H.CONVERSATION_PANEL$PREVIEW_WORK_WSID);default:return Pi(e)}}function Ii(e,t,n){return`${Fi(e,n)}: ${t}`}function Li(e,t=14){let n=Array.from(e);return n.length<=t?e:t<=1?`…`:`${n.slice(0,t-1).join(``)}…`}function Ri(e,t,n={}){let r=n.gapPx??4,i=n.overflowWidthPx??36;if(e.length===0)return 0;if(t<=0)return e.length;let a=0;for(let n=0;n<e.length;n+=1){let o=e[n],s=n>0?r:0,c=e.length-n-1>0?i+r:0;if(a+s+o+c>t)return n;a+=s+o}return e.length}var zi=new Set([`origin`,`source`,`git_provider`]),Bi=new Set([`appmode`,`app_mode`,`mode`]),Vi={origin:Se,source:me,git_provider:Fe,owner:U,user:U,author:U,assignee:U,env:ie,environment:ie,repo:W,repository:W,repo_name:W,branch:pt,selected_branch:pt,archiveworkspacepath:K,workspace:K,working_dir:K,team:Te,org:oe,organization:oe,channel:ge,email:pe,automation:Bt,webhook:De,agent:Me,project:Ee,ticket:_e,issue:_e,pr:xt,pull_request:xt,priority:je,status:xe,id:Dt,integration:wt,appmode:we,app_mode:we,mode:we,worktools:Tt,work_tools:Tt,tools:Tt,workwsid:le,work_wsid:le,wsid:le,workspace_id:le},Hi={slack:Sr,discord:be,github:Fe,gitlab:Le,bitbucket:Re,bitbucket_data_center:Re,azure_devops:pt,email:pe,mail:pe,api:wt,webhook:De,automation:Bt,review:xt,linear:Ee,web:se,ui:se,canvas:se},Ui={work:ye,personal:Et,home:Et,private:Et};function Wi(e,t){let n=e.trim().toLowerCase(),r=t.trim().toLowerCase();return zi.has(n)?Hi[r]??Vi[n]??ue:Bi.has(n)?Ui[r]??Vi[n]??we:Vi[n]??ue}function Gi({icon:e,keyName:t,testId:n}){return(0,X.jsx)(`span`,{className:Di,"aria-hidden":!0,children:(0,X.jsx)(e,{"data-testid":n,"data-tag-key":t,"aria-hidden":!0,className:Oi})})}function Ki({icon:e,keyName:t,value:n,iconTestId:r}){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Gi,{icon:e,keyName:t,testId:r}),(0,X.jsx)(`span`,{className:`truncate leading-4`,children:Li(n)})]})}function qi({tags:e}){let{t}=v(`openhands`),n=Y.useRef(null),r=Y.useRef(null),i=Y.useRef(null),a=Y.useRef(null),[o,s]=Y.useState(e.length),[c,l]=Y.useState(!1),[u,d]=Y.useState(null),f=Y.useCallback(()=>{let e=n.current,t=r.current;!e||!t||s(Ri(Array.from(t.children).map(e=>e.offsetWidth),e.clientWidth))},[]),p=Y.useCallback(()=>{let e=i.current;if(!e)return;let t=e.getBoundingClientRect(),n=t.left;n+256>window.innerWidth-8&&(n=Math.max(8,window.innerWidth-8-256)),d({top:t.bottom+4,left:n})},[]),m=e.map(([e,t])=>`${e}=${t}`).join(``),h=Y.useRef(null);if(Y.useLayoutEffect(()=>{h.current!==m&&(h.current=m,l(!1),f())},[m,f]),Y.useEffect(()=>{let e=n.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>f());return t.observe(e),()=>t.disconnect()},[f]),Y.useLayoutEffect(()=>{if(!c){d(null);return}return p(),window.addEventListener(`resize`,p),window.addEventListener(`scroll`,p,!0),()=>{window.removeEventListener(`resize`,p),window.removeEventListener(`scroll`,p,!0)}},[c,p]),Y.useEffect(()=>{if(!c)return;let e=e=>{let t=e.target;i.current?.contains(t)||a.current?.contains(t)||l(!1)},t=e=>{e.key===`Escape`&&l(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[c]),e.length===0)return null;let g=Math.max(0,e.length-o),_=e.slice(0,o),y=e.slice(o),b=e=>{e.stopPropagation()};return(0,X.jsxs)(`div`,{"data-testid":`conversation-card-tag-chips`,className:`relative min-w-0 w-full`,children:[(0,X.jsx)(`div`,{ref:r,"aria-hidden":!0,className:`pointer-events-none fixed top-0 -left-[10000px] z-[-1] flex flex-nowrap items-center gap-1 opacity-0`,children:e.map(([e,t])=>(0,X.jsx)(`span`,{className:Ei,children:(0,X.jsx)(Ki,{icon:Wi(e,t),keyName:e,value:t})},e))}),(0,X.jsxs)(`div`,{ref:n,"data-testid":`conversation-card-tag-row`,className:`flex w-full min-w-0 max-w-full flex-nowrap items-center gap-1 overflow-hidden`,children:[_.map(([e,n])=>(0,X.jsx)(`span`,{"data-testid":`conversation-card-tag-chip`,title:Ii(e,n,t),className:Ei,children:(0,X.jsx)(Ki,{icon:Wi(e,n),keyName:e,value:n,iconTestId:`conversation-card-tag-chip-icon`})},e)),g>0?(0,X.jsxs)(`button`,{ref:i,type:`button`,"data-testid":`conversation-card-tag-overflow`,"aria-expanded":c,"aria-haspopup":`dialog`,"aria-label":t(H.CONVERSATION$TAGS_OVERFLOW_ARIA,{count:g}),onMouseDown:b,onClick:e=>{e.preventDefault(),e.stopPropagation(),l(e=>!e)},className:B(Ei,`shrink-0 self-center hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--foreground)]`),children:[(0,X.jsx)(`span`,{className:`inline-flex h-4 w-0 shrink-0`,"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`leading-4`,children:`+${g}`})]}):null]}),c&&u&&typeof document<`u`&&(0,Ci.createPortal)((0,X.jsx)(`div`,{ref:a,role:`dialog`,"data-testid":`conversation-card-tag-overflow-popover`,className:B(`z-[9999] min-w-[10rem] max-w-[16rem]`,`rounded-md border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface)] p-2 shadow-lg`),style:{position:`fixed`,top:u.top,left:u.left},onMouseDown:b,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,X.jsx)(`dl`,{className:`m-0 flex flex-col gap-1`,children:y.map(([e,n])=>(0,X.jsxs)(`div`,{"data-testid":`conversation-card-tag-overflow-row`,className:`grid grid-cols-[minmax(0,auto)_minmax(0,1fr)] gap-x-2 text-[10px] leading-4`,children:[(0,X.jsxs)(`dt`,{className:`m-0 inline-flex min-w-0 items-center gap-1 whitespace-normal break-words text-[var(--oh-muted)]`,children:[(0,X.jsx)(Gi,{icon:Wi(e,n)}),(0,X.jsx)(`span`,{className:`min-w-0 whitespace-normal break-words leading-4`,children:Fi(e,t)})]}),(0,X.jsx)(`dd`,{className:`m-0 whitespace-normal break-words text-left leading-4 text-[var(--foreground)]`,title:n,children:n})]},e))})}),document.body)]})}function Ji({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,tags:d=null,showTags:f=!1,isArchived:p=!1}){let{t:m}=v(`openhands`),h=z(r),g=null;if(c)if(l===`acp`){let e=Gn(u)??m(H.CONVERSATION$ACP_AGENT_GENERIC),t=qn(u,s),n=t??e;g={kind:Kn(u),text:n,tooltip:t?`${e} · ${t}`:e}}else s&&(g={kind:`openhands`,text:br(s)??s,tooltip:s});let _=r===void 0?void 0:`pl-[26px]`,y=f?Hn(d):[];return(0,X.jsxs)(`div`,{className:B(`flex flex-col gap-0.5 mt-0.5 w-full min-w-0`,h&&`opacity-60`),children:[(0,X.jsxs)(`div`,{className:B(`flex flex-row items-center gap-2 w-full min-w-0`,a&&_),children:[a&&(e?.selected_repository?(0,X.jsx)(ji,{selectedRepository:e}):(0,X.jsx)(Mi,{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:`${fr(t??n)} ${m(H.CONVERSATION$AGO)}`})})})]}),g?(0,X.jsx)(`div`,{className:_,children:(0,X.jsxs)(`span`,{"data-testid":`conversation-card-agent-chip`,className:Ei,title:g.tooltip,children:[(0,X.jsx)(`span`,{className:`inline-flex h-4 shrink-0 items-center justify-center [&_svg]:block`,"aria-hidden":!0,children:(0,X.jsx)(xr,{kind:g.kind,size:12})}),(0,X.jsx)(`span`,{className:`truncate leading-4`,children:g.text})]})}):null,p?(0,X.jsx)(`div`,{className:_,children:(0,X.jsx)(`span`,{"data-testid":`conversation-card-archived-chip`,className:Ei,children:m(H.COMMON$ARCHIVED)})}):null,y.length>0?(0,X.jsx)(`div`,{className:_,children:(0,X.jsx)(qi,{tags:y})}):null]})}function Yi(){let{t:e}=v(`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)(rt,{className:`text-white w-3 h-3`}),(0,X.jsx)(`span`,{children:e(H.COMMON$ERROR)})]})}function Xi({onClick:e,onDelete:t,onArchive:n,onUnarchive:r,onStop:i,onChangeTitle:a,showOptions:o,title:s,selectedRepository:c,lastUpdatedAt:l,createdAt:u,conversationId:d,executionStatus:f,sandboxStatus:p,contextMenuOpen:m=!1,onContextMenuToggle:h,isActive:g=!1,workspaceWorkingDir:_,showRepositoryMetadata:y=!0,llmModel:b=null,showLlmProfiles:x=!1,agentKind:S=null,acpServer:C=null,tags:w=null,showTags:T=!1,isArchived:E=!1,isPinned:D=!1,onTogglePin:O,alwaysShowPinIcon:k=!1}){let{t:A}=v(`openhands`),{trackDownloadVsCodeButtonClicked:j}=Kt(),[M,N]=Y.useState(`view`),{mutateAsync:P}=et(),F=e=>{e!==``&&e!==s&&a?.(e),N(`view`)},I=e=>{e.preventDefault(),e.stopPropagation(),t?.(),h?.(!1)},ee=e=>{e.preventDefault(),e.stopPropagation(),n?.(),h?.(!1)},L=e=>{e.preventDefault(),e.stopPropagation(),r?.(),h?.(!1)},te=e=>{e.preventDefault(),e.stopPropagation(),i?.(),h?.(!1)},R=e=>{e.preventDefault(),e.stopPropagation(),N(`edit`),h?.(!1)},z=async e=>{if(e.preventDefault(),e.stopPropagation(),j(),d)try{let e=await Yn.getVSCodeUrl(d);if(e.vscode_url){let t=er(e.vscode_url);t&&window.open(t,`_blank`)}}catch{}h?.(!1)},ne=async e=>{e.preventDefault(),e.stopPropagation(),d&&await P(d),h?.(!1)},V=e=>{e.preventDefault(),e.stopPropagation(),O?.()},re=()=>(0,X.jsx)(`button`,{type:`button`,"data-testid":d?`conversation-pin-toggle-${d}`:`conversation-pin-toggle`,"aria-pressed":D,"aria-label":A(D?H.CONVERSATION_PANEL$UNPIN_CONVERSATION:H.CONVERSATION_PANEL$PIN_CONVERSATION),onClick:V,className:B(`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)(gt,{className:B(`h-3.5 w-3.5`,D&&`fill-current`),"aria-hidden":!0})}),ie=!!(t||n||r||a||o),ae=ie||!!O,U=k&&D&&!!O,oe=y||E||x&&(S===`acp`||!!b)||T&&Hn(w).length>0;return(0,X.jsxs)(`div`,{"data-testid":`conversation-card`,"data-context-menu-open":m.toString(),"data-active":g?`true`:`false`,onClick:e,className:B(`group relative h-auto w-full cursor-pointer rounded-md py-1 pl-2 pr-1 transition-colors`,!m&&`hover:bg-[var(--oh-surface)]`,(g||m)&&`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)(Si,{title:s,titleMode:M,onTitleSave:F,executionStatus:f,sandboxStatus:p}),p===`ERROR`&&(0,X.jsx)(Yi,{})]}),(0,X.jsxs)(`div`,{className:B(`relative ml-auto pl-2 flex items-center justify-end shrink-0`,U?`min-w-[3.75rem]`:ae&&hi(m)),children:[!U&&(u??l)&&(0,X.jsx)(`p`,{className:B(`text-xs text-[var(--oh-muted)] text-right whitespace-nowrap transition-opacity -translate-x-1.5`,ae&&mi(m)),children:(0,X.jsx)(`time`,{children:fr(l??u)})}),ae?(0,X.jsxs)(`div`,{className:B(`absolute right-0 top-1/2 flex -translate-y-1/2 items-center gap-0.5 transition-opacity`,U?`pointer-events-auto visible opacity-100`:pi(m)),children:[O?re():null,U&&(u??l)&&ie?(0,X.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,X.jsx)(`div`,{className:pi(m),children:(0,X.jsx)(Ti,{contextMenuOpen:m,onContextMenuToggle:h||(()=>{}),onDelete:t&&I,onArchive:n&&ee,onUnarchive:r&&L,onStop:i&&te,onEdit:a&&R,onDownloadViaVSCode:z,onDownloadConversation:ne,executionStatus:f,conversationId:d,showOptions:o})}),(0,X.jsx)(`p`,{className:B(`pointer-events-none absolute inset-0 items-center justify-end`,`text-xs text-[var(--oh-muted)] whitespace-nowrap -translate-x-1.5`,gi(m)),children:(0,X.jsx)(`time`,{children:fr(l??u)})})]}):null,!U&&ie?(0,X.jsx)(Ti,{contextMenuOpen:m,onContextMenuToggle:h||(()=>{}),onDelete:t&&I,onArchive:n&&ee,onUnarchive:r&&L,onStop:i&&te,onEdit:a&&R,onDownloadViaVSCode:z,onDownloadConversation:ne,executionStatus:f,conversationId:d,showOptions:o}):null]}):null]})]}),oe&&(0,X.jsx)(Ji,{selectedRepository:c,lastUpdatedAt:l,createdAt:u,executionStatus:f,workspaceWorkingDir:_,showRepositoryMetadata:y,showTimestamp:!1,llmModel:b,showAgentChip:x,agentKind:S,acpServer:C,tags:w,showTags:T,isArchived:E})]})}var Zi={bitbucket:Re,bitbucket_data_center:Re,github:Fe,gitlab:Le};function Qi({label:e,children:t}){return(0,X.jsxs)(`div`,{className:`flex items-start gap-2 text-xs leading-4`,children:[(0,X.jsx)(`span`,{className:`w-20 shrink-0 whitespace-normal break-words text-[var(--oh-muted)]`,children:e}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 overflow-visible whitespace-normal break-words text-[var(--oh-foreground)]`,children:t})]})}function $i({icon:e,children:t,testId:n,tagKey:r}){return(0,X.jsxs)(`span`,{"data-testid":n,"data-tag-key":r,className:`inline-flex min-w-0 max-w-full items-start gap-1.5`,children:[e?(0,X.jsx)(`span`,{className:`inline-flex h-4 min-w-3 shrink-0 items-center justify-center [&_svg]:block`,children:e}):null,(0,X.jsx)(`span`,{className:`min-w-0 flex-1 whitespace-normal break-all`,children:t})]})}function ea({title:e,executionStatus:t,sandboxStatus:n,selectedRepository:r,workspaceWorkingDir:i,llmModel:a,agentKind:o=null,acpServer:s=null,createdAt:c,tags:l=null}){let{t:u}=v(`openhands`),d=r?.selected_repository??null,f=r?.selected_branch??null,p=r?.git_provider??null,m=p?Zi[p]:null,h=c?new Date(c).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`}):null,g=Hn(l);return(0,X.jsxs)(`div`,{"data-testid":`conversation-card-preview`,className:`flex w-[280px] max-w-[min(280px,90vw)] flex-col gap-3 overflow-visible p-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-start gap-2`,children:[t===void 0?null:(0,X.jsx)(`span`,{className:`inline-flex h-5 w-2.5 shrink-0 items-center justify-center`,children:(0,X.jsx)(xi,{executionStatus:t,sandboxStatus:n,showTooltip:!1})}),(0,X.jsx)(`span`,{className:`break-words text-sm font-medium leading-5 text-white`,children:e})]}),(0,X.jsxs)(`dl`,{className:`flex flex-col gap-1.5`,children:[d?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Qi,{label:u(H.CONVERSATION_PANEL$PREVIEW_REPO),children:(0,X.jsx)($i,{icon:m?(0,X.jsx)(m,{size:12}):p===`azure_devops`?(0,X.jsx)(Qe,{className:`h-3 w-3`}):void 0,children:d})}),f?(0,X.jsx)(Qi,{label:u(H.CONVERSATION_PANEL$PREVIEW_BRANCH),children:(0,X.jsx)($i,{icon:(0,X.jsx)(pr,{size:11}),children:f})}):null]}):i?(0,X.jsx)(Qi,{label:u(H.CONVERSATION_PANEL$PREVIEW_DIRECTORY),children:(0,X.jsx)($i,{icon:(0,X.jsx)(K,{size:12}),children:i})}):null,a?(0,X.jsx)(Qi,{label:u(H.CONVERSATION_PANEL$PREVIEW_MODEL),children:(0,X.jsx)($i,{testId:`conversation-card-preview-model`,icon:(0,X.jsx)(xr,{kind:o===`acp`?Kn(s):`openhands`,size:12}),children:a})}):null,g.map(([e,t])=>{let n=Wi(e,t);return(0,X.jsx)(Qi,{label:Fi(e,u),children:(0,X.jsx)($i,{testId:`conversation-card-preview-tag-row`,tagKey:e,icon:(0,X.jsx)(n,{"aria-hidden":!0,className:`h-3 w-3`}),children:t})},e)}),h?(0,X.jsx)(Qi,{label:u(H.CONVERSATION$CREATED),children:h}):null]})]})}function ta({taskStatus:e}){return(0,X.jsx)(`div`,{className:B(`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 na({taskStatus:e}){let{t}=v(`openhands`);return e===`WORKING`?null:(0,X.jsx)(`span`,{className:B(`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(V(e))})}function ra({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)(ta,{taskStatus:t})}),(0,X.jsx)(`h3`,{className:`text-sm font-medium text-content-2 truncate flex-1`,children:e}),(0,X.jsx)(na,{taskStatus:t})]})}function ia({selectedRepository:e,createdAt:t,detail:n}){let{t:r}=v(`openhands`);return(0,X.jsxs)(`div`,{className:B(`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)(ji,{selectedRepository:e}):(0,X.jsx)(Mi,{}),t&&(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] flex-1 text-right`,children:(0,X.jsx)(`time`,{children:`${fr(t)} ${r(H.CONVERSATION$AGO)}`})})]}),n&&(0,X.jsx)(`div`,{className:`text-xs text-[var(--oh-text-subtle)] truncate`,children:n})]})}function aa({task:e,onClick:t}){let{t:n}=v(`openhands`),r=e.request.title||e.detail||n(H.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:B(`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)(ra,{title:r,taskStatus:e.status})}),(0,X.jsx)(ia,{selectedRepository:i,createdAt:e.created_at,detail:e.detail})]})}function oa({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 sa({conversationId:e,title:t,selectedRepository:n,executionStatus:r,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,tags:g=null,showTags:_=!1}){let{t:y}=v(`openhands`),b=ot();return(0,X.jsx)(i,{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)(xi,{executionStatus:r,sandboxStatus:a,showTooltip:!1}),(0,X.jsx)(`span`,{className:`text-sm font-medium text-white truncate`,title:t,children:t||y(H.CONVERSATION$UNTITLED)})]}),(0,X.jsx)(Ji,{selectedRepository:n,lastUpdatedAt:o,createdAt:s,executionStatus:r,workspaceWorkingDir:c,showRepositoryMetadata:d,llmModel:f,showAgentChip:p,agentKind:m,acpServer:h,tags:g,showTags:_})]}),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)(ln,{to:b(`/conversations/${e}`),onClick:u,"data-testid":`compact-conversation-row`,"data-conversation-id":e,"aria-label":t||e,className:({isActive:e})=>B(`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)(xi,{executionStatus:r,sandboxStatus:a,showTooltip:!1})})})}var ca={showOlderConversations:!0,showArchivedConversations:!1,showRepoBranchMetadata:!1,showLlmProfiles:!1,showTagsMetadata:!1,showHoverMetadata:!0,organizeMode:`chronological`,conversationSort:`updated`,threadScope:`all`,automationFilterMode:`all`,selectedAutomationNames:[],groupFolderOrder:[]},Z=Ln()(In(e=>({...ca,setShowOlderConversations:t=>e(()=>({showOlderConversations:t})),toggleShowOlderConversations:()=>e(e=>({showOlderConversations:!e.showOlderConversations})),setShowArchivedConversations:t=>e(()=>({showArchivedConversations:t})),toggleShowArchivedConversations:()=>e(e=>({showArchivedConversations:!e.showArchivedConversations})),setShowRepoBranchMetadata:t=>e(()=>({showRepoBranchMetadata:t})),toggleShowRepoBranchMetadata:()=>e(e=>({showRepoBranchMetadata:!e.showRepoBranchMetadata})),setShowLlmProfiles:t=>e(()=>({showLlmProfiles:t})),toggleShowLlmProfiles:()=>e(e=>({showLlmProfiles:!e.showLlmProfiles})),setShowTagsMetadata:t=>e(()=>({showTagsMetadata:t})),toggleShowTagsMetadata:()=>e(e=>({showTagsMetadata:!e.showTagsMetadata})),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})),setAutomationFilterMode:t=>e(()=>({automationFilterMode:t})),toggleAutomationName:t=>e(e=>({selectedAutomationNames:e.selectedAutomationNames.includes(t)?e.selectedAutomationNames.filter(e=>e!==t):[...e.selectedAutomationNames,t]})),setGroupFolderOrder:t=>e(()=>({groupFolderOrder:[...t]}))}),{name:`conversation-panel-preferences`,storage:Rn(()=>localStorage),partialize:e=>({showOlderConversations:e.showOlderConversations,showArchivedConversations:e.showArchivedConversations,showRepoBranchMetadata:e.showRepoBranchMetadata,showLlmProfiles:e.showLlmProfiles,showTagsMetadata:e.showTagsMetadata,showHoverMetadata:e.showHoverMetadata,organizeMode:e.organizeMode,conversationSort:e.conversationSort,threadScope:e.threadScope,automationFilterMode:e.automationFilterMode,selectedAutomationNames:e.selectedAutomationNames,groupFolderOrder:e.groupFolderOrder})}));function la(e,t,n){if(!t)return[...e];let r=e.filter(e=>t.has(e.id));if(n!=null&&!r.some(e=>e.id===n)){let t=e.find(e=>e.id===n);t&&r.push(t)}return r}function ua(e,t){let n=t.limit??5,r=la(e,t.discoveryConversationIds,t.activeConversationId),i;if(r.length<=n)i=r;else{let e=t.activeConversationId==null?-1:r.findIndex(e=>e.id===t.activeConversationId);i=e>=n?[...r.slice(0,n-1),r[e]]:r.slice(0,n)}let a=i.length<e.length;return t.expanded?{visibleConversations:[...e],isPreviewTruncated:a,isShowingAll:!0}:{visibleConversations:i,isPreviewTruncated:a,isShowingAll:!a}}function da(e,t){let n=new Map(t.map(e=>[e.id,e]));return e.map(e=>n.get(e)).filter(e=>e!=null)}function fa(e,t){if(t.length===0)return[...e];let n=new Set(t);return e.filter(e=>!n.has(e.id))}var pa=`__unnamed__`;function ma(e){if(e.trigger===`automation`)return!0;let t=e.tags;return t?Un.some(e=>!!t[e]):!1}function ha(e){return e.tags?.automationname?.trim()||`__unnamed__`}function ga(e){let t=new Set,n=!1;for(let r of e){if(!ma(r))continue;let e=ha(r);e===`__unnamed__`?n=!0:t.add(e)}let r=[...t].sort((e,t)=>e.localeCompare(t));return n&&r.push(pa),r}function _a(e,t,n,r){if(t===`all`)return[...e];if(t===`hide-automations`)return e.filter(e=>!ma(e));let i=new Set(r),a=n.filter(e=>i.has(e)),o=a.length>0?new Set(a):null;return e.filter(e=>ma(e)?o===null||o.has(ha(e)):!1)}function va(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 ya(e){if(!e)return 0;let t=Date.parse(e);return Number.isFinite(t)?t:0}function ba(e,t){let n=t===`created`?`created_at`:`updated_at`;return[...e].sort((e,t)=>ya(t[n])-ya(e[n]))}function xa(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 Sa(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 Ca(e,t){return t===`local`?xa(e):Sa(e)}function wa(e,t,n,r){let i=e.map(e=>({conversationId:e.id,groupId:Ca(e,n).id,page:t.get(e.id)??0})),a=new Map;for(let{groupId:e,page:t}of i){let n=a.get(e);(n===void 0||t<n)&&a.set(e,t)}let o=new Set;for(let{conversationId:e,groupId:t,page:n}of i)n===a.get(t)&&o.add(e);let s=r?.forceIncludeConversationId;return s!=null&&e.some(e=>e.id===s)&&o.add(s),o}function Ta(e,t,n,r){let i=new Map;for(let n of e){let{id:e,label:a}=Ca(n,t),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=ba(r.conversations,n);return{id:e,label:r.label,conversations:i,launch:va(e,t,i)}}),o=e=>e.conversations.reduce((e,t)=>Math.max(e,ya(n===`created`?t.created_at:t.updated_at)),0);return a.sort((e,t)=>o(t)-o(e)),a}function Ea(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 Da(e,t,n,r,i=`after`){if(n===r)return[...e];let a=Ea(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}var Oa=`px-2 pb-1 pt-1`,ka=`text-[11px] font-semibold uppercase tracking-wide text-[var(--oh-muted)]`;function Aa({children:e,suffix:t}){return t==null?(0,X.jsx)(`div`,{role:`presentation`,className:B(Oa,ka),children:e}):(0,X.jsxs)(`div`,{role:`presentation`,className:B(`flex items-baseline justify-between gap-2`,Oa),children:[(0,X.jsx)(`span`,{className:B(`min-w-0 truncate text-left`,ka),children:e}),t]})}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:B(`group`,On,`text-[var(--oh-foreground)] disabled:opacity-50`),children:[(0,X.jsx)(e,{className:B(`h-3.5 w-3.5`,En),"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),n?(0,X.jsx)(Ne,{className:`ml-auto h-3.5 w-3.5 shrink-0 text-white`,"aria-hidden":!0}):null]})}var ja=e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1):e;function Ma({filterMenuOpen:e,setFilterMenuOpen:t,menuRef:n,backendKind:r,organizeMode:i,setOrganizeMode:a,conversationSort:o,setConversationSort:s,threadScope:c,setThreadScope:l,automationFilterMode:u,setAutomationFilterMode:d,selectedAutomationNames:f,onToggleAutomationName:p,automationNameFacets:m,showOlderConversations:h,showArchivedConversations:g,toggleShowArchivedConversations:_,toggleShowOlderConversations:y,showRepoBranchMetadata:b,toggleShowRepoBranchMetadata:x,showLlmProfiles:S,toggleShowLlmProfiles:C,showTagsMetadata:w,toggleShowTagsMetadata:T,showHoverMetadata:E,toggleShowHoverMetadata:D,totalConversationsCount:O,onRequestDeleteAll:k}){let{t:A}=v(`openhands`),j=A(r===`local`?H.CONVERSATION_PANEL$BY_WORKSPACE:H.CONVERSATION_PANEL$BY_REPOSITORY),M=Y.useRef(null),N=Y.useRef(null),P=Y.useRef(e);return Y.useEffect(()=>{e?(N.current?.querySelector(`[role="menuitem"], [role="menuitemradio"]`))?.focus():P.current&&M.current?.focus(),P.current=e},[e]),(0,X.jsxs)(`div`,{ref:n,className:`relative shrink-0 pr-0.5`,children:[(0,X.jsxs)(`button`,{ref:M,type:`button`,"data-testid":`older-conversations-filter-toggle`,"aria-label":A(H.CONVERSATION_PANEL$FILTER_LABEL),"aria-haspopup":`menu`,"aria-expanded":e,onClick:()=>t(!e),className:B(`relative 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)]`,kn),children:[(0,X.jsx)(St,{className:`lucide lucide-list-filter shrink-0`,width:14,height:14,strokeWidth:2,"aria-hidden":!0}),u===`all`?null:(0,X.jsx)(`span`,{"aria-hidden":!0,"data-testid":`automation-filter-active-indicator`,className:`absolute right-0.5 top-0.5 h-1.5 w-1.5 rounded-full bg-[var(--oh-accent)]`})]}),e?(0,X.jsxs)(`div`,{ref:N,role:`menu`,"aria-orientation":`vertical`,"aria-label":A(H.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=N.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:B(`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`,Tn,Cn),children:[(0,X.jsx)(Aa,{children:A(H.CONVERSATION_PANEL$ORGANIZE)}),(0,X.jsx)(Q,{icon:K,label:j,selected:i===`grouped`,onClick:()=>{a(`grouped`),t(!1)}}),(0,X.jsx)(Q,{icon:ce,label:A(H.CONVERSATION_PANEL$CHRONOLOGICAL),selected:i===`chronological`,onClick:()=>{a(`chronological`),t(!1)}}),(0,X.jsx)(ut,{}),(0,X.jsx)(Aa,{children:A(H.CONVERSATION_PANEL$SORT_BY)}),(0,X.jsx)(Q,{icon:ae,label:A(H.CONVERSATION_PANEL$SORT_CREATED),selected:o===`created`,onClick:()=>{s(`created`),t(!1)}}),(0,X.jsx)(Q,{icon:ke,label:A(H.CONVERSATION_PANEL$SORT_UPDATED),selected:o===`updated`,onClick:()=>{s(`updated`),t(!1)}}),(0,X.jsx)(ut,{}),(0,X.jsx)(Aa,{children:A(H.CONVERSATION_PANEL$SHOW)}),(0,X.jsx)(Q,{icon:Oe,label:A(H.CONVERSATION_PANEL$ALL_THREADS),selected:c===`all`,onClick:()=>{l(`all`),t(!1)}}),(0,X.jsx)(Q,{icon:Ce,label:A(H.CONVERSATION_PANEL$RELEVANT_THREADS),selected:c===`relevant`,onClick:()=>{l(`relevant`),t(!1)}}),(0,X.jsx)(Q,{icon:re,label:A(H.CONVERSATION_PANEL$SHOW_ARCHIVED),selected:g,testId:`toggle-show-archived`,onClick:()=>{_(),t(!1)}}),(0,X.jsx)(ut,{}),(0,X.jsx)(Aa,{children:A(H.CONVERSATION_PANEL$AUTOMATIONS)}),(0,X.jsx)(Q,{icon:Oe,label:A(H.CONVERSATION_PANEL$AUTOMATIONS_ALL),selected:u===`all`,testId:`automation-filter-all`,onClick:()=>{d(`all`),t(!1)}}),(0,X.jsx)(Q,{icon:Ae,label:A(H.CONVERSATION_PANEL$AUTOMATIONS_HIDE),selected:u===`hide-automations`,testId:`automation-filter-hide`,onClick:()=>{d(`hide-automations`),t(!1)}}),(0,X.jsx)(Q,{icon:Ct,label:A(H.CONVERSATION_PANEL$AUTOMATIONS_ONLY),selected:u===`only-automations`,testId:`automation-filter-only`,onClick:()=>{d(`only-automations`),t(!1)}}),u===`only-automations`?m.map(e=>(0,X.jsx)(Q,{icon:ue,label:e===`__unnamed__`?A(H.CONVERSATION_PANEL$AUTOMATION_UNNAMED):e,selected:f.includes(e),testId:`automation-name-filter-${e}`,onClick:()=>p(e)},e)):null,(0,X.jsx)(ut,{}),(0,X.jsx)(Aa,{children:A(H.CONVERSATION_PANEL$METADATA)}),(0,X.jsx)(Q,{icon:pt,label:A(H.CONVERSATION_PANEL$REPO_BRANCH),selected:b,testId:`toggle-repo-branch-metadata`,onClick:()=>{x(),t(!1)}}),(0,X.jsx)(Q,{icon:Me,label:A(H.CONVERSATION_PANEL$LLM_MODEL),selected:S,testId:`toggle-llm-profiles`,onClick:()=>{C(),t(!1)}}),(0,X.jsx)(Q,{icon:ue,label:A(H.CONVERSATION_PANEL$TAGS),selected:w,testId:`toggle-tags-metadata`,onClick:()=>{T(),t(!1)}}),(0,X.jsx)(Q,{icon:Nt,label:A(H.CONVERSATION_PANEL$HOVER_METADATA),selected:E,testId:`toggle-hover-metadata`,onClick:()=>{D(),t(!1)}}),(0,X.jsx)(ut,{}),(0,X.jsx)(Aa,{suffix:(0,X.jsx)(`span`,{className:`shrink-0 text-right text-[10px] font-medium normal-case tracking-normal text-[var(--oh-muted)]/70`,children:A(H.CONVERSATION_PANEL$OLDER_OVER_ONE_HOUR)}),children:A(H.CONVERSATION_PANEL$OLDER_SECTION)}),(0,X.jsx)(Q,{testId:`toggle-older-conversations`,icon:h?Ae:de,label:ja(A(h?H.CONVERSATION$HIDE:H.CONVERSATION$SHOW_ALL)),onClick:()=>{y(),t(!1)}}),(0,X.jsx)(ut,{}),(0,X.jsx)(Q,{testId:`delete-all-conversations`,icon:Rt,label:ja(A(H.CONVERSATION$DELETE_ALL)),disabled:O===0,onClick:()=>{O!==0&&(k(),t(!1))}})]}):null]})}var Na=B(`z-50 flex flex-col rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-white shadow-lg`,Sn);function Pa(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 Fa({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=v(`openhands`),{navigate:o}=on(),[s,c]=Y.useState(!1),l=Y.useRef(null),u=Y.useRef(null),d=Pa(u,{open:s,enabled:i}),{data:f,error:p}=vt(),m=f?.workspaceParents??[],{mutate:h}=ft(),{mutate:g}=bt(),{mutate:_}=ct(),{mutate:y}=lt(),{workspaces:b}=ht(),S=st(p,a),[C,w]=Y.useState(!1),[T,E]=Y.useState(!1),{mutate:D,isPending:O}=dr(),k=x(),A=O||k;Y.useEffect(()=>{if(!s||C||T)return;let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[s,C,T]),Y.useEffect(()=>{if(!s||C||T)return;let e=e=>{e.key===`Escape`&&c(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[s,C,T]);let j=e=>{A||D({workingDir:e,entryPoint:`sidebar_local_menu`},{onSuccess:e=>{c(!1),o(`/conversations/${e.conversation_id}`)}})},M=On,N=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),P=Y.useCallback(()=>{c(e=>!e)},[]),F=s&&(!i||d!==null),I=!!S,ee=i&&d?{position:`fixed`,top:d.top,left:d.left,width:d.width}:void 0,L=(0,X.jsx)(`button`,{type:`button`,"data-testid":`add-workspaces-button`,disabled:I,onMouseDown:N,onClick:e=>{e.preventDefault(),e.stopPropagation(),!I&&w(!0)},className:M,children:a(H.HOME$ADD_WORKSPACES)}),te=S?(0,X.jsx)(xn,{content:S,placement:`top`,children:(0,X.jsx)(`span`,{className:`block`,children:L})}):L;return(0,X.jsxs)(`div`,{className:B(!i&&`relative`,t),ref:l,children:[(0,X.jsx)(`span`,{ref:u,className:`inline-flex`,children:e({onClick:P,"aria-expanded":s,"aria-haspopup":`menu`,disabled:A})}),F&&(0,X.jsxs)(`div`,{"data-testid":r,className:B(Na,!i&&B(`absolute top-full mt-0`,n)),style:ee,children:[(0,X.jsxs)(`ul`,{className:B(`max-h-[40vh] overflow-y-auto sm:max-h-[280px]`,Tn),children:[(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,disabled:A,"data-testid":`launch-no-workspace`,onClick:()=>j(),className:M,children:(0,X.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:a(H.HOME$NO_WORKSPACE_OPTION)})})}),b.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,disabled:A,"data-testid":`launch-workspace`,"data-workspace-path":e.path,onClick:()=>j(e.path),className:M,children:[(0,X.jsx)(`span`,{className:An,"aria-hidden":!0,children:(0,X.jsx)(Cr,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.name})]})},e.id))]}),(0,X.jsxs)(`div`,{className:B(`flex flex-col`,Tn),"data-testid":`new-conversation-menu-footer`,children:[(0,X.jsx)(Xe,{inset:`menu`,testId:`new-conversation-menu-footer-divider`}),te,(b.length>0||m.length>0)&&(0,X.jsx)(`button`,{type:`button`,"data-testid":`manage-workspaces-button`,onMouseDown:N,onClick:e=>{e.preventDefault(),e.stopPropagation(),E(!0)},className:M,children:a(H.HOME$MANAGE_WORKSPACES)})]})]}),(0,X.jsx)(dt,{isOpen:C,onClose:()=>w(!1),onAdd:e=>h(e),onAddParent:e=>_(e)}),(0,X.jsx)(_t,{isOpen:T,workspaces:b,workspaceParents:m,onClose:()=>E(!1),onRemove:e=>g(e),onRemoveParent:e=>y(e)})]})}function Ia({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:An,"aria-hidden":!0,children:(0,X.jsx)(Cr,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.full_name})]})})}function La({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=v(`openhands`),{navigate:o}=on(),{providers:s}=Dr(),{lastSelectedProvider:c,setLastSelectedProvider:l}=Or(),[u,d]=Y.useState(!1),f=Y.useRef(null),p=Y.useRef(null),m=Pa(p,{open:u,enabled:i}),[h,g]=Y.useState(c??null),[_,y]=Y.useState(``),b=Tr(_,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:S,isLoading:C,isError:w,hasNextPage:T,isFetchingNextPage:E,fetchNextPage:D}=wr({provider:h}),{data:O,isLoading:k}=Er(b,h),A=Y.useMemo(()=>S?.pages.flatMap(e=>e.items)??[],[S]),j=b?O??[]:A,{mutate:M,isPending:N}=dr(),P=x(),F=N||P;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 I=e=>{F||M({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),y(``)},L=On;Y.useEffect(()=>{u&&(b||!T||E||C||j.length===0||j.length>=10||D())},[u,b,T,E,C,j.length,D]);let te=b?k:C,R=!b&&T&&j.length>0,z=Y.useCallback(()=>{d(e=>!e)},[]),ne=u&&(!i||m!==null),V=i&&m?{position:`fixed`,top:m.top,left:m.left,width:m.width}:void 0;return(0,X.jsxs)(`div`,{className:B(!i&&`relative`,t),ref:f,children:[(0,X.jsx)(`span`,{ref:p,className:`inline-flex`,children:e({onClick:z,"aria-expanded":u,"aria-haspopup":`menu`,disabled:F})}),ne&&(0,X.jsxs)(`div`,{"data-testid":r,className:B(Na,!i&&B(`absolute top-full mt-0`,n)),style:V,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:B(`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)(at,{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)(kr,{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=>y(e.target.value),placeholder:a(H.COMMON$SEARCH_REPOSITORIES),disabled:!h,className:B(`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)(Xe,{inset:`menu`}),(0,X.jsxs)(`ul`,{className:B(`max-h-[40vh] overflow-y-auto custom-scrollbar-always sm:max-h-[280px]`,Tn),children:[te&&j.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(H.HOME$LOADING_REPOSITORIES)}),w&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[#F87171]`,"data-testid":`cloud-repo-error`,children:a(H.HOME$FAILED_TO_LOAD_REPOSITORIES)}),!te&&!w&&j.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(H.GITHUB$NO_RESULTS)}),j.map(e=>(0,X.jsx)(Ia,{repo:e,disabled:F,onSelect:I,itemClass:L},`${e.git_provider}:${e.id}`)),R&&(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`cloud-repo-load-more`,disabled:E,onClick:()=>D(),className:L,children:(0,X.jsx)(`span`,{className:`text-[var(--oh-text-secondary)]`,children:a(E?H.HOME$LOADING_MORE_REPOSITORIES:H.CONVERSATION$LOAD_MORE)})})})]})]})]})}var Ra=B(`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 za({backendKind:e}){let{t}=v(`openhands`),n=t(H.CONVERSATION_PANEL$NEW_THREAD_FOLDER_ARIA),r=(0,X.jsx)(he,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0,strokeWidth:2});return e===`local`?(0,X.jsx)(Fa,{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:Ra,"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)(La,{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:Ra,"aria-label":n,"aria-expanded":t,"aria-haspopup":a,disabled:i,"data-testid":`conversation-panel-new-thread-picker`,onClick:e,children:r})})}function Ba({group:e,expanded:t,previewExpanded:n,isDragging:r,dropIndicatorPosition:i,animateLayout:a,isCreatingConversationFlow:o,activeConversationId:s,discoveryConversationIds:c,onToggleExpanded:l,onDragStart:u,onDragEnd:d,onDragOver:f,onDragLeave:p,onDrop:m,onTogglePreviewExpanded:h,onLaunchFromGroup:g,renderConversationCard:_}){let{t:y}=v(`openhands`),b=(0,Y.useRef)(null),x=`thread-folder-${e.id.replace(/[^a-zA-Z0-9_-]/g,`-`)}`,S=e.id.replace(/[^a-zA-Z0-9_-]/g,`-`),{visibleConversations:C,isPreviewTruncated:w,isShowingAll:T}=ua(e.conversations,{expanded:n,activeConversationId:s,discoveryConversationIds:c??void 0});return(0,X.jsxs)(Pe.section,{ref:b,layout:a?`position`:!1,transition:{type:`spring`,stiffness:600,damping:45},"aria-labelledby":x,"data-testid":`thread-folder-${S}`,onDragOver:f,onDragLeave:p,onDrop:m,className:`relative rounded-md`,children:[i?(0,X.jsx)(`div`,{"aria-hidden":!0,"data-testid":`thread-folder-drop-indicator-${S}`,className:B(`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:B(r&&`opacity-0`),children:[(0,X.jsxs)(`div`,{className:B(`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:x,"aria-expanded":t,"aria-controls":`thread-folder-content-${S}`,"data-testid":`thread-folder-drag-${S}`,"aria-label":y(t?H.CONVERSATION_PANEL$COLLAPSE_FOLDER:H.CONVERSATION_PANEL$EXPAND_FOLDER,{label:e.label}),onClick:l,onDragStart:t=>{t.stopPropagation();let{dataTransfer:n}=t;if(n){n.effectAllowed=`move`,n.setData(`text/plain`,e.id);let r=b.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)}}u()},onDragEnd:e=>{e.stopPropagation(),d()},className:B(`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)(K,{className:B(`h-4 w-4 shrink-0`,t?`hidden group-hover/folder:block`:`block group-hover/folder:hidden`),"aria-hidden":!0}),(0,X.jsx)(nt,{className:B(`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:B(`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":y(H.CONVERSATION_PANEL$ADD_CONVERSATION_TO_GROUP,{label:e.label}),"data-testid":`add-conversation-to-group-${S}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),g()},children:(0,X.jsx)(Pt,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0,strokeWidth:2})})]}),t?(0,X.jsxs)(`div`,{id:`thread-folder-content-${S}`,className:`mt-0.5 space-y-0.5`,children:[C.map(_),w?(0,X.jsx)(`div`,{className:`pl-2`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`thread-folder-view-more-${S}`,onClick:h,className:`cursor-pointer text-xs text-[var(--oh-text-dim)] hover:text-white`,children:y(T?H.CONVERSATION_PANEL$LESS:H.CONVERSATION_PANEL$MORE)})}):null]}):null]})]})}function Va({groups:e,groupIds:t,groupFolderOrder:n,setGroupFolderOrder:r,collapsedGroupIds:i,expandedGroupPreviewIds:a,discoveryConversationIds:o,onToggleGroupCollapsed:s,onToggleGroupPreviewExpanded:c,isCreatingConversationFlow:l,activeConversationId:u,onLaunchFromGroup:d,renderConversationCard:f}){let{t:p}=v(`openhands`),[m,h]=(0,Y.useState)(null),[g,_]=(0,Y.useState)(null),[y,b]=(0,Y.useState)(null),[x,S]=(0,Y.useState)(!1),C=(0,Y.useRef)(null);(0,Y.useEffect)(()=>()=>{C.current&&clearTimeout(C.current)},[]);let w=(0,Y.useCallback)(()=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{S(!1),C.current=null},300)},[]),T=(0,Y.useCallback)(()=>{h(null),_(null),b(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(!m||m===e){T(),w();return}r(Da(n,t,m,e,i)),T(),w()},[m,n,t,T,r,w]);return(0,X.jsx)(`nav`,{"aria-label":p(H.SIDEBAR$CONVERSATIONS),className:`space-y-1 md:space-y-0.5 pb-1`,children:e.map(e=>(0,X.jsx)(Ba,{group:e,expanded:!i.has(e.id),previewExpanded:a.has(e.id),isDragging:m===e.id,dropIndicatorPosition:g===e.id&&m!==e.id?y:null,animateLayout:x,isCreatingConversationFlow:l,activeConversationId:u,discoveryConversationIds:o,onToggleExpanded:()=>s(e.id),onDragStart:()=>{S(!0),h(e.id)},onDragEnd:()=>{T(),w()},onDragOver:t=>{t.preventDefault();let{dataTransfer:n}=t;n&&(n.dropEffect=`move`),_(e.id),b(E(t))},onDragLeave:()=>{_(t=>t===e.id?null:t)},onDrop:t=>{t.preventDefault(),D(e.id,E(t))},onTogglePreviewExpanded:()=>c(e.id),onLaunchFromGroup:()=>d(e.launch),renderConversationCard:f},e.id))})}function Ha({pinnedConversations:e,isPreviewExpanded:t,onTogglePreviewExpanded:n,activeConversationId:r,showDivider:i=!1,renderConversationCard:a}){let{t:o}=v(`openhands`),{visibleConversations:s,isPreviewTruncated:c,isShowingAll:l}=ua(e,{limit:5,expanded:t,activeConversationId:r});return(0,X.jsxs)(`section`,{"data-testid":`conversation-panel-pinned-section`,className:B(`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)(gt,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0}),o(H.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?H.CONVERSATION_PANEL$LESS:H.CONVERSATION_PANEL$MORE)})}):null]})}var Ua=`archived-conversations`,Wa={archivesByBackendId:{}};function Ga(e,t){return e[t]??[]}var Ka=Ln()(In((e,t)=>({...Wa,archiveConversation:(n,r)=>{let i=Ga(t().archivesByBackendId,n);i.includes(r)||e(e=>({archivesByBackendId:{...e.archivesByBackendId,[n]:[r,...i]}}))},removeArchivedConversation:(n,r)=>{let i=Ga(t().archivesByBackendId,n);i.includes(r)&&e(e=>({archivesByBackendId:{...e.archivesByBackendId,[n]:i.filter(e=>e!==r)}}))},isArchived:(e,n)=>Ga(t().archivesByBackendId,e).includes(n)}),{name:Ua,storage:Rn(()=>localStorage),partialize:e=>({archivesByBackendId:e.archivesByBackendId})})),qa={pinsByBackendId:{}};function Ja(e,t){return e[t]??[]}var Ya=Ln()(In((e,t)=>({...qa,pinConversation:(n,r)=>{let i=Ja(t().pinsByBackendId,n);i.includes(r)||e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:[r,...i]}}))},unpinConversation:(n,r)=>{let i=Ja(t().pinsByBackendId,n);i.includes(r)&&e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:i.filter(e=>e!==r)}}))},togglePin:(e,n)=>{Ja(t().pinsByBackendId,e).includes(n)?t().unpinConversation(e,n):t().pinConversation(e,n)},pruneMissingConversations:(n,r)=>{let i=new Set(r),a=Ja(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:Rn(()=>localStorage),partialize:e=>({pinsByBackendId:e.pinsByBackendId})})),Xa=()=>{},Za=[],Qa=3600*1e3,$a=e=>{let t=Date.now()-Qa,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 eo({onClose:e,compact:t=!1}){let{t:n}=v(`openhands`),{conversationId:r,navigate:a}=on(),{backend:o}=F(),s=ot(),c=lr(e??Xa),[l,u]=Y.useState(!1),[d,f]=Y.useState(!1),[p,m]=Y.useState(!1),[h,g]=Y.useState(!1),[_,y]=Y.useState(!1),b=Z(e=>e.showOlderConversations),S=Z(e=>e.showArchivedConversations),C=Z(e=>e.toggleShowArchivedConversations),T=Z(e=>e.toggleShowOlderConversations),E=Z(e=>e.showRepoBranchMetadata),D=Z(e=>e.toggleShowRepoBranchMetadata),O=Z(e=>e.showLlmProfiles),k=Z(e=>e.toggleShowLlmProfiles),A=Z(e=>e.showTagsMetadata),j=Z(e=>e.toggleShowTagsMetadata),M=Z(e=>e.showHoverMetadata),P=Z(e=>e.toggleShowHoverMetadata),I=Z(e=>e.organizeMode),ee=Z(e=>e.setOrganizeMode),L=Z(e=>e.conversationSort),te=Z(e=>e.setConversationSort),R=Z(e=>e.threadScope),z=Z(e=>e.setThreadScope),V=Z(e=>e.automationFilterMode),re=Z(e=>e.setAutomationFilterMode),ie=Z(e=>e.selectedAutomationNames),ae=Z(e=>e.toggleAutomationName),U=Z(e=>e.groupFolderOrder),oe=Z(e=>e.setGroupFolderOrder),[se,ce]=Y.useState(!1),[le,ue]=Y.useState(!1),de=lr(()=>{ce(!1)}),[fe,pe]=Y.useState(()=>new Set),[me,he]=Y.useState(()=>new Set),[ge,_e]=Y.useState(!1),ve=Ya(e=>e.pinsByBackendId[o.id]??Za),ye=Ya(e=>e.togglePin),be=Ya(e=>e.unpinConversation),xe=Ya(e=>e.pruneMissingConversations),Se=Ka(e=>e.archivesByBackendId[o.id]??Za),Ce=Ka(e=>e.archiveConversation),we=Y.useMemo(()=>new Set(Se),[Se]),Te=Ka(e=>e.removeArchivedConversation),Ee=Y.useCallback(e=>{pe(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),De=Y.useCallback(e=>{he(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);Y.useEffect(()=>{I!==`grouped`&&(pe(new Set),he(new Set))},[I]);let Oe=Y.useRef(null),[W,ke]=Y.useState(null),[Ae,je]=Y.useState(null),[Me,Ne]=Y.useState(null),{data:G,isLoading:Pe,isFetched:Fe,hasNextPage:Ie,isFetching:Le,isFetchingNextPage:Re,fetchNextPage:ze}=ai(),{data:Be}=oi(),Ve=Y.useMemo(()=>{let e=G?.pages.flatMap(e=>e.items)??[],t=new Set;return e.filter(e=>t.has(e.id)?!1:(t.add(e.id),!0))},[G]),He=Y.useMemo(()=>{let e=new Map;return G?.pages.forEach((t,n)=>{t.items.forEach(t=>{e.has(t.id)||e.set(t.id,n)})}),e},[G]),Ue=Y.useMemo(()=>S?Ve:Ve.filter(e=>!we.has(e.id)),[Ve,we,S]),We=Y.useMemo(()=>ga(Ue),[Ue]),Ge=Y.useMemo(()=>_a(Ue,V,ie,We),[V,We,Ue,ie]),Ke=Y.useMemo(()=>da(ve,Ue),[Ue,ve]);Y.useEffect(()=>{if(!Fe)return;let e=G?.pages.flatMap(e=>e.items.map(e=>e.id))??[];xe(o.id,e)},[o.id,G,Fe,xe]),Y.useEffect(()=>{ve.length===0&&_e(!1)},[ve.length]);let qe=Y.useMemo(()=>{let e=R===`relevant`?Ge.filter(e=>ne(e.execution_status)):Ge;return t?e:fa(e,ve)},[Ge,t,ve,R]),{recent:Je,older:Xe}=Y.useMemo(()=>$a(qe),[qe]),Ze=Y.useMemo(()=>ba(b?[...Je,...Xe]:Je,L),[Je,Xe,b,L]),Qe=Y.useMemo(()=>({emptyWorkspace:n(H.CONVERSATION_PANEL$NO_WORKSPACE),emptyRepository:n(H.CONVERSATION_PANEL$NO_REPOSITORY)}),[n]),et=Y.useMemo(()=>t||I!==`grouped`?null:[...Je,...b?Xe:[]],[t,Xe,I,Je,b]),tt=Y.useMemo(()=>et?Ta(et,o.kind,L,Qe):null,[o.kind,L,Qe,et]),nt=Y.useMemo(()=>et?wa(et,He,o.kind,{forceIncludeConversationId:r}):null,[o.kind,He,r,et]),rt=Y.useMemo(()=>tt?Ea(tt,U):null,[tt,U]),it=Y.useMemo(()=>tt?.map(e=>e.id)??[],[tt]),at=Y.useMemo(()=>ba(Je.filter(e=>ne(e.execution_status)),L),[L,Je]),st=Ze.length,ct=rt?.length??0,lt=I===`grouped`&&!t?ct===0:st===0,ut=lt&&V!==`all`&&Ue.length>0&&Ge.length===0,K=I===`grouped`&&!t?ct:st,dt=G?.pages.length??0,[ft,pt]=Y.useState(null),[mt,ht]=Y.useState(null),gt=Y.useRef(K);gt.current=K;let _t=Y.useRef(dt);_t.current=dt;let vt=Y.useCallback(()=>{pt(null),ht(null)},[]),yt=Y.useCallback(()=>{Ie&&(pt(gt.current),ht(_t.current))},[Ie]);Y.useEffect(()=>{if(ft!==null){if(K>ft){vt();return}if(I===`grouped`&&!t&&mt!=null&&dt>=mt+3){vt();return}if(!(Le||Re)){if(!Ie){vt();return}ze()}}},[vt,t,ft,mt,K,dt,I,Ie,Le,Re,ze]);let bt=ft!==null||Re,{mutate:xt,mutateAsync:St}=$e(),{mutate:Ct}=Ye(),{mutate:wt}=rr(),Tt=Xe.length>0&&!b,Et=!!Ie&&!Tt&&!t,{mutate:Dt}=dr(),Ot=x(),kt=Y.useCallback(e=>{Ot||Dt({workingDir:e.workingDir,repository:e.repository,entryPoint:`sidebar_relaunch_project`},{onSuccess:e=>{a(`/conversations/${e.conversation_id}`)}})},[Dt,Ot,a]),At=Y.useCallback((e,t)=>{u(!0),ke(e),je(t)},[]),jt=Y.useCallback((e,t)=>{f(!0),ke(e),je(t)},[]),Mt=Y.useCallback(e=>{Te(o.id,e)},[o.id,Te]),Nt=Y.useCallback(e=>{m(!0),ke(e)},[]),Pt=Y.useCallback((e,t)=>{wt({conversationId:e,newTitle:t},{onSuccess:()=>{w(n(H.CONVERSATION$TITLE_UPDATED))}})},[n,wt]),Ft=()=>{if(W){let e=W;xt({conversationId:e},{onSuccess:()=>{Te(o.id,e),e===r&&a(`/conversations`)}})}},It=()=>{W&&(Ce(o.id,W),be(o.id,W),W===r&&a(`/conversations`))},Lt=()=>{W&&Ct({conversationId:W})},Rt=async()=>{let e=Ve.map(e=>e.id),t=await Promise.allSettled(e.map(e=>St({conversationId:e}))),n=t.flatMap((t,n)=>t.status===`fulfilled`?[e[n]]:[]),i=t.length-n.length;for(let e of n)Te(o.id,e);r!==null&&n.includes(r)&&a(`/conversations`),i>0&&N(`${i} conversation${i===1?``:`s`} could not be deleted.`)},zt=Y.useCallback((n,a)=>{let c=ve.includes(n.id),l=we.has(n.id);return t?(0,X.jsx)(sa,{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===r,onClose:e,showRepositoryMetadata:E,llmModel:n.llm_model,showLlmProfiles:O,agentKind:n.agent_kind,acpServer:n.acp_server,tags:n.tags,showTags:A},n.id):(0,X.jsx)(i,{placement:`right-start`,delay:1e3,closeDelay:100,isDisabled:!M||Me===n.id,disableAnimation:!1,className:`max-w-none overflow-visible rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,content:(0,X.jsx)(ea,{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,agentKind:n.agent_kind,acpServer:n.acp_server,createdAt:n.created_at,tags:n.tags}),children:(0,X.jsx)(ln,{to:s(`/conversations/${n.id}`),onClick:e,className:B(`block rounded-md transition-colors`,Me!==n.id&&`hover:bg-[var(--oh-surface)]`,(n.id===r||Me===n.id)&&`bg-[var(--oh-surface)]`),children:(0,X.jsx)(Xi,{onDelete:()=>At(n.id,n.title??``),onArchive:l?void 0:()=>jt(n.id,n.title??``),onUnarchive:l?()=>Mt(n.id):void 0,onStop:()=>Nt(n.id),onChangeTitle:e=>Pt(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:Me===n.id,onContextMenuToggle:e=>Ne(e?n.id:null),isActive:n.id===r,workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,showRepositoryMetadata:E,llmModel:n.llm_model,showLlmProfiles:O,agentKind:n.agent_kind,acpServer:n.acp_server,tags:n.tags,showTags:A,isArchived:l,isPinned:c,onTogglePin:()=>ye(o.id,n.id),alwaysShowPinIcon:c&&!a?.inPinnedSection})})},n.id)},[o.id,we,t,r,jt,Pt,At,Nt,Mt,e,Me,ve,E,O,A,M,ye]),Bt=Pe||!Fe,Vt=!t&&!Bt&&Ke.length>0,Ht=Fe&&!Pe&&!t&&lt&&!Vt&&!Be?.length;return(0,X.jsxs)(`div`,{ref:c,"data-testid":`conversation-panel`,className:`flex h-full min-h-0 w-full flex-col`,children:[!t&&(0,X.jsx)(`div`,{className:B(`-ml-2.5 w-[calc(100%+0.625rem)] max-w-none box-border border-b`,le?`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(H.SIDEBAR$CONVERSATIONS)}),(0,X.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,X.jsx)(za,{backendKind:o.kind}),(0,X.jsx)(Ma,{filterMenuOpen:se,setFilterMenuOpen:ce,menuRef:de,backendKind:o.kind,organizeMode:I,setOrganizeMode:ee,conversationSort:L,setConversationSort:te,threadScope:R,setThreadScope:z,automationFilterMode:V,setAutomationFilterMode:re,selectedAutomationNames:ie,onToggleAutomationName:ae,automationNameFacets:We,showOlderConversations:b,showArchivedConversations:S,toggleShowArchivedConversations:C,toggleShowOlderConversations:T,showRepoBranchMetadata:E,toggleShowRepoBranchMetadata:D,showLlmProfiles:O,toggleShowLlmProfiles:k,showTagsMetadata:A,toggleShowTagsMetadata:j,showHoverMetadata:M,toggleShowHoverMetadata:P,totalConversationsCount:Ve.length,onRequestDeleteAll:()=>y(!0)})]})]})}),(0,X.jsxs)(`div`,{ref:Oe,"data-testid":`conversation-panel-list-scroll`,onScroll:e=>{ue(e.currentTarget.scrollTop>0)},className:B(`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:[Bt&&(0,X.jsx)(oa,{compact:t}),!t&&Ht&&(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(ut?H.CONVERSATION_PANEL$NO_AUTOMATION_MATCHES:H.CONVERSATION$NO_CONVERSATIONS)})}),Vt?(0,X.jsx)(Ha,{pinnedConversations:Ke,isPreviewExpanded:ge,onTogglePreviewExpanded:()=>_e(e=>!e),activeConversationId:r,showDivider:!t&&I===`chronological`,renderConversationCard:e=>zt(e,{inPinnedSection:!0})}):null,!t&&Be?.map(t=>(0,X.jsx)(ln,{to:s(`/conversations/task-${t.id}`),onClick:e,className:`block`,children:(0,X.jsx)(aa,{task:t})},t.id)),!Bt&&t?at.map(e=>zt(e)):null,!Bt&&!t&&I===`grouped`&&rt&&rt.length>0?(0,X.jsx)(Va,{groups:rt,groupIds:it,groupFolderOrder:U,setGroupFolderOrder:oe,collapsedGroupIds:fe,expandedGroupPreviewIds:me,discoveryConversationIds:nt,onToggleGroupCollapsed:Ee,onToggleGroupPreviewExpanded:De,isCreatingConversationFlow:Ot,activeConversationId:r,onLaunchFromGroup:kt,renderConversationCard:e=>zt(e)}):null,!Bt&&!t&&I===`chronological`?(0,X.jsx)(`div`,{className:`space-y-0.5`,children:Ze.map(e=>zt(e))}):null,Et&&(bt?(0,X.jsx)(`div`,{className:`py-1`,children:(0,X.jsx)(oa,{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:yt,className:`text-xs text-[var(--oh-muted)] hover:text-white`,children:n(H.CONVERSATION$LOAD_MORE)})}))]}),l&&(0,X.jsx)(tr,{onConfirm:()=>{Ft(),u(!1),je(null)},onCancel:()=>{u(!1),je(null)},conversationTitle:Ae??void 0}),d&&(0,X.jsx)(si,{onConfirm:()=>{It(),f(!1),je(null)},onCancel:()=>{f(!1),je(null)},conversationTitle:Ae??void 0}),_&&(0,X.jsx)(tr,{title:n(H.CONVERSATION$CONFIRM_DELETE_ALL_TITLE),description:n(H.CONVERSATION$CONFIRM_DELETE_ALL_DESC,{count:Ve.length}),onConfirm:async()=>{await Rt(),y(!1)},onCancel:()=>y(!1)}),p&&(0,X.jsx)(cr,{onConfirm:()=>{Lt(),m(!1)},onCancel:()=>m(!1)}),h&&(0,X.jsx)(ci,{onConfirm:()=>{e?.()},onClose:()=>g(!1),onCancel:()=>g(!1)})]})}function to({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)(eo,{})})})}var no=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,ro=34,io=Math.round(ro*30/46);function ao({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:_}=v(`openhands`),y=m;return(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,X.jsxs)(`div`,{className:mn(e),children:[(0,X.jsxs)(`div`,{className:B(e&&t?hn:`flex min-w-0 shrink-0 items-center`),children:[(0,X.jsx)(`div`,{className:B(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)(Nr,{logoWidth:ro,logoHeight:io,logoClassName:`max-w-none`,className:B(un,`overflow-visible`)})}),e&&t?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-collapse-toggle`,"aria-pressed":e,"aria-label":i,onClick:o,className:B(gn,s?`opacity-100 pointer-events-auto`:`opacity-0 pointer-events-none`),children:(0,X.jsx)(Ie,{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:B(`hidden md:inline-flex ml-auto`,pn,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(G,{width:14,height:14})}):null,!e&&n?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-drawer-close`,onClick:r,"aria-label":_(H.SIDEBAR$CLOSE_MENU),className:B(`inline-flex ml-auto`,pn,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(G,{width:14,height:14})}):null]}),(0,X.jsxs)(`nav`,{className:dn(e),children:[(0,X.jsx)(Qr,{collapsed:e}),(0,X.jsx)(yn,{to:`/conversations`,end:!0,label:_(H.SIDEBAR$NEW_CHAT),testId:`sidebar-conversations-link`,collapsed:e,icon:(0,X.jsx)(Pt,{width:$,height:$})}),(0,X.jsx)(yn,{to:`/customize`,label:_(H.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)(yn,{to:Wt(),label:qt().sidebarLabel??_(H.SIDEBAR$AUTOMATIONS),testId:`sidebar-automations-link`,collapsed:e,icon:(0,X.jsx)(no,{width:$,height:$})})]}),(0,X.jsx)(to,{collapsed:e}),e&&t?(0,X.jsxs)(`nav`,{className:B(dn(e),`mt-auto pb-2 cursor-pointer`),children:[(0,X.jsx)(xn,{content:_(H.SIDEBAR$SETTINGS),placement:`right`,children:(0,X.jsxs)(ln,{to:`/settings`,"data-testid":`collapsed-settings-link`,"aria-label":_(H.SIDEBAR$SETTINGS),className:fn({collapsed:!0}),children:[(0,X.jsx)(vn,{active:l.startsWith(`/settings`),children:(0,X.jsx)(kt,{width:$,height:$})}),(0,X.jsx)(`span`,{className:_n(!0),children:_(H.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":_(H.BACKEND$MANAGE),"aria-expanded":d,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>e.stopPropagation(),className:B(fn({collapsed:!0}),`relative`),children:[(0,X.jsx)(vn,{active:d,children:(0,X.jsxs)(`span`,{className:`relative inline-flex size-[18px] shrink-0 items-center justify-center`,children:[(0,X.jsx)(jt,{isConnected:u?.isConnected??null,className:`absolute -left-0.5 -top-0.5 z-[1] pointer-events-none`}),(0,X.jsx)(fe,{width:$,height:$})]})}),(0,X.jsx)(`span`,{className:_n(!0),children:_(H.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)(Yr,{sidebarCollapsed:e,hideTrigger:!0,defaultOpen:!0,openUpward:!0,onSelectOption:()=>f(!1),onOpenAddBackend:h,onOpenManageBackends:g})}):null]})]}):null,e?null:(0,X.jsxs)(`div`,{className:B(`flex flex-col items-stretch max-w-none box-border shrink-0 gap-2`,`-ml-2.5 w-[calc(100%+0.625rem)] border-t border-[var(--oh-border)] pt-2 px-2.5`),children:[(0,X.jsx)(ii,{hideWhenUpToDate:!0}),(0,X.jsx)(Yr,{sidebarCollapsed:e,openUpward:!0})]})]})}var oo=Y.lazy(()=>a(()=>import(`./settings-modal-nEEK1Kh1.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,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62]))),so=Y.lazy(()=>a(()=>Promise.resolve().then(()=>Vr).then(e=>({default:e.AddBackendModal})),void 0)),co=Y.lazy(()=>a(()=>import(`./manage-backends-modal-BTqNPhzc.js`).then(e=>e.n).then(e=>({default:e.ManageBackendsModal})),__vite__mapDeps([63,1,2,3,4,5,6,7,8,11,64,65,66,18,47,48,49,19,67,68,27,69,26,35,15,30,34,32,70,14,33,71,72,73,74,75,76]))),lo=250;function uo(){let{t:e}=v(`openhands`),{currentPath:t}=on(),{data:n}=Ut(),{data:r,error:i,isError:a,isFetching:o}=Jt(),{backends:s,active:c}=I(),l=Vt(s)[c.backend.id],u=At(e=>e.collapsed),d=At(e=>e.setCollapsed),[f,p]=Y.useState(!1),[m,h]=Y.useState(!1),g=Y.useRef(null),[_,y]=Y.useState(!1),[b,x]=Y.useState(!1),[S,C]=Y.useState(!1),w=Y.useRef(!1),[,T]=Y.useReducer(e=>e+1,0),{isOpen:E,close:D}=ir(),[O,k]=Y.useState(!1),[A,j]=Y.useState(!1),M=lr(()=>h(!1)),P=Yt(i);Y.useEffect(()=>{D()},[t,D]),Y.useEffect(()=>{if(E){k(!0);let e=requestAnimationFrame(()=>{j(!0)});return()=>cancelAnimationFrame(e)}j(!1);let e=window.setTimeout(()=>{k(!1)},lo);return()=>window.clearTimeout(e)},[E]),Y.useEffect(()=>{if(!E)return;let e=e=>{e.key===`Escape`&&D()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[E,D]),Y.useEffect(()=>{t===`/settings`?p(!1):!o&&a&&P!==404?N(e(H.SETTINGS$FETCH_ERROR)):P===404&&!n?.feature_flags?.hide_llm_settings&&p(!0)},[t,o,a,P,n?.feature_flags?.hide_llm_settings,e]);let F=e(u?H.SIDEBAR$EXPAND:H.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]),L={collapseToggleLabel:F,onCollapse:Y.useCallback(()=>{C(!1),w.current=!0,T(),d(!0),window.setTimeout(()=>{w.current=!1,T()},250)},[d]),onExpand:()=>d(!1),showCollapsedExpandButton:u&&S&&!w.current,isExtensionsActive:t===`/customize`||t.startsWith(`/skills`)||t===`/plugins`||t===`/mcp`,currentPath:t,activeBackendHealth:l,collapsedBackendPopoverOpen:m,setCollapsedBackendPopoverOpen:h,collapsedBackendPopoverRef:M,collapsedBackendCloseTimer:g,onOpenAddBackend:()=>y(!0),onOpenManageBackends:()=>x(!0)};return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`aside`,{"aria-label":e(H.SIDEBAR$NAVIGATION_LABEL),"data-collapsed":u?`true`:`false`,onClick:ee,onMouseEnter:()=>{u&&C(!0)},onMouseLeave:()=>{C(!1)},className:B(`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)(ao,{collapsed:u,showCollapseToggle:!0,...L})}),O?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{className:B(`fixed inset-0 z-40 bg-black/50 md:hidden`,`transition-opacity ease-in-out motion-reduce:transition-none`,A?`opacity-100`:`pointer-events-none opacity-0`),style:{transitionDuration:`${lo}ms`},onClick:D,"aria-hidden":!A}),(0,X.jsx)(`aside`,{"aria-label":e(H.SIDEBAR$NAVIGATION_LABEL),"data-testid":`sidebar-mobile-drawer`,"aria-hidden":!A,className:B(`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`,A?`translate-x-0`:`-translate-x-full`),style:{transitionDuration:`${lo}ms`},children:(0,X.jsx)(ao,{collapsed:!1,showCollapseToggle:!1,showMobileCloseButton:!0,onCloseMobile:D,...L})})]}):null,f&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(oo,{settings:r,onClose:()=>p(!1)})}),_&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(so,{onClose:()=>y(!1)})}),b&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(co,{onClose:()=>x(!1)})})]})}var fo=`/settings`,po=`/customize`,mo=[`/skills`,`/mcp`,`/plugins`];function ho(e){return e===fo?{mode:`menu`}:e.startsWith(`${fo}/`)&&e.length>9?{mode:`back`,backTo:fo,backLabelKey:H.SETTINGS$TITLE}:e===po?{mode:`menu`}:mo.some(t=>e===t||e.startsWith(`${t}/`))?{mode:`back`,backTo:po,backLabelKey:H.NAV$CUSTOMIZE}:{mode:`menu`}}function go(){let{t:e}=v(`openhands`),{currentPath:t,navigate:n}=on(),r=ho(t);return(0,X.jsxs)(`header`,{className:`flex md:hidden h-12 shrink-0 items-center gap-2 px-2.5`,"aria-label":e(H.SIDEBAR$NAVIGATION_LABEL),children:[(0,X.jsx)(sr,{}),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??H.COMMON$BACK),className:ar,children:(0,X.jsx)(G,{size:20,className:nr,"aria-hidden":!0,strokeWidth:2})}):null]})}function _o(){let{backend:e}=F(),t=e.kind===`local`,{data:n}=ur(),{mutate:r,isPending:i}=Lt(),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 vo=()=>{let{backend:e}=F(),{data:t}=Jt(),{mutate:n,isPending:r}=Xt(`personal`,{retry:2}),i=Y.useSyncExternalStore(te,P,()=>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`&&M(i);return}if(e.kind!==`cloud`)return;let o=`${e.id}:${i}`;if(r||a.current===o)return;a.current=o,n({user_consents_to_analytics:i===`granted`});return}t.user_consents_to_analytics!==null&&O(t.user_consents_to_analytics===!0?`granted`:`denied`,{syncToCloud:!1})}},[e.id,e.kind,r,i,n,t])};function yo(){let{backend:e}=F(),t=Y.useSyncExternalStore(te,k,()=>`pending`),n=Y.useRef(null);Y.useEffect(()=>{let r=t===`pending`?ee():null;if(e.kind!==`local`||t===`pending`&&!r)return;let i=t===`granted`?`granted`:`denied`,a=t===`pending`?r:``,o=`${e.id}:${e.host}:${e.apiKey??``}:${i}:${a}`;n.current!==o&&(n.current=o,Gt.syncTelemetryConsent(i).catch(()=>{}))},[e.apiKey,e.host,e.id,e.kind,t])}var bo=`agent_canvas_cloud_cookie_backend_added`,xo=new Set;function So(e,t){return`${bo}:${e}:${t}`}function Co(e,t){let n=So(e,t);if(typeof window>`u`)return!0;try{return window.sessionStorage.getItem(n)===`true`||xo.has(n)}catch{return xo.has(n)}}function wo(e,t){let n=So(e,t);if(!(typeof window>`u`))try{window.sessionStorage.setItem(n,`true`)}catch{xo.add(n)}}var To=()=>{let{backend:e,orgId:t}=F(),{data:n}=Jt(),{trackBackendAdded:r}=Kt(),i=Y.useRef(r),a=Pn(),o=e.kind===`cloud`?a[e.id]:void 0,s=o?.isLoading??!0,c=o?.userId??null,l=(n?.email||n?.git_user_email)?.trim()||void 0;Y.useEffect(()=>{i.current=r},[r]),Y.useEffect(()=>{if(e.kind!==`cloud`){j(null);return}if(!s){if(!c){j(null),L(null);return}j({userId:c,email:l,orgId:t}),L(c,l?{email:l}:{}),e.authMode===`cookie`&&l&&!Co(e.id,c)&&(i.current({backendKind:`cloud`,connectionMethod:`cloud_cookie`,hasApiKey:!1,source:`cloud_auto_connect`}),wo(e.id,c))}},[e.authMode,e.connectionRevision,e.id,e.kind,l,s,t,c])};function Eo(e){switch(e){case R.RUNNING:return`🟢`;case R.FINISHED:case R.IDLE:case R.WAITING_FOR_CONFIRMATION:return`✅`;case R.PAUSED:return`⚪`;case R.ERROR:case R.STUCK:return`🔴`;default:return null}}var Do=`OpenHands`,Oo=()=>{let{conversationId:e}=s(),{data:t}=Ar(e??null),n=Qn(e=>e.execution_status),r=t?.title,i=e&&r?`${r} | ${Do}`:Do;if(!e)return i;let a=Eo(n??t?.execution_status??null);return a?`${a} ${i}`:i};function ko({children:e}){let{pathname:t}=c(),n=f(),r=_(),i=u(),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)(sn,{value:Y.useMemo(()=>({currentPath:t,conversationId:a,isNavigating:!!r.location,navigate:(e,t)=>n(e,t)}),[t,a,r.location,n]),children:e})}var Ao=Y.lazy(()=>a(()=>import(`./environment-switch-overlay-DeztVYuL.js`),__vite__mapDeps([77,1,2,8,5,6,78,7]))),jo=Y.lazy(()=>a(()=>import(`./alert-banner-BgDHhL7b.js`).then(e=>({default:e.AlertBanner})),__vite__mapDeps([79,1,2,8,5,6,80,81,4,82,7,14,83,45,39]))),Mo=Y.lazy(()=>a(()=>import(`./command-menu-DwUQzjYP.js`).then(e=>({default:e.CommandMenu})),__vite__mapDeps([84,1,2,4,5,8,6,85,86,87,88,89,90,91,92,93,94,47,3,7,48,49,19,14]))),No=h(function(){let e=m(),{t}=v(`openhands`);return d(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(H.ERROR$GENERIC)}),(0,X.jsx)(`pre`,{children:e.message})]}):(0,X.jsx)(`div`,{children:(0,X.jsx)(`h1`,{children:t(H.ERROR$UNKNOWN)})})}),Po=p(function(){let e=c(),t=Oo(),{data:n}=Jt(),r=Ut();if(yo(),vo(),To(),_o(),Y.useEffect(()=>{n?.language&&D.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)(Ht,{size:`large`})});let i=/^\/conversations\/[^/]+/.test(e.pathname),a=mt(e.search);return(0,X.jsx)(ko,{children:(0,X.jsxs)($n,{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)(uo,{}),(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)(go,{}),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)(jo,{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)(g,{})})]})]}),(0,X.jsxs)(Y.Suspense,{fallback:null,children:[(0,X.jsx)(Ao,{}),(0,X.jsx)(Mo,{})]}),a?(0,X.jsx)(yt,{}):null]})})});export{No as ErrorBoundary,Po as default};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{t as i}from"./useQuery-BCnzy4LX.js";import{dt as a,n as o}from"./active-backend-context-B_bg5h9O.js";import{t as s}from"./utils-DPQfkd-7.js";import{t as c}from"./settings-service.api-DfPYaxZJ.js";import{h as l,l as u}from"./form-control-classes-DLN3Qgub.js";import{t as d}from"./dist-Bl64nBZL.js";import{n as f,t as p}from"./settings-input-D61Vzp9e.js";import{a as m,i as h,n as ee}from"./llm-subscription-DTqtBCWz.js";import{t as te}from"./use-is-authed-Bka89Xmm.js";import{t as ne}from"./settings-dropdown-input-TWIeiG02.js";import{r as g}from"./typography-D9tiHct7.js";import{t as _}from"./settings-switch-Drt-rF5s.js";var v=e(t(),1),y=n(),b=d(``,{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 x({testId:e,text:t,linkText:n,href:r,suffix:i,size:a,linkColor:o,className:c,linkTextClassName:l,suffixClassName:u}){return(0,y.jsxs)(`p`,{"data-testid":e,className:s(b({size:a}),c),children:[t,` `,(0,y.jsx)(`a`,{href:r,rel:`noreferrer noopener`,target:`_blank`,className:s(`underline underline-offset-2`,b({size:a,linkColor:o}),l),children:n}),i&&(0,y.jsx)(`span`,{className:u,children:i})]})}var S=`llm`;function C(e){if(!e?.sections)return e;let t=!1,n=e.sections.map(e=>{if(e.key!==S)return e;let n=new Set(e.fields.map(e=>e.key)),r=h.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 w=(e,t)=>{let{data:n}=te(),{backend:r,orgId:s}=o(),l=!a(r),{data:u,error:d,isLoading:f,isFetching:p}=i({queryKey:[`settings-schema`,e,r.id,s,r.kind,r.host,r.apiKey],queryFn:e===`conversation`?c.getConversationSettingsSchema:c.getSettingsSchema,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,enabled:!t&&!!n&&l,meta:{disableToast:!0}}),m=(0,v.useMemo)(()=>e===`agent`?C(t):t,[t,e]),h=(0,v.useMemo)(()=>e===`agent`?C(u):u,[u,e]);return t?{data:m,error:null,isLoading:!1,isFetching:!1}:{data:h,error:d,isLoading:f,isFetching:p}},T=e=>w(`agent`,e),re=e=>w(`conversation`,e);function E(e,t){return`SCHEMA$${e.replace(/\./g,`$`).toUpperCase()}$${t}`}var D=e=>!!e?.includes(`$`),O={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 k(e){return O[e]?.constraints}function A(e,t,n,r){if(D(r))return e(r);let i=E(t,n);return e(i,{defaultValue:``})||(r&&console.warn(`[i18n] Missing translation for key "${i}", falling back to: "${r}"`),r??null)}function j(e,t,n){return A(e,t,`LABEL`,n)??``}function M(e,t,n){return A(e,t,`DESCRIPTION`,n)}function ie(e,t,n,r){if(D(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 ae=new Set([`llm.model`,`llm.api_key`,`llm.base_url`,ee,m]),oe={basic:new Set([`critical`]),advanced:new Set([`critical`,`major`]),all:new Set([`critical`,`major`,`minor`])};function N(e){return!!e&&Array.isArray(e.sections)}function P(e){return N(e)?e.sections.flatMap(e=>e.fields):[]}function F(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 I(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 L(e,t,n=`agent_settings`){return F(e[n],t)??null}function R(e,t){return L(e,t,`agent_settings`)}function z(e){return e.choices.length>0}function B(e){return e.prominence===`critical`}function V(e){return e.prominence===`minor`}function H(e,t){let n=t??e.default;return z(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 U(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 W(e,t,n=`agent_settings`){let r=t??(n===`conversation_settings`?e.conversation_settings_schema:e.agent_settings_schema);return r?Object.fromEntries(P(r).map(t=>[t.key,H(t,L(e,t.key,n))])):{}}function G(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 P(r))B(t)||U(t,L(e,t.key,n)??t.default??null)!==U(t,t.default??null)&&(V(t)?i=!0:a=!0);return i?`all`:a?`advanced`:`basic`}function K(e,t){return e.depends_on.every(e=>t[e]===!0)}function q(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 J(e,t){if(e.value_type===`boolean`)return q(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=k(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 Y(e,t,n){let r={};for(let i of P(e))n[i.key]&&I(r,i.key,J(i,t[i.key]));return r}function X(e,t){return oe[t].has(e.prominence)}function se(e,t,n,r){let i=Y(e,t,n);for(let t of P(e))X(t,r)||I(i,t.key,t.default??null);return i}function Z(e,t,n,r=ae){return N(e)?e.sections.map(e=>({...e,fields:e.fields.filter(e=>!r.has(e.key)&&X(e,n)&&K(e,t))})).filter(e=>e.fields.length>0):[]}function ce(e){return e?P(e).some(e=>e.prominence===`critical`):!1}function le(e){return e?P(e).some(e=>e.prominence===`major`):!1}function ue(e){return e?P(e).some(e=>e.prominence===`minor`):!1}var de={"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 Q({field:e}){let{t}=r(`openhands`),n=de[e.key],i=M(t,e.key,e.description);return(0,y.jsxs)(y.Fragment,{children:[i&&!n?.hideDescription?(0,y.jsx)(g.Paragraph,{className:`text-tertiary-alt text-xs leading-5`,children:i}):null,n?(0,y.jsx)(x,{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 fe=new Set([`verification.critic_api_key`]);function $(e){return e.choices.length>0}function pe(e){return e.value_type===`boolean`&&!$(e)}function me(e){return e.value_type===`array`||e.value_type===`object`}function he(e){return e.key.endsWith(`url`)||e.key.endsWith(`_url`)}function ge(e){return e.secret?`password`:e.value_type===`integer`||e.value_type===`number`?`number`:e.value_type===`string`&&he(e)?`url`:`text`}function _e({field:e,value:t,isDisabled:n,onChange:i}){let{t:a}=r(`openhands`),o=j(a,e.key,e.label),c=k(e.key);return pe(e)?(0,y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,y.jsx)(_,{testId:`sdk-settings-${e.key}`,isToggled:!!t,isDisabled:n,onToggle:i,children:o}),(0,y.jsx)(`div`,{className:l,children:(0,y.jsx)(Q,{field:e})})]}):$(e)?(0,y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,y.jsx)(ne,{testId:`sdk-settings-${e.key}`,name:e.key,label:o,items:e.choices.map(t=>({key:String(t.value),label:ie(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=>i(String(e??``))}),(0,y.jsx)(Q,{field:e})]}):me(e)?(0,y.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`text-sm`,children:o}),e.required?null:(0,y.jsx)(f,{})]}),(0,y.jsx)(`textarea`,{"data-testid":`sdk-settings-${e.key}`,name:e.key,value:String(t??``),required:e.required,disabled:n,onChange:e=>i(e.target.value),className:s(u,`min-h-32 font-mono placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)}),(0,y.jsx)(Q,{field:e})]}):(0,y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,y.jsx)(p,{testId:`sdk-settings-${e.key}`,name:e.key,label:o,type:ge(e),value:String(t??``),required:e.required,showOptionalTag:!e.required,isDisabled:n,onChange:i,className:`w-full`,min:c?.min,max:c?.max,step:c?.step}),(0,y.jsx)(Q,{field:e})]})}export{T as _,se as a,Z as c,ue as d,G as f,j as g,M as h,Y as i,le as l,H as m,_e as n,J as o,N as p,W as r,R as s,fe as t,ce as u,re as v,x as y};
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as i}from"./useQuery-Bs5NFz2s.js";import{dt as a,n as o}from"./active-backend-context-BZDG15C0.js";import{t as s}from"./utils-DUD5ScdA.js";import{t as c}from"./settings-service.api-3yAUFcaP.js";import{h as l,l as u}from"./form-control-classes-CGXBLcn1.js";import{t as d}from"./dist-Bl64nBZL.js";import{n as f,t as p}from"./settings-input-CWUEHHvS.js";import{a as m,i as h,n as ee}from"./llm-subscription-DTqtBCWz.js";import{t as te}from"./use-is-authed-2UrDIziV.js";import{t as ne}from"./settings-dropdown-input-Ba1UN5Du.js";import{r as g}from"./typography-DB5HoCk0.js";import{t as _}from"./settings-switch-Dk9hChx1.js";var v=e(t(),1),y=n(),b=d(``,{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 x({testId:e,text:t,linkText:n,href:r,suffix:i,size:a,linkColor:o,className:c,linkTextClassName:l,suffixClassName:u}){return(0,y.jsxs)(`p`,{"data-testid":e,className:s(b({size:a}),c),children:[t,` `,(0,y.jsx)(`a`,{href:r,rel:`noreferrer noopener`,target:`_blank`,className:s(`underline underline-offset-2`,b({size:a,linkColor:o}),l),children:n}),i&&(0,y.jsx)(`span`,{className:u,children:i})]})}var S=`llm`;function C(e){if(!e?.sections)return e;let t=!1,n=e.sections.map(e=>{if(e.key!==S)return e;let n=new Set(e.fields.map(e=>e.key)),r=h.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 w=(e,t)=>{let{data:n}=te(),{backend:r,orgId:s}=o(),l=!a(r),{data:u,error:d,isLoading:f,isFetching:p}=i({queryKey:[`settings-schema`,e,r.id,s,r.kind,r.host,r.apiKey],queryFn:e===`conversation`?c.getConversationSettingsSchema:c.getSettingsSchema,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,enabled:!t&&!!n&&l,meta:{disableToast:!0}}),m=(0,v.useMemo)(()=>e===`agent`?C(t):t,[t,e]),h=(0,v.useMemo)(()=>e===`agent`?C(u):u,[u,e]);return t?{data:m,error:null,isLoading:!1,isFetching:!1}:{data:h,error:d,isLoading:f,isFetching:p}},T=e=>w(`agent`,e),re=e=>w(`conversation`,e);function E(e,t){return`SCHEMA$${e.replace(/\./g,`$`).toUpperCase()}$${t}`}var D=e=>!!e?.includes(`$`),O={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 k(e){return O[e]?.constraints}function A(e,t,n,r){if(D(r))return e(r);let i=E(t,n);return e(i,{defaultValue:``})||(r&&console.warn(`[i18n] Missing translation for key "${i}", falling back to: "${r}"`),r??null)}function j(e,t,n){return A(e,t,`LABEL`,n)??``}function M(e,t,n){return A(e,t,`DESCRIPTION`,n)}function ie(e,t,n,r){if(D(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 ae=new Set([`llm.model`,`llm.api_key`,`llm.base_url`,ee,m]),oe={basic:new Set([`critical`]),advanced:new Set([`critical`,`major`]),all:new Set([`critical`,`major`,`minor`])};function N(e){return!!e&&Array.isArray(e.sections)}function P(e){return N(e)?e.sections.flatMap(e=>e.fields):[]}function F(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 I(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 L(e,t,n=`agent_settings`){return F(e[n],t)??null}function R(e,t){return L(e,t,`agent_settings`)}function z(e){return e.choices.length>0}function B(e){return e.prominence===`critical`}function V(e){return e.prominence===`minor`}function H(e,t){let n=t??e.default;return z(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 U(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 W(e,t,n=`agent_settings`){let r=t??(n===`conversation_settings`?e.conversation_settings_schema:e.agent_settings_schema);return r?Object.fromEntries(P(r).map(t=>[t.key,H(t,L(e,t.key,n))])):{}}function G(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 P(r))B(t)||U(t,L(e,t.key,n)??t.default??null)!==U(t,t.default??null)&&(V(t)?i=!0:a=!0);return i?`all`:a?`advanced`:`basic`}function K(e,t){return e.depends_on.every(e=>t[e]===!0)}function q(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 J(e,t){if(e.value_type===`boolean`)return q(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=k(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 Y(e,t,n){let r={};for(let i of P(e))n[i.key]&&I(r,i.key,J(i,t[i.key]));return r}function X(e,t){return oe[t].has(e.prominence)}function se(e,t,n,r){let i=Y(e,t,n);for(let t of P(e))X(t,r)||I(i,t.key,t.default??null);return i}function Z(e,t,n,r=ae){return N(e)?e.sections.map(e=>({...e,fields:e.fields.filter(e=>!r.has(e.key)&&X(e,n)&&K(e,t))})).filter(e=>e.fields.length>0):[]}function ce(e){return e?P(e).some(e=>e.prominence===`critical`):!1}function le(e){return e?P(e).some(e=>e.prominence===`major`):!1}function ue(e){return e?P(e).some(e=>e.prominence===`minor`):!1}var de={"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 Q({field:e}){let{t}=r(`openhands`),n=de[e.key],i=M(t,e.key,e.description);return(0,y.jsxs)(y.Fragment,{children:[i&&!n?.hideDescription?(0,y.jsx)(g.Paragraph,{className:`text-tertiary-alt text-xs leading-5`,children:i}):null,n?(0,y.jsx)(x,{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 fe=new Set([`verification.critic_api_key`]);function $(e){return e.choices.length>0}function pe(e){return e.value_type===`boolean`&&!$(e)}function me(e){return e.value_type===`array`||e.value_type===`object`}function he(e){return e.key.endsWith(`url`)||e.key.endsWith(`_url`)}function ge(e){return e.secret?`password`:e.value_type===`integer`||e.value_type===`number`?`number`:e.value_type===`string`&&he(e)?`url`:`text`}function _e({field:e,value:t,isDisabled:n,onChange:i}){let{t:a}=r(`openhands`),o=j(a,e.key,e.label),c=k(e.key);return pe(e)?(0,y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,y.jsx)(_,{testId:`sdk-settings-${e.key}`,isToggled:!!t,isDisabled:n,onToggle:i,children:o}),(0,y.jsx)(`div`,{className:l,children:(0,y.jsx)(Q,{field:e})})]}):$(e)?(0,y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,y.jsx)(ne,{testId:`sdk-settings-${e.key}`,name:e.key,label:o,items:e.choices.map(t=>({key:String(t.value),label:ie(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=>i(String(e??``))}),(0,y.jsx)(Q,{field:e})]}):me(e)?(0,y.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`text-sm`,children:o}),e.required?null:(0,y.jsx)(f,{})]}),(0,y.jsx)(`textarea`,{"data-testid":`sdk-settings-${e.key}`,name:e.key,value:String(t??``),required:e.required,disabled:n,onChange:e=>i(e.target.value),className:s(u,`min-h-32 font-mono placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)}),(0,y.jsx)(Q,{field:e})]}):(0,y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,y.jsx)(p,{testId:`sdk-settings-${e.key}`,name:e.key,label:o,type:ge(e),value:String(t??``),required:e.required,showOptionalTag:!e.required,isDisabled:n,onChange:i,className:`w-full`,min:c?.min,max:c?.max,step:c?.step}),(0,y.jsx)(Q,{field:e})]})}export{T as _,se as a,Z as c,ue as d,G as f,j as g,M as h,Y as i,le as l,H as m,_e as n,J as o,N as p,W as r,R as s,fe as t,ce as u,re as v,x as y};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{k as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";import{At as a,Pt as o,jt as s}from"./active-backend-context-B_bg5h9O.js";import{t as c,z as l}from"./utils-DPQfkd-7.js";import{n as ee}from"./use-settings-BmLzQjnC.js";import{t as te}from"./use-save-settings-DIEurJ3D.js";import{_ as u}from"./form-control-classes-DLN3Qgub.js";import{t as ne}from"./brand-button-CJcwjnfb.js";import{_ as re,a as ie,c as ae,d as oe,f as se,i as d,l as f,n as ce,p as le,r as ue,t as de,u as fe,v as p}from"./schema-field-Z-rMg9ti.js";import{n as m,t as h}from"./switch-skeleton-DwOoCqaL.js";import{o as pe}from"./extension-module-card-classes-Bo43vY5V.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`,u,`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 me({view:e,setView:t,showBasic:n=!0,showAdvanced:i,showAll:a,isDisabled:o=!1}){let{t:s}=r(`openhands`);return[n,i,a].filter(Boolean).length<=1?null:(0,_.jsxs)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:`mb-6 flex items-center gap-2`,children:[n?(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(l.SETTINGS$BASIC)}):null,i?(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(l.SETTINGS$ADVANCED)}):null,a?(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(l.SETTINGS$ALL)}):null]})}var he=new Set,x={basic:0,advanced:1,all:2},ge=(e,t)=>x[t]<x[e]?t:e,_e=(e,t)=>x[t]>x[e]?t:e,ve=(e,{showBasic:t,showAdvanced:n,showAll:r})=>{if(e===`all`)return r?`all`:n?`advanced`:`basic`;if(e===`advanced`)return n?`advanced`:r?`all`:`basic`;if(!t){if(n)return`advanced`;if(r)return`all`}return`basic`},ye={agent_settings:`agent_settings_diff`,conversation_settings:`conversation_settings_diff`},be=(e,t)=>e instanceof i?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:i=!1,buildPayload:c,onSaveSuccess:u,getInitialView:m,forceShowAdvancedView:h=!1,allowAllView:v=!0,initialValueOverrides:b,embedded:x=!1,hideSaveButton:S=!1,suppressSuccessToast:xe=!1,onSaveControlChange:C,testId:Se=`sdk-section-settings-screen`}){let{t:w}=r(`openhands`),{mutate:Ce,isPending:T}=te(t),{data:E,isLoading:we,isFetching:Te}=ee(t),D=re(E?.agent_settings_schema),O=p(E?.conversation_settings_schema),k=g.useMemo(()=>JSON.stringify(e.map(e=>({source:e.settingsSource,sectionKeys:e.sectionKeys,excludeKeys:e.excludeKeys?Array.from(e.excludeKeys).sort():null}))),[e]),A=g.useMemo(()=>JSON.parse(k).map(e=>({settingsSource:e.source,sectionKeys:e.sectionKeys,excludeKeys:e.excludeKeys?new Set(e.excludeKeys):void 0})),[k]),j=g.useCallback(e=>e===`conversation_settings`?O.data:D.data,[D.data,O.data]),Ee=A.some(e=>e.settingsSource===`conversation_settings`?O.isLoading:D.isLoading),M=g.useMemo(()=>A.map(e=>{let t=j(e.settingsSource);if(!le(t))return{...e,filteredSchema:null};let n=new Set(e.sectionKeys),r=new Set,i={...t,sections:t.sections.filter(e=>!n.has(e.key)||r.has(e.key)?!1:(r.add(e.key),!0))};return{...e,filteredSchema:i}}),[A,j]),N=M.some(e=>fe(e.filteredSchema)),P=h||M.some(e=>f(e.filteredSchema)),F=v&&M.some(e=>oe(e.filteredSchema)),De=g.useMemo(()=>be(A.reduce((e,t)=>e??(t.settingsSource===`conversation_settings`?O.error:D.error),null),w(l.SETTINGS$SDK_SCHEMA_UNAVAILABLE)),[A,D.error,O.error,w]),Oe=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 M){if(!t.filteredSchema)return null;e[t.settingsSource]={...e[t.settingsSource]??{},...ue(E,t.filteredSchema,t.settingsSource)}}if(b){let t=M[0]?.settingsSource;t&&e[t]&&(e[t]={...e[t],...b})}return e},[E,M,Oe]),W=g.useMemo(()=>{if(!E)return null;let e=null;for(let t of M){if(!t.filteredSchema)return null;let n=m?m(E,t.filteredSchema):se(E,t.filteredSchema,t.settingsSource);e=e?_e(e,n):n}return e?ve(e,{showBasic:N,showAdvanced:P,showAll:F}):null},[E,M,m,N,P,F]);g.useEffect(()=>{H.current=!1,L(`basic`),z({}),V({})},[t,k]),g.useEffect(()=>{if(!(!U||!W)){if(z(U),b){let e=M[0]?.settingsSource;if(e){let t=Object.fromEntries(Object.keys(b).map(e=>[e,!0]));V({[e]:t})}else V({})}else V({});H.current?L(e=>ge(e,W)):(H.current=!0,L(W))}},[U,W]);let G=g.useMemo(()=>{let e=new Map;for(let t of M)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},[M]),K=g.useMemo(()=>{let e={};for(let t of M)Object.assign(e,R[t.settingsSource]??{});return e},[M,R]),q=g.useMemo(()=>{let e={};for(let t of M)Object.assign(e,B[t.settingsSource]??{});return e},[M,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]),ke=g.useCallback(e=>{a(o(e)||w(l.ERROR$GENERIC))},[w]),Y=g.useRef(()=>{}),Ae=g.useCallback(()=>{Y.current()},[]),X=g.useRef(()=>({})),je=g.useCallback(()=>X.current(),[]),Z=()=>{if(M.some(e=>!e.filteredSchema))return;let e;try{let t={};for(let e of M){let n=e.filteredSchema,r=ie(n,R[e.settingsSource]??{},B[e.settingsSource]??{},I);if(Object.keys(r).length>0){let n=ye[e.settingsSource];t[n]={...t[n]??{},...r}}}e=c?c(t,{values:K,dirty:q,view:I}):t}catch(e){a(e instanceof Error?e.message:w(l.ERROR$GENERIC));return}Object.keys(e).length!==0&&Ce(e,{onError:ke,onSuccess:()=>{xe||s(w(l.SETTINGS$SAVED_WARNING)),V({}),u?.()}})};Y.current=Z,X.current=()=>{let e={};for(let t of M){if(!t.filteredSchema)continue;let n=R[t.settingsSource]??{},r=B[t.settingsSource]??{};Object.assign(e,d(t.filteredSchema,n,r))}return e};let Q=Object.keys(q).length>0,$=Q||i;return g.useEffect(()=>{C&&C({save:Ae,isSaving:T,isDirty:$,values:K,view:I,getDirtyPayload:je})},[T,$,K,I]),(we||Te)&&!E||Ee?(0,_.jsx)(y,{}):M.some(e=>e.filteredSchema&&e.filteredSchema.sections.length>0)?Object.keys(K).length===0?(0,_.jsx)(y,{}):(0,_.jsxs)(`div`,{"data-testid":Se,className:x?`relative flex min-h-0 w-full flex-1 flex-col`:`relative w-full min-h-0`,children:[(0,_.jsx)(me,{view:I,setView:L,showBasic:N,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}),M.map(e=>{if(!e.filteredSchema)return null;let t=R[e.settingsSource]??{};return ae(e.filteredSchema,{...K,...t},I,e.excludeKeys??he).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)(ce,{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)(ne,{testId:`save-button`,type:`button`,variant:`primary`,isDisabled:T||!Q&&!i,onClick:Z,children:w(T?l.SETTINGS$SAVING:l.SETTINGS$SAVE_CHANGES)})})]})]}):(0,_.jsx)(`div`,{"data-testid":`sdk-schema-unavailable`,className:pe,children:(0,_.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:De})})}export{S as t};
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{A as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{Ft as a,Mt as o,jt as s}from"./active-backend-context-BZDG15C0.js";import{t as c,z as l}from"./utils-DUD5ScdA.js";import{n as ee}from"./use-settings-C6ZxpBDX.js";import{t as te}from"./use-save-settings-BahvC2Gw.js";import{_ as u}from"./form-control-classes-CGXBLcn1.js";import{t as ne}from"./brand-button-Blxv5nww.js";import{_ as re,a as ie,c as ae,d as oe,f as se,i as d,l as f,n as ce,p as le,r as ue,t as de,u as fe,v as p}from"./schema-field-C59lVZTA.js";import{n as m,t as h}from"./switch-skeleton-DwOoCqaL.js";import{o as pe}from"./extension-module-card-classes-Bo43vY5V.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`,u,`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 me({view:e,setView:t,showBasic:n=!0,showAdvanced:i,showAll:a,isDisabled:o=!1}){let{t:s}=r(`openhands`);return[n,i,a].filter(Boolean).length<=1?null:(0,_.jsxs)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:`mb-6 flex items-center gap-2`,children:[n?(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(l.SETTINGS$BASIC)}):null,i?(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(l.SETTINGS$ADVANCED)}):null,a?(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(l.SETTINGS$ALL)}):null]})}var he=new Set,x={basic:0,advanced:1,all:2},ge=(e,t)=>x[t]<x[e]?t:e,_e=(e,t)=>x[t]>x[e]?t:e,ve=(e,{showBasic:t,showAdvanced:n,showAll:r})=>{if(e===`all`)return r?`all`:n?`advanced`:`basic`;if(e===`advanced`)return n?`advanced`:r?`all`:`basic`;if(!t){if(n)return`advanced`;if(r)return`all`}return`basic`},ye={agent_settings:`agent_settings_diff`,conversation_settings:`conversation_settings_diff`},be=(e,t)=>e instanceof i?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:i=!1,buildPayload:c,onSaveSuccess:u,getInitialView:m,forceShowAdvancedView:h=!1,allowAllView:v=!0,initialValueOverrides:b,embedded:x=!1,hideSaveButton:S=!1,suppressSuccessToast:xe=!1,onSaveControlChange:C,testId:Se=`sdk-section-settings-screen`}){let{t:w}=r(`openhands`),{mutate:Ce,isPending:T}=te(t),{data:E,isLoading:we,isFetching:Te}=ee(t),D=re(E?.agent_settings_schema),O=p(E?.conversation_settings_schema),k=g.useMemo(()=>JSON.stringify(e.map(e=>({source:e.settingsSource,sectionKeys:e.sectionKeys,excludeKeys:e.excludeKeys?Array.from(e.excludeKeys).sort():null}))),[e]),A=g.useMemo(()=>JSON.parse(k).map(e=>({settingsSource:e.source,sectionKeys:e.sectionKeys,excludeKeys:e.excludeKeys?new Set(e.excludeKeys):void 0})),[k]),j=g.useCallback(e=>e===`conversation_settings`?O.data:D.data,[D.data,O.data]),Ee=A.some(e=>e.settingsSource===`conversation_settings`?O.isLoading:D.isLoading),M=g.useMemo(()=>A.map(e=>{let t=j(e.settingsSource);if(!le(t))return{...e,filteredSchema:null};let n=new Set(e.sectionKeys),r=new Set,i={...t,sections:t.sections.filter(e=>!n.has(e.key)||r.has(e.key)?!1:(r.add(e.key),!0))};return{...e,filteredSchema:i}}),[A,j]),N=M.some(e=>fe(e.filteredSchema)),P=h||M.some(e=>f(e.filteredSchema)),F=v&&M.some(e=>oe(e.filteredSchema)),De=g.useMemo(()=>be(A.reduce((e,t)=>e??(t.settingsSource===`conversation_settings`?O.error:D.error),null),w(l.SETTINGS$SDK_SCHEMA_UNAVAILABLE)),[A,D.error,O.error,w]),Oe=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 M){if(!t.filteredSchema)return null;e[t.settingsSource]={...e[t.settingsSource]??{},...ue(E,t.filteredSchema,t.settingsSource)}}if(b){let t=M[0]?.settingsSource;t&&e[t]&&(e[t]={...e[t],...b})}return e},[E,M,Oe]),W=g.useMemo(()=>{if(!E)return null;let e=null;for(let t of M){if(!t.filteredSchema)return null;let n=m?m(E,t.filteredSchema):se(E,t.filteredSchema,t.settingsSource);e=e?_e(e,n):n}return e?ve(e,{showBasic:N,showAdvanced:P,showAll:F}):null},[E,M,m,N,P,F]);g.useEffect(()=>{H.current=!1,L(`basic`),z({}),V({})},[t,k]),g.useEffect(()=>{if(!(!U||!W)){if(z(U),b){let e=M[0]?.settingsSource;if(e){let t=Object.fromEntries(Object.keys(b).map(e=>[e,!0]));V({[e]:t})}else V({})}else V({});H.current?L(e=>ge(e,W)):(H.current=!0,L(W))}},[U,W]);let G=g.useMemo(()=>{let e=new Map;for(let t of M)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},[M]),K=g.useMemo(()=>{let e={};for(let t of M)Object.assign(e,R[t.settingsSource]??{});return e},[M,R]),q=g.useMemo(()=>{let e={};for(let t of M)Object.assign(e,B[t.settingsSource]??{});return e},[M,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]),ke=g.useCallback(e=>{s(a(e)||w(l.ERROR$GENERIC))},[w]),Y=g.useRef(()=>{}),Ae=g.useCallback(()=>{Y.current()},[]),X=g.useRef(()=>({})),je=g.useCallback(()=>X.current(),[]),Z=()=>{if(M.some(e=>!e.filteredSchema))return;let e;try{let t={};for(let e of M){let n=e.filteredSchema,r=ie(n,R[e.settingsSource]??{},B[e.settingsSource]??{},I);if(Object.keys(r).length>0){let n=ye[e.settingsSource];t[n]={...t[n]??{},...r}}}e=c?c(t,{values:K,dirty:q,view:I}):t}catch(e){s(e instanceof Error?e.message:w(l.ERROR$GENERIC));return}Object.keys(e).length!==0&&Ce(e,{onError:ke,onSuccess:()=>{xe||o(w(l.SETTINGS$SAVED_WARNING)),V({}),u?.()}})};Y.current=Z,X.current=()=>{let e={};for(let t of M){if(!t.filteredSchema)continue;let n=R[t.settingsSource]??{},r=B[t.settingsSource]??{};Object.assign(e,d(t.filteredSchema,n,r))}return e};let Q=Object.keys(q).length>0,$=Q||i;return g.useEffect(()=>{C&&C({save:Ae,isSaving:T,isDirty:$,values:K,view:I,getDirtyPayload:je})},[T,$,K,I]),(we||Te)&&!E||Ee?(0,_.jsx)(y,{}):M.some(e=>e.filteredSchema&&e.filteredSchema.sections.length>0)?Object.keys(K).length===0?(0,_.jsx)(y,{}):(0,_.jsxs)(`div`,{"data-testid":Se,className:x?`relative flex min-h-0 w-full flex-1 flex-col`:`relative w-full min-h-0`,children:[(0,_.jsx)(me,{view:I,setView:L,showBasic:N,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}),M.map(e=>{if(!e.filteredSchema)return null;let t=R[e.settingsSource]??{};return ae(e.filteredSchema,{...K,...t},I,e.excludeKeys??he).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)(ce,{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)(ne,{testId:`save-button`,type:`button`,variant:`primary`,isDisabled:T||!Q&&!i,onClick:Z,children:w(T?l.SETTINGS$SAVING:l.SETTINGS$SAVE_CHANGES)})})]})]}):(0,_.jsx)(`div`,{"data-testid":`sdk-schema-unavailable`,className:pe,children:(0,_.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:De})})}export{S as t};
@@ -0,0 +1 @@
1
+ import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-Cyuzqnbw.js";import{f as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{Q as n,Y as r,st as i}from"./active-backend-context-BZDG15C0.js";import{t as a}from"./proxy-DYDXxtje.js";async function o(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 s=100;function c(){let e=i().backend;if(e.kind!==`cloud`)throw Error(`Cloud secrets call requires a cloud backend.`);return e}async function l(){let e=c(),t=[],n=null;do{let r=new URLSearchParams({limit:String(s)});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 u({name:e,value:t,description:n,previousName:r}){let i=c();r!==void 0&&await o(()=>a({backend:i,method:`PUT`,path:`/api/v1/secrets/${encodeURIComponent(r)}`,body:{name:e,description:n}})),t!==void 0&&await o(()=>a({backend:i,method:`POST`,path:`/api/v1/secrets`,body:{name:e,value:t,description:n}}))}async function d(e){await a({backend:c(),method:`DELETE`,path:`/api/v1/secrets/${encodeURIComponent(e)}`})}var f=e({SecretsService:()=>m});async function p(){return i().backend.kind===`cloud`?o(()=>l()):(await o(()=>new t(n()).listSecrets())).secrets.map(e=>({name:e.name,description:e.description}))}var m=class{static async getSecrets(){try{return await p()}catch(e){return console.error(`Failed to fetch secrets after retries:`,e),[]}}static async getSecretsOrThrow(){return p()}static async createSecret(e,r,a){if(i().backend.kind===`cloud`){await u({name:e,value:r,description:a});return}await o(()=>new t(n()).upsertSecret({name:e,value:r,description:a}))}static async updateSecret(e,r,a,s){if(i().backend.kind===`cloud`){await u({name:r,value:s,description:a,previousName:e});return}let c=new t(n()),l=s??await o(()=>c.getSecret(e));await o(()=>c.upsertSecret({name:r,value:l,description:a})),r!==e&&await this.deleteSecret(e)}static async deleteSecret(e){try{if(i().backend.kind===`cloud`){await o(()=>d(e));return}await o(()=>new t(n()).deleteSecret(e))}catch(e){if(r(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-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as o}from"./useMutation-6ZsQCqAn.js";import{t as s,z as c}from"./utils-DUD5ScdA.js";import{t as l}from"./back-nav-button-H_ThtDA0.js";import{t as u}from"./pencil-49avMHlD.js";import{t as d}from"./trash-2-yZnDM4Ji.js";import{t as f}from"./loading-spinner-DBgXgra0.js";import{f as p,l as m}from"./form-control-classes-CGXBLcn1.js";import{t as h}from"./brand-button-Blxv5nww.js";import{n as g,t as _}from"./settings-input-CWUEHHvS.js";import{t as v}from"./confirmation-modal-CiEwxZAA.js";import{r as y}from"./typography-DB5HoCk0.js";import"./extension-module-card-classes-Bo43vY5V.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-DdcLXDGn.js";import{t as D}from"./secrets-service-BtsgYSlj.js";import{t as O}from"./use-get-secrets-6PBitf54.js";import{t as k}from"./use-create-secret-DbBIpaCR.js";var A=e(t(),1),j=()=>o({mutationFn:e=>D.deleteSecret(e)}),M=()=>o({mutationFn:({secretToEdit:e,name:t,description:n,value:r})=>D.updateSecret(e,t,n,r)}),N=n();function P({mode:e,selectedSecret:t,onCancel:n}){let r=i(),{t:o}=a(`openhands`),{data:l}=O(),{mutate:u}=k(),{mutate:d}=M(),[f,v]=A.useState(null),y=e===`edit`&&t&&l?.find(e=>e.name===t)?.description?.trim()||``,b=()=>{r.invalidateQueries({queryKey:[`secrets-search`]}),r.invalidateQueries({queryKey:[`secrets`]})},x=(e,t,r)=>{u({name:e,value:t,description:r},{onSettled:n,onSuccess:b})},S=(e,t,r,i)=>{d({secretToEdit:e,name:t,description:r,value:i},{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(),a=r.get(`secret-value`)?.toString().trim(),s=r.get(`secret-description`)?.toString();if(i){if(v(null),l?.some(e=>e.name===i&&e.name!==t)){v(o(c.SECRETS$SECRET_ALREADY_EXISTS));return}if(e===`add`){if(!a){v(o(c.SECRETS$SECRET_VALUE_REQUIRED));return}x(i,a,s||void 0)}else e===`edit`&&t&&S(t,i,s||void 0,a||void 0)}},className:`flex flex-col items-start gap-6`,children:[(0,N.jsx)(_,{testId:`name-input`,name:`secret-name`,type:`text`,label:o(c.SETTINGS$NAME),className:`w-full min-w-0`,required:!0,defaultValue:e===`edit`&&t?t:``,placeholder:o(c.SECRETS$API_KEY_EXAMPLE),pattern:`^[a-zA-Z][a-zA-Z0-9_]{0,63}$`,title:o(c.SETTINGS$SECRET_NAME_PATTERN_TITLE)}),f&&(0,N.jsx)(`p`,{className:`text-red-500 text-sm`,children:f}),(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:o(e===`add`?c.FORM$VALUE:c.SECRETS$SECRET_VALUE_LEAVE_BLANK)}),(0,N.jsx)(`textarea`,{"data-testid":`value-input`,name:`secret-value`,required:e===`add`,className:s(`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:o(c.FORM$DESCRIPTION)}),(0,N.jsx)(g,{})]}),(0,N.jsx)(`input`,{"data-testid":`description-input`,name:`secret-description`,defaultValue:y,className:s(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:o(c.BUTTON$CANCEL)}),(0,N.jsxs)(h,{testId:`submit-button`,type:`submit`,variant:`primary`,children:[e===`add`&&o(c.SECRETS$ADD_SECRET),e===`edit`&&o(c.SECRETS$EDIT_SECRET)]})]})]})}function F(){return(0,N.jsxs)(`div`,{className:s(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:s(w,`text-content-2 truncate`),title:e,children:e}),(0,N.jsx)(`td`,{className:s(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)(u,{"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)(d,{"aria-hidden":!0,className:`size-4`,strokeWidth:2})})]})})]})}var L={hideTitle:!0};function R(){let e=i(),{t}=a(`openhands`),n=(0,A.useRef)(null),{data:r,isLoading:o,hasNextPage:u,isFetchingNextPage:d,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&&u&&!d&&p()},[u,d,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`?c.SECRETS$ADD_A_SECRET:c.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(c.SETTINGS$NAV_SECRETS)}),(0,N.jsx)(`p`,{"data-testid":`settings-page-subtitle`,className:`text-sm leading-5 text-tertiary-light`,children:t(c.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:o,children:t(c.SECRETS$ADD_NEW_SECRET)})]}):null,B?(0,N.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,N.jsx)(l,{testId:`back-to-secrets`,onClick:z,children:t(c.BUTTON$BACK)}),(0,N.jsx)(y.H2,{testId:`secret-editor-title`,children:V})]}):null,o&&g===`list`&&(0,N.jsxs)(`ul`,{children:[(0,N.jsx)(F,{}),(0,N.jsx)(F,{}),(0,N.jsx)(F,{})]}),g===`list`&&!o&&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(c.SECRETS$EMPTY)})}),g===`list`&&!o&&(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:s(x,`w-1/4`),children:t(c.SETTINGS$NAME)}),(0,N.jsx)(`th`,{className:s(x,`w-1/2`),children:t(c.SECRETS$DESCRIPTION)}),(0,N.jsx)(`th`,{className:s(x,`w-1/4 text-right`),children:t(c.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))})]}),d&&(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(c.SECRETS$CONFIRM_DELETE_KEY),onConfirm:L,onCancel:R})]})}var z=r(R);export{z as default,L as handle};
@@ -1 +1 @@
1
- import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./utils-DPQfkd-7.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.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":a,"data-testid":o?`${o}-option-${r.value}`:void 0,onClick:()=>i(r.value),className:t(`inline-flex items-center gap-1.5 px-2.5 py-1 rounded cursor-pointer transition-colors`,a?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:text-white`),children:[r.icon?(0,n.jsx)(`span`,{className:`inline-flex size-3.5 shrink-0 items-center justify-center [&_svg]:size-3.5`,children:r.icon}):null,r.label]},r.value)})})}export{r as t};
1
+ import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./utils-DUD5ScdA.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.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":a,"data-testid":o?`${o}-option-${r.value}`:void 0,onClick:()=>i(r.value),className:t(`inline-flex items-center gap-1.5 px-2.5 py-1 rounded cursor-pointer transition-colors`,a?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:text-white`),children:[r.icon?(0,n.jsx)(`span`,{className:`inline-flex size-3.5 shrink-0 items-center justify-center [&_svg]:size-3.5`,children:r.icon}):null,r.label]},r.value)})})}export{r as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{F as r,L as i,U as a,j as o,p as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{t as c}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{L as l,M as u,ot as d}from"./active-backend-context-B_bg5h9O.js";import{t as f,z as p}from"./utils-DPQfkd-7.js";import{i as m,n as h,r as g,t as _}from"./use-settings-nav-items-DV9qgeu7.js";import{n as v}from"./use-config-DapX3pjC.js";import"./navigation-link-Bxo3-4vo.js";import"./sidebar-layout-Dxg6zc2K.js";import{t as y}from"./sidebar-nav-link-CxLoG-dG.js";import"./close-ScPlnwyq.js";import{r as b}from"./typography-D9tiHct7.js";import{t as x}from"./settings-section-header-context-BOJ_Fbak.js";import"./settings-gear-DaJj6Pde.js";import{n as S,r as C}from"./settings-utils-gw2ppAvw.js";import{t as w}from"./use-breakpoint-DWtihr9g.js";import{t as T}from"./backend-synced-settings-badge-YI3k09Wr.js";import{t as E}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";var D=e(t(),1),O=n();function k({navigationItems:e}){let{t}=c(`openhands`),n=e.filter(e=>e.type===`item`);return(0,O.jsxs)(`aside`,{"data-testid":`settings-navbar-desktop`,className:f(`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,O.jsx)(b.Text,{className:`px-2 text-sm font-normal text-white`,children:t(p.SETTINGS$TITLE)}),(0,O.jsxs)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:[n.map(e=>(0,O.jsx)(y,{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,O.jsx)(h,{}),(0,O.jsx)(g,{})]}),(0,O.jsx)(`div`,{className:`flex flex-col gap-2 px-2 pt-3`,children:(0,O.jsx)(m,{})}),(0,O.jsx)(`div`,{className:`px-2 pt-3`,children:(0,O.jsx)(T,{})})]})}function A({children:e,navigationItems:t}){return(0,O.jsx)(`div`,{className:`flex h-full flex-col md:pt-8`,children:(0,O.jsxs)(`div`,{className:`flex min-h-0 flex-1 gap-10 md:items-start`,children:[(0,O.jsx)(k,{navigationItems:t}),(0,O.jsx)(`main`,{className:E,children:(0,O.jsx)(`div`,{className:`mx-auto w-full min-w-0 max-w-[800px]`,children:e})})]})})}var j=async({request:e})=>{let{pathname:t}=new URL(e.url),n=(await d.fetchQuery({queryKey:l.WEB_CLIENT_CONFIG,queryFn:v.getConfig,...u}))?.feature_flags;if(C(t,n)){let e=S(n);if(e&&e!==t)return o(e)}return null};function M(){let{t:e}=c(`openhands`),t=r(),n=i(),a=_(),o=w(768),[l,u]=(0,D.useState)(!1),{currentSectionTitle:d,currentSectionSubtitle:f}=(0,D.useMemo)(()=>{let e=a.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=a.find(e=>e.type===`item`);return n?.type===`item`?{currentSectionTitle:n.item.text,currentSectionSubtitle:n.item.subtitle}:{currentSectionTitle:`SETTINGS$TITLE`,currentSectionSubtitle:null}},[a,t.pathname]),p=n.find(e=>e.pathname===t.pathname)?.handle,m=o&&t.pathname===`/settings`;return(0,O.jsx)(`main`,{"data-testid":`settings-screen`,className:`min-h-0`,children:(0,O.jsx)(x,{setHideSectionHeader:u,children:(0,O.jsx)(A,{navigationItems:a,children:(0,O.jsxs)(`div`,{className:`flex flex-col gap-6 pb-8`,children:[!(p?.hideTitle===!0||m||l)&&(0,O.jsxs)(`header`,{className:`space-y-1`,children:[(0,O.jsx)(b.H2,{children:e(d)}),f?(0,O.jsx)(`p`,{"data-testid":`settings-page-subtitle`,className:`text-sm leading-5 text-tertiary-light`,children:e(f)}):null]}),(0,O.jsx)(s,{})]})})})})}var N=a(M);export{j as clientLoader,N as default};
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{F as r,L as i,U as a,j as o,p as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as c}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{I as l,at as u,j as d}from"./active-backend-context-BZDG15C0.js";import{t as f,z as p}from"./utils-DUD5ScdA.js";import{i as m,n as h,r as g,t as _}from"./use-settings-nav-items-Bqn69Ggw.js";import{n as v}from"./use-config-C3PO4TBw.js";import"./navigation-link-Bxo3-4vo.js";import"./sidebar-layout-lrfPooIB.js";import{t as y}from"./sidebar-nav-link-B8lFD6Cb.js";import"./close-ScPlnwyq.js";import{r as b}from"./typography-DB5HoCk0.js";import{t as x}from"./settings-section-header-context-BOJ_Fbak.js";import"./settings-gear-DaJj6Pde.js";import{n as S,r as C}from"./settings-utils-CxjtCSB3.js";import{t as w}from"./use-breakpoint-DWtihr9g.js";import{t as T}from"./backend-synced-settings-badge-BBASWqsb.js";import{t as E}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";var D=e(t(),1),O=n();function k({navigationItems:e}){let{t}=c(`openhands`),n=e.filter(e=>e.type===`item`);return(0,O.jsxs)(`aside`,{"data-testid":`settings-navbar-desktop`,className:f(`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,O.jsx)(b.Text,{className:`px-2 text-sm font-normal text-white`,children:t(p.SETTINGS$TITLE)}),(0,O.jsxs)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:[n.map(e=>(0,O.jsx)(y,{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,O.jsx)(h,{}),(0,O.jsx)(g,{})]}),(0,O.jsx)(`div`,{className:`flex flex-col gap-2 px-2 pt-3`,children:(0,O.jsx)(m,{})}),(0,O.jsx)(`div`,{className:`px-2 pt-3`,children:(0,O.jsx)(T,{})})]})}function A({children:e,navigationItems:t}){return(0,O.jsx)(`div`,{className:`flex h-full flex-col md:pt-8`,children:(0,O.jsxs)(`div`,{className:`flex min-h-0 flex-1 gap-10 md:items-start`,children:[(0,O.jsx)(k,{navigationItems:t}),(0,O.jsx)(`main`,{className:E,children:(0,O.jsx)(`div`,{className:`mx-auto w-full min-w-0 max-w-[800px]`,children:e})})]})})}var j=async({request:e})=>{let{pathname:t}=new URL(e.url),n=(await u.fetchQuery({queryKey:l.WEB_CLIENT_CONFIG,queryFn:v.getConfig,...d}))?.feature_flags;if(C(t,n)){let e=S(n);if(e&&e!==t)return o(e)}return null};function M(){let{t:e}=c(`openhands`),t=r(),n=i(),a=_(),o=w(768),[l,u]=(0,D.useState)(!1),{currentSectionTitle:d,currentSectionSubtitle:f}=(0,D.useMemo)(()=>{let e=a.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=a.find(e=>e.type===`item`);return n?.type===`item`?{currentSectionTitle:n.item.text,currentSectionSubtitle:n.item.subtitle}:{currentSectionTitle:`SETTINGS$TITLE`,currentSectionSubtitle:null}},[a,t.pathname]),p=n.find(e=>e.pathname===t.pathname)?.handle,m=o&&t.pathname===`/settings`;return(0,O.jsx)(`main`,{"data-testid":`settings-screen`,className:`min-h-0`,children:(0,O.jsx)(x,{setHideSectionHeader:u,children:(0,O.jsx)(A,{navigationItems:a,children:(0,O.jsxs)(`div`,{className:`flex flex-col gap-6 pb-8`,children:[!(p?.hideTitle===!0||m||l)&&(0,O.jsxs)(`header`,{className:`space-y-1`,children:[(0,O.jsx)(b.H2,{children:e(d)}),f?(0,O.jsx)(`p`,{"data-testid":`settings-page-subtitle`,className:`text-sm leading-5 text-tertiary-light`,children:e(f)}):null]}),(0,O.jsx)(s,{})]})})})})}var N=a(M);export{j as clientLoader,N as default};
@@ -1 +1 @@
1
- var e={llm_model:`openhands/glm-5.2`,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:null,enable_proactive_conversation_starters:!1,enable_solvability_analysis:!1,search_api_key:``,is_new_user:!0,disabled_skills:[],mcp_config:{},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/glm-5.2`},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/kimi-k3`,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:null,enable_proactive_conversation_starters:!1,enable_solvability_analysis:!1,search_api_key:``,is_new_user:!0,disabled_skills:[],mcp_config:{},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/kimi-k3`},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-Cyuzqnbw.js";import{St as e,r as t,t as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{t as a,z as o}from"./utils-DPQfkd-7.js";import{f as s}from"./form-control-classes-DLN3Qgub.js";import{i as c}from"./combobox-caret-BlmRwiM8.js";import{n as l}from"./settings-input-D61Vzp9e.js";e();var u=r();function d({testId:e,label:r,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:a(`flex flex-col gap-2.5 w-full min-w-0`,d),children:[r&&(0,u.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,u.jsx)(`span`,{className:`text-sm`,children:r}),h&&(0,u.jsx)(l,{})]}),(0,u.jsx)(n,{"aria-label":typeof r==`string`?r:f,"data-testid":e,name:f,defaultItems:p,defaultSelectedKey:v,selectedKey:y,onSelectionChange:C,onInputChange:w,isClearable:b,isDisabled:g||_,isLoading:_,placeholder:_?k(o.HOME$LOADING):m,allowsCustomValue:x,isRequired:S,className:`w-full`,classNames:{popoverContent:`bg-content1 rounded-xl`,selectorButton:c},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:a(s,D),input:O}},defaultFilter:T,startContent:E||null,children:e=>(0,u.jsx)(t,{children:e.label},e.key)})]})}export{d as t};
1
+ import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,r as t,t as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as a,z as o}from"./utils-DUD5ScdA.js";import{f as s}from"./form-control-classes-CGXBLcn1.js";import{i as c}from"./combobox-caret-DvpEsh2O.js";import{n as l}from"./settings-input-CWUEHHvS.js";e();var u=r();function d({testId:e,label:r,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:a(`flex flex-col gap-2.5 w-full min-w-0`,d),children:[r&&(0,u.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,u.jsx)(`span`,{className:`text-sm`,children:r}),h&&(0,u.jsx)(l,{})]}),(0,u.jsx)(n,{"aria-label":typeof r==`string`?r:f,"data-testid":e,name:f,defaultItems:p,defaultSelectedKey:v,selectedKey:y,onSelectionChange:C,onInputChange:w,isClearable:b,isDisabled:g||_,isLoading:_,placeholder:_?k(o.HOME$LOADING):m,allowsCustomValue:x,isRequired:S,className:`w-full`,classNames:{popoverContent:`bg-content1 rounded-xl`,selectorButton:c},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:a(s,D),input:O}},defaultFilter:T,startContent:E||null,children:e=>(0,u.jsx)(t,{children:e.label},e.key)})]})}export{d as t};
@@ -1 +1 @@
1
- import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{U as t,f as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{z as i}from"./utils-DPQfkd-7.js";import{i as a,n as o,r as s,t as c}from"./use-settings-nav-items-DV9qgeu7.js";import{t as l}from"./use-config-DapX3pjC.js";import{t as u}from"./sidebar-nav-link-CxLoG-dG.js";import{r as d}from"./typography-D9tiHct7.js";import{n as f}from"./settings-utils-gw2ppAvw.js";import{t as p}from"./use-breakpoint-DWtihr9g.js";import{t as m}from"./backend-synced-settings-badge-YI3k09Wr.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)(o,{}),(0,h.jsx)(s,{})]}),(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
+ import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{U as t,f as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{z as i}from"./utils-DUD5ScdA.js";import{i as a,n as o,r as s,t as c}from"./use-settings-nav-items-Bqn69Ggw.js";import{t as l}from"./use-config-C3PO4TBw.js";import{t as u}from"./sidebar-nav-link-B8lFD6Cb.js";import{r as d}from"./typography-DB5HoCk0.js";import{n as f}from"./settings-utils-CxjtCSB3.js";import{t as p}from"./use-breakpoint-DWtihr9g.js";import{t as m}from"./backend-synced-settings-badge-BBASWqsb.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)(o,{}),(0,h.jsx)(s,{})]}),(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-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{t as i,z as a}from"./utils-DPQfkd-7.js";import{f as o}from"./form-control-classes-DLN3Qgub.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(a.COMMON$OPTIONAL)})}var u=(0,s.forwardRef)(function({testId:e,name:t,label:n,type:r,defaultValue:a,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,hint:O,onBlur:k,inputClassName:A},j){let M=E&&e?`${e}-error`:void 0;return(0,c.jsxs)(`label`,{className:i(`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:i(`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,{}),O&&(0,c.jsx)(`span`,{"data-testid":e?`${e}-hint`:void 0,className:`min-w-0 text-xs text-[var(--oh-muted)]`,children:O})]}),(0,c.jsx)(`input`,{ref:j,"data-testid":e,onChange:e=>h?.(e.target.value),onKeyDown:g,onBlur:k,name:t,disabled:f,type:r,defaultValue:a,value:s,placeholder:u,min:v,max:y,step:b,required:_,pattern:x,title:S,"aria-describedby":M??w,"aria-invalid":!!E||T,className:i(o,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`,E&&`border-red-500`,A)}),E&&(0,c.jsx)(`p`,{id:M,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-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as i,z as a}from"./utils-DUD5ScdA.js";import{f as o}from"./form-control-classes-CGXBLcn1.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(a.COMMON$OPTIONAL)})}var u=(0,s.forwardRef)(function({testId:e,name:t,label:n,type:r,defaultValue:a,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,hint:O,onBlur:k,inputClassName:A},j){let M=E&&e?`${e}-error`:void 0;return(0,c.jsxs)(`label`,{className:i(`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:i(`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,{}),O&&(0,c.jsx)(`span`,{"data-testid":e?`${e}-hint`:void 0,className:`min-w-0 text-xs text-[var(--oh-muted)]`,children:O})]}),(0,c.jsx)(`input`,{ref:j,"data-testid":e,onChange:e=>h?.(e.target.value),onKeyDown:g,onBlur:k,name:t,disabled:f,type:r,defaultValue:a,value:s,placeholder:u,min:v,max:y,step:b,required:_,pattern:x,title:S,"aria-describedby":M??w,"aria-invalid":!!E||T,className:i(o,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`,E&&`border-red-500`,A)}),E&&(0,c.jsx)(`p`,{id:M,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-DPQfkd-7.js";import{_ as t,d as n,i as r,m as i}from"./form-control-classes-DLN3Qgub.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-DUD5ScdA.js";import{_ as t,d as n,i as r,m as i}from"./form-control-classes-CGXBLcn1.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 +1 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{Kt as i}from"./active-backend-context-B_bg5h9O.js";import{L as a,t as o,z as s}from"./utils-DPQfkd-7.js";import{i as c}from"./llm-settings-D9ko42Pi.js";import{t as l}from"./use-tracking-salbPJxT.js";import{t as u}from"./settings-CWFxymAf.js";import{t as d}from"./use-save-settings-DIEurJ3D.js";import{t as f}from"./modal-backdrop-BSzNhM4r.js";import{r as p,t as m}from"./modal-body-duRaxj_K.js";import{t as h}from"./base-modal-3NmIOKDm.js";import{t as g}from"./modal-classes-CLEXO6dj.js";import{t as _}from"./brand-button-CJcwjnfb.js";import{n as v}from"./navigation-context-CQZwH_tC.js";import{t as y}from"./settings-input-D61Vzp9e.js";import{s as b,y as x}from"./schema-field-Z-rMg9ti.js";import{t as S}from"./settings-utils-gw2ppAvw.js";var C=e(t(),1),w=n();function T({testId:e,title:t,description:n,buttons:r}){return(0,w.jsx)(h,{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}=l(),{mutate:i}=d(),{currentPath:o}=v(),{t:u}=r(`openhands`),p=C.useRef(null),[m,h]=C.useState(!1),g=async e=>{let r=S(e);await i(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=()=>{g(new FormData(p.current??void 0))},D=e=>{e.preventDefault();let t=new FormData(e.currentTarget);o.startsWith(`/conversations/`)?h(!0):g(t)},O=e.llm_api_key_set,k=b(e,`llm.model`);return(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`form`,{ref:p,"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)(c,{currentModel:typeof k==`string`?k:void 0,wrapperClassName:`!flex-col !gap-[17px]`,labelClassName:a.LABEL_CLASSNAME}),(0,w.jsx)(y,{testId:`llm-api-key-input`,name:`llm-api-key-input`,label:u(s.SETTINGS_FORM$API_KEY),type:`password`,className:`w-full`,placeholder:O?`<hidden>`:``,labelClassName:a.LABEL_CLASSNAME}),(0,w.jsx)(x,{testId:`llm-api-key-help-anchor`,text:u(s.SETTINGS$DONT_KNOW_API_KEY),linkText:u(s.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)(_,{testId:`save-settings-button`,type:`submit`,variant:`primary`,className:`w-full`,children:u(s.BUTTON$SAVE)})})]}),m&&(0,w.jsx)(f,{children:(0,w.jsx)(T,{title:u(s.MODAL$END_SESSION_TITLE),description:u(s.MODAL$END_SESSION_MESSAGE),buttons:{danger:{text:u(s.BUTTON$END_SESSION),onClick:E},cancel:{text:u(s.BUTTON$CANCEL),onClick:()=>h(!1)}}})})]})}function D({onClose:e,settings:t}){let{t:n}=r(`openhands`);return(0,w.jsx)(f,{children:(0,w.jsxs)(`div`,{"data-testid":`ai-config-modal`,className:o(`bg-[var(--oh-surface)] m-4 p-6 rounded-xl flex flex-col gap-[17px] border border-[var(--oh-border)] api-configuration-modal`,p(`md`),m),children:[(0,w.jsx)(`span`,{className:g,children:n(s.AI_SETTINGS$TITLE)}),(0,w.jsx)(x,{testId:`advanced-settings-link`,text:`${n(s.SETTINGS$DESCRIPTION)}. ${n(s.SETTINGS$FOR_OTHER_OPTIONS)} ${n(s.COMMON$SEE)}`,linkText:n(s.COMMON$ADVANCED_SETTINGS),href:i(`/settings`),suffix:`.`,size:`settings`,linkColor:`white`,suffixClassName:`text-white`}),(0,w.jsx)(E,{settings:t||u,onClose:e})]})})}export{D as SettingsModal};
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{qt as i}from"./active-backend-context-BZDG15C0.js";import{L as a,t as o,z as s}from"./utils-DUD5ScdA.js";import{i as c}from"./llm-settings-BLAMK2tR.js";import{t as l}from"./use-tracking-Bhu7gk2y.js";import{t as u}from"./settings-DcNPxz0v.js";import{t as d}from"./use-save-settings-BahvC2Gw.js";import{t as f}from"./modal-backdrop-BSzNhM4r.js";import{r as p,t as m}from"./modal-body-BdKfD3Hl.js";import{t as h}from"./base-modal-BbjycA8X.js";import{t as g}from"./modal-classes-D5_b5vMi.js";import{t as _}from"./brand-button-Blxv5nww.js";import{n as v}from"./navigation-context-CQZwH_tC.js";import{t as y}from"./settings-input-CWUEHHvS.js";import{s as b,y as x}from"./schema-field-C59lVZTA.js";import{t as S}from"./settings-utils-CxjtCSB3.js";var C=e(t(),1),w=n();function T({testId:e,title:t,description:n,buttons:r}){return(0,w.jsx)(h,{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}=l(),{mutate:i}=d(),{currentPath:o}=v(),{t:u}=r(`openhands`),p=C.useRef(null),[m,h]=C.useState(!1),g=async e=>{let r=S(e);await i(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=()=>{g(new FormData(p.current??void 0))},D=e=>{e.preventDefault();let t=new FormData(e.currentTarget);o.startsWith(`/conversations/`)?h(!0):g(t)},O=e.llm_api_key_set,k=b(e,`llm.model`);return(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`form`,{ref:p,"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)(c,{currentModel:typeof k==`string`?k:void 0,wrapperClassName:`!flex-col !gap-[17px]`,labelClassName:a.LABEL_CLASSNAME}),(0,w.jsx)(y,{testId:`llm-api-key-input`,name:`llm-api-key-input`,label:u(s.SETTINGS_FORM$API_KEY),type:`password`,className:`w-full`,placeholder:O?`<hidden>`:``,labelClassName:a.LABEL_CLASSNAME}),(0,w.jsx)(x,{testId:`llm-api-key-help-anchor`,text:u(s.SETTINGS$DONT_KNOW_API_KEY),linkText:u(s.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)(_,{testId:`save-settings-button`,type:`submit`,variant:`primary`,className:`w-full`,children:u(s.BUTTON$SAVE)})})]}),m&&(0,w.jsx)(f,{children:(0,w.jsx)(T,{title:u(s.MODAL$END_SESSION_TITLE),description:u(s.MODAL$END_SESSION_MESSAGE),buttons:{danger:{text:u(s.BUTTON$END_SESSION),onClick:E},cancel:{text:u(s.BUTTON$CANCEL),onClick:()=>h(!1)}}})})]})}function D({onClose:e,settings:t}){let{t:n}=r(`openhands`);return(0,w.jsx)(f,{children:(0,w.jsxs)(`div`,{"data-testid":`ai-config-modal`,className:o(`bg-[var(--oh-surface)] m-4 p-6 rounded-xl flex flex-col gap-[17px] border border-[var(--oh-border)] api-configuration-modal`,p(`md`),m),children:[(0,w.jsx)(`span`,{className:g,children:n(s.AI_SETTINGS$TITLE)}),(0,w.jsx)(x,{testId:`advanced-settings-link`,text:`${n(s.SETTINGS$DESCRIPTION)}. ${n(s.SETTINGS$FOR_OTHER_OPTIONS)} ${n(s.COMMON$SEE)}`,linkText:n(s.COMMON$ADVANCED_SETTINGS),href:i(`/settings`),suffix:`.`,size:`settings`,linkColor:`white`,suffixClassName:`text-white`}),(0,w.jsx)(E,{settings:t||u,onClose:e})]})})}export{D as SettingsModal};