@openhands/agent-canvas 1.17.0 → 1.19.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 (601) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/acp-providers-BQ4o4vqy.js +1 -0
  4. package/build/assets/active-backend-context-BsLfwrXB.js +2 -0
  5. package/build/assets/{agent-context-settings-CJUrcBut.js → agent-context-settings-D9i6ezoJ.js} +1 -1
  6. package/build/assets/{agent-profiles-service.api-Biieml2L.js → agent-profiles-service.api-U-9YzDFU.js} +1 -1
  7. package/build/assets/agent-profiles-settings-D-bUV2PX.js +1 -0
  8. package/build/assets/agent-server-client-options-EHB23gyx.js +1 -0
  9. package/build/assets/agent-server-config-C_x8Otd9.js +1 -0
  10. package/build/assets/agent-server-conversation-service.api-BaVQ6NpE.js +88 -0
  11. package/build/assets/agent-settings-BZJHtaIK.js +2 -0
  12. package/build/assets/agent-settings-D4snDd6u.js +1 -0
  13. package/build/assets/alert-banner-BkVt_8Or.js +1 -0
  14. package/build/assets/{api-error-message-Ve79qDcN.js → api-error-message-BXo0lCI5.js} +1 -1
  15. package/build/assets/api-key-entry-screen-fAIld-n7.js +1 -0
  16. package/build/assets/app-settings-DITbrM2u.js +1 -0
  17. package/build/assets/automation-detail-DawHmaOl.js +3 -0
  18. package/build/assets/automation-disabled-reason-DtgC8Ppt.js +1 -0
  19. package/build/assets/{automation-export-DxY47m3T.js → automation-export-Kv6e0bHx.js} +1 -1
  20. package/build/assets/automation-git-sync-Dd98G_Oz.js +1 -0
  21. package/build/assets/automation-setup-route-Cdc109ZD.js +3 -0
  22. package/build/assets/{automation-templates-4C4PM8K7.js → automation-templates-Xhr-FDAB.js} +1 -1
  23. package/build/assets/automations-list-BeP1LuzQ.js +1 -0
  24. package/build/assets/{back-nav-button-B8tH0BEp.js → back-nav-button-DWNiN277.js} +1 -1
  25. package/build/assets/backend-form-modal-DeaUJIik.js +1 -0
  26. package/build/assets/backend-synced-settings-badge-Br85iWIY.js +1 -0
  27. package/build/assets/badge-Cdnei7Ly.js +1 -0
  28. package/build/assets/{base-modal-DTULovNc.js → base-modal-Ds7grR67.js} +1 -1
  29. package/build/assets/{bot-CLMxGFaq.js → bot-ByolqPEr.js} +1 -1
  30. package/build/assets/{brand-button-DxPO4Lf8.js → brand-button-mQq2Ld1I.js} +1 -1
  31. package/build/assets/browser-Bfum8fkE.js +46 -0
  32. package/build/assets/browser-tab-CmYT4j_r.js +1 -0
  33. package/build/assets/canvas-extension-page-CokKSVRG.js +1 -0
  34. package/build/assets/canvas-extensions-BoQEYG-2.js +1 -0
  35. package/build/assets/{canvas-extensions-runtime-DdnkgJXV.js → canvas-extensions-runtime-Du2M5iEX.js} +1 -1
  36. package/build/assets/{chat-send-button-B3SFSIg5.js → chat-send-button-DM3JgMc2.js} +1 -1
  37. package/build/assets/check-Bo8s5Ylg.js +1 -0
  38. package/build/assets/chevron-down-Cr6Fn_wS.js +1 -0
  39. package/build/assets/chevron-right-CfdfRn-8.js +1 -0
  40. package/build/assets/circle-check-5pH3qCji.js +1 -0
  41. package/build/assets/circle-plus-check-toggle-BbYBiUwv.js +1 -0
  42. package/build/assets/{cloud-funnel-analytics-BQanUEEC.js → cloud-funnel-analytics-D02kgq1s.js} +1 -1
  43. package/build/assets/{cog-VBlRo6iw.js → cog-Dy1eWbSZ.js} +1 -1
  44. package/build/assets/command-menu-mehU3Evb.js +1 -0
  45. package/build/assets/commits-tab-DhQW8CXi.js +1 -0
  46. package/build/assets/{condenser-settings-eVKFMvap.js → condenser-settings-eRk6Fkx6.js} +1 -1
  47. package/build/assets/confirmation-modal-BmVt_c0I.js +1 -0
  48. package/build/assets/{context-menu-list-item-DDROe12Z.js → context-menu-list-item-lx2zk9G7.js} +1 -1
  49. package/build/assets/{conversation-BnjJSFf5.js → conversation-BOj0ENI6.js} +8 -8
  50. package/build/assets/conversation-SouWlGvs.js +1 -0
  51. package/build/assets/conversation-panel-SouWlGvs.js +1 -0
  52. package/build/assets/conversation-state-store-C6YncQNo.js +1 -0
  53. package/build/assets/conversation-store-DC-JlJuq.js +6 -0
  54. package/build/assets/{conversation-tab-empty-state-DKlzAz5c.js → conversation-tab-empty-state-DIhwCC2J.js} +1 -1
  55. package/build/assets/copy-to-clipboard-button-DVNXLylP.js +1 -0
  56. package/build/assets/device-verify-LP-x7nra.js +1 -0
  57. package/build/assets/{dropdown-classes-B9kJVDIk.js → dropdown-classes-goDldkiu.js} +1 -1
  58. package/build/assets/edit-automation-modal-BJJR9wSW.js +1 -0
  59. package/build/assets/empty-state-Cd-TFe7i.js +1 -0
  60. package/build/assets/{entry.client-Ds8LVp-E.js → entry.client-CJdjIvMZ.js} +2 -2
  61. package/build/assets/enum-filter-dropdown-pocrz9AL.js +1 -0
  62. package/build/assets/environment-switch-overlay-Dwe78wRl.js +1 -0
  63. package/build/assets/error-state-SuWwztxV.js +1 -0
  64. package/build/assets/extensions-hub-O0esK3Er.js +1 -0
  65. package/build/assets/extensions-navigation-CgCVSXje.js +1 -0
  66. package/build/assets/{external-link-DQtv7eTh.js → external-link-Bd7Tga-1.js} +1 -1
  67. package/build/assets/files-tab-B_6t8ljw.js +1 -0
  68. package/build/assets/{form-control-classes-B-z85REi.js → form-control-classes-lQfLxzH4.js} +1 -1
  69. package/build/assets/format-model-name-Dfh9Udrx.js +1 -0
  70. package/build/assets/get-git-path-Bp5rsUkl.js +1 -0
  71. package/build/assets/git-repo-dropdown-CbD0_LPN.js +1 -0
  72. package/build/assets/git-repo-dropdown-DPQVumZg.js +1 -0
  73. package/build/assets/highlighted-source-view-Bp0sgK-f.js +1 -0
  74. package/build/assets/home-BghzJd-D.js +1 -0
  75. package/build/assets/home-CXZ8zawS.js +1 -0
  76. package/build/assets/home-automation-run-tooltip-BdpCckKO.js +1 -0
  77. package/build/assets/home-store-DNQpfIEO.js +1 -0
  78. package/build/assets/hooks-service-DkxnQa4N.js +1 -0
  79. package/build/assets/index-home-Ca6Q5CtT.js +1 -0
  80. package/build/assets/info-BcajzHn1.js +1 -0
  81. package/build/assets/install-server-modal-DvxxYKia.js +1 -0
  82. package/build/assets/{key-CfXbJa8w.js → key-CwTE6XJj.js} +1 -1
  83. package/build/assets/launch-jsRGPRBx.js +1 -0
  84. package/build/assets/link-external-B4gx3EeM.js +1 -0
  85. package/build/assets/list-filter-B8PQk3RA.js +1 -0
  86. package/build/assets/{list-todo-ByXMdY4W.js → list-todo-Caa8E1X_.js} +1 -1
  87. package/build/assets/llm-not-configured-banner-DMdL1vaX.js +27 -0
  88. package/build/assets/llm-settings-dkQ5Oq7W.js +1 -0
  89. package/build/assets/llm-settings-lNDerSlu.js +1 -0
  90. package/build/assets/{llm-subscription-service-aDNBQ7Gq.js → llm-subscription-service-BiQaZbvv.js} +1 -1
  91. package/build/assets/loader-circle-BxJgk73D.js +1 -0
  92. package/build/assets/{loading-spinner-DfHI77BA.js → loading-spinner-DK1sAwVg.js} +1 -1
  93. package/build/assets/manage-backends-modal-DqCJohsX.js +1 -0
  94. package/build/assets/manifest-ff93dc8c.js +1 -0
  95. package/build/assets/manifest-subpage-layout-sxuPqfUr.js +1 -0
  96. package/build/assets/{map-provider-DXvssjw9.js → map-provider-iRs80q_6.js} +1 -1
  97. package/build/assets/markdown-renderer-BH5pqDuJ.js +8 -0
  98. package/build/assets/mcp-BtaJDXnP.js +1 -0
  99. package/build/assets/mcp-installed-servers-Br4ZLsjr.js +1 -0
  100. package/build/assets/mcp-marketplace-utils-BwEnDYqm.js +1 -0
  101. package/build/assets/mcp-page-DwbnQpVs.js +9 -0
  102. package/build/assets/messages-DmFJlW6c.js +41 -0
  103. package/build/assets/{modal-body-DJw4xBki.js → modal-body-DBweM2EN.js} +1 -1
  104. package/build/assets/{modal-classes-Dg0ngBPO.js → modal-classes-jvG85nkU.js} +1 -1
  105. package/build/assets/modal-close-button-BrM5fNnn.js +1 -0
  106. package/build/assets/{mouse-pointer-click-DEhsSUpu.js → mouse-pointer-click-BXlRN92t.js} +1 -1
  107. package/build/assets/onboarding-CQ8T6T0U.js +1 -0
  108. package/build/assets/onboarding-modal-CnliiaSN.js +1 -0
  109. package/build/assets/{organization-service.api-Cyg1Tn03.js → organization-service.api-DmFUEmu5.js} +1 -1
  110. package/build/assets/parse-git-remote-url-BG8pcKL8.js +1 -0
  111. package/build/assets/{pencil-D5c47kyN.js → pencil-q-ihqDYv.js} +1 -1
  112. package/build/assets/{pin-C7vMagvf.js → pin-BdroVQdN.js} +1 -1
  113. package/build/assets/planner-tab-CXph_C9F.js +1 -0
  114. package/build/assets/{plug-CeaqeF6u.js → plug-7ACOEbMs.js} +1 -1
  115. package/build/assets/{plugins-management-service-Bh_pBuf-.js → plugins-management-service-CcEpfNKz.js} +1 -1
  116. package/build/assets/plus-C2e21TFC.js +1 -0
  117. package/build/assets/{profiles-service.api-BbOK0EkF.js → profiles-service.api-DdF_4Zhe.js} +1 -1
  118. package/build/assets/providers-BWRnl31s.js +1 -0
  119. package/build/assets/proxy-DbEf3Nqr.js +1 -0
  120. package/build/assets/{puzzle-DdAqbUrb.js → puzzle-LJYnuxKe.js} +1 -1
  121. package/build/assets/react-BX7IV650.js +1 -0
  122. package/build/assets/recommended-automations-launcher-r0oI91HN.js +1 -0
  123. package/build/assets/{refresh-cw-DEQdPCpH.js → refresh-cw-BtdC3T8P.js} +1 -1
  124. package/build/assets/root-j2fFRlWS.js +2 -0
  125. package/build/assets/root-layout-CfGgm2lo.js +2 -0
  126. package/build/assets/root-sEWn3ha1.css +1 -0
  127. package/build/assets/schema-field-c3Ncgm4x.js +1 -0
  128. package/build/assets/sdk-section-page-DFEiuiFQ.js +1 -0
  129. package/build/assets/secret-form-WXXNFqTM.js +1 -0
  130. package/build/assets/{secrets-service-Cr8g8xuv.js → secrets-service-DU6wh3wX.js} +1 -1
  131. package/build/assets/secrets-settings-BEqbPvjy.js +1 -0
  132. package/build/assets/settings-DjaSQwFh.js +1 -0
  133. package/build/assets/settings-dropdown-input-BRR2OZwi.js +1 -0
  134. package/build/assets/settings-index-DHv4XFcM.js +1 -0
  135. package/build/assets/settings-input-Cm4VxUon.js +1 -0
  136. package/build/assets/{settings-list-classes-Ds4jPBHK.js → settings-list-classes-CaUfKZ33.js} +1 -1
  137. package/build/assets/settings-modal-djXuAnBO.js +1 -0
  138. package/build/assets/settings-nav-DFb3hBMr.js +16 -0
  139. package/build/assets/{settings-service.api-9_xdv_mh.js → settings-service.api-Q9lKW1TX.js} +1 -1
  140. package/build/assets/settings-switch-seaSJc7t.js +1 -0
  141. package/build/assets/{settings-utils-8GIIgOQL.js → settings-utils-BTaaRhLZ.js} +1 -1
  142. package/build/assets/shared-conversation-x3rxVCon.js +1 -0
  143. package/build/assets/{shield-check-DO7wa_eu.js → shield-check-C3Rl0NF8.js} +1 -1
  144. package/build/assets/{sidebar-layout-EPfWxk11.js → sidebar-layout-B6mcvvdV.js} +1 -1
  145. package/build/assets/sidebar-mobile-menu-toggle-CEqS8KnA.js +1 -0
  146. package/build/assets/{sidebar-nav-link-_t4_Ef-9.js → sidebar-nav-link-BTHX11LG.js} +1 -1
  147. package/build/assets/{sidebar-onboarding-checklist-storage-DbDX-Wvj.js → sidebar-onboarding-checklist-storage-BP1kzn6p.js} +1 -1
  148. package/build/assets/sidebar-store-DAZVH-DR.js +1 -0
  149. package/build/assets/skill-card-pill-row-TD39nfP3.js +1 -0
  150. package/build/assets/{skill-filter-BBeZ4JEP.js → skill-filter-CdBbbwjm.js} +2 -2
  151. package/build/assets/{skill-icon-badge-BDhQ-tQ0.js → skill-icon-badge-vUEp7gsC.js} +1 -1
  152. package/build/assets/skill-scope-BTRBQt0-.js +1 -0
  153. package/build/assets/skills-plugins-k1tUNAw4.js +1 -0
  154. package/build/assets/skills-settings-CENviPT7.js +1 -0
  155. package/build/assets/{styled-tooltip-Pd22BIvr.js → styled-tooltip-DVAlWYnL.js} +1 -1
  156. package/build/assets/task-list-tab-BLKF_x9f.js +1 -0
  157. package/build/assets/{terminal-onXx0_Qz.js → terminal-Ckbnqb23.js} +1 -1
  158. package/build/assets/{toggle-switch-lwQtxDcm.js → toggle-switch-DeiG9Mf6.js} +1 -1
  159. package/build/assets/{trash-2-ZhKuTLiz.js → trash-2-Bb40zQzs.js} +1 -1
  160. package/build/assets/trash-CXN2R54L.js +1 -0
  161. package/build/assets/{triangle-alert-BajLPpQg.js → triangle-alert-DEdu-b_L.js} +1 -1
  162. package/build/assets/{typography-HLLg_FAn.js → typography-NarNyelM.js} +1 -1
  163. package/build/assets/usage-tab-Drd3O006.js +1 -0
  164. package/build/assets/use-acp-credential-form-CJ5wPsQm.js +1 -0
  165. package/build/assets/{use-activate-agent-profile-BLKML6vQ.js → use-activate-agent-profile-iQZ0U3qV.js} +1 -1
  166. package/build/assets/use-agent-profiles-LCvb5OXT.js +1 -0
  167. package/build/assets/{use-automation-health-BZkQNEA8.js → use-automation-health-DdgSa8sA.js} +1 -1
  168. package/build/assets/{use-automation-permissions-B_RpvL-s.js → use-automation-permissions-D3kEeieu.js} +1 -1
  169. package/build/assets/{use-automations-Cg0PDIZr.js → use-automations-CEubcYTD.js} +1 -1
  170. package/build/assets/{use-can-manage-org-profiles-BbN6KfDr.js → use-can-manage-org-profiles-CB8ybxFK.js} +1 -1
  171. package/build/assets/{use-canvas-extensions-CFUpHat6.js → use-canvas-extensions-BMacwi2v.js} +1 -1
  172. package/build/assets/{use-cloud-current-user-id-Dk0rjr63.js → use-cloud-current-user-id-BEKRd6XZ.js} +1 -1
  173. package/build/assets/{use-config-DpafU_QP.js → use-config-3WYcJsgC.js} +1 -1
  174. package/build/assets/{use-create-conversation-1YgmAHt-.js → use-create-conversation-Be-eVpFp.js} +1 -1
  175. package/build/assets/use-create-secret-Bk9ZxTjl.js +1 -0
  176. package/build/assets/use-free-models-Ci3FkKEm.js +1 -0
  177. package/build/assets/{use-get-secrets-CQ4b0qK8.js → use-get-secrets-fqS0kxt6.js} +1 -1
  178. package/build/assets/use-is-authed-A2Yinlt0.js +1 -0
  179. package/build/assets/{use-launch-skill-in-chat-DeYa1tFM.js → use-launch-skill-in-chat-QbXDhiHr.js} +1 -1
  180. package/build/assets/use-llm-configured-B71ZEVg2.js +1 -0
  181. package/build/assets/use-llm-profiles-xtCBMbef.js +1 -0
  182. package/build/assets/{use-manifest-capabilities-AOWGcu0j.js → use-manifest-capabilities-Bso6A_-A.js} +1 -1
  183. package/build/assets/{use-onboarding-completion-CoINurkm.js → use-onboarding-completion-CEgjL02y.js} +1 -1
  184. package/build/assets/{use-pinned-home-route-D6krwXjy.js → use-pinned-home-route-pK4IlJ-p.js} +1 -1
  185. package/build/assets/{use-plugins-marketplace-mLsIDhBv.js → use-plugins-marketplace-B8-ZEB34.js} +1 -1
  186. package/build/assets/use-save-agent-profile-D7hJuW_u.js +1 -0
  187. package/build/assets/{use-save-settings-3U5K9-8x.js → use-save-settings-CikTu5xV.js} +1 -1
  188. package/build/assets/{use-settings-Dn00UISA.js → use-settings-BWIH5EuN.js} +1 -1
  189. package/build/assets/use-settings-nav-items-DSKwLDnd.js +1 -0
  190. package/build/assets/use-tracking-ChnSFChv.js +3 -0
  191. package/build/assets/{use-user-conversation-ZWlXtbZb.js → use-user-conversation-C_l65DqW.js} +1 -1
  192. package/build/assets/{useInfiniteQuery-BzrRqjLg.js → useInfiniteQuery-CtSRG7uW.js} +1 -1
  193. package/build/assets/{useMutation-CJuK90oc.js → useMutation-Cszf8mKy.js} +1 -1
  194. package/build/assets/useQueries-pUohFMSP.js +1 -0
  195. package/build/assets/useQuery-DAAacS7O.js +1 -0
  196. package/build/assets/useTranslation-CCgUjPJF.js +1 -0
  197. package/build/assets/utils-D-gOfhmN.js +1 -0
  198. package/build/assets/{vendor~conversation-panel~conversation-4eJ0tml3.js → vendor~conversation-panel~conversation-C22sJuWZ.js} +1 -1
  199. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js +2 -0
  200. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js +185 -0
  201. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js +1 -0
  202. package/build/assets/{vendor~index-home~home~conversation-panel~conversation-CSFLzmTN.js → vendor~index-home~home~conversation-panel~conversation-UTl7gUo9.js} +1 -1
  203. package/build/assets/{vendor~root-layout-n8XCEXG8.js → vendor~root-layout-CcdIqs-C.js} +1 -1
  204. package/build/assets/{vendor~root-layout~conversation-panel~conversation-3Idg1_U3.js → vendor~root-layout~conversation-panel~conversation-C3EBV3kp.js} +1 -1
  205. package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BCe0JJVy.js +1 -0
  206. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-DgQ564nC.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BGGbPcYh.js} +1 -1
  207. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-BFRW8wt-.js +48 -0
  208. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BPjI-atc.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js} +1 -1
  209. package/build/assets/{verification-settings-u2POabjH.js → verification-settings-PKtoIUUY.js} +1 -1
  210. package/build/assets/{wrench-CkgI4rxA.js → wrench-B8Wg_nbp.js} +1 -1
  211. package/build/assets/{x-By6qCmtY.js → x-CX8lVGwm.js} +1 -1
  212. package/build/index.html +4 -4
  213. package/build/locales/ar/openhands.json +16 -2
  214. package/build/locales/ca/openhands.json +16 -2
  215. package/build/locales/de/openhands.json +16 -2
  216. package/build/locales/en/openhands.json +16 -2
  217. package/build/locales/es/openhands.json +16 -2
  218. package/build/locales/fr/openhands.json +16 -2
  219. package/build/locales/it/openhands.json +16 -2
  220. package/build/locales/ja/openhands.json +16 -2
  221. package/build/locales/ko-KR/openhands.json +16 -2
  222. package/build/locales/no/openhands.json +16 -2
  223. package/build/locales/pt/openhands.json +16 -2
  224. package/build/locales/tr/openhands.json +16 -2
  225. package/build/locales/uk/openhands.json +16 -2
  226. package/build/locales/zh-CN/openhands.json +16 -2
  227. package/build/locales/zh-TW/openhands.json +16 -2
  228. package/config/defaults.json +3 -3
  229. package/dist/api/cloud/organization-service.api.cjs.map +1 -1
  230. package/dist/api/cloud/organization-service.api.d.ts +9 -1
  231. package/dist/api/cloud/organization-service.api.js.map +1 -1
  232. package/dist/api/config-service/config-service.api.cjs +1 -1
  233. package/dist/api/config-service/config-service.api.cjs.map +1 -1
  234. package/dist/api/config-service/config-service.api.js +6 -2
  235. package/dist/api/config-service/config-service.api.js.map +1 -1
  236. package/dist/api/config-service/config-service.types.d.ts +13 -0
  237. package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.cjs +3 -3
  238. package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.cjs.map +1 -1
  239. package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.js +12 -16
  240. package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.js.map +1 -1
  241. package/dist/components/features/automations/automation-card.cjs +1 -1
  242. package/dist/components/features/automations/automation-card.cjs.map +1 -1
  243. package/dist/components/features/automations/automation-card.js +39 -38
  244. package/dist/components/features/automations/automation-card.js.map +1 -1
  245. package/dist/components/features/automations/automation-list-row.cjs +1 -1
  246. package/dist/components/features/automations/automation-list-row.cjs.map +1 -1
  247. package/dist/components/features/automations/automation-list-row.js +73 -72
  248. package/dist/components/features/automations/automation-list-row.js.map +1 -1
  249. package/dist/components/features/automations/build-automation-menu-items.cjs +1 -1
  250. package/dist/components/features/automations/build-automation-menu-items.cjs.map +1 -1
  251. package/dist/components/features/automations/build-automation-menu-items.d.ts +3 -1
  252. package/dist/components/features/automations/build-automation-menu-items.js +12 -11
  253. package/dist/components/features/automations/build-automation-menu-items.js.map +1 -1
  254. package/dist/components/features/automations/detail/configuration-section.d.ts +7 -1
  255. package/dist/components/features/automations/detail/detail-header.d.ts +8 -5
  256. package/dist/components/features/automations/detail/disabled-reason-banner.d.ts +16 -0
  257. package/dist/components/features/backends/backend-selector.cjs +1 -1
  258. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  259. package/dist/components/features/backends/backend-selector.js +112 -112
  260. package/dist/components/features/backends/backend-selector.js.map +1 -1
  261. package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs +1 -1
  262. package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -1
  263. package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +62 -61
  264. package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -1
  265. package/dist/components/features/chat/model-messages.cjs +1 -1
  266. package/dist/components/features/chat/model-messages.cjs.map +1 -1
  267. package/dist/components/features/chat/model-messages.js +27 -26
  268. package/dist/components/features/chat/model-messages.js.map +1 -1
  269. package/dist/components/features/conversation-panel/budget-display.cjs +1 -1
  270. package/dist/components/features/conversation-panel/budget-display.cjs.map +1 -1
  271. package/dist/components/features/conversation-panel/budget-display.d.ts +1 -2
  272. package/dist/components/features/conversation-panel/budget-display.js +12 -19
  273. package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
  274. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
  275. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
  276. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +45 -44
  277. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
  278. package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +1 -2
  279. package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +0 -1
  280. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
  281. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
  282. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +38 -29
  283. package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
  284. package/dist/components/features/images/image-lightbox.cjs +2 -0
  285. package/dist/components/features/images/image-lightbox.cjs.map +1 -0
  286. package/dist/components/features/images/image-lightbox.d.ts +11 -0
  287. package/dist/components/features/images/image-lightbox.js +37 -0
  288. package/dist/components/features/images/image-lightbox.js.map +1 -0
  289. package/dist/components/features/images/image-preview.cjs +1 -1
  290. package/dist/components/features/images/image-preview.cjs.map +1 -1
  291. package/dist/components/features/images/image-preview.d.ts +2 -1
  292. package/dist/components/features/images/image-preview.js +33 -13
  293. package/dist/components/features/images/image-preview.js.map +1 -1
  294. package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +3 -4
  295. package/dist/components/features/settings/agent-profiles/profile-scope-list.d.ts +20 -0
  296. package/dist/components/features/settings/cloud-settings-link.cjs +1 -1
  297. package/dist/components/features/settings/cloud-settings-link.cjs.map +1 -1
  298. package/dist/components/features/settings/cloud-settings-link.d.ts +3 -1
  299. package/dist/components/features/settings/cloud-settings-link.js +22 -21
  300. package/dist/components/features/settings/cloud-settings-link.js.map +1 -1
  301. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
  302. package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +2 -1
  303. package/dist/components/features/settings/llm-profiles/profile-row.cjs +1 -1
  304. package/dist/components/features/settings/llm-profiles/profile-row.js +1 -1
  305. package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
  306. package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
  307. package/dist/components/features/sidebar/sidebar-rail-body.d.ts +2 -1
  308. package/dist/components/features/sidebar/sidebar-rail-body.js +143 -142
  309. package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
  310. package/dist/components/features/sidebar/sidebar.cjs +1 -1
  311. package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
  312. package/dist/components/features/sidebar/sidebar.js +28 -27
  313. package/dist/components/features/sidebar/sidebar.js.map +1 -1
  314. package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
  315. package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
  316. package/dist/components/providers/agent-server-ui-providers.js +33 -29
  317. package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
  318. package/dist/components/shared/buttons/remove-button.cjs +1 -1
  319. package/dist/components/shared/buttons/remove-button.cjs.map +1 -1
  320. package/dist/components/shared/buttons/remove-button.d.ts +2 -1
  321. package/dist/components/shared/buttons/remove-button.js +2 -1
  322. package/dist/components/shared/buttons/remove-button.js.map +1 -1
  323. package/dist/components/shared/free-models-note.cjs +2 -0
  324. package/dist/components/shared/free-models-note.cjs.map +1 -0
  325. package/dist/components/shared/free-models-note.d.ts +3 -0
  326. package/dist/components/shared/free-models-note.js +20 -0
  327. package/dist/components/shared/free-models-note.js.map +1 -0
  328. package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
  329. package/dist/components/shared/modals/settings/model-selector.cjs.map +1 -1
  330. package/dist/components/shared/modals/settings/model-selector.js +102 -112
  331. package/dist/components/shared/modals/settings/model-selector.js.map +1 -1
  332. package/dist/config/defaults.cjs +1 -1
  333. package/dist/config/defaults.cjs.map +1 -1
  334. package/dist/config/defaults.js +3 -3
  335. package/dist/config/defaults.js.map +1 -1
  336. package/dist/constants/acp-providers.cjs +1 -1
  337. package/dist/constants/acp-providers.cjs.map +1 -1
  338. package/dist/constants/acp-providers.d.ts +7 -0
  339. package/dist/constants/acp-providers.js +20 -16
  340. package/dist/constants/acp-providers.js.map +1 -1
  341. package/dist/constants/profile-scope.d.ts +21 -0
  342. package/dist/hooks/chat/use-slash-command.cjs +1 -1
  343. package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
  344. package/dist/hooks/chat/use-slash-command.js +63 -62
  345. package/dist/hooks/chat/use-slash-command.js.map +1 -1
  346. package/dist/hooks/query/use-automation-sdk-version.cjs +1 -1
  347. package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
  348. package/dist/hooks/query/use-automation-sdk-version.js +3 -1
  349. package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
  350. package/dist/hooks/query/use-free-models.cjs +2 -0
  351. package/dist/hooks/query/use-free-models.cjs.map +1 -0
  352. package/dist/hooks/query/use-free-models.d.ts +23 -0
  353. package/dist/hooks/query/use-free-models.js +67 -0
  354. package/dist/hooks/query/use-free-models.js.map +1 -0
  355. package/dist/hooks/query/use-local-git-info.cjs.map +1 -1
  356. package/dist/hooks/query/use-local-git-info.js.map +1 -1
  357. package/dist/hooks/query/use-provider-models.cjs +1 -1
  358. package/dist/hooks/query/use-provider-models.cjs.map +1 -1
  359. package/dist/hooks/query/use-provider-models.js +34 -25
  360. package/dist/hooks/query/use-provider-models.js.map +1 -1
  361. package/dist/hooks/query/use-search-providers.cjs +1 -1
  362. package/dist/hooks/query/use-search-providers.cjs.map +1 -1
  363. package/dist/hooks/query/use-search-providers.js +31 -19
  364. package/dist/hooks/query/use-search-providers.js.map +1 -1
  365. package/dist/hooks/use-drag-resize.cjs +1 -1
  366. package/dist/hooks/use-drag-resize.cjs.map +1 -1
  367. package/dist/hooks/use-drag-resize.js +8 -9
  368. package/dist/hooks/use-drag-resize.js.map +1 -1
  369. package/dist/hooks/use-home-automation-actions.cjs +1 -1
  370. package/dist/hooks/use-home-automation-actions.cjs.map +1 -1
  371. package/dist/hooks/use-home-automation-actions.d.ts +1 -2
  372. package/dist/hooks/use-home-automation-actions.js +0 -1
  373. package/dist/hooks/use-home-automation-actions.js.map +1 -1
  374. package/dist/i18n/declaration.cjs +1 -1
  375. package/dist/i18n/declaration.cjs.map +1 -1
  376. package/dist/i18n/declaration.d.ts +16 -2
  377. package/dist/i18n/declaration.js +1 -1
  378. package/dist/i18n/declaration.js.map +1 -1
  379. package/dist/i18n/translation.cjs +3 -3
  380. package/dist/i18n/translation.cjs.map +1 -1
  381. package/dist/i18n/translation.js +255 -17
  382. package/dist/i18n/translation.js.map +1 -1
  383. package/dist/locales/ar/openhands.json +16 -2
  384. package/dist/locales/ca/openhands.json +16 -2
  385. package/dist/locales/de/openhands.json +16 -2
  386. package/dist/locales/en/openhands.json +16 -2
  387. package/dist/locales/es/openhands.json +16 -2
  388. package/dist/locales/fr/openhands.json +16 -2
  389. package/dist/locales/it/openhands.json +16 -2
  390. package/dist/locales/ja/openhands.json +16 -2
  391. package/dist/locales/ko-KR/openhands.json +16 -2
  392. package/dist/locales/no/openhands.json +16 -2
  393. package/dist/locales/pt/openhands.json +16 -2
  394. package/dist/locales/tr/openhands.json +16 -2
  395. package/dist/locales/uk/openhands.json +16 -2
  396. package/dist/locales/zh-CN/openhands.json +16 -2
  397. package/dist/locales/zh-TW/openhands.json +16 -2
  398. package/dist/manifests/manifest-validation.cjs +1 -1
  399. package/dist/manifests/manifest-validation.cjs.map +1 -1
  400. package/dist/manifests/manifest-validation.js +2 -2
  401. package/dist/manifests/manifest-validation.js.map +1 -1
  402. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs +1 -1
  403. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs.map +1 -1
  404. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js +15 -8
  405. package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js.map +1 -1
  406. package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs +1 -1
  407. package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs.map +1 -1
  408. package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js +11 -13
  409. package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js.map +1 -1
  410. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs +1 -1
  411. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs.map +1 -1
  412. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js +6 -0
  413. package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js.map +1 -1
  414. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +1 -1
  415. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs.map +1 -1
  416. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +3 -6
  417. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js.map +1 -1
  418. package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.cjs +1 -1
  419. package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.cjs.map +1 -1
  420. package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.js +9 -12
  421. package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.js.map +1 -1
  422. package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.cjs +2 -0
  423. package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.cjs.map +1 -0
  424. package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.js +41 -0
  425. package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.js.map +1 -0
  426. package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.cjs +1 -1
  427. package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.cjs.map +1 -1
  428. package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.js +3 -6
  429. package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.js.map +1 -1
  430. package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -1
  431. package/dist/node_modules/@openhands/typescript-client/dist/clients.js +1 -1
  432. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
  433. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
  434. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +199 -61
  435. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
  436. package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs +1 -1
  437. package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs.map +1 -1
  438. package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.js +9 -8
  439. package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.js.map +1 -1
  440. package/dist/package.cjs +1 -1
  441. package/dist/package.cjs.map +1 -1
  442. package/dist/package.js +2 -2
  443. package/dist/package.js.map +1 -1
  444. package/dist/routes/agent-settings.d.ts +5 -0
  445. package/dist/routes/app-settings.cjs +1 -1
  446. package/dist/routes/app-settings.cjs.map +1 -1
  447. package/dist/routes/app-settings.js +52 -47
  448. package/dist/routes/app-settings.js.map +1 -1
  449. package/dist/routes/llm-settings.cjs +1 -1
  450. package/dist/routes/llm-settings.cjs.map +1 -1
  451. package/dist/routes/llm-settings.js +137 -145
  452. package/dist/routes/llm-settings.js.map +1 -1
  453. package/dist/stores/free-models-store.cjs +2 -0
  454. package/dist/stores/free-models-store.cjs.map +1 -0
  455. package/dist/stores/free-models-store.d.ts +30 -0
  456. package/dist/stores/free-models-store.js +22 -0
  457. package/dist/stores/free-models-store.js.map +1 -0
  458. package/dist/types/automation.cjs.map +1 -1
  459. package/dist/types/automation.d.ts +23 -1
  460. package/dist/types/automation.js.map +1 -1
  461. package/dist/utils/automation-disabled-reason.cjs +2 -0
  462. package/dist/utils/automation-disabled-reason.cjs.map +1 -0
  463. package/dist/utils/automation-disabled-reason.d.ts +32 -0
  464. package/dist/utils/automation-disabled-reason.js +19 -0
  465. package/dist/utils/automation-disabled-reason.js.map +1 -0
  466. package/dist/utils/format-model-name.cjs +1 -1
  467. package/dist/utils/format-model-name.cjs.map +1 -1
  468. package/dist/utils/format-model-name.d.ts +27 -6
  469. package/dist/utils/format-model-name.js +14 -6
  470. package/dist/utils/format-model-name.js.map +1 -1
  471. package/dist/utils/parse-git-remote-url.cjs +1 -1
  472. package/dist/utils/parse-git-remote-url.cjs.map +1 -1
  473. package/dist/utils/parse-git-remote-url.d.ts +5 -1
  474. package/dist/utils/parse-git-remote-url.js +20 -13
  475. package/dist/utils/parse-git-remote-url.js.map +1 -1
  476. package/package.json +2 -2
  477. package/scripts/check-sdk-version-sync.mjs +79 -8
  478. package/scripts/dev-safe.mjs +1 -1
  479. package/scripts/static-server.mjs +24 -7
  480. package/build/assets/acp-providers-DrjNsPOH.js +0 -1
  481. package/build/assets/active-backend-context-rZiLJRUc.js +0 -2
  482. package/build/assets/agent-profiles-settings-x6RvPsq7.js +0 -1
  483. package/build/assets/agent-server-client-options-BikiNwTa.js +0 -1
  484. package/build/assets/agent-server-conversation-service.api-DYFsNHKf.js +0 -88
  485. package/build/assets/agent-settings-BJyovpJ_.js +0 -1
  486. package/build/assets/agent-settings-CpY3zObk.js +0 -2
  487. package/build/assets/alert-banner-vARz1idS.js +0 -1
  488. package/build/assets/api-key-entry-screen-CsMuBhoP.js +0 -1
  489. package/build/assets/app-settings-BaJ7nfHt.js +0 -1
  490. package/build/assets/automation-detail-CVoGDrKq.js +0 -3
  491. package/build/assets/automation-git-sync-CRMP9Bbm.js +0 -1
  492. package/build/assets/automation-setup-route-072beLz1.js +0 -3
  493. package/build/assets/automations-list-xuqTSQL4.js +0 -1
  494. package/build/assets/backend-form-modal-0aJmWdsa.js +0 -1
  495. package/build/assets/backend-synced-settings-badge-B7rKWBir.js +0 -1
  496. package/build/assets/badge-CcGx2TaV.js +0 -1
  497. package/build/assets/browser-C-_qBasq.js +0 -46
  498. package/build/assets/browser-tab-DZanIw5m.js +0 -1
  499. package/build/assets/canvas-extension-page-o_cWgE9B.js +0 -1
  500. package/build/assets/canvas-extensions-DSgNlCha.js +0 -1
  501. package/build/assets/check-fDEfgSzj.js +0 -1
  502. package/build/assets/chevron-down-CFrWHqu8.js +0 -1
  503. package/build/assets/chevron-right-C5roOrJu.js +0 -1
  504. package/build/assets/circle-check-ClTzJTdb.js +0 -1
  505. package/build/assets/circle-plus-check-toggle-Fr-h-mbL.js +0 -1
  506. package/build/assets/command-menu-BT3Ia5Ru.js +0 -1
  507. package/build/assets/commits-tab-2jhtaohl.js +0 -1
  508. package/build/assets/confirmation-modal-gIFHeZt6.js +0 -1
  509. package/build/assets/conversation-DZ578rOX.js +0 -1
  510. package/build/assets/conversation-panel-DZ578rOX.js +0 -1
  511. package/build/assets/conversation-state-store-D1_G_9I-.js +0 -1
  512. package/build/assets/conversation-store-DVVfkCsk.js +0 -6
  513. package/build/assets/copy-to-clipboard-button-B3w0X7WH.js +0 -1
  514. package/build/assets/device-verify-BfkCzyFB.js +0 -1
  515. package/build/assets/edit-automation-modal-BwhJ39JT.js +0 -1
  516. package/build/assets/empty-state-RZz0OfnY.js +0 -1
  517. package/build/assets/enum-filter-dropdown-C4pW0ORd.js +0 -1
  518. package/build/assets/environment-switch-overlay-P2ZAuzov.js +0 -1
  519. package/build/assets/error-state-B_5cgNPJ.js +0 -1
  520. package/build/assets/extensions-hub-DsaUr4ca.js +0 -1
  521. package/build/assets/extensions-navigation-CRMZd-FE.js +0 -1
  522. package/build/assets/files-tab-CCgAcVdc.js +0 -1
  523. package/build/assets/format-model-name-CasAP3nd.js +0 -1
  524. package/build/assets/get-git-path-EHrSDxTM.js +0 -1
  525. package/build/assets/git-repo-dropdown-D2WEQ97X.js +0 -1
  526. package/build/assets/git-repo-dropdown-DVeCUUXG.js +0 -1
  527. package/build/assets/highlighted-source-view-DjHO3SdW.js +0 -1
  528. package/build/assets/home-BorS_vdS.js +0 -1
  529. package/build/assets/home-aIMbHw5M.js +0 -1
  530. package/build/assets/home-automation-run-tooltip-CpHNFiFl.js +0 -1
  531. package/build/assets/home-store-DyXz0w6d.js +0 -1
  532. package/build/assets/hooks-service-C6dpRtZM.js +0 -1
  533. package/build/assets/index-home-zKFuKK2B.js +0 -1
  534. package/build/assets/info-CTIdjttz.js +0 -1
  535. package/build/assets/install-server-modal-DUiZMc8u.js +0 -1
  536. package/build/assets/kebab-menu-item-content-mm04SBD3.js +0 -1
  537. package/build/assets/launch-BSIf9KEg.js +0 -1
  538. package/build/assets/link-external-BNZzCM1I.js +0 -1
  539. package/build/assets/list-filter-CNpqTWVY.js +0 -1
  540. package/build/assets/llm-not-configured-banner-z_QRSeV0.js +0 -27
  541. package/build/assets/llm-settings-B-5AHMiX.js +0 -1
  542. package/build/assets/llm-settings-B3SjHDmA.js +0 -1
  543. package/build/assets/loader-circle-Dex47vVW.js +0 -1
  544. package/build/assets/manage-backends-modal-q1NdFisr.js +0 -1
  545. package/build/assets/manifest-8920b615.js +0 -1
  546. package/build/assets/manifest-subpage-layout-BQQy5ipR.js +0 -1
  547. package/build/assets/markdown-renderer-rivLvYh-.js +0 -8
  548. package/build/assets/mcp-CEXDhQWn.js +0 -1
  549. package/build/assets/mcp-marketplace-utils-Cn_NIMWM.js +0 -1
  550. package/build/assets/mcp-page-LGYIICMG.js +0 -9
  551. package/build/assets/messages-DUSeANAh.js +0 -41
  552. package/build/assets/modal-close-button-B9j4nasm.js +0 -1
  553. package/build/assets/onboarding-BjFebfs5.js +0 -1
  554. package/build/assets/onboarding-modal-DDTjOpyd.js +0 -1
  555. package/build/assets/parse-git-remote-url-DpDM9bK6.js +0 -1
  556. package/build/assets/planner-tab-D8f2Y3rn.js +0 -1
  557. package/build/assets/plus-B3wvU06-.js +0 -1
  558. package/build/assets/providers-2gIIkz2N.js +0 -1
  559. package/build/assets/proxy-CBgMd2zf.js +0 -1
  560. package/build/assets/recommended-automations-launcher-YLAQTp4s.js +0 -1
  561. package/build/assets/root-Bye_XmEL.js +0 -2
  562. package/build/assets/root-Cnwwzgo0.css +0 -1
  563. package/build/assets/root-layout-CSAwxBGM.js +0 -2
  564. package/build/assets/schema-field-CK0xYNbO.js +0 -1
  565. package/build/assets/sdk-section-page-Da73Rs_o.js +0 -1
  566. package/build/assets/secret-form-CB2VwYYg.js +0 -1
  567. package/build/assets/secrets-settings-Bh0udeKv.js +0 -1
  568. package/build/assets/settings-DmyIgRxO.js +0 -1
  569. package/build/assets/settings-dropdown-input-DVpyD87C.js +0 -1
  570. package/build/assets/settings-index-BSJUFmjE.js +0 -1
  571. package/build/assets/settings-input-C0dd8Utu.js +0 -1
  572. package/build/assets/settings-modal-yStgEh2o.js +0 -1
  573. package/build/assets/settings-switch-B78Khmyz.js +0 -1
  574. package/build/assets/shared-conversation-DM96X4KV.js +0 -1
  575. package/build/assets/sidebar-mobile-menu-toggle-D5GR5xT9.js +0 -1
  576. package/build/assets/sidebar-store-CSDFK0W5.js +0 -1
  577. package/build/assets/skill-card-pill-row-989y15jV.js +0 -1
  578. package/build/assets/skill-scope-Dz3kPH3P.js +0 -1
  579. package/build/assets/skills-plugins-e3CYGdUJ.js +0 -1
  580. package/build/assets/skills-settings-3e-FuHw_.js +0 -1
  581. package/build/assets/task-list-tab-3Jg8ywch.js +0 -1
  582. package/build/assets/trash-B6OIe4yX.js +0 -1
  583. package/build/assets/usage-tab-Cm-9j3UK.js +0 -1
  584. package/build/assets/use-acp-credential-form-BARcvjYE.js +0 -1
  585. package/build/assets/use-agent-profiles-1P91KSXz.js +0 -1
  586. package/build/assets/use-create-secret-D8p9ybQj.js +0 -1
  587. package/build/assets/use-is-authed-BRPjCRKM.js +0 -1
  588. package/build/assets/use-llm-configured-DGm8FiRR.js +0 -1
  589. package/build/assets/use-llm-profiles-BTTtpW4z.js +0 -1
  590. package/build/assets/use-save-agent-profile-CxyO9YG-.js +0 -1
  591. package/build/assets/use-settings-nav-items-vrjxTqcu.js +0 -16
  592. package/build/assets/use-tracking-B9prBsrq.js +0 -3
  593. package/build/assets/useQueries-CykmpT-a.js +0 -1
  594. package/build/assets/useQuery-S6j94er1.js +0 -1
  595. package/build/assets/utils-BOco8mxR.js +0 -1
  596. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js +0 -2
  597. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js +0 -185
  598. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-DnDoaYNi.js +0 -1
  599. package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-DkPlXWl9.js +0 -1
  600. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js +0 -48
  601. package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js +0 -1
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./useQuery-DAAacS7O.js";import{t as i}from"./useTranslation-CCgUjPJF.js";import{n as a}from"./active-backend-context-BsLfwrXB.js";import{t as o}from"./utils-D-gOfhmN.js";import{p as s}from"./agent-server-client-options-EHB23gyx.js";import{t as c}from"./settings-service.api-Q9lKW1TX.js";import{h as l,l as u}from"./form-control-classes-lQfLxzH4.js";import{t as d}from"./settings-dropdown-input-BRR2OZwi.js";import{t as f}from"./dist-Bl64nBZL.js";import{n as p,t as m}from"./settings-input-Cm4VxUon.js";import{a as h,i as ee,n as g}from"./llm-subscription-DTqtBCWz.js";import{t as _}from"./use-is-authed-A2Yinlt0.js";import{r as v}from"./typography-NarNyelM.js";import{t as y}from"./settings-switch-seaSJc7t.js";var b=e(t(),1),x=n(),S=f(``,{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 C({testId:e,text:t,linkText:n,href:r,suffix:i,suffixLinkText:a,suffixLinkHref:s,trailing:c,size:l,linkColor:u,className:d,linkTextClassName:f,suffixClassName:p}){return(0,x.jsxs)(`p`,{"data-testid":e,className:o(S({size:l}),d),children:[t,` `,(0,x.jsx)(`a`,{href:r,rel:`noreferrer noopener`,target:`_blank`,className:o(`underline underline-offset-2`,S({size:l,linkColor:u}),f),children:n}),i&&(0,x.jsx)(`span`,{className:p,children:i}),a&&s?(0,x.jsxs)(x.Fragment,{children:[` `,(0,x.jsx)(`a`,{href:s,rel:`noreferrer noopener`,target:`_blank`,className:o(`underline underline-offset-2`,S({size:l,linkColor:u}),f),children:a}),c]}):null]})}var te=`llm`;function w(e){if(!e?.sections)return e;let t=!1,n=e.sections.map(e=>{if(e.key!==te)return e;let n=new Set(e.fields.map(e=>e.key)),r=ee.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 T=(e,t)=>{let{data:n}=_(),{backend:i,orgId:o}=a(),l=!s(i),{data:u,error:d,isLoading:f,isFetching:p}=r({queryKey:[`settings-schema`,e,i.id,o,i.kind,i.host,i.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,b.useMemo)(()=>e===`agent`?w(t):t,[t,e]),h=(0,b.useMemo)(()=>e===`agent`?w(u):u,[u,e]);return t?{data:m,error:null,isLoading:!1,isFetching:!1}:{data:h,error:d,isLoading:f,isFetching:p}},E=e=>T(`agent`,e),ne=e=>T(`conversation`,e);function re(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=re(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`,g,h]),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){return typeof e!=`object`||!e?JSON.stringify(e):Array.isArray(e)?`[${e.map(U).join(`,`)}]`:`{${Object.entries(e).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${JSON.stringify(e)}:${U(t)}`).join(`,`)}}`}function W(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:U(t)}catch{return n}}return U(t)}return t===null?null:String(t)}function G(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 K(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)||W(t,L(e,t.key,n)??t.default??null)!==W(t,t.default??null)&&(V(t)?i=!0:a=!0);return i?`all`:a?`advanced`:`basic`}function q(e,t){return e.depends_on.every(e=>t[e]===!0)}function J(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 Y(e,t){if(e.value_type===`boolean`)return J(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 X(e,t,n){let r={};for(let i of P(e))n[i.key]&&I(r,i.key,Y(i,t[i.key]));return r}function Z(e,t){return oe[t].has(e.prominence)}function se(e,t,n,r){let i=X(e,t,n);for(let t of P(e))Z(t,r)||I(i,t.key,t.default??null);return i}function ce(e,t,n,r=ae){return N(e)?e.sections.map(e=>({...e,fields:e.fields.filter(e=>!r.has(e.key)&&Z(e,n)&&q(e,t))})).filter(e=>e.fields.length>0):[]}function le(e){return e?P(e).some(e=>e.prominence===`critical`):!1}function ue(e){return e?P(e).some(e=>e.prominence===`major`):!1}function de(e){return e?P(e).some(e=>e.prominence===`minor`):!1}var fe={"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$OPENHANDS_API_KEY_HELP_LINK`,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}=i(`openhands`),n=fe[e.key],r=M(t,e.key,e.description);return(0,x.jsxs)(x.Fragment,{children:[r&&!n?.hideDescription?(0,x.jsx)(v.Paragraph,{className:`text-tertiary-alt text-xs leading-5`,children:r}):null,n?(0,x.jsx)(C,{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 pe=new Set([`verification.critic_api_key`]);function $(e){return e.choices.length>0}function me(e){return e.value_type===`boolean`&&!$(e)}function he(e){return e.value_type===`array`||e.value_type===`object`}function ge(e){return e.key.endsWith(`url`)||e.key.endsWith(`_url`)}function _e(e){return e.secret?`password`:e.value_type===`integer`||e.value_type===`number`?`number`:e.value_type===`string`&&ge(e)?`url`:`text`}function ve({field:e,value:t,isDisabled:n,onChange:r}){let{t:a}=i(`openhands`),s=j(a,e.key,e.label),c=k(e.key);return me(e)?(0,x.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,x.jsx)(y,{testId:`sdk-settings-${e.key}`,isToggled:!!t,isDisabled:n,onToggle:r,children:s}),(0,x.jsx)(`div`,{className:l,children:(0,x.jsx)(Q,{field:e})})]}):$(e)?(0,x.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,x.jsx)(d,{testId:`sdk-settings-${e.key}`,name:e.key,label:s,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=>r(String(e??``))}),(0,x.jsx)(Q,{field:e})]}):he(e)?(0,x.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsx)(`span`,{className:`text-sm`,children:s}),e.required?null:(0,x.jsx)(p,{})]}),(0,x.jsx)(`textarea`,{"data-testid":`sdk-settings-${e.key}`,name:e.key,value:String(t??``),required:e.required,disabled:n,onChange:e=>r(e.target.value),className:o(u,`min-h-32 font-mono placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)}),(0,x.jsx)(Q,{field:e})]}):(0,x.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,x.jsx)(m,{testId:`sdk-settings-${e.key}`,name:e.key,label:s,type:_e(e),value:String(t??``),required:e.required,showOptionalTag:!e.required,isDisabled:n,onChange:r,className:`w-full`,min:c?.min,max:c?.max,step:c?.step}),(0,x.jsx)(Q,{field:e})]})}export{j as _,se as a,C as b,ce as c,de as d,K as f,M as g,H as h,X as i,ue as l,W as m,ve as n,Y as o,N as p,G as r,R as s,pe as t,le as u,E as v,ne as y};
@@ -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{s as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as i}from"./useTranslation-CCgUjPJF.js";import{ct as a,dt as o,st as s}from"./active-backend-context-BsLfwrXB.js";import{K as c,t as l}from"./utils-D-gOfhmN.js";import{n as ee}from"./use-settings-BWIH5EuN.js";import{t as te}from"./use-save-settings-CikTu5xV.js";import{_ as u}from"./form-control-classes-lQfLxzH4.js";import{t as ne}from"./brand-button-mQq2Ld1I.js";import{a as re,c as ie,d as ae,f as oe,i as se,l as ce,m as d,n as le,p as ue,r as de,t as fe,u as pe,v as me,y as he}from"./schema-field-c3Ncgm4x.js";import{n as f,t as p}from"./switch-skeleton-DwOoCqaL.js";import{o as ge}from"./extension-module-card-classes-DpeaYhYo.js";var m=e(t(),1),h=n();function g(){return(0,h.jsx)(`div`,{className:`w-[250px] h-[20px] skeleton`})}function _(){return(0,h.jsxs)(`div`,{"data-testid":`app-settings-skeleton`,className:`px-11 py-9 flex flex-col gap-6`,children:[(0,h.jsx)(p,{}),(0,h.jsx)(f,{}),(0,h.jsx)(f,{}),(0,h.jsx)(f,{}),(0,h.jsx)(g,{}),(0,h.jsx)(p,{}),(0,h.jsx)(p,{}),(0,h.jsx)(f,{})]})}var v=(e,t)=>l(`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 _e({view:e,setView:t,showBasic:n=!0,showAdvanced:r,showAll:a,isDisabled:o=!1}){let{t:s}=i(`openhands`);return[n,r,a].filter(Boolean).length<=1?null:(0,h.jsxs)(`div`,{role:`tablist`,"aria-orientation":`horizontal`,className:`mb-6 flex items-center gap-2`,children:[n?(0,h.jsx)(`button`,{"data-testid":`sdk-section-basic-toggle`,type:`button`,role:`tab`,"aria-selected":e===`basic`,disabled:o,className:v(e===`basic`,o),onClick:()=>t(`basic`),children:s(c.SETTINGS$BASIC)}):null,r?(0,h.jsx)(`button`,{"data-testid":`sdk-section-advanced-toggle`,type:`button`,role:`tab`,"aria-selected":e===`advanced`,disabled:o,className:v(e===`advanced`,o),onClick:()=>t(`advanced`),children:s(c.SETTINGS$ADVANCED)}):null,a?(0,h.jsx)(`button`,{"data-testid":`sdk-section-all-toggle`,type:`button`,role:`tab`,"aria-selected":e===`all`,disabled:o,className:v(e===`all`,o),onClick:()=>t(`all`),children:s(c.SETTINGS$ALL)}):null]})}var ve=new Set,y={basic:0,advanced:1,all:2},ye=(e,t)=>y[t]<y[e]?t:e,be=(e,t)=>y[t]>y[e]?t:e,xe=(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`},Se={agent_settings:`agent_settings_diff`,conversation_settings:`conversation_settings_diff`},Ce=(e,t)=>e instanceof r?e.response?.status===401?`${t} This agent server requires X-Session-API-Key. Set VITE_SESSION_API_KEY in the frontend to the same value used by the backend SESSION_API_KEY or OH_SESSION_API_KEYS_0.`:e.response?.status===404?`${t} This backend does not expose /api/settings/* schema endpoints. Upgrade to a recent openhands-agent-server release.`:t:t;function b({settingsSources:e,scope:t=`personal`,header:n,extraDirty:r=!1,buildPayload:l,onSaveSuccess:u,getInitialView:f,forceShowAdvancedView:p=!1,allowAllView:g=!0,initialValueOverrides:v,markInitialOverridesDirty:y=!0,embedded:b=!1,hideSaveButton:x=!1,suppressSuccessToast:we=!1,onSaveControlChange:S,testId:Te=`sdk-section-settings-screen`}){let{t:C}=i(`openhands`),{mutate:Ee,isPending:w}=te(t),{data:T,isLoading:De,isFetching:Oe}=ee(t),E=me(T?.agent_settings_schema),D=he(T?.conversation_settings_schema),O=m.useMemo(()=>JSON.stringify(e.map(e=>({source:e.settingsSource,sectionKeys:e.sectionKeys,excludeKeys:e.excludeKeys?Array.from(e.excludeKeys).sort():null}))),[e]),k=m.useMemo(()=>JSON.parse(O).map(e=>({settingsSource:e.source,sectionKeys:e.sectionKeys,excludeKeys:e.excludeKeys?new Set(e.excludeKeys):void 0})),[O]),A=m.useCallback(e=>e===`conversation_settings`?D.data:E.data,[E.data,D.data]),ke=k.some(e=>e.settingsSource===`conversation_settings`?D.isLoading:E.isLoading),j=m.useMemo(()=>k.map(e=>{let t=A(e.settingsSource);if(!ue(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}}),[k,A]),M=j.some(e=>pe(e.filteredSchema)),N=p||j.some(e=>ce(e.filteredSchema)),P=g&&j.some(e=>ae(e.filteredSchema)),Ae=m.useMemo(()=>Ce(k.reduce((e,t)=>e??(t.settingsSource===`conversation_settings`?D.error:E.error),null),C(c.SETTINGS$SDK_SCHEMA_UNAVAILABLE)),[k,E.error,D.error,C]),F=m.useMemo(()=>v?JSON.stringify(v):``,[v]),I=j[0]?.settingsSource,[L,R]=m.useState(`basic`),[z,B]=m.useState({}),[V,H]=m.useState({}),U=m.useRef(!1),W=m.useMemo(()=>{if(!T)return null;let e={};for(let t of j){if(!t.filteredSchema)return null;e[t.settingsSource]={...e[t.settingsSource]??{},...de(T,t.filteredSchema,t.settingsSource)}}if(v){let t=j[0]?.settingsSource;t&&e[t]&&(e[t]={...e[t],...v})}return e},[T,j,F]),G=m.useMemo(()=>{if(!T)return null;let e=null;for(let t of j){if(!t.filteredSchema)return null;let n=f?f(T,t.filteredSchema):oe(T,t.filteredSchema,t.settingsSource);e=e?be(e,n):n}return e?xe(e,{showBasic:M,showAdvanced:N,showAll:P}):null},[T,j,f,M,N,P]);m.useEffect(()=>{U.current=!1,R(`basic`),B({}),H({})},[t,O]),m.useEffect(()=>{if(!(!W||!G)&&!(x&&U.current)){if(B(W),v&&y){let e=I;if(e){let t=Object.fromEntries(Object.keys(v).map(e=>[e,!0]));H({[e]:t})}else H({})}else H({});U.current?R(e=>ye(e,G)):(U.current=!0,R(G))}},[W,G,F,y,I,x]);let K=m.useMemo(()=>{let e=new Map;for(let t of j)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},[j]),q=m.useMemo(()=>{let e={};for(let t of j)Object.assign(e,z[t.settingsSource]??{});return e},[j,z]),J=m.useMemo(()=>{let e={};for(let t of j)Object.assign(e,V[t.settingsSource]??{});return e},[j,V]),Y=m.useMemo(()=>{let e=new Map;for(let t of j)if(t.filteredSchema)for(let n of t.filteredSchema.sections)for(let t of n.fields)e.has(t.key)||e.set(t.key,t);return e},[j]),X=m.useRef(W);X.current=W;let Z=m.useRef(v);Z.current=v;let Q=m.useRef(y);Q.current=y;let je=m.useRef(Y);je.current=Y;let Me=m.useCallback((e,t)=>{let n=K.get(e)??j[0]?.settingsSource;n&&(B(r=>({...r,[n]:{...r[n]??{},[e]:t}})),H(r=>{let i=X.current?.[n]?.[e],a=Q.current&&!!Z.current&&e in Z.current,o=je.current.get(e);if((o?d(o,t)===d(o,i):t===i)&&!a){if(!r[n]?.[e])return r;let t={...r[n]??{}};return delete t[e],{...r,[n]:t}}return r[n]?.[e]?r:{...r,[n]:{...r[n]??{},[e]:!0}}}))},[K,j]),Ne=m.useCallback(e=>{s(o(e)||C(c.ERROR$GENERIC))},[C]),Pe=m.useRef(()=>{}),Fe=m.useCallback(()=>{Pe.current()},[]),Ie=m.useRef(()=>({})),Le=m.useCallback(()=>Ie.current(),[]),Re=()=>{if(j.some(e=>!e.filteredSchema))return;let e;try{let t={};for(let e of j){let n=e.filteredSchema,r=re(n,z[e.settingsSource]??{},V[e.settingsSource]??{},L);if(Object.keys(r).length>0){let n=Se[e.settingsSource];t[n]={...t[n]??{},...r}}}e=l?l(t,{values:q,dirty:J,view:L}):t}catch(e){s(e instanceof Error?e.message:C(c.ERROR$GENERIC));return}Object.keys(e).length!==0&&Ee(e,{onError:Ne,onSuccess:()=>{we||a(C(c.SETTINGS$SAVED_WARNING)),H({}),u?.()}})};Pe.current=Re,Ie.current=()=>{let e={};for(let t of j){if(!t.filteredSchema)continue;let n=z[t.settingsSource]??{},r=V[t.settingsSource]??{};Object.assign(e,se(t.filteredSchema,n,r))}return e};let ze=Object.keys(J).length>0,$=ze||r;return m.useEffect(()=>{S&&S({save:Fe,isSaving:w,isDirty:$,values:q,view:L,getDirtyPayload:Le})},[w,$,q,L]),(De||Oe)&&!T||ke?(0,h.jsx)(_,{}):j.some(e=>e.filteredSchema&&e.filteredSchema.sections.length>0)?Object.keys(q).length===0?(0,h.jsx)(_,{}):(0,h.jsxs)(`div`,{"data-testid":Te,className:b?`relative flex min-h-0 w-full flex-1 flex-col`:`relative w-full min-h-0`,children:[(0,h.jsx)(_e,{view:L,setView:R,showBasic:M,showAdvanced:N,showAll:P,isDisabled:!1}),(0,h.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[n?.({values:q,isDisabled:!1,view:L,onChange:Me}),j.map(e=>{if(!e.filteredSchema)return null;let t=z[e.settingsSource]??{};return ie(e.filteredSchema,{...q,...t},L,e.excludeKeys??ve).map(n=>(0,h.jsx)(`section`,{className:`flex flex-col gap-4`,children:(0,h.jsx)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:n.fields.map(e=>(0,h.jsx)(`div`,{className:fe.has(e.key)?`xl:col-span-2`:void 0,children:(0,h.jsx)(le,{field:e,value:t[e.key],isDisabled:!1,onChange:t=>Me(e.key,t)})},e.key))})},`${e.settingsSource}:${n.key}`))}),x?null:(0,h.jsx)(`div`,{className:`flex justify-start pt-2`,children:(0,h.jsx)(ne,{testId:`save-button`,type:`button`,variant:`primary`,isDisabled:w||!ze&&!r,onClick:Re,children:C(w?c.SETTINGS$SAVING:c.SETTINGS$SAVE_CHANGES)})})]})]}):(0,h.jsx)(`div`,{"data-testid":`sdk-schema-unavailable`,className:ge,children:(0,h.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:Ae})})}export{_ as n,b 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{f as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{t as i}from"./useMutation-Cszf8mKy.js";import{t as a}from"./useTranslation-CCgUjPJF.js";import{K as o,t as s}from"./utils-D-gOfhmN.js";import{f as c,l}from"./form-control-classes-lQfLxzH4.js";import{t as u}from"./brand-button-mQq2Ld1I.js";import{n as d,t as f}from"./settings-input-Cm4VxUon.js";import{t as p}from"./secrets-service-DU6wh3wX.js";import{t as m}from"./use-get-secrets-fqS0kxt6.js";import{t as h}from"./use-create-secret-Bk9ZxTjl.js";var g=()=>i({mutationFn:e=>p.deleteSecret(e)}),_=e(t(),1),v=()=>i({mutationFn:({secretToEdit:e,name:t,description:n,value:r})=>p.updateSecret(e,t,n,r)}),y=n();function b({mode:e,selectedSecret:t,onCancel:n}){let i=r(),{t:p}=a(`openhands`),{data:g}=m(),{mutate:b}=h(),{mutate:x}=v(),[S,C]=_.useState(null),[w,T]=_.useState(e===`edit`&&t?t:``),[E,D]=_.useState(``),[O,k]=_.useState(``),A=e===`edit`&&t&&g?.find(e=>e.name===t)?.description?.trim()||``,j=e===`edit`&&t?t:``;_.useEffect(()=>{T(e===`edit`&&t?t:``),D(``),k(A),C(null)},[e,t,A]);let M=()=>{i.invalidateQueries({queryKey:[`secrets-search`]}),i.invalidateQueries({queryKey:[`secrets`]})},N=(e,t,r)=>{b({name:e,value:t,description:r},{onSettled:n,onSuccess:M})},P=(e,t,r,i)=>{x({secretToEdit:e,name:t,description:r,value:i},{onSettled:n,onSuccess:M})},F=n=>{n.preventDefault();let r=w.trim(),i=E.trim(),a=O||void 0;if(r){if(C(null),g?.some(e=>e.name===r&&e.name!==t)){C(p(o.SECRETS$SECRET_ALREADY_EXISTS));return}if(e===`add`){if(!i){C(p(o.SECRETS$SECRET_VALUE_REQUIRED));return}N(r,i,a)}else e===`edit`&&t&&P(t,r,a,i||void 0)}},I=e===`add`?`add-secret-form`:`edit-secret-form`,L=e===`edit`&&(w.trim()!==j.trim()||O!==A||E.trim()!==``),R=e===`add`?!w.trim()||!E.trim():e===`edit`?!L:!1;return(0,y.jsxs)(`form`,{"data-testid":I,onSubmit:F,className:`flex flex-col items-start gap-6`,children:[(0,y.jsx)(f,{testId:`name-input`,name:`secret-name`,type:`text`,label:p(o.SETTINGS$NAME),className:`w-full min-w-0`,required:!0,value:w,onChange:T,placeholder:p(o.SECRETS$API_KEY_EXAMPLE),pattern:`^[a-zA-Z][a-zA-Z0-9_]{0,63}$`,title:p(o.SETTINGS$SECRET_NAME_PATTERN_TITLE)}),S&&(0,y.jsx)(`p`,{className:`text-red-500 text-sm`,children:S}),(0,y.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,y.jsx)(`span`,{className:`text-sm`,children:p(e===`add`?o.FORM$VALUE:o.SECRETS$SECRET_VALUE_LEAVE_BLANK)}),(0,y.jsx)(`textarea`,{"data-testid":`value-input`,name:`secret-value`,required:e===`add`,value:E,onChange:e=>D(e.currentTarget.value),className:s(`resize-none`,l,`placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)] disabled:cursor-not-allowed`),rows:8})]}),(0,y.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`text-sm`,children:p(o.FORM$DESCRIPTION)}),(0,y.jsx)(d,{})]}),(0,y.jsx)(`input`,{"data-testid":`description-input`,name:`secret-description`,value:O,onChange:e=>k(e.currentTarget.value),className:s(c,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)})]}),(0,y.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,y.jsx)(u,{testId:`cancel-button`,type:`button`,variant:`secondary`,onClick:n,children:p(o.BUTTON$CANCEL)}),(0,y.jsxs)(u,{testId:`submit-button`,type:`submit`,variant:`primary`,isDisabled:R,children:[e===`add`&&p(o.SECRETS$ADD_SECRET),e===`edit`&&p(o.SECRETS$EDIT_SECRET)]})]})]})}export{g as n,b as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-Cyuzqnbw.js";import{$ as t}from"./active-backend-context-rZiLJRUc.js";import{c as n,n as r}from"./agent-server-client-options-BikiNwTa.js";import{f as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js";import{t as a}from"./proxy-CBgMd2zf.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=n().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 n().backend.kind===`cloud`?o(()=>l()):(await o(()=>new i(r()).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,t,a){if(n().backend.kind===`cloud`){await u({name:e,value:t,description:a});return}await o(()=>new i(r()).upsertSecret({name:e,value:t,description:a}))}static async updateSecret(e,t,a,s){if(n().backend.kind===`cloud`){await u({name:t,value:s,description:a,previousName:e});return}let c=new i(r()),l=s??await o(()=>c.getSecret(e));await o(()=>c.upsertSecret({name:t,value:l,description:a})),t!==e&&await this.deleteSecret(e)}static async deleteSecret(e){try{if(n().backend.kind===`cloud`){await o(()=>d(e));return}await o(()=>new i(r()).deleteSecret(e))}catch(e){if(t(e,404)||e&&typeof e==`object`&&`response`in e&&e.response?.status===404)return;throw e}}};export{f as n,m as t};
1
+ import{r as e}from"./rolldown-runtime-Cyuzqnbw.js";import{$ as t}from"./active-backend-context-BsLfwrXB.js";import{c as n,n as r}from"./agent-server-client-options-EHB23gyx.js";import{f as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js";import{t as a}from"./proxy-DbEf3Nqr.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=n().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 n().backend.kind===`cloud`?o(()=>l()):(await o(()=>new i(r()).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,t,a){if(n().backend.kind===`cloud`){await u({name:e,value:t,description:a});return}await o(()=>new i(r()).upsertSecret({name:e,value:t,description:a}))}static async updateSecret(e,t,a,s){if(n().backend.kind===`cloud`){await u({name:t,value:s,description:a,previousName:e});return}let c=new i(r()),l=s??await o(()=>c.getSecret(e));await o(()=>c.upsertSecret({name:t,value:l,description:a})),t!==e&&await this.deleteSecret(e)}static async deleteSecret(e){try{if(n().backend.kind===`cloud`){await o(()=>d(e));return}await o(()=>new i(r()).deleteSecret(e))}catch(e){if(t(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~i58xkef6-cHFhpUBq.js";import{f as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{t as a}from"./useTranslation-CCgUjPJF.js";import{K as o,t as s}from"./utils-D-gOfhmN.js";import{t as c}from"./back-nav-button-DWNiN277.js";import{t as l}from"./pencil-q-ihqDYv.js";import{t as u}from"./trash-2-Bb40zQzs.js";import{t as d}from"./loading-spinner-DK1sAwVg.js";import{t as f}from"./brand-button-mQq2Ld1I.js";import{t as p}from"./confirmation-modal-BmVt_c0I.js";import{r as m}from"./typography-NarNyelM.js";import"./extension-module-card-classes-DpeaYhYo.js";import{a as h,c as g,i as _,l as v,o as y,r as b,s as x}from"./settings-list-classes-CaUfKZ33.js";import{t as S}from"./use-get-secrets-fqS0kxt6.js";import{n as C,t as w}from"./secret-form-WXXNFqTM.js";var T=e(t(),1),E=n();function D(){return(0,E.jsxs)(`div`,{className:s(_,`justify-between border-t border-[var(--oh-border)] first:border-t-0`),children:[(0,E.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-4`,children:[(0,E.jsx)(`span`,{className:`skeleton h-4 w-1/4`}),(0,E.jsx)(`span`,{className:`skeleton h-4 w-1/2`})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,E.jsx)(`span`,{className:`skeleton h-4 w-4`}),(0,E.jsx)(`span`,{className:`skeleton h-4 w-4`})]})]})}function O({title:e,description:t,onEdit:n,onDelete:r}){return(0,E.jsxs)(`tr`,{"data-testid":`secret-item`,className:v,children:[(0,E.jsx)(`td`,{className:s(y,`text-content-2 truncate`),title:e,children:e}),(0,E.jsx)(`td`,{className:s(y,`truncate text-content-2 opacity-80`),title:t||``,children:t||``}),(0,E.jsx)(`td`,{className:y,children:(0,E.jsxs)(`div`,{className:`flex items-center justify-end gap-0.5`,children:[(0,E.jsx)(`button`,{"data-testid":`edit-secret-button`,type:`button`,onClick:n,"aria-label":`Edit ${e}`,className:b,children:(0,E.jsx)(l,{"aria-hidden":!0,className:`size-4`,strokeWidth:2})}),(0,E.jsx)(`button`,{"data-testid":`delete-secret-button`,type:`button`,onClick:r,"aria-label":`Delete ${e}`,className:b,children:(0,E.jsx)(u,{"aria-hidden":!0,className:`size-4`,strokeWidth:2})})]})})]})}var k={hideTitle:!0};function A(){let e=i(),{t}=a(`openhands`),n=(0,T.useRef)(null),{data:r,isLoading:l,hasNextPage:u,isFetchingNextPage:_,onLoadMore:v}=S(),{mutate:y}=C(),[b,k]=T.useState(`list`),[A,j]=T.useState(null),[M,N]=T.useState(!1),P=(0,T.useCallback)(e=>{let t=e.currentTarget;t.scrollHeight-t.scrollTop<=t.clientHeight+100&&u&&!_&&v()},[u,_,v]),F=()=>{e.invalidateQueries({queryKey:[`secrets-search`]}),e.invalidateQueries({queryKey:[`secrets`]})},I=e=>{y(e,{onSettled:()=>{N(!1)},onSuccess:F,onError:F})},L=()=>{A&&I(A)},R=()=>{N(!1)},z=()=>{k(`list`),j(null)},B=b===`add-secret-form`||b===`edit-secret-form`,V=t(b===`add-secret-form`?o.SECRETS$ADD_A_SECRET:o.SECRETS$EDIT_A_SECRET);return(0,E.jsxs)(`div`,{"data-testid":`secrets-settings-screen`,className:`flex flex-col gap-6`,children:[b===`list`?(0,E.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,E.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,E.jsx)(m.H2,{children:t(o.SETTINGS$NAV_SECRETS)}),(0,E.jsx)(`p`,{"data-testid":`settings-page-subtitle`,className:`text-sm leading-5 text-tertiary-light`,children:t(o.SETTINGS$PAGE_SECRETS_SUBLINE)})]}),(0,E.jsx)(f,{testId:`add-secret-button`,type:`button`,variant:`primary`,className:`shrink-0 whitespace-nowrap`,onClick:()=>k(`add-secret-form`),isDisabled:l,children:t(o.SECRETS$ADD_NEW_SECRET)})]}):null,B?(0,E.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,E.jsx)(c,{testId:`back-to-secrets`,onClick:z,children:t(o.BUTTON$BACK)}),(0,E.jsx)(m.H2,{testId:`secret-editor-title`,children:V})]}):null,l&&b===`list`&&(0,E.jsxs)(`ul`,{children:[(0,E.jsx)(D,{}),(0,E.jsx)(D,{}),(0,E.jsx)(D,{})]}),b===`list`&&!l&&r?.length===0&&(0,E.jsx)(`div`,{"data-testid":`secrets-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,E.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:t(o.SECRETS$EMPTY)})}),b===`list`&&!l&&(r?.length??0)>0&&(0,E.jsxs)(`div`,{ref:n,className:h,onScroll:P,children:[(0,E.jsxs)(`table`,{className:`w-full min-w-full table-fixed`,children:[(0,E.jsx)(`thead`,{className:x,children:(0,E.jsxs)(`tr`,{children:[(0,E.jsx)(`th`,{className:s(g,`w-1/4`),children:t(o.SETTINGS$NAME)}),(0,E.jsx)(`th`,{className:s(g,`w-1/2`),children:t(o.SECRETS$DESCRIPTION)}),(0,E.jsx)(`th`,{className:s(g,`w-1/4 text-right`),children:t(o.SETTINGS$ACTIONS)})]})}),(0,E.jsx)(`tbody`,{children:r?.map(e=>(0,E.jsx)(O,{title:e.name,description:e.description,onEdit:()=>{k(`edit-secret-form`),j(e.name)},onDelete:()=>{N(!0),j(e.name)}},e.name))})]}),_&&(0,E.jsx)(`div`,{className:`flex justify-center p-4`,children:(0,E.jsx)(d,{size:`small`})})]}),(b===`add-secret-form`||b===`edit-secret-form`)&&(0,E.jsx)(w,{mode:b===`add-secret-form`?`add`:`edit`,selectedSecret:A,onCancel:z}),M&&(0,E.jsx)(p,{text:t(o.SECRETS$CONFIRM_DELETE_KEY),onConfirm:L,onCancel:R})]})}var j=r(A);export{j as default,k as handle};
@@ -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{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~i58xkef6-cHFhpUBq.js";import{t as c}from"./useTranslation-CCgUjPJF.js";import{B as l,M as u,it as d}from"./active-backend-context-BsLfwrXB.js";import{K as f,t as p}from"./utils-D-gOfhmN.js";import{n as m}from"./settings-nav-DFb3hBMr.js";import{i as h,n as g,r as _,t as v}from"./use-settings-nav-items-DSKwLDnd.js";import{n as y}from"./use-config-3WYcJsgC.js";import"./navigation-link-Bxo3-4vo.js";import"./sidebar-layout-B6mcvvdV.js";import{t as b}from"./sidebar-nav-link-BTHX11LG.js";import"./close-ScPlnwyq.js";import{n as x,r as S}from"./settings-utils-BTaaRhLZ.js";import{r as C}from"./typography-NarNyelM.js";import{t as w}from"./settings-section-header-context-BOJ_Fbak.js";import"./settings-gear-DaJj6Pde.js";import{t as T}from"./use-breakpoint-DWtihr9g.js";import{t as E}from"./backend-synced-settings-badge-Br85iWIY.js";import{t as D}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";var O=e(t(),1),k=n();function A({navigationItems:e}){let{t}=c(`openhands`),n=e.filter(e=>e.type===`item`);return(0,k.jsxs)(`aside`,{"data-testid":`settings-navbar-desktop`,className:p(`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,k.jsx)(C.Text,{className:`px-2 text-sm font-normal text-white`,children:t(f.SETTINGS$TITLE)}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:[n.map(e=>(0,k.jsx)(b,{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,k.jsx)(g,{}),(0,k.jsx)(_,{})]}),(0,k.jsx)(`div`,{className:`flex flex-col gap-2 px-2 pt-3`,children:(0,k.jsx)(h,{})}),(0,k.jsx)(`div`,{className:`px-2 pt-3`,children:(0,k.jsx)(E,{})})]})}function j({children:e,navigationItems:t}){return(0,k.jsx)(`div`,{className:`flex h-full flex-col md:pt-8`,children:(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 gap-10 md:items-start`,children:[(0,k.jsx)(A,{navigationItems:t}),(0,k.jsx)(`main`,{className:D,children:(0,k.jsx)(`div`,{className:`mx-auto w-full min-w-0 max-w-[800px]`,children:e})})]})})}var M=async({request:e})=>{let{pathname:t}=new URL(e.url),n=(await d.fetchQuery({queryKey:l.WEB_CLIENT_CONFIG,queryFn:y.getConfig,...u}))?.feature_flags;if(S(t,n)){let e=x(n);if(e&&e!==t)return o(e)}return null};function N(){let{t:e}=c(`openhands`),t=r(),n=i(),a=v(),o=T(768),[l,u]=(0,O.useState)(!1),{currentSectionTitle:d,currentSectionSubtitle:f}=(0,O.useMemo)(()=>{let e=m.find(e=>e.to===t.pathname);if(e)return{currentSectionTitle:e.text,currentSectionSubtitle:e.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,h=o&&t.pathname===`/settings`;return(0,k.jsx)(`main`,{"data-testid":`settings-screen`,className:`min-h-0`,children:(0,k.jsx)(w,{setHideSectionHeader:u,children:(0,k.jsx)(j,{navigationItems:a,children:(0,k.jsxs)(`div`,{className:`flex flex-col gap-6 pb-8`,children:[!(p?.hideTitle===!0||h||l)&&(0,k.jsxs)(`header`,{className:`space-y-1`,children:[(0,k.jsx)(C.H2,{children:e(d)}),f?(0,k.jsx)(`p`,{"data-testid":`settings-page-subtitle`,className:`text-sm leading-5 text-tertiary-light`,children:e(f)}):null]}),(0,k.jsx)(s,{})]})})})})}var P=a(N);export{M as clientLoader,P as default};
@@ -0,0 +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"./useTranslation-CCgUjPJF.js";import{K as a,t as o}from"./utils-D-gOfhmN.js";import{f as s,g as c}from"./form-control-classes-lQfLxzH4.js";import{n as l}from"./settings-input-Cm4VxUon.js";e();var u=r();function d({className:e}){return(0,u.jsx)(`svg`,{"aria-hidden":!0,fill:`none`,focusable:`false`,height:`1em`,role:`presentation`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,viewBox:`0 0 24 24`,width:`1em`,className:e,children:(0,u.jsx)(`path`,{d:`m6 9 6 6 6-6`})})}var f=o(`inline-flex items-center justify-center shrink-0 rounded-none bg-transparent px-1 min-w-0 w-auto h-auto text-medium cursor-pointer outline-none`,c),p=o(f,`!rounded-none !bg-transparent data-[hover=true]:!bg-transparent`);function m({isOpen:e,className:t}){return(0,u.jsx)(d,{className:o(`shrink-0`,c,e&&`rotate-180`,t)})}function h({testId:e,label:r,wrapperClassName:c,name:d,items:f,placeholder:m,showOptionalTag:h,isDisabled:g,isLoading:_,defaultSelectedKey:v,selectedKey:y,isClearable:b,allowsCustomValue:x,required:S,onSelectionChange:C,onInputChange:w,defaultFilter:T,startContent:E,inputWrapperClassName:D,inputClassName:O}){let{t:k}=i(`openhands`);return(0,u.jsxs)(`label`,{className:o(`flex flex-col gap-2.5 w-full min-w-0`,c),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:d,"data-testid":e,name:d,defaultItems:f,defaultSelectedKey:v,selectedKey:y,onSelectionChange:C,onInputChange:w,isClearable:b,isDisabled:g||_,isLoading:_,placeholder:_?k(a.HOME$LOADING):m,allowsCustomValue:x,isRequired:S,className:`w-full`,classNames:{popoverContent:`bg-content1 rounded-xl`,selectorButton:p},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:o(s,D),input:O}},defaultFilter:T,startContent:E||null,children:e=>(0,u.jsx)(t,{children:e.label},e.key)})]})}export{p as a,f as i,d as n,m as r,h as t};
@@ -0,0 +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~i58xkef6-cHFhpUBq.js";import{t as r}from"./useTranslation-CCgUjPJF.js";import{K as i}from"./utils-D-gOfhmN.js";import{t as a}from"./settings-nav-DFb3hBMr.js";import{i as o,n as s,r as c,t as l}from"./use-settings-nav-items-DSKwLDnd.js";import{u}from"./agent-server-config-C_x8Otd9.js";import{t as d}from"./use-config-3WYcJsgC.js";import{t as f}from"./sidebar-nav-link-BTHX11LG.js";import{n as p}from"./settings-utils-BTaaRhLZ.js";import{r as m}from"./typography-NarNyelM.js";import{t as h}from"./use-breakpoint-DWtihr9g.js";import{t as g}from"./backend-synced-settings-badge-Br85iWIY.js";var _=e();function v({navigationItems:e}){let{t}=r(`openhands`),n=e.filter(e=>e.type===`item`);return(0,_.jsxs)(`div`,{"data-testid":`settings-mobile-hub`,className:`flex flex-col gap-4 px-4 py-2 md:hidden`,children:[(0,_.jsx)(m.H2,{children:t(i.SETTINGS$TITLE)}),(0,_.jsxs)(`nav`,{className:`flex flex-col gap-0.5`,children:[n.map(e=>(0,_.jsx)(f,{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,_.jsx)(s,{}),(0,_.jsx)(c,{})]}),(0,_.jsx)(o,{}),(0,_.jsx)(`div`,{className:`pt-1`,children:(0,_.jsx)(g,{})})]})}var y=t(function(){let e=h(768),t=l(),{data:r}=d();return e?(0,_.jsx)(v,{navigationItems:t}):(0,_.jsx)(n,{to:u()===null?p(r?.feature_flags)??`/settings/app`:a,replace:!0})});export{y as default};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./useTranslation-CCgUjPJF.js";import{K as i,t as a}from"./utils-D-gOfhmN.js";import{f as o}from"./form-control-classes-lQfLxzH4.js";var s=e(t(),1),c=n();function l(){let{t:e}=r(`openhands`);return(0,c.jsx)(`span`,{className:`text-xs text-tertiary-alt`,children:e(i.COMMON$OPTIONAL)})}var u=(0,s.forwardRef)(function({testId:e,name:t,label:n,type:r,defaultValue:i,value:s,placeholder:u,showOptionalTag:d,isDisabled:f,startContent:p,className:m,onChange:h,onKeyDown:g,required:_,min:v,max:y,step:b,pattern:x,title:S,labelClassName:C,ariaLabel:w,ariaDescribedBy:T,ariaInvalid:E,error:D,showRequiredTag:O,hint:k,onBlur:A,inputClassName:j},M){let N=D&&e?`${e}-error`:void 0;return(0,c.jsxs)(`label`,{className:a(`flex flex-col gap-2.5 w-full min-w-0`,m),children:[(0,c.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p,(0,c.jsx)(`span`,{className:a(`text-sm`,C),children:n}),O&&(0,c.jsx)(`span`,{className:`text-red-400 text-sm leading-none`,"aria-hidden":!0,children:`*`}),d&&(0,c.jsx)(l,{}),k&&(0,c.jsx)(`span`,{"data-testid":e?`${e}-hint`:void 0,className:`min-w-0 text-xs text-[var(--oh-muted)]`,children:k})]}),(0,c.jsx)(`input`,{ref:M,"data-testid":e,onChange:e=>h?.(e.target.value),onKeyDown:g,onBlur:A,name:t,disabled:f,type:r,defaultValue:i,value:s,placeholder:u,min:v,max:y,step:b,required:_,pattern:x,title:S,"aria-label":w,"aria-describedby":N??T,"aria-invalid":!!D||E,className:a(o,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`,D&&`border-red-500`,j)}),D&&(0,c.jsx)(`p`,{id:N,role:`alert`,"data-testid":e?`${e}-error`:void 0,className:`text-xs text-red-400 -mt-1`,children:D})]})});export{l as n,u as t};
@@ -1 +1 @@
1
- import{t as e}from"./utils-BOco8mxR.js";import{_ as t,d as n,i as r,m as i}from"./form-control-classes-B-z85REi.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-D-gOfhmN.js";import{_ as t,d as n,i as r,m as i}from"./form-control-classes-lQfLxzH4.js";var a=`h-12 min-h-12`,o=e(r,n,i,`overflow-hidden`),s=e(o,`overflow-auto max-h-[min(70vh,39rem)]`),c=`divide-y divide-[var(--oh-border)]`,l=`hover:bg-[var(--oh-interactive-hover-low)]`,u=e(a,`flex items-center px-3`,t,l),d=e(l,t,`border-t border-[var(--oh-border)] first:border-t-0`),f=e(i,`sticky top-0 z-10 border-b border-[var(--oh-border)]`),p=e(a,`px-3 text-left text-sm font-medium align-middle`),m=e(a,`px-3 text-sm align-middle min-w-0`),h=e(`inline-flex cursor-pointer items-center justify-center rounded-md p-1 text-muted`,t,`hover:bg-[var(--oh-interactive-hover-low)] hover:text-white`);export{s as a,p as c,u as i,d as l,c as n,m as o,h as r,f as s,o as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./useTranslation-CCgUjPJF.js";import{yt as i}from"./active-backend-context-BsLfwrXB.js";import{K as a,U as o,t as s}from"./utils-D-gOfhmN.js";import{i as c}from"./llm-settings-dkQ5Oq7W.js";import{t as l}from"./use-tracking-ChnSFChv.js";import{t as u}from"./settings-CKqk8ZnH.js";import{t as d}from"./use-save-settings-CikTu5xV.js";import{t as f}from"./modal-backdrop-BSzNhM4r.js";import{r as p,t as m}from"./modal-body-DBweM2EN.js";import{t as h}from"./base-modal-Ds7grR67.js";import{t as g}from"./modal-classes-jvG85nkU.js";import{t as _}from"./brand-button-mQq2Ld1I.js";import{n as v}from"./navigation-context-CQZwH_tC.js";import{t as y}from"./settings-input-Cm4VxUon.js";import{t as b}from"./settings-utils-BTaaRhLZ.js";import{b as x,s as S}from"./schema-field-c3Ncgm4x.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:s}=v(),{t:u}=r(`openhands`),p=C.useRef(null),[m,h]=C.useState(!1),g=async e=>{let r=b(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);s.startsWith(`/conversations/`)?h(!0):g(t)},O=e.llm_api_key_set,k=S(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:o.LABEL_CLASSNAME}),(0,w.jsx)(y,{testId:`llm-api-key-input`,name:`llm-api-key-input`,label:u(a.SETTINGS_FORM$API_KEY),type:`password`,className:`w-full`,placeholder:O?`<hidden>`:``,labelClassName:o.LABEL_CLASSNAME}),(0,w.jsx)(x,{testId:`llm-api-key-help-anchor`,text:u(a.SETTINGS$DONT_KNOW_API_KEY),linkText:u(a.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(a.BUTTON$SAVE)})})]}),m&&(0,w.jsx)(f,{children:(0,w.jsx)(T,{title:u(a.MODAL$END_SESSION_TITLE),description:u(a.MODAL$END_SESSION_MESSAGE),buttons:{danger:{text:u(a.BUTTON$END_SESSION),onClick:E},cancel:{text:u(a.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:s(`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(a.AI_SETTINGS$TITLE)}),(0,w.jsx)(x,{testId:`advanced-settings-link`,text:`${n(a.SETTINGS$DESCRIPTION)}. ${n(a.SETTINGS$FOR_OTHER_OPTIONS)} ${n(a.COMMON$SEE)}`,linkText:n(a.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};
@@ -0,0 +1,16 @@
1
+ import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{i as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as r}from"./key-CwTE6XJj.js";import{t as i}from"./u-robot-BvAOA2ZD.js";var a=n(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),o=n(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),s=n(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]);e();var c=t(),l=[{icon:(0,c.jsx)(i,{width:16,height:16}),to:`/settings/agents`,text:`SETTINGS$NAV_AGENT`,subtitle:`SETTINGS$PAGE_AGENT_PROFILES_SUBLINE`},{icon:(0,c.jsx)(e=>(0,c.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,c.jsx)(`path`,{d:`M10 13C9.80222 13 9.60888 13.0586 9.44443 13.1685C9.27998 13.2784 9.15181 13.4346 9.07612 13.6173C9.00043 13.8 8.98063 14.0011 9.01921 14.1951C9.0578 14.3891 9.15304 14.5673 9.29289 14.7071C9.43275 14.847 9.61093 14.9422 9.80491 14.9808C9.99889 15.0194 10.2 14.9996 10.3827 14.9239C10.5654 14.8482 10.7216 14.72 10.8315 14.5556C10.9414 14.3911 11 14.1978 11 14C11 13.7348 10.8946 13.4804 10.7071 13.2929C10.5196 13.1054 10.2652 13 10 13ZM10 9C9.80222 9 9.60888 9.05865 9.44443 9.16853C9.27998 9.27841 9.15181 9.43459 9.07612 9.61732C9.00043 9.80004 8.98063 10.0011 9.01921 10.1951C9.0578 10.3891 9.15304 10.5673 9.29289 10.7071C9.43275 10.847 9.61093 10.9422 9.80491 10.9808C9.99889 11.0194 10.2 10.9996 10.3827 10.9239C10.5654 10.8482 10.7216 10.72 10.8315 10.5556C10.9414 10.3911 11 10.1978 11 10C11 9.73478 10.8946 9.48043 10.7071 9.29289C10.5196 9.10536 10.2652 9 10 9ZM14 9C13.8022 9 13.6089 9.05865 13.4444 9.16853C13.28 9.27841 13.1518 9.43459 13.0761 9.61732C13.0004 9.80004 12.9806 10.0011 13.0192 10.1951C13.0578 10.3891 13.153 10.5673 13.2929 10.7071C13.4327 10.847 13.6109 10.9422 13.8049 10.9808C13.9989 11.0194 14.2 10.9996 14.3827 10.9239C14.5654 10.8482 14.7216 10.72 14.8315 10.5556C14.9414 10.3911 15 10.1978 15 10C15 9.73478 14.8946 9.48043 14.7071 9.29289C14.5196 9.10536 14.2652 9 14 9ZM21 13C21.2652 13 21.5196 12.8946 21.7071 12.7071C21.8946 12.5196 22 12.2652 22 12C22 11.7348 21.8946 11.4804 21.7071 11.2929C21.5196 11.1054 21.2652 11 21 11H19V9H21C21.2652 9 21.5196 8.89464 21.7071 8.70711C21.8946 8.51957 22 8.26522 22 8C22 7.73478 21.8946 7.48043 21.7071 7.29289C21.5196 7.10536 21.2652 7 21 7H18.82C18.6707 6.5806 18.4299 6.19969 18.1151 5.8849C17.8003 5.57011 17.4194 5.32932 17 5.18V3C17 2.73478 16.8946 2.48043 16.7071 2.29289C16.5196 2.10536 16.2652 2 16 2C15.7348 2 15.4804 2.10536 15.2929 2.29289C15.1054 2.48043 15 2.73478 15 3V5H13V3C13 2.73478 12.8946 2.48043 12.7071 2.29289C12.5196 2.10536 12.2652 2 12 2C11.7348 2 11.4804 2.10536 11.2929 2.29289C11.1054 2.48043 11 2.73478 11 3V5H9V3C9 2.73478 8.89464 2.48043 8.70711 2.29289C8.51957 2.10536 8.26522 2 8 2C7.73478 2 7.48043 2.10536 7.29289 2.29289C7.10536 2.48043 7 2.73478 7 3V5.18C6.5806 5.32932 6.19969 5.57011 5.8849 5.8849C5.57011 6.19969 5.32932 6.5806 5.18 7H3C2.73478 7 2.48043 7.10536 2.29289 7.29289C2.10536 7.48043 2 7.73478 2 8C2 8.26522 2.10536 8.51957 2.29289 8.70711C2.48043 8.89464 2.73478 9 3 9H5V11H3C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 12.2652 2.10536 12.5196 2.29289 12.7071C2.48043 12.8946 2.73478 13 3 13H5V15H3C2.73478 15 2.48043 15.1054 2.29289 15.2929C2.10536 15.4804 2 15.7348 2 16C2 16.2652 2.10536 16.5196 2.29289 16.7071C2.48043 16.8946 2.73478 17 3 17H5.18C5.32932 17.4194 5.57011 17.8003 5.8849 18.1151C6.19969 18.4299 6.5806 18.6707 7 18.82V21C7 21.2652 7.10536 21.5196 7.29289 21.7071C7.48043 21.8946 7.73478 22 8 22C8.26522 22 8.51957 21.8946 8.70711 21.7071C8.89464 21.5196 9 21.2652 9 21V19H11V21C11 21.2652 11.1054 21.5196 11.2929 21.7071C11.4804 21.8946 11.7348 22 12 22C12.2652 22 12.5196 21.8946 12.7071 21.7071C12.8946 21.5196 13 21.2652 13 21V19H15V21C15 21.2652 15.1054 21.5196 15.2929 21.7071C15.4804 21.8946 15.7348 22 16 22C16.2652 22 16.5196 21.8946 16.7071 21.7071C16.8946 21.5196 17 21.2652 17 21V18.82C17.4194 18.6707 17.8003 18.4299 18.1151 18.1151C18.4299 17.8003 18.6707 17.4194 18.82 17H21C21.2652 17 21.5196 16.8946 21.7071 16.7071C21.8946 16.5196 22 16.2652 22 16C22 15.7348 21.8946 15.4804 21.7071 15.2929C21.5196 15.1054 21.2652 15 21 15H19V13H21ZM17 16C17 16.2652 16.8946 16.5196 16.7071 16.7071C16.5196 16.8946 16.2652 17 16 17H8C7.73478 17 7.48043 16.8946 7.29289 16.7071C7.10536 16.5196 7 16.2652 7 16V8C7 7.73478 7.10536 7.48043 7.29289 7.29289C7.48043 7.10536 7.73478 7 8 7H16C16.2652 7 16.5196 7.10536 16.7071 7.29289C16.8946 7.48043 17 7.73478 17 8V16ZM14 13C13.8022 13 13.6089 13.0586 13.4444 13.1685C13.28 13.2784 13.1518 13.4346 13.0761 13.6173C13.0004 13.8 12.9806 14.0011 13.0192 14.1951C13.0578 14.3891 13.153 14.5673 13.2929 14.7071C13.4327 14.847 13.6109 14.9422 13.8049 14.9808C13.9989 15.0194 14.2 14.9996 14.3827 14.9239C14.5654 14.8482 14.7216 14.72 14.8315 14.5556C14.9414 14.3911 15 14.1978 15 14C15 13.7348 14.8946 13.4804 14.7071 13.2929C14.5196 13.1054 14.2652 13 14 13Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/llm`,text:`SETTINGS$NAV_LLM`,subtitle:`SETTINGS$PAGE_LLM_SUBLINE`},{icon:(0,c.jsx)(e=>(0,c.jsxs)(`svg`,{id:`Layer_1`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 22.3 18.66`,...e,children:[(0,c.jsx)(`defs`,{children:(0,c.jsx)(`style`,{children:`
2
+ .st0 {
3
+ stroke-miterlimit: 10;
4
+ }
5
+
6
+ .st0, .st1 {
7
+ fill: none;
8
+ stroke: currentColor;
9
+ stroke-linecap: round;
10
+ stroke-width: 2px;
11
+ }
12
+
13
+ .st1 {
14
+ stroke-linejoin: round;
15
+ }
16
+ `})}),(0,c.jsx)(`path`,{className:`st1`,d:`M15.15,12.54h3.26c1.58,0,2.93-1.29,2.9-2.88-.03-1.53-1.28-2.77-2.82-2.77-.04,0-.08,0-.11,0,.13-.44.16-.92.04-1.43-.27-1.17-1.27-2.05-2.46-2.17-.74-.07-1.43.14-1.97.55,0,0,0-.02,0-.03,0-1.56-1.26-2.82-2.82-2.82s-2.82,1.26-2.82,2.82c0,0,0,.02,0,.03-.54-.4-1.23-.62-1.97-.55-1.19.12-2.19,1-2.46,2.17-.12.5-.09.99.04,1.43-.04,0-.08,0-.11,0-1.56,0-2.82,1.26-2.82,2.82s1.26,2.82,2.82,2.82l1.29.03c.41,0,.74.34.74.75v1.85c0,1.38,1.12,2.5,2.5,2.5h.29c1.44,0,2.6-1.17,2.6-2.6V6.49`}),(0,c.jsx)(`polyline`,{className:`st0`,points:`7.97 9.74 11.22 6.49 14.47 9.74`})]}),{width:16,height:16}),to:`/settings/condenser`,text:`SETTINGS$NAV_CONDENSER`,subtitle:`SETTINGS$PAGE_CONDENSER_SUBLINE`},{icon:(0,c.jsx)(o,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}),to:`/settings/agent-context`,text:`SETTINGS$NAV_AGENT_CONTEXT`,subtitle:`SETTINGS$PAGE_AGENT_CONTEXT_SUBLINE`},{icon:(0,c.jsx)(s,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}),to:`/settings/verification`,text:`SETTINGS$NAV_VERIFICATION`,subtitle:`SETTINGS$PAGE_VERIFICATION_SUBLINE`},{icon:(0,c.jsx)(a,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}),to:`/settings/app`,text:`SETTINGS$NAV_APPLICATION`,subtitle:`SETTINGS$PAGE_APPLICATION_SUBLINE`},{icon:(0,c.jsx)(r,{width:16,height:16}),to:`/settings/secrets`,text:`SETTINGS$NAV_SECRETS`,subtitle:`SETTINGS$PAGE_SECRETS_SUBLINE`}],u=`/settings/app`;export{l as n,u as t};
@@ -1 +1 @@
1
- import{c as e,n as t}from"./agent-server-client-options-BikiNwTa.js";import{f as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js";import{t as r}from"./proxy-CBgMd2zf.js";import{t as i}from"./settings-CKqk8ZnH.js";var a=[`none`,`api_key`,`bearer`,`basic`,`header`,`oauth2`],o=e=>!!e&&typeof e==`object`&&!Array.isArray(e),s=e=>o(e)&&typeof e.strategy==`string`&&a.includes(e.strategy),c=/^[a-zA-Z0-9_-]+$/;function l(e){return c.test(e)}function u(e,t=`mcp`){return e.trim().replace(/[^a-zA-Z0-9_-]+/g,`_`).replace(/_+/g,`_`).replace(/^_+|_+$/g,``)||t}var d=`**********`,f=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function p(e){if(!f(e))return null;let t=e.mcpServers;return f(t)&&!(`url`in t)&&!(`command`in t)?t:e}function m(e){if(!f(e))return;let t=Object.entries(e).filter(e=>typeof e[1]==`string`);return t.length>0?Object.fromEntries(t):void 0}function h(e){return e===`**********`?!0:Array.isArray(e)?e.some(h):f(e)?Object.values(e).some(h):!1}var g=e=>e.enabled===!1?!1:void 0,_=e=>{if(e===`stdio`||e===`sse`||e===`streamable-http`)return e;if(e===`http`||e===`shttp`||e===void 0)return`http`};function v(e){let t=p(e);if(!t)return{};let n={};for(let[e,r]of Object.entries(t)){if(!f(r))continue;if(typeof r.command==`string`){n[e]={transport:`stdio`,command:r.command,...Array.isArray(r.args)&&r.args.every(e=>typeof e==`string`)&&{args:r.args},...m(r.env)&&{env:m(r.env)},...typeof r.cwd==`string`&&{cwd:r.cwd},...typeof r.description==`string`&&{description:r.description},...typeof r.icon==`string`&&{icon:r.icon},...typeof r.timeout==`number`&&{timeout:r.timeout},...r.enabled===!1&&{enabled:!1}};continue}if(typeof r.url!=`string`)continue;let t=_(r.transport);!t||t===`stdio`||(n[e]={transport:t,url:r.url,...m(r.headers)&&{headers:m(r.headers)},...s(r.auth)&&{auth:r.auth},...typeof r.description==`string`&&{description:r.description},...typeof r.icon==`string`&&{icon:r.icon},...typeof r.timeout==`number`&&{timeout:r.timeout},...typeof r.sse_read_timeout==`number`&&{sse_read_timeout:r.sse_read_timeout},...typeof r.keep_alive==`boolean`&&{keep_alive:r.keep_alive},...r.enabled===!1&&{enabled:!1}})}return n}function ee(e){return e.type===`stdio`?{transport:`stdio`,command:e.command,...e.args?.length?{args:e.args}:{},...e.env&&Object.keys(e.env).length>0?{env:e.env}:{},...e.enabled===!1&&{enabled:!1}}:{transport:e.type===`sse`?`sse`:`http`,url:e.url,...e.headers&&Object.keys(e.headers).length>0?{headers:e.headers}:{},...e.auth?{auth:e.auth}:{},...e.type===`shttp`&&e.timeout!==void 0?{timeout:e.timeout}:{},...e.enabled===!1&&{enabled:!1}}}var te=(e,t)=>t.enabled===!1?{enabled:!1}:g(e)===!1?{enabled:!0}:{},y=(e,t)=>{if(!t)return e?null:void 0;let n={};for(let[e,r]of Object.entries(t))r!==`**********`&&(n[e]=r);for(let r of Object.keys(e??{}))r in t||(n[r]=null);return Object.keys(n).length>0?n:void 0},b=[`client_auth_method`,`scopes`,`client_id`,`client_secret`],x=(e,t)=>{if(t===`**********`||t===void 0)return;if(t===null)return null;if(Array.isArray(t))return h(t)||JSON.stringify(e)===JSON.stringify(t)?void 0:t;if(!f(t))return Object.is(e,t)?void 0:t;let n=f(e)?e:{},r={};for(let[e,i]of Object.entries(t)){let t=x(n[e],i);t!==void 0&&(r[e]=t)}return Object.keys(r).length>0?r:void 0},S=(e,t)=>{if(t===void 0)return;if(t===null)return null;let n=x(e,t),r=f(n)?{...n}:{},i=f(e)?e:{};for(let e of b)e in i&&!(e in t)&&(r[e]=null);if(Object.keys(r).length!==0)return{type:`oauth`,...r}},C=(e,t)=>{if(!e||e.strategy===t.strategy)return t;let n={...t};for(let t of Object.keys(e))t!==`strategy`&&!(t in n)&&(n[t]=null);return n},w=`Removing an individual header from header authentication is not supported yet. Replace the credential or clear authentication, then re-enter the headers you want to keep.`,T=(e,t)=>{let n=y(e?.strategy===`header`?e.headers:void 0,t.headers);if(n){if(Object.values(n).some(e=>e===null))throw Error(w);return{strategy:`header`,headers:n}}},E=(e,t)=>{let n=e?.strategy===`oauth2`?e:void 0,r=S(n?.authentication,t.authentication),i=x(n?.state,t.state);if(!(n&&r===void 0&&i===void 0))return C(e,{strategy:`oauth2`,...r!==void 0&&{authentication:r},...i!==void 0&&{state:i}})};function D(e,t){let n=te(e,t);if(t.type===`stdio`){let r=y(e.transport===`stdio`?e.env:void 0,t.env);return{transport:`stdio`,command:t.command,...t.args?.length?{args:t.args}:e.transport===`stdio`&&e.args?{args:null}:{},...r===void 0?{}:{env:r},...n}}let r=e.transport===`stdio`?void 0:e,i={transport:t.type===`sse`?`sse`:`http`,url:t.url,...n};if(t.type===`shttp`&&(t.timeout===void 0?r?.timeout!==void 0&&(i.timeout=null):i.timeout=t.timeout),t.auth)if(t.auth.strategy===`oauth2`){let e=E(r?.auth,t.auth);e!==void 0&&(i.auth=e)}else if(t.auth.strategy===`header`&&r?.auth?.strategy===`header`){let e=T(r.auth,t.auth);e!==void 0&&(i.auth=e)}else h(t.auth)||(i.auth=C(r?.auth,t.auth));else r?.auth&&(i.auth=null);return i}var O=(e,t)=>{let n=(e,t)=>{let r=f(e)?{...e}:{};if(!f(t))return r;for(let[e,i]of Object.entries(t))i===null?delete r[e]:f(i)?r[e]=n(r[e],i):r[e]=i;return r};return n(e,t)},k=`Replace or clear the stored credential before renaming this MCP server.`;function ne(e,t,n,r){if(h(n.transport===`stdio`?n.env:{auth:n.auth,headers:n.headers}))throw Error(k);let i=O(n,D(n,r));return{[e]:null,[t]:i}}function re(e,t,n){let r=u(t||n);if(!(r in e))return r;let i=1;for(;`${r}_${i}`in e;)i+=1;return`${r}_${i}`}function A(){let t=e().backend;if(t.kind!==`cloud`)throw Error(`Cloud settings call requires a cloud backend.`);return t}function j(e){if(e.agent_settings&&Object.keys(e.agent_settings).length>0)return e.agent_settings;let t={},n={};typeof e.llm_model==`string`&&(n.model=e.llm_model),typeof e.llm_base_url==`string`&&(n.base_url=e.llm_base_url),typeof e.llm_api_key==`string`&&(n.api_key=e.llm_api_key),Object.keys(n).length>0&&(t.llm=n);let r={};return typeof e.enable_default_condenser==`boolean`&&(r.enabled=e.enable_default_condenser),typeof e.condenser_max_size==`number`&&(r.max_size=e.condenser_max_size),Object.keys(r).length>0&&(t.condenser=r),typeof e.agent==`string`&&(t.agent=e.agent),e.mcp_config&&Object.keys(e.mcp_config).length>0&&(t.mcp_config=e.mcp_config),t}function M(e){if(e.conversation_settings&&Object.keys(e.conversation_settings).length>0)return e.conversation_settings;let t={};return typeof e.confirmation_mode==`boolean`&&(t.confirmation_mode=e.confirmation_mode),(typeof e.security_analyzer==`string`||e.security_analyzer===null)&&(t.security_analyzer=e.security_analyzer),typeof e.max_iterations==`number`&&(t.max_iterations=e.max_iterations),t}async function N(){let e=await r({backend:A(),method:`GET`,path:`/api/v1/settings`});return{...e,agent_settings:j(e),conversation_settings:M(e),llm_api_key_set:!!e.llm_api_key_set,search_api_key_set:!!e.search_api_key_set,provider_tokens_set:e.provider_tokens_set}}async function P(e){let t=A(),n={};if(e.agent_settings_diff){let t={...e.agent_settings_diff};t.agent_context===null&&delete t.agent_context,Object.keys(t).length>0&&(n.agent_settings_diff=t)}if(e.conversation_settings_diff&&Object.keys(e.conversation_settings_diff).length>0&&(n.conversation_settings_diff=e.conversation_settings_diff),e.app_preferences)for(let[t,r]of Object.entries(e.app_preferences))r!==void 0&&(n[t]=r);await r({backend:t,method:`POST`,path:`/api/v1/settings`,body:n})}async function F(){return r({backend:A(),method:`GET`,path:`/api/v1/settings/agent-schema`})}async function I(){return r({backend:A(),method:`GET`,path:`/api/v1/settings/conversation-schema`})}var L=[`language`,`user_consents_to_analytics`,`enable_sound_notifications`,`git_user_name`,`git_user_email`,`title_llm_profile`,`disabled_skills`,`enabled_skills`],R=new Set(L),z=e=>R.has(e),B=e=>{let t={},n={};for(let[r,i]of Object.entries(e))z(r)?t[r]=i:n[r]=i;return{extracted:t,rest:n}},V=e=>JSON.parse(JSON.stringify(e)),H=(e,t)=>({...e??{},...t??{}});async function U(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 W={redacted:null,encrypted:null,timestamp:0},G=300*1e3,K=()=>Date.now()-W.timestamp<G,q=()=>{W={redacted:null,encrypted:null,timestamp:0}},J=e=>!!e&&typeof e==`object`&&!Array.isArray(e),Y=(e,t)=>`Basic ${btoa(`${e}:${t}`)}`,ie=e=>{switch(e.strategy){case`none`:return{};case`api_key`:{if(typeof e.value!=`string`||!e.value)return null;let t=typeof e.header_name==`string`&&e.header_name?e.header_name:`Authorization`,n=t===`Authorization`?`Bearer ${e.value}`:e.value;return{[t]:n}}case`bearer`:return typeof e.value!=`string`||!e.value?null:{Authorization:`Bearer ${e.value}`};case`basic`:return typeof e.username!=`string`||typeof e.password!=`string`?null:{Authorization:Y(e.username,e.password)};case`header`:return m(e.headers)??{};case`oauth2`:{let t=J(e.state)?e.state.tokens:void 0;return!J(t)||typeof t.access_token!=`string`?null:{Authorization:`Bearer ${t.access_token}`}}default:return null}},X=async t=>{if(!J(t))return t;let n=J(t.mcpServers),r=n?t.mcpServers:t,i=Object.values(r).some(e=>J(e)&&J(e.auth)&&e.auth!==null)&&e().backend.kind===`cloud`,a=new Map;if(i)try{let e=await N(),t=J(e.mcp_config)?e.mcp_config:{};for(let[e,n]of Object.entries(t))if(J(n)){let t=m(n.headers);t&&a.set(e,t)}}catch{}let o=Object.fromEntries(Object.entries(r).map(([e,t])=>{if(!J(t))return[e,t];if(t.auth===null){let n={...t,headers:null};return delete n.auth,[e,n]}if(!J(t.auth))return[e,t];let n=ie(t.auth);if(n===null)return[e,t];let r={...t},i={...m(t.headers)??{},...n},o=a.get(e);if(o)for(let e of Object.keys(o))e in i||(i[e]=null);return delete r.auth,Object.keys(i).length>0?r.headers=i:delete r.headers,[e,r]}));return n?{...t,mcpServers:o}:o},Z=e=>{let t=e.misc_settings?.app_preferences,n=t?.disabled_skills,r=t?.enabled_skills;return{disabledSkills:Array.isArray(n)?n:[],enabledSkills:Array.isArray(r)?r:void 0}},Q=e=>{let t={agent_settings:e.agent_settings??{},conversation_settings:e.conversation_settings??{},llm_api_key_set:e.llm_api_key_is_set},n=e.misc_settings?.app_preferences;if(n)for(let e of L){let r=n[e];r!==void 0&&(t[e]=r)}return t},$=e=>{let t=H(i.agent_settings??{},e.agent_settings??{}),n=H(i.conversation_settings??{},e.conversation_settings??{}),r={...V(i),...e,provider_tokens_set:{...i.provider_tokens_set??{},...e.provider_tokens_set??{}},agent_settings:t,conversation_settings:n},a=t.llm,o=t.condenser;return typeof t.agent==`string`&&(r.agent=t.agent),typeof a?.model==`string`&&a.model.length>0&&(r.llm_model=a.model),typeof a?.base_url==`string`&&(r.llm_base_url=a.base_url),typeof o?.enabled==`boolean`&&(r.enable_default_condenser=o.enabled),typeof o?.max_size==`number`&&(r.condenser_max_size=o.max_size),typeof n.confirmation_mode==`boolean`&&(r.confirmation_mode=n.confirmation_mode),(typeof n.security_analyzer==`string`||n.security_analyzer===null)&&(r.security_analyzer=n.security_analyzer),typeof n.max_iterations==`number`&&(r.max_iterations=n.max_iterations),r.search_api_key_set=!!r.search_api_key,r},ae=class r{static async fetchSettingsFromApi(e){return U(()=>new n(t()).getSettings({exposeSecrets:e}))}static async getSettings(){if(e().backend.kind===`cloud`)try{return $(await U(()=>N()))}catch(e){return console.warn(`Failed to fetch cloud settings, using defaults:`,e),$({})}if(K()&&W.redacted)return $(Q(W.redacted));try{let e=await this.fetchSettingsFromApi();return W.redacted=e,W.timestamp=Date.now(),$(Q(e))}catch(e){return console.warn(`Failed to fetch settings from API, using defaults:`,e),$({})}}static async getSettingsForConversation(){if(K()&&W.encrypted)return{agentSettings:W.encrypted.agent_settings,conversationSettings:W.encrypted.conversation_settings,secretsEncrypted:!0,skillEnablement:Z(W.encrypted)};let e=await this.fetchSettingsFromApi(`encrypted`);return W.encrypted=e,W.timestamp||=Date.now(),{agentSettings:e.agent_settings,conversationSettings:e.conversation_settings,secretsEncrypted:!0,skillEnablement:Z(e)}}static async getSettingsSchema(){return e().backend.kind===`cloud`?await F():await new n(t()).getAgentSchema()}static async getConversationSettingsSchema(){return e().backend.kind===`cloud`?await I():await new n(t()).getConversationSchema()}static async patchMcpConfig(r){if(e().backend.kind===`cloud`){let e=await X(r);await U(()=>P({agent_settings_diff:{mcp_config:e}}))}else await U(()=>new n(t()).updateSettings({agent_settings_diff:{mcp_config:r}}));return q(),!0}static async patchMcpServer(i,a){return e().backend.kind===`cloud`?r.patchMcpConfig({[i]:a}):(await U(()=>new n(t()).patchMcpServer(i,a)),q(),!0)}static async createMcpServer(i,a){return e().backend.kind===`cloud`?r.patchMcpConfig({[i]:a}):(await U(()=>new n(t()).createMcpServer(i,a)),q(),!0)}static async deleteMcpServer(i){return e().backend.kind===`cloud`?r.patchMcpConfig({[i]:null}):(await U(()=>new n(t()).deleteMcpServer(i)),q(),!0)}static async saveSettings(r){let{extracted:i,rest:a}=B(r),o=Object.keys(i).length>0,s={},c=a.agent_settings_diff;c&&Object.keys(c).length>0&&(s.agent_settings_diff=c);let l=a.conversation_settings_diff;if(l&&Object.keys(l).length>0&&(s.conversation_settings_diff=l),o&&(s.misc_settings_diff={app_preferences:i}),e().backend.kind===`cloud`){if(!(s.agent_settings_diff||s.conversation_settings_diff||o))return!0;let e={};s.agent_settings_diff&&(e.agent_settings_diff={...s.agent_settings_diff},`mcp_config`in e.agent_settings_diff&&(e.agent_settings_diff.mcp_config=await X(e.agent_settings_diff.mcp_config))),s.conversation_settings_diff&&(e.conversation_settings_diff=s.conversation_settings_diff),o&&(e.app_preferences=i),await U(()=>P(e))}else{if(!(s.agent_settings_diff||s.conversation_settings_diff||s.misc_settings_diff))return!0;await U(()=>new n(t()).updateSettings(s))}return q(),!0}static invalidateCache(){q()}};export{D as a,h as c,c as d,l as f,re as i,v as l,s as m,k as n,ne as o,u as p,d as r,g as s,ae as t,ee as u};
1
+ import{c as e,n as t}from"./agent-server-client-options-EHB23gyx.js";import{f as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js";import{t as r}from"./proxy-DbEf3Nqr.js";import{t as i}from"./settings-CKqk8ZnH.js";var a=[`none`,`api_key`,`bearer`,`basic`,`header`,`oauth2`],o=e=>!!e&&typeof e==`object`&&!Array.isArray(e),s=e=>o(e)&&typeof e.strategy==`string`&&a.includes(e.strategy),c=/^[a-zA-Z0-9_-]+$/;function l(e){return c.test(e)}function u(e,t=`mcp`){return e.trim().replace(/[^a-zA-Z0-9_-]+/g,`_`).replace(/_+/g,`_`).replace(/^_+|_+$/g,``)||t}var d=`**********`,f=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function p(e){if(!f(e))return null;let t=e.mcpServers;return f(t)&&!(`url`in t)&&!(`command`in t)?t:e}function m(e){if(!f(e))return;let t=Object.entries(e).filter(e=>typeof e[1]==`string`);return t.length>0?Object.fromEntries(t):void 0}function h(e){return e===`**********`?!0:Array.isArray(e)?e.some(h):f(e)?Object.values(e).some(h):!1}var g=e=>e.enabled===!1?!1:void 0,_=e=>{if(e===`stdio`||e===`sse`||e===`streamable-http`)return e;if(e===`http`||e===`shttp`||e===void 0)return`http`};function v(e){let t=p(e);if(!t)return{};let n={};for(let[e,r]of Object.entries(t)){if(!f(r))continue;if(typeof r.command==`string`){n[e]={transport:`stdio`,command:r.command,...Array.isArray(r.args)&&r.args.every(e=>typeof e==`string`)&&{args:r.args},...m(r.env)&&{env:m(r.env)},...typeof r.cwd==`string`&&{cwd:r.cwd},...typeof r.description==`string`&&{description:r.description},...typeof r.icon==`string`&&{icon:r.icon},...typeof r.timeout==`number`&&{timeout:r.timeout},...r.enabled===!1&&{enabled:!1}};continue}if(typeof r.url!=`string`)continue;let t=_(r.transport);!t||t===`stdio`||(n[e]={transport:t,url:r.url,...m(r.headers)&&{headers:m(r.headers)},...s(r.auth)&&{auth:r.auth},...typeof r.description==`string`&&{description:r.description},...typeof r.icon==`string`&&{icon:r.icon},...typeof r.timeout==`number`&&{timeout:r.timeout},...typeof r.sse_read_timeout==`number`&&{sse_read_timeout:r.sse_read_timeout},...typeof r.keep_alive==`boolean`&&{keep_alive:r.keep_alive},...r.enabled===!1&&{enabled:!1}})}return n}function ee(e){return e.type===`stdio`?{transport:`stdio`,command:e.command,...e.args?.length?{args:e.args}:{},...e.env&&Object.keys(e.env).length>0?{env:e.env}:{},...e.enabled===!1&&{enabled:!1}}:{transport:e.type===`sse`?`sse`:`http`,url:e.url,...e.headers&&Object.keys(e.headers).length>0?{headers:e.headers}:{},...e.auth?{auth:e.auth}:{},...e.type===`shttp`&&e.timeout!==void 0?{timeout:e.timeout}:{},...e.enabled===!1&&{enabled:!1}}}var te=(e,t)=>t.enabled===!1?{enabled:!1}:g(e)===!1?{enabled:!0}:{},y=(e,t)=>{if(!t)return e?null:void 0;let n={};for(let[e,r]of Object.entries(t))r!==`**********`&&(n[e]=r);for(let r of Object.keys(e??{}))r in t||(n[r]=null);return Object.keys(n).length>0?n:void 0},b=[`client_auth_method`,`scopes`,`client_id`,`client_secret`],x=(e,t)=>{if(t===`**********`||t===void 0)return;if(t===null)return null;if(Array.isArray(t))return h(t)||JSON.stringify(e)===JSON.stringify(t)?void 0:t;if(!f(t))return Object.is(e,t)?void 0:t;let n=f(e)?e:{},r={};for(let[e,i]of Object.entries(t)){let t=x(n[e],i);t!==void 0&&(r[e]=t)}return Object.keys(r).length>0?r:void 0},S=(e,t)=>{if(t===void 0)return;if(t===null)return null;let n=x(e,t),r=f(n)?{...n}:{},i=f(e)?e:{};for(let e of b)e in i&&!(e in t)&&(r[e]=null);if(Object.keys(r).length!==0)return{type:`oauth`,...r}},C=(e,t)=>{if(!e||e.strategy===t.strategy)return t;let n={...t};for(let t of Object.keys(e))t!==`strategy`&&!(t in n)&&(n[t]=null);return n},w=`Removing an individual header from header authentication is not supported yet. Replace the credential or clear authentication, then re-enter the headers you want to keep.`,T=(e,t)=>{let n=y(e?.strategy===`header`?e.headers:void 0,t.headers);if(n){if(Object.values(n).some(e=>e===null))throw Error(w);return{strategy:`header`,headers:n}}},E=(e,t)=>{let n=e?.strategy===`oauth2`?e:void 0,r=S(n?.authentication,t.authentication),i=x(n?.state,t.state);if(!(n&&r===void 0&&i===void 0))return C(e,{strategy:`oauth2`,...r!==void 0&&{authentication:r},...i!==void 0&&{state:i}})};function D(e,t){let n=te(e,t);if(t.type===`stdio`){let r=y(e.transport===`stdio`?e.env:void 0,t.env);return{transport:`stdio`,command:t.command,...t.args?.length?{args:t.args}:e.transport===`stdio`&&e.args?{args:null}:{},...r===void 0?{}:{env:r},...n}}let r=e.transport===`stdio`?void 0:e,i={transport:t.type===`sse`?`sse`:`http`,url:t.url,...n};if(t.type===`shttp`&&(t.timeout===void 0?r?.timeout!==void 0&&(i.timeout=null):i.timeout=t.timeout),t.auth)if(t.auth.strategy===`oauth2`){let e=E(r?.auth,t.auth);e!==void 0&&(i.auth=e)}else if(t.auth.strategy===`header`&&r?.auth?.strategy===`header`){let e=T(r.auth,t.auth);e!==void 0&&(i.auth=e)}else h(t.auth)||(i.auth=C(r?.auth,t.auth));else r?.auth&&(i.auth=null);return i}var O=(e,t)=>{let n=(e,t)=>{let r=f(e)?{...e}:{};if(!f(t))return r;for(let[e,i]of Object.entries(t))i===null?delete r[e]:f(i)?r[e]=n(r[e],i):r[e]=i;return r};return n(e,t)},k=`Replace or clear the stored credential before renaming this MCP server.`;function ne(e,t,n,r){if(h(n.transport===`stdio`?n.env:{auth:n.auth,headers:n.headers}))throw Error(k);let i=O(n,D(n,r));return{[e]:null,[t]:i}}function re(e,t,n){let r=u(t||n);if(!(r in e))return r;let i=1;for(;`${r}_${i}`in e;)i+=1;return`${r}_${i}`}function A(){let t=e().backend;if(t.kind!==`cloud`)throw Error(`Cloud settings call requires a cloud backend.`);return t}function j(e){if(e.agent_settings&&Object.keys(e.agent_settings).length>0)return e.agent_settings;let t={},n={};typeof e.llm_model==`string`&&(n.model=e.llm_model),typeof e.llm_base_url==`string`&&(n.base_url=e.llm_base_url),typeof e.llm_api_key==`string`&&(n.api_key=e.llm_api_key),Object.keys(n).length>0&&(t.llm=n);let r={};return typeof e.enable_default_condenser==`boolean`&&(r.enabled=e.enable_default_condenser),typeof e.condenser_max_size==`number`&&(r.max_size=e.condenser_max_size),Object.keys(r).length>0&&(t.condenser=r),typeof e.agent==`string`&&(t.agent=e.agent),e.mcp_config&&Object.keys(e.mcp_config).length>0&&(t.mcp_config=e.mcp_config),t}function M(e){if(e.conversation_settings&&Object.keys(e.conversation_settings).length>0)return e.conversation_settings;let t={};return typeof e.confirmation_mode==`boolean`&&(t.confirmation_mode=e.confirmation_mode),(typeof e.security_analyzer==`string`||e.security_analyzer===null)&&(t.security_analyzer=e.security_analyzer),typeof e.max_iterations==`number`&&(t.max_iterations=e.max_iterations),t}async function N(){let e=await r({backend:A(),method:`GET`,path:`/api/v1/settings`});return{...e,agent_settings:j(e),conversation_settings:M(e),llm_api_key_set:!!e.llm_api_key_set,search_api_key_set:!!e.search_api_key_set,provider_tokens_set:e.provider_tokens_set}}async function P(e){let t=A(),n={};if(e.agent_settings_diff){let t={...e.agent_settings_diff};t.agent_context===null&&delete t.agent_context,Object.keys(t).length>0&&(n.agent_settings_diff=t)}if(e.conversation_settings_diff&&Object.keys(e.conversation_settings_diff).length>0&&(n.conversation_settings_diff=e.conversation_settings_diff),e.app_preferences)for(let[t,r]of Object.entries(e.app_preferences))r!==void 0&&(n[t]=r);await r({backend:t,method:`POST`,path:`/api/v1/settings`,body:n})}async function F(){return r({backend:A(),method:`GET`,path:`/api/v1/settings/agent-schema`})}async function I(){return r({backend:A(),method:`GET`,path:`/api/v1/settings/conversation-schema`})}var L=[`language`,`user_consents_to_analytics`,`enable_sound_notifications`,`git_user_name`,`git_user_email`,`title_llm_profile`,`disabled_skills`,`enabled_skills`],R=new Set(L),z=e=>R.has(e),B=e=>{let t={},n={};for(let[r,i]of Object.entries(e))z(r)?t[r]=i:n[r]=i;return{extracted:t,rest:n}},V=e=>JSON.parse(JSON.stringify(e)),H=(e,t)=>({...e??{},...t??{}});async function U(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 W={redacted:null,encrypted:null,timestamp:0},G=300*1e3,K=()=>Date.now()-W.timestamp<G,q=()=>{W={redacted:null,encrypted:null,timestamp:0}},J=e=>!!e&&typeof e==`object`&&!Array.isArray(e),Y=(e,t)=>`Basic ${btoa(`${e}:${t}`)}`,ie=e=>{switch(e.strategy){case`none`:return{};case`api_key`:{if(typeof e.value!=`string`||!e.value)return null;let t=typeof e.header_name==`string`&&e.header_name?e.header_name:`Authorization`,n=t===`Authorization`?`Bearer ${e.value}`:e.value;return{[t]:n}}case`bearer`:return typeof e.value!=`string`||!e.value?null:{Authorization:`Bearer ${e.value}`};case`basic`:return typeof e.username!=`string`||typeof e.password!=`string`?null:{Authorization:Y(e.username,e.password)};case`header`:return m(e.headers)??{};case`oauth2`:{let t=J(e.state)?e.state.tokens:void 0;return!J(t)||typeof t.access_token!=`string`?null:{Authorization:`Bearer ${t.access_token}`}}default:return null}},X=async t=>{if(!J(t))return t;let n=J(t.mcpServers),r=n?t.mcpServers:t,i=Object.values(r).some(e=>J(e)&&J(e.auth)&&e.auth!==null)&&e().backend.kind===`cloud`,a=new Map;if(i)try{let e=await N(),t=J(e.mcp_config)?e.mcp_config:{};for(let[e,n]of Object.entries(t))if(J(n)){let t=m(n.headers);t&&a.set(e,t)}}catch{}let o=Object.fromEntries(Object.entries(r).map(([e,t])=>{if(!J(t))return[e,t];if(t.auth===null){let n={...t,headers:null};return delete n.auth,[e,n]}if(!J(t.auth))return[e,t];let n=ie(t.auth);if(n===null)return[e,t];let r={...t},i={...m(t.headers)??{},...n},o=a.get(e);if(o)for(let e of Object.keys(o))e in i||(i[e]=null);return delete r.auth,Object.keys(i).length>0?r.headers=i:delete r.headers,[e,r]}));return n?{...t,mcpServers:o}:o},Z=e=>{let t=e.misc_settings?.app_preferences,n=t?.disabled_skills,r=t?.enabled_skills;return{disabledSkills:Array.isArray(n)?n:[],enabledSkills:Array.isArray(r)?r:void 0}},Q=e=>{let t={agent_settings:e.agent_settings??{},conversation_settings:e.conversation_settings??{},llm_api_key_set:e.llm_api_key_is_set},n=e.misc_settings?.app_preferences;if(n)for(let e of L){let r=n[e];r!==void 0&&(t[e]=r)}return t},$=e=>{let t=H(i.agent_settings??{},e.agent_settings??{}),n=H(i.conversation_settings??{},e.conversation_settings??{}),r={...V(i),...e,provider_tokens_set:{...i.provider_tokens_set??{},...e.provider_tokens_set??{}},agent_settings:t,conversation_settings:n},a=t.llm,o=t.condenser;return typeof t.agent==`string`&&(r.agent=t.agent),typeof a?.model==`string`&&a.model.length>0&&(r.llm_model=a.model),typeof a?.base_url==`string`&&(r.llm_base_url=a.base_url),typeof o?.enabled==`boolean`&&(r.enable_default_condenser=o.enabled),typeof o?.max_size==`number`&&(r.condenser_max_size=o.max_size),typeof n.confirmation_mode==`boolean`&&(r.confirmation_mode=n.confirmation_mode),(typeof n.security_analyzer==`string`||n.security_analyzer===null)&&(r.security_analyzer=n.security_analyzer),typeof n.max_iterations==`number`&&(r.max_iterations=n.max_iterations),r.search_api_key_set=!!r.search_api_key,r},ae=class r{static async fetchSettingsFromApi(e){return U(()=>new n(t()).getSettings({exposeSecrets:e}))}static async getSettings(){if(e().backend.kind===`cloud`)try{return $(await U(()=>N()))}catch(e){return console.warn(`Failed to fetch cloud settings, using defaults:`,e),$({})}if(K()&&W.redacted)return $(Q(W.redacted));try{let e=await this.fetchSettingsFromApi();return W.redacted=e,W.timestamp=Date.now(),$(Q(e))}catch(e){return console.warn(`Failed to fetch settings from API, using defaults:`,e),$({})}}static async getSettingsForConversation(){if(K()&&W.encrypted)return{agentSettings:W.encrypted.agent_settings,conversationSettings:W.encrypted.conversation_settings,secretsEncrypted:!0,skillEnablement:Z(W.encrypted)};let e=await this.fetchSettingsFromApi(`encrypted`);return W.encrypted=e,W.timestamp||=Date.now(),{agentSettings:e.agent_settings,conversationSettings:e.conversation_settings,secretsEncrypted:!0,skillEnablement:Z(e)}}static async getSettingsSchema(){return e().backend.kind===`cloud`?await F():await new n(t()).getAgentSchema()}static async getConversationSettingsSchema(){return e().backend.kind===`cloud`?await I():await new n(t()).getConversationSchema()}static async patchMcpConfig(r){if(e().backend.kind===`cloud`){let e=await X(r);await U(()=>P({agent_settings_diff:{mcp_config:e}}))}else await U(()=>new n(t()).updateSettings({agent_settings_diff:{mcp_config:r}}));return q(),!0}static async patchMcpServer(i,a){return e().backend.kind===`cloud`?r.patchMcpConfig({[i]:a}):(await U(()=>new n(t()).patchMcpServer(i,a)),q(),!0)}static async createMcpServer(i,a){return e().backend.kind===`cloud`?r.patchMcpConfig({[i]:a}):(await U(()=>new n(t()).createMcpServer(i,a)),q(),!0)}static async deleteMcpServer(i){return e().backend.kind===`cloud`?r.patchMcpConfig({[i]:null}):(await U(()=>new n(t()).deleteMcpServer(i)),q(),!0)}static async saveSettings(r){let{extracted:i,rest:a}=B(r),o=Object.keys(i).length>0,s={},c=a.agent_settings_diff;c&&Object.keys(c).length>0&&(s.agent_settings_diff=c);let l=a.conversation_settings_diff;if(l&&Object.keys(l).length>0&&(s.conversation_settings_diff=l),o&&(s.misc_settings_diff={app_preferences:i}),e().backend.kind===`cloud`){if(!(s.agent_settings_diff||s.conversation_settings_diff||o))return!0;let e={};s.agent_settings_diff&&(e.agent_settings_diff={...s.agent_settings_diff},`mcp_config`in e.agent_settings_diff&&(e.agent_settings_diff.mcp_config=await X(e.agent_settings_diff.mcp_config))),s.conversation_settings_diff&&(e.conversation_settings_diff=s.conversation_settings_diff),o&&(e.app_preferences=i),await U(()=>P(e))}else{if(!(s.agent_settings_diff||s.conversation_settings_diff||s.misc_settings_diff))return!0;await U(()=>new n(t()).updateSettings(s))}return q(),!0}static invalidateCache(){q()}};export{D as a,h as c,c as d,l as f,re as i,v as l,s as m,k as n,ne as o,u as p,d as r,g as s,ae as t,ee as u};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./useTranslation-CCgUjPJF.js";import{K as i,t as a}from"./utils-D-gOfhmN.js";import{n as o}from"./toggle-switch-DeiG9Mf6.js";var s=e(t(),1),c=n();function l({children:e,testId:t,name:n,onToggle:l,defaultIsToggled:u,isToggled:d,isBeta:f,isDisabled:p,togglePosition:m=`left`}){let{t:h}=r(`openhands`),[g,_]=s.useState(u??!1),v=e=>{p||(_(e),l?.(e))},y=(0,c.jsx)(`input`,{hidden:!0,"data-testid":t,name:n,type:`checkbox`,onChange:e=>v(e.target.checked),checked:d??g,disabled:p}),b=(0,c.jsx)(o,{enabled:d??g}),x=e||f?(0,c.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,c.jsx)(`span`,{className:`text-sm`,children:e}),f&&(0,c.jsx)(`span`,{className:`text-[11px] leading-4 text-base font-[500] tracking-tighter bg-primary px-1 rounded-full`,children:h(i.BADGE$BETA)})]}):null;return(0,c.jsxs)(`label`,{className:a(`flex items-center gap-2`,m===`right`?`w-full justify-between`:`w-fit`,p?`cursor-not-allowed opacity-50`:`cursor-pointer`),children:[y,m===`right`?(0,c.jsxs)(c.Fragment,{children:[x,b]}):(0,c.jsxs)(c.Fragment,{children:[b,x]})]})}export{l as t};
@@ -1 +1 @@
1
- import{t as e}from"./map-provider-DXvssjw9.js";var t=t=>{let n=t.get(`llm-provider-input`)?.toString(),r=n?e(n):void 0,i=t.get(`llm-model-input`)?.toString();return{llmModel:r&&i?`${r}/${i}`:void 0,llmApiKey:t.get(`llm-api-key-input`)?.toString(),agent:t.get(`agent`)?.toString(),language:t.get(`language`)?.toString()}},n=e=>{let{llmModel:n,llmApiKey:r,agent:i,language:a}=t(e),o={};n&&(o.model=n),r!==void 0&&(o.api_key=r);let s={};return Object.keys(o).length>0&&(s.llm=o),i&&(s.agent=i),{...Object.keys(s).length>0?{agent_settings_diff:s}:{},...a?{language:a}:{}}};function r(e,t){return!!(t?.hide_llm_settings&&e===`/settings/llm`)}function i(e){return[{path:`/settings/agents`,hidden:!1},{path:`/settings/llm`,hidden:!!e?.hide_llm_settings},{path:`/settings`,hidden:!!e?.hide_llm_settings},{path:`/settings/app`,hidden:!1},{path:`/settings/secrets`,hidden:!1}].find(e=>!e.hidden)?.path??null}export{i as n,r,n as t};
1
+ import{t as e}from"./map-provider-iRs80q_6.js";var t=t=>{let n=t.get(`llm-provider-input`)?.toString(),r=n?e(n):void 0,i=t.get(`llm-model-input`)?.toString();return{llmModel:r&&i?`${r}/${i}`:void 0,llmApiKey:t.get(`llm-api-key-input`)?.toString(),agent:t.get(`agent`)?.toString(),language:t.get(`language`)?.toString()}},n=e=>{let{llmModel:n,llmApiKey:r,agent:i,language:a}=t(e),o={};n&&(o.model=n),r!==void 0&&(o.api_key=r);let s={};return Object.keys(o).length>0&&(s.llm=o),i&&(s.agent=i),{...Object.keys(s).length>0?{agent_settings_diff:s}:{},...a?{language:a}:{}}};function r(e,t){return!!(t?.hide_llm_settings&&e===`/settings/llm`)}function i(e){return[{path:`/settings/agents`,hidden:!1},{path:`/settings/llm`,hidden:!!e?.hide_llm_settings},{path:`/settings`,hidden:!!e?.hide_llm_settings},{path:`/settings/app`,hidden:!1},{path:`/settings/secrets`,hidden:!1}].find(e=>!e.hidden)?.path??null}export{i as n,r,n as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{B as r,U as i,c as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as o}from"./useInfiniteQuery-CtSRG7uW.js";import{t as s}from"./useQuery-DAAacS7O.js";import{t as c}from"./useTranslation-CCgUjPJF.js";import{K as l}from"./utils-D-gOfhmN.js";import{n as u}from"./agent-server-client-options-EHB23gyx.js";import{t as d}from"./messages-DmFJlW6c.js";import{c as f}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js";import{t as p}from"./loading-spinner-DK1sAwVg.js";import{t as m}from"./openhands-logo-BS-Epajy.js";import{O as h,m as g}from"./markdown-renderer-BH5pqDuJ.js";var _=e(t(),1),v=e=>s({queryKey:[`shared-conversation`,e],queryFn:()=>{if(!e)throw Error(`Conversation ID is required`);return new f(u()).getSharedConversation(e)},enabled:!!e,retry:!1}),y=e=>o({queryKey:[`shared-conversation-events`,e],queryFn:({pageParam:t})=>{if(!e)throw Error(`Conversation ID is required`);return new f(u()).searchSharedEvents({conversationId:e,limit:100,pageId:t})},initialPageParam:void 0,getNextPageParam:e=>e.next_page_id??void 0,enabled:!!e,retry:!1}),b=({hasNextPage:e,isFetchingNextPage:t,fetchNextPage:n,threshold:r=100})=>{let i=(0,_.useRef)(null),a=(0,_.useCallback)(()=>{if(!i.current||t||!e)return;let{scrollTop:a,scrollHeight:o,clientHeight:s}=i.current;a+s>=o-r&&n()},[e,t,n,r]);return(0,_.useEffect)(()=>{let e=i.current;if(e)return e.addEventListener(`scroll`,a),()=>{e.removeEventListener(`scroll`,a)}},[a]),i},x=n(),S=i(function(){let{t:e}=c(`openhands`),{conversationId:t}=r(),{data:n,isLoading:i,error:o}=v(t),{data:s,isLoading:u,error:f,hasNextPage:S,fetchNextPage:C,isFetchingNextPage:w}=y(t),T=i||u,E=o||f,D=_.useMemo(()=>s?.pages?s.pages.flatMap(e=>e.items):[],[s?.pages]),O=_.useMemo(()=>D.reduce((e,t)=>h(t,e),[]).filter(g),[D]),k=b({hasNextPage:!!S,isFetchingNextPage:w,fetchNextPage:C});return T?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(p,{size:`large`})}):E||!n?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(`div`,{className:`text-white`,children:e(l.CONVERSATION$NOT_FOUND)})}):(0,x.jsxs)(`div`,{className:`h-screen bg-base text-white flex flex-col`,children:[(0,x.jsx)(`div`,{className:`border-b border-[var(--oh-border-subtle)] p-4 flex-shrink-0`,children:(0,x.jsxs)(`div`,{className:`max-w-4xl mx-auto flex items-start gap-4`,children:[(0,x.jsx)(a,{to:`/conversations`,className:`flex-shrink-0`,"aria-label":e(l.BRANDING$OPENHANDS_LOGO),children:(0,x.jsx)(m,{width:46,height:30})}),(0,x.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,x.jsx)(`h1`,{className:`text-xl font-medium mb-2`,children:n?.title||e(l.CONVERSATION$SHARED_CONVERSATION)}),n?.selected_branch&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(l.CONVERSATION$BRANCH),`: `,n.selected_branch]}),n?.selected_repository&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(l.CONVERSATION$REPOSITORY),`:`,` `,n.selected_repository]}),n?.llm_model&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(l.LLM$MODEL),`: `,n.llm_model]})]})]})}),(0,x.jsx)(`div`,{ref:k,className:`flex-1 overflow-y-auto custom-scrollbar-always px-4 pt-4 gap-2`,children:(0,x.jsxs)(`div`,{className:`max-w-4xl mx-auto p-4 border border-[var(--oh-border-subtle)] rounded`,children:[O.length>0?(0,x.jsx)(d,{messages:O,allEvents:D}):(0,x.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,x.jsx)(`div`,{className:`text-center text-[var(--oh-muted)] py-8`,children:e(l.CONVERSATION$NO_HISTORY_AVAILABLE)})}),w&&(0,x.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,x.jsx)(p,{size:`small`})})]})})]})});export{S as default};
@@ -1 +1 @@
1
- import{i as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";var t=e(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]);export{t};
1
+ import{i as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";var t=e(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]);export{t};
@@ -1 +1 @@
1
- import{t as e}from"./utils-BOco8mxR.js";var t=`transition-none motion-reduce:transition-none`,n=`flex h-9 w-[18px] shrink-0 items-center justify-center`,r=`relative h-9 min-h-9 max-h-9 w-full shrink-0`;function i(t){return e(`flex h-10 min-h-10 shrink-0 items-center w-full`,t?`px-0`:`gap-2 pl-2.5 pr-2.5`)}var a={active:`bg-tertiary text-white font-normal`,idle:`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`};function o(t){return e(`flex flex-col gap-0.5 w-full shrink-0 items-stretch`,!t&&`pr-2.5`)}function s(n){let{indent:r=!1,collapsed:i=!1}=n??{};return e(`flex h-9 min-h-9 min-w-0 items-center rounded-md`,t,`text-sm leading-5 w-full`,i?`group gap-0 px-0 overflow-visible bg-transparent hover:bg-transparent`:`gap-2 px-2.5 overflow-hidden`,r&&!i&&`pl-7`)}function c(n){return e(`pointer-events-none absolute inset-0 z-0 rounded-md`,t,n?`bg-tertiary`:`bg-transparent group-hover:bg-[var(--oh-surface-raised)]`)}function l(t){return e(`relative z-[1] flex h-full w-full items-center justify-start pl-2.5 [&_svg]:shrink-0`,t?`text-white font-normal`:`text-[var(--oh-muted)] group-hover:text-white`)}function u(e){return e?`sr-only`:`min-w-0 truncate`}var d=e(`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md`,t,`cursor-pointer`),f=e(`relative hidden md:block shrink-0 overflow-visible`,r),p=e(`absolute left-1/2 top-1/2 hidden h-7 w-7 -translate-x-1/2 -translate-y-1/2 md:inline-flex`,`items-center justify-center rounded-md`,t,`cursor-pointer`,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`);export{n as a,l as c,o as d,s as f,d as i,i as l,f as n,a as o,p as r,c as s,r as t,u};
1
+ import{t as e}from"./utils-D-gOfhmN.js";var t=`transition-none motion-reduce:transition-none`,n=`flex h-9 w-[18px] shrink-0 items-center justify-center`,r=`relative h-9 min-h-9 max-h-9 w-full shrink-0`;function i(t){return e(`flex h-10 min-h-10 shrink-0 items-center w-full`,t?`px-0`:`gap-2 pl-2.5 pr-2.5`)}var a={active:`bg-tertiary text-white font-normal`,idle:`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`};function o(t){return e(`flex flex-col gap-0.5 w-full shrink-0 items-stretch`,!t&&`pr-2.5`)}function s(n){let{indent:r=!1,collapsed:i=!1}=n??{};return e(`flex h-9 min-h-9 min-w-0 items-center rounded-md`,t,`text-sm leading-5 w-full`,i?`group gap-0 px-0 overflow-visible bg-transparent hover:bg-transparent`:`gap-2 px-2.5 overflow-hidden`,r&&!i&&`pl-7`)}function c(n){return e(`pointer-events-none absolute inset-0 z-0 rounded-md`,t,n?`bg-tertiary`:`bg-transparent group-hover:bg-[var(--oh-surface-raised)]`)}function l(t){return e(`relative z-[1] flex h-full w-full items-center justify-start pl-2.5 [&_svg]:shrink-0`,t?`text-white font-normal`:`text-[var(--oh-muted)] group-hover:text-white`)}function u(e){return e?`sr-only`:`min-w-0 truncate`}var d=e(`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md`,t,`cursor-pointer`),f=e(`relative hidden md:block shrink-0 overflow-visible`,r),p=e(`absolute left-1/2 top-1/2 hidden h-7 w-7 -translate-x-1/2 -translate-y-1/2 md:inline-flex`,`items-center justify-center rounded-md`,t,`cursor-pointer`,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`);export{n as a,l as c,o as d,s as f,d as i,i as l,f as n,a as o,p as r,c as s,r as t,u};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{f as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{t as i}from"./useMutation-Cszf8mKy.js";import{t as a}from"./vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BCe0JJVy.js";import{t as o}from"./useTranslation-CCgUjPJF.js";import{K as s,t as c}from"./utils-D-gOfhmN.js";import{t as l}from"./modal-backdrop-BSzNhM4r.js";import{n as u}from"./modal-body-DBweM2EN.js";import{n as d,r as f}from"./base-modal-Ds7grR67.js";import{_ as p,u as m}from"./form-control-classes-lQfLxzH4.js";import{t as h}from"./brand-button-mQq2Ld1I.js";import{t as g}from"./agent-server-conversation-service.api-BaVQ6NpE.js";var _=e(t(),1),v=n();function y({onConfirm:e,onCancel:t,conversationTitle:n,title:r,description:i}){let{t:c}=o(`openhands`),p;return p=i??(n?(0,v.jsx)(a,{ns:`openhands`,i18nKey:s.CONVERSATION$DELETE_WARNING_WITH_TITLE,values:{title:n},components:{title:(0,v.jsx)(`span`,{className:`text-white`})}}):c(s.CONVERSATION$DELETE_WARNING)),(0,v.jsx)(l,{onClose:t,children:(0,v.jsxs)(u,{className:`items-start border border-[var(--oh-border)]`,children:[(0,v.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,v.jsx)(f,{title:r??c(s.CONVERSATION$CONFIRM_DELETE)}),(0,v.jsx)(d,{children:p})]}),(0,v.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,v.jsx)(h,{type:`button`,variant:`secondary`,onClick:t,"data-testid":`cancel-button`,children:c(s.BUTTON$CANCEL)}),(0,v.jsx)(h,{type:`button`,variant:`primary`,onClick:e,"data-testid":`confirm-button`,children:c(s.ACTION$CONFIRM_DELETE)})]})]})})}function b({onConfirm:e,onCancel:t}){let{t:n}=o(`openhands`);return(0,v.jsx)(l,{onClose:t,children:(0,v.jsxs)(u,{className:`items-start border border-[var(--oh-border)]`,children:[(0,v.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,v.jsx)(f,{title:n(s.CONVERSATION$CONFIRM_CLOSE_CONVERSATION)}),(0,v.jsx)(d,{description:n(s.CONVERSATION$CLOSE_CONVERSATION_WARNING)})]}),(0,v.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,v.jsx)(h,{type:`button`,variant:`secondary`,onClick:t,"data-testid":`cancel-button`,children:n(s.BUTTON$CANCEL)}),(0,v.jsx)(h,{type:`button`,variant:`primary`,onClick:e,"data-testid":`confirm-button`,children:n(s.ACTION$CONFIRM_CLOSE)})]})]})})}var x=()=>{let e=r();return i({mutationFn:e=>g.updateConversationTitle(e.conversationId,e.newTitle),onMutate:async t=>{await e.cancelQueries({queryKey:[`user`,`conversations`]});let n=e.getQueryData([`user`,`conversations`]);return e.setQueryData([`user`,`conversations`],e=>e?.map(e=>e.id===t.conversationId?{...e,title:t.newTitle}:e)),e.setQueryData([`user`,`conversation`,t.conversationId],e=>e&&{...e,title:t.newTitle}),{previousConversations:n}},onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]})}})};function S(e){if(!e)return null;try{let t=new URL(e);return t.hostname===`localhost`&&window.location.hostname!==`localhost`?(t.hostname=window.location.hostname,t.toString()):e}catch{return e}}var C=e=>(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,v.jsx)(`path`,{d:`M12 2C12.5523 2 13 2.44772 13 3V13.5858L15.2929 11.2929C15.6834 10.9024 16.3166 10.9024 16.7071 11.2929C17.0976 11.6834 17.0976 12.3166 16.7071 12.7071L12.7071 16.7071C12.3166 17.0976 11.6834 17.0976 11.2929 16.7071L7.29289 12.7071C6.90237 12.3166 6.90237 11.6834 7.29289 11.2929C7.68342 10.9024 8.31658 10.9024 8.70711 11.2929L11 13.5858V3C11 2.44772 11.4477 2 12 2ZM5 17C5.55228 17 6 17.4477 6 18V20H18V18C18 17.4477 18.4477 17 19 17C19.5523 17 20 17.4477 20 18V20C20 21.1046 19.1046 22 18 22H6C4.89543 22 4 21.1046 4 20V18C4 17.4477 4.44772 17 5 17Z`,fill:`currentColor`})}),w=_.createContext(null);function T({children:e}){let[t,n]=_.useState(!1),r=_.useCallback(()=>n(!0),[]),i=_.useCallback(()=>n(!1),[]),a=_.useCallback(()=>n(e=>!e),[]),o=_.useMemo(()=>({isOpen:t,open:r,close:i,toggle:a}),[t,r,i,a]);return(0,v.jsx)(w.Provider,{value:o,children:e})}function E(){let e=_.useContext(w);if(!e)throw Error(`useSidebarMobileNav must be used within SidebarMobileNavProvider`);return e}var D=c(`inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md p-1`,`text-[var(--oh-muted)]`,p,m),O=`size-5 shrink-0`,k=e=>(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,v.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10 5.5H18C18.2761 5.5 18.5 5.72386 18.5 6V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 5.5ZM8.5 5.5H6C5.72386 5.5 5.5 5.72386 5.5 6V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 5.5ZM18 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V6C20 4.89543 19.1046 4 18 4Z`,fill:`currentColor`})});function A(){let{t:e}=o(`openhands`),{isOpen:t,toggle:n}=E();return(0,v.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-menu-toggle`,onClick:n,"aria-expanded":t,"aria-label":e(t?s.SIDEBAR$CLOSE_MENU:s.SIDEBAR$OPEN_MENU),className:D,children:(0,v.jsx)(k,{className:O,"aria-hidden":!0})})}export{T as a,S as c,y as d,O as i,x as l,k as n,E as o,D as r,C as s,A as t,b as u};
@@ -1 +1 @@
1
- import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./utils-BOco8mxR.js";import{t as r}from"./pin-C7vMagvf.js";import{n as i}from"./navigation-context-CQZwH_tC.js";import{t as a}from"./navigation-link-Bxo3-4vo.js";import{a as o,c as s,f as c,o as l,s as u,t as d,u as f}from"./sidebar-layout-EPfWxk11.js";import{t as p}from"./styled-tooltip-Pd22BIvr.js";e();var m=t();function h({active:e,className:t,children:r}){return(0,m.jsxs)(`span`,{className:n(d,t),children:[(0,m.jsx)(`span`,{"aria-hidden":!0,className:u(e)}),(0,m.jsx)(`span`,{className:s(e),children:r})]})}var g=[`[@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`],_=[`[@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`],v=[`[@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]`],y=[`[@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 b(e=!1){return e?`pointer-events-auto visible opacity-100`:n(`pointer-events-auto visible opacity-100`,...g)}function x(e=!1){return e?`opacity-0`:n(`opacity-0`,..._)}function S(e=!1){return e?`min-w-[3.75rem]`:n(`min-w-[3.75rem]`,...v)}function C(e=!1){return e?`hidden`:n(`hidden`,...y)}function w(e,t,n){return t===`/`||n?e===t:e===t||e.startsWith(`${t}/`)}function T({to:e,label:t,end:s=!1,indent:u=!1,testId:d,disabled:g=!1,icon:_,collapsed:v=!1,hoverContent:y,forceActive:x=!1,pinAction:S}){let{currentPath:C}=i(),T=x||w(C,e,s),E=!v&&S!=null,D=(0,m.jsxs)(a,{to:e,end:s,"data-testid":d,tabIndex:g?-1:0,"aria-label":v?t:void 0,"aria-disabled":g||void 0,onClick:e=>{g&&e.preventDefault()},className:n(c({indent:u,collapsed:v}),!v&&(T?l.active:l.idle),g&&`opacity-50`,g&&`pointer-events-none`,E&&`pr-9`),children:[_?v?(0,m.jsx)(h,{active:T,children:_}):(0,m.jsx)(`span`,{className:o,children:_}):null,(0,m.jsx)(`span`,{className:f(v),children:t})]});return v?(0,m.jsx)(p,{content:y??t,placement:`right`,tooltipClassName:y?`p-0 bg-tertiary text-white`:void 0,children:D}):S?(0,m.jsxs)(`div`,{className:`group relative`,children:[D,(0,m.jsx)(`button`,{type:`button`,"data-testid":S.testId,"aria-pressed":S.pinned,"aria-label":S.label,onClick:e=>{e.preventDefault(),e.stopPropagation(),S.onToggle()},className:n(`absolute right-1.5 top-1/2 -translate-y-1/2`,`flex shrink-0 cursor-pointer items-center justify-center rounded-md p-1`,`text-[var(--oh-muted)] hover:bg-white/10 hover:text-white`,b(S.pinned)),children:(0,m.jsx)(r,{className:n(`h-3.5 w-3.5`,S.pinned&&`fill-current`),"aria-hidden":!0})})]}):D}export{x as a,S as i,b as n,h as o,C as r,T as t};
1
+ import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./utils-D-gOfhmN.js";import{t as r}from"./pin-BdroVQdN.js";import{n as i}from"./navigation-context-CQZwH_tC.js";import{t as a}from"./navigation-link-Bxo3-4vo.js";import{a as o,c as s,f as c,o as l,s as u,t as d,u as f}from"./sidebar-layout-B6mcvvdV.js";import{t as p}from"./styled-tooltip-DVAlWYnL.js";e();var m=t();function h({active:e,className:t,children:r}){return(0,m.jsxs)(`span`,{className:n(d,t),children:[(0,m.jsx)(`span`,{"aria-hidden":!0,className:u(e)}),(0,m.jsx)(`span`,{className:s(e),children:r})]})}var g=[`[@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`],_=[`[@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`],v=[`[@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]`],y=[`[@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 b(e=!1){return e?`pointer-events-auto visible opacity-100`:n(`pointer-events-auto visible opacity-100`,...g)}function x(e=!1){return e?`opacity-0`:n(`opacity-0`,..._)}function S(e=!1){return e?`min-w-[3.75rem]`:n(`min-w-[3.75rem]`,...v)}function C(e=!1){return e?`hidden`:n(`hidden`,...y)}function w(e,t,n){return t===`/`||n?e===t:e===t||e.startsWith(`${t}/`)}function T({to:e,label:t,end:s=!1,indent:u=!1,testId:d,disabled:g=!1,icon:_,collapsed:v=!1,hoverContent:y,forceActive:x=!1,pinAction:S}){let{currentPath:C}=i(),T=x||w(C,e,s),E=!v&&S!=null,D=(0,m.jsxs)(a,{to:e,end:s,"data-testid":d,tabIndex:g?-1:0,"aria-label":v?t:void 0,"aria-disabled":g||void 0,onClick:e=>{g&&e.preventDefault()},className:n(c({indent:u,collapsed:v}),!v&&(T?l.active:l.idle),g&&`opacity-50`,g&&`pointer-events-none`,E&&`pr-9`),children:[_?v?(0,m.jsx)(h,{active:T,children:_}):(0,m.jsx)(`span`,{className:o,children:_}):null,(0,m.jsx)(`span`,{className:f(v),children:t})]});return v?(0,m.jsx)(p,{content:y??t,placement:`right`,tooltipClassName:y?`p-0 bg-tertiary text-white`:void 0,children:D}):S?(0,m.jsxs)(`div`,{className:`group relative`,children:[D,(0,m.jsx)(`button`,{type:`button`,"data-testid":S.testId,"aria-pressed":S.pinned,"aria-label":S.label,onClick:e=>{e.preventDefault(),e.stopPropagation(),S.onToggle()},className:n(`absolute right-1.5 top-1/2 -translate-y-1/2`,`flex shrink-0 cursor-pointer items-center justify-center rounded-md p-1`,`text-[var(--oh-muted)] hover:bg-white/10 hover:text-white`,b(S.pinned)),children:(0,m.jsx)(r,{className:n(`h-3.5 w-3.5`,S.pinned&&`fill-current`),"aria-hidden":!0})})]}):D}export{x as a,S as i,b as n,h as o,C as r,T as t};
@@ -1 +1 @@
1
- import{K as e}from"./utils-BOco8mxR.js";var t=`https://docs.openhands.dev/openhands/usage/agent-canvas/prebuilt-automations`,n=`https://openhands.dev/joinslack`,r=`openhands-sidebar-onboarding-checklist-dismissed`,i=`openhands-sidebar-onboarding-checklist-dismissed-change`,a=`openhands-sidebar-onboarding-checklist-minimized`,o=`openhands-sidebar-onboarding-checklist-customize-explored`,s=`openhands-sidebar-onboarding-checklist-slack-joined`,c=[`configure-llm`,`start-conversation`,`schedule-task`,`customize-agent`,`connect-mcp`,`join-slack`],l={"configure-llm":`/settings/llm`,"connect-mcp":`/mcp`,"start-conversation":`/conversations`,"schedule-task":`/automations`,"customize-agent":`/settings/agents`},u={"configure-llm":`configure_llm`,"start-conversation":`start_conversation`,"schedule-task":`schedule_task`,"customize-agent":`customize_agent`,"connect-mcp":`connect_mcp`,"join-slack":`join_slack`},d={"configure-llm":`settings`,"start-conversation":`conversation`,"schedule-task":`automation`,"customize-agent":`settings`,"connect-mcp":`integration`,"join-slack":`community`};function f(e){return e===`join-slack`}function p(e){return f(e)?{kind:`external`,href:n}:{kind:`internal`,href:l[e]}}var m={"configure-llm":e.SIDEBAR$ONBOARDING_CHECKLIST_CONFIGURE_LLM,"connect-mcp":e.SIDEBAR$ONBOARDING_CHECKLIST_CONNECT_MCP,"start-conversation":e.SIDEBAR$ONBOARDING_CHECKLIST_START_CHAT,"schedule-task":e.SIDEBAR$ONBOARDING_CHECKLIST_SCHEDULE_TASK,"customize-agent":e.SIDEBAR$ONBOARDING_CHECKLIST_CUSTOMIZE,"join-slack":e.SIDEBAR$ONBOARDING_CHECKLIST_JOIN_SLACK},h={"configure-llm":e.SIDEBAR$ONBOARDING_CHECKLIST_CONFIGURE_LLM_DESC,"connect-mcp":e.SIDEBAR$ONBOARDING_CHECKLIST_CONNECT_MCP_DESC,"start-conversation":e.SIDEBAR$ONBOARDING_CHECKLIST_START_CHAT_DESC,"schedule-task":e.SIDEBAR$ONBOARDING_CHECKLIST_SCHEDULE_TASK_DESC,"customize-agent":e.SIDEBAR$ONBOARDING_CHECKLIST_CUSTOMIZE_DESC,"join-slack":e.SIDEBAR$ONBOARDING_CHECKLIST_JOIN_SLACK_DESC},g={"configure-llm":e.SIDEBAR$ONBOARDING_CHECKLIST_ACTION_CONFIGURE_LLM,"connect-mcp":e.SIDEBAR$ONBOARDING_CHECKLIST_ACTION_CONNECT_MCP,"start-conversation":e.SIDEBAR$ONBOARDING_CHECKLIST_ACTION_START_CHAT,"schedule-task":e.SIDEBAR$ONBOARDING_CHECKLIST_ACTION_SCHEDULE_TASK,"customize-agent":e.SIDEBAR$ONBOARDING_CHECKLIST_ACTION_CUSTOMIZE,"join-slack":e.SIDEBAR$ONBOARDING_CHECKLIST_ACTION_JOIN_SLACK},_={"configure-llm":`https://docs.openhands.dev/openhands/usage/settings/llm-settings#llm-profiles`,"start-conversation":`https://docs.openhands.dev/openhands/usage/agent-canvas/backends`,"schedule-task":t,"customize-agent":`https://docs.openhands.dev/openhands/usage/agent-canvas/customize-and-settings`,"connect-mcp":`https://docs.openhands.dev/overview/model-context-protocol`,"join-slack":`https://docs.openhands.dev/overview/community`};function v(e){return e===`/settings/agents`||e.startsWith(`/settings/agents/`)}function y(){return typeof window>`u`?!1:window.localStorage.getItem(r)===`true`}function b(){return y()}function x(e){let t=()=>e();return window.addEventListener(`storage`,t),window.addEventListener(i,t),()=>{window.removeEventListener(`storage`,t),window.removeEventListener(i,t)}}function S(e){window.localStorage.setItem(r,e?`true`:`false`),window.dispatchEvent(new Event(i))}function C(){return typeof window>`u`?!1:window.localStorage.getItem(a)===`true`}function w(e){window.localStorage.setItem(a,e?`true`:`false`)}function T(){return typeof window>`u`?!1:window.localStorage.getItem(o)===`true`}function E(e){window.localStorage.setItem(o,e?`true`:`false`)}function D(){return typeof window>`u`?!1:window.localStorage.getItem(s)===`true`}function O(e){window.localStorage.setItem(s,e?`true`:`false`)}export{u as _,D as a,f as b,S as c,g as d,h as f,c as g,m as h,C as i,w as l,_ as m,T as n,x as o,d as p,y as r,E as s,b as t,O as u,p as v,v as y};
1
+ import{K as e}from"./utils-D-gOfhmN.js";var t=`https://docs.openhands.dev/openhands/usage/agent-canvas/prebuilt-automations`,n=`https://openhands.dev/joinslack`,r=`openhands-sidebar-onboarding-checklist-dismissed`,i=`openhands-sidebar-onboarding-checklist-dismissed-change`,a=`openhands-sidebar-onboarding-checklist-minimized`,o=`openhands-sidebar-onboarding-checklist-customize-explored`,s=`openhands-sidebar-onboarding-checklist-slack-joined`,c=[`configure-llm`,`start-conversation`,`schedule-task`,`customize-agent`,`connect-mcp`,`join-slack`],l={"configure-llm":`/settings/llm`,"connect-mcp":`/mcp`,"start-conversation":`/conversations`,"schedule-task":`/automations`,"customize-agent":`/settings/agents`},u={"configure-llm":`configure_llm`,"start-conversation":`start_conversation`,"schedule-task":`schedule_task`,"customize-agent":`customize_agent`,"connect-mcp":`connect_mcp`,"join-slack":`join_slack`},d={"configure-llm":`settings`,"start-conversation":`conversation`,"schedule-task":`automation`,"customize-agent":`settings`,"connect-mcp":`integration`,"join-slack":`community`};function f(e){return e===`join-slack`}function p(e){return f(e)?{kind:`external`,href:n}:{kind:`internal`,href:l[e]}}var m={"configure-llm":e.SIDEBAR$ONBOARDING_CHECKLIST_CONFIGURE_LLM,"connect-mcp":e.SIDEBAR$ONBOARDING_CHECKLIST_CONNECT_MCP,"start-conversation":e.SIDEBAR$ONBOARDING_CHECKLIST_START_CHAT,"schedule-task":e.SIDEBAR$ONBOARDING_CHECKLIST_SCHEDULE_TASK,"customize-agent":e.SIDEBAR$ONBOARDING_CHECKLIST_CUSTOMIZE,"join-slack":e.SIDEBAR$ONBOARDING_CHECKLIST_JOIN_SLACK},h={"configure-llm":e.SIDEBAR$ONBOARDING_CHECKLIST_CONFIGURE_LLM_DESC,"connect-mcp":e.SIDEBAR$ONBOARDING_CHECKLIST_CONNECT_MCP_DESC,"start-conversation":e.SIDEBAR$ONBOARDING_CHECKLIST_START_CHAT_DESC,"schedule-task":e.SIDEBAR$ONBOARDING_CHECKLIST_SCHEDULE_TASK_DESC,"customize-agent":e.SIDEBAR$ONBOARDING_CHECKLIST_CUSTOMIZE_DESC,"join-slack":e.SIDEBAR$ONBOARDING_CHECKLIST_JOIN_SLACK_DESC},g={"configure-llm":e.SIDEBAR$ONBOARDING_CHECKLIST_ACTION_CONFIGURE_LLM,"connect-mcp":e.SIDEBAR$ONBOARDING_CHECKLIST_ACTION_CONNECT_MCP,"start-conversation":e.SIDEBAR$ONBOARDING_CHECKLIST_ACTION_START_CHAT,"schedule-task":e.SIDEBAR$ONBOARDING_CHECKLIST_ACTION_SCHEDULE_TASK,"customize-agent":e.SIDEBAR$ONBOARDING_CHECKLIST_ACTION_CUSTOMIZE,"join-slack":e.SIDEBAR$ONBOARDING_CHECKLIST_ACTION_JOIN_SLACK},_={"configure-llm":`https://docs.openhands.dev/openhands/usage/settings/llm-settings#llm-profiles`,"start-conversation":`https://docs.openhands.dev/openhands/usage/agent-canvas/backends`,"schedule-task":t,"customize-agent":`https://docs.openhands.dev/openhands/usage/agent-canvas/customize-and-settings`,"connect-mcp":`https://docs.openhands.dev/overview/model-context-protocol`,"join-slack":`https://docs.openhands.dev/overview/community`};function v(e){return e===`/settings/agents`||e.startsWith(`/settings/agents/`)}function y(){return typeof window>`u`?!1:window.localStorage.getItem(r)===`true`}function b(){return y()}function x(e){let t=()=>e();return window.addEventListener(`storage`,t),window.addEventListener(i,t),()=>{window.removeEventListener(`storage`,t),window.removeEventListener(i,t)}}function S(e){window.localStorage.setItem(r,e?`true`:`false`),window.dispatchEvent(new Event(i))}function C(){return typeof window>`u`?!1:window.localStorage.getItem(a)===`true`}function w(e){window.localStorage.setItem(a,e?`true`:`false`)}function T(){return typeof window>`u`?!1:window.localStorage.getItem(o)===`true`}function E(e){window.localStorage.setItem(o,e?`true`:`false`)}function D(){return typeof window>`u`?!1:window.localStorage.getItem(s)===`true`}function O(e){window.localStorage.setItem(s,e?`true`:`false`)}export{u as _,D as a,f as b,S as c,g as d,h as f,c as g,m as h,C as i,w as l,_ as m,T as n,x as o,d as p,y as r,E as s,b as t,O as u,p as v,v as y};
@@ -0,0 +1 @@
1
+ import{i as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t}from"./react-BX7IV650.js";import{g as n,m as r}from"./conversation-store-DC-JlJuq.js";var i=e(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),a=e(`panels-top-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M9 21V9`,key:`1oto5p`}]]),o=e(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),s=t(e=>({isOpen:!1,open:()=>e({isOpen:!0}),close:()=>e({isOpen:!1}),toggle:()=>e(e=>({isOpen:!e.isOpen}))})),c=`openhands-sidebar`,l=`openhands-sidebar-collapsed`,u=t()(n(e=>({collapsed:!1,setCollapsed:t=>e(e=>({collapsed:typeof t==`function`?t(e.collapsed):t})),toggleCollapsed:()=>e(e=>({collapsed:!e.collapsed}))}),{name:c,storage:r(()=>localStorage),partialize:e=>({collapsed:e.collapsed})}));if(typeof window<`u`)try{let e=window.localStorage.getItem(l);window.localStorage.getItem(c)===null&&(e===`true`||e===`false`)&&u.setState({collapsed:e===`true`}),e!==null&&window.localStorage.removeItem(l)}catch{}export{i as a,a as i,s as n,o as r,u as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./useTranslation-CCgUjPJF.js";import{K as a,t as o}from"./utils-D-gOfhmN.js";import{i as s}from"./extension-module-card-classes-DpeaYhYo.js";var c=e(t(),1),l=e(n(),1),u=r(),d=s,f=6,p=8,m=4;function h(e,t){let n=window.innerWidth-p-t,r=e.left;return r>n&&(r=e.right-t),r=Math.min(Math.max(p,r),Math.max(p,n)),{top:e.bottom+m,left:r}}function g(e,t){if(e.length===0||t<=0)return 0;let n=0;for(let r=0;r<e.length;r+=1){let i=e[r],a=r>0?f:0,o=e.length-r-1>0?46:0;if(n+a+i+o>t)return Math.max(1,r);n+=a+i}return e.length}function _({pills:e,testId:t}){let{t:n}=i(`openhands`),r=c.useRef(null),d=c.useRef(null),f=c.useRef(null),p=c.useRef(null),[m,_]=c.useState(e.length),[v,y]=c.useState(!1),[b,x]=c.useState(null),S=c.useCallback(()=>{let e=r.current,t=d.current;!e||!t||_(g(Array.from(t.children).map(e=>e.offsetWidth),e.clientWidth))},[]),C=e.map(e=>e.id).join(``),w=c.useRef(null);c.useLayoutEffect(()=>{w.current!==C&&(w.current=C,y(!1),S())},[C,S]),c.useEffect(()=>{let e=r.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>S());return t.observe(e),()=>t.disconnect()},[S]);let T=c.useCallback(()=>{let e=f.current;if(!e)return;let t=h(e.getBoundingClientRect(),p.current?.offsetWidth??e.offsetWidth);x(e=>e?.top===t.top&&e?.left===t.left?e:t)},[]);if(c.useLayoutEffect(()=>{if(!v){x(null);return}return T(),window.addEventListener(`resize`,T),window.addEventListener(`scroll`,T,!0),()=>{window.removeEventListener(`resize`,T),window.removeEventListener(`scroll`,T,!0)}},[v,T]),c.useLayoutEffect(()=>{v&&b&&p.current&&T()},[v,T,b]),c.useEffect(()=>{if(!v)return;let e=e=>{let t=e.target;f.current?.contains(t)||p.current?.contains(t)||y(!1)},t=e=>{e.key===`Escape`&&y(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[v]),e.length===0)return null;let E=Math.max(0,e.length-m),D=e.slice(m),O=e=>{e.stopPropagation()};return(0,u.jsxs)(`div`,{"data-testid":`${t}-wrap`,className:`min-w-0 overflow-hidden`,children:[(0,u.jsx)(`div`,{ref:d,"aria-hidden":!0,className:`pointer-events-none fixed top-0 -left-[10000px] z-[-1] flex flex-nowrap items-center gap-1.5 opacity-0`,children:e.map(e=>(0,u.jsx)(`span`,{className:`inline-flex shrink-0`,children:e.node},e.id))}),(0,u.jsxs)(`div`,{ref:r,"data-testid":t,className:`flex w-full min-w-0 max-w-full flex-nowrap items-center gap-1.5 overflow-hidden`,children:[e.slice(0,m).map(e=>(0,u.jsx)(`span`,{className:`inline-flex shrink-0`,children:e.node},e.id)),E>0?(0,u.jsx)(`button`,{ref:f,type:`button`,"data-testid":`${t}-overflow`,"aria-expanded":v,"aria-haspopup":`dialog`,"aria-label":n(a.SETTINGS$SKILLS_PILLS_OVERFLOW_ARIA,{count:E}),onMouseDown:O,onClick:e=>{e.preventDefault(),e.stopPropagation(),y(e=>!e)},onKeyDown:O,className:o(s,`cursor-pointer font-medium text-tertiary-alt hover:text-white`),children:n(a.SETTINGS$SKILLS_PILLS_MORE,{count:E})}):null]}),v&&b&&typeof document<`u`&&(0,l.createPortal)((0,u.jsx)(`div`,{ref:p,role:`dialog`,"data-testid":`${t}-overflow-popover`,className:o(`z-[9999] flex w-max max-w-[20rem] flex-col gap-1.5`,`rounded-md border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface)] p-2 shadow-lg`),style:{position:`fixed`,top:b.top,left:b.left},onMouseDown:O,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:D.map(e=>(0,u.jsx)(`div`,{"data-testid":`${t}-overflow-item`,className:`min-w-0`,children:e.node},e.id))}),document.body)]})}export{_ as n,d as t};
@@ -1,2 +1,2 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";import{t as a}from"./vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-DkPlXWl9.js";import{K as o,t as s}from"./utils-BOco8mxR.js";import{t as c}from"./bot-CLMxGFaq.js";import{t as l}from"./check-fDEfgSzj.js";import{n as u,r as d,t as f}from"./wrench-CkgI4rxA.js";import{t as p}from"./list-filter-CNpqTWVY.js";import{t as ee}from"./plug-CeaqeF6u.js";import{n as te,t as ne}from"./x-By6qCmtY.js";import{t as re}from"./shield-check-DO7wa_eu.js";import{r as ie}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C7HiY4Ae.js";import{t as m}from"./modal-backdrop-BSzNhM4r.js";import{n as ae,t as h}from"./modal-body-DJw4xBki.js";import{n as g}from"./modal-classes-Dg0ngBPO.js";import{t as _}from"./brand-button-DxPO4Lf8.js";import{t as v}from"./modal-close-button-B9j4nasm.js";import{a as y}from"./skill-enablement-DXeaImBz.js";import{t as b}from"./checkmark-XZyokq_Y.js";import{t as x}from"./copy-Drmhc2jD.js";import{a as oe,r as se}from"./extension-module-card-classes-DpeaYhYo.js";import{t as ce}from"./settings-switch-B78Khmyz.js";import{n as S,t as C}from"./skill-card-pill-row-989y15jV.js";import{n as le}from"./circle-plus-check-toggle-Fr-h-mbL.js";import{n as ue,t as w}from"./skill-scope-Dz3kPH3P.js";import{n as T,t as de}from"./use-launch-skill-in-chat-DeYa1tFM.js";import{t as E}from"./skill-icon-badge-BDhQ-tQ0.js";var fe=i(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),pe=i(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),me=i(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),D=e(t(),1),O=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;function he(e){let t=e.match(/^description:\s*\|\s*\r?\n((?:[ \t].*(?:\r?\n|$))+)/m);if(t)return t[1].replace(/^[ \t]+/gm,``).trim();let n=e.match(/^description:\s*['"](.+?)['"]\s*$/m);if(n)return n[1].trim();let r=e.match(/^description:\s*(.+)\s*$/m);return r?r[1].trim():null}function ge(e){let t=e.match(O);return t?e.slice(t[0].length).trim():e.trim()}function _e(e){let t=e.replace(/^#+\s+[^\n]+\n+/,``).trim();return t.split(/\n\s*\n/).map(e=>e.replace(/\s+/g,` `).trim()).find(e=>e.length>0)??t.replace(/\s+/g,` `).trim()}function k(e){let t=e.description?.trim();if(t)return t;let n=e.content?.trim();if(!n)return``;let r=n.match(O);if(r){let e=he(r[1]);if(e)return e}return _e(ge(n))}var A=n(),ve=`inline-flex shrink-0 items-center whitespace-nowrap rounded-full border border-text-secondary/35 bg-text-secondary/12 px-2 py-0.5 text-[11px] font-medium leading-4 text-tertiary-light`,ye={agentskills:{labelKey:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS},knowledge:{labelKey:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE},repo:{labelKey:o.SETTINGS$SKILLS_TYPE_REPO}};function be({type:e}){let{t}=r(`openhands`),n=ye[e];return(0,A.jsx)(`span`,{"data-testid":`skill-type-badge-${e}`,className:ve,children:t(n.labelKey)})}var j=[`automations`,`environment`,`code-hosting`,`agent-authoring`,`code-quality`,`integrations`,`writing`,`design`,`other`],M={automations:o.SETTINGS$SKILLS_CATEGORY_AUTOMATIONS,environment:o.SETTINGS$SKILLS_CATEGORY_ENVIRONMENT,"code-hosting":o.SETTINGS$SKILLS_CATEGORY_CODE_HOSTING,"agent-authoring":o.SETTINGS$SKILLS_CATEGORY_AGENT_AUTHORING,"code-quality":o.SETTINGS$SKILLS_CATEGORY_CODE_QUALITY,integrations:o.SETTINGS$SKILLS_CATEGORY_INTEGRATIONS,writing:o.SETTINGS$SKILLS_CATEGORY_WRITING,design:o.SETTINGS$SKILLS_CATEGORY_DESIGN,other:o.SETTINGS$SKILLS_CATEGORY_OTHER},N={automations:u,environment:f,"code-hosting":d,"agent-authoring":c,"code-quality":re,integrations:ee,writing:me,design:pe,other:fe},xe=`other`,Se=new Set(ie);function P(e){let t=e.category;return t&&Se.has(t)?t:xe}function F(e,t,n){if(e)return`${e}-${t}-${n}`}function I(e,t,n={}){let{variant:r=`card`,testIdPrefix:i}=n,a=P(e),c=[{id:`type-${e.type}`,node:(0,A.jsx)(be,{type:e.type})}];if(y(e.name)&&c.push({id:`recommended`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`recommended`)??`skill-recommended-${e.name}`,className:C,children:t(o.SETTINGS$SKILLS_RECOMMENDED)})}),a!==`other`&&c.push({id:`category-${a}`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`category`)??`skill-category-${e.name}`,className:C,children:t(M[a])})}),e.version&&c.push({id:`version-${e.version}`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`version`)??`skill-version-${e.name}`,className:C,children:t(o.SETTINGS$SKILLS_VERSION,{version:e.version})})}),r===`detail`&&e.license&&c.push({id:`license-${e.license}`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`license`),className:C,children:e.license})}),r===`detail`&&e.compatibility&&c.push({id:`compatibility-${e.compatibility}`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`compatibility`),className:C,children:e.compatibility})}),e.disable_model_invocation&&c.push({id:`disable-model-invocation`,node:(0,A.jsxs)(`span`,{"data-testid":F(i,e.name,`disable-model-invocation`)??`skill-disable-model-invocation-${e.name}`,className:`inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full border border-[rgba(248,113,113,0.35)] bg-[rgba(248,113,113,0.12)] px-2 py-0.5 text-[11px] font-medium leading-4 text-[#fca5a5]`,children:[(0,A.jsx)(`span`,{className:`size-1.5 rounded-full bg-[#fca5a5]`}),t(o.SETTINGS$SKILLS_DISABLE_MODEL_INVOCATION)]})}),r===`detail`&&e.allowed_tools)for(let t of e.allowed_tools)c.push({id:`allowed-tool-${t}`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`tool-${t}`),className:s(C,`font-mono`),children:t})});if(r===`detail`&&e.metadata)for(let[t,n]of Object.entries(e.metadata))c.push({id:`metadata-${t}`,node:(0,A.jsxs)(`span`,{"data-testid":F(i,e.name,`metadata-${t}`),className:C,children:[(0,A.jsxs)(`span`,{className:`font-mono text-[10px] text-tertiary-light`,children:[t,`:`]}),` `,n]})});for(let t of e.triggers??[])c.push({id:`trigger-${t}`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`trigger-${t}`),className:C,children:t})});return c}function L(e){let t=e?.trim();return t?!!(/^https?:\/\//i.test(t)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`~`)||/^[A-Za-z]:[\\/]/.test(t)||t.includes(`/`)||t.includes(`\\`)):!1}function Ce({skill:e,enabled:t,onOpen:n,onToggle:i}){let{t:a}=r(`openhands`),[c,l]=D.useState(!1),u=k(e),d=D.useMemo(()=>I(e,a),[e,a]),f=L(e.source);return D.useEffect(()=>{if(!c)return;let e=setTimeout(()=>l(!1),2e3);return()=>clearTimeout(e)},[c]),(0,A.jsx)(`div`,{"data-testid":`skill-card-${e.name}`,role:`button`,tabIndex:0,onClick:n,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n())},className:s(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,oe,se),children:(0,A.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,A.jsx)(E,{skillName:e.name}),(0,A.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,A.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,A.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,A.jsx)(`h3`,{"data-testid":`skill-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,A.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,A.jsx)(`p`,{"data-testid":`skill-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),f?(0,A.jsx)(`button`,{type:`button`,"data-testid":`skill-copy-source-${e.name}`,"aria-label":a(c?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:c,onClick:async t=>{t.stopPropagation(),e.source&&(await navigator.clipboard.writeText(e.source),l(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:c?(0,A.jsx)(b,{width:12,height:12}):(0,A.jsx)(x,{width:12,height:12})}):null]}):null]}),(0,A.jsx)(le,{testId:`skill-toggle-${e.name}`,isSelected:t,onToggle:i,disableTooltipKey:o.COMMON$DISABLE})]}),u?(0,A.jsx)(`div`,{"data-testid":`skill-description-${e.name}`,className:`min-w-0`,children:(0,A.jsx)(`p`,{className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:u})}):null,d.length>0?(0,A.jsx)(S,{pills:d,testId:`skill-triggers-${e.name}`}):null]})]})})}var we=`https://docs.openhands.dev/overview/skills/adding#adding-new-skills`,R=`/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview`;function Te(e){return e.name===`add-skill`?R:`/${e.name} `}function Ee({testId:e,label:t,value:n}){return(0,A.jsxs)(`label`,{className:`flex min-w-0 w-full flex-col gap-2.5`,children:[(0,A.jsx)(`span`,{className:`text-sm`,children:t}),(0,A.jsx)(`textarea`,{"data-testid":e,readOnly:!0,value:n,rows:Math.min(12,Math.max(4,n.split(`
2
- `).length)),className:s(`bg-[var(--oh-surface-raised)] border border-[var(--oh-border-subtle)] w-full min-w-0 rounded-sm p-2 text-sm`,`cursor-not-allowed resize-none custom-scrollbar`)})]})}function De({skill:e,enabled:t,onToggle:n,onClose:i}){let{t:a}=r(`openhands`),s=de(),[c,l]=D.useState(!1),u=D.useMemo(()=>Te(e),[e]),d=k(e),f=D.useMemo(()=>I(e,a,{variant:`detail`,testIdPrefix:`skill-modal-pill`}),[e,a]),p=L(e.source);return D.useEffect(()=>{if(!c)return;let e=setTimeout(()=>l(!1),2e3);return()=>clearTimeout(e)},[c]),(0,A.jsx)(m,{onClose:i,"aria-label":e.name,children:(0,A.jsxs)(`div`,{"data-testid":`skill-detail-modal`,"data-skill-name":e.name,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col overflow-hidden rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,A.jsx)(v,{onClose:i,testId:`skill-detail-modal-close`}),(0,A.jsxs)(`header`,{className:`flex flex-shrink-0 items-start gap-3 pb-4 pl-6 pr-12 pt-6`,children:[(0,A.jsx)(E,{skillName:e.name}),(0,A.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,A.jsx)(`h2`,{"data-testid":`skill-modal-name-${e.name}`,className:g,children:e.name}),e.source?(0,A.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,A.jsx)(`p`,{"data-testid":`skill-modal-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),p?(0,A.jsx)(`button`,{type:`button`,"data-testid":`skill-modal-copy-source-${e.name}`,"aria-label":a(c?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:c,onClick:async()=>{e.source&&(await navigator.clipboard.writeText(e.source),l(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:c?(0,A.jsx)(b,{width:12,height:12}):(0,A.jsx)(x,{width:12,height:12})}):null]}):null]})]}),(0,A.jsxs)(`div`,{"data-testid":`skill-detail-modal-content`,className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto overscroll-contain px-6 custom-scrollbar-always`,children:[(0,A.jsx)(`div`,{"data-testid":`skill-modal-enable-row-${e.name}`,className:`flex w-full items-center rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)] px-3 py-2.5`,children:(0,A.jsx)(ce,{testId:`skill-modal-toggle-${e.name}`,isToggled:t,onToggle:n,togglePosition:`right`,children:a(t?o.SETTINGS$SKILLS_ENABLED:o.SETTINGS$SKILLS_DISABLED)})}),d?(0,A.jsx)(`p`,{"data-testid":`skill-modal-description-${e.name}`,className:`break-words whitespace-pre-line text-xs text-tertiary-light`,children:d}):null,f.length>0?(0,A.jsx)(S,{pills:f,testId:`skill-modal-pills-${e.name}`}):null,e.content?(0,A.jsx)(Ee,{testId:`skill-modal-field-content-${e.name}`,label:a(o.SETTINGS$SKILLS_CONTENT),value:e.content}):null]}),(0,A.jsxs)(`footer`,{"data-testid":`skill-detail-modal-actions`,className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,A.jsx)(_,{type:`button`,variant:`secondary`,onClick:i,testId:`skill-detail-close`,children:a(o.BUTTON$CLOSE)}),(0,A.jsx)(_,{type:`button`,variant:`primary`,isDisabled:!t,onClick:()=>s(u,i),testId:`skill-detail-use-skill-${e.name}`,startContent:(0,A.jsx)(T,{className:`size-4`,"aria-hidden":!0}),children:a(o.SETTINGS$SKILLS_USE_SKILL_BUTTON)})]})]})})}var Oe=[o.SETTINGS$SKILLS_ADD_MODAL_STEP_1,o.SETTINGS$SKILLS_ADD_MODAL_STEP_2,o.SETTINGS$SKILLS_ADD_MODAL_STEP_3,o.SETTINGS$SKILLS_ADD_MODAL_STEP_4,o.SETTINGS$SKILLS_ADD_MODAL_STEP_5],z={cmd:(0,A.jsx)(B,{}),path:(0,A.jsx)(B,{}),env:(0,A.jsx)(B,{})};function B({children:e}){return(0,A.jsx)(`code`,{className:s(`mx-0.5 inline-block rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] px-1.5 py-0.5 align-baseline font-mono text-[11px] text-white`),children:e})}function V(){let{t:e}=r(`openhands`),[t,n]=D.useState(!1);return D.useEffect(()=>{if(!t)return;let e=setTimeout(()=>n(!1),2e3);return()=>clearTimeout(e)},[t]),(0,A.jsxs)(`div`,{className:`relative`,children:[(0,A.jsx)(`pre`,{"data-testid":`add-skill-modal-example`,className:s(`overflow-x-auto rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] p-2 pr-10 text-xs text-white`),children:R}),(0,A.jsx)(`button`,{type:`button`,"data-testid":`add-skill-modal-example-copy`,"aria-label":e(t?o.BUTTON$COPIED:o.BUTTON$COPY),disabled:t,onClick:async()=>{await navigator.clipboard.writeText(R),n(!0)},className:s(`absolute right-2 top-2 cursor-pointer rounded-sm border border-[var(--oh-border-subtle)]`,`bg-base-secondary p-1 text-tertiary-alt transition-colors`,`hover:bg-[var(--oh-surface)] hover:text-white disabled:cursor-default [&_path]:fill-current`),children:t?(0,A.jsx)(b,{width:14,height:14}):(0,A.jsx)(x,{width:14,height:14})})]})}function H({i18nKey:e}){return(0,A.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:(0,A.jsx)(a,{ns:`openhands`,i18nKey:e,components:z})})}function ke({onClose:e}){let{t}=r(`openhands`);return(0,A.jsx)(m,{onClose:e,"aria-label":t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE),children:(0,A.jsxs)(`div`,{"data-testid":`add-skill-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,A.jsx)(v,{onClose:e,testId:`add-skill-modal-close`}),(0,A.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,A.jsx)(`h2`,{className:s(`pr-6`,g),children:t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE)}),(0,A.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_INTRO)})]}),(0,A.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,A.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,A.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_CHAT_TITLE)}),(0,A.jsx)(H,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_CHAT_BODY}),(0,A.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_EXAMPLE_LABEL)}),(0,A.jsx)(V,{}),(0,A.jsx)(`ol`,{className:`list-decimal space-y-1 pl-4 text-xs leading-relaxed text-tertiary-light`,children:Oe.map(e=>(0,A.jsx)(`li`,{children:e===o.SETTINGS$SKILLS_ADD_MODAL_STEP_3?(0,A.jsx)(a,{ns:`openhands`,i18nKey:e,components:z}):t(e)},e))})]}),(0,A.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,A.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS_TITLE)}),(0,A.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS)})]}),(0,A.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,A.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_TITLE)}),(0,A.jsx)(H,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_BODY})]}),(0,A.jsx)(H,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_PRIVATE_REPOS}),(0,A.jsx)(`a`,{href:we,target:`_blank`,rel:`noreferrer`,"data-testid":`add-skill-modal-docs-link`,className:`self-start text-xs text-[var(--oh-muted)] transition-colors hover:text-white hover:underline`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_VIEW_DOCS)})]}),(0,A.jsx)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:(0,A.jsx)(_,{type:`button`,variant:`secondary`,onClick:e,testId:`add-skill-modal-dismiss`,children:t(o.BUTTON$CLOSE)})})]})})}function Ae({search:e,onSearchChange:t,activeFilterCount:n,onOpenFilters:i}){let{t:a}=r(`openhands`);return(0,A.jsxs)(`div`,{"data-testid":`skills-toolbar`,className:`flex items-stretch gap-2`,children:[(0,A.jsxs)(`div`,{className:s(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,A.jsx)(te,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,A.jsx)(`input`,{"data-testid":`skills-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:a(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),"aria-label":a(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),className:s(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,A.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":a(o.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,A.jsx)(ne,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,A.jsxs)(`button`,{type:`button`,"data-testid":`skills-filters-button`,onClick:i,className:s(`flex shrink-0 items-center gap-2 rounded-lg px-3 py-2 text-sm md:hidden`,`border border-[var(--oh-border)] bg-base-secondary text-white`,`cursor-pointer hover:bg-[var(--oh-interactive-hover)]`),children:[(0,A.jsx)(p,{className:`size-4 shrink-0`,"aria-hidden":!0}),a(o.SETTINGS$SKILLS_FILTERS_BUTTON),n>0?(0,A.jsx)(`span`,{className:`rounded-full bg-white px-1.5 text-[11px] font-medium text-black`,children:n}):null]})]})}function je({labelKey:e,count:t,checked:n,disabled:i,icon:a,testId:o,onToggle:c}){let{t:u}=r(`openhands`),d=u(e);return(0,A.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":n,"data-testid":o,disabled:i,onClick:c,className:s(`flex w-full items-center gap-2 rounded-md px-1.5 py-1 text-left text-sm`,i?`cursor-default text-tertiary-alt/40`:`cursor-pointer hover:bg-[var(--oh-surface-raised)] hover:text-white`,n?`text-white`:`text-tertiary-light`),children:[(0,A.jsx)(`span`,{"aria-hidden":!0,className:s(`flex size-3.5 shrink-0 items-center justify-center rounded-[3px] border`,n?`border-white bg-white text-black`:`border-[var(--oh-border)]`),children:n?(0,A.jsx)(l,{className:`size-2.5`,strokeWidth:3}):null}),a?(0,A.jsx)(a,{className:`size-3.5 shrink-0`,"aria-hidden":!0}):null,(0,A.jsx)(`span`,{title:d,className:`min-w-0 flex-1 truncate`,children:d}),(0,A.jsx)(`span`,{className:`shrink-0 text-xs text-tertiary-alt`,children:t})]})}function Me(e,t){if(e===`category`)return N[t]}function U({groups:e,onToggle:t,className:n}){let{t:i}=r(`openhands`);return e.length===0?null:(0,A.jsx)(`div`,{"data-testid":`skill-facet-rail`,className:s(`flex min-w-0 flex-col gap-5`,n),children:e.map(e=>{let n=`skill-facet-group-${e.id}-title`;return(0,A.jsxs)(`div`,{"data-testid":`skill-facet-group-${e.id}`,role:`group`,"aria-labelledby":n,className:`flex flex-col gap-1.5`,children:[(0,A.jsx)(`span`,{id:n,className:`px-1 text-[11px] font-semibold uppercase tracking-wider text-tertiary-alt`,children:i(e.labelKey)}),e.rows.map(n=>(0,A.jsx)(je,{testId:`skill-facet-${e.id}-${n.value}`,labelKey:n.labelKey,count:n.count,checked:n.checked,disabled:n.disabled,icon:Me(e.id,n.value),onToggle:()=>t(e.id,n.value)},n.value))]},e.id)})})}function Ne({groups:e,activeCount:t,onToggle:n,onClearAll:i,onClose:a}){let{t:c}=r(`openhands`);return(0,A.jsx)(m,{onClose:a,"aria-label":c(o.SETTINGS$SKILLS_FILTERS_MODAL_TITLE),children:(0,A.jsxs)(ae,{testID:`skill-filters-modal`,className:s(`items-stretch`,h),children:[(0,A.jsx)(`h3`,{className:`text-lg font-semibold text-foreground`,children:c(o.SETTINGS$SKILLS_FILTERS_MODAL_TITLE)}),(0,A.jsx)(`div`,{className:`max-h-[60vh] overflow-y-auto custom-scrollbar-always`,children:(0,A.jsx)(U,{groups:e,onToggle:n})}),(0,A.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[t>0?(0,A.jsx)(_,{type:`button`,variant:`secondary`,testId:`skill-filters-modal-clear`,onClick:i,children:c(o.SETTINGS$SKILLS_CLEAR_FILTERS)}):null,(0,A.jsx)(_,{type:`button`,variant:`primary`,testId:`skill-filters-modal-done`,onClick:a,children:c(o.BUTTON$CLOSE)})]})]})})}var Pe=`source`,Fe=`category`,Ie=`type`,Le=`state`,Re=`recommendation`,W=[`enabled`,`disabled`],G=[`recommended`,`other`],K=[`agentskills`,`knowledge`,`repo`],q={query:``,sources:new Set,categories:new Set,types:new Set,states:new Set,recommendations:new Set};function J(e,t){return e.map(e=>({value:e,labelKey:t[e]}))}function Y(e,t){return new Set(e.filter(e=>t.has(e)))}var ze={project:o.SETTINGS$SKILLS_SOURCE_PROJECT,personal:o.SETTINGS$SKILLS_SOURCE_PERSONAL,public:o.SETTINGS$SKILLS_SOURCE_PUBLIC},Be={agentskills:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS,knowledge:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE,repo:o.SETTINGS$SKILLS_TYPE_REPO},Ve={enabled:o.SETTINGS$SKILLS_ENABLED,disabled:o.SETTINGS$SKILLS_DISABLED},He={recommended:o.SETTINGS$SKILLS_RECOMMENDED,other:o.SETTINGS$SKILLS_RECOMMENDATION_OTHER},X=[{id:`state`,labelKey:o.SETTINGS$SKILLS_FACET_STATE,param:Le,values:J(W,Ve),valueOf:(e,t)=>t(e)?`enabled`:`disabled`,selected:e=>e.states,withSelected:(e,t)=>({...e,states:Y(W,t)})},{id:`recommendation`,labelKey:o.SETTINGS$SKILLS_FACET_RECOMMENDATION,param:Re,values:J(G,He),valueOf:e=>y(e.name)?`recommended`:`other`,selected:e=>e.recommendations,withSelected:(e,t)=>({...e,recommendations:Y(G,t)})},{id:`source`,labelKey:o.SETTINGS$SKILLS_FACET_SOURCE,param:Pe,values:J(w,ze),valueOf:e=>ue(e),selected:e=>e.sources,withSelected:(e,t)=>({...e,sources:Y(w,t)})},{id:`category`,labelKey:o.SETTINGS$SKILLS_FACET_CATEGORY,param:Fe,values:J(j,M),valueOf:e=>P(e),selected:e=>e.categories,withSelected:(e,t)=>({...e,categories:Y(j,t)})},{id:`type`,labelKey:o.SETTINGS$SKILLS_FACET_TYPE,param:Ie,values:J(K,Be),valueOf:e=>e.type,selected:e=>e.types,withSelected:(e,t)=>({...e,types:Y(K,t)})}];function Ue(e){let t=X.find(t=>t.id===e);if(!t)throw Error(`Unknown skill facet group: ${e}`);return t}function We(e,t){let n=new Set(t.values.map(({value:e})=>e));return new Set(e.map(e=>e.trim()).filter(e=>n.has(e)))}function Ge(e){return X.reduce((t,n)=>n.withSelected(t,We(e.getAll(n.param),n)),{...q,query:e.get(`q`)??``})}function Ke(e){let t=new URLSearchParams;e.query&&t.set(`q`,e.query);for(let n of X){let r=n.selected(e);for(let{value:e}of n.values)r.has(e)&&t.append(n.param,e)}return t}function Z(e,t){let n=t.trim();if(!n)return!0;let r=[e.name,k(e),e.description??``,e.content??``,e.license??``,e.compatibility??``,...e.triggers??[],...e.allowed_tools??[]],i=n.toLowerCase();return r.some(e=>e.toLowerCase().includes(i))}function Q(e,t,n,r){return X.every(i=>{if(i.id===r)return!0;let a=i.selected(n);return a.size===0?!0:a.has(i.valueOf(e,t))})}function qe(e,t,n){return e.filter(e=>Z(e,n.query)&&Q(e,t,n))}function $(e,t,n){let r={};for(let i of e){let e=t.valueOf(i,n);r[e]=(r[e]??0)+1}return r}function Je(e,t,n,r,i){let a=$(t,e,r),o=e.values.filter(({value:e})=>(a[e]??0)>0),s=e.selected(i);if(o.length<2&&s.size===0)return null;let c=e.values.filter(({value:e})=>(a[e]??0)>0||s.has(e)),l=$(n.filter(t=>Q(t,r,i,e.id)),e,r);return{id:e.id,labelKey:e.labelKey,rows:c.map(({value:e,labelKey:t})=>{let n=l[e]??0,r=s.has(e);return{value:e,labelKey:t,count:n,checked:r,disabled:n===0&&!r}})}}function Ye(e,t,n){let r=e.filter(e=>Z(e,n.query));return X.map(i=>Je(i,e,r,t,n)).filter(e=>e!==null)}function Xe(e,t,n){let r=Ue(t);if(!r.values.some(e=>e.value===n))return e;let i=new Set(r.selected(e));return i.has(n)?i.delete(n):i.add(n),r.withSelected(e,i)}function Ze(e){return{...q,query:e.query}}function Qe(e){return X.reduce((t,n)=>t+n.selected(e).size,0)}export{Qe as a,Xe as c,Ae as d,ke as f,Ze as i,Ne as l,Ce as m,qe as n,Ge as o,De as p,Ye as r,Ke as s,q as t,U as u};
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{i as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as i}from"./vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BCe0JJVy.js";import{t as a}from"./useTranslation-CCgUjPJF.js";import{K as o,t as s}from"./utils-D-gOfhmN.js";import{t as c}from"./bot-ByolqPEr.js";import{t as l}from"./check-Bo8s5Ylg.js";import{n as u,r as d,t as f}from"./wrench-B8Wg_nbp.js";import{t as p}from"./list-filter-B8PQk3RA.js";import{t as ee}from"./plug-7ACOEbMs.js";import{n as te,t as ne}from"./x-CX8lVGwm.js";import{t as re}from"./shield-check-C3Rl0NF8.js";import{r as ie}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C7HiY4Ae.js";import{t as m}from"./modal-backdrop-BSzNhM4r.js";import{n as ae,t as h}from"./modal-body-DBweM2EN.js";import{n as g}from"./modal-classes-jvG85nkU.js";import{t as _}from"./brand-button-mQq2Ld1I.js";import{t as v}from"./modal-close-button-BrM5fNnn.js";import{a as y}from"./skill-enablement-DXeaImBz.js";import{t as b}from"./checkmark-XZyokq_Y.js";import{t as x}from"./copy-Drmhc2jD.js";import{a as oe,r as se}from"./extension-module-card-classes-DpeaYhYo.js";import{t as ce}from"./settings-switch-seaSJc7t.js";import{n as S,t as C}from"./skill-card-pill-row-TD39nfP3.js";import{n as le}from"./circle-plus-check-toggle-BbYBiUwv.js";import{n as ue,t as w}from"./skill-scope-BTRBQt0-.js";import{n as T,t as de}from"./use-launch-skill-in-chat-QbXDhiHr.js";import{t as E}from"./skill-icon-badge-vUEp7gsC.js";var fe=r(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),pe=r(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),me=r(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),D=e(t(),1),O=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;function he(e){let t=e.match(/^description:\s*\|\s*\r?\n((?:[ \t].*(?:\r?\n|$))+)/m);if(t)return t[1].replace(/^[ \t]+/gm,``).trim();let n=e.match(/^description:\s*['"](.+?)['"]\s*$/m);if(n)return n[1].trim();let r=e.match(/^description:\s*(.+)\s*$/m);return r?r[1].trim():null}function ge(e){let t=e.match(O);return t?e.slice(t[0].length).trim():e.trim()}function _e(e){let t=e.replace(/^#+\s+[^\n]+\n+/,``).trim();return t.split(/\n\s*\n/).map(e=>e.replace(/\s+/g,` `).trim()).find(e=>e.length>0)??t.replace(/\s+/g,` `).trim()}function k(e){let t=e.description?.trim();if(t)return t;let n=e.content?.trim();if(!n)return``;let r=n.match(O);if(r){let e=he(r[1]);if(e)return e}return _e(ge(n))}var A=n(),ve=`inline-flex shrink-0 items-center whitespace-nowrap rounded-full border border-text-secondary/35 bg-text-secondary/12 px-2 py-0.5 text-[11px] font-medium leading-4 text-tertiary-light`,ye={agentskills:{labelKey:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS},knowledge:{labelKey:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE},repo:{labelKey:o.SETTINGS$SKILLS_TYPE_REPO}};function be({type:e}){let{t}=a(`openhands`),n=ye[e];return(0,A.jsx)(`span`,{"data-testid":`skill-type-badge-${e}`,className:ve,children:t(n.labelKey)})}var j=[`automations`,`environment`,`code-hosting`,`agent-authoring`,`code-quality`,`integrations`,`writing`,`design`,`other`],M={automations:o.SETTINGS$SKILLS_CATEGORY_AUTOMATIONS,environment:o.SETTINGS$SKILLS_CATEGORY_ENVIRONMENT,"code-hosting":o.SETTINGS$SKILLS_CATEGORY_CODE_HOSTING,"agent-authoring":o.SETTINGS$SKILLS_CATEGORY_AGENT_AUTHORING,"code-quality":o.SETTINGS$SKILLS_CATEGORY_CODE_QUALITY,integrations:o.SETTINGS$SKILLS_CATEGORY_INTEGRATIONS,writing:o.SETTINGS$SKILLS_CATEGORY_WRITING,design:o.SETTINGS$SKILLS_CATEGORY_DESIGN,other:o.SETTINGS$SKILLS_CATEGORY_OTHER},N={automations:u,environment:f,"code-hosting":d,"agent-authoring":c,"code-quality":re,integrations:ee,writing:me,design:pe,other:fe},xe=`other`,Se=new Set(ie);function P(e){let t=e.category;return t&&Se.has(t)?t:xe}function F(e,t,n){if(e)return`${e}-${t}-${n}`}function I(e,t,n={}){let{variant:r=`card`,testIdPrefix:i}=n,a=P(e),c=[{id:`type-${e.type}`,node:(0,A.jsx)(be,{type:e.type})}];if(y(e.name)&&c.push({id:`recommended`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`recommended`)??`skill-recommended-${e.name}`,className:C,children:t(o.SETTINGS$SKILLS_RECOMMENDED)})}),a!==`other`&&c.push({id:`category-${a}`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`category`)??`skill-category-${e.name}`,className:C,children:t(M[a])})}),e.version&&c.push({id:`version-${e.version}`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`version`)??`skill-version-${e.name}`,className:C,children:t(o.SETTINGS$SKILLS_VERSION,{version:e.version})})}),r===`detail`&&e.license&&c.push({id:`license-${e.license}`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`license`),className:C,children:e.license})}),r===`detail`&&e.compatibility&&c.push({id:`compatibility-${e.compatibility}`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`compatibility`),className:C,children:e.compatibility})}),e.disable_model_invocation&&c.push({id:`disable-model-invocation`,node:(0,A.jsxs)(`span`,{"data-testid":F(i,e.name,`disable-model-invocation`)??`skill-disable-model-invocation-${e.name}`,className:`inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full border border-[rgba(248,113,113,0.35)] bg-[rgba(248,113,113,0.12)] px-2 py-0.5 text-[11px] font-medium leading-4 text-[#fca5a5]`,children:[(0,A.jsx)(`span`,{className:`size-1.5 rounded-full bg-[#fca5a5]`}),t(o.SETTINGS$SKILLS_DISABLE_MODEL_INVOCATION)]})}),r===`detail`&&e.allowed_tools)for(let t of e.allowed_tools)c.push({id:`allowed-tool-${t}`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`tool-${t}`),className:s(C,`font-mono`),children:t})});if(r===`detail`&&e.metadata)for(let[t,n]of Object.entries(e.metadata))c.push({id:`metadata-${t}`,node:(0,A.jsxs)(`span`,{"data-testid":F(i,e.name,`metadata-${t}`),className:C,children:[(0,A.jsxs)(`span`,{className:`font-mono text-[10px] text-tertiary-light`,children:[t,`:`]}),` `,n]})});for(let t of e.triggers??[])c.push({id:`trigger-${t}`,node:(0,A.jsx)(`span`,{"data-testid":F(i,e.name,`trigger-${t}`),className:C,children:t})});return c}function L(e){let t=e?.trim();return t?!!(/^https?:\/\//i.test(t)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`~`)||/^[A-Za-z]:[\\/]/.test(t)||t.includes(`/`)||t.includes(`\\`)):!1}function Ce({skill:e,enabled:t,onOpen:n,onToggle:r}){let{t:i}=a(`openhands`),[c,l]=D.useState(!1),u=k(e),d=D.useMemo(()=>I(e,i),[e,i]),f=L(e.source);return D.useEffect(()=>{if(!c)return;let e=setTimeout(()=>l(!1),2e3);return()=>clearTimeout(e)},[c]),(0,A.jsx)(`div`,{"data-testid":`skill-card-${e.name}`,role:`button`,tabIndex:0,onClick:n,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n())},className:s(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,oe,se),children:(0,A.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,A.jsx)(E,{skillName:e.name}),(0,A.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,A.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,A.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,A.jsx)(`h3`,{"data-testid":`skill-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,A.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,A.jsx)(`p`,{"data-testid":`skill-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),f?(0,A.jsx)(`button`,{type:`button`,"data-testid":`skill-copy-source-${e.name}`,"aria-label":i(c?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:c,onClick:async t=>{t.stopPropagation(),e.source&&(await navigator.clipboard.writeText(e.source),l(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:c?(0,A.jsx)(b,{width:12,height:12}):(0,A.jsx)(x,{width:12,height:12})}):null]}):null]}),(0,A.jsx)(le,{testId:`skill-toggle-${e.name}`,isSelected:t,onToggle:r,disableTooltipKey:o.COMMON$DISABLE})]}),u?(0,A.jsx)(`div`,{"data-testid":`skill-description-${e.name}`,className:`min-w-0`,children:(0,A.jsx)(`p`,{className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:u})}):null,d.length>0?(0,A.jsx)(S,{pills:d,testId:`skill-triggers-${e.name}`}):null]})]})})}var we=`https://docs.openhands.dev/overview/skills/adding#adding-new-skills`,R=`/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview`;function Te(e){return e.name===`add-skill`?R:`/${e.name} `}function Ee({testId:e,label:t,value:n}){return(0,A.jsxs)(`label`,{className:`flex min-w-0 w-full flex-col gap-2.5`,children:[(0,A.jsx)(`span`,{className:`text-sm`,children:t}),(0,A.jsx)(`textarea`,{"data-testid":e,readOnly:!0,value:n,rows:Math.min(12,Math.max(4,n.split(`
2
+ `).length)),className:s(`bg-[var(--oh-surface-raised)] border border-[var(--oh-border-subtle)] w-full min-w-0 rounded-sm p-2 text-sm`,`cursor-not-allowed resize-none custom-scrollbar`)})]})}function De({skill:e,enabled:t,onToggle:n,onClose:r}){let{t:i}=a(`openhands`),s=de(),[c,l]=D.useState(!1),u=D.useMemo(()=>Te(e),[e]),d=k(e),f=D.useMemo(()=>I(e,i,{variant:`detail`,testIdPrefix:`skill-modal-pill`}),[e,i]),p=L(e.source);return D.useEffect(()=>{if(!c)return;let e=setTimeout(()=>l(!1),2e3);return()=>clearTimeout(e)},[c]),(0,A.jsx)(m,{onClose:r,"aria-label":e.name,children:(0,A.jsxs)(`div`,{"data-testid":`skill-detail-modal`,"data-skill-name":e.name,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col overflow-hidden rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,A.jsx)(v,{onClose:r,testId:`skill-detail-modal-close`}),(0,A.jsxs)(`header`,{className:`flex flex-shrink-0 items-start gap-3 pb-4 pl-6 pr-12 pt-6`,children:[(0,A.jsx)(E,{skillName:e.name}),(0,A.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,A.jsx)(`h2`,{"data-testid":`skill-modal-name-${e.name}`,className:g,children:e.name}),e.source?(0,A.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,A.jsx)(`p`,{"data-testid":`skill-modal-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),p?(0,A.jsx)(`button`,{type:`button`,"data-testid":`skill-modal-copy-source-${e.name}`,"aria-label":i(c?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:c,onClick:async()=>{e.source&&(await navigator.clipboard.writeText(e.source),l(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:c?(0,A.jsx)(b,{width:12,height:12}):(0,A.jsx)(x,{width:12,height:12})}):null]}):null]})]}),(0,A.jsxs)(`div`,{"data-testid":`skill-detail-modal-content`,className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto overscroll-contain px-6 custom-scrollbar-always`,children:[(0,A.jsx)(`div`,{"data-testid":`skill-modal-enable-row-${e.name}`,className:`flex w-full items-center rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)] px-3 py-2.5`,children:(0,A.jsx)(ce,{testId:`skill-modal-toggle-${e.name}`,isToggled:t,onToggle:n,togglePosition:`right`,children:i(t?o.SETTINGS$SKILLS_ENABLED:o.SETTINGS$SKILLS_DISABLED)})}),d?(0,A.jsx)(`p`,{"data-testid":`skill-modal-description-${e.name}`,className:`break-words whitespace-pre-line text-xs text-tertiary-light`,children:d}):null,f.length>0?(0,A.jsx)(S,{pills:f,testId:`skill-modal-pills-${e.name}`}):null,e.content?(0,A.jsx)(Ee,{testId:`skill-modal-field-content-${e.name}`,label:i(o.SETTINGS$SKILLS_CONTENT),value:e.content}):null]}),(0,A.jsxs)(`footer`,{"data-testid":`skill-detail-modal-actions`,className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,A.jsx)(_,{type:`button`,variant:`secondary`,onClick:r,testId:`skill-detail-close`,children:i(o.BUTTON$CLOSE)}),(0,A.jsx)(_,{type:`button`,variant:`primary`,isDisabled:!t,onClick:()=>s(u,r),testId:`skill-detail-use-skill-${e.name}`,startContent:(0,A.jsx)(T,{className:`size-4`,"aria-hidden":!0}),children:i(o.SETTINGS$SKILLS_USE_SKILL_BUTTON)})]})]})})}var Oe=[o.SETTINGS$SKILLS_ADD_MODAL_STEP_1,o.SETTINGS$SKILLS_ADD_MODAL_STEP_2,o.SETTINGS$SKILLS_ADD_MODAL_STEP_3,o.SETTINGS$SKILLS_ADD_MODAL_STEP_4,o.SETTINGS$SKILLS_ADD_MODAL_STEP_5],z={cmd:(0,A.jsx)(B,{}),path:(0,A.jsx)(B,{}),env:(0,A.jsx)(B,{})};function B({children:e}){return(0,A.jsx)(`code`,{className:s(`mx-0.5 inline-block rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] px-1.5 py-0.5 align-baseline font-mono text-[11px] text-white`),children:e})}function V(){let{t:e}=a(`openhands`),[t,n]=D.useState(!1);return D.useEffect(()=>{if(!t)return;let e=setTimeout(()=>n(!1),2e3);return()=>clearTimeout(e)},[t]),(0,A.jsxs)(`div`,{className:`relative`,children:[(0,A.jsx)(`pre`,{"data-testid":`add-skill-modal-example`,className:s(`overflow-x-auto rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] p-2 pr-10 text-xs text-white`),children:R}),(0,A.jsx)(`button`,{type:`button`,"data-testid":`add-skill-modal-example-copy`,"aria-label":e(t?o.BUTTON$COPIED:o.BUTTON$COPY),disabled:t,onClick:async()=>{await navigator.clipboard.writeText(R),n(!0)},className:s(`absolute right-2 top-2 cursor-pointer rounded-sm border border-[var(--oh-border-subtle)]`,`bg-base-secondary p-1 text-tertiary-alt transition-colors`,`hover:bg-[var(--oh-surface)] hover:text-white disabled:cursor-default [&_path]:fill-current`),children:t?(0,A.jsx)(b,{width:14,height:14}):(0,A.jsx)(x,{width:14,height:14})})]})}function H({i18nKey:e}){return(0,A.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:(0,A.jsx)(i,{ns:`openhands`,i18nKey:e,components:z})})}function ke({onClose:e}){let{t}=a(`openhands`);return(0,A.jsx)(m,{onClose:e,"aria-label":t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE),children:(0,A.jsxs)(`div`,{"data-testid":`add-skill-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,A.jsx)(v,{onClose:e,testId:`add-skill-modal-close`}),(0,A.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,A.jsx)(`h2`,{className:s(`pr-6`,g),children:t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE)}),(0,A.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_INTRO)})]}),(0,A.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,A.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,A.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_CHAT_TITLE)}),(0,A.jsx)(H,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_CHAT_BODY}),(0,A.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_EXAMPLE_LABEL)}),(0,A.jsx)(V,{}),(0,A.jsx)(`ol`,{className:`list-decimal space-y-1 pl-4 text-xs leading-relaxed text-tertiary-light`,children:Oe.map(e=>(0,A.jsx)(`li`,{children:e===o.SETTINGS$SKILLS_ADD_MODAL_STEP_3?(0,A.jsx)(i,{ns:`openhands`,i18nKey:e,components:z}):t(e)},e))})]}),(0,A.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,A.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS_TITLE)}),(0,A.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS)})]}),(0,A.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,A.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_TITLE)}),(0,A.jsx)(H,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_BODY})]}),(0,A.jsx)(H,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_PRIVATE_REPOS}),(0,A.jsx)(`a`,{href:we,target:`_blank`,rel:`noreferrer`,"data-testid":`add-skill-modal-docs-link`,className:`self-start text-xs text-[var(--oh-muted)] transition-colors hover:text-white hover:underline`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_VIEW_DOCS)})]}),(0,A.jsx)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:(0,A.jsx)(_,{type:`button`,variant:`secondary`,onClick:e,testId:`add-skill-modal-dismiss`,children:t(o.BUTTON$CLOSE)})})]})})}function Ae({search:e,onSearchChange:t,activeFilterCount:n,onOpenFilters:r}){let{t:i}=a(`openhands`);return(0,A.jsxs)(`div`,{"data-testid":`skills-toolbar`,className:`flex items-stretch gap-2`,children:[(0,A.jsxs)(`div`,{className:s(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,A.jsx)(te,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,A.jsx)(`input`,{"data-testid":`skills-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),"aria-label":i(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),className:s(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,A.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(o.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,A.jsx)(ne,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,A.jsxs)(`button`,{type:`button`,"data-testid":`skills-filters-button`,onClick:r,className:s(`flex shrink-0 items-center gap-2 rounded-lg px-3 py-2 text-sm md:hidden`,`border border-[var(--oh-border)] bg-base-secondary text-white`,`cursor-pointer hover:bg-[var(--oh-interactive-hover)]`),children:[(0,A.jsx)(p,{className:`size-4 shrink-0`,"aria-hidden":!0}),i(o.SETTINGS$SKILLS_FILTERS_BUTTON),n>0?(0,A.jsx)(`span`,{className:`rounded-full bg-white px-1.5 text-[11px] font-medium text-black`,children:n}):null]})]})}function je({labelKey:e,count:t,checked:n,disabled:r,icon:i,testId:o,onToggle:c}){let{t:u}=a(`openhands`),d=u(e);return(0,A.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":n,"data-testid":o,disabled:r,onClick:c,className:s(`flex w-full items-center gap-2 rounded-md px-1.5 py-1 text-left text-sm`,r?`cursor-default text-tertiary-alt/40`:`cursor-pointer hover:bg-[var(--oh-surface-raised)] hover:text-white`,n?`text-white`:`text-tertiary-light`),children:[(0,A.jsx)(`span`,{"aria-hidden":!0,className:s(`flex size-3.5 shrink-0 items-center justify-center rounded-[3px] border`,n?`border-white bg-white text-black`:`border-[var(--oh-border)]`),children:n?(0,A.jsx)(l,{className:`size-2.5`,strokeWidth:3}):null}),i?(0,A.jsx)(i,{className:`size-3.5 shrink-0`,"aria-hidden":!0}):null,(0,A.jsx)(`span`,{title:d,className:`min-w-0 flex-1 truncate`,children:d}),(0,A.jsx)(`span`,{className:`shrink-0 text-xs text-tertiary-alt`,children:t})]})}function Me(e,t){if(e===`category`)return N[t]}function U({groups:e,onToggle:t,className:n}){let{t:r}=a(`openhands`);return e.length===0?null:(0,A.jsx)(`div`,{"data-testid":`skill-facet-rail`,className:s(`flex min-w-0 flex-col gap-5`,n),children:e.map(e=>{let n=`skill-facet-group-${e.id}-title`;return(0,A.jsxs)(`div`,{"data-testid":`skill-facet-group-${e.id}`,role:`group`,"aria-labelledby":n,className:`flex flex-col gap-1.5`,children:[(0,A.jsx)(`span`,{id:n,className:`px-1 text-[11px] font-semibold uppercase tracking-wider text-tertiary-alt`,children:r(e.labelKey)}),e.rows.map(n=>(0,A.jsx)(je,{testId:`skill-facet-${e.id}-${n.value}`,labelKey:n.labelKey,count:n.count,checked:n.checked,disabled:n.disabled,icon:Me(e.id,n.value),onToggle:()=>t(e.id,n.value)},n.value))]},e.id)})})}function Ne({groups:e,activeCount:t,onToggle:n,onClearAll:r,onClose:i}){let{t:c}=a(`openhands`);return(0,A.jsx)(m,{onClose:i,"aria-label":c(o.SETTINGS$SKILLS_FILTERS_MODAL_TITLE),children:(0,A.jsxs)(ae,{testID:`skill-filters-modal`,className:s(`items-stretch`,h),children:[(0,A.jsx)(`h3`,{className:`text-lg font-semibold text-foreground`,children:c(o.SETTINGS$SKILLS_FILTERS_MODAL_TITLE)}),(0,A.jsx)(`div`,{className:`max-h-[60vh] overflow-y-auto custom-scrollbar-always`,children:(0,A.jsx)(U,{groups:e,onToggle:n})}),(0,A.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[t>0?(0,A.jsx)(_,{type:`button`,variant:`secondary`,testId:`skill-filters-modal-clear`,onClick:r,children:c(o.SETTINGS$SKILLS_CLEAR_FILTERS)}):null,(0,A.jsx)(_,{type:`button`,variant:`primary`,testId:`skill-filters-modal-done`,onClick:i,children:c(o.BUTTON$CLOSE)})]})]})})}var Pe=`source`,Fe=`category`,Ie=`type`,Le=`state`,Re=`recommendation`,W=[`enabled`,`disabled`],G=[`recommended`,`other`],K=[`agentskills`,`knowledge`,`repo`],q={query:``,sources:new Set,categories:new Set,types:new Set,states:new Set,recommendations:new Set};function J(e,t){return e.map(e=>({value:e,labelKey:t[e]}))}function Y(e,t){return new Set(e.filter(e=>t.has(e)))}var ze={project:o.SETTINGS$SKILLS_SOURCE_PROJECT,personal:o.SETTINGS$SKILLS_SOURCE_PERSONAL,public:o.SETTINGS$SKILLS_SOURCE_PUBLIC},Be={agentskills:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS,knowledge:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE,repo:o.SETTINGS$SKILLS_TYPE_REPO},Ve={enabled:o.SETTINGS$SKILLS_ENABLED,disabled:o.SETTINGS$SKILLS_DISABLED},He={recommended:o.SETTINGS$SKILLS_RECOMMENDED,other:o.SETTINGS$SKILLS_RECOMMENDATION_OTHER},X=[{id:`state`,labelKey:o.SETTINGS$SKILLS_FACET_STATE,param:Le,values:J(W,Ve),valueOf:(e,t)=>t(e)?`enabled`:`disabled`,selected:e=>e.states,withSelected:(e,t)=>({...e,states:Y(W,t)})},{id:`recommendation`,labelKey:o.SETTINGS$SKILLS_FACET_RECOMMENDATION,param:Re,values:J(G,He),valueOf:e=>y(e.name)?`recommended`:`other`,selected:e=>e.recommendations,withSelected:(e,t)=>({...e,recommendations:Y(G,t)})},{id:`source`,labelKey:o.SETTINGS$SKILLS_FACET_SOURCE,param:Pe,values:J(w,ze),valueOf:e=>ue(e),selected:e=>e.sources,withSelected:(e,t)=>({...e,sources:Y(w,t)})},{id:`category`,labelKey:o.SETTINGS$SKILLS_FACET_CATEGORY,param:Fe,values:J(j,M),valueOf:e=>P(e),selected:e=>e.categories,withSelected:(e,t)=>({...e,categories:Y(j,t)})},{id:`type`,labelKey:o.SETTINGS$SKILLS_FACET_TYPE,param:Ie,values:J(K,Be),valueOf:e=>e.type,selected:e=>e.types,withSelected:(e,t)=>({...e,types:Y(K,t)})}];function Ue(e){let t=X.find(t=>t.id===e);if(!t)throw Error(`Unknown skill facet group: ${e}`);return t}function We(e,t){let n=new Set(t.values.map(({value:e})=>e));return new Set(e.map(e=>e.trim()).filter(e=>n.has(e)))}function Ge(e){return X.reduce((t,n)=>n.withSelected(t,We(e.getAll(n.param),n)),{...q,query:e.get(`q`)??``})}function Ke(e){let t=new URLSearchParams;e.query&&t.set(`q`,e.query);for(let n of X){let r=n.selected(e);for(let{value:e}of n.values)r.has(e)&&t.append(n.param,e)}return t}function Z(e,t){let n=t.trim();if(!n)return!0;let r=[e.name,k(e),e.description??``,e.content??``,e.license??``,e.compatibility??``,...e.triggers??[],...e.allowed_tools??[]],i=n.toLowerCase();return r.some(e=>e.toLowerCase().includes(i))}function Q(e,t,n,r){return X.every(i=>{if(i.id===r)return!0;let a=i.selected(n);return a.size===0?!0:a.has(i.valueOf(e,t))})}function qe(e,t,n){return e.filter(e=>Z(e,n.query)&&Q(e,t,n))}function $(e,t,n){let r={};for(let i of e){let e=t.valueOf(i,n);r[e]=(r[e]??0)+1}return r}function Je(e,t,n,r,i){let a=$(t,e,r),o=e.values.filter(({value:e})=>(a[e]??0)>0),s=e.selected(i);if(o.length<2&&s.size===0)return null;let c=e.values.filter(({value:e})=>(a[e]??0)>0||s.has(e)),l=$(n.filter(t=>Q(t,r,i,e.id)),e,r);return{id:e.id,labelKey:e.labelKey,rows:c.map(({value:e,labelKey:t})=>{let n=l[e]??0,r=s.has(e);return{value:e,labelKey:t,count:n,checked:r,disabled:n===0&&!r}})}}function Ye(e,t,n){let r=e.filter(e=>Z(e,n.query));return X.map(i=>Je(i,e,r,t,n)).filter(e=>e!==null)}function Xe(e,t,n){let r=Ue(t);if(!r.values.some(e=>e.value===n))return e;let i=new Set(r.selected(e));return i.has(n)?i.delete(n):i.add(n),r.withSelected(e,i)}function Ze(e){return{...q,query:e.query}}function Qe(e){return X.reduce((t,n)=>t+n.selected(e).size,0)}export{Qe as a,Xe as c,Ae as d,ke as f,Ze as i,Ne as l,Ce as m,qe as n,Ge as o,De as p,Ye as r,Ke as s,q as t,U as u};
@@ -1 +1 @@
1
- import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./utils-BOco8mxR.js";import{t as n}from"./skills-B0IliMxw.js";var r=e();function i({skillName:e,className:i}){return(0,r.jsx)(`span`,{"aria-hidden":`true`,title:e,"data-testid":`skill-icon-${e}`,className:t(`inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden`,`rounded-lg border border-white/10 bg-surface-raised text-white`,`shadow-[inset_0_1px_0_rgba(255,255,255,0.18)]`,`[&>svg]:h-5 [&>svg]:w-5`,i),children:(0,r.jsx)(n,{})})}export{i as t};
1
+ import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./utils-D-gOfhmN.js";import{t as n}from"./skills-B0IliMxw.js";var r=e();function i({skillName:e,className:i}){return(0,r.jsx)(`span`,{"aria-hidden":`true`,title:e,"data-testid":`skill-icon-${e}`,className:t(`inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden`,`rounded-lg border border-white/10 bg-surface-raised text-white`,`shadow-[inset_0_1px_0_rgba(255,255,255,0.18)]`,`[&>svg]:h-5 [&>svg]:w-5`,i),children:(0,r.jsx)(n,{})})}export{i as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./useTranslation-CCgUjPJF.js";import{dt as r,n as i,st as a}from"./active-backend-context-BsLfwrXB.js";import{K as o}from"./utils-D-gOfhmN.js";import{c as s,n as c}from"./agent-server-client-options-EHB23gyx.js";import{s as l}from"./agent-server-config-C_x8Otd9.js";import{d as u}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js";import{t as d}from"./proxy-DbEf3Nqr.js";import{n as f}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C7HiY4Ae.js";import{n as p}from"./use-settings-BWIH5EuN.js";import{t as m}from"./use-save-settings-CikTu5xV.js";import{i as h,n as g,s as _,t as v}from"./skill-enablement-DXeaImBz.js";var y=100;function b(){let e=s().backend;if(e.kind!==`cloud`)throw Error(`Cloud skills call requires a cloud backend.`);return e}async function x(){let e=b(),t=[],n=null;do{let r=new URLSearchParams({limit:String(y)});n&&r.set(`page_id`,n);let i=await d({backend:e,method:`GET`,path:`/api/v1/skills/search?${r.toString()}`});t.push(...i.items??[]),n=i.next_page_id}while(n);return t}async function S(e){return((await d({backend:b(),method:`GET`,path:`/api/v1/app-conversations/${e}/skills`}))?.skills??[]).map(e=>({...e,source:null}))}function C(e){return{name:e.name,type:`knowledge`,source:`public`,description:e.description,triggers:e.triggers,category:e.category,content:e.content,license:e.license??null,compatibility:e.compatibility??null}}var w=f.map(C),T=class{static async getSkills(e){if(s().backend.kind===`cloud`)return x();let t=[];try{t=(await new u(c()).getSkills({load_public:!1,load_user:!0,load_project:!0,load_org:!1,project_dir:e??l()})).skills??[]}catch{}return[...t,...w]}static getConversationSkills(e){return S(e)}},E=e(t(),1);function D(e,t){return{enabledSkills:t?e?.enabled_skills:[...v],disabledSkills:e?.disabled_skills??[]}}function O(){let{backend:e}=i(),{data:t}=p(),n=e.kind!==`cloud`;return E.useMemo(()=>{let e=g(D(t,n));return t=>e(t.name)},[t?.enabled_skills,t?.disabled_skills,n])}function k(e){return JSON.stringify([[..._(e)].sort(),[...e.disabledSkills??[]].sort()])}function A(e,t,n){return e.includes(t)===n?e:n?[...e,t]:e.filter(e=>e!==t)}function j(){let{t:e}=n(`openhands`),{backend:t}=i(),s=t.kind!==`cloud`,{data:c,isLoading:l}=p(),{mutate:u}=m(),[d,f]=E.useState({}),v=E.useRef(null);return E.useEffect(()=>{if(l||!c)return;let e=D(c,s);v.current=k(e),f(e)},[l,c?.enabled_skills,c?.disabled_skills,s]),E.useEffect(()=>{let t=k(d);if(v.current===null||v.current===t)return;v.current=t;let n=d.disabledSkills??[];u(s?{enabled_skills:_(d),disabled_skills:n}:{disabled_skills:n},{onError:t=>{a(r(t)||e(o.ERROR$GENERIC))}})},[d,s,u,e]),{isEnabled:E.useMemo(()=>{let e=g(d);return t=>e(t.name)},[d]),setEnabled:E.useCallback((e,t)=>{f(n=>{let r=s&&h(e);return{enabledSkills:r?A(_(n),e,t):n.enabledSkills,disabledSkills:A(n.disabledSkills??[],e,!t&&!r)}})},[s])}}var M=[`project`,`personal`,`public`],N=[`/.agents/skills/`,`/.openhands/skills/`,`/.openhands/microagents/`];function P(e){return e.replace(/\\/g,`/`)}function F(e){let t=P(e).toLowerCase();return t===`public`?!0:t.includes(`public-skills`)||t.includes(`/.openhands/cache/skills/`)}function I(e){let t=P(e);return/^\/Users\/[^/]+\/\.(agents|openhands)\//.test(t)||/^\/home\/[^/]+\/\.(agents|openhands)\//.test(t)?!0:N.some(e=>{let n=t.indexOf(e);if(n===-1)return!1;let r=t.slice(0,n);return/^\/Users\/[^/]+$/.test(r)||/^\/home\/[^/]+$/.test(r)})}function L(e,t){let n=P(e);if(!N.some(e=>n.includes(e))||I(e))return!1;if(t){let e=P(t).replace(/\/$/,``);if(n.startsWith(e))return!0}return!0}function R(e,t){let n=e.source?.trim();if(!n)return e.type===`repo`?`project`:`public`;let r=n.toLowerCase();return F(n)?`public`:r===`user`||r===`global`?`personal`:r===`project`||r===`repo`||r===`sandbox`?`project`:I(n)?`personal`:L(n,t)?`project`:`public`}function z(e,t){let n={project:[],personal:[],public:[]};for(let r of e)n[R(r,t)].push(r);for(let e of M)n[e].sort((e,t)=>e.name.localeCompare(t.name));return n}export{j as a,O as i,R as n,T as o,z as r,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~i58xkef6-cHFhpUBq.js";import{f as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{t as a}from"./useMutation-Cszf8mKy.js";import{t as o}from"./useQuery-DAAacS7O.js";import{t as s}from"./useTranslation-CCgUjPJF.js";import{R as c,ct as l,dt as u,n as d,st as f}from"./active-backend-context-BsLfwrXB.js";import{K as p,t as m}from"./utils-D-gOfhmN.js";import{n as h}from"./extensions-navigation-CgCVSXje.js";import{n as g,t as _}from"./x-CX8lVGwm.js";import{t as v}from"./loading-spinner-DK1sAwVg.js";import{t as y}from"./modal-backdrop-BSzNhM4r.js";import{n as b}from"./modal-classes-jvG85nkU.js";import{t as x}from"./brand-button-mQq2Ld1I.js";import{n as S}from"./navigation-context-CQZwH_tC.js";import{t as C}from"./modal-close-button-BrM5fNnn.js";import{t as w}from"./settings-input-Cm4VxUon.js";import{t as T}from"./plugins-management-service-CcEpfNKz.js";import{a as E,i as D,r as O}from"./extension-module-card-classes-DpeaYhYo.js";import{t as k}from"./settings-switch-seaSJc7t.js";import{n as A}from"./circle-plus-check-toggle-BbYBiUwv.js";import{n as j,t as M}from"./use-plugins-marketplace-B8-ZEB34.js";import{t as N}from"./skill-icon-badge-vUEp7gsC.js";import{n as P}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";import{n as F,t as I}from"./highlighted-source-view-Bp0sgK-f.js";var L=e(t(),1),R=n();function z({plugin:e,isBusy:t=!1,isDisabled:n=!1,onOpen:r,onInstall:i,onToggle:a}){let{t:o}=s(`openhands`);return(0,R.jsxs)(`div`,{"data-testid":`plugin-card-${e.name}`,role:`button`,tabIndex:0,onClick:r,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},className:m(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,E,O),children:[(0,R.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`h3`,{"data-testid":`plugin-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,R.jsx)(`p`,{"data-testid":`plugin-source-${e.name}`,className:`mt-0.5 min-w-0 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}):null]}),e.installed?(0,R.jsx)(A,{testId:`plugin-toggle-${e.name}`,isSelected:e.enabled,isDisabled:n||t,onToggle:a,disableTooltipKey:p.COMMON$DISABLE}):e.isLocal?(0,R.jsx)(`span`,{"data-testid":`plugin-local-badge-${e.name}`,className:m(D,`flex-shrink-0`),children:o(p.SETTINGS$PLUGINS_FILTER_LOCAL)}):(0,R.jsx)(x,{type:`button`,variant:`secondary`,testId:`plugin-install-${e.name}`,isDisabled:n||t,className:`flex-shrink-0 whitespace-nowrap`,onClick:e=>{e?.stopPropagation(),i()},children:o(t?p.SETTINGS$PLUGINS_INSTALLING:p.SETTINGS$PLUGINS_INSTALL)})]}),e.description?(0,R.jsx)(`p`,{"data-testid":`plugin-description-${e.name}`,className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:e.description}):null,(e.installed||e.isLocal)&&e.version?(0,R.jsx)(`span`,{"data-testid":`plugin-version-${e.name}`,className:m(D,`self-start`),children:o(p.SETTINGS$SKILLS_VERSION,{version:e.version})}):null]})}var B=[{value:`all`,labelKey:p.SETTINGS$PLUGINS_FILTER_ALL},{value:`installed`,labelKey:p.SETTINGS$PLUGINS_FILTER_INSTALLED},{value:`available`,labelKey:p.SETTINGS$PLUGINS_FILTER_AVAILABLE},{value:`local`,labelKey:p.SETTINGS$PLUGINS_FILTER_LOCAL}];function V({search:e,onSearchChange:t,statusFilter:n,onStatusFilterChange:r}){let{t:i}=s(`openhands`);return(0,R.jsxs)(`div`,{"data-testid":`plugins-toolbar`,className:`flex items-stretch gap-2`,children:[(0,R.jsxs)(`div`,{className:m(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,R.jsx)(g,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,R.jsx)(`input`,{"data-testid":`plugins-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(p.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),"aria-label":i(p.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),className:m(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,R.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(p.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,R.jsx)(_,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,R.jsx)(`div`,{"data-testid":`plugins-status-filter`,className:`flex shrink-0 items-center gap-1 rounded-lg border border-[var(--oh-border)] bg-base-secondary p-1`,children:B.map(e=>(0,R.jsx)(`button`,{type:`button`,"data-testid":`plugins-filter-${e.value}`,"aria-pressed":n===e.value,onClick:()=>r(e.value),className:m(`cursor-pointer rounded-md px-3 py-1 text-xs transition-colors`,n===e.value?`bg-surface-raised text-white`:`text-tertiary-alt hover:text-white`),children:i(e.labelKey)},e.value))})]})}var H=(e,t)=>{let{backend:n,orgId:r}=d();return o({queryKey:[`plugin-file-content`,e,t,n.id,r],queryFn:()=>{if(!e||!t)throw Error(`No file selected`);return j.getPluginFileContent(e,t)},enabled:!!(e&&t),retry:!1,staleTime:1e3*60*10,refetchOnWindowFocus:!1})};function U({basePath:e,files:t}){let{t:n}=s(`openhands`),[r,i]=L.useState(null),a=r&&t.includes(r)?r:null,{data:o,isLoading:c,isError:l}=H(a?e:null,a);return(0,R.jsxs)(`section`,{"data-testid":`plugin-files-section`,className:`flex min-w-0 flex-col gap-2`,children:[(0,R.jsx)(`h3`,{className:`text-sm font-medium text-white`,children:n(p.COMMON$FILES)}),(0,R.jsxs)(`div`,{className:`min-w-0 rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)]`,children:[(0,R.jsx)(`div`,{className:`max-h-48 overflow-y-auto custom-scrollbar`,children:(0,R.jsx)(F,{paths:t,selectedPath:a,onSelectFile:e=>i(t=>t===e?null:e)})}),a?(0,R.jsxs)(`div`,{"data-testid":`plugin-file-content`,className:`flex h-60 min-w-0 flex-col border-t border-[var(--oh-border)]`,children:[(0,R.jsx)(`p`,{className:`truncate px-3 py-2 text-xs text-tertiary-alt`,title:a,children:a}),(0,R.jsx)(`div`,{className:`min-h-0 flex-1`,children:c?(0,R.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,R.jsx)(v,{size:`small`})}):l?(0,R.jsx)(`p`,{className:`px-3 py-2 text-xs text-tertiary-light`,children:n(p.FILES$LOAD_ERROR)}):o?.kind===`binary`?(0,R.jsx)(`p`,{className:`px-3 py-2 text-xs text-tertiary-light`,children:n(p.FILES$BINARY_FALLBACK)}):(0,R.jsx)(I,{path:a,text:o?.text??``})})]}):null]})]})}function W({plugin:e,isBusy:t=!1,isDisabled:n=!1,onToggle:r,onInstall:i,onUninstall:a,onRefresh:o,onClose:c,onStartConversation:l}){let{t:u}=s(`openhands`),d=n||t;return(0,R.jsx)(y,{onClose:c,"aria-label":e.name,children:(0,R.jsxs)(`div`,{"data-testid":`plugin-detail-modal`,"data-plugin-name":e.name,className:`relative flex w-[640px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,R.jsx)(C,{onClose:c,testId:`plugin-detail-modal-close`}),(0,R.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,R.jsx)(`h2`,{className:m(`pr-6`,b),children:e.name}),e.source?(0,R.jsx)(`p`,{className:`mt-1 break-all text-xs text-tertiary-alt`,children:e.source}):null]}),(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[e.description?(0,R.jsx)(`p`,{className:`text-sm leading-relaxed text-tertiary-light`,children:e.description}):null,(0,R.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.isLocal?(0,R.jsx)(`span`,{className:D,children:u(p.SETTINGS$PLUGINS_FILTER_LOCAL)}):null,e.version?(0,R.jsx)(`span`,{className:D,children:u(p.SETTINGS$SKILLS_VERSION,{version:e.version})}):null,e.ref?(0,R.jsxs)(`span`,{className:D,children:[u(p.SETTINGS$PLUGINS_REF_LABEL),` `,e.ref]}):null,e.repoPath?(0,R.jsxs)(`span`,{className:D,children:[u(p.SETTINGS$PLUGINS_REPO_PATH_LABEL),` `,e.repoPath]}):null]}),e.installed?(0,R.jsx)(k,{testId:`plugin-modal-toggle-${e.name}`,isToggled:e.enabled,onToggle:r,isDisabled:d,togglePosition:`right`,children:u(e.enabled?p.SETTINGS$SKILLS_ENABLED:p.SETTINGS$SKILLS_DISABLED)}):null,e.skills?.length?(0,R.jsxs)(`section`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,R.jsx)(`h3`,{className:`text-sm font-medium text-white`,children:u(p.SETTINGS$PLUGINS_SKILLS_IN_BUNDLE)}),(0,R.jsx)(`ul`,{className:`flex min-w-0 flex-col gap-2`,children:e.skills.map(e=>(0,R.jsxs)(`li`,{"data-testid":`plugin-bundled-skill-${e.name}`,className:`flex items-start gap-3 rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)] px-3 py-2.5`,children:[(0,R.jsx)(N,{skillName:e.name}),(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`p`,{className:`truncate text-sm font-semibold text-white`,children:e.name}),e.description?(0,R.jsx)(`p`,{className:`mt-0.5 break-words text-xs leading-relaxed text-tertiary-light`,children:e.description}):null]})]},e.name))})]}):null,e.path&&e.files?.length?(0,R.jsx)(U,{basePath:e.path,files:e.files}):null]}),(0,R.jsxs)(`footer`,{className:`flex flex-shrink-0 flex-wrap justify-end gap-2 px-6 pb-6 pt-4`,children:[e.installed?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(x,{type:`button`,variant:`secondary`,testId:`plugin-detail-refresh-${e.name}`,isDisabled:d,onClick:o,children:u(p.SETTINGS$PLUGINS_REFRESH)}),(0,R.jsx)(x,{type:`button`,variant:`secondary`,testId:`plugin-detail-uninstall-${e.name}`,isDisabled:d,onClick:a,children:u(p.SETTINGS$PLUGINS_UNINSTALL)})]}):e.isLocal?null:(0,R.jsx)(x,{type:`button`,variant:`secondary`,testId:`plugin-detail-install-${e.name}`,isDisabled:d,onClick:i,children:u(t?p.SETTINGS$PLUGINS_INSTALLING:p.SETTINGS$PLUGINS_INSTALL)}),e.source&&l?(0,R.jsx)(x,{type:`button`,variant:`secondary`,testId:`plugin-detail-start-conversation-${e.name}`,onClick:l,children:u(p.COMMON$START_CONVERSATION)}):null,(0,R.jsx)(x,{type:`button`,variant:`secondary`,testId:`plugin-detail-modal-dismiss`,onClick:c,children:u(p.BUTTON$CLOSE)})]})]})})}function G(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>T.installPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:c.installed}),e.invalidateQueries({queryKey:c.marketplace}),l(t(p.SETTINGS$PLUGINS_INSTALL_SUCCESS))},onError:e=>{f(u(e)||t(p.ERROR$GENERIC))}})}function K({onClose:e,onInstalled:t}){let{t:n}=s(`openhands`),r=G(),[i,a]=L.useState(``),[o,c]=L.useState(``),[l,u]=L.useState(``),d=i.trim(),f=d.length>0&&!r.isPending;return(0,R.jsx)(y,{onClose:e,"aria-label":n(p.SETTINGS$PLUGINS_ADD_MODAL_TITLE),children:(0,R.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),f&&r.mutate({source:d,ref:o.trim()||null,repo_path:l.trim()||null},{onSuccess:()=>{t?.(),e()}})},"data-testid":`add-plugin-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,R.jsx)(C,{onClose:e,testId:`add-plugin-modal-close`}),(0,R.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,R.jsx)(`h2`,{className:m(`pr-6`,b),children:n(p.SETTINGS$PLUGINS_ADD_MODAL_TITLE)}),(0,R.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:n(p.SETTINGS$PLUGINS_ADD_MODAL_INTRO)})]}),(0,R.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,R.jsx)(w,{testId:`add-plugin-source-input`,label:n(p.SETTINGS$PLUGINS_SOURCE_LABEL),type:`text`,value:i,onChange:a,placeholder:n(p.SETTINGS$PLUGINS_SOURCE_PLACEHOLDER),showRequiredTag:!0}),(0,R.jsx)(w,{testId:`add-plugin-ref-input`,label:n(p.SETTINGS$PLUGINS_REF_LABEL),type:`text`,value:o,onChange:c,showOptionalTag:!0}),(0,R.jsx)(w,{testId:`add-plugin-repo-path-input`,label:n(p.SETTINGS$PLUGINS_REPO_PATH_LABEL),type:`text`,value:l,onChange:u,showOptionalTag:!0})]}),(0,R.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,R.jsx)(x,{type:`button`,variant:`secondary`,onClick:e,testId:`add-plugin-modal-dismiss`,children:n(p.BUTTON$CLOSE)}),(0,R.jsx)(x,{type:`submit`,variant:`primary`,testId:`add-plugin-submit`,isDisabled:!f,children:n(r.isPending?p.SETTINGS$PLUGINS_INSTALLING:p.SETTINGS$PLUGINS_INSTALL)})]})]})})}function q(e,t,n=void 0){let r=new Map;for(let t of e??[])r.set(t.name,{name:t.name,description:t.description,source:t.source,ref:t.ref??null,repoPath:t.repo_path??null,installed:t.installed,enabled:!1,version:null,inCatalog:!0,isLocal:!1,path:t.path??null,skills:t.skills??null,files:t.files??null});for(let e of t??[]){let t=r.get(e.name),n=e.skills!=null||e.files!=null;r.set(e.name,{name:e.name,description:t?.description??e.description??null,source:e.source??t?.source??null,ref:e.resolved_ref??t?.ref??null,repoPath:e.repo_path??t?.repoPath??null,installed:!0,enabled:e.enabled,version:e.version??null,inCatalog:t?.inCatalog??!1,isLocal:!1,path:n?e.install_path:t?.path??null,skills:n?e.skills??null:t?.skills??null,files:n?e.files??null:t?.files??null})}for(let e of n??[])r.has(e.name)||r.set(e.name,{name:e.name,description:e.description||null,source:null,ref:null,repoPath:null,installed:!1,enabled:!1,version:e.version||null,inCatalog:!1,isLocal:!0,path:e.path??null,skills:e.skills??null,files:e.files??null});let i=e=>e.installed?0:e.isLocal?1:2;return Array.from(r.values()).sort((e,t)=>{let n=i(e)-i(t);return n===0?e.name.localeCompare(t.name):n})}function J(e,t){let n=t.trim().toLowerCase();return n?[e.name,e.description??``,e.source??``,e.repoPath??``,e.ref??``].some(e=>e.toLowerCase().includes(n)):!0}function Y(e,t){return t===`installed`?e.installed:t===`available`?!e.installed&&!e.isLocal:t===`local`?e.isLocal:!0}var X=()=>{let{backend:e,orgId:t}=d();return o({queryKey:[...c.installed,e.id,t],queryFn:()=>T.listInstalledPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1})},Z=()=>{let{backend:e,orgId:t}=d();return o({queryKey:[...c.local,e.id,t],queryFn:()=>j.getLocalPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1})};function Q(){let e=i(),{t}=s(`openhands`);return a({mutationFn:({name:e,enabled:t})=>T.setPluginEnabled(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:c.installed})},onError:e=>{f(u(e)||t(p.ERROR$GENERIC))}})}function ee(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>T.uninstallPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:c.installed}),e.invalidateQueries({queryKey:c.marketplace}),l(t(p.SETTINGS$PLUGINS_UNINSTALL_SUCCESS))},onError:e=>{f(u(e)||t(p.ERROR$GENERIC))}})}function te(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>T.refreshPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:c.installed}),l(t(p.SETTINGS$PLUGINS_REFRESH_SUCCESS))},onError:e=>{f(u(e)||t(p.ERROR$GENERIC))}})}function ne(e){let t=btoa(JSON.stringify(e));return`/launch?${new URLSearchParams({plugins:t}).toString()}`}var $=r(function(){let{t:e}=s(`openhands`),{backend:t}=d(),{navigate:n}=S(),r=t.kind===`local`,{data:i,isLoading:a}=M(),{data:o,isLoading:c}=X(),{data:l,isLoading:u}=Z(),f=G(),g=Q(),_=ee(),v=te(),[y,b]=L.useState(``),[C,w]=L.useState(`all`),[T,E]=L.useState(null),[D,O]=L.useState(!1),k=L.useMemo(()=>q(i,o,l),[i,o,l]),A=L.useMemo(()=>k.filter(e=>Y(e,C)&&J(e,y)),[k,C,y]),j=T?k.find(e=>e.name===T)??null:null,N=a||c||u,F=(g.isPending?g.variables?.name:void 0)??(_.isPending?_.variables:void 0)??(v.isPending?v.variables:void 0)??null,I=e=>F===e.name||f.isPending&&f.variables?.source===e.source,B=e=>{e.source&&f.mutate({source:e.source,ref:e.ref,repo_path:e.repoPath})},H=(e,t)=>{g.mutate({name:e.name,enabled:t})},U=e=>{_.mutate(e.name,{onSuccess:()=>E(null)})},$=e=>{v.mutate(e.name)},re=e=>{e.source&&n(ne([{source:e.source,ref:e.ref,repo_path:e.repoPath}]))};return(0,R.jsxs)(`div`,{"data-testid":`skills-plugins-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,R.jsx)(h,{}),(0,R.jsx)(`main`,{className:m(P,`h-full`),children:(0,R.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,R.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,R.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(p.SETTINGS$PLUGINS_TITLE)}),(0,R.jsx)(`div`,{"data-testid":`plugins-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(p.SETTINGS$PLUGINS_PAGE_DESCRIPTION)})]}),(0,R.jsx)(x,{type:`button`,variant:`secondary`,testId:`plugins-add-plugin-button`,isDisabled:!r,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>O(!0),children:e(p.SETTINGS$PLUGINS_ADD_BUTTON)})]}),N&&(0,R.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,R.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!N&&k.length===0&&(0,R.jsx)(`div`,{"data-testid":`plugins-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,R.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(p.SETTINGS$PLUGINS_NO_PLUGINS)})}),!N&&k.length>0&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(V,{search:y,onSearchChange:b,statusFilter:C,onStatusFilterChange:w}),A.length===0?(0,R.jsx)(`div`,{"data-testid":`plugins-no-match`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,R.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(p.SETTINGS$PLUGINS_NO_MATCH)})}):(0,R.jsx)(`section`,{className:m(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,R.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:A.map(e=>(0,R.jsx)(z,{plugin:e,isBusy:I(e),isDisabled:!r,onOpen:()=>E(e.name),onInstall:()=>B(e),onToggle:t=>H(e,t)},e.name))})})]}),j&&(0,R.jsx)(W,{plugin:j,isBusy:I(j),isDisabled:!r,onToggle:e=>H(j,e),onInstall:()=>B(j),onUninstall:()=>U(j),onRefresh:()=>$(j),onStartConversation:()=>re(j),onClose:()=>E(null)}),D&&(0,R.jsx)(K,{onClose:()=>O(!1)})]})})]})});export{$ as default};