@openhands/agent-canvas 1.11.0 → 1.13.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 (766) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{acp-providers-BkL3HWa3.js → acp-providers-D1PORKc0.js} +1 -1
  4. package/build/assets/active-backend-context-IqOjobNK.js +2 -0
  5. package/build/assets/{agent-context-settings-Bno1nwPL.js → agent-context-settings-DMrObcIS.js} +1 -1
  6. package/build/assets/agent-profiles-settings-DororXN5.js +1 -0
  7. package/build/assets/agent-server-conversation-service.api-DWBe0rbX.js +86 -0
  8. package/build/assets/{agent-settings-h8hQz-IU.js → agent-settings-BJVk92PU.js} +1 -1
  9. package/build/assets/agent-settings-COfJsQ1d.js +1 -0
  10. package/build/assets/{alert-banner-lrK-2_0Y.js → alert-banner-CzZsm7ms.js} +1 -1
  11. package/build/assets/{api-key-entry-screen-Qsb83VX1.js → api-key-entry-screen-D8Fade_-.js} +1 -1
  12. package/build/assets/app-settings-CpyGB3AT.js +1 -0
  13. package/build/assets/{automation-detail-7LkL91j9.js → automation-detail-B-jQ39Mm.js} +1 -1
  14. package/build/assets/{automation-export-U2QNyNy6.js → automation-export-B1dywoqk.js} +1 -1
  15. package/build/assets/{automation-setup-route-Bel9_Lue.js → automation-setup-route-C-bWUZBi.js} +1 -1
  16. package/build/assets/{automation-templates-CRLDssaI.js → automation-templates-DgpCGOJV.js} +1 -1
  17. package/build/assets/{automations-list-B2iV3ZKW.js → automations-list-DnMxlxsL.js} +1 -1
  18. package/build/assets/{back-nav-button-B3pYwmUJ.js → back-nav-button-HHEneWMw.js} +1 -1
  19. package/build/assets/backend-form-modal-DiVrD4Cm.js +1 -0
  20. package/build/assets/{backend-synced-settings-badge-DB4717Iu.js → backend-synced-settings-badge-7MIjpr8M.js} +1 -1
  21. package/build/assets/{badge-yR53enbU.js → badge-CpYmcVZV.js} +1 -1
  22. package/build/assets/{base-modal-3NmIOKDm.js → base-modal-Fnh6Uln9.js} +1 -1
  23. package/build/assets/bot-BQZx8e2i.js +1 -0
  24. package/build/assets/{brand-button-CJcwjnfb.js → brand-button-swT1RyO0.js} +1 -1
  25. package/build/assets/browser-B9AbV6kG.js +7 -0
  26. package/build/assets/{browser-tab-A94o33Vn.js → browser-tab-zAY12m_i.js} +1 -1
  27. package/build/assets/{chat-send-button-B8n6-DQA.js → chat-send-button-DsJtivmL.js} +1 -1
  28. package/build/assets/check-WAFXrrs_.js +1 -0
  29. package/build/assets/chevron-down-CifNWzme.js +1 -0
  30. package/build/assets/circle-check-CtnimJa8.js +1 -0
  31. package/build/assets/{circle-plus-check-toggle-BVzv5EkZ.js → circle-plus-check-toggle-Cuzx55bo.js} +1 -1
  32. package/build/assets/{cloud-funnel-analytics-CBQdPZl_.js → cloud-funnel-analytics-86CwNdSh.js} +1 -1
  33. package/build/assets/{combobox-caret-BlmRwiM8.js → combobox-caret-D0fRotFi.js} +1 -1
  34. package/build/assets/{command-menu-PsRXVBz2.js → command-menu-BXy03FBl.js} +1 -1
  35. package/build/assets/{condenser-settings-w7L3EFvm.js → condenser-settings-BmZa0ui_.js} +1 -1
  36. package/build/assets/{confirmation-modal-DAH0XtOp.js → confirmation-modal-BgoN6lbN.js} +1 -1
  37. package/build/assets/{context-menu-list-item-BQhmFVEK.js → context-menu-list-item-Bq02tc-P.js} +1 -1
  38. package/build/assets/conversation-BPo8SvLN.js +1 -0
  39. package/build/assets/conversation-CPCVsCUY.js +90 -0
  40. package/build/assets/conversation-panel-BPo8SvLN.js +1 -0
  41. package/build/assets/{conversation-state-store-Bs8gA263.js → conversation-state-store-C5YpjMNy.js} +1 -1
  42. package/build/assets/conversation-store-Blc5xysY.js +6 -0
  43. package/build/assets/{conversation-tab-empty-state-C9sfDOlt.js → conversation-tab-empty-state-CMqo_0Bd.js} +1 -1
  44. package/build/assets/{copy-to-clipboard-button-DatoElj8.js → copy-to-clipboard-button-Cg1pF0xn.js} +1 -1
  45. package/build/assets/{device-verify-BIjXeW9N.js → device-verify-BfQLgNyq.js} +1 -1
  46. package/build/assets/{dropdown-classes-zFW7qPSK.js → dropdown-classes-BIqQr5mx.js} +1 -1
  47. package/build/assets/{entry.client-DzbDyLkV.js → entry.client-CxFjRYqH.js} +2 -2
  48. package/build/assets/{enum-filter-dropdown-CctILg5t.js → enum-filter-dropdown-C_yV4_bo.js} +1 -1
  49. package/build/assets/{environment-switch-overlay-Cvmo6clk.js → environment-switch-overlay-Bi4qbh2g.js} +1 -1
  50. package/build/assets/{extensions-hub-DOmHPGTA.js → extensions-hub-BqUINAhp.js} +1 -1
  51. package/build/assets/{extensions-navigation-6zU5M1pa.js → extensions-navigation-lraj88Wk.js} +1 -1
  52. package/build/assets/external-link-CgtpA_a1.js +1 -0
  53. package/build/assets/{file-text-RecuaId_.js → file-text-DEK4LSVw.js} +1 -1
  54. package/build/assets/files-tab-DV0L-lFE.js +1 -0
  55. package/build/assets/{form-control-classes-DLN3Qgub.js → form-control-classes-7yFSQJq_.js} +1 -1
  56. package/build/assets/format-model-name-BN_rx1Y3.js +1 -0
  57. package/build/assets/{format-relative-time-DGPQlPx0.js → format-relative-time-DSErAuVr.js} +1 -1
  58. package/build/assets/git-provider-icon-BvlLAche.js +1 -0
  59. package/build/assets/{git-repo-dropdown-B7RvO70z.js → git-repo-dropdown-ByMzpNko.js} +1 -1
  60. package/build/assets/git-repo-dropdown-C6R7hgM8.js +1 -0
  61. package/build/assets/{highlighted-source-view-CgJfD5VT.js → highlighted-source-view-C_sfncLZ.js} +1 -1
  62. package/build/assets/{home-DEZaZqYv.js → home-BOrlwLqG.js} +1 -1
  63. package/build/assets/home-BvMNC6E-.js +1 -0
  64. package/build/assets/{home-store-D7CjMN_-.js → home-store-CxqsY9Fi.js} +1 -1
  65. package/build/assets/index-home-BvMNC6E-.js +1 -0
  66. package/build/assets/info-BRVcJAUg.js +1 -0
  67. package/build/assets/{install-server-modal-BTwK5lbi.js → install-server-modal-Bl4G1zF4.js} +1 -1
  68. package/build/assets/{kebab-menu-item-content-C4CkeiJO.js → kebab-menu-item-content-BGoGFEAg.js} +1 -1
  69. package/build/assets/{launch-DVlx4v9o.js → launch-CkqiSCqi.js} +1 -1
  70. package/build/assets/{list-todo-CheUtB7F.js → list-todo-DNWlzfaM.js} +1 -1
  71. package/build/assets/llm-not-configured-banner-DLw_tu-G.js +27 -0
  72. package/build/assets/llm-settings-B-pkVCrt.js +1 -0
  73. package/build/assets/llm-settings-DSC0-IQ7.js +1 -0
  74. package/build/assets/llm-subscription-service-BAdOl5Xx.js +1 -0
  75. package/build/assets/loader-circle-B47W9XqT.js +1 -0
  76. package/build/assets/{loading-spinner-CN3riY7k.js → loading-spinner-xhnrGP4Y.js} +1 -1
  77. package/build/assets/{manage-backends-modal-HNWKLYhq.js → manage-backends-modal-DhGk5mJt.js} +1 -1
  78. package/build/assets/manifest-653b89aa.js +1 -0
  79. package/build/assets/{manifest-subpage-layout-D-m-h8_t.js → manifest-subpage-layout-CKWvL2ig.js} +1 -1
  80. package/build/assets/{map-provider-7Bp2aih5.js → map-provider-Mx8mZuE-.js} +1 -1
  81. package/build/assets/markdown-renderer-DUmk7pFc.js +8 -0
  82. package/build/assets/{mcp-gLgPP7AS.js → mcp-DCkvl6K0.js} +2 -2
  83. package/build/assets/mcp-marketplace-utils-DEbMXlQr.js +1 -0
  84. package/build/assets/messages-DSXvyc21.js +40 -0
  85. package/build/assets/{modal-body-duRaxj_K.js → modal-body-gIe21fDv.js} +1 -1
  86. package/build/assets/{modal-classes-CLEXO6dj.js → modal-classes-D66dlgZ7.js} +1 -1
  87. package/build/assets/{modal-close-button-D0aT02hs.js → modal-close-button-B6iOGYpI.js} +1 -1
  88. package/build/assets/{mouse-pointer-click-Px-dXWcS.js → mouse-pointer-click-BYX1Pw5W.js} +1 -1
  89. package/build/assets/{npm-DRzJF5Zn.js → npm-DLckoeJc.js} +1 -1
  90. package/build/assets/{onboarding-DSr8hOpk.js → onboarding-D7WDG66N.js} +1 -1
  91. package/build/assets/{onboarding-modal-C6Euf7N4.js → onboarding-modal-C_xVrFNv.js} +1 -1
  92. package/build/assets/{organization-service.api-C4GYWwj9.js → organization-service.api-D-s9z18a.js} +1 -1
  93. package/build/assets/pencil-BGOCPRyu.js +1 -0
  94. package/build/assets/{planner-tab-CZcguxTK.js → planner-tab-AKaXIIfg.js} +1 -1
  95. package/build/assets/{plugins-management-service-BmDzOQsd.js → plugins-management-service-wtmY4QQw.js} +1 -1
  96. package/build/assets/plus-zNEL8rcX.js +1 -0
  97. package/build/assets/{profiles-service.api-CoLTwjc1.js → profiles-service.api-DCMYxHMi.js} +1 -1
  98. package/build/assets/{providers-tBzTpz1w.js → providers-BjrtjX4L.js} +1 -1
  99. package/build/assets/{proxy-DCI9S-LA.js → proxy-9Z_WZggZ.js} +1 -1
  100. package/build/assets/{puzzle-B3v361yY.js → puzzle-BWLmN8z4.js} +1 -1
  101. package/build/assets/recommended-automations-launcher-CFlzhu1o.js +1 -0
  102. package/build/assets/refresh-cw-CXtFWpwv.js +1 -0
  103. package/build/assets/root-CanxKlNV.css +1 -0
  104. package/build/assets/root-DkfG_UWR.js +2 -0
  105. package/build/assets/root-layout-D75LHYhh.js +2 -0
  106. package/build/assets/{schema-field-zhsVDllR.js → schema-field-OnM5Uob_.js} +1 -1
  107. package/build/assets/{sdk-section-page-CS4GWn0y.js → sdk-section-page-m5WQm2sy.js} +1 -1
  108. package/build/assets/search-CycosyjN.js +1 -0
  109. package/build/assets/{secrets-service-DjgGduXk.js → secrets-service-B26R61C1.js} +1 -1
  110. package/build/assets/{secrets-settings-f-qahfbi.js → secrets-settings-CbLYCKOX.js} +1 -1
  111. package/build/assets/{segmented-toggle-SmvsR3jW.js → segmented-toggle-DCspm2U5.js} +1 -1
  112. package/build/assets/{settings-DQd0xLEw.js → settings-BJQI_iBM.js} +1 -1
  113. package/build/assets/{settings-dropdown-input-TWIeiG02.js → settings-dropdown-input-BI8V_Nov.js} +1 -1
  114. package/build/assets/{settings-index-BVwy9JEp.js → settings-index-BiTqJoH7.js} +1 -1
  115. package/build/assets/{settings-input-D61Vzp9e.js → settings-input-Cz62hWVW.js} +1 -1
  116. package/build/assets/{settings-list-classes-sE0ASr1s.js → settings-list-classes-z_3FW5H3.js} +1 -1
  117. package/build/assets/{settings-modal-D6D5ngET.js → settings-modal-BIrIVn97.js} +1 -1
  118. package/build/assets/{settings-service.api-DZp7E7A9.js → settings-service.api--rJmnuLa.js} +1 -1
  119. package/build/assets/{settings-switch-Drt-rF5s.js → settings-switch-BRsSI8Vs.js} +1 -1
  120. package/build/assets/{settings-utils-gw2ppAvw.js → settings-utils-Ba7vel6T.js} +1 -1
  121. package/build/assets/shared-conversation-CQK_PqHx.js +1 -0
  122. package/build/assets/shield-check-T3JsDJiM.js +1 -0
  123. package/build/assets/{sidebar-layout-Dxg6zc2K.js → sidebar-layout-Bhi3hVcu.js} +1 -1
  124. package/build/assets/{sidebar-mobile-menu-toggle-OoZBHxaT.js → sidebar-mobile-menu-toggle-YWJNRN4p.js} +1 -1
  125. package/build/assets/{sidebar-nav-link-CxLoG-dG.js → sidebar-nav-link-BSUlY5Ml.js} +1 -1
  126. package/build/assets/{sidebar-store-BJeYY-E9.js → sidebar-store-Cl1cUv_F.js} +1 -1
  127. package/build/assets/{skill-card-pill-row-B_BYBONu.js → skill-card-pill-row-BXz8L8Rn.js} +1 -1
  128. package/build/assets/{skill-icon-badge-CN41Hy9l.js → skill-icon-badge-QgfKv31M.js} +1 -1
  129. package/build/assets/{skill-scope-B1Per5XI.js → skill-scope-Dc3JPW-8.js} +1 -1
  130. package/build/assets/{skills-plugins-B3AO6sMz.js → skills-plugins-CpTV27n3.js} +1 -1
  131. package/build/assets/{skills-settings-DmmgJ6CT.js → skills-settings-CSW__IW4.js} +1 -1
  132. package/build/assets/{sparkles-g7y3r-Ut.js → sparkles-TJ0mdECe.js} +1 -1
  133. package/build/assets/{styled-tooltip-C5C07RQC.js → styled-tooltip-BUMSbgrF.js} +1 -1
  134. package/build/assets/{task-list-tab-C19Q_JNf.js → task-list-tab-mAHMOkUz.js} +1 -1
  135. package/build/assets/{terminal-CbuMRYal.js → terminal-BzxBaHx2.js} +1 -1
  136. package/build/assets/{toggle-switch-CIioisto.js → toggle-switch-O5v1FgxW.js} +1 -1
  137. package/build/assets/trash-2-C0xNVp9c.js +1 -0
  138. package/build/assets/{typography-D9tiHct7.js → typography-NOKSk9_R.js} +1 -1
  139. package/build/assets/usage-tab-tEmVN0KD.js +1 -0
  140. package/build/assets/{use-acp-credential-form-DJmmJKMo.js → use-acp-credential-form-BPNi0Zbm.js} +1 -1
  141. package/build/assets/{use-activate-agent-profile-CeFfYwu_.js → use-activate-agent-profile-D9YRQPTF.js} +1 -1
  142. package/build/assets/{use-agent-profiles-BHLkLbRR.js → use-agent-profiles-Cb2zUW3l.js} +1 -1
  143. package/build/assets/{use-can-manage-org-profiles-Bu4y8gSx.js → use-can-manage-org-profiles-Dxzq2AEd.js} +1 -1
  144. package/build/assets/{use-cloud-current-user-id-QD9x3ySO.js → use-cloud-current-user-id-Co2eJk2A.js} +1 -1
  145. package/build/assets/{use-config-CPwqciXN.js → use-config-DKAMiI5R.js} +1 -1
  146. package/build/assets/use-create-conversation-CoHTiCbI.js +1 -0
  147. package/build/assets/{use-create-secret-BsOfOLvg.js → use-create-secret-2zBlCDsF.js} +1 -1
  148. package/build/assets/use-is-authed-C52-ivnB.js +1 -0
  149. package/build/assets/{use-is-creating-conversation-CVefC9Ns.js → use-is-creating-conversation-DdaAE6jV.js} +1 -1
  150. package/build/assets/{use-launch-skill-in-chat-BcKNjxxd.js → use-launch-skill-in-chat-COnDpxCQ.js} +1 -1
  151. package/build/assets/use-llm-profiles-C_BHue65.js +1 -0
  152. package/build/assets/{use-manifest-capabilities-DBYPjyV6.js → use-manifest-capabilities-DPrQsaPP.js} +1 -1
  153. package/build/assets/{use-onboarding-completion-CtNJxkXG.js → use-onboarding-completion-CCE8OQgV.js} +1 -1
  154. package/build/assets/{use-plugins-marketplace-ZEA-gyM9.js → use-plugins-marketplace-CEiak69h.js} +1 -1
  155. package/build/assets/use-save-agent-profile-DK9idD6a.js +1 -0
  156. package/build/assets/{use-save-settings-pSjRhD_m.js → use-save-settings-DNmnbG6f.js} +1 -1
  157. package/build/assets/{use-settings-nav-items-CQgkxUbV.js → use-settings-nav-items-BlFL7YhM.js} +1 -1
  158. package/build/assets/{use-settings-BHWsOcIG.js → use-settings-wCwPaSIv.js} +1 -1
  159. package/build/assets/{use-tracking-CGCsBWhg.js → use-tracking-CVwPmhlX.js} +1 -1
  160. package/build/assets/{use-user-conversation-DRfEU8x0.js → use-user-conversation-DVtfg0B_.js} +1 -1
  161. package/build/assets/{useInfiniteQuery-DbCv0Jzd.js → useInfiniteQuery-p1xq35r2.js} +1 -1
  162. package/build/assets/{useMutation-ChpkYxI5.js → useMutation-BFDQmgk9.js} +1 -1
  163. package/build/assets/{useQueries-Cjv3E8_1.js → useQueries-DF1NAAeC.js} +1 -1
  164. package/build/assets/{useQuery-BCnzy4LX.js → useQuery-DRv--6bK.js} +1 -1
  165. package/build/assets/utils-zxEjKE70.js +1 -0
  166. package/build/assets/{vendor~browser-DJ1pl_wn.js → vendor~browser-B-fae1JU.js} +14 -14
  167. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js} +3 -3
  168. package/build/assets/{vendor~files-tab-C87pjSpi.js → vendor~files-tab-D9wR9yM2.js} +1 -1
  169. package/build/assets/vendor~index-home~home~conversation-panel~conversation-Ipoe6hvY.js +13 -0
  170. package/build/assets/vendor~root-layout-C-IgVx6e.js +1 -0
  171. package/build/assets/{vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js → vendor~root-layout~conversation-panel~conversation-Dhd_I4H4.js} +1 -1
  172. package/build/assets/{vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js → vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-Cc0f9kPP.js} +1 -1
  173. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-d7svw-BB.js} +1 -1
  174. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js} +1 -1
  175. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-4WsUP-tz.js} +2 -2
  176. package/build/assets/{verification-settings-BItwt998.js → verification-settings-B8UMQ7MG.js} +1 -1
  177. package/build/assets/{wrench-B1_H-tL1.js → wrench-DIka3hCq.js} +1 -1
  178. package/build/assets/x-BWKA2Ver.js +1 -0
  179. package/build/assets/zap-DHddTPc0.js +1 -0
  180. package/build/index.html +4 -4
  181. package/build/locales/ar/openhands.json +28 -1
  182. package/build/locales/ca/openhands.json +28 -1
  183. package/build/locales/de/openhands.json +28 -1
  184. package/build/locales/en/openhands.json +28 -1
  185. package/build/locales/es/openhands.json +28 -1
  186. package/build/locales/fr/openhands.json +28 -1
  187. package/build/locales/it/openhands.json +28 -1
  188. package/build/locales/ja/openhands.json +28 -1
  189. package/build/locales/ko-KR/openhands.json +28 -1
  190. package/build/locales/no/openhands.json +28 -1
  191. package/build/locales/pt/openhands.json +28 -1
  192. package/build/locales/tr/openhands.json +28 -1
  193. package/build/locales/uk/openhands.json +28 -1
  194. package/build/locales/zh-CN/openhands.json +28 -1
  195. package/build/locales/zh-TW/openhands.json +28 -1
  196. package/config/defaults.json +3 -3
  197. package/dist/api/agent-server-compatibility.cjs +1 -1
  198. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  199. package/dist/api/agent-server-compatibility.js +1 -1
  200. package/dist/api/agent-server-compatibility.js.map +1 -1
  201. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  202. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  203. package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +24 -1
  204. package/dist/api/conversation-service/agent-server-conversation-service.api.js +116 -97
  205. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  206. package/dist/api/llm-balance-service.cjs +2 -0
  207. package/dist/api/llm-balance-service.cjs.map +1 -0
  208. package/dist/api/llm-balance-service.d.ts +33 -0
  209. package/dist/api/llm-balance-service.js +53 -0
  210. package/dist/api/llm-balance-service.js.map +1 -0
  211. package/dist/api/llm-subscription-service.cjs +1 -1
  212. package/dist/api/llm-subscription-service.cjs.map +1 -1
  213. package/dist/api/llm-subscription-service.js +42 -34
  214. package/dist/api/llm-subscription-service.js.map +1 -1
  215. package/dist/components/conversation/index.cjs +1 -1
  216. package/dist/components/conversation/index.d.ts +0 -1
  217. package/dist/components/conversation/index.js +0 -1
  218. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
  219. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
  220. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +1 -1
  221. package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
  222. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs +1 -1
  223. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs.map +1 -1
  224. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js +24 -23
  225. package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js.map +1 -1
  226. package/dist/components/conversation-events/chat/group-events.cjs +1 -1
  227. package/dist/components/conversation-events/chat/group-events.cjs.map +1 -1
  228. package/dist/components/conversation-events/chat/group-events.d.ts +3 -3
  229. package/dist/components/conversation-events/chat/group-events.js +27 -26
  230. package/dist/components/conversation-events/chat/group-events.js.map +1 -1
  231. package/dist/components/features/automations/recommended-automations-section.d.ts +7 -0
  232. package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
  233. package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
  234. package/dist/components/features/chat/components/chat-input-actions.js +123 -118
  235. package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
  236. package/dist/components/features/chat/components/chat-input-grip.cjs +1 -1
  237. package/dist/components/features/chat/components/chat-input-grip.cjs.map +1 -1
  238. package/dist/components/features/chat/components/chat-input-grip.d.ts +2 -1
  239. package/dist/components/features/chat/components/chat-input-grip.js +7 -7
  240. package/dist/components/features/chat/components/chat-input-grip.js.map +1 -1
  241. package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs +1 -1
  242. package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -1
  243. package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +61 -60
  244. package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -1
  245. package/dist/components/features/chat/components/context-window-meter.cjs +2 -0
  246. package/dist/components/features/chat/components/context-window-meter.cjs.map +1 -0
  247. package/dist/components/features/chat/components/context-window-meter.d.ts +2 -0
  248. package/dist/components/features/chat/components/context-window-meter.js +131 -0
  249. package/dist/components/features/chat/components/context-window-meter.js.map +1 -0
  250. package/dist/components/features/chat/components/context-window-ring.cjs +2 -0
  251. package/dist/components/features/chat/components/context-window-ring.cjs.map +1 -0
  252. package/dist/components/features/chat/components/context-window-ring.d.ts +26 -0
  253. package/dist/components/features/chat/components/context-window-ring.js +45 -0
  254. package/dist/components/features/chat/components/context-window-ring.js.map +1 -0
  255. package/dist/components/features/chat/custom-chat-input.cjs +1 -1
  256. package/dist/components/features/chat/custom-chat-input.cjs.map +1 -1
  257. package/dist/components/features/chat/custom-chat-input.js +68 -67
  258. package/dist/components/features/chat/custom-chat-input.js.map +1 -1
  259. package/dist/components/features/chat/model-messages.cjs +1 -1
  260. package/dist/components/features/chat/model-messages.cjs.map +1 -1
  261. package/dist/components/features/chat/model-messages.js +26 -25
  262. package/dist/components/features/chat/model-messages.js.map +1 -1
  263. package/dist/components/features/chat/path-component.cjs +1 -1
  264. package/dist/components/features/chat/path-component.cjs.map +1 -1
  265. package/dist/components/features/chat/path-component.js +9 -6
  266. package/dist/components/features/chat/path-component.js.map +1 -1
  267. package/dist/components/features/chat/plan-preview.cjs +1 -1
  268. package/dist/components/features/chat/plan-preview.js +4 -4
  269. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs +1 -1
  270. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs.map +1 -1
  271. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.d.ts +0 -8
  272. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js +92 -50
  273. package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js.map +1 -1
  274. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs +1 -1
  275. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs.map +1 -1
  276. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +7 -2
  277. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js +15 -9
  278. package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js.map +1 -1
  279. package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.cjs +2 -0
  280. package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.cjs.map +1 -0
  281. package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.d.ts +20 -0
  282. package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.js +76 -0
  283. package/dist/components/features/chat/tool-visualizers/primitives/markdown-file-preview.js.map +1 -0
  284. package/dist/components/features/controls/server-status-context-menu.cjs +1 -1
  285. package/dist/components/features/controls/server-status-context-menu.cjs.map +1 -1
  286. package/dist/components/features/controls/server-status-context-menu.d.ts +5 -3
  287. package/dist/components/features/controls/server-status-context-menu.js +8 -8
  288. package/dist/components/features/controls/server-status-context-menu.js.map +1 -1
  289. package/dist/components/features/conversation/conversation-name-context-menu.cjs +1 -1
  290. package/dist/components/features/conversation/conversation-name-context-menu.cjs.map +1 -1
  291. package/dist/components/features/conversation/conversation-name-context-menu.js +58 -61
  292. package/dist/components/features/conversation/conversation-name-context-menu.js.map +1 -1
  293. package/dist/components/features/conversation/conversation-name-with-status.cjs +1 -1
  294. package/dist/components/features/conversation/conversation-name-with-status.cjs.map +1 -1
  295. package/dist/components/features/conversation/conversation-name-with-status.js +74 -46
  296. package/dist/components/features/conversation/conversation-name-with-status.js.map +1 -1
  297. package/dist/components/features/conversation/conversation-name.cjs +1 -1
  298. package/dist/components/features/conversation/conversation-name.cjs.map +1 -1
  299. package/dist/components/features/conversation/conversation-name.js +69 -71
  300. package/dist/components/features/conversation/conversation-name.js.map +1 -1
  301. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs +1 -1
  302. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.cjs.map +1 -1
  303. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js +7 -6
  304. package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.js.map +1 -1
  305. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs +1 -1
  306. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
  307. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +92 -86
  308. package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js.map +1 -1
  309. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
  310. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
  311. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +81 -71
  312. package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
  313. package/dist/components/features/conversation/metrics-modal/cost-section.cjs +1 -1
  314. package/dist/components/features/conversation/metrics-modal/cost-section.cjs.map +1 -1
  315. package/dist/components/features/conversation/metrics-modal/cost-section.js +6 -6
  316. package/dist/components/features/conversation/metrics-modal/cost-section.js.map +1 -1
  317. package/dist/components/features/conversation/metrics-modal/metric-row.cjs +1 -1
  318. package/dist/components/features/conversation/metrics-modal/metric-row.cjs.map +1 -1
  319. package/dist/components/features/conversation/metrics-modal/metric-row.d.ts +2 -1
  320. package/dist/components/features/conversation/metrics-modal/metric-row.js +10 -9
  321. package/dist/components/features/conversation/metrics-modal/metric-row.js.map +1 -1
  322. package/dist/components/features/conversation/metrics-modal/usage-section.cjs +1 -1
  323. package/dist/components/features/conversation/metrics-modal/usage-section.cjs.map +1 -1
  324. package/dist/components/features/conversation/metrics-modal/usage-section.js +2 -1
  325. package/dist/components/features/conversation/metrics-modal/usage-section.js.map +1 -1
  326. package/dist/components/features/conversation/usage-panel/compact-context-button.cjs +2 -0
  327. package/dist/components/features/conversation/usage-panel/compact-context-button.cjs.map +1 -0
  328. package/dist/components/features/conversation/usage-panel/compact-context-button.d.ts +16 -0
  329. package/dist/components/features/conversation/usage-panel/compact-context-button.js +59 -0
  330. package/dist/components/features/conversation/usage-panel/compact-context-button.js.map +1 -0
  331. package/dist/components/features/conversation/usage-panel/context-meter.cjs +2 -0
  332. package/dist/components/features/conversation/usage-panel/context-meter.cjs.map +1 -0
  333. package/dist/components/features/conversation/usage-panel/context-meter.d.ts +19 -0
  334. package/dist/components/features/conversation/usage-panel/context-meter.js +46 -0
  335. package/dist/components/features/conversation/usage-panel/context-meter.js.map +1 -0
  336. package/dist/components/features/conversation/usage-panel/provider-balance-card.cjs +2 -0
  337. package/dist/components/features/conversation/usage-panel/provider-balance-card.cjs.map +1 -0
  338. package/dist/components/features/conversation/usage-panel/provider-balance-card.d.ts +7 -0
  339. package/dist/components/features/conversation/usage-panel/provider-balance-card.js +57 -0
  340. package/dist/components/features/conversation/usage-panel/provider-balance-card.js.map +1 -0
  341. package/dist/components/features/conversation/usage-panel/usage-panel.cjs +2 -0
  342. package/dist/components/features/conversation/usage-panel/usage-panel.cjs.map +1 -0
  343. package/dist/components/features/conversation/usage-panel/usage-panel.d.ts +9 -0
  344. package/dist/components/features/conversation/usage-panel/usage-panel.js +68 -0
  345. package/dist/components/features/conversation/usage-panel/usage-panel.js.map +1 -0
  346. package/dist/components/features/conversation-panel/budget-display.cjs +1 -1
  347. package/dist/components/features/conversation-panel/budget-display.cjs.map +1 -1
  348. package/dist/components/features/conversation-panel/budget-display.js +10 -13
  349. package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
  350. package/dist/components/features/conversation-panel/budget-progress-bar.cjs +1 -1
  351. package/dist/components/features/conversation-panel/budget-progress-bar.cjs.map +1 -1
  352. package/dist/components/features/conversation-panel/budget-progress-bar.js +2 -2
  353. package/dist/components/features/conversation-panel/budget-progress-bar.js.map +1 -1
  354. package/dist/components/features/conversation-panel/confirm-archive-modal.cjs +2 -0
  355. package/dist/components/features/conversation-panel/confirm-archive-modal.cjs.map +1 -0
  356. package/dist/components/features/conversation-panel/confirm-archive-modal.d.ts +8 -0
  357. package/dist/components/features/conversation-panel/confirm-archive-modal.js +48 -0
  358. package/dist/components/features/conversation-panel/confirm-archive-modal.js.map +1 -0
  359. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
  360. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs.map +1 -1
  361. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +3 -1
  362. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +39 -34
  363. package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js.map +1 -1
  364. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
  365. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
  366. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +3 -1
  367. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +104 -80
  368. package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
  369. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
  370. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
  371. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +7 -1
  372. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +28 -20
  373. package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
  374. package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs +1 -1
  375. package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs.map +1 -1
  376. package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +9 -1
  377. package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +94 -84
  378. package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
  379. package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs +1 -1
  380. package/dist/components/features/conversation-panel/conversation-group-folder-list.cjs.map +1 -1
  381. package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +2 -1
  382. package/dist/components/features/conversation-panel/conversation-group-folder-list.js +32 -31
  383. package/dist/components/features/conversation-panel/conversation-group-folder-list.js.map +1 -1
  384. package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs +1 -1
  385. package/dist/components/features/conversation-panel/conversation-group-folder-row.cjs.map +1 -1
  386. package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +2 -1
  387. package/dist/components/features/conversation-panel/conversation-group-folder-row.js +27 -26
  388. package/dist/components/features/conversation-panel/conversation-group-folder-row.js.map +1 -1
  389. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +1 -1
  390. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +1 -1
  391. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +3 -1
  392. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +116 -106
  393. package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +1 -1
  394. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
  395. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
  396. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +27 -0
  397. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +69 -46
  398. package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
  399. package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
  400. package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
  401. package/dist/components/features/conversation-panel/conversation-panel.js +230 -165
  402. package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
  403. package/dist/components/features/files-tab/file-content-viewer.cjs +1 -1
  404. package/dist/components/features/files-tab/file-content-viewer.cjs.map +1 -1
  405. package/dist/components/features/files-tab/file-content-viewer.js +22 -25
  406. package/dist/components/features/files-tab/file-content-viewer.js.map +1 -1
  407. package/dist/components/features/markdown/markdown-table-scroll.cjs +1 -1
  408. package/dist/components/features/markdown/markdown-table-scroll.cjs.map +1 -1
  409. package/dist/components/features/markdown/markdown-table-scroll.js +2 -2
  410. package/dist/components/features/markdown/markdown-table-scroll.js.map +1 -1
  411. package/dist/components/features/settings/llm-profiles/profile-row.cjs +1 -1
  412. package/dist/components/features/settings/llm-profiles/profile-row.js +1 -0
  413. package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs +1 -1
  414. package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs.map +1 -1
  415. package/dist/components/shared/buttons/conversation-confirmation-buttons.js +2 -2
  416. package/dist/components/shared/buttons/conversation-confirmation-buttons.js.map +1 -1
  417. package/dist/components/shared/modals/confirmation-modals/base-modal.cjs +1 -1
  418. package/dist/components/shared/modals/confirmation-modals/base-modal.cjs.map +1 -1
  419. package/dist/components/shared/modals/confirmation-modals/base-modal.js +1 -1
  420. package/dist/components/shared/modals/confirmation-modals/base-modal.js.map +1 -1
  421. package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
  422. package/dist/components/shared/modals/settings/model-selector.cjs.map +1 -1
  423. package/dist/components/shared/modals/settings/model-selector.js +154 -98
  424. package/dist/components/shared/modals/settings/model-selector.js.map +1 -1
  425. package/dist/config/defaults.cjs +1 -1
  426. package/dist/config/defaults.cjs.map +1 -1
  427. package/dist/config/defaults.js +3 -3
  428. package/dist/config/defaults.js.map +1 -1
  429. package/dist/constants/llm-balance.cjs +2 -0
  430. package/dist/constants/llm-balance.cjs.map +1 -0
  431. package/dist/constants/llm-balance.d.ts +13 -0
  432. package/dist/constants/llm-balance.js +6 -0
  433. package/dist/constants/llm-balance.js.map +1 -0
  434. package/dist/contexts/conversation-websocket-context.cjs +2 -2
  435. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  436. package/dist/contexts/conversation-websocket-context.js +217 -209
  437. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  438. package/dist/hooks/chat/use-grip-resize.cjs +1 -1
  439. package/dist/hooks/chat/use-grip-resize.cjs.map +1 -1
  440. package/dist/hooks/chat/use-grip-resize.d.ts +1 -0
  441. package/dist/hooks/chat/use-grip-resize.js +39 -30
  442. package/dist/hooks/chat/use-grip-resize.js.map +1 -1
  443. package/dist/hooks/chat/use-slash-command.cjs +1 -1
  444. package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
  445. package/dist/hooks/chat/use-slash-command.js +61 -60
  446. package/dist/hooks/chat/use-slash-command.js.map +1 -1
  447. package/dist/hooks/mutation/use-condense-conversation.cjs +2 -0
  448. package/dist/hooks/mutation/use-condense-conversation.cjs.map +1 -0
  449. package/dist/hooks/mutation/use-condense-conversation.d.ts +12 -0
  450. package/dist/hooks/mutation/use-condense-conversation.js +17 -0
  451. package/dist/hooks/mutation/use-condense-conversation.js.map +1 -0
  452. package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
  453. package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
  454. package/dist/hooks/mutation/use-create-conversation.js +30 -21
  455. package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
  456. package/dist/hooks/mutation/use-new-conversation-command.cjs +1 -1
  457. package/dist/hooks/mutation/use-new-conversation-command.cjs.map +1 -1
  458. package/dist/hooks/mutation/use-new-conversation-command.js +1 -1
  459. package/dist/hooks/mutation/use-new-conversation-command.js.map +1 -1
  460. package/dist/hooks/query/use-conversation-metrics.cjs +1 -1
  461. package/dist/hooks/query/use-conversation-metrics.cjs.map +1 -1
  462. package/dist/hooks/query/use-conversation-metrics.js +1 -1
  463. package/dist/hooks/query/use-conversation-metrics.js.map +1 -1
  464. package/dist/hooks/query/use-llm-balance.cjs +2 -0
  465. package/dist/hooks/query/use-llm-balance.cjs.map +1 -0
  466. package/dist/hooks/query/use-llm-balance.d.ts +10 -0
  467. package/dist/hooks/query/use-llm-balance.js +24 -0
  468. package/dist/hooks/query/use-llm-balance.js.map +1 -0
  469. package/dist/hooks/query/use-search-providers.cjs +1 -1
  470. package/dist/hooks/query/use-search-providers.cjs.map +1 -1
  471. package/dist/hooks/query/use-search-providers.js +1 -1
  472. package/dist/hooks/query/use-search-providers.js.map +1 -1
  473. package/dist/hooks/use-await-context-compaction.cjs +2 -0
  474. package/dist/hooks/use-await-context-compaction.cjs.map +1 -0
  475. package/dist/hooks/use-await-context-compaction.d.ts +38 -0
  476. package/dist/hooks/use-await-context-compaction.js +61 -0
  477. package/dist/hooks/use-await-context-compaction.js.map +1 -0
  478. package/dist/hooks/use-compact-context-action.cjs +2 -0
  479. package/dist/hooks/use-compact-context-action.cjs.map +1 -0
  480. package/dist/hooks/use-compact-context-action.d.ts +10 -0
  481. package/dist/hooks/use-compact-context-action.js +61 -0
  482. package/dist/hooks/use-compact-context-action.js.map +1 -0
  483. package/dist/hooks/use-context-window-usage.cjs +2 -0
  484. package/dist/hooks/use-context-window-usage.cjs.map +1 -0
  485. package/dist/hooks/use-context-window-usage.d.ts +5 -0
  486. package/dist/hooks/use-context-window-usage.js +20 -0
  487. package/dist/hooks/use-context-window-usage.js.map +1 -0
  488. package/dist/hooks/use-conversation-name-context-menu.cjs +1 -1
  489. package/dist/hooks/use-conversation-name-context-menu.cjs.map +1 -1
  490. package/dist/hooks/use-conversation-name-context-menu.d.ts +0 -3
  491. package/dist/hooks/use-conversation-name-context-menu.js +54 -57
  492. package/dist/hooks/use-conversation-name-context-menu.js.map +1 -1
  493. package/dist/hooks/use-drag-resize.cjs +1 -1
  494. package/dist/hooks/use-drag-resize.cjs.map +1 -1
  495. package/dist/hooks/use-drag-resize.d.ts +8 -0
  496. package/dist/hooks/use-drag-resize.js +21 -18
  497. package/dist/hooks/use-drag-resize.js.map +1 -1
  498. package/dist/hooks/use-live-conversation-metrics.cjs +2 -0
  499. package/dist/hooks/use-live-conversation-metrics.cjs.map +1 -0
  500. package/dist/hooks/use-live-conversation-metrics.d.ts +18 -0
  501. package/dist/hooks/use-live-conversation-metrics.js +37 -0
  502. package/dist/hooks/use-live-conversation-metrics.js.map +1 -0
  503. package/dist/hooks/use-select-conversation-tab.cjs +1 -1
  504. package/dist/hooks/use-select-conversation-tab.cjs.map +1 -1
  505. package/dist/hooks/use-select-conversation-tab.js +2 -2
  506. package/dist/hooks/use-select-conversation-tab.js.map +1 -1
  507. package/dist/i18n/declaration.cjs +1 -1
  508. package/dist/i18n/declaration.cjs.map +1 -1
  509. package/dist/i18n/declaration.d.ts +27 -0
  510. package/dist/i18n/declaration.js +1 -1
  511. package/dist/i18n/declaration.js.map +1 -1
  512. package/dist/i18n/translation.cjs +2 -2
  513. package/dist/i18n/translation.cjs.map +1 -1
  514. package/dist/i18n/translation.js +474 -15
  515. package/dist/i18n/translation.js.map +1 -1
  516. package/dist/index.cjs +1 -1
  517. package/dist/index.js +28 -29
  518. package/dist/lib/index.cjs +1 -1
  519. package/dist/lib/index.js +0 -1
  520. package/dist/locales/ar/openhands.json +28 -1
  521. package/dist/locales/ca/openhands.json +28 -1
  522. package/dist/locales/de/openhands.json +28 -1
  523. package/dist/locales/en/openhands.json +28 -1
  524. package/dist/locales/es/openhands.json +28 -1
  525. package/dist/locales/fr/openhands.json +28 -1
  526. package/dist/locales/it/openhands.json +28 -1
  527. package/dist/locales/ja/openhands.json +28 -1
  528. package/dist/locales/ko-KR/openhands.json +28 -1
  529. package/dist/locales/no/openhands.json +28 -1
  530. package/dist/locales/pt/openhands.json +28 -1
  531. package/dist/locales/tr/openhands.json +28 -1
  532. package/dist/locales/uk/openhands.json +28 -1
  533. package/dist/locales/zh-CN/openhands.json +28 -1
  534. package/dist/locales/zh-TW/openhands.json +28 -1
  535. package/dist/node_modules/@microlink/react-json-view/dist/main.cjs +5 -5
  536. package/dist/node_modules/@microlink/react-json-view/dist/main.cjs.map +1 -1
  537. package/dist/node_modules/@microlink/react-json-view/dist/main.js +5194 -5187
  538. package/dist/node_modules/@microlink/react-json-view/dist/main.js.map +1 -1
  539. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +2 -1
  540. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs.map +1 -0
  541. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +21 -1
  542. package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js.map +1 -0
  543. package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs +2 -1
  544. package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs.map +1 -0
  545. package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js +22 -1
  546. package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js.map +1 -0
  547. package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs +2 -1
  548. package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs.map +1 -0
  549. package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js +33 -1
  550. package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js.map +1 -0
  551. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs +1 -1
  552. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs.map +1 -1
  553. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js +56 -22
  554. package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js.map +1 -1
  555. package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.cjs +1 -1
  556. package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.cjs.map +1 -1
  557. package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.js +3 -0
  558. package/dist/node_modules/@openhands/typescript-client/dist/client/profiles-client.js.map +1 -1
  559. package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs +2 -1
  560. package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs.map +1 -0
  561. package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js +31 -1
  562. package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js.map +1 -0
  563. package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs +2 -1
  564. package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs.map +1 -0
  565. package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js +21 -1
  566. package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js.map +1 -0
  567. package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs +2 -1
  568. package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs.map +1 -0
  569. package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js +21 -1
  570. package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js.map +1 -0
  571. package/dist/node_modules/@openhands/typescript-client/dist/conversation/local-conversation.cjs.map +1 -1
  572. package/dist/node_modules/@openhands/typescript-client/dist/conversation/local-conversation.js.map +1 -1
  573. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
  574. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
  575. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +9 -5
  576. package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
  577. package/dist/node_modules/i18next-http-backend/esm/index.cjs +1 -1
  578. package/dist/node_modules/i18next-http-backend/esm/index.cjs.map +1 -1
  579. package/dist/node_modules/i18next-http-backend/esm/index.js +2 -2
  580. package/dist/node_modules/i18next-http-backend/esm/index.js.map +1 -1
  581. package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.cjs +2 -0
  582. package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.cjs.map +1 -0
  583. package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.js +31 -0
  584. package/dist/node_modules/lucide-react/dist/esm/icons/archive-restore.js.map +1 -0
  585. package/dist/node_modules/lucide-react/dist/esm/icons/archive.cjs +2 -0
  586. package/dist/node_modules/lucide-react/dist/esm/icons/archive.cjs.map +1 -0
  587. package/dist/node_modules/lucide-react/dist/esm/icons/archive.js +23 -0
  588. package/dist/node_modules/lucide-react/dist/esm/icons/archive.js.map +1 -0
  589. package/dist/node_modules/lucide-react/dist/esm/icons/gauge.cjs +2 -0
  590. package/dist/node_modules/lucide-react/dist/esm/icons/gauge.cjs.map +1 -0
  591. package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js +12 -0
  592. package/dist/node_modules/lucide-react/dist/esm/icons/gauge.js.map +1 -0
  593. package/dist/node_modules/lucide-react/dist/esm/icons/minimize.cjs +2 -0
  594. package/dist/node_modules/lucide-react/dist/esm/icons/minimize.cjs.map +1 -0
  595. package/dist/node_modules/lucide-react/dist/esm/icons/minimize.js +23 -0
  596. package/dist/node_modules/lucide-react/dist/esm/icons/minimize.js.map +1 -0
  597. package/dist/node_modules/zustand/esm/middleware.cjs +3 -3
  598. package/dist/node_modules/zustand/esm/middleware.cjs.map +1 -1
  599. package/dist/node_modules/zustand/esm/middleware.js +33 -31
  600. package/dist/node_modules/zustand/esm/middleware.js.map +1 -1
  601. package/dist/package.cjs +1 -1
  602. package/dist/package.cjs.map +1 -1
  603. package/dist/package.js +17 -16
  604. package/dist/package.js.map +1 -1
  605. package/dist/routes/app-settings.cjs +1 -1
  606. package/dist/routes/app-settings.cjs.map +1 -1
  607. package/dist/routes/app-settings.js +94 -93
  608. package/dist/routes/app-settings.js.map +1 -1
  609. package/dist/routes/llm-settings.cjs +1 -1
  610. package/dist/routes/llm-settings.cjs.map +1 -1
  611. package/dist/routes/llm-settings.js +131 -119
  612. package/dist/routes/llm-settings.js.map +1 -1
  613. package/dist/routes/usage-tab.cjs +2 -0
  614. package/dist/routes/usage-tab.cjs.map +1 -0
  615. package/dist/routes/usage-tab.d.ts +2 -0
  616. package/dist/routes/usage-tab.js +10 -0
  617. package/dist/routes/usage-tab.js.map +1 -0
  618. package/dist/services/child-conversation-launch.cjs +1 -1
  619. package/dist/services/child-conversation-launch.cjs.map +1 -1
  620. package/dist/services/child-conversation-launch.js +11 -5
  621. package/dist/services/child-conversation-launch.js.map +1 -1
  622. package/dist/stores/archived-conversations-store.cjs +2 -0
  623. package/dist/stores/archived-conversations-store.cjs.map +1 -0
  624. package/dist/stores/archived-conversations-store.d.ts +24 -0
  625. package/dist/stores/archived-conversations-store.js +33 -0
  626. package/dist/stores/archived-conversations-store.js.map +1 -0
  627. package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
  628. package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
  629. package/dist/stores/conversation-panel-preferences-store.d.ts +3 -0
  630. package/dist/stores/conversation-panel-preferences-store.js +4 -0
  631. package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
  632. package/dist/stores/conversation-store.cjs.map +1 -1
  633. package/dist/stores/conversation-store.d.ts +1 -1
  634. package/dist/stores/conversation-store.js.map +1 -1
  635. package/dist/stores/metrics-store.cjs +1 -1
  636. package/dist/stores/metrics-store.cjs.map +1 -1
  637. package/dist/stores/metrics-store.d.ts +1 -0
  638. package/dist/stores/metrics-store.js +7 -4
  639. package/dist/stores/metrics-store.js.map +1 -1
  640. package/dist/types/agent-server/core/events/condensation-event.d.ts +3 -0
  641. package/dist/types/agent-server/core/events/conversation-state-event.d.ts +4 -6
  642. package/dist/types/agent-server/type-guards.cjs +1 -1
  643. package/dist/types/agent-server/type-guards.cjs.map +1 -1
  644. package/dist/types/agent-server/type-guards.d.ts +5 -0
  645. package/dist/types/agent-server/type-guards.js +3 -3
  646. package/dist/types/agent-server/type-guards.js.map +1 -1
  647. package/dist/utils/conversation-local-storage.cjs +1 -1
  648. package/dist/utils/conversation-local-storage.cjs.map +1 -1
  649. package/dist/utils/conversation-local-storage.js +2 -1
  650. package/dist/utils/conversation-local-storage.js.map +1 -1
  651. package/dist/utils/format-model-name.cjs +1 -1
  652. package/dist/utils/format-model-name.cjs.map +1 -1
  653. package/dist/utils/format-model-name.d.ts +11 -0
  654. package/dist/utils/format-model-name.js +11 -3
  655. package/dist/utils/format-model-name.js.map +1 -1
  656. package/dist/utils/format-token-count.cjs +2 -0
  657. package/dist/utils/format-token-count.cjs.map +1 -0
  658. package/dist/utils/format-token-count.d.ts +3 -0
  659. package/dist/utils/format-token-count.js +19 -0
  660. package/dist/utils/format-token-count.js.map +1 -0
  661. package/dist/utils/hover-reveal-classes.cjs +2 -0
  662. package/dist/utils/hover-reveal-classes.cjs.map +1 -0
  663. package/dist/utils/hover-reveal-classes.d.ts +34 -0
  664. package/dist/utils/hover-reveal-classes.js +41 -0
  665. package/dist/utils/hover-reveal-classes.js.map +1 -0
  666. package/dist/utils/is-markdown-file-path.cjs +2 -0
  667. package/dist/utils/is-markdown-file-path.cjs.map +1 -0
  668. package/dist/utils/is-markdown-file-path.d.ts +4 -0
  669. package/dist/utils/is-markdown-file-path.js +14 -0
  670. package/dist/utils/is-markdown-file-path.js.map +1 -0
  671. package/dist/utils/mcp-marketplace-utils.cjs +1 -1
  672. package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
  673. package/dist/utils/mcp-marketplace-utils.d.ts +7 -0
  674. package/dist/utils/mcp-marketplace-utils.js +19 -16
  675. package/dist/utils/mcp-marketplace-utils.js.map +1 -1
  676. package/dist/utils/transcript-export/index.cjs +3 -3
  677. package/dist/utils/transcript-export/index.cjs.map +1 -1
  678. package/dist/utils/transcript-export/index.js +12 -12
  679. package/dist/utils/transcript-export/index.js.map +1 -1
  680. package/dist/utils/transcript-export/load-complete-events.cjs +1 -1
  681. package/dist/utils/transcript-export/load-complete-events.cjs.map +1 -1
  682. package/dist/utils/transcript-export/load-complete-events.js +4 -4
  683. package/dist/utils/transcript-export/load-complete-events.js.map +1 -1
  684. package/dist/utils/workspace-relative-path.cjs +2 -0
  685. package/dist/utils/workspace-relative-path.cjs.map +1 -0
  686. package/dist/utils/workspace-relative-path.d.ts +10 -0
  687. package/dist/utils/workspace-relative-path.js +22 -0
  688. package/dist/utils/workspace-relative-path.js.map +1 -0
  689. package/package.json +17 -16
  690. package/scripts/check-sdk-version-sync.mjs +6 -6
  691. package/scripts/dev-process-utils.mjs +6 -1
  692. package/scripts/dev-safe.mjs +57 -2
  693. package/build/assets/active-backend-context-BBvP-bI2.js +0 -2
  694. package/build/assets/agent-profiles-settings-DqoS7RL3.js +0 -1
  695. package/build/assets/agent-server-conversation-service.api-0RztSdJJ.js +0 -86
  696. package/build/assets/agent-settings-BJHryp65.js +0 -1
  697. package/build/assets/app-settings-r1RUbgGi.js +0 -1
  698. package/build/assets/backend-form-modal-OroTqnAv.js +0 -1
  699. package/build/assets/bot-DuN83i3p.js +0 -1
  700. package/build/assets/browser--eoQOo4M.js +0 -6
  701. package/build/assets/check-DLOKoFU9.js +0 -1
  702. package/build/assets/chevron-down-CnIbtM6i.js +0 -1
  703. package/build/assets/circle-check-CxCYJrpZ.js +0 -1
  704. package/build/assets/conversation-BUzBZAc-.js +0 -90
  705. package/build/assets/conversation-panel-pzAKsSDb.js +0 -1
  706. package/build/assets/conversation-pzAKsSDb.js +0 -1
  707. package/build/assets/conversation-store-B8Eahyeg.js +0 -6
  708. package/build/assets/external-link-zWbg5KXS.js +0 -1
  709. package/build/assets/files-tab-BzofBmF4.js +0 -1
  710. package/build/assets/git-provider-icon-BLMlwy02.js +0 -1
  711. package/build/assets/git-repo-dropdown-B_PTq4ol.js +0 -1
  712. package/build/assets/home-r89Vj2td.js +0 -1
  713. package/build/assets/index-home-r89Vj2td.js +0 -1
  714. package/build/assets/llm-not-configured-banner-CwKu8C6g.js +0 -27
  715. package/build/assets/llm-settings-BJotLQND.js +0 -1
  716. package/build/assets/llm-settings-CDM-5H2A.js +0 -1
  717. package/build/assets/llm-subscription-service-7eVfDIE1.js +0 -1
  718. package/build/assets/loader-circle-C5AnEN8r.js +0 -1
  719. package/build/assets/manifest-2a36a8f8.js +0 -1
  720. package/build/assets/markdown-renderer-BiiiIznl.js +0 -8
  721. package/build/assets/mcp-marketplace-utils-Dr_HG_ol.js +0 -1
  722. package/build/assets/messages-D1cbVhRK.js +0 -40
  723. package/build/assets/pencil-Bl3GWhgq.js +0 -1
  724. package/build/assets/plus-CtzlyAoF.js +0 -1
  725. package/build/assets/recommended-automations-launcher-BbJAJVED.js +0 -1
  726. package/build/assets/refresh-cw-B9GhC3QC.js +0 -1
  727. package/build/assets/root-BfM_kC_d.css +0 -1
  728. package/build/assets/root-gstBEjty.js +0 -2
  729. package/build/assets/root-layout-BIAFLP9p.js +0 -2
  730. package/build/assets/search-CYaiKHRp.js +0 -1
  731. package/build/assets/shared-conversation-DIxZjElr.js +0 -1
  732. package/build/assets/shield-check-D2cpEpv3.js +0 -1
  733. package/build/assets/trash-2-CzDVN-Iw.js +0 -1
  734. package/build/assets/use-create-conversation-DWaSVUOB.js +0 -1
  735. package/build/assets/use-is-authed-Bka89Xmm.js +0 -1
  736. package/build/assets/use-llm-profiles-CU8ah1pz.js +0 -1
  737. package/build/assets/use-save-agent-profile-DgI_Uz9a.js +0 -1
  738. package/build/assets/utils-DPQfkd-7.js +0 -1
  739. package/build/assets/vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js +0 -13
  740. package/build/assets/x-RYDBg-e2.js +0 -1
  741. package/build/assets/zap-tbKDzCe3.js +0 -1
  742. package/dist/components/features/conversation/metrics-modal/context-window-section.cjs +0 -2
  743. package/dist/components/features/conversation/metrics-modal/context-window-section.cjs.map +0 -1
  744. package/dist/components/features/conversation/metrics-modal/context-window-section.d.ts +0 -6
  745. package/dist/components/features/conversation/metrics-modal/context-window-section.js +0 -46
  746. package/dist/components/features/conversation/metrics-modal/context-window-section.js.map +0 -1
  747. package/dist/components/features/conversation/metrics-modal/empty-state.cjs +0 -2
  748. package/dist/components/features/conversation/metrics-modal/empty-state.cjs.map +0 -1
  749. package/dist/components/features/conversation/metrics-modal/empty-state.d.ts +0 -1
  750. package/dist/components/features/conversation/metrics-modal/empty-state.js +0 -18
  751. package/dist/components/features/conversation/metrics-modal/empty-state.js.map +0 -1
  752. package/dist/components/features/conversation/metrics-modal/metrics-modal-header.cjs +0 -2
  753. package/dist/components/features/conversation/metrics-modal/metrics-modal-header.cjs.map +0 -1
  754. package/dist/components/features/conversation/metrics-modal/metrics-modal-header.d.ts +0 -5
  755. package/dist/components/features/conversation/metrics-modal/metrics-modal-header.js +0 -20
  756. package/dist/components/features/conversation/metrics-modal/metrics-modal-header.js.map +0 -1
  757. package/dist/components/features/conversation/metrics-modal/metrics-modal.cjs +0 -2
  758. package/dist/components/features/conversation/metrics-modal/metrics-modal.cjs.map +0 -1
  759. package/dist/components/features/conversation/metrics-modal/metrics-modal.d.ts +0 -6
  760. package/dist/components/features/conversation/metrics-modal/metrics-modal.js +0 -57
  761. package/dist/components/features/conversation/metrics-modal/metrics-modal.js.map +0 -1
  762. package/dist/icons/u-credit-card.cjs +0 -2
  763. package/dist/icons/u-credit-card.cjs.map +0 -1
  764. package/dist/icons/u-credit-card.js +0 -21
  765. package/dist/icons/u-credit-card.js.map +0 -1
  766. /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js} +0 -0
@@ -1 +1 @@
1
- import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{z as n}from"./utils-DPQfkd-7.js";import{t as r}from"./checkmark-XZyokq_Y.js";import{t as i}from"./copy-Drmhc2jD.js";var a=e();function o({isHidden:e,isDisabled:o,onClick:s,mode:c}){let{t:l}=t(`openhands`);return(0,a.jsxs)(`button`,{hidden:e,disabled:o,"data-testid":`copy-to-clipboard`,type:`button`,onClick:s,"aria-label":l(c===`copy`?n.BUTTON$COPY:n.BUTTON$COPIED),className:`button-base p-1 cursor-pointer`,children:[c===`copy`&&(0,a.jsx)(i,{width:15,height:15}),c===`copied`&&(0,a.jsx)(r,{width:15,height:15})]})}export{o as t};
1
+ import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{z as n}from"./utils-zxEjKE70.js";import{t as r}from"./checkmark-XZyokq_Y.js";import{t as i}from"./copy-Drmhc2jD.js";var a=e();function o({isHidden:e,isDisabled:o,onClick:s,mode:c}){let{t:l}=t(`openhands`);return(0,a.jsxs)(`button`,{hidden:e,disabled:o,"data-testid":`copy-to-clipboard`,type:`button`,onClick:s,"aria-label":l(c===`copy`?n.BUTTON$COPY:n.BUTTON$COPIED),className:`button-base p-1 cursor-pointer`,children:[c===`copy`&&(0,a.jsx)(i,{width:15,height:15}),c===`copied`&&(0,a.jsx)(r,{width:15,height:15})]})}export{o as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{H as r,U as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{t as o,z as s}from"./utils-DPQfkd-7.js";import{t as c}from"./use-is-authed-Bka89Xmm.js";import{t as l}from"./typography-D9tiHct7.js";var u=e(t(),1),d=n(),f=i(function(){let{t:e}=a(`openhands`),[t]=r(),{data:n,isLoading:i}=c(),[f,p]=(0,u.useState)(null),[m,h]=(0,u.useState)(!1),g=t.get(`user_code`),_=async e=>{try{h(!0),(await fetch(`/oauth/device/verify-authenticated`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:`user_code=${encodeURIComponent(e)}`,credentials:`include`})).ok?p({success:!0,messageKey:s.DEVICE$SUCCESS_MESSAGE}):p({success:!1,messageKey:s.DEVICE$ERROR_FAILED})}catch{p({success:!1,messageKey:s.DEVICE$ERROR_OCCURRED})}finally{h(!1)}};return f?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsx)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:o(`mb-4`,f.success?`text-green-600`:`text-red-600`),children:f.success?(0,d.jsx)(`svg`,{className:`w-12 h-12 mx-auto`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,d.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 13l4 4L19 7`})}):(0,d.jsx)(`svg`,{className:`w-12 h-12 mx-auto`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,d.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})}),(0,d.jsx)(`h2`,{className:`text-xl font-medium mb-2`,children:f.success?e(s.DEVICE$SUCCESS_TITLE):e(s.DEVICE$ERROR_TITLE)}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-4`,children:e(f.messageKey)}),!f.success&&(0,d.jsx)(`button`,{type:`button`,onClick:()=>window.location.reload(),className:`px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90`,children:e(s.DEVICE$TRY_AGAIN)})]})})}):m?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsx)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-b-2 border-white mx-auto mb-4`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(s.DEVICE$PROCESSING)})]})})}):n&&g?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background p-4`,children:(0,d.jsx)(`div`,{className:`flex flex-col items-center gap-6 w-full max-w-md`,children:(0,d.jsxs)(`div`,{className:`flex-1 min-w-0 max-w-md w-full mx-auto p-6 bg-card rounded-2xl shadow-lg border border-[var(--oh-border-subtle)]`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4 text-center`,children:e(s.DEVICE$AUTHORIZATION_REQUEST)}),(0,d.jsxs)(`div`,{className:`mb-6 p-4 bg-base rounded-lg border border-[var(--oh-border-subtle)]`,children:[(0,d.jsx)(`p`,{className:`text-xs text-[var(--oh-text-subtle)] mb-2 text-center uppercase tracking-wider`,children:e(s.DEVICE$CODE_LABEL)}),(0,d.jsx)(`p`,{className:`text-xl font-mono font-semibold text-center tracking-[0.3em]`,children:g})]}),(0,d.jsxs)(`div`,{className:`mb-6 p-4 bg-amber-950/50 border-l-2 border-amber-500 rounded-r-lg`,children:[(0,d.jsx)(`p`,{className:`text-sm font-medium text-amber-500 mb-1`,children:e(s.DEVICE$SECURITY_NOTICE)}),(0,d.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:e(s.DEVICE$SECURITY_WARNING)})]}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-6 text-center`,children:e(s.DEVICE$CONFIRM_PROMPT)}),(0,d.jsxs)(`div`,{className:`flex gap-3`,children:[(0,d.jsx)(`button`,{type:`button`,onClick:()=>window.close(),className:`flex-1 px-4 py-2 border border-[var(--oh-border)] rounded-md hover:bg-muted text-[var(--oh-text-tertiary)]`,children:e(s.DEVICE$CANCEL)}),(0,d.jsx)(`button`,{type:`button`,onClick:()=>_(g),className:`flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700`,children:e(s.DEVICE$AUTHORIZE)})]})]})})}):n&&!g?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4 text-center`,children:e(s.DEVICE$AUTHORIZATION_TITLE)}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-6 text-center`,children:e(s.DEVICE$ENTER_CODE_PROMPT)}),(0,d.jsxs)(`form`,{onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`user_code`);t&&n&&_(t)},children:[(0,d.jsxs)(`div`,{className:`mb-4`,children:[(0,d.jsx)(`label`,{htmlFor:`user_code`,className:`block text-sm font-medium mb-2`,children:e(s.DEVICE$CODE_INPUT_LABEL)}),(0,d.jsx)(`input`,{type:`text`,id:`user_code`,name:`user_code`,required:!0,className:`w-full px-3 py-2 border border-input rounded-md focus:outline-none focus:ring-2 focus:ring-ring`,placeholder:e(s.DEVICE$CODE_PLACEHOLDER)})]}),(0,d.jsx)(`button`,{type:`submit`,className:`w-full px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90`,children:e(s.DEVICE$CONTINUE)})]})]})}):i?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-b-2 border-white mx-auto mb-4`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(s.DEVICE$PROCESSING)})]})}):(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg text-center`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4`,children:e(s.DEVICE$AUTH_REQUIRED)}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(s.DEVICE$SIGN_IN_PROMPT)})]})})});export{f as default};
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{H as r,U as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{t as o,z as s}from"./utils-zxEjKE70.js";import{t as c}from"./use-is-authed-C52-ivnB.js";import{t as l}from"./typography-NOKSk9_R.js";var u=e(t(),1),d=n(),f=i(function(){let{t:e}=a(`openhands`),[t]=r(),{data:n,isLoading:i}=c(),[f,p]=(0,u.useState)(null),[m,h]=(0,u.useState)(!1),g=t.get(`user_code`),_=async e=>{try{h(!0),(await fetch(`/oauth/device/verify-authenticated`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:`user_code=${encodeURIComponent(e)}`,credentials:`include`})).ok?p({success:!0,messageKey:s.DEVICE$SUCCESS_MESSAGE}):p({success:!1,messageKey:s.DEVICE$ERROR_FAILED})}catch{p({success:!1,messageKey:s.DEVICE$ERROR_OCCURRED})}finally{h(!1)}};return f?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsx)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:o(`mb-4`,f.success?`text-green-600`:`text-red-600`),children:f.success?(0,d.jsx)(`svg`,{className:`w-12 h-12 mx-auto`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,d.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 13l4 4L19 7`})}):(0,d.jsx)(`svg`,{className:`w-12 h-12 mx-auto`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,d.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})}),(0,d.jsx)(`h2`,{className:`text-xl font-medium mb-2`,children:f.success?e(s.DEVICE$SUCCESS_TITLE):e(s.DEVICE$ERROR_TITLE)}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-4`,children:e(f.messageKey)}),!f.success&&(0,d.jsx)(`button`,{type:`button`,onClick:()=>window.location.reload(),className:`px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90`,children:e(s.DEVICE$TRY_AGAIN)})]})})}):m?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsx)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-b-2 border-white mx-auto mb-4`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(s.DEVICE$PROCESSING)})]})})}):n&&g?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background p-4`,children:(0,d.jsx)(`div`,{className:`flex flex-col items-center gap-6 w-full max-w-md`,children:(0,d.jsxs)(`div`,{className:`flex-1 min-w-0 max-w-md w-full mx-auto p-6 bg-card rounded-2xl shadow-lg border border-[var(--oh-border-subtle)]`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4 text-center`,children:e(s.DEVICE$AUTHORIZATION_REQUEST)}),(0,d.jsxs)(`div`,{className:`mb-6 p-4 bg-base rounded-lg border border-[var(--oh-border-subtle)]`,children:[(0,d.jsx)(`p`,{className:`text-xs text-[var(--oh-text-subtle)] mb-2 text-center uppercase tracking-wider`,children:e(s.DEVICE$CODE_LABEL)}),(0,d.jsx)(`p`,{className:`text-xl font-mono font-semibold text-center tracking-[0.3em]`,children:g})]}),(0,d.jsxs)(`div`,{className:`mb-6 p-4 bg-amber-950/50 border-l-2 border-amber-500 rounded-r-lg`,children:[(0,d.jsx)(`p`,{className:`text-sm font-medium text-amber-500 mb-1`,children:e(s.DEVICE$SECURITY_NOTICE)}),(0,d.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:e(s.DEVICE$SECURITY_WARNING)})]}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-6 text-center`,children:e(s.DEVICE$CONFIRM_PROMPT)}),(0,d.jsxs)(`div`,{className:`flex gap-3`,children:[(0,d.jsx)(`button`,{type:`button`,onClick:()=>window.close(),className:`flex-1 px-4 py-2 border border-[var(--oh-border)] rounded-md hover:bg-muted text-[var(--oh-text-tertiary)]`,children:e(s.DEVICE$CANCEL)}),(0,d.jsx)(`button`,{type:`button`,onClick:()=>_(g),className:`flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700`,children:e(s.DEVICE$AUTHORIZE)})]})]})})}):n&&!g?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4 text-center`,children:e(s.DEVICE$AUTHORIZATION_TITLE)}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-6 text-center`,children:e(s.DEVICE$ENTER_CODE_PROMPT)}),(0,d.jsxs)(`form`,{onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`user_code`);t&&n&&_(t)},children:[(0,d.jsxs)(`div`,{className:`mb-4`,children:[(0,d.jsx)(`label`,{htmlFor:`user_code`,className:`block text-sm font-medium mb-2`,children:e(s.DEVICE$CODE_INPUT_LABEL)}),(0,d.jsx)(`input`,{type:`text`,id:`user_code`,name:`user_code`,required:!0,className:`w-full px-3 py-2 border border-input rounded-md focus:outline-none focus:ring-2 focus:ring-ring`,placeholder:e(s.DEVICE$CODE_PLACEHOLDER)})]}),(0,d.jsx)(`button`,{type:`submit`,className:`w-full px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90`,children:e(s.DEVICE$CONTINUE)})]})]})}):i?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-b-2 border-white mx-auto mb-4`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(s.DEVICE$PROCESSING)})]})}):(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg text-center`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4`,children:e(s.DEVICE$AUTH_REQUIRED)}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(s.DEVICE$SIGN_IN_PROMPT)})]})})});export{f as default};
@@ -1 +1 @@
1
- import{t as e}from"./utils-DPQfkd-7.js";import{p as t}from"./form-control-classes-DLN3Qgub.js";var n=`transition-none`,r=`gap-0.5`,i=`gap-2`,a=e(`flex flex-col`,r),o=e(`bg-tertiary border border-[var(--oh-border-input)] rounded p-2`,`flex items-center gap-2`,t,n,`group w-full gap-2 px-3 text-[var(--oh-muted)] hover:text-white`),s=e(`group flex w-full cursor-pointer items-center rounded px-2 py-2 text-left text-sm font-normal text-white`,i,`hover:bg-[var(--oh-interactive-hover)] disabled:cursor-not-allowed disabled:opacity-60`,n),c=e(`group flex w-full cursor-pointer items-center rounded px-2 py-2 text-start text-sm font-normal`,i,`text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,`disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent`,n),l=e(`shrink-0 text-[var(--oh-muted)] group-hover:text-white group-focus-visible:text-white`,n),u=e(`flex size-4 shrink-0 items-center justify-center [&_svg]:text-current`,l),d=e(`inline-flex cursor-pointer items-center gap-1.5 rounded-lg border px-3 py-2 text-sm font-medium`,`border-[var(--oh-border)] bg-base-secondary text-white`,`focus-visible:border-white/40 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/20`,n);e(a,`overflow-y-auto custom-scrollbar-always`,`max-h-[13.875rem]`);var f=e(`overflow-y-auto custom-scrollbar`,`max-h-[min(60vh,calc(100dvh-5rem))]`),p=e(`group flex w-full items-center rounded-md px-2 py-2 text-sm font-normal text-white`,i,`hover:bg-[var(--oh-interactive-hover)]`,n);export{r as a,i as c,f as d,o as f,a as i,l,p as n,s as o,n as r,c as s,d as t,u};
1
+ import{t as e}from"./utils-zxEjKE70.js";import{p as t}from"./form-control-classes-7yFSQJq_.js";var n=`transition-none`,r=`gap-0.5`,i=`gap-2`,a=e(`flex flex-col`,r),o=e(`bg-tertiary border border-[var(--oh-border-input)] rounded p-2`,`flex items-center gap-2`,t,n,`group w-full gap-2 px-3 text-[var(--oh-muted)] hover:text-white`),s=e(`group flex w-full cursor-pointer items-center rounded px-2 py-2 text-left text-sm font-normal text-white`,i,`hover:bg-[var(--oh-interactive-hover)] disabled:cursor-not-allowed disabled:opacity-60`,n),c=e(`group flex w-full cursor-pointer items-center rounded px-2 py-2 text-start text-sm font-normal`,i,`text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,`disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent`,n),l=e(`shrink-0 text-[var(--oh-muted)] group-hover:text-white group-focus-visible:text-white`,n),u=e(`flex size-4 shrink-0 items-center justify-center [&_svg]:text-current`,l),d=e(`inline-flex cursor-pointer items-center gap-1.5 rounded-lg border px-3 py-2 text-sm font-medium`,`border-[var(--oh-border)] bg-base-secondary text-white`,`focus-visible:border-white/40 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/20`,n);e(a,`overflow-y-auto custom-scrollbar-always`,`max-h-[13.875rem]`);var f=e(`overflow-y-auto custom-scrollbar`,`max-h-[min(60vh,calc(100dvh-5rem))]`),p=e(`group flex w-full items-center rounded-md px-2 py-2 text-sm font-normal text-white`,i,`hover:bg-[var(--oh-interactive-hover)]`,n);export{r as a,i as c,f as d,o as f,a as i,l,p as n,s as o,n as r,c as s,d as t,u};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browser--eoQOo4M.js","assets/vendor~browser-DJ1pl_wn.js","assets/vendor~browser-C6uXH-dw.js","assets/llm-subscription-DTqtBCWz.js","assets/utils-DPQfkd-7.js","assets/vendor-styling-Ck5D_A2Q.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/settings-CWFxymAf.js","assets/automation-C_eCrGyP.js"])))=>i.map(i=>d[i]);
2
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,xt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{n as i}from"./vendor~entry.client-CgNUwtQL.js";import{t as a}from"./vendor~entry.client-zSIea5EO.js";import{n as o,t as s}from"./providers-tBzTpz1w.js";import{Gt as c}from"./active-backend-context-BBvP-bI2.js";var l=e(t(),1),u=a();function d({mockApi:e=void 0,hasWindow:t=typeof window<`u`}={}){return t&&e===`true`}var f=r();async function p(){if(await c(),d()){let{worker:e}=await n(async()=>{let{worker:e}=await import(`./browser--eoQOo4M.js`);return{worker:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]));await e.start({onUnhandledRequest:`bypass`})}}p().then(()=>(0,l.startTransition)(()=>{(0,u.hydrateRoot)(document,(0,f.jsx)(l.StrictMode,{children:(0,f.jsx)(s,{analytics:o,withStyleRoot:!1,children:(0,f.jsx)(i,{})})}))}));
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browser-B9AbV6kG.js","assets/vendor~browser-B-fae1JU.js","assets/vendor~browser-C6uXH-dw.js","assets/llm-subscription-DTqtBCWz.js","assets/utils-zxEjKE70.js","assets/vendor-styling-Ck5D_A2Q.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/settings-CWFxymAf.js","assets/automation-C_eCrGyP.js"])))=>i.map(i=>d[i]);
2
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,xt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{n as i}from"./vendor~entry.client-CgNUwtQL.js";import{t as a}from"./vendor~entry.client-zSIea5EO.js";import{n as o,t as s}from"./providers-BjrtjX4L.js";import{Gt as c}from"./active-backend-context-IqOjobNK.js";var l=e(t(),1),u=a();function d({mockApi:e=void 0,hasWindow:t=typeof window<`u`}={}){return t&&e===`true`}var f=r();async function p(){if(await c(),d()){let{worker:e}=await n(async()=>{let{worker:e}=await import(`./browser-B9AbV6kG.js`);return{worker:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]));await e.start({onUnhandledRequest:`bypass`})}}p().then(()=>(0,l.startTransition)(()=>{(0,u.hydrateRoot)(document,(0,f.jsx)(l.StrictMode,{children:(0,f.jsx)(s,{analytics:o,withStyleRoot:!1,children:(0,f.jsx)(i,{})})}))}));
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{t as i,z as a}from"./utils-DPQfkd-7.js";import{t as o}from"./check-DLOKoFU9.js";import{t as s}from"./chevron-down-CnIbtM6i.js";import{i as c,o as l,t as u}from"./dropdown-classes-zFW7qPSK.js";import{t as d}from"./use-click-outside-element-W6Os4Nlb.js";var f=e(t(),1),p=n();function m({testId:e,value:t,onChange:n,options:m,labelKeyByValue:h,labelByValue:g,ariaLabel:_}){let{t:v}=r(`openhands`),[y,b]=f.useState(!1),x=d(()=>b(!1)),S=e=>g?.[e]??(h?v(h[e]):e),C=_??v(a.CONVERSATION_PANEL$FILTER_LABEL),w=m[0],T=S(t);return(0,p.jsxs)(`div`,{ref:x,className:`relative shrink-0 w-auto`,"data-testid":e,children:[(0,p.jsxs)(`button`,{type:`button`,"data-testid":`dropdown-trigger`,"aria-haspopup":`menu`,"aria-expanded":y,"aria-label":C,onClick:()=>b(e=>!e),className:i(u,w&&t!==w&&`border-white/60 bg-white/10`),children:[(0,p.jsx)(`span`,{className:`whitespace-nowrap`,children:T}),(0,p.jsx)(s,{className:i(`h-4 w-4 shrink-0 text-tertiary-alt transition-transform`,y&&`rotate-180`),"aria-hidden":!0})]}),y?(0,p.jsx)(`div`,{role:`menu`,"data-testid":`${e}-menu`,"aria-label":C,className:i(`absolute right-0 top-full z-50 mt-1 min-w-full w-max`,`max-h-60 overflow-auto rounded-[6px] bg-tertiary p-1 context-menu-box-shadow`,c),children:m.map(r=>{let a=r===t;return(0,p.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":a,"data-testid":`${e}-${r}`,onClick:()=>{n(r),b(!1)},className:i(l,a&&`bg-[var(--oh-interactive-selected)]`),children:[(0,p.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:S(r)}),a?(0,p.jsx)(o,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0}):null]},r)})}):null]})}export{m as t};
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{t as i,z as a}from"./utils-zxEjKE70.js";import{t as o}from"./check-WAFXrrs_.js";import{t as s}from"./chevron-down-CifNWzme.js";import{i as c,o as l,t as u}from"./dropdown-classes-BIqQr5mx.js";import{t as d}from"./use-click-outside-element-W6Os4Nlb.js";var f=e(t(),1),p=n();function m({testId:e,value:t,onChange:n,options:m,labelKeyByValue:h,labelByValue:g,ariaLabel:_}){let{t:v}=r(`openhands`),[y,b]=f.useState(!1),x=d(()=>b(!1)),S=e=>g?.[e]??(h?v(h[e]):e),C=_??v(a.CONVERSATION_PANEL$FILTER_LABEL),w=m[0],T=S(t);return(0,p.jsxs)(`div`,{ref:x,className:`relative shrink-0 w-auto`,"data-testid":e,children:[(0,p.jsxs)(`button`,{type:`button`,"data-testid":`dropdown-trigger`,"aria-haspopup":`menu`,"aria-expanded":y,"aria-label":C,onClick:()=>b(e=>!e),className:i(u,w&&t!==w&&`border-white/60 bg-white/10`),children:[(0,p.jsx)(`span`,{className:`whitespace-nowrap`,children:T}),(0,p.jsx)(s,{className:i(`h-4 w-4 shrink-0 text-tertiary-alt transition-transform`,y&&`rotate-180`),"aria-hidden":!0})]}),y?(0,p.jsx)(`div`,{role:`menu`,"data-testid":`${e}-menu`,"aria-label":C,className:i(`absolute right-0 top-full z-50 mt-1 min-w-full w-max`,`max-h-60 overflow-auto rounded-[6px] bg-tertiary p-1 context-menu-box-shadow`,c),children:m.map(r=>{let a=r===t;return(0,p.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":a,"data-testid":`${e}-${r}`,onClick:()=>{n(r),b(!1)},className:i(l,a&&`bg-[var(--oh-interactive-selected)]`),children:[(0,p.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:S(r)}),a?(0,p.jsx)(o,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0}):null]},r)})}):null]})}export{m as t};
@@ -1 +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"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{z as a}from"./utils-DPQfkd-7.js";import{a as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./environment-switch-store-DVQZLFbj.js";var p=e(t(),1),m=e(n(),1),h=r();function g({className:e}){return(0,h.jsxs)(`svg`,{viewBox:`0 0 74.17 22`,xmlns:`http://www.w3.org/2000/svg`,className:e,"aria-hidden":!0,children:[(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`rect`,{x:`1`,y:`1`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`rect`,{x:`1`,y:`13`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`line`,{x1:`5`,y1:`5`,x2:`5.01`,y2:`5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,h.jsx)(`line`,{x1:`5`,y1:`17`,x2:`5.01`,y2:`17`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}),(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`rect`,{x:`53.17`,y:`1`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`rect`,{x:`53.17`,y:`13`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`line`,{x1:`57.17`,y1:`5`,x2:`57.18`,y2:`5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,h.jsx)(`line`,{x1:`57.17`,y1:`17`,x2:`57.18`,y2:`17`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}),(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`path`,{d:`M43.09,7l4,4-4,4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,h.jsx)(`path`,{d:`M27.09,11h20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,h.jsx)(`path`,{d:`M31.09,7l-4,4,4,4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})]})}function _(){let{t:e}=i(`openhands`),{visible:t,target:n}=p.useSyncExternalStore(l,o,o);return!t||typeof document>`u`?null:(0,m.createPortal)((0,h.jsx)(`div`,{"data-testid":`environment-switch-overlay`,"data-target":n,className:`environment-switch-overlay pointer-events-none fixed inset-0 z-[2147483646] flex items-center justify-center`,"aria-live":`polite`,"aria-atomic":`true`,children:(0,h.jsxs)(`div`,{className:`pointer-events-none flex min-w-[280px] max-w-[420px] flex-col items-center gap-2 rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] px-5 py-4 text-[var(--oh-foreground)] shadow-2xl`,children:[(0,h.jsx)(g,{className:`mb-2 h-6 w-20 shrink-0 text-[var(--oh-foreground)]`}),(0,h.jsx)(`p`,{className:`text-center text-sm font-medium`,children:e(a.BACKEND$SWITCHING_TO,{environment:n})})]})}),document.body)}export{f as ENVIRONMENT_SWITCH_DURATION_MS,c as ENVIRONMENT_SWITCH_SETACTIVE_DELAY_MS,_ as EnvironmentSwitchOverlay,_ as default,u as __resetEnvironmentSwitchOverlayForTests,s as dismissEnvironmentSwitch,d as triggerEnvironmentSwitch};
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"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{z as a}from"./utils-zxEjKE70.js";import{a as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./environment-switch-store-DVQZLFbj.js";var p=e(t(),1),m=e(n(),1),h=r();function g({className:e}){return(0,h.jsxs)(`svg`,{viewBox:`0 0 74.17 22`,xmlns:`http://www.w3.org/2000/svg`,className:e,"aria-hidden":!0,children:[(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`rect`,{x:`1`,y:`1`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`rect`,{x:`1`,y:`13`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`line`,{x1:`5`,y1:`5`,x2:`5.01`,y2:`5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,h.jsx)(`line`,{x1:`5`,y1:`17`,x2:`5.01`,y2:`17`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}),(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`rect`,{x:`53.17`,y:`1`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`rect`,{x:`53.17`,y:`13`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`line`,{x1:`57.17`,y1:`5`,x2:`57.18`,y2:`5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,h.jsx)(`line`,{x1:`57.17`,y1:`17`,x2:`57.18`,y2:`17`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}),(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`path`,{d:`M43.09,7l4,4-4,4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,h.jsx)(`path`,{d:`M27.09,11h20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,h.jsx)(`path`,{d:`M31.09,7l-4,4,4,4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})]})}function _(){let{t:e}=i(`openhands`),{visible:t,target:n}=p.useSyncExternalStore(l,o,o);return!t||typeof document>`u`?null:(0,m.createPortal)((0,h.jsx)(`div`,{"data-testid":`environment-switch-overlay`,"data-target":n,className:`environment-switch-overlay pointer-events-none fixed inset-0 z-[2147483646] flex items-center justify-center`,"aria-live":`polite`,"aria-atomic":`true`,children:(0,h.jsxs)(`div`,{className:`pointer-events-none flex min-w-[280px] max-w-[420px] flex-col items-center gap-2 rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] px-5 py-4 text-[var(--oh-foreground)] shadow-2xl`,children:[(0,h.jsx)(g,{className:`mb-2 h-6 w-20 shrink-0 text-[var(--oh-foreground)]`}),(0,h.jsx)(`p`,{className:`text-center text-sm font-medium`,children:e(a.BACKEND$SWITCHING_TO,{environment:n})})]})}),document.body)}export{f as ENVIRONMENT_SWITCH_DURATION_MS,c as ENVIRONMENT_SWITCH_SETACTIVE_DELAY_MS,_ as EnvironmentSwitchOverlay,_ as default,u as __resetEnvironmentSwitchOverlayForTests,s as dismissEnvironmentSwitch,d as triggerEnvironmentSwitch};
@@ -1 +1 @@
1
- import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{U as t,f as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{dt as i,r as a}from"./active-backend-context-BBvP-bI2.js";import{t as o,z as s}from"./utils-DPQfkd-7.js";import{t as c}from"./external-link-zWbg5KXS.js";import{a as l,f as u,o as d,u as f}from"./sidebar-layout-Dxg6zc2K.js";import{t as p}from"./sidebar-nav-link-CxLoG-dG.js";import{r as m}from"./typography-D9tiHct7.js";import{t as h}from"./use-breakpoint-DWtihr9g.js";import{t as g}from"./backend-synced-settings-badge-DB4717Iu.js";import{t as _}from"./extensions-navigation-6zU5M1pa.js";var v=e(),y=`/skills`,b=`/plugins`;function x(){let{t:e}=r(`openhands`),{active:t}=a(),{backend:n}=t,h=!i(n)&&n.kind===`cloud`;return(0,v.jsxs)(`div`,{"data-testid":`extensions-mobile-hub`,className:`flex flex-col gap-4 px-4 py-2 md:hidden`,children:[(0,v.jsx)(m.H2,{children:e(s.NAV$CUSTOMIZE)}),(0,v.jsx)(`nav`,{className:`flex flex-col gap-0.5`,children:_.filter(e=>!(e.to===b&&h)).map(t=>{if(t.to===y&&h){let r=`${n.host.replace(/\/+$/,``)}/settings/skills`;return(0,v.jsxs)(`a`,{"data-testid":`sidebar-extensions-${t.to}`,href:r,target:`_blank`,rel:`noopener noreferrer`,className:o(u({collapsed:!1}),d.idle),children:[(0,v.jsx)(`span`,{className:l,children:t.icon}),(0,v.jsx)(`span`,{className:o(f(!1),`flex-1`),children:e(s.SIDEBAR$SKILLS_AND_PLUGINS_CLOUD_LINK)}),(0,v.jsx)(c,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]},t.to)}return(0,v.jsx)(p,{to:t.to,label:t.label,end:t.end,testId:`sidebar-extensions-${t.to}`,icon:t.icon,disabled:t.comingSoon},t.to)})}),(0,v.jsx)(`div`,{className:`pt-1`,children:(0,v.jsx)(g,{})})]})}var S=t(function(){return h(768)?(0,v.jsx)(x,{}):(0,v.jsx)(n,{to:`/mcp`,replace:!0})});export{S as default};
1
+ import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{U as t,f as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{dt as i,r as a}from"./active-backend-context-IqOjobNK.js";import{t as o,z as s}from"./utils-zxEjKE70.js";import{t as c}from"./external-link-CgtpA_a1.js";import{a as l,f as u,o as d,u as f}from"./sidebar-layout-Bhi3hVcu.js";import{t as p}from"./sidebar-nav-link-BSUlY5Ml.js";import{r as m}from"./typography-NOKSk9_R.js";import{t as h}from"./use-breakpoint-DWtihr9g.js";import{t as g}from"./backend-synced-settings-badge-7MIjpr8M.js";import{t as _}from"./extensions-navigation-lraj88Wk.js";var v=e(),y=`/skills`,b=`/plugins`;function x(){let{t:e}=r(`openhands`),{active:t}=a(),{backend:n}=t,h=!i(n)&&n.kind===`cloud`;return(0,v.jsxs)(`div`,{"data-testid":`extensions-mobile-hub`,className:`flex flex-col gap-4 px-4 py-2 md:hidden`,children:[(0,v.jsx)(m.H2,{children:e(s.NAV$CUSTOMIZE)}),(0,v.jsx)(`nav`,{className:`flex flex-col gap-0.5`,children:_.filter(e=>!(e.to===b&&h)).map(t=>{if(t.to===y&&h){let r=`${n.host.replace(/\/+$/,``)}/settings/skills`;return(0,v.jsxs)(`a`,{"data-testid":`sidebar-extensions-${t.to}`,href:r,target:`_blank`,rel:`noopener noreferrer`,className:o(u({collapsed:!1}),d.idle),children:[(0,v.jsx)(`span`,{className:l,children:t.icon}),(0,v.jsx)(`span`,{className:o(f(!1),`flex-1`),children:e(s.SIDEBAR$SKILLS_AND_PLUGINS_CLOUD_LINK)}),(0,v.jsx)(c,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]},t.to)}return(0,v.jsx)(p,{to:t.to,label:t.label,end:t.end,testId:`sidebar-extensions-${t.to}`,icon:t.icon,disabled:t.comingSoon},t.to)})}),(0,v.jsx)(`div`,{className:`pt-1`,children:(0,v.jsx)(g,{})})]})}var S=t(function(){return h(768)?(0,v.jsx)(x,{}):(0,v.jsx)(n,{to:`/mcp`,replace:!0})});export{S as default};
@@ -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"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{dt as r,r as i}from"./active-backend-context-BBvP-bI2.js";import{t as a,z as o}from"./utils-DPQfkd-7.js";import{t as s}from"./external-link-zWbg5KXS.js";import{t as c}from"./navigation-link-Bxo3-4vo.js";import{f as l,o as u}from"./sidebar-layout-Dxg6zc2K.js";import{t as d}from"./skills-B0IliMxw.js";import{t as f}from"./backend-synced-settings-badge-DB4717Iu.js";e();var p=t(),m=e=>(0,p.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,p.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.25 3H21.75L22.5 3.75V13.5H21V9H3V19.5H13.5V21H2.25L1.5 20.25V3.75L2.25 3ZM3 7.5H21V4.5H3V7.5ZM10.5 18V16.359C10.2451 16.2664 10.0074 16.132 9.7965 15.9615L8.379 16.77L7.629 15.48L9.0345 14.6595C8.98649 14.3881 8.98649 14.1104 9.0345 13.839L7.629 13.02L8.379 11.73L9.7965 12.54C10.023 12.36 10.2585 12.2265 10.5 12.141V10.5H12V12.141C12.2568 12.2293 12.4953 12.3641 12.7035 12.5385L14.121 11.73L14.871 13.02L13.4655 13.8405C13.5133 14.1114 13.5133 14.3886 13.4655 14.6595L14.871 15.48L14.121 16.77L12.7035 15.96C12.4903 16.1274 12.2531 16.2619 12 16.359V18H10.5ZM10.125 14.25C10.125 14.562 10.2345 14.8275 10.4535 15.0465C10.5568 15.1528 10.6807 15.2367 10.8177 15.2932C10.9547 15.3497 11.1018 15.3776 11.25 15.375C11.3982 15.3776 11.5453 15.3497 11.6823 15.2932C11.8193 15.2367 11.9432 15.1528 12.0465 15.0465C12.1528 14.9432 12.2367 14.8193 12.2932 14.6823C12.3497 14.5453 12.3776 14.3982 12.375 14.25C12.3776 14.1018 12.3497 13.9547 12.2932 13.8177C12.2367 13.6807 12.1528 13.5568 12.0465 13.4535C11.9432 13.3472 11.8193 13.2633 11.6823 13.2068C11.5453 13.1503 11.3982 13.1224 11.25 13.125C11.1018 13.1224 10.9547 13.1503 10.8177 13.2068C10.6807 13.2633 10.5568 13.3472 10.4535 13.4535C10.3472 13.5568 10.2633 13.6807 10.2068 13.8177C10.1503 13.9547 10.1224 14.1018 10.125 14.25ZM18.126 22.5V20.859C17.8711 20.7663 17.6334 20.632 17.4225 20.4615L16.005 21.27L15.255 19.98L16.662 19.1595C16.614 18.8881 16.614 18.6104 16.662 18.339L15.255 17.52L16.005 16.23L17.4225 17.04C17.649 16.86 17.8845 16.7265 18.1275 16.641V15H19.6275V16.641C19.8837 16.7297 20.1216 16.8644 20.3295 17.0385L21.747 16.23L22.497 17.52L21.0915 18.3405C21.1396 18.6114 21.1396 18.8886 21.0915 19.1595L22.497 19.98L21.747 21.27L20.3295 20.46C20.1163 20.6275 19.8791 20.762 19.626 20.859V22.5H18.126ZM17.751 18.75C17.751 19.062 17.8605 19.3275 18.0795 19.5465C18.1828 19.6528 18.3067 19.7367 18.4437 19.7932C18.5807 19.8497 18.7278 19.8776 18.876 19.875C19.0242 19.8776 19.1713 19.8497 19.3083 19.7932C19.4453 19.7367 19.5692 19.6528 19.6725 19.5465C19.779 19.4434 19.8633 19.3195 19.9201 19.1825C19.9768 19.0455 20.0049 18.8983 20.0025 18.75C20.0049 18.6017 19.9768 18.4545 19.9201 18.3175C19.8633 18.1805 19.779 18.0566 19.6725 17.9535C19.5694 17.8474 19.4457 17.7636 19.309 17.7071C19.1722 17.6506 19.0254 17.6226 18.8775 17.625C18.7291 17.6222 18.5817 17.65 18.4444 17.7065C18.3072 17.763 18.183 17.847 18.0795 17.9535C17.9732 18.0568 17.8893 18.1807 17.8328 18.3177C17.7763 18.4547 17.7484 18.6018 17.751 18.75Z`,fill:`currentColor`})}),h=`/skills`,g=`/plugins`,_=[{to:`/mcp`,label:`MCP Servers`,icon:(0,p.jsx)(m,{width:16,height:16}),end:!0},{to:`/skills`,label:`Skills`,icon:(0,p.jsx)(d,{width:16,height:16,"aria-hidden":`true`}),end:!0},{to:`/plugins`,label:`Plugins`,icon:(0,p.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,width:16,height:16,"aria-hidden":`true`,children:[(0,p.jsx)(`path`,{d:`M21 8a2 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.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`}),(0,p.jsx)(`path`,{d:`m3.3 7 8.7 5 8.7-5`}),(0,p.jsx)(`path`,{d:`M12 22V12`})]}),end:!0}];function v(){let{t:e}=n(`openhands`),{active:t}=i(),{backend:d}=t,m=!r(d)&&d.kind===`cloud`;return(0,p.jsxs)(`aside`,{"data-testid":`extensions-navbar-desktop`,className:`hidden md:flex md:w-[260px] md:shrink-0 md:flex-col md:gap-2 md:sticky md:top-8 md:self-start`,children:[(0,p.jsx)(`span`,{className:`px-2 text-sm font-normal text-white`,children:e(o.NAV$CUSTOMIZE)}),(0,p.jsx)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:_.filter(e=>!(e.to===g&&m)).map(t=>{let n=t.to===h&&m,r=(0,p.jsx)(`span`,{className:`shrink-0 flex items-center justify-center`,children:t.icon}),i=(0,p.jsx)(`span`,{className:`truncate`,children:n?e(o.SIDEBAR$SKILLS_AND_PLUGINS_CLOUD_LINK):t.label}),f=t.comingSoon&&(0,p.jsx)(`span`,{className:`ml-auto shrink-0 rounded-full border border-white/20 bg-white/5 px-1.5 py-0.5 text-[10px] font-medium text-[var(--oh-text-dim)]`,children:e(o.NAV$COMING_SOON)});if(n){let e=`${d.host.replace(/\/+$/,``)}/settings/skills`;return(0,p.jsxs)(`a`,{"data-testid":`sidebar-extensions-${t.to}`,href:e,target:`_blank`,rel:`noopener noreferrer`,className:a(l(),`truncate`,u.idle),children:[r,i,(0,p.jsx)(s,{className:`ml-auto size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]},t.to)}return(0,p.jsxs)(c,{to:t.to,end:t.end,"data-testid":`sidebar-extensions-${t.to}`,className:({isActive:e})=>a(l(),`truncate`,e?u.active:u.idle),children:[r,i,f]},t.to)})}),(0,p.jsx)(`div`,{className:`px-2 pt-3`,children:(0,p.jsx)(f,{})})]})}export{v as n,_ 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"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{dt as r,r as i}from"./active-backend-context-IqOjobNK.js";import{t as a,z as o}from"./utils-zxEjKE70.js";import{t as s}from"./external-link-CgtpA_a1.js";import{t as c}from"./navigation-link-Bxo3-4vo.js";import{f as l,o as u}from"./sidebar-layout-Bhi3hVcu.js";import{t as d}from"./skills-B0IliMxw.js";import{t as f}from"./backend-synced-settings-badge-7MIjpr8M.js";e();var p=t(),m=e=>(0,p.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,p.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.25 3H21.75L22.5 3.75V13.5H21V9H3V19.5H13.5V21H2.25L1.5 20.25V3.75L2.25 3ZM3 7.5H21V4.5H3V7.5ZM10.5 18V16.359C10.2451 16.2664 10.0074 16.132 9.7965 15.9615L8.379 16.77L7.629 15.48L9.0345 14.6595C8.98649 14.3881 8.98649 14.1104 9.0345 13.839L7.629 13.02L8.379 11.73L9.7965 12.54C10.023 12.36 10.2585 12.2265 10.5 12.141V10.5H12V12.141C12.2568 12.2293 12.4953 12.3641 12.7035 12.5385L14.121 11.73L14.871 13.02L13.4655 13.8405C13.5133 14.1114 13.5133 14.3886 13.4655 14.6595L14.871 15.48L14.121 16.77L12.7035 15.96C12.4903 16.1274 12.2531 16.2619 12 16.359V18H10.5ZM10.125 14.25C10.125 14.562 10.2345 14.8275 10.4535 15.0465C10.5568 15.1528 10.6807 15.2367 10.8177 15.2932C10.9547 15.3497 11.1018 15.3776 11.25 15.375C11.3982 15.3776 11.5453 15.3497 11.6823 15.2932C11.8193 15.2367 11.9432 15.1528 12.0465 15.0465C12.1528 14.9432 12.2367 14.8193 12.2932 14.6823C12.3497 14.5453 12.3776 14.3982 12.375 14.25C12.3776 14.1018 12.3497 13.9547 12.2932 13.8177C12.2367 13.6807 12.1528 13.5568 12.0465 13.4535C11.9432 13.3472 11.8193 13.2633 11.6823 13.2068C11.5453 13.1503 11.3982 13.1224 11.25 13.125C11.1018 13.1224 10.9547 13.1503 10.8177 13.2068C10.6807 13.2633 10.5568 13.3472 10.4535 13.4535C10.3472 13.5568 10.2633 13.6807 10.2068 13.8177C10.1503 13.9547 10.1224 14.1018 10.125 14.25ZM18.126 22.5V20.859C17.8711 20.7663 17.6334 20.632 17.4225 20.4615L16.005 21.27L15.255 19.98L16.662 19.1595C16.614 18.8881 16.614 18.6104 16.662 18.339L15.255 17.52L16.005 16.23L17.4225 17.04C17.649 16.86 17.8845 16.7265 18.1275 16.641V15H19.6275V16.641C19.8837 16.7297 20.1216 16.8644 20.3295 17.0385L21.747 16.23L22.497 17.52L21.0915 18.3405C21.1396 18.6114 21.1396 18.8886 21.0915 19.1595L22.497 19.98L21.747 21.27L20.3295 20.46C20.1163 20.6275 19.8791 20.762 19.626 20.859V22.5H18.126ZM17.751 18.75C17.751 19.062 17.8605 19.3275 18.0795 19.5465C18.1828 19.6528 18.3067 19.7367 18.4437 19.7932C18.5807 19.8497 18.7278 19.8776 18.876 19.875C19.0242 19.8776 19.1713 19.8497 19.3083 19.7932C19.4453 19.7367 19.5692 19.6528 19.6725 19.5465C19.779 19.4434 19.8633 19.3195 19.9201 19.1825C19.9768 19.0455 20.0049 18.8983 20.0025 18.75C20.0049 18.6017 19.9768 18.4545 19.9201 18.3175C19.8633 18.1805 19.779 18.0566 19.6725 17.9535C19.5694 17.8474 19.4457 17.7636 19.309 17.7071C19.1722 17.6506 19.0254 17.6226 18.8775 17.625C18.7291 17.6222 18.5817 17.65 18.4444 17.7065C18.3072 17.763 18.183 17.847 18.0795 17.9535C17.9732 18.0568 17.8893 18.1807 17.8328 18.3177C17.7763 18.4547 17.7484 18.6018 17.751 18.75Z`,fill:`currentColor`})}),h=`/skills`,g=`/plugins`,_=[{to:`/mcp`,label:`MCP Servers`,icon:(0,p.jsx)(m,{width:16,height:16}),end:!0},{to:`/skills`,label:`Skills`,icon:(0,p.jsx)(d,{width:16,height:16,"aria-hidden":`true`}),end:!0},{to:`/plugins`,label:`Plugins`,icon:(0,p.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,width:16,height:16,"aria-hidden":`true`,children:[(0,p.jsx)(`path`,{d:`M21 8a2 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.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`}),(0,p.jsx)(`path`,{d:`m3.3 7 8.7 5 8.7-5`}),(0,p.jsx)(`path`,{d:`M12 22V12`})]}),end:!0}];function v(){let{t:e}=n(`openhands`),{active:t}=i(),{backend:d}=t,m=!r(d)&&d.kind===`cloud`;return(0,p.jsxs)(`aside`,{"data-testid":`extensions-navbar-desktop`,className:`hidden md:flex md:w-[260px] md:shrink-0 md:flex-col md:gap-2 md:sticky md:top-8 md:self-start`,children:[(0,p.jsx)(`span`,{className:`px-2 text-sm font-normal text-white`,children:e(o.NAV$CUSTOMIZE)}),(0,p.jsx)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:_.filter(e=>!(e.to===g&&m)).map(t=>{let n=t.to===h&&m,r=(0,p.jsx)(`span`,{className:`shrink-0 flex items-center justify-center`,children:t.icon}),i=(0,p.jsx)(`span`,{className:`truncate`,children:n?e(o.SIDEBAR$SKILLS_AND_PLUGINS_CLOUD_LINK):t.label}),f=t.comingSoon&&(0,p.jsx)(`span`,{className:`ml-auto shrink-0 rounded-full border border-white/20 bg-white/5 px-1.5 py-0.5 text-[10px] font-medium text-[var(--oh-text-dim)]`,children:e(o.NAV$COMING_SOON)});if(n){let e=`${d.host.replace(/\/+$/,``)}/settings/skills`;return(0,p.jsxs)(`a`,{"data-testid":`sidebar-extensions-${t.to}`,href:e,target:`_blank`,rel:`noopener noreferrer`,className:a(l(),`truncate`,u.idle),children:[r,i,(0,p.jsx)(s,{className:`ml-auto size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]},t.to)}return(0,p.jsxs)(c,{to:t.to,end:t.end,"data-testid":`sidebar-extensions-${t.to}`,className:({isActive:e})=>a(l(),`truncate`,e?u.active:u.idle),children:[r,i,f]},t.to)})}),(0,p.jsx)(`div`,{className:`px-2 pt-3`,children:(0,p.jsx)(f,{})})]})}export{v as n,_ as t};
@@ -0,0 +1 @@
1
+ import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";var t=e(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]);export{t};
@@ -1 +1 @@
1
- import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js";var t=e(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]);export{t};
1
+ import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";var t=e(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]);export{t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{_ as a,j as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";import{t as s}from"./useQuery-DRv--6bK.js";import{$ as c,Pt as l,X as u,ct as d,mt as f,n as p,nt as m}from"./active-backend-context-IqOjobNK.js";import{E as h,t as g,z as _}from"./utils-zxEjKE70.js";import{i as v,l as y,r as b}from"./messages-DSXvyc21.js";import{a as x,c as S,i as C,l as w,n as T,o as E,r as D,s as O,t as k}from"./vendor~files-tab-D9wR9yM2.js";import{t as A}from"./mouse-pointer-click-BYX1Pw5W.js";import{r as j}from"./conversation-CPCVsCUY.js";import{i as M}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-4WsUP-tz.js";import{t as N}from"./proxy-9Z_WZggZ.js";import{c as P,f as F}from"./conversation-store-Blc5xysY.js";import{t as ee}from"./segmented-toggle-DCspm2U5.js";import{x as te,y as ne}from"./agent-server-conversation-service.api-DWBe0rbX.js";import{t as re}from"./format-time-delta-BIR5Os7T.js";import{o as I}from"./home-store-CxqsY9Fi.js";import{r as ie}from"./typography-NOKSk9_R.js";import{h as L}from"./llm-not-configured-banner-DLw_tu-G.js";import{J as R,S as ae,X as oe,Y as z,g as B,q as se,t as ce}from"./markdown-renderer-DUmk7pFc.js";import{t as le}from"./link-external-BNZzCM1I.js";import{n as ue,t as de}from"./highlighted-source-view-C_sfncLZ.js";import{t as V}from"./conversation-tab-empty-state-CMqo_0Bd.js";var H=e(t(),1),U=n();function fe(){let{t:e}=i(`openhands`);return(0,U.jsx)(V,{className:`h-full`,icon:(0,U.jsx)(A,{"aria-hidden":!0,strokeWidth:2,className:`size-full`}),children:e(_.FILES$NO_FILE_SELECTED)})}var pe=class{static async executeCommand(e,t,n,r,i=30){let a=d().backend;if(a.kind===`cloud`&&e){let o=await N({backend:a,method:`POST`,hostOverride:m(e),path:`/api/bash/execute_bash_command`,body:{command:n,...r?{cwd:r}:{},timeout:Math.floor(i)},authMode:`session-api-key`,sessionApiKey:t,timeoutSeconds:i+10});return{exit_code:o.exit_code??-1,stdout:o.stdout??``,stderr:o.stderr??``}}let o=await new M(c({conversationUrl:e,sessionApiKey:t})).executeCommand(n,r,i);return{exit_code:o.exit_code,stdout:o.stdout,stderr:o.stderr}}static async downloadFile(e,t,n){let r=d().backend;return r.kind===`cloud`&&e?(await N({backend:r,method:`GET`,hostOverride:m(e),path:`/api/file/download?path=${encodeURIComponent(n)}`,authMode:`session-api-key`,sessionApiKey:t,responseType:`blob`})).arrayBuffer():new a(c({conversationUrl:e,sessionApiKey:t})).downloadFile(n)}};function W(e){return e.startsWith(`/`)?e:`/${e}`}async function G(e,t,n,r){let i=d().backend;if(i.kind===`cloud`&&e){let a=new URLSearchParams({...r,path:W(r.path)});return N({backend:i,method:`GET`,hostOverride:m(e),path:`${n}?${a.toString()}`,authMode:`session-api-key`,sessionApiKey:t??void 0})}return(await new M(c({conversationUrl:e,sessionApiKey:t})).client.get(n,{params:r})).data}function me(e){return u(e,404)||o(e)&&e.response?.status===404}var K=class{static async getGitChanges(e,t,n,r){let i=d().backend;if(i.kind===`cloud`&&e){let t=new URLSearchParams;t.set(`path`,W(r));let n=await N({backend:i,method:`GET`,path:`/api/v1/app-conversations/${e}/git/changes?${t.toString()}`});if(!Array.isArray(n))throw Error(`Invalid response from runtime - runtime may be unavailable`);return n.map(e=>({status:I(String(e.status)),path:e.path}))}let a=await new M(c({conversationUrl:t,sessionApiKey:n})).gitChanges(r);if(!Array.isArray(a))throw Error(`Invalid response from runtime - runtime may be unavailable`);return a.map(e=>({status:I(String(e.status)),path:e.path}))}static async getGitCommits(e,t,n,r=50){try{let i=await G(e,t,`/api/git/commits`,{path:n,limit:String(r)});return{commits:(i?.commits??[]).map(e=>({sha:e.sha,shortSha:e.short_sha,subject:e.subject,author:e.author,timestamp:e.timestamp})),hasMore:!!i?.has_more}}catch(e){if(me(e))return null;throw e}}static async getCommitChanges(e,t,n,r){let i=await G(e,t,`/api/git/commits/${encodeURIComponent(r)}/changes`,{path:n});if(!Array.isArray(i))throw Error(`Invalid response from runtime - runtime may be unavailable`);return i.map(e=>({status:I(String(e.status)),path:e.path}))}static async getGitChangeDiff(e,t,n,r,i){if(i){let e=await G(t,n,`/api/git/diff`,{path:r,commit:i});return{modified:e?.modified??``,original:e?.original??``,...e?.diff?{diff:e.diff}:{}}}let a=d().backend;if(a.kind===`cloud`&&e){let t=new URLSearchParams;t.set(`path`,W(r));let n=await N({backend:a,method:`GET`,path:`/api/v1/app-conversations/${e}/git/diff?${t.toString()}`});return{modified:n?.modified??``,original:n?.original??``,...n?.diff?{diff:n.diff}:{}}}let o=await new M(c({conversationUrl:t,sessionApiKey:n})).gitDiff(r);return{modified:o.modified??``,original:o.original??``,...o.diff?{diff:o.diff}:{}}}};function q(e,t){let n=t?.trim();if(n)return n;if(!e)return f;let r=e.split(`/`);return`${f}/${r[r.length-1]}`}var J=()=>{let{conversationId:e}=z(),{data:t}=R(),[n,r]=H.useState([]),i=H.useRef(null),a=j(),o=t?.conversation_url,c=t?.session_api_key,l=t?.selected_repository,u=t?.workspace?.working_dir?.trim(),d=H.useMemo(()=>q(l,u),[l,u]),f=s({queryKey:[`file_changes`,e,o,c,d],queryFn:async()=>{if(!e)throw Error(`No conversation ID`);return K.getGitChanges(e,o,c,d)},retry:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnMount:`always`,enabled:a&&!!e,meta:{disableToast:!0}});return H.useEffect(()=>{if(!f.isFetching&&f.isSuccess&&f.data){let e=f.data;if(e!==i.current)if(i.current=e,Array.isArray(e)){let t=new Set(e.map(e=>e.path)),i=new Set(n.map(e=>e.path)),a=e.filter(e=>!i.has(e.path)),o=n.filter(e=>t.has(e.path));r([...a,...o])}else r([e])}},[f.isFetching,f.isSuccess,f.data]),{data:n,isLoading:f.isLoading,isFetching:f.isFetching,isSuccess:f.isSuccess,isError:f.isError,error:f.error,refetch:f.refetch}},Y=2e3,he=[`.git`,`node_modules`,`.venv`,`venv`,`__pycache__`,`dist`,`build`,`.next`,`.cache`,`.pytest_cache`,`.mypy_cache`,`.turbo`,`.parcel-cache`,`target`];function ge(){return`find . \\( ${he.map(e=>`-name '${e}' -prune`).join(` -o `)} \\) -o -type f -print 2>/dev/null | sort | head -n ${Y}`}function _e(e){return e.startsWith(`./`)?e.slice(2):e}function ve(e){let{data:t}=R(),n=j(),r=t?.id,i=t?.conversation_url,a=t?.session_api_key,o=t?.workspace?.working_dir?.trim(),c=s({queryKey:[`workspace-files`,r,i,a,o],queryFn:async()=>{let e=await pe.executeCommand(i,a,ge(),o,30);if(e.exit_code!==0)throw Error(e.stderr?.trim()||`Failed to list workspace files`);let t=e.stdout.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).map(_e);return Array.from(new Set(t)).slice(0,Y)},enabled:e&&n&&!!r&&!!o,retry:!1,staleTime:1e3*30,gcTime:1e3*60*5,meta:{disableToast:!0}});return{data:c.data,isLoading:c.isLoading}}function ye(e){let t=J(),n=(0,H.useMemo)(()=>{if(!e)return;let n=t.data.filter(e=>e.status!==`D`).map(e=>e.path);return Array.from(new Set(n)).slice(0,Y)},[e,t.data]);return{data:e?n:void 0,isLoading:e?t.isLoading:!1}}function be(){let{backend:e}=p(),t=e.kind===`cloud`,n=ve(!t),r=ye(t);return t?r:n}function xe(){let{data:e}=R(),t=j(),n=e?.id,r=e?.conversation_url,i=e?.session_api_key,a=d().backend.kind===`local`,o=s({queryKey:[`workspace-session`,n,r,i],queryFn:async()=>({baseUrl:await new M(c({conversationUrl:r,sessionApiKey:i})).startWorkspaceSession(n)}),enabled:t&&!!n&&a,staleTime:1/0,gcTime:1/0,retry:!1});return{data:o.data??null,isLoading:o.isLoading,isError:o.isError,error:o.error??null}}function Se(e,t){let n=(t??``).replace(/^\/+/,``);return n?`${e}${n.split(`/`).map(e=>encodeURIComponent(e)).join(`/`)}`:e}var X=F(e=>({count:0,bump:()=>e(e=>({count:e.count+1}))}));function Ce(e,t){return e===null?null:`${e}${e.includes(`?`)?`&`:`?`}v=${t}`}var we=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`bmp`,`ico`,`svg`,`avif`]),Te=new Set([`pdf`]);function Ee(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function De(e){switch(Ee(e)){case`html`:case`htm`:return`text/html`;case`css`:return`text/css`;case`js`:case`mjs`:case`cjs`:return`text/javascript`;case`json`:return`application/json`;case`md`:case`markdown`:return`text/markdown`;case`svg`:return`image/svg+xml`;case`png`:return`image/png`;case`jpg`:case`jpeg`:return`image/jpeg`;case`gif`:return`image/gif`;case`webp`:return`image/webp`;case`bmp`:return`image/bmp`;case`ico`:return`image/x-icon`;case`avif`:return`image/avif`;case`pdf`:return`application/pdf`;default:return`text/plain`}}function Oe(e){let t=Ee(e);return we.has(t)?`image`:Te.has(t)?`pdf`:`text`}function ke(e){let t=new Uint8Array(e,0,Math.min(e.byteLength,8e3));for(let e=0;e<t.length;e+=1)if(t[e]===0)return!0;return!1}function Z(e){let t=new Uint8Array(e),n=32768,r=``;for(let e=0;e<t.length;e+=n)r+=String.fromCharCode.apply(null,t.subarray(e,e+n));return btoa(r)}function Ae(e){let{data:t}=R(),n=j(),{data:r}=xe(),i=X(e=>e.count),a=t?.id,o=t?.conversation_url,c=t?.session_api_key,l=t?.selected_repository,u=t?.workspace?.working_dir?.trim(),f=r?.baseUrl,p=d().backend.kind===`cloud`,m=q(l,u),h=m.startsWith(`/`)?m:`/${m}`,g=e?`${h}/${e}`:null;return s({queryKey:[`workspace-file-content`,a,o,c,p?`cloud`:f,e,g,i],queryFn:async()=>{if(!e)throw Error(`No path`);let t=Oe(e),n=De(e);if(p){let r=await ne(a,g);if(t===`text`){let t=new TextEncoder().encode(r);return ke(t.buffer)?{path:e,kind:`binary`,text:null,staticUrl:`data:application/octet-stream;base64,${Z(t.buffer)}`,mimeType:`application/octet-stream`}:{path:e,kind:`text`,text:r,staticUrl:`data:${n};charset=utf-8;base64,${Z(t.buffer)}`,mimeType:n}}return{path:e,kind:t,text:null,staticUrl:`data:${n};base64,${Z(new TextEncoder().encode(r).buffer)}`,mimeType:n}}if(!f)throw Error(`No workspace session`);let r=Se(f,e);if(t!==`text`)return{path:e,kind:t,text:null,staticUrl:r,mimeType:n};let i=await fetch(r,{credentials:`include`});if(!i.ok)throw Error(`Failed to read ${e}: ${i.status}`);let o=await i.arrayBuffer();return ke(o)?{path:e,kind:`binary`,text:null,staticUrl:r,mimeType:`application/octet-stream`}:{path:e,kind:`text`,text:new TextDecoder(`utf-8`,{fatal:!1}).decode(o),staticUrl:r,mimeType:n}},enabled:n&&!!a&&!!e&&(p||!!f),retry:!1,staleTime:1e3*5,gcTime:1e3*60,meta:{disableToast:!0}})}function je(){let{data:e,isLoading:t}=R(),n=e?.id?te(e.id):null;return{hasAttachedSource:!!e?.selected_repository||!!n?.selected_workspace,isLoading:t}}function Me(e){let{data:t}=R(),n=j(),{backend:r}=p(),i=r.kind===`local`,a=t?.id,o=t?.conversation_url,c=t?.session_api_key,l=t?.workspace?.working_dir?.trim(),u=(e?.enabled??!0)&&i&&n&&!!a&&!!l,d=s({queryKey:[`has-git-commits`,a,o,c,l],queryFn:async()=>(await pe.executeCommand(o,c,`git rev-parse --verify HEAD`,l,10)).exit_code===0,enabled:u,retry:!1,staleTime:6e4,gcTime:5*6e4,meta:{disableToast:!0}});return{hasCommits:d.data??null,isLoading:d.isLoading}}var Ne=new Set([`FileEditorObservation`,`StrReplaceEditorObservation`,`PlanningFileEditorObservation`]),Pe=new Set([`view`]),Fe=new Set([`ExecuteBashObservation`,`TerminalObservation`]);function Ie(e){let t=e.observation;return!(!t||typeof t.kind!=`string`||!Ne.has(t.kind)||t.command&&Pe.has(t.command))}function Le(e){let t=e.observation;return!!t&&typeof t.kind==`string`&&Fe.has(t.kind)}function Re(){let e=r(),t=ae(e=>e.events),n=X(e=>e.bump),i=(0,H.useRef)(new Set),a=(0,H.useRef)(new WeakSet);(0,H.useEffect)(()=>{let r=!1,o=!1;for(let e of t){let t=`id`in e?e.id:void 0;(t===void 0?a.current.has(e):i.current.has(t))||(t===void 0?a.current.add(e):i.current.add(t),Ie(e)?r=!0:Le(e)&&(o=!0))}!r&&!o||(e.invalidateQueries({queryKey:[`file_changes`]}),e.invalidateQueries({queryKey:[`file_diff`]}),e.invalidateQueries({queryKey:[`git_commits`]}),r&&(e.invalidateQueries({queryKey:[`workspace-files`]}),e.invalidateQueries({queryKey:[`workspace-file-content`]}),n()))},[t,e,n])}var ze=[`index.html`,`index.htm`,`readme.md`,`readme`,`main.html`,`app.html`,`index.js`,`index.ts`,`index.tsx`,`index.jsx`,`main.py`,`app.py`,`main.go`,`main.rs`,`main.java`,`main.c`,`main.cpp`,`package.json`,`pyproject.toml`,`cargo.toml`,`go.mod`,`pom.xml`,`dockerfile`,`makefile`],Be=[`license`,`license.md`,`license.txt`,`changelog.md`,`agents.md`,`tsconfig.json`,`.env.sample`,`.env.example`];function Ve(e){let t=e.lastIndexOf(`/`);return(t===-1?e:e.slice(t+1)).toLowerCase()}function He(e){return e.split(`/`).filter(Boolean).length-1}function Ue(e){let t=Ve(e),n=ze.indexOf(t);if(n!==-1)return n;let r=Be.indexOf(t);return r===-1?1e4:1e3+r}function We(e){return[...e].sort((e,t)=>{let n=He(e)-He(t);if(n!==0)return n;let r=Ue(e)-Ue(t);return r===0?e.localeCompare(t):r})}function Ge({paths:e,selectedPath:t,onSelectFile:n,isTreeVisible:r,onToggleTree:a}){let{t:o}=i(`openhands`),s=(0,H.useMemo)(()=>We(e),[e]);return(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 border-b border-[var(--oh-border)] px-2 py-1.5 min-h-[34px]`,"data-testid":`file-quick-row`,children:[(0,U.jsx)(`button`,{type:`button`,onClick:a,"data-testid":`file-quick-row-tree-toggle`,"aria-pressed":r,"aria-label":o(r?_.FILES$HIDE_FILE_TREE:_.FILES$SHOW_FILE_TREE),title:o(r?_.FILES$HIDE_FILE_TREE:_.FILES$SHOW_FILE_TREE),className:g(`shrink-0 inline-flex items-center justify-center w-6 h-6 rounded-md cursor-pointer`,`text-[var(--oh-text-tertiary)] hover:bg-tertiary`,r&&`bg-[var(--oh-surface-raised)]`),children:(0,U.jsx)(w,{className:`w-3 h-3`,"aria-hidden":!0,strokeWidth:2})}),s.length>0&&(0,U.jsx)(`div`,{className:`flex flex-nowrap items-center gap-1.5 overflow-hidden flex-1 min-w-0`,children:s.map(e=>{let r=t===e;return(0,U.jsx)(`button`,{type:`button`,onClick:()=>n(e),title:e,"data-testid":`file-quick-row-item-${e}`,className:g(`inline-flex items-center px-2 py-0.5 text-xs whitespace-nowrap rounded-md cursor-pointer`,r?`bg-[var(--oh-interactive-hover)] text-white`:`bg-[var(--oh-surface-raised)] text-[var(--oh-text-tertiary)] hover:bg-tertiary`),children:e},e)})})]})}var Ke=new Set([`html`,`htm`,`svg`]),qe={pptx:`PowerPoint`,ppt:`PowerPoint`,docx:`Word`,doc:`Word`,xlsx:`Excel`,xls:`Excel`};function Je(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function Q({path:e}){let{t}=i(`openhands`),n=qe[Je(e)];return(0,U.jsx)(`div`,{className:`flex h-full w-full items-center justify-center text-sm text-[var(--oh-muted)]`,"data-testid":n?`file-content-viewer-unsupported-document`:`file-content-viewer-binary-fallback`,children:n?t(_.FILES$UNSUPPORTED_DOCUMENT,{type:n}):t(_.FILES$BINARY_FALLBACK)})}function Ye({path:e,viewMode:t}){let{t:n}=i(`openhands`),r=Ae(e),a=X(e=>e.count);if(r.isLoading)return(0,U.jsx)(`div`,{className:`flex h-full w-full items-center justify-center text-sm text-[var(--oh-muted)]`,children:n(_.FILES$LOADING_FILES)});if(r.isError||!r.data)return(0,U.jsx)(`div`,{className:`flex h-full w-full items-center justify-center text-sm text-[var(--oh-muted)]`,"data-testid":`file-content-viewer-error`,children:r.error?.message??n(_.FILES$LOAD_ERROR)});let{kind:o,text:s,staticUrl:c,mimeType:l}=r.data,u=Ce(c,a);return t===`plain`?o===`text`&&s!==null?(0,U.jsx)(de,{path:e,text:s,mimeType:l??void 0}):(0,U.jsx)(Q,{path:e}):o===`image`?(0,U.jsx)(`div`,{className:`flex h-full w-full items-center justify-center bg-[var(--oh-surface)] p-4`,"data-testid":`file-content-viewer-image`,children:(0,U.jsx)(`img`,{src:u,alt:e,className:`max-h-full max-w-full object-contain`})}):o===`pdf`?(0,U.jsx)(`iframe`,{title:e,src:u,sandbox:`allow-same-origin`,"data-testid":`file-content-viewer-iframe`,className:`h-full w-full bg-white`}):o===`binary`?(0,U.jsx)(Q,{path:e}):l===`text/html`||Ke.has(Je(e))?(0,U.jsx)(`iframe`,{title:e,src:u,sandbox:`allow-same-origin`,"data-testid":`file-content-viewer-iframe`,className:`h-full w-full bg-white`}):o===`text`&&b(e)?(0,U.jsx)(`div`,{"data-testid":`file-content-viewer-markdown`,className:`h-full w-full overflow-auto bg-[var(--oh-surface)] text-white custom-scrollbar-always [--oh-scroll-fade-from:var(--oh-surface)]`,children:(0,U.jsx)(`div`,{className:`prose prose-sm prose-invert max-w-none p-6 [--tw-prose-body:#fff] [--tw-prose-bold:#fff] [--tw-prose-headings:#fff] [--tw-prose-lead:#fff] [--tw-prose-counters:#fff] [--tw-prose-quotes:#fff] [--tw-prose-quote-borders:var(--oh-border-subtle)] [--tw-prose-bullets:var(--oh-muted)] [--tw-prose-hr:var(--oh-border-subtle)] [--tw-prose-captions:var(--oh-muted)] [--tw-prose-kbd:#fff]`,children:(0,U.jsx)(ce,{content:s??``,includeStandard:!0,includeHeadings:!0})})}):o===`text`&&s!==null?(0,U.jsx)(de,{path:e,text:s,mimeType:l??void 0}):(0,U.jsx)(Q,{path:e})}var Xe=e=>(0,U.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 13 15`,fill:`none`,...e,children:(0,U.jsx)(`path`,{d:`M6.59467 0.21967C6.88756 -0.0732233 7.36244 -0.0732233 7.65533 0.21967L9.90533 2.46967C10.1982 2.76256 10.1982 3.23744 9.90533 3.53033L7.65533 5.78033C7.36244 6.07322 6.88756 6.07322 6.59467 5.78033C6.30178 5.48744 6.30178 5.01256 6.59467 4.71967L7.56434 3.75H6.375C3.71421 3.75 1.5 5.96421 1.5 8.625C1.5 11.2858 3.71421 13.5 6.375 13.5C9.03579 13.5 11.25 11.2858 11.25 8.625C11.25 8.21079 11.5858 7.875 12 7.875C12.4142 7.875 12.75 8.21079 12.75 8.625C12.75 12.1142 9.86421 15 6.375 15C2.88579 15 0 12.1142 0 8.625C0 5.13579 2.88579 2.25 6.375 2.25H7.56434L6.59467 1.28033C6.30178 0.987437 6.30178 0.512563 6.59467 0.21967Z`,fill:`currentColor`})}),Ze=()=>{let{conversationId:e}=z(),{data:t}=R(),n=j(),r=t?.conversation_url,i=t?.session_api_key,a=t?.selected_repository,o=t?.workspace?.working_dir?.trim(),c=H.useMemo(()=>q(a,o),[a,o]),l=s({queryKey:[`git_commits`,e,r,i,c],queryFn:async()=>{if(!e)throw Error(`No conversation ID`);return K.getGitCommits(r,i,c,50)},retry:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnMount:`always`,enabled:n&&!!e,meta:{disableToast:!0}});return{commits:l.data?.commits??[],hasMore:l.data?.hasMore??!1,isUnsupported:l.data===null,isLoading:l.isLoading,isFetching:l.isFetching,isSuccess:l.isSuccess,isError:l.isError}},Qe=e=>(0,U.jsx)(`svg`,{width:13,height:8,viewBox:`0 0 13 8`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,U.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M0.259766 6.17427L6.26425 0.715628L12.2688 6.17427L11.2597 7.28418L6.26425 2.74282L1.26878 7.28418L0.259766 6.17427Z`,fill:`currentColor`})}),$e=e=>{let{conversationId:t}=z(),{data:n}=R(),r=n?.conversation_url,i=n?.session_api_key,a=n?.selected_repository,o=n?.workspace?.working_dir?.trim(),c=H.useMemo(()=>`${q(a,o)}/${e.filePath}`,[a,e.filePath,o]),l=e.type===`D`;return s({queryKey:e.commit?[`commit_file_diff`,t,r,i,e.commit,c]:[`file_diff`,t,r,i,c],queryFn:async()=>{if(!t)throw Error(`No conversation ID`);return K.getGitChangeDiff(t,r,i,c,e.commit)},enabled:e.enabled&&(!l||!!e.commit),staleTime:e.commit?1/0:1e3*60*5,gcTime:1e3*60*15})};function et({className:e}){let{t}=i(`openhands`);return(0,U.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,U.jsx)(`div`,{className:g(`animate-spin rounded-full border-4 border-transparent border-t-white`,e),role:`status`,"aria-label":t(_.HOME$LOADING)})})}function tt({height:e,children:t}){return(0,U.jsx)(`div`,{"data-testid":`editor-container`,className:`w-full border-b border-[var(--oh-border)] overflow-hidden h-[var(--editor-height)]`,style:{"--editor-height":`${e}px`},children:t})}var nt=[{mode:`old`,icon:E},{mode:`diff`,icon:x},{mode:`new`,icon:k}],rt={renderValidationDecorations:`off`,readOnly:!0,scrollBeyondLastLine:!1,minimap:{enabled:!1},automaticLayout:!0,scrollbar:{alwaysConsumeMouseWheel:!1}},it={A:C,D,M:T,R:`Renamed`,U:`Untracked`},at=e=>{e.editor.defineTheme(`custom-diff-theme`,{base:`vs-dark`,inherit:!0,rules:[{token:`comment`,foreground:`6a9955`},{token:`keyword`,foreground:`569cd6`},{token:`string`,foreground:`ce9178`},{token:`number`,foreground:`b5cea8`}],colors:{"diffEditor.insertedTextBackground":`#014b01AA`,"diffEditor.removedTextBackground":`#750000AA`,"diffEditor.insertedLineBackground":`#003f00AA`,"diffEditor.removedLineBackground":`#5a0000AA`,"diffEditor.border":`var(--oh-border-subtle)`,"editorUnnecessaryCode.border":`#00000000`,"editorUnnecessaryCode.opacity":`rgba(0, 0, 0, 0.467)`}})};function ot({path:e,type:t,commit:n}){let{t:r}=i(`openhands`),[a,o]=H.useState(!0),[s,c]=H.useState(400),[l,u]=H.useState(`diff`),d=H.useRef(null),f=H.useRef(null),p=t===`A`||t===`U`,m=t===`D`,h=H.useMemo(()=>{if(t===`R`){let t=e.split(/\s+/).slice(1);return t[t.length-1]}return e},[e,t]),{data:y,isLoading:b,isSuccess:x,isRefetching:C}=$e({filePath:h,type:t,enabled:!a,commit:n}),w=H.useCallback(()=>{if(!d.current)return;let e=d.current.getOriginalEditor(),t=d.current.getModifiedEditor();e&&t&&c(Math.max(e.getContentHeight(),t.getContentHeight())+20)},[]),T=H.useCallback(()=>{f.current&&c(f.current.getContentHeight()+20)},[]),E=e=>{d.current=e,w(),e.getOriginalEditor().onDidContentSizeChange(w),e.getModifiedEditor().onDidContentSizeChange(w)},D=e=>{f.current=e,T(),e.onDidContentSizeChange(T)},k=(t===`U`?it.A:it[t])||`?`,A=typeof k==`string`?(0,U.jsx)(ie.Text,{children:k}):H.createElement(k,{className:`w-5 h-5`}),j=b||C,M=v(h),N=M===`markdown`,P=l===`old`?y?.original??``:y?.modified??``;return(0,U.jsxs)(`div`,{"data-testid":`file-diff-viewer-outer`,className:`w-full flex flex-col`,children:[(0,U.jsx)(`div`,{className:`flex justify-between items-center px-3 py-2.5 border-b border-[var(--oh-border)] hover:cursor-pointer`,onClick:()=>o(e=>!e),children:(0,U.jsxs)(`span`,{className:`text-sm w-full text-content flex items-center gap-2`,children:[j?(0,U.jsx)(et,{className:`w-4 h-4`}):A,(0,U.jsx)(`strong`,{className:`w-full truncate font-medium`,children:h}),!a&&!m&&(0,U.jsx)(`span`,{className:`flex items-center gap-0.5 shrink-0`,onClick:e=>e.stopPropagation(),children:nt.map(({mode:e,icon:t})=>(0,U.jsx)(`button`,{"data-testid":`view-mode-${e}`,type:`button`,"aria-pressed":l===e,onClick:()=>u(e),className:g(`p-1 rounded transition-colors cursor-pointer`,l===e?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-white`),children:(0,U.jsx)(t,{className:`w-4 h-4`})},e))}),(0,U.jsx)(`button`,{"data-testid":`collapse`,type:`button`,children:(0,U.jsx)(Qe,{className:g(`w-4 h-4 transition-transform`,a&&`transform rotate-180`)})})]})}),!a&&m&&!n&&(0,U.jsx)(`div`,{"data-testid":`file-deleted-message`,className:`w-full border-b border-[var(--oh-border)] p-4 bg-base text-[var(--oh-text-dim)] text-sm`,children:r(_.DIFF_VIEWER$FILE_DELETED)}),!a&&(!m||!!n)&&x&&(l===`diff`?(0,U.jsx)(tt,{height:s,children:(0,U.jsx)(S,{"data-testid":`file-diff-viewer`,className:`w-full h-full`,language:M,original:p?``:y?.original??``,modified:m?``:y?.modified??``,theme:`custom-diff-theme`,onMount:E,beforeMount:at,options:{...rt,renderSideBySide:!p&&!m,hideUnchangedRegions:{enabled:!0}}})}):N?(0,U.jsx)(`div`,{className:`w-full border-b border-[var(--oh-border)] overflow-auto p-4 bg-base prose prose-invert max-w-none`,"data-testid":`markdown-preview`,children:(0,U.jsx)(ce,{content:P,includeStandard:!0,includeHeadings:!0})}):(0,U.jsx)(tt,{height:s,children:(0,U.jsx)(O,{"data-testid":`file-single-viewer`,className:`w-full h-full`,language:M,value:P,theme:`custom-diff-theme`,beforeMount:at,onMount:D,options:rt})}))]})}function $(){return(0,U.jsx)(T,{"aria-hidden":!0,className:`size-full`})}function st(){let{t:e}=i(`openhands`);return(0,U.jsx)(V,{icon:(0,U.jsx)($,{}),children:e(_.DIFF_VIEWER$NO_CHANGES)})}var ct=[{key:_.TIPS$CUSTOMIZE_MICROAGENT,link:`https://docs.all-hands.dev/usage/prompting/microagents-repo`},{key:_.TIPS$SETUP_SCRIPT,link:`https://docs.all-hands.dev/usage/prompting/repository#setup-script`},{key:_.TIPS$VSCODE_INSTANCE},{key:_.TIPS$SAVE_WORK},{key:_.TIPS$SPECIFY_FILES,link:`https://docs.all-hands.dev/usage/prompting/prompting-best-practices`},{key:_.TIPS$HEADLESS_MODE,link:`https://docs.all-hands.dev/usage/how-to/headless-mode`},{key:_.TIPS$CLI_MODE,link:`https://docs.all-hands.dev/usage/how-to/cli-mode`},{key:_.TIPS$GITHUB_HOOK,link:`https://docs.all-hands.dev/usage/cloud/github-installation#working-on-github-issues-and-pull-requests-using-openhands`},{key:_.TIPS$BLOG_SIGNUP,link:`https://www.all-hands.dev/blog`},{key:_.TIPS$API_USAGE,link:`https://docs.all-hands.dev/api-reference/health-check`}];function lt(){return ct[Math.floor(Math.random()*ct.length)]}function ut(){let{t:e}=i(`openhands`),[t,n]=H.useState(lt());return H.useEffect(()=>{n(lt())},[]),(0,U.jsx)(`div`,{className:`w-full bg-tertiary p-4 text-left`,children:(0,U.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,U.jsx)(y,{className:`mt-0.5 h-4 w-4 shrink-0 fill-[var(--oh-muted)]`,"aria-hidden":!0}),(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`h4`,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)]`,children:e(_.TIPS$PROTIP)}),(0,U.jsxs)(`p`,{className:`text-sm font-normal leading-5 text-[var(--oh-muted)]`,children:[e(t.key),t.link?(0,U.jsxs)(U.Fragment,{children:[` `,(0,U.jsx)(`a`,{href:t.link,target:`_blank`,rel:`noopener noreferrer`,className:`underline transition-colors hover:text-white`,children:e(_.TIPS$LEARN_MORE)})]}):null]})]})]})})}var dt=/not a git repository/i,ft=new Set([_.DIFF_VIEWER$WAITING_FOR_RUNTIME,_.DIFF_VIEWER$LOADING]);function pt({messages:e}){let{t}=i(`openhands`);return e.length===1&&ft.has(e[0])?(0,U.jsx)(L,{testId:`changes-tab-status`,messageKey:e[0]}):(0,U.jsx)(V,{icon:(0,U.jsx)($,{}),children:e.map(e=>(0,U.jsx)(`span`,{className:`block`,children:t(e)},e))})}function mt(){let{data:e,isSuccess:t,isError:n,error:r,isLoading:i}=J(),[a,o]=H.useState(null),{curAgentState:s}=se(),c=!h.includes(s),u=r&&dt.test(l(r));return H.useEffect(()=>{if(!c)o([_.DIFF_VIEWER$WAITING_FOR_RUNTIME]);else if(r){let e=l(r);dt.test(e)?o([_.DIFF_VIEWER$NOT_A_GIT_REPO,_.DIFF_VIEWER$ASK_OH]):o([e])}else o(i?[_.DIFF_VIEWER$LOADING]:null)},[c,u,i,r,o]),(0,U.jsx)(`main`,{className:`h-full w-full flex flex-col items-stretch`,children:!t||!e.length?(0,U.jsxs)(`div`,{className:`flex flex-col h-full w-full`,children:[(0,U.jsxs)(`div`,{className:`flex-1 flex items-center justify-center`,children:[a&&(0,U.jsx)(pt,{messages:a}),!a&&t&&e.length===0&&(0,U.jsx)(st,{})]}),!n&&t&&e.length===0&&(0,U.jsx)(ut,{})]}):(0,U.jsx)(`div`,{className:`h-full overflow-y-auto flex flex-col items-stretch custom-scrollbar-always`,children:e.slice(0,100).map(e=>(0,U.jsx)(ot,{path:e.path,type:e.status},e.path))})})}var ht=(e,t)=>{let{conversationId:n}=z(),{data:r}=R(),i=j(),a=r?.conversation_url,o=r?.session_api_key,c=r?.selected_repository,l=r?.workspace?.working_dir?.trim(),u=H.useMemo(()=>q(c,l),[c,l]);return s({queryKey:[`commit_changes`,n,a,o,u,e],queryFn:async()=>{if(!n)throw Error(`No conversation ID`);return K.getCommitChanges(a,o,u,e)},staleTime:1/0,gcTime:1e3*60*15,retry:!1,enabled:t.enabled&&i&&!!n,meta:{disableToast:!0}})};function gt({commit:e,showAuthor:t,isExpanded:n,onToggle:r}){let{t:a}=i(`openhands`),{data:o,isLoading:s,isSuccess:c}=ht(e.sha,{enabled:n});return(0,U.jsxs)(`div`,{"data-testid":`commit-row`,className:`w-full flex flex-col`,children:[(0,U.jsxs)(`button`,{type:`button`,onClick:r,"aria-expanded":n,"data-testid":`commit-row-toggle`,className:`w-full flex items-center gap-2 px-3 py-2.5 border-b border-[var(--oh-border)] text-sm text-content text-left hover:cursor-pointer`,children:[(0,U.jsx)(`code`,{className:`font-mono text-xs text-[var(--oh-muted)] flex-shrink-0`,children:e.shortSha}),(0,U.jsx)(`strong`,{className:`flex-1 truncate font-medium`,children:e.subject}),t&&(0,U.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate max-w-32 flex-shrink-0`,children:e.author}),(0,U.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] flex-shrink-0`,children:`${re(e.timestamp)} ${a(_.CONVERSATION$AGO)}`}),(0,U.jsx)(Qe,{className:g(`w-4 h-4 transition-transform flex-shrink-0`,!n&&`transform rotate-180`)})]}),n&&(0,U.jsxs)(`div`,{"data-testid":`commit-row-content`,className:`w-full flex flex-col pl-6`,children:[s&&(0,U.jsx)(`div`,{className:`p-3`,children:(0,U.jsx)(et,{className:`w-4 h-4`})}),c&&o?.map(t=>(0,U.jsx)(ot,{path:t.path,type:t.status,commit:e.sha},t.path))]})]})}function _t({commits:e,hasMore:t}){let{t:n}=i(`openhands`),[r,a]=H.useState(null),o=new Set(e.map(e=>e.author)).size>1;return(0,U.jsxs)(`section`,{"data-testid":`commit-list`,className:`w-full flex flex-col`,children:[e.map(e=>(0,U.jsx)(gt,{commit:e,showAuthor:o,isExpanded:r===e.sha,onToggle:()=>a(t=>t===e.sha?null:e.sha)},e.sha)),t&&(0,U.jsx)(`div`,{"data-testid":`commit-list-cap-notice`,className:`px-3 py-2.5 text-xs text-[var(--oh-muted)]`,children:n(_.DIFF_VIEWER$COMMITS_CAP,{count:e.length})})]})}function vt(){let{t:e}=i(`openhands`),{conversationId:t}=z(),{commits:n,hasMore:r,isUnsupported:a,isLoading:o,isSuccess:s}=Ze(),{curAgentState:c}=se(),l=!h.includes(c);return(0,U.jsx)(`main`,{className:`h-full w-full flex flex-col items-stretch`,children:s&&!a&&n.length>0?(0,U.jsx)(`div`,{className:`h-full overflow-y-auto flex flex-col items-stretch custom-scrollbar-always`,children:(0,U.jsx)(_t,{commits:n,hasMore:r},t)}):(0,U.jsxs)(`div`,{className:`flex-1 flex items-center justify-center`,children:[!l&&(0,U.jsx)(L,{testId:`commits-tab-status`,messageKey:_.DIFF_VIEWER$WAITING_FOR_RUNTIME}),l&&o&&(0,U.jsx)(L,{testId:`commits-tab-status`,messageKey:_.DIFF_VIEWER$LOADING}),l&&!o&&(0,U.jsx)(V,{icon:(0,U.jsx)($,{}),children:e(_.DIFF_VIEWER$NO_COMMITS)})]})})}function yt(){let{t:e}=i(`openhands`);Re();let{hasAttachedSource:t,isLoading:n}=je(),{hasCommits:a}=Me({enabled:t}),{conversationId:o}=oe(),{state:s,setFilesTabDiffView:c,setFilesTabContentViewMode:l}=P(o??``),u=(t||n)&&a!==!1,d=s.filesTabDiffView??u,f=s.filesTabContentViewMode,{isSuccess:p,isUnsupported:m}=Ze(),h=p&&!m,[g,v]=(0,H.useState)(!1),y=d?`on`:`off`;g&&h&&(y=`commits`);let[b,x]=(0,H.useState)(!1),S=be(),C=(0,H.useMemo)(()=>S.data??[],[S.data]),w=B(e=>e.selectedPath),T=B(e=>e.selectedConversationId),E=B(e=>e.setSelectedPath),D=T===o?w:null,O=(0,H.useCallback)(e=>E(e,o),[o,E]),k=Ae(D),A=X(e=>e.count),j=Ce(k.data?.staticUrl??null,A);(0,H.useEffect)(()=>{T!==o&&E(null,o)},[T,o,E]),(0,H.useEffect)(()=>{if(D||C.length===0)return;let[e]=We(C);e&&E(e,o)},[C,D,o,E]);let M=r(),{refetch:N,isFetching:F}=J(),te=()=>{N(),M.invalidateQueries({queryKey:[`workspace-files`]}),M.invalidateQueries({queryKey:[`workspace-file-content`]}),M.invalidateQueries({queryKey:[`git_commits`]})};return(0,U.jsxs)(`main`,{className:`h-full w-full flex flex-col items-stretch`,"data-testid":`files-tab`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-1.5 border-b border-[var(--oh-border)]`,children:[(0,U.jsx)(ee,{ariaLabel:e(_.FILES$DIFF_VIEW),testId:`files-tab-diff-toggle`,value:y,options:[{value:`on`,label:e(_.FILES$DIFF_VIEW)},...h?[{value:`commits`,label:e(_.DIFF_VIEWER$COMMITS)}]:[],{value:`off`,label:e(_.COMMON$FILES)}],onChange:e=>{e===`commits`?v(!0):(v(!1),c(e===`on`))}}),y===`off`&&(0,U.jsx)(ee,{ariaLabel:e(_.FILES$RICH),testId:`files-tab-content-mode-toggle`,value:f,options:[{value:`rich`,label:e(_.FILES$RICH)},{value:`plain`,label:e(_.FILES$PLAIN)}],onChange:l}),(0,U.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[y===`off`&&j&&(0,U.jsx)(`a`,{href:j,target:`_blank`,rel:`noopener noreferrer`,"aria-label":e(_.FILES$OPEN_IN_NEW_WINDOW),title:e(_.FILES$OPEN_IN_NEW_WINDOW),"data-testid":`files-tab-open-in-new-window`,className:`flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-white`,children:(0,U.jsx)(le,{width:14,height:14})}),(0,U.jsx)(`button`,{type:`button`,onClick:te,disabled:F,"aria-label":e(_.FILES$REFRESH),title:e(_.FILES$REFRESH),"data-testid":`files-tab-refresh`,className:`flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:enabled:bg-[var(--oh-interactive-hover)] cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed`,children:(0,U.jsx)(Xe,{width:12.75,height:15,color:`#ffffff`,className:F?`animate-spin`:``})})]})]}),y===`on`&&(0,U.jsx)(`div`,{className:`flex-1 min-h-0`,children:(0,U.jsx)(mt,{})}),y===`commits`&&(0,U.jsx)(`div`,{className:`flex-1 min-h-0`,children:(0,U.jsx)(vt,{})}),y===`off`&&(0,U.jsx)(`div`,{className:`flex flex-1 flex-col min-h-0`,children:S.isLoading?(0,U.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-sm text-[var(--oh-muted)]`,children:e(_.FILES$LOADING_FILES)}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Ge,{paths:C,selectedPath:D,onSelectFile:O,isTreeVisible:b,onToggleTree:()=>x(e=>!e)}),(0,U.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1`,children:[b&&(0,U.jsx)(`aside`,{className:`w-56 shrink-0 border-r border-[var(--oh-border)] overflow-y-auto custom-scrollbar-always`,"data-testid":`files-tab-tree`,children:(0,U.jsx)(ue,{paths:C,selectedPath:D,onSelectFile:O})}),(0,U.jsx)(`section`,{className:`flex h-full min-h-0 min-w-0 flex-1 flex-col`,"data-testid":`files-tab-content`,children:D?(0,U.jsx)(Ye,{path:D,viewMode:f}):(0,U.jsx)(fe,{})})]})]})})]})}export{yt as default};
@@ -1 +1 @@
1
- import{t as e}from"./utils-DPQfkd-7.js";var t=`h-9 min-h-9`,n=`rounded-lg`,r=`border border-[var(--oh-border)]`,i=`bg-base-secondary`,a=`duration-75`,o=`!duration-75`,s=`motion-reduce:transition-none`,c=e(`transition-[background-color,border-color,box-shadow,opacity]`,a,s),l=e(`!transition-[background-color,border-color,box-shadow,opacity]`,o,s),u=e(`transition-[transform] ease`,a,s),d=`hover:text-white hover:bg-white/10`,f=e(`inline-flex items-center gap-1 rounded-[100px] border border-transparent px-1.5`,`text-sm font-normal leading-5 text-[var(--oh-muted)] whitespace-nowrap min-w-0 cursor-pointer`,c,d),p=e(`flex items-center justify-center rounded-full text-[var(--oh-muted)] cursor-pointer`,c,d),m=`focus:border-white/40 focus:ring-1 focus:ring-white/20 focus:outline-none`,h=`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,g=`disabled:cursor-not-allowed disabled:opacity-60`,_=e(t,n,r,i,c,m,g,`w-full min-w-0 px-3 text-sm text-white placeholder:text-tertiary-alt`),v=e(_,`placeholder:italic`,l),y=e(n,r,i,c,m,g,`w-full min-w-0 px-3 py-2 text-sm text-white placeholder:text-tertiary-alt`),b=e(t,`relative flex min-w-0 items-center`,n,r,i,c,h),x=e(`min-w-0 flex-1 border-0 bg-transparent px-3 text-sm outline-none`,`placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`),S=e(t,`inline-flex w-fit cursor-pointer items-center justify-center gap-2 px-3`,n,c,`text-sm font-normal disabled:cursor-not-allowed disabled:opacity-30`),C=`pl-12`;e(S,r,i,`shrink-0 text-white`);var w=e(`inline-flex items-center gap-2 self-start rounded-lg p-2`,`text-sm font-normal leading-5 text-[var(--oh-muted)] cursor-pointer`,c,`hover:bg-tertiary hover:text-white`);export{c as _,S as a,x as c,n as d,v as f,u as g,C as h,r as i,y as l,i as m,f as n,g as o,b as p,w as r,_ as s,p as t,d as u};
1
+ import{t as e}from"./utils-zxEjKE70.js";var t=`h-9 min-h-9`,n=`rounded-lg`,r=`border border-[var(--oh-border)]`,i=`bg-base-secondary`,a=`duration-75`,o=`!duration-75`,s=`motion-reduce:transition-none`,c=e(`transition-[background-color,border-color,box-shadow,opacity]`,a,s),l=e(`!transition-[background-color,border-color,box-shadow,opacity]`,o,s),u=e(`transition-[transform] ease`,a,s),d=`hover:text-white hover:bg-white/10`,f=e(`inline-flex items-center gap-1 rounded-[100px] border border-transparent px-1.5`,`text-sm font-normal leading-5 text-[var(--oh-muted)] whitespace-nowrap min-w-0 cursor-pointer`,c,d),p=e(`flex items-center justify-center rounded-full text-[var(--oh-muted)] cursor-pointer`,c,d),m=`focus:border-white/40 focus:ring-1 focus:ring-white/20 focus:outline-none`,h=`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,g=`disabled:cursor-not-allowed disabled:opacity-60`,_=e(t,n,r,i,c,m,g,`w-full min-w-0 px-3 text-sm text-white placeholder:text-tertiary-alt`),v=e(_,`placeholder:italic`,l),y=e(n,r,i,c,m,g,`w-full min-w-0 px-3 py-2 text-sm text-white placeholder:text-tertiary-alt`),b=e(t,`relative flex min-w-0 items-center`,n,r,i,c,h),x=e(`min-w-0 flex-1 border-0 bg-transparent px-3 text-sm outline-none`,`placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`),S=e(t,`inline-flex w-fit cursor-pointer items-center justify-center gap-2 px-3`,n,c,`text-sm font-normal disabled:cursor-not-allowed disabled:opacity-30`),C=`pl-12`;e(S,r,i,`shrink-0 text-white`);var w=e(`inline-flex items-center gap-2 self-start rounded-lg p-2`,`text-sm font-normal leading-5 text-[var(--oh-muted)] cursor-pointer`,c,`hover:bg-tertiary hover:text-white`);export{c as _,S as a,x as c,n as d,v as f,u as g,C as h,r as i,y as l,i as m,f as n,g as o,b as p,w as r,_ as s,p as t,d as u};
@@ -0,0 +1 @@
1
+ var e=`Free`,t={"openhands/glm-5.2":`OpenHands GLM-5.2 (free)`,"openhands/deepseek-v4-flash":`OpenHands DeepSeek V4 Flash (free)`,"openhands/minimax-m2.7":`OpenHands MiniMax M2.7 (free)`},n=`Free OpenHands models: ${Object.keys(t).join(`, `)}. Other provider endpoints with similar model names may require separate billing.`,r=e=>!!(e&&e in t);function i(e){return e?r(e)?t[e]:e:null}function a(e){return e?r(e)?t[e]:e.split(`/`).pop()||e:null}export{r as a,a as i,n,i as r,e as t};
@@ -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"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{t as r,z as i}from"./utils-DPQfkd-7.js";import{t as a}from"./loader-circle-C5AnEN8r.js";import{t as o}from"./styled-tooltip-C5C07RQC.js";import{a as s}from"./kebab-menu-item-content-C4CkeiJO.js";import{t as c}from"./automation-C_eCrGyP.js";e();var l=t(),u=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})}),d=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})}),f={[c.COMPLETED]:{label:i.AUTOMATIONS$DETAIL$SUCCESSFUL,style:`border-[var(--oh-success)]/50 bg-[var(--oh-success)]/10 text-[var(--oh-success)]`,iconTone:`text-[var(--oh-success)]`},[c.FAILED]:{label:i.AUTOMATIONS$DETAIL$FAILED,style:`border-[var(--oh-danger)]/50 bg-[var(--oh-danger)]/10 text-danger`,iconTone:`text-danger`},[c.PENDING]:{label:i.AUTOMATIONS$DETAIL$PENDING,style:`border-[var(--oh-border)] bg-surface-raised text-muted`,iconTone:`text-muted`},[c.RUNNING]:{label:i.AUTOMATIONS$DETAIL$RUNNING,style:`border-[var(--oh-border)] bg-surface-raised text-muted`,iconTone:`text-muted`},[c.CANCELLED]:{label:i.AUTOMATIONS$DETAIL$CANCELLED,style:`border-[var(--oh-border)] bg-surface-raised text-muted`,iconTone:`text-muted`},[c.SKIPPED]:{label:i.AUTOMATIONS$DETAIL$SKIPPED,style:`border-[var(--oh-border)] bg-surface-raised text-muted`,iconTone:`text-muted`}};function p({status:e,compact:t=!1}){let n=t?`size-3`:`size-3.5`;switch(e){case c.COMPLETED:return(0,l.jsx)(u,{"data-testid":`run-status-icon-completed`,className:n});case c.FAILED:return(0,l.jsx)(d,{"data-testid":`run-status-icon-failed`,className:n});case c.RUNNING:return(0,l.jsx)(a,{"data-testid":`run-status-icon-running`,className:r(n,`animate-spin motion-reduce:animate-none`),"aria-hidden":`true`});default:return(0,l.jsx)(s,{"data-testid":`run-status-icon-pending`,className:n})}}function m({status:e,iconOnly:t=!1,showLabel:i=!1,compact:a=!1}){let{t:s}=n(`openhands`),u=f[e]??f[c.PENDING],d=s(u.label);return t?i?(0,l.jsxs)(`span`,{"data-testid":`run-status-badge-icon`,className:r(`inline-flex min-w-0 shrink-0 items-center gap-1.5 text-xs font-medium`,u.iconTone),children:[(0,l.jsx)(p,{status:e,compact:a}),(0,l.jsx)(`span`,{className:`truncate`,children:d})]}):(0,l.jsx)(o,{content:d,placement:`top`,children:(0,l.jsx)(`span`,{role:`img`,"aria-label":d,"data-testid":`run-status-badge-icon`,className:r(`inline-flex shrink-0 cursor-default items-center justify-center`,u.iconTone),children:(0,l.jsx)(p,{status:e,compact:a})})}):(0,l.jsxs)(`span`,{className:r(`inline-flex items-center rounded-full border font-medium`,a?`gap-1 px-1.5 py-0 text-[10px] leading-4`:`gap-1.5 px-2.5 py-1 text-xs`,u.style),children:[(0,l.jsx)(p,{status:e,compact:a}),d]})}function h(e,t){return new Date(e).toLocaleDateString(t,{year:`numeric`,month:`short`,day:`numeric`})}function g(e,t,n){let r=Date.now()-new Date(e).getTime(),a=Math.floor(r/6e4),o=Math.floor(r/36e5),s=Math.floor(r/864e5);return a<1?n(i.AUTOMATIONS$DETAIL$TIME_JUST_NOW):a<60?n(i.AUTOMATIONS$DETAIL$TIME_MINUTES_AGO,{count:a}):o<24?n(i.AUTOMATIONS$DETAIL$TIME_HOURS_AGO,{count:o}):s===1?n(i.AUTOMATIONS$DETAIL$TIME_YESTERDAY):s<7?n(i.AUTOMATIONS$DETAIL$TIME_DAYS_AGO,{count:s}):h(e,t)}export{u as i,g as n,m as r,h as t};
1
+ import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{t as r,z as i}from"./utils-zxEjKE70.js";import{t as a}from"./loader-circle-B47W9XqT.js";import{t as o}from"./styled-tooltip-BUMSbgrF.js";import{a as s}from"./kebab-menu-item-content-BGoGFEAg.js";import{t as c}from"./automation-C_eCrGyP.js";e();var l=t(),u=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})}),d=e=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,l.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})}),f={[c.COMPLETED]:{label:i.AUTOMATIONS$DETAIL$SUCCESSFUL,style:`border-[var(--oh-success)]/50 bg-[var(--oh-success)]/10 text-[var(--oh-success)]`,iconTone:`text-[var(--oh-success)]`},[c.FAILED]:{label:i.AUTOMATIONS$DETAIL$FAILED,style:`border-[var(--oh-danger)]/50 bg-[var(--oh-danger)]/10 text-danger`,iconTone:`text-danger`},[c.PENDING]:{label:i.AUTOMATIONS$DETAIL$PENDING,style:`border-[var(--oh-border)] bg-surface-raised text-muted`,iconTone:`text-muted`},[c.RUNNING]:{label:i.AUTOMATIONS$DETAIL$RUNNING,style:`border-[var(--oh-border)] bg-surface-raised text-muted`,iconTone:`text-muted`},[c.CANCELLED]:{label:i.AUTOMATIONS$DETAIL$CANCELLED,style:`border-[var(--oh-border)] bg-surface-raised text-muted`,iconTone:`text-muted`},[c.SKIPPED]:{label:i.AUTOMATIONS$DETAIL$SKIPPED,style:`border-[var(--oh-border)] bg-surface-raised text-muted`,iconTone:`text-muted`}};function p({status:e,compact:t=!1}){let n=t?`size-3`:`size-3.5`;switch(e){case c.COMPLETED:return(0,l.jsx)(u,{"data-testid":`run-status-icon-completed`,className:n});case c.FAILED:return(0,l.jsx)(d,{"data-testid":`run-status-icon-failed`,className:n});case c.RUNNING:return(0,l.jsx)(a,{"data-testid":`run-status-icon-running`,className:r(n,`animate-spin motion-reduce:animate-none`),"aria-hidden":`true`});default:return(0,l.jsx)(s,{"data-testid":`run-status-icon-pending`,className:n})}}function m({status:e,iconOnly:t=!1,showLabel:i=!1,compact:a=!1}){let{t:s}=n(`openhands`),u=f[e]??f[c.PENDING],d=s(u.label);return t?i?(0,l.jsxs)(`span`,{"data-testid":`run-status-badge-icon`,className:r(`inline-flex min-w-0 shrink-0 items-center gap-1.5 text-xs font-medium`,u.iconTone),children:[(0,l.jsx)(p,{status:e,compact:a}),(0,l.jsx)(`span`,{className:`truncate`,children:d})]}):(0,l.jsx)(o,{content:d,placement:`top`,children:(0,l.jsx)(`span`,{role:`img`,"aria-label":d,"data-testid":`run-status-badge-icon`,className:r(`inline-flex shrink-0 cursor-default items-center justify-center`,u.iconTone),children:(0,l.jsx)(p,{status:e,compact:a})})}):(0,l.jsxs)(`span`,{className:r(`inline-flex items-center rounded-full border font-medium`,a?`gap-1 px-1.5 py-0 text-[10px] leading-4`:`gap-1.5 px-2.5 py-1 text-xs`,u.style),children:[(0,l.jsx)(p,{status:e,compact:a}),d]})}function h(e,t){return new Date(e).toLocaleDateString(t,{year:`numeric`,month:`short`,day:`numeric`})}function g(e,t,n){let r=Date.now()-new Date(e).getTime(),a=Math.floor(r/6e4),o=Math.floor(r/36e5),s=Math.floor(r/864e5);return a<1?n(i.AUTOMATIONS$DETAIL$TIME_JUST_NOW):a<60?n(i.AUTOMATIONS$DETAIL$TIME_MINUTES_AGO,{count:a}):o<24?n(i.AUTOMATIONS$DETAIL$TIME_HOURS_AGO,{count:o}):s===1?n(i.AUTOMATIONS$DETAIL$TIME_YESTERDAY):s<7?n(i.AUTOMATIONS$DETAIL$TIME_DAYS_AGO,{count:s}):h(e,t)}export{u as i,g as n,m as r,h as t};
@@ -0,0 +1 @@
1
+ import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{D as i,T as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";import{t as o}from"./useMutation-BFDQmgk9.js";import{At as s,kt as c}from"./active-backend-context-IqOjobNK.js";import{C as l,i as u,t as d,z as f}from"./utils-zxEjKE70.js";import{a as p,o as m,t as h}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-d7svw-BB.js";import{t as g}from"./use-tracking-CVwPmhlX.js";import{n as _}from"./navigation-context-CQZwH_tC.js";import{t as v}from"./dist-Bl64nBZL.js";import{n as y}from"./conversation-store-Blc5xysY.js";import{t as b}from"./agent-server-conversation-service.api-DWBe0rbX.js";import{d as x,u as S}from"./conversation-state-store-C5YpjMNy.js";var C=i(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),w=i(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),T=t(),E=v(`shrink-0 self-stretch min-w-full bg-[var(--oh-border)]`,{variants:{orientation:{horizontal:`h-[1px]`},color:{light:`bg-[var(--oh-border)]`},size:{thin:`h-[1px]`},inset:{none:``,menu:``}},defaultVariants:{orientation:`horizontal`,color:`light`,size:`thin`,inset:`none`}});function D({orientation:e,color:t,size:n,inset:r,className:i,testId:a}){return r===`menu`?(0,T.jsx)(`div`,{"data-testid":a,role:`separator`,className:d(`relative min-w-full shrink-0 self-stretch`,`h-3`,i),children:(0,T.jsx)(`div`,{"aria-hidden":!0,className:`absolute top-1/2 -left-1 -right-1 h-px -translate-y-1/2 bg-[var(--oh-border)]`})}):(0,T.jsx)(`div`,{"data-testid":a,role:`separator`,className:d(E({orientation:e,color:t,size:n,inset:r}),i)})}var O=()=>{let e=n();return o({mutationFn:e=>b.deleteConversation(e.conversationId),onMutate:async t=>{await e.cancelQueries({queryKey:[`user`,`conversations`]});let n=e.getQueryData([`user`,`conversations`]);return e.setQueryData([`user`,`conversations`],e=>e?.filter(e=>e.conversation_id!==t.conversationId)),{previousConversations:n}},onSuccess:(e,t)=>{y(t.conversationId)},onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:()=>{e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`start-tasks`]})}})},k=()=>{let{t:e}=r(`openhands`),t=n(),{conversationId:i,navigate:u}=_();return o({mutationKey:[`stop-conversation`],mutationFn:async e=>x(e.conversationId),onMutate:async()=>{let n=a.loading(e(f.TOAST$STOPPING_CONVERSATION),c);return await t.cancelQueries({queryKey:[`user`,`conversations`]}),{previousConversations:t.getQueryData([`user`,`conversations`]),toastId:n}},onError:(n,r,i)=>{i?.toastId&&a.dismiss(i.toastId),s(e(f.TOAST$FAILED_TO_STOP_CONVERSATION)),i?.previousConversations&&t.setQueryData([`user`,`conversations`],i.previousConversations)},onSuccess:(n,r,o)=>{o?.toastId&&a.dismiss(o.toastId),a.success(e(f.TOAST$CONVERSATION_STOPPED),c),S(t,r.conversationId,{execution_status:l.PAUSED,sandbox_status:`PAUSED`}),i===r.conversationId&&u(`/conversations`)}})};function A(e){return e===`MISSING`||e===`ERROR`}e();var j=e=>(0,T.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,T.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M22.1595 5.22752L20.9895 4.95152L17.8275 8.09552L16.0365 6.27152L19.1205 3.03602L18.8505 1.84802C18.1988 1.62999 17.5172 1.51461 16.83 1.50602C16.0804 1.49449 15.3365 1.63746 14.6445 1.92602C13.9764 2.22843 13.3725 2.65616 12.8655 3.18602C12.3011 3.72063 11.8542 4.36683 11.553 5.08352C10.9732 6.50984 10.9732 8.10619 11.553 9.53252C8.42587 12.609 5.3391 15.7263 2.29351 18.8835C1.97851 19.296 1.82851 19.8105 1.86751 20.328C1.89825 20.8846 2.14856 21.4063 2.56351 21.7785C2.74951 21.981 2.97151 22.149 3.21901 22.2705C3.47401 22.383 3.74851 22.4475 4.02601 22.461C4.50001 22.452 4.95451 22.272 5.30701 21.9555C7.62901 19.77 12.078 15.2805 14.6055 12.6495C15.291 12.9405 16.0275 13.0905 16.7715 13.089C17.5204 13.0884 18.2616 12.9377 18.9513 12.6458C19.641 12.3539 20.2652 11.9267 20.787 11.3895C21.8588 10.2964 22.4575 8.82543 22.4535 7.29452C22.4708 6.59398 22.3715 5.89544 22.1595 5.22752ZM4.39951 20.892C4.34178 20.9433 4.27218 20.9794 4.19701 20.997C4.12306 21.0098 4.04746 21.0098 3.97351 20.997C3.89598 20.9852 3.82213 20.956 3.75751 20.9115C3.68817 20.8709 3.62955 20.8144 3.58651 20.7465C3.37651 20.532 3.18001 20.124 3.37651 19.8945C5.43151 17.709 9.66301 13.437 12.309 10.8255C12.459 11.0235 12.624 11.2125 12.801 11.3895C12.978 11.574 13.1685 11.745 13.371 11.901C10.812 14.526 6.63901 18.747 4.40101 20.892H4.39951ZM21.0765 7.29452C21.0795 8.44202 20.6325 9.54452 19.8285 10.3665C19.0262 11.1536 17.9472 11.5944 16.8233 11.5944C15.6994 11.5944 14.6203 11.1536 13.818 10.3665C13.23 9.75286 12.8283 8.98485 12.6597 8.15183C12.4911 7.31882 12.5624 6.45505 12.8655 5.66102C13.0673 5.12062 13.3802 4.62858 13.784 4.21671C14.1879 3.80485 14.6737 3.48233 15.21 3.27002C15.7192 3.05688 16.266 2.94774 16.818 2.94902H17.199L14.4735 5.75852V6.80252L17.316 9.63152H18.306L21.0765 6.90752V7.29452ZM4.86001 10.032H7.15651L8.21401 11.1075L9.23101 10.0965L8.23351 9.07952V9.01502L8.31901 6.54152L7.98901 5.88602L3.69901 3.06302L2.81251 3.16202L1.56601 4.43552L1.46701 5.33402L4.22401 9.71102L4.86001 10.0335V10.032ZM3.44251 4.58402L6.91351 6.87002L6.85501 8.55452H5.24101L3.00301 5.01152L3.44251 4.58402ZM14.1 15.024L15.111 14.0145L19.77 18.792C20.1624 19.2045 20.3813 19.752 20.3813 20.3213C20.3813 20.8906 20.1624 21.4381 19.77 21.8505C19.4749 22.1535 19.0955 22.3605 18.6811 22.4448C18.2667 22.5291 17.8365 22.4866 17.4465 22.323C17.1976 22.2126 16.9744 22.0517 16.791 21.8505L12.078 17.046L13.0965 16.029L17.7945 20.82C17.8577 20.8897 17.9363 20.9436 18.024 20.9775C18.1967 21.0476 18.3899 21.0476 18.5625 20.9775C18.6502 20.9436 18.7288 20.8897 18.792 20.82C18.8577 20.755 18.9088 20.6768 18.942 20.5905C18.9764 20.5025 18.9947 20.409 18.996 20.3145C18.9945 20.2202 18.9767 20.1268 18.9435 20.0385C18.9103 19.9523 18.8592 19.8741 18.7935 19.809L14.1 15.024Z`,fill:`currentColor`})}),M=e=>(0,T.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,T.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 13.0605L17.469 18.531L18.531 17.4705L13.0605 12L18.531 6.53099L17.4705 5.46899L12 10.9395L6.53099 5.46899L5.47049 6.53099L10.9395 12L5.47049 17.469L6.53099 18.531L12 13.0605Z`,fill:`currentColor`})}),N=e=>(0,T.jsx)(`svg`,{height:24,viewBox:`0 0 24 24`,width:24,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,T.jsx)(`path`,{fill:`currentColor`,d:`m22 18-5 4-8-3v3l-4.19-5.75 12.91 1.05v-10.96l4.28-.69zm-17.19-1.75v-7.29l12.91-2.62-7.12-4.34v2.84l-6.63 1.92-1.97 2.62v5.69z`})}),P=e=>(0,T.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,T.jsx)(`path`,{d:`M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM7.79289 7.79289C8.18342 7.40237 8.81658 7.40237 9.20711 7.79289L12 10.5858L14.7929 7.79289C15.1834 7.40237 15.8166 7.40237 16.2071 7.79289C16.5976 8.18342 16.5976 8.81658 16.2071 9.20711L13.4142 12L16.2071 14.7929C16.5976 15.1834 16.5976 15.8166 16.2071 16.2071C15.8166 16.5976 15.1834 16.5976 14.7929 16.2071L12 13.4142L9.20711 16.2071C8.81658 16.5976 8.18342 16.5976 7.79289 16.2071C7.40237 15.8166 7.40237 15.1834 7.79289 14.7929L10.5858 12L7.79289 9.20711C7.40237 8.81658 7.40237 8.18342 7.79289 7.79289Z`,fill:`currentColor`})}),F=()=>{let{trackDownloadTrajectoryButtonClicked:e}=g(),{t}=r(`openhands`);return o({mutationKey:[`conversations`,`download`],mutationFn:async t=>{e(),u(await b.downloadConversation(t),`conversation_${t}.zip`)},onError:()=>{s(t(f.CONVERSATION$DOWNLOAD_ERROR))}})};function I({gitProvider:e,className:t}){return(0,T.jsxs)(T.Fragment,{children:[e===`github`&&(0,T.jsx)(p,{size:14,className:t}),e===`gitlab`&&(0,T.jsx)(m,{size:14,className:t}),e===`bitbucket`&&(0,T.jsx)(h,{size:14,className:t}),e===`bitbucket_data_center`&&(0,T.jsx)(h,{size:14,className:t}),e===`azure_devops`&&(0,T.jsx)(N,{className:d(t,`w-[14px] h-[14px]`)})]})}export{M as a,k as c,w as d,C as f,N as i,O as l,F as n,j as o,P as r,A as s,I as t,D as u};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{t as i,z as a}from"./utils-DPQfkd-7.js";import{s as o}from"./form-control-classes-DLN3Qgub.js";import{t as s}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js";import{c,i as l,r as u,u as d}from"./dropdown-classes-zFW7qPSK.js";import{r as f,t as p}from"./combobox-caret-BlmRwiM8.js";import{a as m,c as h,i as g,n as _,r as v,t as y}from"./home-store-D7CjMN_-.js";import{r as b}from"./typography-D9tiHct7.js";var x=e(t(),1),S=n();function C({disabled:e,onClear:t,testId:n=`dropdown-clear`}){let{t:o}=r(`openhands`);return(0,S.jsx)(`button`,{onClick:e=>{e.stopPropagation(),t()},disabled:e,className:i(`p-1 text-[#fff]`,`cursor-pointer disabled:cursor-not-allowed disabled:opacity-60`),type:`button`,"aria-label":o(a.COMMON$CLEAR_SELECTION),"data-testid":n,children:(0,S.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,S.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})}function w({isOpen:e,disabled:t,getToggleButtonProps:n,iconClassName:o}){let{t:s}=r(`openhands`);return(0,S.jsx)(`button`,{...n({disabled:t,className:i(f,`text-current`,e&&`rotate-180`,t&&`cursor-not-allowed opacity-60`)}),type:`button`,"aria-label":s(a.COMMON$TOGGLE_MENU),children:(0,S.jsx)(p,{className:o})})}function T({item:e,index:t,isSelected:n,getItemProps:r,getDisplayText:a,getItemKey:o,isProviderDropdown:s=!1,renderIcon:l,itemClassName:f,ariaLabel:p}){return(0,S.jsx)(`li`,{...r({index:t,item:e,...p?{"aria-label":p}:{},className:i(s?`group px-2 py-0 cursor-pointer text-xs rounded-md mx-0 my-0 h-6 flex items-center`:`group px-2 py-2 cursor-pointer text-sm rounded-md mx-0 my-0.5`,`text-white focus:outline-none font-normal`,u,{"bg-[var(--oh-interactive-selected)] text-white":n,"hover:bg-[var(--oh-interactive-hover)]":!n},f)}),children:(0,S.jsxs)(`div`,{className:i(`flex items-center`,c),children:[l?(0,S.jsx)(`span`,{className:d,children:l(e)}):null,(0,S.jsx)(`span`,{className:`font-normal`,children:a(e)})]})},o(e))}function E({inputValue:e,searchMessage:t=`No items found`,emptyMessage:n=`No items available`,testId:r=`dropdown-empty`}){return(0,S.jsx)(`li`,{className:`px-3 py-2 text-[var(--oh-text-secondary)] text-sm rounded-lg mx-0.5 my-0.5`,"data-testid":r,children:e?t:n})}function D({isOpen:e,filteredItems:t,inputValue:n,highlightedIndex:r,selectedItem:a,getMenuProps:o,getItemProps:s,onScroll:c,menuRef:u,renderItem:d,renderItemPrefix:f,renderEmptyState:p,stickyTopItem:m,stickyFooterItem:h,testId:g,numberOfRecentItems:_=0,itemKey:v}){let y=!(t.length>0)&&!m&&!h;return e?(0,S.jsx)(`div`,{className:`relative`,children:(0,S.jsxs)(`div`,{className:i(`absolute z-10 w-full bg-tertiary border border-[var(--oh-border-input)] rounded-lg shadow-none`,`focus:outline-none mt-1 z-[9999]`,`max-h-60`),children:[(0,S.jsx)(`ul`,{...o({ref:u,className:i(`w-full overflow-auto p-1 custom-scrollbar-always`,l,m||h?`max-h-[calc(15rem-3rem)]`:`max-h-60`),onScroll:c,"data-testid":g}),children:y?p(n):(0,S.jsxs)(S.Fragment,{children:[m,t.map((e,t)=>{let n=v(e);return(0,S.jsxs)(x.Fragment,{children:[f?.(e,t),d(e,t,r,a,s),_>0&&t===_-1&&(0,S.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,className:`border-b border-[var(--oh-border-input)] bg-tertiary pb-1 mb-1 h-[1px]`})]},n)})]})}),h&&(0,S.jsx)(`div`,{className:`border-t border-[var(--oh-border-input)] bg-tertiary p-1 rounded-b-lg`,children:h})]})}):(0,S.jsx)(`div`,{className:`relative`,children:(0,S.jsx)(`ul`,{...o({ref:u,className:`hidden`,"data-testid":g})})})}function O({isError:e,message:t=`Failed to load data`,testId:n=`dropdown-error`}){return e?(0,S.jsx)(`div`,{className:`text-red-500 text-sm mt-1`,"data-testid":n,children:t}):null}function k(e,t){let[n,r]=(0,x.useState)([]),[i,a]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{(async()=>{if(!t){r([]);return}if(e.startsWith(`https://`)){let n=e.match(/https:\/\/[^/]+\/([^/]+\/[^/]+)/);if(n){let e=n[1];a(!0);try{r((await m.searchGitRepositories(e,t,3)).items)}catch{r([])}finally{a(!1)}}}else r([])})()},[e,t]),{urlSearchResults:n,isUrlSearchLoading:i}}function ee(e,t,n,r,i,a,o){let{data:s,fetchNextPage:c,hasNextPage:l,isLoading:u,isFetchingNextPage:d,isError:f}=g({provider:e,enabled:!t}),{data:p,isLoading:m}=v(n,e,(0,x.useMemo)(()=>i===o,[o,i])),h=(0,x.useMemo)(()=>s?.pages?.flatMap(e=>e.items)||[],[s]),_=(0,x.useMemo)(()=>a&&[...h,...r,...p||[]].find(e=>e.id===a)||null,[h,r,p,a]),y=(0,x.useMemo)(()=>r.length>0?r:n&&p&&i!==_?.full_name?p:h,[r,n,p,h,_,i]);return(0,x.useEffect)(()=>{!t&&!u&&!d&&!m&&l&&!n&&r.length===0&&y.length>0&&y.length<10&&c()},[t,u,d,m,l,n,r.length,y.length,c]),{repositories:y,allRepositories:h,selectedRepository:_,fetchNextPage:c,hasNextPage:l,isLoading:u,isFetchingNextPage:d,isError:f,isSearchLoading:m}}function A({provider:e,value:t,repositoryName:n,placeholder:c,className:l,disabled:u=!1,onChange:d}){let{t:f}=r(`openhands`),{recentRepositories:p}=y(),[m,g]=(0,x.useState)(``),[v,A]=(0,x.useState)(null),j=_(m,300),M=(0,x.useRef)(null),N=(0,x.useMemo)(()=>{if(j.startsWith(`https://`)){let e=j.match(/https:\/\/[^/]+\/([^/]+\/[^/]+)/);return e?e[1]:j}return j},[j]),{urlSearchResults:P,isUrlSearchLoading:te}=k(m,e),{repositories:F,selectedRepository:I,fetchNextPage:L,hasNextPage:R,isLoading:z,isFetchingNextPage:B,isError:V,isSearchLoading:H}=ee(e,u,N,P,m,t,n),U=I??v,W=(0,x.useMemo)(()=>{let t=p.filter(t=>t.git_provider===e);if(!m?.trim())return t;let n=m.startsWith(`https://`)?N:m;return t.filter(e=>e.full_name.toLowerCase().includes(n.toLowerCase()))},[p,e,m,N]),G=(0,x.useCallback)(e=>{let t=new Set(W.map(e=>e.id)),n=e.filter(e=>!t.has(e.id));return[...W,...n]},[W]),K=(0,x.useMemo)(()=>{let e;if(P.length>0)e=F;else if(m===I?.full_name)e=F;else if(!m?.trim())e=F;else{let t=m.startsWith(`https://`)?N:m;e=F.filter(e=>e.full_name.toLowerCase().includes(t.toLowerCase()))}return G(e)},[F,m,I,P,N,G]),q=(0,x.useCallback)(e=>{A(e),d?.(e||void 0),e&&g(e.full_name)},[d]),J=(0,x.useCallback)(()=>{A(null),q(null),g(``)},[q]),Y=(0,x.useCallback)(e=>{let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;t+r>=n-10&&R&&!B&&L()},[R,B,L]),{isOpen:X,getToggleButtonProps:Z,getMenuProps:ne,getInputProps:re,highlightedIndex:ie,getItemProps:Q,selectedItem:$}=s({items:K,itemToString:e=>e?.full_name||``,selectedItem:v,onSelectedItemChange:({selectedItem:e})=>{q(e)},inputValue:m,stateReducer:(e,t)=>t.type===s.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes});(0,x.useEffect)(()=>{I?A(I):t===null&&A(null)},[I,t]),(0,x.useEffect)(()=>{X||g(U?.full_name??``)},[U,X]);let ae=z||H||B||te,oe=(e,t,n,r,i)=>(0,S.jsx)(T,{item:e,index:t,isSelected:r?.id===e.id,getItemProps:i,getDisplayText:e=>e.full_name,getItemKey:e=>e.id},e.id),se=e=>(0,S.jsx)(E,{inputValue:e,searchMessage:f(a.HOME$NO_REPOSITORY_FOUND),emptyMessage:f(a.COMMON$NO_REPOSITORY),testId:`git-repo-dropdown-empty`}),ce=(0,x.useMemo)(()=>W.length===0?null:(0,S.jsx)(`div`,{children:(0,S.jsx)(b.Text,{className:`text-xs text-content-2 font-semibold leading-4 pl-2`,children:f(a.COMMON$MOST_RECENT)})}),[W,v,Q,f]);return(0,S.jsxs)(`div`,{className:i(`relative`,l),children:[(0,S.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[(0,S.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:ae?(0,S.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`}):(0,S.jsx)(h,{width:16,height:16})}),(0,S.jsx)(`input`,{...re({disabled:u,placeholder:c??f(a.COMMON$SEARCH_REPOSITORIES_PLACEHOLDER),className:i(o,`text-inherit shadow-none pl-7 pr-16 text-sm font-normal leading-5`,`placeholder:text-[var(--oh-muted)]`,`disabled:cursor-not-allowed disabled:opacity-60`),onChange:e=>{g(e.target.value)}}),"data-testid":`git-repo-dropdown`}),(0,S.jsxs)(`div`,{className:`absolute right-1 top-1/2 transform -translate-y-1/2 flex items-center`,children:[U&&(0,S.jsx)(C,{disabled:u,onClear:J}),(0,S.jsx)(w,{isOpen:X,disabled:u,getToggleButtonProps:Z})]})]}),(0,S.jsx)(D,{isOpen:X,filteredItems:K,inputValue:m,highlightedIndex:ie,selectedItem:$,getMenuProps:ne,getItemProps:Q,onScroll:Y,menuRef:M,renderItem:oe,renderEmptyState:se,stickyTopItem:ce,testId:`git-repo-dropdown-menu`,numberOfRecentItems:W.length,itemKey:e=>e.id}),(0,S.jsx)(O,{isError:V})]})}export{T as a,E as i,O as n,w as o,D as r,C as s,A as t};
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{t as i,z as a}from"./utils-zxEjKE70.js";import{s as o}from"./form-control-classes-7yFSQJq_.js";import{t as s}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js";import{c,i as l,r as u,u as d}from"./dropdown-classes-BIqQr5mx.js";import{r as f,t as p}from"./combobox-caret-D0fRotFi.js";import{a as m,c as h,i as g,n as _,r as v,t as y}from"./home-store-CxqsY9Fi.js";import{r as b}from"./typography-NOKSk9_R.js";var x=e(t(),1),S=n();function C({disabled:e,onClear:t,testId:n=`dropdown-clear`}){let{t:o}=r(`openhands`);return(0,S.jsx)(`button`,{onClick:e=>{e.stopPropagation(),t()},disabled:e,className:i(`p-1 text-[#fff]`,`cursor-pointer disabled:cursor-not-allowed disabled:opacity-60`),type:`button`,"aria-label":o(a.COMMON$CLEAR_SELECTION),"data-testid":n,children:(0,S.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,S.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})}function w({isOpen:e,disabled:t,getToggleButtonProps:n,iconClassName:o}){let{t:s}=r(`openhands`);return(0,S.jsx)(`button`,{...n({disabled:t,className:i(f,`text-current`,e&&`rotate-180`,t&&`cursor-not-allowed opacity-60`)}),type:`button`,"aria-label":s(a.COMMON$TOGGLE_MENU),children:(0,S.jsx)(p,{className:o})})}function T({item:e,index:t,isSelected:n,getItemProps:r,getDisplayText:a,getItemKey:o,isProviderDropdown:s=!1,renderIcon:l,itemClassName:f,ariaLabel:p}){return(0,S.jsx)(`li`,{...r({index:t,item:e,...p?{"aria-label":p}:{},className:i(s?`group px-2 py-0 cursor-pointer text-xs rounded-md mx-0 my-0 h-6 flex items-center`:`group px-2 py-2 cursor-pointer text-sm rounded-md mx-0 my-0.5`,`text-white focus:outline-none font-normal`,u,{"bg-[var(--oh-interactive-selected)] text-white":n,"hover:bg-[var(--oh-interactive-hover)]":!n},f)}),children:(0,S.jsxs)(`div`,{className:i(`flex items-center`,c),children:[l?(0,S.jsx)(`span`,{className:d,children:l(e)}):null,(0,S.jsx)(`span`,{className:`font-normal`,children:a(e)})]})},o(e))}function E({inputValue:e,searchMessage:t=`No items found`,emptyMessage:n=`No items available`,testId:r=`dropdown-empty`}){return(0,S.jsx)(`li`,{className:`px-3 py-2 text-[var(--oh-text-secondary)] text-sm rounded-lg mx-0.5 my-0.5`,"data-testid":r,children:e?t:n})}function D({isOpen:e,filteredItems:t,inputValue:n,highlightedIndex:r,selectedItem:a,getMenuProps:o,getItemProps:s,onScroll:c,menuRef:u,renderItem:d,renderItemPrefix:f,renderEmptyState:p,stickyTopItem:m,stickyFooterItem:h,testId:g,numberOfRecentItems:_=0,itemKey:v}){let y=!(t.length>0)&&!m&&!h;return e?(0,S.jsx)(`div`,{className:`relative`,children:(0,S.jsxs)(`div`,{className:i(`absolute z-10 w-full bg-tertiary border border-[var(--oh-border-input)] rounded-lg shadow-none`,`focus:outline-none mt-1 z-[9999]`,`max-h-60`),children:[(0,S.jsx)(`ul`,{...o({ref:u,className:i(`w-full overflow-auto p-1 custom-scrollbar-always`,l,m||h?`max-h-[calc(15rem-3rem)]`:`max-h-60`),onScroll:c,"data-testid":g}),children:y?p(n):(0,S.jsxs)(S.Fragment,{children:[m,t.map((e,t)=>{let n=v(e);return(0,S.jsxs)(x.Fragment,{children:[f?.(e,t),d(e,t,r,a,s),_>0&&t===_-1&&(0,S.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,className:`border-b border-[var(--oh-border-input)] bg-tertiary pb-1 mb-1 h-[1px]`})]},n)})]})}),h&&(0,S.jsx)(`div`,{className:`border-t border-[var(--oh-border-input)] bg-tertiary p-1 rounded-b-lg`,children:h})]})}):(0,S.jsx)(`div`,{className:`relative`,children:(0,S.jsx)(`ul`,{...o({ref:u,className:`hidden`,"data-testid":g})})})}function O({isError:e,message:t=`Failed to load data`,testId:n=`dropdown-error`}){return e?(0,S.jsx)(`div`,{className:`text-red-500 text-sm mt-1`,"data-testid":n,children:t}):null}function k(e,t){let[n,r]=(0,x.useState)([]),[i,a]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{(async()=>{if(!t){r([]);return}if(e.startsWith(`https://`)){let n=e.match(/https:\/\/[^/]+\/([^/]+\/[^/]+)/);if(n){let e=n[1];a(!0);try{r((await m.searchGitRepositories(e,t,3)).items)}catch{r([])}finally{a(!1)}}}else r([])})()},[e,t]),{urlSearchResults:n,isUrlSearchLoading:i}}function ee(e,t,n,r,i,a,o){let{data:s,fetchNextPage:c,hasNextPage:l,isLoading:u,isFetchingNextPage:d,isError:f}=g({provider:e,enabled:!t}),{data:p,isLoading:m}=v(n,e,(0,x.useMemo)(()=>i===o,[o,i])),h=(0,x.useMemo)(()=>s?.pages?.flatMap(e=>e.items)||[],[s]),_=(0,x.useMemo)(()=>a&&[...h,...r,...p||[]].find(e=>e.id===a)||null,[h,r,p,a]),y=(0,x.useMemo)(()=>r.length>0?r:n&&p&&i!==_?.full_name?p:h,[r,n,p,h,_,i]);return(0,x.useEffect)(()=>{!t&&!u&&!d&&!m&&l&&!n&&r.length===0&&y.length>0&&y.length<10&&c()},[t,u,d,m,l,n,r.length,y.length,c]),{repositories:y,allRepositories:h,selectedRepository:_,fetchNextPage:c,hasNextPage:l,isLoading:u,isFetchingNextPage:d,isError:f,isSearchLoading:m}}function A({provider:e,value:t,repositoryName:n,placeholder:c,className:l,disabled:u=!1,onChange:d}){let{t:f}=r(`openhands`),{recentRepositories:p}=y(),[m,g]=(0,x.useState)(``),[v,A]=(0,x.useState)(null),j=_(m,300),M=(0,x.useRef)(null),N=(0,x.useMemo)(()=>{if(j.startsWith(`https://`)){let e=j.match(/https:\/\/[^/]+\/([^/]+\/[^/]+)/);return e?e[1]:j}return j},[j]),{urlSearchResults:P,isUrlSearchLoading:te}=k(m,e),{repositories:F,selectedRepository:I,fetchNextPage:L,hasNextPage:R,isLoading:z,isFetchingNextPage:B,isError:V,isSearchLoading:H}=ee(e,u,N,P,m,t,n),U=I??v,W=(0,x.useMemo)(()=>{let t=p.filter(t=>t.git_provider===e);if(!m?.trim())return t;let n=m.startsWith(`https://`)?N:m;return t.filter(e=>e.full_name.toLowerCase().includes(n.toLowerCase()))},[p,e,m,N]),G=(0,x.useCallback)(e=>{let t=new Set(W.map(e=>e.id)),n=e.filter(e=>!t.has(e.id));return[...W,...n]},[W]),K=(0,x.useMemo)(()=>{let e;if(P.length>0)e=F;else if(m===I?.full_name)e=F;else if(!m?.trim())e=F;else{let t=m.startsWith(`https://`)?N:m;e=F.filter(e=>e.full_name.toLowerCase().includes(t.toLowerCase()))}return G(e)},[F,m,I,P,N,G]),q=(0,x.useCallback)(e=>{A(e),d?.(e||void 0),e&&g(e.full_name)},[d]),J=(0,x.useCallback)(()=>{A(null),q(null),g(``)},[q]),Y=(0,x.useCallback)(e=>{let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;t+r>=n-10&&R&&!B&&L()},[R,B,L]),{isOpen:X,getToggleButtonProps:Z,getMenuProps:ne,getInputProps:re,highlightedIndex:ie,getItemProps:Q,selectedItem:$}=s({items:K,itemToString:e=>e?.full_name||``,selectedItem:v,onSelectedItemChange:({selectedItem:e})=>{q(e)},inputValue:m,stateReducer:(e,t)=>t.type===s.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes});(0,x.useEffect)(()=>{I?A(I):t===null&&A(null)},[I,t]),(0,x.useEffect)(()=>{X||g(U?.full_name??``)},[U,X]);let ae=z||H||B||te,oe=(e,t,n,r,i)=>(0,S.jsx)(T,{item:e,index:t,isSelected:r?.id===e.id,getItemProps:i,getDisplayText:e=>e.full_name,getItemKey:e=>e.id},e.id),se=e=>(0,S.jsx)(E,{inputValue:e,searchMessage:f(a.HOME$NO_REPOSITORY_FOUND),emptyMessage:f(a.COMMON$NO_REPOSITORY),testId:`git-repo-dropdown-empty`}),ce=(0,x.useMemo)(()=>W.length===0?null:(0,S.jsx)(`div`,{children:(0,S.jsx)(b.Text,{className:`text-xs text-content-2 font-semibold leading-4 pl-2`,children:f(a.COMMON$MOST_RECENT)})}),[W,v,Q,f]);return(0,S.jsxs)(`div`,{className:i(`relative`,l),children:[(0,S.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[(0,S.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:ae?(0,S.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`}):(0,S.jsx)(h,{width:16,height:16})}),(0,S.jsx)(`input`,{...re({disabled:u,placeholder:c??f(a.COMMON$SEARCH_REPOSITORIES_PLACEHOLDER),className:i(o,`text-inherit shadow-none pl-7 pr-16 text-sm font-normal leading-5`,`placeholder:text-[var(--oh-muted)]`,`disabled:cursor-not-allowed disabled:opacity-60`),onChange:e=>{g(e.target.value)}}),"data-testid":`git-repo-dropdown`}),(0,S.jsxs)(`div`,{className:`absolute right-1 top-1/2 transform -translate-y-1/2 flex items-center`,children:[U&&(0,S.jsx)(C,{disabled:u,onClear:J}),(0,S.jsx)(w,{isOpen:X,disabled:u,getToggleButtonProps:Z})]})]}),(0,S.jsx)(D,{isOpen:X,filteredItems:K,inputValue:m,highlightedIndex:ie,selectedItem:$,getMenuProps:ne,getItemProps:Q,onScroll:Y,menuRef:M,renderItem:oe,renderEmptyState:se,stickyTopItem:ce,testId:`git-repo-dropdown-menu`,numberOfRecentItems:W.length,itemKey:e=>e.id}),(0,S.jsx)(O,{isError:V})]})}export{T as a,E as i,O as n,w as o,D as r,C as s,A as t};
@@ -0,0 +1 @@
1
+ import"./git-repo-dropdown-ByMzpNko.js";
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js";import{t as i,z as a}from"./utils-DPQfkd-7.js";import{ot as o,st as s}from"./vendor-markdown-j0kYzV48.js";import{t as c}from"./folder-C1ou4_DT.js";import{t as l}from"./syntax-highlighter-BGDg_7w9.js";var u=e(t(),1);function d(e){e.children.sort((e,t)=>e.isDirectory===t.isDirectory?e.name.localeCompare(t.name):e.isDirectory?-1:1);for(let t of e.children)t.isDirectory&&d(t)}function f(e,t,n,r,i){let a=t.get(e);a||(a=new Map,t.set(e,a));let o=a.get(n);if(o)return!i&&!o.isDirectory&&(o.isDirectory=!0),o;let s={name:n,path:r,isDirectory:!i,children:[]};return e.children.push(s),a.set(n,s),s}function p(e){let t={name:``,path:``,isDirectory:!0,children:[]},n=new Map;for(let r of e){let e=r.split(`/`).filter(Boolean);if(e.length>0){let r=t,i=``;for(let t=0;t<e.length;t+=1){let a=e[t];i=i?`${i}/${a}`:a;let o=t===e.length-1;r=f(r,n,a,i,o)}}}return d(t),t}var m=n();function h({node:e,depth:t,selectedPath:n,onSelectFile:r}){let[a,o]=(0,u.useState)(!1),s=8+t*12;if(e.isDirectory)return(0,m.jsxs)(`li`,{children:[(0,m.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),"aria-expanded":a,"data-testid":`file-tree-dir-${e.path}`,className:i(`flex w-full items-center gap-1.5 py-1 pr-2 text-left text-sm text-white`,`hover:bg-tertiary cursor-pointer`),style:{paddingLeft:`${s}px`},children:[(0,m.jsx)(`span`,{"aria-hidden":!0,className:i(`inline-block w-3 text-[10px] text-[var(--oh-muted)] transition-transform`,a?`rotate-90`:`rotate-0`),children:`▶`}),(0,m.jsx)(c,{className:`w-3.5 h-3.5 shrink-0`}),(0,m.jsx)(`span`,{className:`truncate`,children:e.name})]}),a&&e.children.length>0&&(0,m.jsx)(`ul`,{children:e.children.map(e=>(0,m.jsx)(h,{node:e,depth:t+1,selectedPath:n,onSelectFile:r},e.path))})]});let d=n===e.path;return(0,m.jsx)(`li`,{children:(0,m.jsxs)(`button`,{type:`button`,onClick:()=>r(e.path),"data-testid":`file-tree-file-${e.path}`,className:i(`flex w-full items-center gap-1.5 py-1 pr-2 text-left text-sm`,`hover:bg-tertiary cursor-pointer`,d?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-text-tertiary)]`),style:{paddingLeft:`${s+16}px`},children:[(0,m.jsx)(l,{className:`w-3.5 h-3.5 shrink-0`}),(0,m.jsx)(`span`,{className:`truncate`,children:e.name})]})})}function g({paths:e,selectedPath:t,onSelectFile:n}){let{t:i}=r(`openhands`),o=(0,u.useMemo)(()=>p(e),[e]);return o.children.length===0?(0,m.jsx)(`div`,{className:`px-3 py-4 text-sm text-[var(--oh-muted)]`,children:i(a.FILES$NO_FILES)}):(0,m.jsx)(`ul`,{className:`py-1 custom-scrollbar-always`,"data-testid":`file-tree-view`,children:o.children.map(e=>(0,m.jsx)(h,{node:e,depth:0,selectedPath:t,onSelectFile:n},e.path))})}var _={js:`javascript`,jsx:`jsx`,mjs:`javascript`,cjs:`javascript`,ts:`typescript`,tsx:`tsx`,py:`python`,pyi:`python`,pyw:`python`,html:`markup`,htm:`markup`,svg:`markup`,xml:`markup`,css:`css`,scss:`scss`,sass:`sass`,less:`less`,json:`json`,json5:`json5`,yaml:`yaml`,yml:`yaml`,toml:`toml`,ini:`ini`,cfg:`ini`,properties:`properties`,conf:`ini`,env:`bash`,md:`markdown`,markdown:`markdown`,mdx:`markdown`,sh:`bash`,bash:`bash`,zsh:`bash`,fish:`bash`,bat:`batch`,cmd:`batch`,ps1:`powershell`,ps:`powershell`,c:`c`,h:`c`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,hpp:`cpp`,hh:`cpp`,cs:`csharp`,java:`java`,kt:`kotlin`,kts:`kotlin`,scala:`scala`,rs:`rust`,go:`go`,rb:`ruby`,php:`php`,swift:`swift`,m:`objectivec`,mm:`objectivec`,hs:`haskell`,ex:`elixir`,exs:`elixir`,erl:`erlang`,fs:`fsharp`,fsx:`fsharp`,ml:`ocaml`,mli:`ocaml`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,lua:`lua`,pl:`perl`,pm:`perl`,r:`r`,jl:`julia`,dart:`dart`,groovy:`groovy`,gradle:`groovy`,tf:`hcl`,hcl:`hcl`,dockerfile:`docker`,sql:`sql`,graphql:`graphql`,gql:`graphql`,proto:`protobuf`,diff:`diff`,patch:`diff`,nix:`nix`,sol:`solidity`},v={dockerfile:`docker`,makefile:`makefile`,gnumakefile:`makefile`,".bashrc":`bash`,".zshrc":`bash`,".profile":`bash`,".env":`bash`,".gitignore":`bash`,".dockerignore":`bash`};function y(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`)),n=e.slice(t+1),r=n.lastIndexOf(`.`);return r<=0?``:n.slice(r+1).toLowerCase()}function b(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return e.slice(t+1).toLowerCase()}function x(e,t){let n=v[b(e)];if(n)return n;let r=y(e);if(r&&_[r])return _[r];if(t){if(t===`text/html`)return`markup`;if(t===`text/css`)return`css`;if(t===`application/json`)return`json`;if(t===`text/markdown`)return`markdown`;if(t===`application/javascript`||t===`text/javascript`)return`javascript`;if(t===`application/x-yaml`||t===`text/yaml`)return`yaml`}return null}function S({path:e,text:t,mimeType:n}){let r=x(e,n);return r?(0,m.jsx)(`div`,{"data-testid":`file-content-viewer-highlighted`,"data-language":r,className:`h-full w-full overflow-auto bg-[var(--oh-surface)] custom-scrollbar-always`,children:(0,m.jsx)(o,{language:r,style:s,showLineNumbers:!0,wrapLongLines:!1,customStyle:{margin:0,padding:`1rem`,background:`transparent`,fontSize:`0.75rem`,lineHeight:`1.25rem`,minHeight:`100%`},codeTagProps:{style:{background:`transparent`,fontFamily:`inherit`}},lineNumberStyle:{color:`var(--oh-border)`,minWidth:`2.5em`,paddingRight:`1em`,userSelect:`none`},children:t})}):(0,m.jsx)(`pre`,{"data-testid":`file-content-viewer-plain`,className:`h-full w-full overflow-auto whitespace-pre-wrap break-words bg-[var(--oh-surface)] p-4 text-xs leading-5 text-white custom-scrollbar-always`,children:t})}export{g as n,S as t};
1
+ import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{t as i,z as a}from"./utils-zxEjKE70.js";import{ot as o,st as s}from"./vendor-markdown-j0kYzV48.js";import{t as c}from"./folder-C1ou4_DT.js";import{t as l}from"./syntax-highlighter-BGDg_7w9.js";var u=e(t(),1);function d(e){e.children.sort((e,t)=>e.isDirectory===t.isDirectory?e.name.localeCompare(t.name):e.isDirectory?-1:1);for(let t of e.children)t.isDirectory&&d(t)}function f(e,t,n,r,i){let a=t.get(e);a||(a=new Map,t.set(e,a));let o=a.get(n);if(o)return!i&&!o.isDirectory&&(o.isDirectory=!0),o;let s={name:n,path:r,isDirectory:!i,children:[]};return e.children.push(s),a.set(n,s),s}function p(e){let t={name:``,path:``,isDirectory:!0,children:[]},n=new Map;for(let r of e){let e=r.split(`/`).filter(Boolean);if(e.length>0){let r=t,i=``;for(let t=0;t<e.length;t+=1){let a=e[t];i=i?`${i}/${a}`:a;let o=t===e.length-1;r=f(r,n,a,i,o)}}}return d(t),t}var m=n();function h({node:e,depth:t,selectedPath:n,onSelectFile:r}){let[a,o]=(0,u.useState)(!1),s=8+t*12;if(e.isDirectory)return(0,m.jsxs)(`li`,{children:[(0,m.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),"aria-expanded":a,"data-testid":`file-tree-dir-${e.path}`,className:i(`flex w-full items-center gap-1.5 py-1 pr-2 text-left text-sm text-white`,`hover:bg-tertiary cursor-pointer`),style:{paddingLeft:`${s}px`},children:[(0,m.jsx)(`span`,{"aria-hidden":!0,className:i(`inline-block w-3 text-[10px] text-[var(--oh-muted)] transition-transform`,a?`rotate-90`:`rotate-0`),children:`▶`}),(0,m.jsx)(c,{className:`w-3.5 h-3.5 shrink-0`}),(0,m.jsx)(`span`,{className:`truncate`,children:e.name})]}),a&&e.children.length>0&&(0,m.jsx)(`ul`,{children:e.children.map(e=>(0,m.jsx)(h,{node:e,depth:t+1,selectedPath:n,onSelectFile:r},e.path))})]});let d=n===e.path;return(0,m.jsx)(`li`,{children:(0,m.jsxs)(`button`,{type:`button`,onClick:()=>r(e.path),"data-testid":`file-tree-file-${e.path}`,className:i(`flex w-full items-center gap-1.5 py-1 pr-2 text-left text-sm`,`hover:bg-tertiary cursor-pointer`,d?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-text-tertiary)]`),style:{paddingLeft:`${s+16}px`},children:[(0,m.jsx)(l,{className:`w-3.5 h-3.5 shrink-0`}),(0,m.jsx)(`span`,{className:`truncate`,children:e.name})]})})}function g({paths:e,selectedPath:t,onSelectFile:n}){let{t:i}=r(`openhands`),o=(0,u.useMemo)(()=>p(e),[e]);return o.children.length===0?(0,m.jsx)(`div`,{className:`px-3 py-4 text-sm text-[var(--oh-muted)]`,children:i(a.FILES$NO_FILES)}):(0,m.jsx)(`ul`,{className:`py-1 custom-scrollbar-always`,"data-testid":`file-tree-view`,children:o.children.map(e=>(0,m.jsx)(h,{node:e,depth:0,selectedPath:t,onSelectFile:n},e.path))})}var _={js:`javascript`,jsx:`jsx`,mjs:`javascript`,cjs:`javascript`,ts:`typescript`,tsx:`tsx`,py:`python`,pyi:`python`,pyw:`python`,html:`markup`,htm:`markup`,svg:`markup`,xml:`markup`,css:`css`,scss:`scss`,sass:`sass`,less:`less`,json:`json`,json5:`json5`,yaml:`yaml`,yml:`yaml`,toml:`toml`,ini:`ini`,cfg:`ini`,properties:`properties`,conf:`ini`,env:`bash`,md:`markdown`,markdown:`markdown`,mdx:`markdown`,sh:`bash`,bash:`bash`,zsh:`bash`,fish:`bash`,bat:`batch`,cmd:`batch`,ps1:`powershell`,ps:`powershell`,c:`c`,h:`c`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,hpp:`cpp`,hh:`cpp`,cs:`csharp`,java:`java`,kt:`kotlin`,kts:`kotlin`,scala:`scala`,rs:`rust`,go:`go`,rb:`ruby`,php:`php`,swift:`swift`,m:`objectivec`,mm:`objectivec`,hs:`haskell`,ex:`elixir`,exs:`elixir`,erl:`erlang`,fs:`fsharp`,fsx:`fsharp`,ml:`ocaml`,mli:`ocaml`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,lua:`lua`,pl:`perl`,pm:`perl`,r:`r`,jl:`julia`,dart:`dart`,groovy:`groovy`,gradle:`groovy`,tf:`hcl`,hcl:`hcl`,dockerfile:`docker`,sql:`sql`,graphql:`graphql`,gql:`graphql`,proto:`protobuf`,diff:`diff`,patch:`diff`,nix:`nix`,sol:`solidity`},v={dockerfile:`docker`,makefile:`makefile`,gnumakefile:`makefile`,".bashrc":`bash`,".zshrc":`bash`,".profile":`bash`,".env":`bash`,".gitignore":`bash`,".dockerignore":`bash`};function y(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`)),n=e.slice(t+1),r=n.lastIndexOf(`.`);return r<=0?``:n.slice(r+1).toLowerCase()}function b(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return e.slice(t+1).toLowerCase()}function x(e,t){let n=v[b(e)];if(n)return n;let r=y(e);if(r&&_[r])return _[r];if(t){if(t===`text/html`)return`markup`;if(t===`text/css`)return`css`;if(t===`application/json`)return`json`;if(t===`text/markdown`)return`markdown`;if(t===`application/javascript`||t===`text/javascript`)return`javascript`;if(t===`application/x-yaml`||t===`text/yaml`)return`yaml`}return null}function S({path:e,text:t,mimeType:n}){let r=x(e,n);return r?(0,m.jsx)(`div`,{"data-testid":`file-content-viewer-highlighted`,"data-language":r,className:`h-full w-full overflow-auto bg-[var(--oh-surface)] custom-scrollbar-always`,children:(0,m.jsx)(o,{language:r,style:s,showLineNumbers:!0,wrapLongLines:!1,customStyle:{margin:0,padding:`1rem`,background:`transparent`,fontSize:`0.75rem`,lineHeight:`1.25rem`,minHeight:`100%`},codeTagProps:{style:{background:`transparent`,fontFamily:`inherit`}},lineNumberStyle:{color:`var(--oh-border)`,minWidth:`2.5em`,paddingRight:`1em`,userSelect:`none`},children:t})}):(0,m.jsx)(`pre`,{"data-testid":`file-content-viewer-plain`,className:`h-full w-full overflow-auto whitespace-pre-wrap break-words bg-[var(--oh-surface)] p-4 text-xs leading-5 text-white custom-scrollbar-always`,children:t})}export{g as n,S as t};