@openhands/agent-canvas 1.9.0 → 1.10.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.
- package/README.md +1 -1
- package/README.windows.md +2 -2
- package/build/assets/{acp-providers-C921BlYB.js → acp-providers-DLe_gVDY.js} +1 -1
- package/build/assets/active-backend-context-B0wI7OzM.js +2 -0
- package/build/assets/agent-context-settings-CaQtdNA-.js +1 -0
- package/build/assets/{agent-profiles-settings-BymJf3EP.js → agent-profiles-settings-CvuErjp6.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-km_8sOVf.js +41 -0
- package/build/assets/{agent-settings-WzqXk6B4.js → agent-settings-UE-U4Xii.js} +2 -2
- package/build/assets/agent-settings-nmO-KSXr.js +1 -0
- package/build/assets/alert-banner-BMaOtTCG.js +1 -0
- package/build/assets/{api-key-entry-screen-DI0I04O3.js → api-key-entry-screen-Cy66vT4D.js} +1 -1
- package/build/assets/{app-settings-DGistSFV.js → app-settings-9ok42bV6.js} +1 -1
- package/build/assets/automation-detail-fuITm6i3.js +3 -0
- package/build/assets/automation-export-CRq40mux.js +2 -0
- package/build/assets/automation-setup-route-EXDazOHW.js +1 -0
- package/build/assets/automation-templates-BArZsaxP.js +1 -0
- package/build/assets/automations-list-CG4HKOTn.js +1 -0
- package/build/assets/{back-nav-button-D4ngzpSh.js → back-nav-button-BZB6H7xz.js} +1 -1
- package/build/assets/{backend-form-modal-B8D5hBzK.js → backend-form-modal-B_lXjOGa.js} +1 -1
- package/build/assets/{backend-synced-settings-badge-BnzI8Ysj.js → backend-synced-settings-badge-B_NXJ3u1.js} +1 -1
- package/build/assets/{badge-1Mf1iPcX.js → badge-C64c-7PO.js} +1 -1
- package/build/assets/{base-modal-BBuy0WQQ.js → base-modal-C0RQPug5.js} +1 -1
- package/build/assets/bot-DuN83i3p.js +1 -0
- package/build/assets/{brand-button-DGN6Y9o6.js → brand-button-DJmFCyMK.js} +1 -1
- package/build/assets/{browser-D_ekTlTS.js → browser-D3gd2n83.js} +2 -2
- package/build/assets/{browser-tab-D4a4Ou_w.js → browser-tab-BicAWuJ1.js} +1 -1
- package/build/assets/{chat-send-button-CgbcjD97.js → chat-send-button-CCrH1E8u.js} +1 -1
- package/build/assets/check-DLOKoFU9.js +1 -0
- package/build/assets/{checkmark-CxdXtM3b.js → checkmark-XZyokq_Y.js} +1 -1
- package/build/assets/chevron-down-CnIbtM6i.js +1 -0
- package/build/assets/circle-check-CxCYJrpZ.js +1 -0
- package/build/assets/{circle-plus-check-toggle-yTAS-nX3.js → circle-plus-check-toggle-CB_sNERY.js} +1 -1
- package/build/assets/{close-CDAVqnTn.js → close-ScPlnwyq.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-CEOl5Gxr.js → cloud-funnel-analytics-XynamQGU.js} +1 -1
- package/build/assets/{combobox-caret-Bd2yySnF.js → combobox-caret-Bwiifgjs.js} +1 -1
- package/build/assets/command-menu-CA3IjGNc.js +1 -0
- package/build/assets/condenser-settings-cNGy75gq.js +1 -0
- package/build/assets/{confirmation-modal-NCUPr2-O.js → confirmation-modal-BATFmFyP.js} +1 -1
- package/build/assets/context-menu-list-item-DhJCcBA0.js +1 -0
- package/build/assets/conversation-B6t6EiVp.js +1 -0
- package/build/assets/{conversation-CUJ0Vo8g.js → conversation-Csdxh9Xt.js} +7 -7
- package/build/assets/conversation-panel-B6t6EiVp.js +1 -0
- package/build/assets/{conversation-state-store-F62HvuI1.js → conversation-state-store-C2QzhPaK.js} +1 -1
- package/build/assets/{conversation-store-C6hSXHw0.js → conversation-store-B8Eahyeg.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-BCZ7rUMH.js → conversation-tab-empty-state-D3fb5xIA.js} +1 -1
- package/build/assets/{copy-DCmZtz6n.js → copy-DaHuDtG4.js} +1 -1
- package/build/assets/{copy-z7idLzWO.js → copy-Drmhc2jD.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-D_Lp6-Fl.js → copy-to-clipboard-button-c4MQwKGj.js} +1 -1
- package/build/assets/{device-verify-DLmolX8Q.js → device-verify-oFpQoLgm.js} +1 -1
- package/build/assets/{dist-hOnv1nn2.js → dist-Bl64nBZL.js} +1 -1
- package/build/assets/{dropdown-classes-BB8rzqXL.js → dropdown-classes-f91ARMV1.js} +1 -1
- package/build/assets/entry.client-BCzY2Bf3.js +2 -0
- package/build/assets/enum-filter-dropdown-HG3q3rkV.js +1 -0
- package/build/assets/{environment-switch-overlay-BepBBX66.js → environment-switch-overlay-CquZXolz.js} +1 -1
- package/build/assets/{extensions-hub-R3KNv-5V.js → extensions-hub-BeweE0PW.js} +1 -1
- package/build/assets/{extensions-navigation-CfWFmI1I.js → extensions-navigation-Dd58NlUF.js} +1 -1
- package/build/assets/{external-link-BdBSg8rk.js → external-link-zWbg5KXS.js} +1 -1
- package/build/assets/file-text-RecuaId_.js +1 -0
- package/build/assets/files-tab-CLLG55-q.js +1 -0
- package/build/assets/{folder-C86qXV7M.js → folder-C1ou4_DT.js} +1 -1
- package/build/assets/{form-control-classes-DAfsCJTe.js → form-control-classes-pHtZUI6K.js} +1 -1
- package/build/assets/format-relative-time-6-3uvOXe.js +1 -0
- package/build/assets/format-time-delta-BIR5Os7T.js +1 -0
- package/build/assets/{git-provider-icon-BZqqUPlm.js → git-provider-icon-wg7ShB98.js} +1 -1
- package/build/assets/{git-repo-dropdown-DEpOwUez.js → git-repo-dropdown-CWnaUyxL.js} +1 -1
- package/build/assets/git-repo-dropdown-TzOuG5Ef.js +1 -0
- package/build/assets/{highlighted-source-view-CX9oIoVT.js → highlighted-source-view-DBtI3por.js} +1 -1
- package/build/assets/home-BpZQkDWM.js +1 -0
- package/build/assets/home-OEx0XtfP.js +1 -0
- package/build/assets/{home-store-Ch1ErdBc.js → home-store-DM4qw1lF.js} +1 -1
- package/build/assets/{iconBase-B2rQun3J.js → iconBase-C2sR-uAp.js} +1 -1
- package/build/assets/index-home-OEx0XtfP.js +1 -0
- package/build/assets/info-C9lpK5pw.js +1 -0
- package/build/assets/install-server-modal-DnjZrJUy.js +1 -0
- package/build/assets/kebab-menu-item-content-By16Tm_0.js +1 -0
- package/build/assets/{launch-B1POpHuP.js → launch-C9uijypN.js} +1 -1
- package/build/assets/{link-external-BDBCz-_z.js → link-external-BNZzCM1I.js} +1 -1
- package/build/assets/list-filter-C86CBRDE.js +1 -0
- package/build/assets/{list-todo-DtiL3lTp.js → list-todo-CheUtB7F.js} +1 -1
- package/build/assets/llm-not-configured-banner-DrBrhfN0.js +27 -0
- package/build/assets/{llm-settings-CXo8iPNW.js → llm-settings-CRsLqxgu.js} +1 -1
- package/build/assets/llm-settings-RBm_3kNm.js +1 -0
- package/build/assets/{llm-subscription-service-DBJbfd8Z.js → llm-subscription-service-DwjJ8-_X.js} +1 -1
- package/build/assets/loader-circle-C5AnEN8r.js +1 -0
- package/build/assets/{loading-spinner-DfZ_bhV7.js → loading-spinner-6Yj-YyoS.js} +1 -1
- package/build/assets/{manage-backends-modal-CwyWsiag.js → manage-backends-modal-DrwErS0N.js} +1 -1
- package/build/assets/manifest-c352d453.js +1 -0
- package/build/assets/manifest-subpage-layout-CtqVwIvJ.js +1 -0
- package/build/assets/{markdown-renderer-DgiLLhW6.js → markdown-renderer-lsvsp7jn.js} +4 -4
- package/build/assets/mcp-DD4hPTRE.js +9 -0
- package/build/assets/mcp-marketplace-utils-BMnYz0Gc.js +1 -0
- package/build/assets/messages-Dt77e0qi.js +40 -0
- package/build/assets/{modal-backdrop-X-vKo61e.js → modal-backdrop-BSzNhM4r.js} +1 -1
- package/build/assets/{modal-body-CMsDpalT.js → modal-body-BHGCSAtj.js} +1 -1
- package/build/assets/{modal-classes-B6PDrxXo.js → modal-classes-DSTLuxkA.js} +1 -1
- package/build/assets/{modal-close-button-DyxBZaAb.js → modal-close-button-dheWZ2ys.js} +1 -1
- package/build/assets/mouse-pointer-click-Px-dXWcS.js +1 -0
- package/build/assets/{navigation-context-BOGzIng3.js → navigation-context-CQZwH_tC.js} +1 -1
- package/build/assets/navigation-link-Bxo3-4vo.js +1 -0
- package/build/assets/onboarding-5CZvRBbh.js +1 -0
- package/build/assets/onboarding-modal-CD2ehuxt.js +1 -0
- package/build/assets/{openhands-logo-CmYvJXBa.js → openhands-logo-BS-Epajy.js} +1 -1
- package/build/assets/{organization-service.api-UDy63-oC.js → organization-service.api-Dsuoep0g.js} +1 -1
- package/build/assets/{pencil-BjgtZmWp.js → pencil-Bl3GWhgq.js} +1 -1
- package/build/assets/{planner-tab-BWk8885v.js → planner-tab-DeO7Thb0.js} +1 -1
- package/build/assets/{plugins-management-service-CjkgF2dd.js → plugins-management-service-C9f75R6X.js} +1 -1
- package/build/assets/plus-CtzlyAoF.js +1 -0
- package/build/assets/{profiles-service.api-CukSFLzz.js → profiles-service.api-Dl20_2IM.js} +1 -1
- package/build/assets/{providers-CqUWC85T.js → providers-CeuhK46N.js} +1 -1
- package/build/assets/{proxy-BBUG3sd2.js → proxy-CIGI9zQC.js} +1 -1
- package/build/assets/{puzzle-BoNc6zZ8.js → puzzle-B3v361yY.js} +1 -1
- package/build/assets/recommended-automations-launcher-6xmbf7lh.js +1 -0
- package/build/assets/{refresh-cw-BrM5ZAZD.js → refresh-cw-B9GhC3QC.js} +1 -1
- package/build/assets/root-BQPNqNvD.js +2 -0
- package/build/assets/root-BeuHFY2s.css +1 -0
- package/build/assets/root-layout-Dl_2CDoq.js +3 -0
- package/build/assets/{schema-field-nImDoY6-.js → schema-field-z2vSLuLo.js} +1 -1
- package/build/assets/{sdk-section-page-BxMrtUNV.js → sdk-section-page-BnCXAytf.js} +1 -1
- package/build/assets/{search-7DRiGm4Z.js → search-BatSpWed.js} +1 -1
- package/build/assets/search-CYaiKHRp.js +1 -0
- package/build/assets/{secrets-service-Dhjh3HhH.js → secrets-service-DGUNlwQd.js} +1 -1
- package/build/assets/{secrets-settings-CPdxceT_.js → secrets-settings-DUmML_dK.js} +1 -1
- package/build/assets/{segmented-toggle-Do6oyepX.js → segmented-toggle-eSofF7gn.js} +1 -1
- package/build/assets/settings-CWFxymAf.js +1 -0
- package/build/assets/{settings-BRbnfKEm.js → settings-Co-M5bK9.js} +1 -1
- package/build/assets/{settings-dropdown-input-DYCULKpp.js → settings-dropdown-input-Cx4g7Xfl.js} +1 -1
- package/build/assets/{settings-gear-TYXnELES.js → settings-gear-DaJj6Pde.js} +1 -1
- package/build/assets/{settings-index-C9o2NBO0.js → settings-index-BECdgecg.js} +1 -1
- package/build/assets/{settings-input-B-q2gkVy.js → settings-input-BQY115xH.js} +1 -1
- package/build/assets/settings-like-page-layout-classes-Cw4Yzv_P.js +1 -0
- package/build/assets/{settings-list-classes-WpQi0q1L.js → settings-list-classes-C9cLrrcc.js} +1 -1
- package/build/assets/{settings-modal-CEK0AIx6.js → settings-modal-ChBJNTdd.js} +1 -1
- package/build/assets/{settings-section-header-context-CnIIQAUn.js → settings-section-header-context-BOJ_Fbak.js} +1 -1
- package/build/assets/settings-service.api-Dz9cZyvx.js +1 -0
- package/build/assets/{settings-switch-LqKdGxHL.js → settings-switch-BIodMVz9.js} +1 -1
- package/build/assets/{shared-conversation-Bu-dQlgp.js → shared-conversation-CSF0aTuE.js} +1 -1
- package/build/assets/{sidebar-layout-oHBGQmLh.js → sidebar-layout-DEycoFd_.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-DeRvTupV.js +1 -0
- package/build/assets/{sidebar-nav-link-CrujNA09.js → sidebar-nav-link-BjpQ-NVc.js} +1 -1
- package/build/assets/{sidebar-store-Bui-WNEr.js → sidebar-store-B04sX8aP.js} +1 -1
- package/build/assets/{skill-card-pill-row-CZBI7OqH.js → skill-card-pill-row-BH6fPGba.js} +1 -1
- package/build/assets/{skill-icon-badge-BOov_phZ.js → skill-icon-badge-D4uznfjU.js} +1 -1
- package/build/assets/skill-scope-DH_AUUUP.js +1 -0
- package/build/assets/{skills-CYFLsN5U.js → skills-B0IliMxw.js} +1 -1
- package/build/assets/{skills-plugins-D0PiHWAD.js → skills-plugins-vfvOk34h.js} +1 -1
- package/build/assets/skills-settings-DnbIu2eO.js +2 -0
- package/build/assets/sparkles-g7y3r-Ut.js +1 -0
- package/build/assets/{styled-tooltip-C7grwnOX.js → styled-tooltip-CQ9JEFiO.js} +1 -1
- package/build/assets/{switch-skeleton-BQoOhQTB.js → switch-skeleton-DwOoCqaL.js} +1 -1
- package/build/assets/{syntax-highlighter-B92AFGMy.js → syntax-highlighter-BGDg_7w9.js} +1 -1
- package/build/assets/{task-list-tab-R3ac6m7O.js → task-list-tab-DeF_uXdw.js} +1 -1
- package/build/assets/{terminal-cMS3RgVE.js → terminal-BUpID2wS.js} +1 -1
- package/build/assets/{terminal-yqkNdEAx.js → terminal-DRc4rup7.js} +1 -1
- package/build/assets/{toggle-switch-BeSrbgCg.js → toggle-switch--8n8NeV_.js} +1 -1
- package/build/assets/{trash-2-wW5TWcdN.js → trash-2-CzDVN-Iw.js} +1 -1
- package/build/assets/{typography-iYhzLlHO.js → typography-BSbUhJPn.js} +1 -1
- package/build/assets/{u-check-circle-DBEvndTS.js → u-check-circle-BKn1spCL.js} +1 -1
- package/build/assets/{u-edit-809W9D9T.js → u-edit-DAkcF52u.js} +1 -1
- package/build/assets/{u-robot-CJtSzy5X.js → u-robot-BvAOA2ZD.js} +1 -1
- package/build/assets/{use-acp-credential-form-DUxbxmbq.js → use-acp-credential-form-BGKFi1VL.js} +1 -1
- package/build/assets/{use-activate-agent-profile-CDHA52tC.js → use-activate-agent-profile-2nvALjC-.js} +1 -1
- package/build/assets/{use-agent-profiles-TsOdIyw5.js → use-agent-profiles-BlQA67MW.js} +1 -1
- package/build/assets/{use-breakpoint-DA7JqsRN.js → use-breakpoint-DWtihr9g.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-Bt1M71u5.js → use-can-manage-org-profiles-Clw5Dh1s.js} +1 -1
- package/build/assets/{use-click-outside-element-DKqpqEEm.js → use-click-outside-element-W6Os4Nlb.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-DWt7HCgf.js → use-cloud-current-user-id-B8AQSQFM.js} +1 -1
- package/build/assets/{use-config-CxlEdf_v.js → use-config-C3zGuUQI.js} +1 -1
- package/build/assets/{use-create-conversation-nOJ6Um5h.js → use-create-conversation-FaP0kUpg.js} +1 -1
- package/build/assets/{use-create-secret-Dj5ang9x.js → use-create-secret-CgQ3pXd6.js} +1 -1
- package/build/assets/use-is-authed-Bka89Xmm.js +1 -0
- package/build/assets/{use-is-creating-conversation-CAggrM75.js → use-is-creating-conversation-CVefC9Ns.js} +1 -1
- package/build/assets/{use-launch-skill-in-chat-DKzCTMt0.js → use-launch-skill-in-chat-BcKNjxxd.js} +1 -1
- package/build/assets/use-llm-profiles-C-tDO6UB.js +1 -0
- package/build/assets/use-manifest-capabilities-DLP5wCxp.js +1 -0
- package/build/assets/{use-onboarding-completion-gxQlcEy2.js → use-onboarding-completion-BiCdXvlU.js} +1 -1
- package/build/assets/{use-plugins-marketplace-CVO7sXYR.js → use-plugins-marketplace-DRFNLBlr.js} +1 -1
- package/build/assets/use-save-agent-profile-CaGVAudI.js +1 -0
- package/build/assets/{use-save-settings-L3aMaDeS.js → use-save-settings-C9B8Y-h3.js} +1 -1
- package/build/assets/{use-settings-8nt3DGxW.js → use-settings-3RcgdUuZ.js} +1 -1
- package/build/assets/{use-settings-nav-items-DHAAD-zk.js → use-settings-nav-items-y-Oyc93G.js} +2 -2
- package/build/assets/use-tracking-CTtkLAmx.js +3 -0
- package/build/assets/{use-user-conversation-BIIpGUgM.js → use-user-conversation-Bei82QsZ.js} +1 -1
- package/build/assets/{useInfiniteQuery-BLRVmVPU.js → useInfiniteQuery-DbCv0Jzd.js} +1 -1
- package/build/assets/{useMutation-CaSHLnX0.js → useMutation-ChpkYxI5.js} +1 -1
- package/build/assets/{useQueries--d_WWAzc.js → useQueries-Cjv3E8_1.js} +1 -1
- package/build/assets/useQuery-BCnzy4LX.js +1 -0
- package/build/assets/utils-BX9XJ0IE.js +1 -0
- package/build/assets/{vendor-markdown-BML7QbqS.js → vendor-markdown-j0kYzV48.js} +1 -1
- package/build/assets/{vendor-styling-Bcgpimp9.js → vendor-styling-Ck5D_A2Q.js} +6 -6
- package/build/assets/{vendor~browser-jaN4ilxM.js → vendor~browser-C6uXH-dw.js} +2 -2
- package/build/assets/vendor~browser-DJ1pl_wn.js +47 -0
- package/build/assets/{vendor~browser-tab-_-VCXq8n.js → vendor~browser-tab-C5uuAxZX.js} +1 -1
- package/build/assets/vendor~entry.client-CgNUwtQL.js +1 -0
- package/build/assets/{vendor~entry.client-BcYIVQvB.js → vendor~entry.client-zSIea5EO.js} +2 -2
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~cy4jtuc2-rfV8mQ9m.js +1 -0
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0bpqexo-CbTboogo.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-oGvLV0dO.js} +4 -4
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js +26 -0
- package/build/assets/{vendor~files-tab-C7RmQJwN.js → vendor~files-tab-C87pjSpi.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-Bqp1ZqJM.js → vendor~index-home~home~conversation-panel~conversation-DiXf0dkj.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation~alert-banner-BNzz5FuZ.js → vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js} +1 -1
- package/build/assets/{vendor~launch-ChXCOGw8.js → vendor~launch-CHwEQG6e.js} +1 -1
- package/build/assets/vendor~module-DyG7x7JT.js +2 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-BCn8lzeG.js → vendor~root-layout~conversation-panel~conversation-DEzjR4K7.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-DRblkyXD.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DOuig0C0.js} +1 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-U-xdsAEx.js +1 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-B_L-gcOG.js → vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-sjx0x5ac.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CQR5Sa0H.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gy8zbn65-CGt6bWRT.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-Cwhh3zLe.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~dfc8ddxy-tTyxnjXT.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-CuQhkiS7.js} +1 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js +73 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~dufan6ng-Dtdw8H0q.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js} +162 -54
- package/build/assets/{verification-settings-DBsnSXC3.js → verification-settings-nD61Ijph.js} +1 -1
- package/build/assets/wrench-DRitTfwe.js +1 -0
- package/build/assets/x-RYDBg-e2.js +1 -0
- package/build/assets/{x-mark-jcTkPiOB.js → x-mark-BopmFoBq.js} +1 -1
- package/build/assets/zap-tbKDzCe3.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +70 -4
- package/build/locales/ca/openhands.json +70 -4
- package/build/locales/de/openhands.json +70 -4
- package/build/locales/en/openhands.json +70 -4
- package/build/locales/es/openhands.json +70 -4
- package/build/locales/fr/openhands.json +70 -4
- package/build/locales/it/openhands.json +70 -4
- package/build/locales/ja/openhands.json +70 -4
- package/build/locales/ko-KR/openhands.json +70 -4
- package/build/locales/no/openhands.json +70 -4
- package/build/locales/pt/openhands.json +70 -4
- package/build/locales/tr/openhands.json +70 -4
- package/build/locales/uk/openhands.json +70 -4
- package/build/locales/zh-CN/openhands.json +70 -4
- package/build/locales/zh-TW/openhands.json +70 -4
- package/build/mockServiceWorker.js +21 -9
- package/config/defaults.json +3 -3
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.d.ts +5 -0
- package/dist/api/automation-service/automation-service.api.js +11 -0
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/backend-registry/active-store.cjs +1 -1
- package/dist/api/backend-registry/active-store.cjs.map +1 -1
- package/dist/api/backend-registry/active-store.js +36 -31
- package/dist/api/backend-registry/active-store.js.map +1 -1
- package/dist/api/backend-registry/url-selection.cjs +2 -0
- package/dist/api/backend-registry/url-selection.cjs.map +1 -0
- package/dist/api/backend-registry/url-selection.d.ts +31 -0
- package/dist/api/backend-registry/url-selection.js +29 -0
- package/dist/api/backend-registry/url-selection.js.map +1 -0
- package/dist/api/mcp-service/mcp-redacted-credentials.cjs +1 -1
- package/dist/api/mcp-service/mcp-redacted-credentials.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-redacted-credentials.d.ts +3 -2
- package/dist/api/mcp-service/mcp-redacted-credentials.js +32 -27
- package/dist/api/mcp-service/mcp-redacted-credentials.js.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.js +19 -19
- package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.d.ts +10 -0
- package/dist/api/settings-service/settings-service.api.js +90 -100
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/api/skills-service.cjs +1 -1
- package/dist/api/skills-service.cjs.map +1 -1
- package/dist/api/skills-service.js +1 -0
- package/dist/api/skills-service.js.map +1 -1
- package/dist/assets/chevron-left.d.ts +1 -1
- package/dist/assets/chevron-right.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/collapsible-thinking.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/error-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/event-group.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/observation-pair-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/skill-item-expanded.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/skill-ready-content-list.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/event-message.d.ts +2 -1
- package/dist/components/conversation-events/chat/task-tracking/task-item.d.ts +1 -1
- package/dist/components/conversation-events/chat/task-tracking/task-list-section.d.ts +1 -1
- package/dist/components/features/alerts/alert-banner.d.ts +1 -1
- package/dist/components/features/analytics/telemetry-consent-banner.d.ts +2 -1
- package/dist/components/features/automations/add-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/automation-card-skeleton.d.ts +1 -1
- package/dist/components/features/automations/automation-card.d.ts +9 -1
- package/dist/components/features/automations/automation-group.d.ts +9 -1
- package/dist/components/features/automations/automation-health-badge.d.ts +8 -0
- package/dist/components/features/automations/automation-list-row.d.ts +3 -1
- package/dist/components/features/automations/automation-run-insights.d.ts +17 -0
- package/dist/components/features/automations/automation-view-toggle.d.ts +1 -1
- package/dist/components/features/automations/backend-not-configured.d.ts +1 -1
- package/dist/components/features/automations/create-instructions.d.ts +2 -2
- package/dist/components/features/automations/dashboard/automations-dashboard-controls.d.ts +18 -0
- package/dist/components/features/automations/dashboard/automations-filtered-empty-state.d.ts +9 -0
- package/dist/components/features/automations/dashboard/use-automation-sub-page-nav.d.ts +12 -0
- package/dist/components/features/automations/delete-confirmation-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/active-status-badge.d.ts +1 -1
- package/dist/components/features/automations/detail/activity-log-item.d.ts +1 -1
- package/dist/components/features/automations/detail/activity-log-section.d.ts +3 -1
- package/dist/components/features/automations/detail/activity-section.d.ts +1 -1
- package/dist/components/features/automations/detail/back-link.d.ts +1 -1
- package/dist/components/features/automations/detail/branch-badge.d.ts +1 -1
- package/dist/components/features/automations/detail/config-field.d.ts +1 -1
- package/dist/components/features/automations/detail/configuration-section.d.ts +1 -1
- package/dist/components/features/automations/detail/debug-automation-button.d.ts +1 -1
- package/dist/components/features/automations/detail/detail-header.d.ts +1 -1
- package/dist/components/features/automations/detail/detail-skeleton.d.ts +1 -1
- package/dist/components/features/automations/detail/edit-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/not-found-state.d.ts +1 -1
- package/dist/components/features/automations/detail/plugin-chip.d.ts +1 -1
- package/dist/components/features/automations/detail/plugins-section.d.ts +1 -1
- package/dist/components/features/automations/detail/prompt-section.d.ts +2 -1
- package/dist/components/features/automations/detail/run-logs-modal.d.ts +1 -1
- package/dist/components/features/automations/detail/run-status-badge.d.ts +10 -1
- package/dist/components/features/automations/detail/section-card.d.ts +1 -1
- package/dist/components/features/automations/empty-state.d.ts +1 -1
- package/dist/components/features/automations/error-state.d.ts +1 -1
- package/dist/components/features/automations/import-automation-modal.d.ts +1 -1
- package/dist/components/features/automations/kebab-menu-item-content.d.ts +1 -1
- package/dist/components/features/automations/kebab-menu.d.ts +1 -1
- package/dist/components/features/automations/metadata-chip.d.ts +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.d.ts +1 -1
- package/dist/components/features/automations/recommended-automations-section.d.ts +1 -1
- package/dist/components/features/automations/responder-deployment-modal.d.ts +1 -1
- package/dist/components/features/automations/search-input.d.ts +1 -1
- package/dist/components/features/automations/status-badge.d.ts +1 -1
- package/dist/components/features/automations/turn-off-confirmation-modal.d.ts +8 -0
- package/dist/components/features/automations/view-menu-item-content.d.ts +1 -1
- package/dist/components/features/backends/add-backend-modal.d.ts +1 -1
- package/dist/components/features/backends/api-key-entry-screen.d.ts +2 -1
- package/dist/components/features/backends/backend-form-modal.d.ts +3 -3
- package/dist/components/features/backends/backend-row.d.ts +1 -1
- package/dist/components/features/backends/backend-selector.d.ts +2 -1
- package/dist/components/features/backends/backend-status-dot.d.ts +2 -1
- package/dist/components/features/backends/backend-version.d.ts +1 -1
- package/dist/components/features/backends/device-flow-auth.d.ts +1 -1
- package/dist/components/features/backends/manage-backends-modal.d.ts +2 -1
- package/dist/components/features/browser/browser-chrome-bar.d.ts +1 -1
- package/dist/components/features/browser/browser-snapshot.d.ts +1 -1
- package/dist/components/features/browser/browser.d.ts +1 -1
- package/dist/components/features/browser/empty-browser-message.d.ts +1 -1
- package/dist/components/features/chat/btw-messages.d.ts +1 -1
- package/dist/components/features/chat/change-agent-button.d.ts +2 -1
- package/dist/components/features/chat/change-agent-context-menu.d.ts +1 -1
- package/dist/components/features/chat/chat-action-tooltip.d.ts +1 -1
- package/dist/components/features/chat/chat-add-file-button.d.ts +2 -1
- package/dist/components/features/chat/chat-interface.d.ts +2 -1
- package/dist/components/features/chat/chat-message.d.ts +1 -1
- package/dist/components/features/chat/chat-messages-skeleton.d.ts +2 -1
- package/dist/components/features/chat/chat-play-button.d.ts +1 -1
- package/dist/components/features/chat/chat-send-button.d.ts +1 -1
- package/dist/components/features/chat/chat-status-indicator.d.ts +1 -1
- package/dist/components/features/chat/chat-stop-button.d.ts +1 -1
- package/dist/components/features/chat/chat-suggestions.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-actions.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-container.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-field.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-grip.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.d.ts +3 -2
- package/dist/components/features/chat/components/chat-input-model.d.ts +3 -2
- package/dist/components/features/chat/components/chat-input-profile-picker.d.ts +1 -1
- package/dist/components/features/chat/components/chat-input-row.d.ts +1 -1
- package/dist/components/features/chat/components/hidden-file-input.d.ts +1 -1
- package/dist/components/features/chat/components/slash-command-menu.d.ts +2 -1
- package/dist/components/features/chat/confirmation-mode-enabled.d.ts +1 -1
- package/dist/components/features/chat/custom-chat-input.d.ts +1 -1
- package/dist/components/features/chat/drag-over.d.ts +1 -1
- package/dist/components/features/chat/error-message-banner.d.ts +2 -1
- package/dist/components/features/chat/error-message.d.ts +2 -1
- package/dist/components/features/chat/generic-event-message.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-branch-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-pr-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-pull-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-push-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-repo-button.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar-tooltip-wrapper.d.ts +1 -1
- package/dist/components/features/chat/git-control-bar.d.ts +1 -1
- package/dist/components/features/chat/git-external-link-icon.d.ts +1 -1
- package/dist/components/features/chat/goal-status-banner.d.ts +1 -1
- package/dist/components/features/chat/goal-status-content.d.ts +1 -1
- package/dist/components/features/chat/got-it-button.d.ts +1 -1
- package/dist/components/features/chat/interactive-chat-box.d.ts +1 -1
- package/dist/components/features/chat/model-messages.d.ts +2 -1
- package/dist/components/features/chat/mono-component.d.ts +1 -1
- package/dist/components/features/chat/open-repository-modal.d.ts +2 -1
- package/dist/components/features/chat/pasted-image-upload-as-file-button.d.ts +1 -1
- package/dist/components/features/chat/path-component.d.ts +1 -1
- package/dist/components/features/chat/pending-stop-icon.d.ts +1 -1
- package/dist/components/features/chat/pending-user-messages.d.ts +2 -1
- package/dist/components/features/chat/plan-preview.d.ts +1 -1
- package/dist/components/features/chat/remove-file-button.d.ts +1 -1
- package/dist/components/features/chat/skill-install-restart-banner.d.ts +1 -1
- package/dist/components/features/chat/success-indicator.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/status-badge.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/status-icon.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/task-item.d.ts +1 -1
- package/dist/components/features/chat/task-tracking/task-list-section.d.ts +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/code-block.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/diff-view.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +2 -1
- package/dist/components/features/chat/tool-visualizers/primitives/key-value-grid.d.ts +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/output-pane.d.ts +2 -1
- package/dist/components/features/chat/typing-indicator.d.ts +1 -1
- package/dist/components/features/chat/uploaded-file.d.ts +1 -1
- package/dist/components/features/chat/uploaded-files.d.ts +1 -1
- package/dist/components/features/chat/uploaded-image.d.ts +2 -1
- package/dist/components/features/chat/user-message-body.d.ts +2 -2
- package/dist/components/features/chat/waiting-for-runtime-message.d.ts +1 -1
- package/dist/components/features/chat/workspace-mode-icon.d.ts +1 -1
- package/dist/components/features/chat/workspace-mode-selector.d.ts +1 -1
- package/dist/components/features/command-menu/command-menu-trigger.d.ts +2 -1
- package/dist/components/features/context-menu/archived-disabled-tooltip.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text-with-description.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.cjs.map +1 -1
- package/dist/components/features/context-menu/context-menu-list-item.d.ts +2 -1
- package/dist/components/features/context-menu/context-menu-list-item.js +2 -1
- package/dist/components/features/context-menu/context-menu-list-item.js.map +1 -1
- package/dist/components/features/controls/agent-loading.d.ts +1 -1
- package/dist/components/features/controls/agent-status.d.ts +1 -1
- package/dist/components/features/controls/git-tools-submenu.d.ts +1 -1
- package/dist/components/features/controls/macros-submenu.d.ts +1 -1
- package/dist/components/features/controls/server-status-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/controls/server-status-context-menu.d.ts +1 -1
- package/dist/components/features/controls/server-status.d.ts +1 -1
- package/dist/components/features/controls/tools-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/controls/tools-context-menu.d.ts +1 -1
- package/dist/components/features/controls/tools.d.ts +2 -1
- package/dist/components/features/conversation/conversation-loading.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/chat-interface-wrapper.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/conversation-main.d.ts +1 -1
- package/dist/components/features/conversation/conversation-main/conversation-mobile-panel-page.d.ts +2 -1
- package/dist/components/features/conversation/conversation-name-context-menu-icon-text.d.ts +1 -1
- package/dist/components/features/conversation/conversation-name-context-menu.d.ts +1 -1
- package/dist/components/features/conversation/conversation-name-with-status.d.ts +2 -1
- package/dist/components/features/conversation/conversation-name.d.ts +2 -1
- package/dist/components/features/conversation/conversation-tab-empty-state.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content-crossfade.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/conversation-tab-content.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/suspense-pending-fallback.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-container.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-content-area.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-content/tab-wrapper.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tab-nav.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/context-window-section.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/cost-section.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/empty-state.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metric-row.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal-header.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/metrics-modal.d.ts +1 -1
- package/dist/components/features/conversation/metrics-modal/usage-section.d.ts +1 -1
- package/dist/components/features/conversation/right-panel-toggle.d.ts +1 -1
- package/dist/components/features/conversation/transcript-export-modal.d.ts +2 -1
- package/dist/components/features/conversation-panel/budget-display.d.ts +2 -1
- package/dist/components/features/conversation-panel/budget-progress-bar.d.ts +1 -1
- package/dist/components/features/conversation-panel/budget-usage-text.d.ts +2 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.cjs +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.d.ts +2 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.js +38 -37
- package/dist/components/features/conversation-panel/compact-conversation-row.js.map +1 -1
- package/dist/components/features/conversation-panel/confirm-delete-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/confirm-stop-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-skeleton.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-title.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-repo-link.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-status-badges.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/no-repository.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-list.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-group-folder-row.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-new-thread-picker.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-pinned-section.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +221 -220
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-status-dot.d.ts +1 -1
- package/dist/components/features/conversation-panel/exit-conversation-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/hook-event-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/hook-matcher-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-empty-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-loading-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-modal-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/hooks-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-heading.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-row.d.ts +1 -1
- package/dist/components/features/conversation-panel/menu-separator.d.ts +1 -1
- package/dist/components/features/conversation-panel/new-conversation-button.d.ts +2 -1
- package/dist/components/features/conversation-panel/plugins-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/runtime-waiting-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/skill-triggers.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-empty-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-loading-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal-section.d.ts +1 -1
- package/dist/components/features/conversation-panel/skills-modal.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card-footer.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-card.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-badge.d.ts +1 -1
- package/dist/components/features/conversation-panel/start-task-card/start-task-status-indicator.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/empty-tools-state.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/system-message-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/system-message-header.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-button.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-content.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tab-navigation.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/toggle-button.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tool-item.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tool-parameters.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal/tools-list.d.ts +1 -1
- package/dist/components/features/conversation-panel/system-message-modal.d.ts +1 -1
- package/dist/components/features/diff-viewer/commit-list.d.ts +2 -1
- package/dist/components/features/diff-viewer/commit-row.d.ts +2 -1
- package/dist/components/features/diff-viewer/diff-drawer-icon.d.ts +1 -1
- package/dist/components/features/diff-viewer/editor-container.d.ts +1 -1
- package/dist/components/features/diff-viewer/empty-changes-message.d.ts +1 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +2 -1
- package/dist/components/features/diff-viewer/loading-spinner.d.ts +1 -1
- package/dist/components/features/files/file-item.d.ts +1 -1
- package/dist/components/features/files/file-list.d.ts +2 -1
- package/dist/components/features/files-tab/file-content-viewer.d.ts +1 -1
- package/dist/components/features/files-tab/file-quick-row.d.ts +1 -1
- package/dist/components/features/files-tab/file-tree-view.d.ts +1 -1
- package/dist/components/features/files-tab/highlighted-source-view.d.ts +1 -1
- package/dist/components/features/files-tab/no-file-selected-message.d.ts +1 -1
- package/dist/components/features/files-tab/segmented-toggle.d.ts +1 -1
- package/dist/components/features/files-tab/tree-node.d.ts +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.d.ts +11 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +18 -0
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +14 -0
- package/dist/components/features/home/featured-automations/automation-run-health.d.ts +25 -0
- package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +39 -0
- package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +22 -0
- package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +23 -0
- package/dist/components/features/home/featured-automations/home-automation-menu.d.ts +13 -0
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.d.ts +12 -0
- package/dist/components/features/home/featured-automations/pinned-automation-card.d.ts +21 -0
- package/dist/components/features/home/featured-automations/pinned-automations-dashboard.d.ts +6 -0
- package/dist/components/features/home/featured-automations/running-automations-list.d.ts +6 -0
- package/dist/components/features/home/git-branch-dropdown/branch-dropdown-menu.d.ts +1 -1
- package/dist/components/features/home/git-branch-dropdown/git-branch-dropdown.d.ts +2 -1
- package/dist/components/features/home/git-provider-dropdown/git-provider-dropdown.d.ts +2 -1
- package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.d.ts +2 -1
- package/dist/components/features/home/home-chat-launcher.d.ts +1 -1
- package/dist/components/features/home/home-git-control-bar-preview.d.ts +1 -1
- package/dist/components/features/home/home-header/guide-message.d.ts +1 -1
- package/dist/components/features/home/home-header/home-header-title.d.ts +1 -1
- package/dist/components/features/home/home-header/home-header.d.ts +1 -1
- package/dist/components/features/home/llm-not-configured-banner.d.ts +1 -1
- package/dist/components/features/home/new-conversation/create-conversation-button.d.ts +1 -1
- package/dist/components/features/home/new-conversation/new-conversation.d.ts +1 -1
- package/dist/components/features/home/new-conversation.d.ts +1 -1
- package/dist/components/features/home/open-launcher-button.d.ts +1 -1
- package/dist/components/features/home/open-repository-dialog.d.ts +1 -1
- package/dist/components/features/home/open-workspace-dialog.d.ts +1 -1
- package/dist/components/features/home/repo-selection-form.d.ts +2 -1
- package/dist/components/features/home/shared/clear-button.d.ts +2 -1
- package/dist/components/features/home/shared/dropdown-item.d.ts +1 -1
- package/dist/components/features/home/shared/empty-state.d.ts +2 -1
- package/dist/components/features/home/shared/error-message.d.ts +2 -1
- package/dist/components/features/home/shared/generic-dropdown-menu.d.ts +1 -1
- package/dist/components/features/home/shared/loading-spinner.d.ts +2 -1
- package/dist/components/features/home/shared/toggle-button.d.ts +1 -1
- package/dist/components/features/home/tasks/task-card.d.ts +1 -1
- package/dist/components/features/home/tasks/task-group.d.ts +1 -1
- package/dist/components/features/home/tasks/task-issue-number.d.ts +1 -1
- package/dist/components/features/home/tasks/task-item-title.d.ts +1 -1
- package/dist/components/features/home/tasks/task-suggestions-skeleton.d.ts +1 -1
- package/dist/components/features/home/tasks/task-suggestions.d.ts +1 -1
- package/dist/components/features/home/workspace-dropdown/folder-browser-modal.d.ts +2 -1
- package/dist/components/features/home/workspace-dropdown/manage-workspaces-modal.d.ts +2 -1
- package/dist/components/features/home/workspace-dropdown/workspace-dropdown.d.ts +2 -1
- package/dist/components/features/home/workspace-selection-form.d.ts +2 -1
- package/dist/components/features/images/image-carousel.d.ts +2 -1
- package/dist/components/features/images/image-preview.d.ts +1 -1
- package/dist/components/features/images/thumbnail.d.ts +1 -1
- package/dist/components/features/launch/plugin-launch-modal.d.ts +2 -1
- package/dist/components/features/launch/plugin-launch-parameter-input.d.ts +1 -1
- package/dist/components/features/launch/plugin-launch-plugin-section.d.ts +1 -1
- package/dist/components/features/manifest/manifest-form-field.d.ts +1 -1
- package/dist/components/features/manifest/manifest-icons.d.ts +13 -0
- package/dist/components/features/manifest/manifest-overview-tiles.d.ts +19 -0
- package/dist/components/features/manifest/manifest-prerequisites-step.d.ts +1 -1
- package/dist/components/features/manifest/manifest-review-step.d.ts +1 -1
- package/dist/components/features/manifest/manifest-setup-dialog.d.ts +1 -1
- package/dist/components/features/manifest/manifest-subpage-layout.d.ts +23 -0
- package/dist/components/features/markdown/anchor.d.ts +1 -1
- package/dist/components/features/markdown/blockquote.d.ts +1 -1
- package/dist/components/features/markdown/code.d.ts +1 -1
- package/dist/components/features/markdown/headings.d.ts +6 -6
- package/dist/components/features/markdown/horizontal-rule.d.ts +1 -1
- package/dist/components/features/markdown/list.d.ts +3 -3
- package/dist/components/features/markdown/markdown-renderer.d.ts +1 -1
- package/dist/components/features/markdown/markdown-table-scroll.d.ts +1 -1
- package/dist/components/features/markdown/paragraph.d.ts +1 -1
- package/dist/components/features/markdown/plan-components.d.ts +36 -36
- package/dist/components/features/markdown/table.d.ts +3 -3
- package/dist/components/features/mcp-logo-badge.d.ts +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.d.ts +2 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +5 -0
- package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.d.ts +2 -1
- package/dist/components/features/mcp-page/install-server-modal.js +117 -118
- package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.d.ts +2 -1
- package/dist/components/features/mcp-page/installed-servers-section.d.ts +1 -1
- package/dist/components/features/mcp-page/marketplace-card.d.ts +1 -1
- package/dist/components/features/mcp-page/marketplace-section.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-logo-stack-badge.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-section-filter-dropdown.d.ts +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.d.ts +2 -1
- package/dist/components/features/mcp-page/mcp-toolbar.d.ts +1 -1
- package/dist/components/features/mcp-page/save-as-secret-toggle.d.ts +1 -1
- package/dist/components/features/onboarding/onboarding-host.d.ts +1 -1
- package/dist/components/features/onboarding/onboarding-modal.d.ts +2 -1
- package/dist/components/features/onboarding/onboarding-progress-bar.d.ts +1 -1
- package/dist/components/features/onboarding/steps/check-backend-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/choose-agent-step.d.ts +3 -2
- package/dist/components/features/onboarding/steps/say-hello-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/setup-acp-secrets-step.d.ts +2 -1
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +2 -1
- package/dist/components/features/plugins/add-plugin-modal.d.ts +2 -1
- package/dist/components/features/plugins/plugin-card.d.ts +2 -1
- package/dist/components/features/plugins/plugin-detail-modal.d.ts +1 -1
- package/dist/components/features/plugins/plugin-files-section.d.ts +2 -1
- package/dist/components/features/plugins/plugin-picker-card.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker-modal.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker-trigger.d.ts +1 -1
- package/dist/components/features/plugins/plugin-picker.d.ts +1 -1
- package/dist/components/features/plugins/plugins-toolbar.d.ts +1 -1
- package/dist/components/features/settings/acp-auth-status-banner.d.ts +1 -1
- package/dist/components/features/settings/acp-conflict-warnings.d.ts +2 -1
- package/dist/components/features/settings/acp-credentials-section.d.ts +1 -1
- package/dist/components/features/settings/acp-secret-field.d.ts +2 -1
- package/dist/components/features/settings/agent-canvas-update-card.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profile-actions-menu.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profile-row.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-body.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-local-view.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/agent-profiles-manager.d.ts +1 -1
- package/dist/components/features/settings/agent-profiles/delete-agent-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/agent-server-onboarding.d.ts +2 -1
- package/dist/components/features/settings/api-key-modal-base.d.ts +1 -1
- package/dist/components/features/settings/app-settings/app-settings-inputs-skeleton.d.ts +1 -1
- package/dist/components/features/settings/app-settings/language-input.d.ts +1 -1
- package/dist/components/features/settings/app-settings/theme-input.d.ts +2 -1
- package/dist/components/features/settings/backend-synced-settings-badge.d.ts +1 -1
- package/dist/components/features/settings/banner-message.d.ts +1 -1
- package/dist/components/features/settings/cloud-settings-link.d.ts +1 -1
- package/dist/components/features/settings/input-skeleton.d.ts +1 -1
- package/dist/components/features/settings/integrations-settings-link.d.ts +1 -1
- package/dist/components/features/settings/key-status-icon.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/delete-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/llm-profiles-manager.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.d.ts +2 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu-item.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profile-actions-menu.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profile-row.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +1 -1
- package/dist/components/features/settings/llm-profiles/rename-profile-modal.d.ts +1 -1
- package/dist/components/features/settings/llm-settings/llm-settings-inputs-skeleton.d.ts +1 -1
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.d.ts +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.d.ts +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +1 -1
- package/dist/components/features/settings/mobile-header.d.ts +1 -1
- package/dist/components/features/settings/optional-tag.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/field-help.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/schema-field.d.ts +2 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/view-toggle.d.ts +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.d.ts +2 -1
- package/dist/components/features/settings/secrets-settings/secret-list-item.d.ts +2 -2
- package/dist/components/features/settings/settings-desktop-sidebar.d.ts +1 -1
- package/dist/components/features/settings/settings-dropdown-input.d.ts +1 -1
- package/dist/components/features/settings/settings-layout.d.ts +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.d.ts +1 -1
- package/dist/components/features/settings/settings-mobile-hub.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-divider.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-header.d.ts +1 -1
- package/dist/components/features/settings/settings-nav-link.d.ts +1 -1
- package/dist/components/features/settings/settings-navigation.d.ts +1 -1
- package/dist/components/features/settings/settings-switch.d.ts +1 -1
- package/dist/components/features/settings/subtext-skeleton.d.ts +1 -1
- package/dist/components/features/settings/switch-skeleton.d.ts +1 -1
- package/dist/components/features/settings/upgrade-banner.d.ts +1 -1
- package/dist/components/features/settings/upgrade-button.d.ts +1 -1
- package/dist/components/features/sidebar/avatar.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-collapsed-icon-slot.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-conversation-list.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-menu-bar.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-menu-toggle.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-mobile-nav-context.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-nav-link.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.d.ts +1 -1
- package/dist/components/features/sidebar/sidebar.d.ts +2 -1
- package/dist/components/features/sidebar/user-avatar.d.ts +1 -1
- package/dist/components/features/skills/add-skill-modal.d.ts +2 -1
- package/dist/components/features/skills/extensions-mobile-hub.d.ts +1 -1
- package/dist/components/features/skills/extensions-navigation.d.ts +1 -1
- package/dist/components/features/skills/skill-card-pill-row.d.ts +1 -1
- package/dist/components/features/skills/skill-card.d.ts +2 -1
- package/dist/components/features/skills/skill-detail-modal.d.ts +2 -1
- package/dist/components/features/skills/skill-facet-rail.d.ts +8 -0
- package/dist/components/features/skills/skill-facet-row.d.ts +13 -0
- package/dist/components/features/skills/skill-filter.d.ts +34 -0
- package/dist/components/features/skills/skill-filters-modal.d.ts +10 -0
- package/dist/components/features/skills/skill-icon-badge.d.ts +1 -1
- package/dist/components/features/skills/skill-type-badge.d.ts +1 -1
- package/dist/components/features/skills/skills-toolbar.d.ts +3 -4
- package/dist/components/features/suggestions/suggestion-item.d.ts +1 -1
- package/dist/components/features/suggestions/suggestions.d.ts +1 -1
- package/dist/components/features/terminal/empty-terminal-message.d.ts +1 -1
- package/dist/components/features/terminal/terminal.d.ts +1 -1
- package/dist/components/features/tips/random-tip.d.ts +2 -1
- package/dist/components/providers/agent-server-ui-providers.d.ts +1 -1
- package/dist/components/providers/agent-server-ui-root.d.ts +1 -1
- package/dist/components/providers/telemetry-provider.d.ts +1 -1
- package/dist/components/shared/action-tooltip.d.ts +1 -1
- package/dist/components/shared/agent-brand-icon.d.ts +1 -1
- package/dist/components/shared/badge.d.ts +1 -1
- package/dist/components/shared/buttons/back-nav-button-content.d.ts +1 -1
- package/dist/components/shared/buttons/circle-plus-check-toggle.d.ts +3 -2
- package/dist/components/shared/buttons/conversation-confirmation-buttons.d.ts +1 -1
- package/dist/components/shared/buttons/copy-to-clipboard-button.d.ts +1 -1
- package/dist/components/shared/buttons/copyable-content-wrapper.d.ts +1 -1
- package/dist/components/shared/buttons/modal-button.d.ts +1 -1
- package/dist/components/shared/buttons/openhands-logo-button.d.ts +1 -1
- package/dist/components/shared/buttons/remove-button.d.ts +1 -1
- package/dist/components/shared/buttons/scroll-to-bottom-button.d.ts +1 -1
- package/dist/components/shared/buttons/styled-tooltip.d.ts +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.d.ts +6 -2
- package/dist/components/shared/filters/enum-filter-dropdown.js +13 -13
- package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
- package/dist/components/shared/git-provider-icon.d.ts +1 -1
- package/dist/components/shared/hook-execution-event-message.d.ts +2 -1
- package/dist/components/shared/loading-spinner.d.ts +1 -1
- package/dist/components/shared/modals/confirmation-modal.d.ts +1 -1
- package/dist/components/shared/modals/confirmation-modals/base-modal.d.ts +3 -3
- package/dist/components/shared/modals/confirmation-modals/danger-modal.d.ts +1 -1
- package/dist/components/shared/modals/modal-body.d.ts +1 -1
- package/dist/components/shared/modals/modal-close-button.d.ts +1 -1
- package/dist/components/shared/modals/settings/model-selector.d.ts +2 -1
- package/dist/components/shared/modals/settings/settings-form.d.ts +2 -1
- package/dist/components/shared/modals/settings/settings-modal.d.ts +1 -1
- package/dist/components/shared/navigation-link.cjs +1 -1
- package/dist/components/shared/navigation-link.cjs.map +1 -1
- package/dist/components/shared/navigation-link.js +11 -7
- package/dist/components/shared/navigation-link.js.map +1 -1
- package/dist/components/shared/risk-alert.d.ts +1 -1
- package/dist/components/shared/text-shimmer.d.ts +1 -1
- package/dist/components/ui/resize-handle.d.ts +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/context/navigation-context.d.ts +1 -1
- package/dist/context/scroll-context.d.ts +1 -1
- package/dist/contexts/active-backend-context.d.ts +1 -1
- package/dist/contexts/conversation-websocket-context.d.ts +1 -1
- package/dist/contexts/settings-section-header-context.d.ts +1 -1
- package/dist/contexts/websocket-provider-wrapper.d.ts +1 -1
- package/dist/fixtures/home-automations-demo.d.ts +19 -0
- package/dist/hooks/mutation/use-add-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-add-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-add-mcp-server.js +10 -14
- package/dist/hooks/mutation/use-add-mcp-server.js.map +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.d.ts +2 -7
- package/dist/hooks/mutation/use-delete-mcp-server.js +8 -34
- package/dist/hooks/mutation/use-delete-mcp-server.js.map +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs.map +1 -1
- package/dist/hooks/mutation/use-save-settings.js +8 -4
- package/dist/hooks/mutation/use-save-settings.js.map +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.d.ts +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.js +31 -16
- package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
- package/dist/hooks/query/use-active-conversation.d.ts +1 -1
- package/dist/hooks/query/use-agent-profiles.d.ts +1 -1
- package/dist/hooks/query/use-app-installations.d.ts +1 -1
- package/dist/hooks/query/use-automation-detail.d.ts +2 -2
- package/dist/hooks/query/use-automation-health.d.ts +2 -0
- package/dist/hooks/query/use-automations.d.ts +5 -1
- package/dist/hooks/query/use-bash-command-logs.d.ts +1 -1
- package/dist/hooks/query/use-cloud-sandbox.d.ts +1 -1
- package/dist/hooks/query/use-commit-changes.d.ts +1 -1
- package/dist/hooks/query/use-config.d.ts +1 -1
- package/dist/hooks/query/use-conversation-history.d.ts +1 -1
- package/dist/hooks/query/use-conversation-hooks.d.ts +1 -1
- package/dist/hooks/query/use-conversation-skills.d.ts +1 -1
- package/dist/hooks/query/use-get-secrets.d.ts +1 -1
- package/dist/hooks/query/use-home-automations.d.ts +20 -0
- package/dist/hooks/query/use-latest-automation-runs.d.ts +19 -0
- package/dist/hooks/query/use-llm-profiles.d.ts +1 -1
- package/dist/hooks/query/use-llm-subscription-models.d.ts +1 -1
- package/dist/hooks/query/use-llm-subscription-status.d.ts +1 -1
- package/dist/hooks/query/use-local-git-info.d.ts +1 -1
- package/dist/hooks/query/use-local-workspaces.d.ts +1 -1
- package/dist/hooks/query/use-manifest-capabilities.d.ts +2 -0
- package/dist/hooks/query/use-plugin-file-content.d.ts +1 -1
- package/dist/hooks/query/use-plugins-marketplace.d.ts +1 -1
- package/dist/hooks/query/use-provider-models.d.ts +1 -1
- package/dist/hooks/query/use-search-branches.d.ts +1 -1
- package/dist/hooks/query/use-search-providers.d.ts +1 -1
- package/dist/hooks/query/use-search-repositories.d.ts +1 -1
- package/dist/hooks/query/use-search-subdirs.d.ts +2 -2
- package/dist/hooks/query/use-settings.d.ts +2 -2
- package/dist/hooks/query/use-skills.d.ts +1 -1
- package/dist/hooks/query/use-start-tasks.d.ts +1 -1
- package/dist/hooks/query/use-sub-conversation-task-polling.d.ts +1 -1
- package/dist/hooks/query/use-sub-conversations.d.ts +1 -1
- package/dist/hooks/query/use-suggested-tasks.d.ts +1 -1
- package/dist/hooks/query/use-task-polling.d.ts +2 -2
- package/dist/hooks/query/use-unified-get-git-changes.d.ts +1 -1
- package/dist/hooks/query/use-unified-git-diff.d.ts +1 -1
- package/dist/hooks/query/use-user-conversation.d.ts +1 -1
- package/dist/hooks/query/use-workspace-file-content.d.ts +1 -1
- package/dist/hooks/use-backend-scoped-path.cjs +2 -0
- package/dist/hooks/use-backend-scoped-path.cjs.map +1 -0
- package/dist/hooks/use-backend-scoped-path.d.ts +10 -0
- package/dist/hooks/use-backend-scoped-path.js +13 -0
- package/dist/hooks/use-backend-scoped-path.js.map +1 -0
- package/dist/hooks/use-home-automation-actions.d.ts +23 -0
- package/dist/hooks/use-home-pinned-automations.d.ts +26 -0
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +4 -0
- package/dist/hooks/use-tracking.js +6 -0
- package/dist/hooks/use-tracking.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +68 -2
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +2 -2
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +1169 -47
- package/dist/i18n/translation.js.map +1 -1
- package/dist/icons/code-pill.d.ts +1 -1
- package/dist/locales/ar/openhands.json +70 -4
- package/dist/locales/ca/openhands.json +70 -4
- package/dist/locales/de/openhands.json +70 -4
- package/dist/locales/en/openhands.json +70 -4
- package/dist/locales/es/openhands.json +70 -4
- package/dist/locales/fr/openhands.json +70 -4
- package/dist/locales/it/openhands.json +70 -4
- package/dist/locales/ja/openhands.json +70 -4
- package/dist/locales/ko-KR/openhands.json +70 -4
- package/dist/locales/no/openhands.json +70 -4
- package/dist/locales/pt/openhands.json +70 -4
- package/dist/locales/tr/openhands.json +70 -4
- package/dist/locales/uk/openhands.json +70 -4
- package/dist/locales/zh-CN/openhands.json +70 -4
- package/dist/locales/zh-TW/openhands.json +70 -4
- package/dist/manifests/automation-insights.d.ts +64 -0
- package/dist/manifests/automation-interface.cjs +1 -1
- package/dist/manifests/automation-interface.cjs.map +1 -1
- package/dist/manifests/automation-interface.d.ts +33 -1
- package/dist/manifests/automation-interface.js +2 -1
- package/dist/manifests/automation-interface.js.map +1 -1
- package/dist/manifests/interface-validation.cjs +1 -1
- package/dist/manifests/interface-validation.cjs.map +1 -1
- package/dist/manifests/interface-validation.js +228 -50
- package/dist/manifests/interface-validation.js.map +1 -1
- package/dist/manifests/manifest-template.d.ts +2 -0
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/manifests/types.cjs +1 -1
- package/dist/manifests/types.cjs.map +1 -1
- package/dist/manifests/types.d.ts +128 -0
- package/dist/manifests/types.js +35 -2
- package/dist/manifests/types.js.map +1 -1
- package/dist/mockServiceWorker.js +21 -9
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js +74 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/upstream-fork-sync/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +6 -4
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.js +126 -5
- package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +161 -53
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +112 -50
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.cjs.map +1 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.js +12 -1
- package/dist/node_modules/@tanstack/query-core/build/modern/utils.js.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs.map +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js +14 -12
- package/dist/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js.map +1 -1
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs +2 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.cjs.map +1 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js +177 -0
- package/dist/node_modules/html-parse-stringify/dist/esm/html-parse-stringify.js.map +1 -0
- package/dist/node_modules/i18next/dist/esm/i18next.cjs +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.cjs.map +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.js +31 -24
- package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
- package/dist/node_modules/posthog-js/dist/module.cjs +2 -2
- package/dist/node_modules/posthog-js/dist/module.cjs.map +1 -1
- package/dist/node_modules/posthog-js/dist/module.js +2055 -1929
- package/dist/node_modules/posthog-js/dist/module.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.cjs.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js +43 -62
- package/dist/node_modules/react-i18next/dist/es/TransWithoutContext.js.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.cjs.map +1 -1
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js +12 -6
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +352 -310
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +34 -33
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +3 -2
- package/dist/routes/app-settings.d.ts +2 -1
- package/dist/routes/browser-tab.d.ts +1 -1
- package/dist/routes/changes-tab.d.ts +2 -1
- package/dist/routes/commits-tab.d.ts +1 -1
- package/dist/routes/conversation.d.ts +2 -1
- package/dist/routes/files-tab.d.ts +1 -1
- package/dist/routes/llm-settings.d.ts +3 -2
- package/dist/routes/mcp.cjs +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.d.ts +2 -1
- package/dist/routes/mcp.js +1 -1
- package/dist/routes/mcp.js.map +1 -1
- package/dist/routes/planner-tab.d.ts +2 -1
- package/dist/routes/secrets-settings.d.ts +2 -1
- package/dist/routes/task-list-tab.d.ts +1 -1
- package/dist/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +3 -7
- package/dist/services/settings.js.map +1 -1
- package/dist/types/automation.d.ts +16 -1
- package/dist/types/mcp-auth.cjs.map +1 -1
- package/dist/types/mcp-auth.d.ts +5 -41
- package/dist/types/mcp-auth.js.map +1 -1
- package/dist/types/mcp-server.d.ts +17 -32
- package/dist/types/settings.d.ts +8 -28
- package/dist/ui/card-title.d.ts +1 -1
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/combobox-caret.d.ts +3 -3
- package/dist/ui/context-menu.cjs +1 -1
- package/dist/ui/context-menu.cjs.map +1 -1
- package/dist/ui/context-menu.d.ts +3 -2
- package/dist/ui/context-menu.js +10 -9
- package/dist/ui/context-menu.js.map +1 -1
- package/dist/ui/divider.d.ts +1 -1
- package/dist/ui/dropdown/clear-button.d.ts +1 -1
- package/dist/ui/dropdown/dropdown-input.d.ts +1 -1
- package/dist/ui/dropdown/dropdown-menu.d.ts +1 -1
- package/dist/ui/dropdown/dropdown.d.ts +1 -1
- package/dist/ui/dropdown/loading-spinner.d.ts +1 -1
- package/dist/ui/dropdown/toggle-button.d.ts +1 -1
- package/dist/ui/help-link.d.ts +1 -1
- package/dist/ui/pre.d.ts +1 -1
- package/dist/ui/toggle-switch.d.ts +2 -2
- package/dist/ui/typography.d.ts +7 -7
- package/dist/utils/automation-activity-log-export.d.ts +17 -0
- package/dist/utils/automation-timeout.d.ts +4 -6
- package/dist/utils/custom-toast-handlers.d.ts +2 -2
- package/dist/utils/format-relative-time.d.ts +3 -0
- package/dist/utils/mcp-config.cjs +1 -1
- package/dist/utils/mcp-config.cjs.map +1 -1
- package/dist/utils/mcp-config.d.ts +12 -29
- package/dist/utils/mcp-config.js +161 -143
- package/dist/utils/mcp-config.js.map +1 -1
- package/dist/utils/mcp-installed-servers.cjs +1 -1
- package/dist/utils/mcp-installed-servers.cjs.map +1 -1
- package/dist/utils/mcp-installed-servers.d.ts +2 -2
- package/dist/utils/mcp-installed-servers.js +21 -32
- package/dist/utils/mcp-installed-servers.js.map +1 -1
- package/dist/utils/mcp-server-health-key.cjs.map +1 -1
- package/dist/utils/mcp-server-health-key.d.ts +2 -4
- package/dist/utils/mcp-server-health-key.js.map +1 -1
- package/dist/utils/settings-like-page-layout-classes.cjs +1 -1
- package/dist/utils/settings-like-page-layout-classes.cjs.map +1 -1
- package/dist/utils/settings-like-page-layout-classes.d.ts +6 -2
- package/dist/utils/settings-like-page-layout-classes.js +1 -1
- package/dist/utils/settings-like-page-layout-classes.js.map +1 -1
- package/dist/utils/skill-category.d.ts +12 -0
- package/package.json +36 -33
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +2 -2
- package/scripts/dev-with-automation.mjs +3 -2
- package/build/assets/Trans-Bwpzk1wT.js +0 -1
- package/build/assets/active-backend-context-BiwzkzDy.js +0 -2
- package/build/assets/agent-context-settings-DXNT_dcw.js +0 -1
- package/build/assets/agent-server-conversation-service.api-CYSWw-2g.js +0 -41
- package/build/assets/agent-settings-BjgQQe-_.js +0 -1
- package/build/assets/alert-banner-DR8EVyZM.js +0 -1
- package/build/assets/api-error-message-e16L1kwH.js +0 -1
- package/build/assets/automation-detail-DY6x2FW1.js +0 -2
- package/build/assets/automation-export-C09f-Lua.js +0 -2
- package/build/assets/automation-setup-route-CqKp0717.js +0 -1
- package/build/assets/automations-list-CqWJ7qXW.js +0 -1
- package/build/assets/check-CPLXgluF.js +0 -1
- package/build/assets/chevron-down-CP4QHvyc.js +0 -1
- package/build/assets/circle-check-Dpy2_xSI.js +0 -1
- package/build/assets/command-menu-Bj6X4ckE.js +0 -1
- package/build/assets/condenser-settings-EAXQNR2E.js +0 -1
- package/build/assets/context-menu-list-item-CrCrYuPF.js +0 -1
- package/build/assets/conversation-BzyIcSwr.js +0 -1
- package/build/assets/conversation-panel-BzyIcSwr.js +0 -1
- package/build/assets/entry.client-BbIYOsIg.js +0 -2
- package/build/assets/enum-filter-dropdown-C08-srev.js +0 -1
- package/build/assets/files-tab-DEq8MbHu.js +0 -1
- package/build/assets/format-time-delta-CxfPJpzC.js +0 -1
- package/build/assets/git-repo-dropdown-9WKINV6J.js +0 -1
- package/build/assets/home-CY0JaxiY.js +0 -1
- package/build/assets/home-CaNWlVvB.js +0 -1
- package/build/assets/index-home-CaNWlVvB.js +0 -1
- package/build/assets/info-CmWQXtRQ.js +0 -1
- package/build/assets/install-server-modal-BWrudmZU.js +0 -1
- package/build/assets/llm-not-configured-banner-3tMsM4K6.js +0 -27
- package/build/assets/llm-settings-D0W8mJDk.js +0 -1
- package/build/assets/loader-circle-B4QDBARx.js +0 -1
- package/build/assets/manifest-39f4789d.js +0 -1
- package/build/assets/mcp-DXG9LWrI.js +0 -9
- package/build/assets/mcp-marketplace-utils-DFmhKc5s.js +0 -1
- package/build/assets/messages-kBjKaAeA.js +0 -40
- package/build/assets/navigation-link-Bxmn-pCs.js +0 -1
- package/build/assets/onboarding-47hh2IHA.js +0 -1
- package/build/assets/onboarding-modal-9BuvvROo.js +0 -1
- package/build/assets/plus-DrKuuvMe.js +0 -1
- package/build/assets/recommended-automations-launcher-ejxy1P27.js +0 -1
- package/build/assets/root-5S-M8SYa.js +0 -2
- package/build/assets/root-DZ39lS5f.css +0 -1
- package/build/assets/root-layout-BPqoa0gv.js +0 -3
- package/build/assets/search-Dc2qR4O2.js +0 -1
- package/build/assets/settings-Chfn5xTD.js +0 -1
- package/build/assets/settings-like-page-layout-classes-DyxyJ0k4.js +0 -1
- package/build/assets/settings-service.api-CZiPD8__.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-ND-hgygu.js +0 -1
- package/build/assets/skills-settings-B43KArIz.js +0 -2
- package/build/assets/use-is-authed-BT7Iud4U.js +0 -1
- package/build/assets/use-llm-profiles-2Wc2db8u.js +0 -1
- package/build/assets/use-save-agent-profile-D0wC5ExW.js +0 -1
- package/build/assets/use-skills-CE6miQ3r.js +0 -1
- package/build/assets/use-tracking-BGboadaZ.js +0 -68
- package/build/assets/useQuery-DiPh8LRJ.js +0 -1
- package/build/assets/utils-BgGG1znF.js +0 -1
- package/build/assets/v4-DDdyfk2q.js +0 -1
- package/build/assets/vendor~browser-IVYgIgG1.js +0 -47
- package/build/assets/vendor~entry.client-CXM9oiAk.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~d4by102p-C2f0ZhS-.js +0 -26
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~emdr2jt4-BrmgjeOw.js +0 -1
- package/build/assets/vendor~module-BZXjBMvd.js +0 -2
- package/build/assets/x-omAzpXkl.js +0 -1
- package/dist/components/features/skills/skill-type-filter.d.ts +0 -3
- package/dist/components/features/skills/skills-type-filter-dropdown.d.ts +0 -7
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs +0 -2
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.cjs.map +0 -1
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js +0 -81
- package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js.map +0 -1
- package/dist/node_modules/void-elements/index.cjs +0 -2
- package/dist/node_modules/void-elements/index.cjs.map +0 -1
- package/dist/node_modules/void-elements/index.js +0 -25
- package/dist/node_modules/void-elements/index.js.map +0 -1
- /package/build/assets/{vendor~root-layout~index-home~home~mcp~automations-list~automation-setup-route~onboarding-modal-D7IDevqN.js → vendor~root-layout~index-home~home~mcp~automations-list~automation-templates~automation-set~bxsimjx0-D7IDevqN.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~emdr2jt4-BrmgjeOw.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gy8zbn65-CGt6bWRT.js";import{A as a,g as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0bpqexo-CbTboogo.js";import{t as s}from"./useQuery-DiPh8LRJ.js";import{$ as c,Nt as l,X as u,ct as d,n as f,nt as p,pt as m}from"./active-backend-context-BiwzkzDy.js";import{E as h,t as g,z as _}from"./utils-BgGG1znF.js";import{c as v,r as y}from"./messages-kBjKaAeA.js";import{a as b,c as ee,i as x,l as S,n as C,o as w,r as T,s as E,t as D}from"./vendor~files-tab-C7RmQJwN.js";import{n as O,t as k}from"./format-time-delta-CxfPJpzC.js";import{r as A}from"./conversation-CUJ0Vo8g.js";import{i as j}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~dfc8ddxy-tTyxnjXT.js";import{t as M}from"./proxy-BBUG3sd2.js";import{c as N,f as P}from"./conversation-store-C6hSXHw0.js";import{t as te}from"./segmented-toggle-Do6oyepX.js";import{c as ne,u as re}from"./agent-server-conversation-service.api-CYSWw-2g.js";import{o as F}from"./home-store-Ch1ErdBc.js";import{r as ie}from"./typography-iYhzLlHO.js";import{d as I}from"./llm-not-configured-banner-3tMsM4K6.js";import{G as ae,J as oe,K as L,h as R,q as z,t as se,x as ce}from"./markdown-renderer-DgiLLhW6.js";import{t as le}from"./link-external-BDBCz-_z.js";import{n as ue,t as de}from"./highlighted-source-view-CX9oIoVT.js";import{t as B}from"./conversation-tab-empty-state-BCZ7rUMH.js";var V=e(t(),1),H=n();function fe(){let{t:e}=i(`openhands`);return(0,H.jsx)(B,{className:`h-full`,icon:(0,H.jsx)(O,{"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 M({backend:a,method:`POST`,hostOverride:p(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 j(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 M({backend:r,method:`GET`,hostOverride:p(e),path:`/api/file/download?path=${encodeURIComponent(n)}`,authMode:`session-api-key`,sessionApiKey:t,responseType:`blob`})).arrayBuffer():new o(c({conversationUrl:e,sessionApiKey:t})).downloadFile(n)}};function U(e){return e.startsWith(`/`)?e:`/${e}`}async function W(e,t,n,r){let i=d().backend;if(i.kind===`cloud`&&e){let a=new URLSearchParams({...r,path:U(r.path)});return M({backend:i,method:`GET`,hostOverride:p(e),path:`${n}?${a.toString()}`,authMode:`session-api-key`,sessionApiKey:t??void 0})}return(await new j(c({conversationUrl:e,sessionApiKey:t})).client.get(n,{params:r})).data}function me(e){return u(e,404)||a(e)&&e.response?.status===404}var G=class{static async getGitChanges(e,t,n,r){let i=d().backend;if(i.kind===`cloud`&&e){let t=new URLSearchParams;t.set(`path`,U(r));let n=await M({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:F(String(e.status)),path:e.path}))}let a=await new j(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:F(String(e.status)),path:e.path}))}static async getGitCommits(e,t,n,r=50){try{let i=await W(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 W(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:F(String(e.status)),path:e.path}))}static async getGitChangeDiff(e,t,n,r,i){if(i){let e=await W(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`,U(r));let n=await M({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 j(c({conversationUrl:t,sessionApiKey:n})).gitDiff(r);return{modified:o.modified??``,original:o.original??``,...o.diff?{diff:o.diff}:{}}}};function K(e,t){let n=t?.trim();if(n)return n;if(!e)return m;let r=e.split(`/`);return`${m}/${r[r.length-1]}`}var q=()=>{let{conversationId:e}=z(),{data:t}=L(),[n,r]=V.useState([]),i=V.useRef(null),a=A(),o=t?.conversation_url,c=t?.session_api_key,l=t?.selected_repository,u=t?.workspace?.working_dir?.trim(),d=V.useMemo(()=>K(l,u),[l,u]),f=s({queryKey:[`file_changes`,e,o,c,d],queryFn:async()=>{if(!e)throw Error(`No conversation ID`);return G.getGitChanges(e,o,c,d)},retry:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnMount:`always`,enabled:a&&!!e,meta:{disableToast:!0}});return V.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}},J=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 ${J}`}function _e(e){return e.startsWith(`./`)?e.slice(2):e}function ve(e){let{data:t}=L(),n=A(),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,J)},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=q(),n=(0,V.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,J)},[e,t.data]);return{data:e?n:void 0,isLoading:e?t.isLoading:!1}}function be(){let{backend:e}=f(),t=e.kind===`cloud`,n=ve(!t),r=ye(t);return t?r:n}function xe(){let{data:e}=L(),t=A(),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 j(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 Y=P(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 X(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}=L(),n=A(),{data:r}=xe(),i=Y(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=K(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,${X(t.buffer)}`,mimeType:`application/octet-stream`}:{path:e,kind:`text`,text:r,staticUrl:`data:${n};charset=utf-8;base64,${X(t.buffer)}`,mimeType:n}}return{path:e,kind:t,text:null,staticUrl:`data:${n};base64,${X(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}=L(),n=e?.id?re(e.id):null;return{hasAttachedSource:!!e?.selected_repository||!!n?.selected_workspace,isLoading:t}}function Me(e){let{data:t}=L(),n=A(),{backend:r}=f(),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=ce(e=>e.events),n=Y(e=>e.bump),i=(0,V.useRef)(new Set),a=(0,V.useRef)(new WeakSet);(0,V.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,V.useMemo)(()=>We(e),[e]);return(0,H.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,H.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,H.jsx)(S,{className:`w-3 h-3`,"aria-hidden":!0,strokeWidth:2})}),s.length>0&&(0,H.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,H.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=new Set([`md`,`markdown`,`mdx`]),Je={pptx:`PowerPoint`,ppt:`PowerPoint`,docx:`Word`,doc:`Word`,xlsx:`Excel`,xls:`Excel`};function Z(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function Q({path:e}){let{t}=i(`openhands`),n=Je[Z(e)];return(0,H.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=Y(e=>e.count);if(r.isLoading)return(0,H.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,H.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,H.jsx)(de,{path:e,text:s,mimeType:l??void 0}):(0,H.jsx)(Q,{path:e}):o===`image`?(0,H.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,H.jsx)(`img`,{src:u,alt:e,className:`max-h-full max-w-full object-contain`})}):o===`pdf`?(0,H.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,H.jsx)(Q,{path:e}):l===`text/html`||Ke.has(Z(e))?(0,H.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`&&qe.has(Z(e))?(0,H.jsx)(`div`,{"data-testid":`file-content-viewer-markdown`,className:`h-full w-full overflow-auto bg-[var(--oh-surface)] text-white custom-scrollbar-always`,children:(0,H.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,H.jsx)(se,{content:s??``,includeStandard:!0,includeHeadings:!0})})}):o===`text`&&s!==null?(0,H.jsx)(de,{path:e,text:s,mimeType:l??void 0}):(0,H.jsx)(Q,{path:e})}var Xe=e=>(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 13 15`,fill:`none`,...e,children:(0,H.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}=L(),n=A(),r=t?.conversation_url,i=t?.session_api_key,a=t?.selected_repository,o=t?.workspace?.working_dir?.trim(),c=V.useMemo(()=>K(a,o),[a,o]),l=s({queryKey:[`git_commits`,e,r,i,c],queryFn:async()=>{if(!e)throw Error(`No conversation ID`);return G.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,H.jsx)(`svg`,{width:13,height:8,viewBox:`0 0 13 8`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,H.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}=L(),r=n?.conversation_url,i=n?.session_api_key,a=n?.selected_repository,o=n?.workspace?.working_dir?.trim(),c=V.useMemo(()=>`${K(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 G.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,H.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,H.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,H.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:w},{mode:`diff`,icon:b},{mode:`new`,icon:D}],rt={renderValidationDecorations:`off`,readOnly:!0,scrollBeyondLastLine:!1,minimap:{enabled:!1},automaticLayout:!0,scrollbar:{alwaysConsumeMouseWheel:!1}},it={A:x,D:T,M:C,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]=V.useState(!0),[s,c]=V.useState(400),[l,u]=V.useState(`diff`),d=V.useRef(null),f=V.useRef(null),p=t===`A`||t===`U`,m=t===`D`,h=V.useMemo(()=>{if(t===`R`){let t=e.split(/\s+/).slice(1);return t[t.length-1]}return e},[e,t]),{data:v,isLoading:b,isSuccess:x,isRefetching:S}=$e({filePath:h,type:t,enabled:!a,commit:n}),C=V.useCallback(()=>{if(!d.current)return;let e=d.current.getOriginalEditor(),t=d.current.getModifiedEditor();e&&t&&c(Math.max(e.getContentHeight(),t.getContentHeight())+20)},[]),w=V.useCallback(()=>{f.current&&c(f.current.getContentHeight()+20)},[]),T=e=>{d.current=e,C(),e.getOriginalEditor().onDidContentSizeChange(C),e.getModifiedEditor().onDidContentSizeChange(C)},D=e=>{f.current=e,w(),e.onDidContentSizeChange(w)},O=(t===`U`?it.A:it[t])||`?`,k=typeof O==`string`?(0,H.jsx)(ie.Text,{children:O}):V.createElement(O,{className:`w-5 h-5`}),A=b||S,j=y(h),M=j===`markdown`,N=l===`old`?v?.original??``:v?.modified??``;return(0,H.jsxs)(`div`,{"data-testid":`file-diff-viewer-outer`,className:`w-full flex flex-col`,children:[(0,H.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,H.jsxs)(`span`,{className:`text-sm w-full text-content flex items-center gap-2`,children:[A?(0,H.jsx)(et,{className:`w-4 h-4`}):k,(0,H.jsx)(`strong`,{className:`w-full truncate font-medium`,children:h}),!a&&!m&&(0,H.jsx)(`span`,{className:`flex items-center gap-0.5 shrink-0`,onClick:e=>e.stopPropagation(),children:nt.map(({mode:e,icon:t})=>(0,H.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,H.jsx)(t,{className:`w-4 h-4`})},e))}),(0,H.jsx)(`button`,{"data-testid":`collapse`,type:`button`,children:(0,H.jsx)(Qe,{className:g(`w-4 h-4 transition-transform`,a&&`transform rotate-180`)})})]})}),!a&&m&&!n&&(0,H.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,H.jsx)(tt,{height:s,children:(0,H.jsx)(ee,{"data-testid":`file-diff-viewer`,className:`w-full h-full`,language:j,original:p?``:v?.original??``,modified:m?``:v?.modified??``,theme:`custom-diff-theme`,onMount:T,beforeMount:at,options:{...rt,renderSideBySide:!p&&!m,hideUnchangedRegions:{enabled:!0}}})}):M?(0,H.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,H.jsx)(se,{content:N,includeStandard:!0,includeHeadings:!0})}):(0,H.jsx)(tt,{height:s,children:(0,H.jsx)(E,{"data-testid":`file-single-viewer`,className:`w-full h-full`,language:j,value:N,theme:`custom-diff-theme`,beforeMount:at,onMount:D,options:rt})}))]})}function $(){return(0,H.jsx)(C,{"aria-hidden":!0,className:`size-full`})}function st(){let{t:e}=i(`openhands`);return(0,H.jsx)(B,{icon:(0,H.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]=V.useState(lt());return V.useEffect(()=>{n(lt())},[]),(0,H.jsx)(`div`,{className:`w-full bg-tertiary p-4 text-left`,children:(0,H.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,H.jsx)(v,{className:`mt-0.5 h-4 w-4 shrink-0 fill-[var(--oh-muted)]`,"aria-hidden":!0}),(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h4`,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)]`,children:e(_.TIPS$PROTIP)}),(0,H.jsxs)(`p`,{className:`text-sm font-normal leading-5 text-[var(--oh-muted)]`,children:[e(t.key),t.link?(0,H.jsxs)(H.Fragment,{children:[` `,(0,H.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,H.jsx)(I,{testId:`changes-tab-status`,messageKey:e[0]}):(0,H.jsx)(B,{icon:(0,H.jsx)($,{}),children:e.map(e=>(0,H.jsx)(`span`,{className:`block`,children:t(e)},e))})}function mt(){let{data:e,isSuccess:t,isError:n,error:r,isLoading:i}=q(),[a,o]=V.useState(null),{curAgentState:s}=ae(),c=!h.includes(s),u=r&&dt.test(l(r));return V.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,H.jsx)(`main`,{className:`h-full w-full flex flex-col items-stretch`,children:!t||!e.length?(0,H.jsxs)(`div`,{className:`flex flex-col h-full w-full`,children:[(0,H.jsxs)(`div`,{className:`flex-1 flex items-center justify-center`,children:[a&&(0,H.jsx)(pt,{messages:a}),!a&&t&&e.length===0&&(0,H.jsx)(st,{})]}),!n&&t&&e.length===0&&(0,H.jsx)(ut,{})]}):(0,H.jsx)(`div`,{className:`h-full overflow-y-auto flex flex-col items-stretch custom-scrollbar-always`,children:e.slice(0,100).map(e=>(0,H.jsx)(ot,{path:e.path,type:e.status},e.path))})})}var ht=(e,t)=>{let{conversationId:n}=z(),{data:r}=L(),i=A(),a=r?.conversation_url,o=r?.session_api_key,c=r?.selected_repository,l=r?.workspace?.working_dir?.trim(),u=V.useMemo(()=>K(c,l),[c,l]);return s({queryKey:[`commit_changes`,n,a,o,u,e],queryFn:async()=>{if(!n)throw Error(`No conversation ID`);return G.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,H.jsxs)(`div`,{"data-testid":`commit-row`,className:`w-full flex flex-col`,children:[(0,H.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,H.jsx)(`code`,{className:`font-mono text-xs text-[var(--oh-muted)] flex-shrink-0`,children:e.shortSha}),(0,H.jsx)(`strong`,{className:`flex-1 truncate font-medium`,children:e.subject}),t&&(0,H.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate max-w-32 flex-shrink-0`,children:e.author}),(0,H.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] flex-shrink-0`,children:`${k(e.timestamp)} ${a(_.CONVERSATION$AGO)}`}),(0,H.jsx)(Qe,{className:g(`w-4 h-4 transition-transform flex-shrink-0`,!n&&`transform rotate-180`)})]}),n&&(0,H.jsxs)(`div`,{"data-testid":`commit-row-content`,className:`w-full flex flex-col pl-6`,children:[s&&(0,H.jsx)(`div`,{className:`p-3`,children:(0,H.jsx)(et,{className:`w-4 h-4`})}),c&&o?.map(t=>(0,H.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]=V.useState(null),o=new Set(e.map(e=>e.author)).size>1;return(0,H.jsxs)(`section`,{"data-testid":`commit-list`,className:`w-full flex flex-col`,children:[e.map(e=>(0,H.jsx)(gt,{commit:e,showAuthor:o,isExpanded:r===e.sha,onToggle:()=>a(t=>t===e.sha?null:e.sha)},e.sha)),t&&(0,H.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}=ae(),l=!h.includes(c);return(0,H.jsx)(`main`,{className:`h-full w-full flex flex-col items-stretch`,children:s&&!a&&n.length>0?(0,H.jsx)(`div`,{className:`h-full overflow-y-auto flex flex-col items-stretch custom-scrollbar-always`,children:(0,H.jsx)(_t,{commits:n,hasMore:r},t)}):(0,H.jsxs)(`div`,{className:`flex-1 flex items-center justify-center`,children:[!l&&(0,H.jsx)(I,{testId:`commits-tab-status`,messageKey:_.DIFF_VIEWER$WAITING_FOR_RUNTIME}),l&&o&&(0,H.jsx)(I,{testId:`commits-tab-status`,messageKey:_.DIFF_VIEWER$LOADING}),l&&!o&&(0,H.jsx)(B,{icon:(0,H.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}=N(o??``),u=(t||n)&&a!==!1,d=s.filesTabDiffView??u,f=s.filesTabContentViewMode,{isSuccess:p,isUnsupported:m}=Ze(),h=p&&!m,[g,v]=(0,V.useState)(!1),y=d?`on`:`off`;g&&h&&(y=`commits`);let[b,ee]=(0,V.useState)(!1),x=be(),S=(0,V.useMemo)(()=>x.data??[],[x.data]),C=R(e=>e.selectedPath),w=R(e=>e.selectedConversationId),T=R(e=>e.setSelectedPath),E=w===o?C:null,D=(0,V.useCallback)(e=>T(e,o),[o,T]),O=Ae(E),k=Y(e=>e.count),A=Ce(O.data?.staticUrl??null,k);(0,V.useEffect)(()=>{w!==o&&T(null,o)},[w,o,T]),(0,V.useEffect)(()=>{if(E||S.length===0)return;let[e]=We(S);e&&T(e,o)},[S,E,o,T]);let j=r(),{refetch:M,isFetching:P}=q(),ne=()=>{M(),j.invalidateQueries({queryKey:[`workspace-files`]}),j.invalidateQueries({queryKey:[`workspace-file-content`]}),j.invalidateQueries({queryKey:[`git_commits`]})};return(0,H.jsxs)(`main`,{className:`h-full w-full flex flex-col items-stretch`,"data-testid":`files-tab`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-1.5 border-b border-[var(--oh-border)]`,children:[(0,H.jsx)(te,{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,H.jsx)(te,{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,H.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[y===`off`&&A&&(0,H.jsx)(`a`,{href:A,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,H.jsx)(le,{width:14,height:14})}),(0,H.jsx)(`button`,{type:`button`,onClick:ne,disabled:P,"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,H.jsx)(Xe,{width:12.75,height:15,color:`#ffffff`,className:P?`animate-spin`:``})})]})]}),y===`on`&&(0,H.jsx)(`div`,{className:`flex-1 min-h-0`,children:(0,H.jsx)(mt,{})}),y===`commits`&&(0,H.jsx)(`div`,{className:`flex-1 min-h-0`,children:(0,H.jsx)(vt,{})}),y===`off`&&(0,H.jsx)(`div`,{className:`flex flex-1 flex-col min-h-0`,children:x.isLoading?(0,H.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-sm text-[var(--oh-muted)]`,children:e(_.FILES$LOADING_FILES)}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Ge,{paths:S,selectedPath:E,onSelectFile:D,isTreeVisible:b,onToggleTree:()=>ee(e=>!e)}),(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1`,children:[b&&(0,H.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,H.jsx)(ue,{paths:S,selectedPath:E,onSelectFile:D})}),(0,H.jsx)(`section`,{className:`flex h-full min-h-0 min-w-0 flex-1 flex-col`,"data-testid":`files-tab-content`,children:E?(0,H.jsx)(Ye,{path:E,viewMode:f}):(0,H.jsx)(fe,{})})]})]})})]})}export{yt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0bpqexo-CbTboogo.js";var t=e(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]),n=e=>e.includes(`Z`)||e.match(/[+-]\d{2}:\d{2}$/)!==null?new Date(e):new Date(`${e}Z`),r=e=>{let t=typeof e==`string`?n(e):e,r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),a=Math.floor(i/60),o=Math.floor(a/60),s=Math.floor(o/24),c=Math.floor(s/30),l=Math.floor(c/12);return i<60?`${i}s`:a<60?`${a}m`:o<24?`${o}h`:s<30?`${s}d`:c<12?`${c}mo`:`${l}y`};export{t as n,r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./git-repo-dropdown-DEpOwUez.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{I as r,W as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~d4by102p-C2f0ZhS-.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gy8zbn65-CGt6bWRT.js";import{w as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0bpqexo-CbTboogo.js";import{t as s}from"./use-is-creating-conversation-CAggrM75.js";import{Ot as c,kt as l,n as u}from"./active-backend-context-BiwzkzDy.js";import{t as d,z as f}from"./utils-BgGG1znF.js";import{t as p}from"./chevron-down-CP4QHvyc.js";import{a as m,c as h,d as g,f as _,i as v,l as y,n as b,o as x,p as S,r as C,s as w,t as T,u as E}from"./onboarding-47hh2IHA.js";import{t as D}from"./search-Dc2qR4O2.js";import{t as O}from"./x-omAzpXkl.js";import{t as k}from"./modal-backdrop-X-vKo61e.js";import{n as A,r as j,t as M}from"./modal-body-CMsDpalT.js";import{r as N}from"./base-modal-BBuy0WQQ.js";import{_ as P,i as F,m as I,s as L}from"./form-control-classes-DAfsCJTe.js";import{t as R}from"./brand-button-DGN6Y9o6.js";import{n as z}from"./navigation-context-BOGzIng3.js";import{t as B}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-B_L-gcOG.js";import{t as V}from"./styled-tooltip-C7grwnOX.js";import{i as H,n as U,o as W,u as G}from"./dropdown-classes-BB8rzqXL.js";import{t as K}from"./conversation-store-C6hSXHw0.js";import{t as q}from"./modal-close-button-DyxBZaAb.js";import{i as J}from"./conversation-state-store-F62HvuI1.js";import{n as ee}from"./use-create-conversation-nOJ6Um5h.js";import{c as te,s as ne,t as re}from"./home-store-Ch1ErdBc.js";import{t as ie}from"./folder-C86qXV7M.js";import{r as Y}from"./typography-iYhzLlHO.js";import{i as ae,n as oe,t as se}from"./extension-module-card-classes-Bo43vY5V.js";import{n as ce}from"./circle-plus-check-toggle-yTAS-nX3.js";import{F as le,I as ue,N as de,R as fe,T as pe,a as me,c as he,i as ge,l as _e,n as ve,o as ye,r as be,s as xe,t as Se,z as Ce}from"./llm-not-configured-banner-3tMsM4K6.js";import{y as we}from"./markdown-renderer-DgiLLhW6.js";import{t as Te}from"./use-plugins-marketplace-CVO7sXYR.js";import{a as Ee,i as De,o as Oe,r as ke,s as Ae,t as je}from"./git-repo-dropdown-DEpOwUez.js";import"./git-repo-dropdown-9WKINV6J.js";var X=e(t(),1);async function Me(e){let{imagesToEmbed:t}=Ce(e.images,e.imagesMarkedUploadAsFile),n=await Promise.all(t.map(e=>le(e)));we.getState().enqueuePendingMessage({conversationId:e.conversationId,text:e.text,content:e.text,imageUrls:n,fileUrls:[]})}var Z=n();function Ne({plugin:e,isSelected:t,isDisabled:n=!1,onToggle:r}){return(0,Z.jsxs)(`div`,{"data-testid":`plugin-picker-card-${e.name}`,className:d(`flex min-w-0 items-start justify-between gap-3 rounded-lg bg-tertiary p-4`),children:[(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsx)(`h3`,{"data-testid":`plugin-picker-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),(0,Z.jsx)(`p`,{className:`mt-0.5 min-w-0 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),e.description?(0,Z.jsx)(`p`,{className:`mt-1 line-clamp-2 text-xs text-tertiary-light`,children:e.description}):null,e.repo_path||e.ref?(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[e.repo_path?(0,Z.jsx)(`span`,{className:ae,children:e.repo_path}):null,e.ref?(0,Z.jsxs)(`span`,{className:ae,children:[`@`,e.ref]}):null]}):null]}),(0,Z.jsx)(ce,{testId:`plugin-picker-toggle-${e.name}`,isSelected:t,isDisabled:n,onToggle:r,enableLabelKey:f.BUTTON$ADD,disableLabelKey:f.COMMON$REMOVE,enableTooltipKey:f.BUTTON$ADD,disableTooltipKey:f.COMMON$REMOVE})]})}function Q(e){return[e.source,e.ref??``,e.repo_path??``].join(`\0`)}function Pe(e){return{source:e.source,ref:e.ref??null,repo_path:e.repo_path??null}}function Fe(e,t){let n=Q(t);return e.some(e=>Q(e)===n)}function Ie(e,t){let n=Q(t);return e.some(e=>Q(e)===n)?e.filter(e=>Q(e)!==n):[...e,Pe(t)]}function Le(e,t){let n=t.trim().toLowerCase();return n?[e.name,e.description,e.source,e.repo_path,e.ref].filter(e=>typeof e==`string`&&e.length>0).some(e=>e.toLowerCase().includes(n)):!0}function Re({selected:e,onChange:t,disabled:n=!1}){let{t:r}=a(`openhands`),{data:i,isLoading:o,isError:s}=Te(),[c,l]=(0,X.useState)(``),u=(i??[]).filter(e=>Le(e,c));return(0,Z.jsxs)(`div`,{"data-testid":`plugin-picker`,className:`flex w-full flex-col gap-3`,children:[(0,Z.jsxs)(`div`,{className:d(`relative flex min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`transition-colors focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`),children:[(0,Z.jsx)(D,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,Z.jsx)(`input`,{"data-testid":`plugin-picker-search-input`,type:`search`,value:c,onChange:e=>l(e.target.value),placeholder:r(f.PLUGINS$PICKER_SEARCH_PLACEHOLDER),"aria-label":r(f.PLUGINS$PICKER_SEARCH_PLACEHOLDER),className:d(`min-w-0 flex-1 border-0 bg-transparent outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),c?(0,Z.jsx)(`button`,{type:`button`,onClick:()=>l(``),"aria-label":r(f.MCP$SEARCH_CLEAR),className:`mr-2 cursor-pointer rounded p-1 text-tertiary-alt hover:text-white`,children:(0,Z.jsx)(O,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),o?(0,Z.jsx)(`p`,{"data-testid":`plugin-picker-loading`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(f.PLUGINS$PICKER_LOADING)}):s?(0,Z.jsx)(`p`,{"data-testid":`plugin-picker-error`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(f.PLUGINS$PICKER_ERROR)}):u.length===0?(0,Z.jsx)(`p`,{"data-testid":`plugin-picker-empty`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(f.PLUGINS$PICKER_EMPTY)}):(0,Z.jsx)(`div`,{className:oe,children:(0,Z.jsx)(`div`,{className:se,children:u.map(r=>(0,Z.jsx)(Ne,{plugin:r,isSelected:Fe(e,r),isDisabled:n,onToggle:()=>t(Ie(e,r))},`${r.source} ${r.ref??``} ${r.repo_path??``} ${r.name}`))})})]})}function ze({selected:e,onChange:t,onClose:n}){let{t:r}=a(`openhands`);return(0,Z.jsx)(k,{onClose:n,children:(0,Z.jsxs)(`div`,{"data-testid":`plugin-picker-modal`,className:d(`relative flex max-h-[80vh] flex-col gap-4 rounded-xl border border-[var(--oh-border)] bg-base-secondary p-6`,j(`lg`),M),children:[(0,Z.jsx)(q,{onClose:n,testId:`plugin-picker-close`}),(0,Z.jsxs)(`div`,{className:`pr-6`,children:[(0,Z.jsx)(Y.H2,{children:r(f.PLUGINS$PICKER_TITLE)}),(0,Z.jsx)(Y.Text,{className:`mt-1 block text-sm text-tertiary-light`,children:r(f.PLUGINS$PICKER_SUBTITLE)})]}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:(0,Z.jsx)(Re,{selected:e,onChange:t})}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between border-t border-[var(--oh-border-subtle)] pt-4`,children:[(0,Z.jsx)(Y.Text,{className:`text-sm text-tertiary-light`,children:r(f.PLUGINS$PICKER_SELECTED_COUNT,{count:e.length})}),(0,Z.jsx)(R,{testId:`plugin-picker-done`,type:`button`,variant:`primary`,onClick:n,className:`px-4`,children:r(f.PLUGINS$PICKER_DONE)})]})]})})}function Be({count:e,onClick:t,disabled:n=!1}){let{t:r}=a(`openhands`);return(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`open-plugin-picker`,onClick:t,disabled:n,className:d(`flex flex-row items-center gap-2 rounded-full px-2.5 py-1 text-white`,F,I,P,n?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-surface-raised`),children:[(0,Z.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center`,children:(0,Z.jsx)(pe,{width:16,height:16,className:`shrink-0`,"aria-hidden":!0})}),(0,Z.jsx)(`span`,{className:`text-sm font-normal leading-5`,children:r(f.PLUGINS$PICKER_TRIGGER)}),e>0?(0,Z.jsx)(`span`,{"data-testid":`plugin-picker-count`,className:`inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white px-1 text-[11px] font-semibold leading-none text-black`,children:e}):null]})}function Ve(){let{t:e}=a(`openhands`);return(0,Z.jsx)(`div`,{className:`flex min-h-[80px] w-full items-center justify-center py-2`,children:(0,Z.jsx)(Y.H1,{className:`w-full text-center leading-normal`,children:e(f.HOME$LETS_START_BUILDING)})})}function He({kind:e,onClick:t,disabled:n=!1,disabledTooltip:r}){let{t:i}=a(`openhands`),o=e===`local`,s=i(o?f.HOME$OPEN_WORKSPACE:f.COMMON$OPEN_REPOSITORY),c=(0,Z.jsxs)(`button`,{type:`button`,"data-testid":o?`open-workspace-button`:`open-repository-button`,onClick:t,disabled:n,className:d(`flex flex-row items-center gap-2 rounded-full px-2.5 py-1 text-white`,F,I,P,n?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-surface-raised`),children:[(0,Z.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center`,children:o?(0,Z.jsx)(S,{"aria-hidden":!0,className:`h-4 w-4`,strokeWidth:2}):(0,Z.jsx)(J,{width:16,height:16,className:`shrink-0`})}),(0,Z.jsx)(`span`,{className:`text-sm font-normal leading-5`,children:s})]});return r?(0,Z.jsx)(V,{content:r,placement:`top`,children:(0,Z.jsx)(`span`,{className:`inline-flex`,children:c})}):c}var $=`__ungrouped__`;function Ue({workspaces:e,parents:t=[],value:n,placeholder:r,className:i,disabled:o=!1,disabledTooltip:s,showManage:c,onChange:l,onAddClick:u,onManageClick:p}){let{t:m}=a(`openhands`),[h,g]=(0,X.useState)(n?.name??``),_=(0,X.useRef)(null),v=(0,X.useMemo)(()=>{let t=h.trim().toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t)):e},[e,h]),y=(0,X.useCallback)(e=>e.parentPath??$,[]),b=(0,X.useMemo)(()=>{let e=new Map;return t.forEach(t=>e.set(t.path,t.name)),e},[t]),{groupedWorkspaces:x,isGrouped:S,headerByFirstIndex:C,groupLabelByIndex:w}=(0,X.useMemo)(()=>{let e=[],t=new Map;v.forEach(n=>{let r=y(n);t.has(r)||(t.set(r,[]),e.push(r)),t.get(r)?.push(n)}),e.sort((e,t)=>e===$?1:t===$?-1:0);let n=e.length>1,r=[],i=new Map,a=new Map;return e.forEach(e=>{let o=e===$?m(f.HOME$WORKSPACE_GROUP_OTHER):b.get(e)||e.split(`/`).filter(Boolean).pop()||e;n&&i.set(r.length,o),(t.get(e)??[]).forEach(e=>{a.set(r.length,o),r.push(e)})}),{groupedWorkspaces:r,isGrouped:n,headerByFirstIndex:i,groupLabelByIndex:a}},[v,y,b,m]),T=(0,X.useCallback)(e=>{l(e),e&&g(e.name)},[l]),E=(0,X.useCallback)(()=>{T(null),g(``)},[T]),{isOpen:D,getToggleButtonProps:O,getMenuProps:k,getInputProps:A,highlightedIndex:j,getItemProps:M,selectedItem:N,closeMenu:P}=B({items:x,itemToString:e=>e?.name??``,selectedItem:n,onSelectedItemChange:({selectedItem:e})=>{T(e??null)},inputValue:h,onIsOpenChange:({isOpen:e,selectedItem:t})=>{g(e?``:t?.name??``)},stateReducer:(e,t)=>t.type===B.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes}),F=(e,t,n,r,i)=>(0,Z.jsx)(Ee,{item:e,index:t,isSelected:r?.id===e.id,getItemProps:i,getDisplayText:e=>e.name,getItemKey:e=>e.id,ariaLabel:S?`${w.get(t)??``}, ${e.name}`.trim():void 0},e.id),I=e=>(0,Z.jsx)(De,{inputValue:e,searchMessage:m(f.HOME$NO_WORKSPACES),emptyMessage:m(f.HOME$NO_WORKSPACES),testId:`workspace-dropdown-empty`}),R=(0,X.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),z=(0,X.useCallback)(e=>{R(e),P(),u()},[P,u,R]),W=(0,X.useCallback)(e=>{R(e),P(),u()},[P,u,R]),G=(0,X.useCallback)(e=>{R(e),P(),p()},[P,p,R]),K=(0,X.useCallback)(e=>{R(e),P(),p()},[P,p,R]),q=(0,X.useMemo)(()=>(0,Z.jsxs)(`div`,{className:H,children:[(0,Z.jsx)(`button`,{type:`button`,"data-testid":`add-workspaces-button`,className:d(U,`cursor-pointer`),onMouseDown:R,onTouchStart:R,onTouchEnd:W,onClick:z,children:m(f.HOME$ADD_WORKSPACES)}),(c??e.length>0)&&(0,Z.jsx)(`button`,{type:`button`,"data-testid":`manage-workspaces-button`,className:d(U,`cursor-pointer`),onMouseDown:R,onTouchStart:R,onTouchEnd:K,onClick:G,children:m(f.HOME$MANAGE_WORKSPACES)})]}),[z,W,G,K,R,m,e.length,c]),J=(0,Z.jsxs)(`div`,{className:d(`relative`,i),children:[(0,Z.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[(0,Z.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:(0,Z.jsx)(te,{width:16,height:16})}),(0,Z.jsx)(`input`,{...A({disabled:o,placeholder:D&&n?n.name:r??m(f.HOME$WORKSPACE_PLACEHOLDER),className:d(L,`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":`workspace-dropdown`}),(0,Z.jsxs)(`div`,{className:`absolute right-1 top-1/2 transform -translate-y-1/2 flex items-center`,children:[n&&(0,Z.jsx)(Ae,{disabled:o,onClear:E}),(0,Z.jsx)(Oe,{isOpen:D,disabled:o,getToggleButtonProps:O})]})]}),(0,Z.jsx)(ke,{isOpen:D,filteredItems:x,inputValue:h,highlightedIndex:j,selectedItem:N,getMenuProps:k,getItemProps:M,menuRef:_,renderItem:F,renderItemPrefix:S?(e,t)=>{let n=C.get(t);return n?(0,Z.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,"data-testid":`workspace-group-header`,className:`px-2 pt-2 pb-1 text-xs font-medium text-[var(--oh-muted)] select-none`,children:n}):null}:void 0,renderEmptyState:I,stickyFooterItem:q,testId:`workspace-dropdown-menu`,itemKey:e=>e.id})]});return s?(0,Z.jsx)(V,{content:s,placement:`top`,children:(0,Z.jsx)(`span`,{className:`block`,children:J})}):J}var We=`oh:home-selected-workspace-path`;function Ge(){if(typeof window>`u`)return null;try{let e=window.sessionStorage.getItem(We);return e&&e.length>0?e:null}catch{return null}}function Ke(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem(We,e):window.sessionStorage.removeItem(We)}catch{}}function qe({isLoadingSettings:e=!1,onConfirm:t}){let{t:n}=a(`openhands`),{navigate:r}=z(),{data:i,error:o}=w(),c=i?.workspaceParents??[],{mutate:l}=y(),{mutate:u}=E(),{mutate:d}=h(),{mutate:p}=g(),{workspaces:_,parents:b,isLoading:S,isError:T,error:D}=x(),O=m(o??D,n),[k,A]=X.useState(null),[j,M]=X.useState(!1),[N,P]=X.useState(!1),{mutate:F,isPending:I,isSuccess:L}=ee(),B=s(),V=I||L||B,H=X.useCallback(e=>{A(e),Ke(e?.path??null)},[]);X.useEffect(()=>{let e=Ge();if(!e)return;let t=_.find(t=>t.path===e);if(t){A(e=>e?.path===t.path?e:t);return}!S&&!T&&!O&&(Ke(null),A(t=>t?.path===e?null:t))},[T,S,_,O]);let U=c.length>0||!!O,W=null;O?W=O:S?W=n(f.HOME$LOADING):T&&(W=n(f.HOME$WORKSPACE_SCAN_ERROR));let G=!!O||e||S&&_.length===0;return(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[!t&&(0,Z.jsxs)(`div`,{className:`flex items-center gap-[10px] pb-4`,children:[(0,Z.jsx)(ie,{width:24,height:24}),(0,Z.jsx)(`span`,{className:`leading-5 font-bold text-base text-white`,children:n(f.HOME$WORKSPACES_TAB)})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-[10px] pb-4`,children:[(0,Z.jsx)(Ue,{workspaces:_,parents:b,value:k,placeholder:O?n(f.HOME$WORKSPACES_UNSUPPORTED_PLACEHOLDER):G?n(f.HOME$LOADING):void 0,disabled:G,disabledTooltip:O,showManage:_.length>0||c.length>0,onChange:H,onAddClick:()=>M(!0),onManageClick:()=>P(!0),className:`max-w-auto`},k?.path??`empty-workspace-selection`),U&&W&&(0,Z.jsx)(`p`,{className:`px-1 text-xs text-[var(--oh-text-secondary)]`,"data-testid":`workspace-status-message`,children:W})]}),(0,Z.jsx)(R,{testId:`workspace-launch-button`,variant:`primary`,type:`button`,isDisabled:!k||!t&&V||e,onClick:()=>{if(k){if(t){t(k);return}F({workingDir:k.path,entryPoint:`home_workspace_form`},{onSuccess:e=>r(`/conversations/${e.conversation_id}`)})}},className:t?`w-full`:`w-auto absolute bottom-5 left-5 right-5`,children:n(t?f.BUTTON$CONFIRM:V?f.HOME$LOADING:f.BUTTON$LAUNCH)}),(0,Z.jsx)(v,{isOpen:j,onClose:()=>M(!1),onAdd:e=>{let t=e[e.length-1];l(e,{onSuccess:()=>{t&&H(t)}})},onAddParent:e=>d(e)}),(0,Z.jsx)(C,{isOpen:N,workspaces:_,workspaceParents:c,onClose:()=>P(!1),onRemove:e=>{k?.path===e&&H(null),u(e)},onRemoveParent:e=>{k?.parentPath===e&&H(null),p(e)}})]})}function Je({isOpen:e,onClose:t,onConfirm:n}){let{t:r}=a(`openhands`),{isLoadingSettings:i}=ne();return e?(0,Z.jsx)(k,{onClose:t,children:(0,Z.jsxs)(A,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,Z.jsx)(q,{onClose:t,testId:`close-open-workspace-dialog`}),(0,Z.jsx)(`div`,{className:`w-full pr-6`,children:(0,Z.jsx)(N,{title:r(f.HOME$OPEN_WORKSPACE)})}),(0,Z.jsx)(`div`,{className:`w-full`,"data-testid":`open-workspace-dialog-body`,children:(0,Z.jsx)(qe,{isLoadingSettings:i,onConfirm:e=>{n(e),t()}})})]})}):null}function Ye({onRepoSelection:e,isLoadingSettings:t=!1,onConfirm:n}){let{navigate:r}=z(),[i,o]=X.useState(null),[c,l]=X.useState(null),[u,d]=X.useState(null),{providers:p}=ne(),{addRecentRepository:m,setLastSelectedProvider:h,getLastSelectedProvider:g}=re(),{mutate:_,isPending:v,isSuccess:y}=ee(),b=s(),{t:x}=a(`openhands`);X.useEffect(()=>{if(p.length!==0){if(p.length===1&&!u){d(p[0]);return}if(p.length>1&&!u){let e=g();e&&p.includes(e)&&d(e)}}},[p,u,g]);let S=v||y||b,C=t=>{t!==u&&(d(t),h(t),o(null),l(null),e?.(null))},w=X.useCallback(e=>{l(e)},[]);return(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[!n&&(0,Z.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,Z.jsxs)(`div`,{className:`flex items-center gap-[10px] pb-4`,children:[(0,Z.jsx)(J,{width:24,height:24}),(0,Z.jsx)(`span`,{className:`leading-5 font-bold text-base text-white`,children:x(f.COMMON$OPEN_REPOSITORY)})]})}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-[10px] pb-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(`span`,{className:`text-sm text-white font-normal leading-[22px]`,children:x(f.HOME$SELECT_OR_INSERT_URL)}),p.length<=1?null:(0,Z.jsx)(me,{providers:p,value:u,className:`max-w-[500px]`,onChange:C,disabled:t})]}),(0,Z.jsx)(je,{provider:u||p[0],value:i?.id||null,repositoryName:i?.full_name||null,placeholder:`user/repo`,disabled:!u||t,onChange:t=>{t?(e?.(t),o(t)):(e?.(null),o(null),l(null))},className:`max-w-auto`}),(()=>{let e=i?.main_branch||null;return(0,Z.jsx)(ge,{repository:i?.full_name||null,provider:u||p[0],selectedBranch:c,onBranchSelect:w,defaultBranch:e,className:`max-w-full`,disabled:!i||t})})()]}),(0,Z.jsx)(R,{testId:`repo-launch-button`,variant:`primary`,type:`button`,isDisabled:!i||!c||!n&&S||p.length>1&&!u||t,onClick:()=>{if(!(!i||!c)){if(m(i),n){n({repository:i,branch:c,provider:u});return}_({repository:{name:i.full_name||``,gitProvider:i.git_provider||`github`,branch:c.name||`main`},entryPoint:`home_repo_form`},{onSuccess:e=>r(`/conversations/${e.conversation_id}`)})}},className:`w-full`,children:x(n?f.BUTTON$CONFIRM:S?f.HOME$LOADING:f.BUTTON$LAUNCH)})]})}function Xe({isOpen:e,onClose:t,onConfirm:n}){let{t:r}=a(`openhands`),{isLoadingSettings:i}=ne();return e?(0,Z.jsx)(k,{onClose:t,children:(0,Z.jsxs)(A,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,Z.jsx)(q,{onClose:t,testId:`close-open-repository-dialog`}),(0,Z.jsx)(`div`,{className:`w-full pr-6`,children:(0,Z.jsx)(N,{title:r(f.COMMON$OPEN_REPOSITORY)})}),(0,Z.jsx)(`div`,{className:`w-full`,"data-testid":`open-repository-dialog-body`,children:(0,Z.jsx)(Ye,{isLoadingSettings:i,onConfirm:e=>{n(e),t()}})})]})}):null}function Ze(e,t){return e===`new_worktree`?f.COMMON$WORKSPACE_MODE_NEW_WORKTREE:t===`cloud`?f.COMMON$WORKSPACE_MODE_CLOUD_REPO:f.COMMON$WORKSPACE_MODE_LOCAL_REPO}function Qe({mode:e}){return e===`new_worktree`?(0,Z.jsx)(_,{className:`size-3`,strokeWidth:2,"aria-hidden":!0}):(0,Z.jsx)(J,{width:12,height:12,color:`white`,"aria-hidden":!0})}var $e=[`local_repo`,`new_worktree`];function et({value:e,backendKind:t,onChange:n,disabled:r=!1,testId:i=`workspace-mode-selector`}){let{t:o}=a(`openhands`),[s,c]=(0,X.useState)(!1),l=(0,X.useRef)(null),u=o(Ze(e,t));return(0,X.useEffect)(()=>{if(!s)return;let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[s]),(0,X.useEffect)(()=>{if(!s)return;let e=e=>{e.key===`Escape`&&c(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[s]),(0,Z.jsxs)(`div`,{ref:l,className:`relative inline-flex`,children:[(0,Z.jsxs)(`button`,{type:`button`,"data-testid":i,"aria-haspopup":`menu`,"aria-expanded":s,"aria-label":u,disabled:r,onClick:()=>c(e=>!e),className:d(`group flex flex-row items-center justify-between gap-2 pl-2.5 pr-2 py-1 rounded-[100px] truncate relative`,`border border-[rgba(71,74,84,0.50)] bg-transparent text-white`,r?`cursor-not-allowed opacity-50`:`cursor-pointer hover:border-[var(--oh-border-subtle)]`),children:[(0,Z.jsx)(`span`,{className:`flex size-3 shrink-0 items-center justify-center`,children:(0,Z.jsx)(Qe,{mode:e})}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-normal leading-5`,children:u}),(0,Z.jsx)(p,{className:`size-3 shrink-0 text-white`,"aria-hidden":!0})]}),s?(0,Z.jsx)(`div`,{role:`menu`,"data-testid":`${i}-menu`,className:d(`absolute left-0 top-full z-50 mt-1 min-w-[180px] rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface)] p-1 shadow-lg`,H),children:$e.map(r=>{let a=o(Ze(r,t));return(0,Z.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":r===e,"data-testid":`${i}-option-${r}`,onClick:()=>{n(r),c(!1)},className:W,children:[(0,Z.jsx)(`span`,{className:G,children:(0,Z.jsx)(Qe,{mode:r})}),(0,Z.jsx)(`span`,{className:`truncate`,children:a})]},r)})}):null]})}function tt({workspace:e,repository:t,branch:n,provider:r,workspaceMode:i,backendKind:a,onRepoClick:o,onWorkspaceModeChange:s}){let c=e?e.path.replace(/\/+$/,``).split(`/`).pop()||e.path:null;return(0,Z.jsxs)(`div`,{className:`flex flex-row gap-2.5 items-center flex-wrap`,"data-testid":`home-git-control-bar-preview`,children:[(0,Z.jsx)(be,{selectedRepository:t?.full_name??null,gitProvider:r??null,workspaceName:c,onClick:o}),e?(0,Z.jsx)(et,{value:i,backendKind:a,onChange:s}):null,n?(0,Z.jsx)(ve,{selectedBranch:n.name,selectedRepository:t?.full_name??null,gitProvider:r??null}):null]})}function nt(){let{t:e}=a(`openhands`),{backend:t}=u(),{navigate:n}=z(),r=t.kind===`local`,[i,d]=(0,X.useState)(!1),[p,h]=(0,X.useState)(null),[g,_]=(0,X.useState)(null),[v,y]=(0,X.useState)(null),[b,x]=(0,X.useState)(null),[S,C]=(0,X.useState)(`local_repo`),[T,E]=(0,X.useState)([]),[D,O]=(0,X.useState)(!1),{mutateAsync:k,isPending:A}=ee(),j=s(),M=A||j,{isConfigured:N,isLoading:P}=xe(),F=!P&&!N,{images:I,files:L,imagesMarkedUploadAsFile:R,clearAllFiles:B}=K(),{handleUpload:V}=ye(),{error:H}=w({enabled:r}),U=r?m(H,e):null,W=r?!!p:!!g&&!!v,G=he(null,t=>{let i=t.trim(),a=I.length>0||L.length>0;if(!i&&!a||M||F)return;let s={images:[...I],files:[...L]},u={query:a?void 0:i||void 0,entryPoint:`home_chat_launcher`};r&&p?u={...u,workingDir:p.path,workspaceMode:S}:!r&&g&&v&&(u={...u,repository:{name:g.full_name,gitProvider:g.git_provider,branch:v.name}}),T.length>0&&(u={...u,plugins:T});let d=o.loading(e(f.HOME$CREATING_CONVERSATION),c);(async()=>{try{let t=await k(u);o.dismiss(d);try{sessionStorage.removeItem(fe)}catch{}let c=t.conversation_id,f=c.startsWith(`task-`);if(a)if(!r||f){let e=t.task_id??(f?c.slice(5):null);if(!e){l(null);return}ue(e,{content:i,images:s.images,files:s.files,imagesMarkedUploadAsFile:[...R]}),B(),await Me({conversationId:c,text:i,images:s.images,imagesMarkedUploadAsFile:R}),n(`/conversations/${c}`);return}else try{await de({conversationId:c,content:i,images:s.images,files:s.files,imagesMarkedUploadAsFile:R,t:e}),B()}catch(e){l(e instanceof Error?e.message:null);return}f&&i&&await Me({conversationId:c,text:i,images:[],imagesMarkedUploadAsFile:[]}),n(`/conversations/${c}`)}catch(e){o.dismiss(d),l(e instanceof Error?e.message:null)}})()});return(0,Z.jsxs)(`div`,{"data-testid":`home-chat-launcher`,className:`flex w-full max-w-[800px] flex-col gap-4 md:px-4`,children:[(0,Z.jsx)(`div`,{className:`flex w-full justify-center`,children:(0,Z.jsx)(Ve,{})}),(0,Z.jsx)(`div`,{className:`w-full`,children:(0,Z.jsx)(_e,{onSubmit:G,onFilesPaste:V,disabled:M||F})}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-start gap-2`,children:[W?(0,Z.jsx)(tt,{workspace:p,repository:g,branch:v,provider:b,workspaceMode:S,backendKind:t.kind,onRepoClick:()=>d(!0),onWorkspaceModeChange:C}):(0,Z.jsx)(He,{kind:r?`local`:`cloud`,onClick:()=>d(!0),disabled:M||!!U,disabledTooltip:U}),(0,Z.jsx)(Be,{count:T.length,onClick:()=>O(!0),disabled:M})]}),r?(0,Z.jsx)(Je,{isOpen:i,onClose:()=>d(!1),onConfirm:e=>{h(e),_(null),y(null),x(null),C(`local_repo`)}}):(0,Z.jsx)(Xe,{isOpen:i,onClose:()=>d(!1),onConfirm:({repository:e,branch:t,provider:n})=>{_(e),y(t),x(n??e.git_provider),h(null),C(`local_repo`)}}),D&&(0,Z.jsx)(ze,{selected:T,onChange:E,onClose:()=>O(!1)})]})}function rt(){let e=b(r().search);return(0,Z.jsxs)(`div`,{"data-testid":`home-screen`,className:`custom-scrollbar-always flex h-full flex-col overflow-y-auto rounded-xl bg-transparent px-4 md:px-0 lg:px-[42px]`,children:[(0,Z.jsx)(`div`,{className:`md:px-4 lg:px-0`,children:(0,Z.jsx)(Se,{})}),(0,Z.jsx)(`div`,{className:`flex flex-1 min-h-0 flex-col items-center justify-center`,children:(0,Z.jsx)(nt,{})}),e?null:(0,Z.jsx)(T,{})]})}var it=i(rt);export{it as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./home-CY0JaxiY.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./home-CY0JaxiY.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0bpqexo-CbTboogo.js";var t=e(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~emdr2jt4-BrmgjeOw.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gy8zbn65-CGt6bWRT.js";import{E as a,p as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0bpqexo-CbTboogo.js";import{t as s}from"./useMutation-CaSHLnX0.js";import{$ as c,At as l,Nt as u,R as d,ct as f,kt as ee,n as te,ut as p}from"./active-backend-context-BiwzkzDy.js";import{t as m,z as h}from"./utils-BgGG1znF.js";import{a as g,c as _,d as ne,i as v,n as y,o as b,r as x,s as S,t as C}from"./settings-service.api-CZiPD8__.js";import{n as w}from"./use-settings-8nt3DGxW.js";import{t as re}from"./modal-backdrop-X-vKo61e.js";import{n as ie}from"./modal-classes-B6PDrxXo.js";import{t as T}from"./brand-button-DGN6Y9o6.js";import{t as E}from"./styled-tooltip-C7grwnOX.js";import{t as ae}from"./modal-close-button-DyxBZaAb.js";import{t as D}from"./settings-input-B-q2gkVy.js";import{t as oe}from"./v4-DDdyfk2q.js";import{t as O}from"./secrets-service-Dhjh3HhH.js";import{c as se,i as ce,s as k,t as A}from"./mcp-marketplace-utils-DFmhKc5s.js";import{t as le}from"./vendor~root-layout~index-home~home~mcp~automations-list~automation-setup-route~onboarding-modal-D7IDevqN.js";var j=a(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),M=e(t()),N=n();function P({fieldKey:e,checked:t,onToggle:n}){let{t:r}=i(`openhands`);return(0,N.jsxs)(`label`,{"data-testid":`mcp-install-save-secret-${e}`,className:m(`flex items-center gap-2 px-3 py-2 mt-0.5 rounded-lg border cursor-pointer transition-colors`,t?`border-green-500/35 bg-green-500/10`:`border-[var(--oh-border)] bg-transparent hover:bg-white/[0.03]`),children:[(0,N.jsx)(`input`,{className:`sr-only`,id:`mcp-save-secret-checkbox-${e}`,type:`checkbox`,checked:t,onChange:e=>n(e.target.checked)}),(0,N.jsx)(`span`,{"aria-hidden":`true`,className:m(`relative inline-flex h-[22px] w-[40px] shrink-0 items-center rounded-full border transition-colors duration-200`,t?`border-green-500 bg-green-500`:`border-[var(--oh-border)] bg-surface-raised`),children:(0,N.jsx)(`span`,{className:m(`inline-block size-4 rounded-full transition-transform duration-200`,t?`translate-x-[21px] bg-white`:`translate-x-[2px] bg-[var(--oh-muted)]`)})}),(0,N.jsx)(`span`,{className:`text-sm`,children:r(h.MCP$ALSO_SAVE_AS_SECRET)}),(0,N.jsx)(`code`,{className:m(`ml-auto text-[11px] font-mono tracking-tight border rounded px-1.5 py-0.5`,t?`text-green-500 border-green-500/35 bg-white/[0.04]`:`text-tertiary-alt border-[var(--oh-border)]`),children:e}),(0,N.jsx)(E,{content:r(h.MCP$SAVE_AS_SECRET_TOOLTIP),placement:`top`,children:(0,N.jsx)(`button`,{type:`button`,"aria-label":r(h.MCP$SAVE_AS_SECRET_TOOLTIP),className:`flex items-center justify-center size-[15px] shrink-0 rounded-full border border-[var(--oh-muted)] text-tertiary-alt text-[9px] font-bold cursor-help`,onClick:e=>e.preventDefault(),children:`?`})})]})}var F=e=>(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,N.jsx)(`path`,{d:`M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z`,fill:`currentColor`})}),ue={xs:`h-4 w-4 rounded [&>svg]:h-2.5 [&>svg]:w-2.5`,sm:`h-5 w-5 rounded-md [&>svg]:h-3 [&>svg]:w-3`,md:`h-10 w-10 rounded-lg [&>svg]:h-5 [&>svg]:w-5`},de={slack:F};function fe({entry:e,size:t=`md`,className:n,fallback:r,testId:i}){let a=e?de[e.id]:void 0;return(0,N.jsx)(`span`,{"aria-hidden":`true`,title:e?.name,"data-testid":i,className:m(`inline-flex shrink-0 items-center justify-center overflow-hidden`,`border border-white/10 shadow-[inset_0_1px_0_rgba(255,255,255,0.18)]`,ue[t],n),style:{backgroundColor:e?.iconBg??`var(--oh-color-tertiary)`,color:e?.iconColor??`#FFFFFF`},children:a?(0,N.jsx)(a,{}):e?.logoUrl?(0,N.jsx)(`img`,{src:e.logoUrl,alt:`${e.name} logo`,className:`h-full w-full object-contain p-[22%]`,onError:e=>{let t=e.currentTarget;t.style.display=`none`}}):r??(0,N.jsx)(j,{className:`h-5 w-5`,strokeWidth:2.25})})}var pe=new Set([`invalid_auth`,`not_authed`,`account_inactive`,`token_revoked`,`token_expired`]),me=e=>e.is_error?e.text||`tool call failed`:null,he={github:{toolCall:{name:`get_me`,arguments:{}},interpret:me},linear:{toolCall:{name:`list_teams`,arguments:{}},interpret:me},slack:{toolCall:{name:`slack_list_channels`,arguments:{limit:1}},interpret:e=>{if(e.is_error)return e.text||`tool call failed`;try{let t=JSON.parse(e.text);if(t?.ok===!1&&pe.has(t.error))return String(t.error)}catch{}return null}}};function I(e){let t=A(e,k(le));return t?he[t.id]:void 0}var ge=4,_e=/token|key|secret|auth/i,ve=[/\bgh[pousr]_[A-Za-z0-9]{16,}\b/g,/\bgithub_pat_[A-Za-z0-9_]{20,}\b/g,/\bxox[a-z](?:-[A-Za-z0-9]+)+/g,/\blin_api_[A-Za-z0-9]{10,}\b/g,/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\b/g],ye=/\bBearer\s+[A-Za-z0-9._~+/=-]{8,}/gi;function L(e,t){typeof t==`string`&&(t.length<ge||t!==`**********`&&e.add(t))}function R(e,t){for(let n of Object.values(t??{}))L(e,n)}function be(e,t){if(t)try{let n=new URL(t);L(e,n.username),L(e,n.password),L(e,decodeURIComponent(n.username)),L(e,decodeURIComponent(n.password)),n.searchParams.forEach((t,n)=>{_e.test(n)&&L(e,t)})}catch{}}function xe(e,t){if(t)switch(t.strategy){case`api_key`:case`bearer`:L(e,t.value);break;case`basic`:L(e,t.username),L(e,t.password);break;case`header`:R(e,t.headers);break;case`oauth2`:L(e,t.authentication?.client_secret),R(e,t.state?.tokens);break;default:break}}function Se(e){let t=new Set;return R(t,e.env),R(t,e.headers),xe(t,e.auth),be(t,e.url),[...t].sort((e,t)=>t.length-e.length)}function z(e,...t){if(!e)return e;let n=e;for(let e of t)if(e)for(let t of Se(e))n=n.split(t).join(y);n=n.replace(ye,`Bearer ${y}`);for(let e of ve)n=n.replace(e,y);return n}var Ce=[`none`,`api_key`,`bearer`,`basic`,`header`,`oauth2`],we=e=>!!e&&typeof e==`object`&&!Array.isArray(e),Te=e=>we(e)&&typeof e.strategy==`string`&&Ce.includes(e.strategy),Ee=e=>!!e&&typeof e==`object`&&!Array.isArray(e),De=e=>{if(!Ee(e))return;let t=Object.entries(e).filter(e=>typeof e[1]==`string`);return t.length>0?Object.fromEntries(t):void 0},Oe=e=>!!e&&Object.values(e).some(e=>e===`**********`),ke=(e,t)=>e===`sse`?t===`sse`:e===`shttp`?t===void 0||t===`http`||t===`shttp`||t===`streamable-http`:!1,Ae=e=>{if(!e)return;let t=/^stdio-(\d+)$/.exec(e);return t?Number.parseInt(t[1],10):void 0},je=(e,t)=>{let n=Ae(e);if(n!==void 0)return Object.entries(t).filter(([,e])=>!e.url)[n]?.[1]},Me=(e,t)=>e.type===`stdio`?je(e.id,t)??(e.name?t[e.name]:void 0):e.name&&t[e.name]?t[e.name]:Object.values(t).find(t=>t.url===e.url&&ke(e.type,t.transport));async function Ne(e){let t=(await C.fetchSettingsFromApi(`encrypted`)).agent_settings?.mcp_config;if(Ee(t))return Me(e,t)}async function Pe(e){let t=e.type===`stdio`&&Oe(e.env),n=(e.type===`sse`||e.type===`shttp`)&&x(e.auth);if(!t&&!n)return e;try{let r=await Ne(e);if(!r)return e;if(t){let t=De(r.env)??{},n=Object.fromEntries(Object.entries(e.env??{}).map(([e,n])=>[e,n===`**********`&&typeof t[e]==`string`?t[e]:n]));return{...e,env:n}}return n&&Te(r.auth)?{...e,auth:r.auth}:e}catch{return e}}var Fe=120;function Ie(e){return e.type===`stdio`?{transport:`stdio`,command:e.command,...e.args?.length&&{args:e.args},...e.env&&Object.keys(e.env).length>0&&{env:e.env}}:{transport:e.type===`sse`?`sse`:`http`,url:e.url,...e.headers&&Object.keys(e.headers).length>0&&{headers:e.headers},...e.auth?{auth:e.auth}:{}}}function Le(e){return e.auth?.strategy===`oauth2`?Fe:e.timeout}async function Re(e){let t=I(e),n=await Pe(e),r=Ie(n),i=Le(e);return{request:{server:r,...e.name?{name:e.name}:{},...i===void 0?{}:{timeout:i},...t?{tool_call:t.toolCall}:{}},substituted:n}}function ze(e,t){return e.ok?e.tool_result?{...e,tool_result:{...e.tool_result,text:z(e.tool_result.text,...t)}}:e:{...e,error:z(e.error,...t)}}function Be(e,t,n){let r=ze(e,n);if(r.ok&&t&&r.tool_result&&r.tools.includes(t.toolCall.name)){let e=t.interpret(r.tool_result);if(e)return{ok:!1,error:e,error_kind:`credentials`}}return r}function Ve(){if(f().backend.kind===`local`){let{host:e,apiKey:t}=c();return{host:e,...t?{apiKey:t}:{}}}let e=p().find(e=>e.kind===`local`&&e.host);if(e)return{host:e.host.replace(/\/+$/,``),...e.apiKey?{apiKey:e.apiKey}:{}};throw Error(`OAuth authorization requires a reachable local backend.`)}function B(){let{host:e,apiKey:t}=Ve();return new o({host:e,...t?{apiKey:t}:{},timeout:125e3})}function He(e){return e.status===`succeeded`?{ok:!0,tools:e.tools??[],...e.tool_result!==void 0&&{tool_result:e.tool_result},...e.oauth_state!==void 0&&{oauth_state:e.oauth_state}}:{ok:!1,error:e.error||`OAuth authorization did not complete`,error_kind:e.error_kind||`unknown`}}var Ue=e=>new Promise(t=>{window.setTimeout(t,e)}),V=class e{static async testServer(e){if(f().backend.kind===`cloud`)return{ok:!0,tools:[]};let t=I(e),{host:n,apiKey:r}=c(),i=new o({host:n,...r?{apiKey:r}:{}});try{let{request:n,substituted:r}=await Re(e);return Be(await i.testServer(n),t,[r,e])}finally{i.close()}}static async startOAuth(t){let n=B();try{return await e.startOAuthWithClient(n,t)}finally{n.close()}}static async getOAuthStatus(t){let n=B();try{return await e.getOAuthStatusWithClient(n,t)}finally{n.close()}}static async submitOAuthCallback(t,n){let r=B();try{return await e.submitOAuthCallbackWithClient(r,t,n)}finally{r.close()}}static async authorizeOAuth(t){let n=I(t),r=e=>Be(e,n,[t]),i=window.open(`about:blank`,`_blank`),a=B();try{let n=await e.startOAuthWithClient(a,t);if(!n.ok||!n.job_id||!n.authorization_url)return i?.close(),r({ok:!1,error:n.error||`Could not start OAuth authorization`,error_kind:n.error_kind||`unknown`});let o=await e.getOAuthStatusWithClient(a,n.job_id);for(let t=0;t<20;t+=1){if(o.status===`succeeded`||o.status===`failed`)return i?.close(),r(He(o));if(o.callback_ready)break;await Ue(250),o=await e.getOAuthStatusWithClient(a,n.job_id)}i&&(i.location.href=n.authorization_url);for(let t=0;t<Fe;t+=1)if(await Ue(1e3),o=await e.getOAuthStatusWithClient(a,n.job_id),o.status===`succeeded`||o.status===`failed`)return i?.close(),r(He(o));return{ok:!1,error:`OAuth authorization timed out`,error_kind:`timeout`}}finally{a.close()}}static async startOAuthWithClient(e,t){let{request:n}=await Re(t);return e.startOAuth(n)}static async getOAuthStatusWithClient(e,t){return await e.getOAuthStatus(t)}static async submitOAuthCallbackWithClient(e,t,n){return await e.submitOAuthCallback(t,{callback_url:n})}},H=e=>Object.keys(e??{}).sort();function U(e){return e.type===`stdio`?JSON.stringify({type:e.type,name:e.name??``,command:e.command??``,args:e.args??[],envKeys:H(e.env)}):JSON.stringify({type:e.type,name:e.name??``,url:e.url??``,headerKeys:H(e.headers),authStrategy:e.auth?.strategy??``,authHeaderName:e.auth?.strategy===`api_key`?e.auth.header_name??``:``,authHeaderKeys:e.auth?.strategy===`header`?H(e.auth.headers):[]})}var W={},G=new Set,We=1;function K(e){W=e,G.forEach(e=>e())}function Ge(){return W}function Ke(e){return G.add(e),()=>{G.delete(e)}}function qe(e){let t=We;return We+=1,K({...W,[e]:{status:`checking`,checkId:t}}),t}function q(e,t,n){let r=W[e];r?.status!==`checking`||r.checkId!==t||K({...W,[e]:n})}function Je(e,t){K({...W,[e]:t})}function Ye(e){if(!(e in W))return;let{[e]:t,...n}=W;K(n)}var Xe=/\b(401|403)\b|unauthorized|forbidden|invalid[ _-]?(token|credentials?|api[ _-]?key)/i;function Ze(e,t){return{status:`failed`,kind:`unknown`,error:z(t instanceof Error?t.message:String(t),e),checkedAt:Date.now()}}function J(e,t){let n=Date.now();if(!t.ok)return{status:`failed`,kind:(t.error_kind===`connection`||t.error_kind===`unknown`)&&Xe.test(t.error)?`credentials`:t.error_kind,error:t.error,checkedAt:n};let r=I(e);return{status:`healthy`,verification:r&&t.tools.includes(r.toolCall.name)&&t.tool_result&&!t.tool_result.is_error?`verified`:`connectivity-only`,toolCount:t.tools.length,checkedAt:n}}async function Qe(e){let t=U(e),n=qe(t),r;try{r=J(e,await V.testServer(e))}catch(t){r=Ze(e,t)}q(t,n,r)}async function $e(e){let t=U(e),n=qe(t);try{let r=await V.authorizeOAuth(e);return q(t,n,J(e,r)),r}catch(r){return q(t,n,Ze(e,r)),null}}function Y(e,t,n){let r=U(e);n.some(e=>U(e)===r)||Je(r,J(e,t))}function et(){let e=r(),{data:t}=w();return s({mutationFn:async e=>{if(!t)return;let n=v(t.agent_settings?.mcp_config),r={sse_servers:[...n.sse_servers],stdio_servers:[...n.stdio_servers],shttp_servers:[...n.shttp_servers]};e.type===`sse`?r.sse_servers.push(b(e)):e.type===`stdio`?r.stdio_servers.push(S(e)):e.type===`shttp`&&r.shttp_servers.push(g(e)),await C.saveSettings({agent_settings_diff:{mcp_config:_(r)}})},onSuccess:()=>{e.invalidateQueries({queryKey:d.personal()})}})}function tt(){return s({mutationFn:e=>V.testServer(e)})}function nt(e){return e.length<=3?e.join(`, `):`${e.slice(0,3).join(`, `)} … (+${e.length-3})`}function rt(){let{t:e}=i(`openhands`),t=r();return(0,M.useCallback)((n,r,i)=>{let a=n.filter(e=>i[e.key]&&(r[e.key]??``).trim());return a.length===0?Promise.resolve():Promise.allSettled(a.map(e=>O.createSecret(e.key,r[e.key].trim(),e.label))).then(n=>{let r=a.filter((e,t)=>n[t].status===`fulfilled`).map(e=>e.key),i=a.filter((e,t)=>n[t].status===`rejected`).map(e=>e.key);r.length>0&&(t.invalidateQueries({queryKey:[`secrets-search`]}),t.invalidateQueries({queryKey:[`secrets`]}),l(e(h.MCP$SECRETS_SAVED,{keys:nt(r)}))),i.length>0&&ee(e(h.MCP$SECRETS_SAVE_FAILED,{keys:nt(i)}))})},[e,t])}function X(e,t,n){switch(t){case`timeout`:return e(h.MCP$TEST_ERROR_TIMEOUT);case`connection`:return e(h.MCP$TEST_ERROR_CONNECTION);case`credentials`:return e(h.MCP$TEST_ERROR_CREDENTIALS,{error:n});default:return e(h.MCP$TEST_ERROR_UNKNOWN,{error:n})}}function Z(e){let t=/\[([^\]]+)\]\(([^)]+)\)/g,n=[],r=0;for(let i of e.matchAll(t))i.index>r&&n.push(e.slice(r,i.index)),n.push((0,N.jsx)(`a`,{href:/^https?:\/\//i.test(i[2])?i[2]:`#`,target:`_blank`,rel:`noreferrer`,className:`underline hover:text-white transition-colors`,children:i[1]},i.index)),r=i.index+i[0].length;return r<e.length&&n.push(e.slice(r)),n}function Q(e){return e?.transport.kind!==`shttp`&&e?.transport.kind!==`sse`?!1:[`api_key`,`bearer`].includes(e.auth.strategy)}function it(e){return!!e&&e.auth.strategy===`oauth2`}function at(e){return e.transport.kind===`stdio`?e.auth.apiKeyOptional??!1:e.auth.apiKeyOptional??e.transport.apiKeyOptional??!1}function $(e){return e?.transport.kind!==`shttp`&&e?.transport.kind!==`sse`?[]:e.transport.headerFields??[]}function ot(e){let t={},n={},r=ce(e),i=r?.transport;if(i?.kind===`stdio`){for(let e of i.envFields??[])t[e.key]=``,n[e.key]=e.type===`password`;for(let e of i.argFields??[])t[e.key]=``}else if(i?.kind===`shttp`||i?.kind===`sse`){t.url=i.url;for(let e of $(r))t[e.key]=``,n[e.key]=e.type===`password`;Q(r)&&(t.api_key=``,r?.auth.credentialSecretName&&(n.api_key=r.auth.saveCredentialAsSecretByDefault??!1))}return{values:t,errors:{},savedAsSecret:n}}function st({entry:e,existingServers:t,onClose:n,onSuccess:r}){let{t:a}=i(`openhands`),{mutate:o,isPending:s}=et(),{mutate:c,isPending:d}=tt(),f=rt(),{backend:ee}=te(),p=ee.kind===`cloud`,[m,g]=M.useState(()=>ot(e)),_=M.useRef(m);_.current=m;let[v,y]=M.useState(null),[b,x]=M.useState(!1),[S,C]=M.useState(!1),w=ce(e),E=w?.transport,O=d||S||s||b,k=(e,t)=>{g(n=>({...n,values:{...n.values,[e]:t},errors:{...n.errors,[e]:null}})),y(null)},A=(e,t)=>{g(n=>({...n,savedAsSecret:{...n.savedAsSecret,[e]:t}}))},le=()=>{let e=w?.auth.credentialSecretName,t=_.current.values.api_key?.trim();return!e||!t||!_.current.savedAsSecret.api_key?Promise.resolve():f([{key:e,label:w.auth.credentialLabel??e,type:`password`,required:!0}],{[e]:t},{[e]:!0})},j=()=>E?.kind===`stdio`?f(E.envFields??[],_.current.values,_.current.savedAsSecret):E?.kind===`shttp`||E?.kind===`sse`?Promise.all([le(),f($(w),_.current.values,_.current.savedAsSecret)]).then(()=>void 0):Promise.resolve(),F=i=>{if(i.auth?.strategy===`oauth2`){C(!0),V.authorizeOAuth(i).then(s=>{if(!s.ok){y(X(a,s.error_kind,s.error));return}let c=s.oauth_state?{...i,auth:{...i.auth,state:s.oauth_state}}:i;o(c,{onSuccess:()=>{p||Y(c,s,t),l(a(h.MCP$INSTALL_SUCCESS)),x(!0),(async()=>{try{await j()}finally{r?.(e),n()}})()},onError:e=>{y(u(e)||a(h.ERROR$GENERIC))}})}).catch(e=>{y(u(e)||a(h.ERROR$GENERIC))}).finally(()=>C(!1));return}c(i,{onSuccess:s=>{if(!s.ok){y(X(a,s.error_kind,s.error));return}let c=s.oauth_state&&i.auth?.strategy===`oauth2`?{...i,auth:{...i.auth,state:s.oauth_state}}:i;o(c,{onSuccess:()=>{p||Y(c,s,t),l(a(h.MCP$INSTALL_SUCCESS)),x(!0),(async()=>{try{await j()}finally{r?.(e),n()}})()},onError:e=>{y(u(e)||a(h.ERROR$GENERIC))}})},onError:e=>{y(u(e)||a(h.ERROR$GENERIC))}})},ue=()=>{if(E?.kind!==`shttp`&&E?.kind!==`sse`||!w)return;let t=m.values.api_key?.trim()??``,n=E.urlEditable?m.values.url?.trim()??``:E.url,r=it(w),i=Q(w),o=$(w),s={};if(!n)s.url=a(h.SETTINGS$MCP_ERROR_URL_REQUIRED);else try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s.url=a(h.SETTINGS$MCP_ERROR_URL_INVALID_PROTOCOL))}catch{s.url=a(h.SETTINGS$MCP_ERROR_URL_INVALID)}for(let e of o)e.required&&!(m.values[e.key]??``).trim()&&(s[e.key]=a(h.MCP$ERROR_FIELD_REQUIRED));if(!r&&i&&!at(w)&&!t&&(s.api_key=a(h.MCP$ERROR_FIELD_REQUIRED)),Object.values(s).some(Boolean)){g(e=>({...e,errors:s}));return}let c=r?se(w):void 0,l=Object.fromEntries(o.map(e=>[e.key,m.values[e.key]?.trim()??``]).filter(([,e])=>e)),u=Object.keys(l).length>0,d;r?d={strategy:`oauth2`,...c&&{authentication:c}}:i&&t?d=w.auth.strategy===`api_key`?{strategy:`api_key`,value:t,...w.auth.apiKeyHeaderName&&{header_name:w.auth.apiKeyHeaderName}}:{strategy:`bearer`,value:t}:u&&(d={strategy:`header`,headers:l}),F({id:`${E.kind}-${oe()}`,type:E.kind,name:ne(e.id),url:n,...d&&{auth:d},...u&&d?.strategy!==`header`&&{headers:l}})},de=()=>{if(E?.kind!==`stdio`)return;let e=E,t={};for(let n of e.envFields??[])n.required&&!(m.values[n.key]??``).trim()&&(t[n.key]=a(h.MCP$ERROR_FIELD_REQUIRED));for(let n of e.argFields??[])n.required&&!(m.values[n.key]??``).trim()&&(t[n.key]=a(h.MCP$ERROR_FIELD_REQUIRED));if(Object.values(t).some(Boolean)){g(e=>({...e,errors:t}));return}let n={};for(let t of e.envFields??[]){let e=m.values[t.key]?.trim();e&&(n[t.key]=e)}let r=[];for(let t of e.argFields??[]){let e=m.values[t.key]?.trim();if(e)for(let t of e.split(/\s+/))t&&r.push(t)}F({id:`stdio-${oe()}`,type:`stdio`,name:e.serverName,command:e.command,args:[...e.args,...r],...Object.keys(n).length>0&&{env:n}})};return(0,N.jsx)(re,{onClose:n,"aria-label":e.name,children:(0,N.jsxs)(`form`,{"data-testid":`mcp-install-modal`,"data-marketplace-id":e.id,onSubmit:e=>(e.preventDefault(),y(null),E?.kind===`shttp`||E?.kind===`sse`?ue():de()),className:`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[85vh] overflow-y-auto custom-scrollbar`,children:[(0,N.jsx)(ae,{onClose:n,testId:`mcp-install-modal-close`,disabled:O}),(0,N.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,N.jsx)(fe,{entry:e}),(0,N.jsxs)(`div`,{className:`flex flex-col flex-1`,children:[(0,N.jsx)(`h2`,{className:ie,children:e.name}),(0,N.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:e.description})]})]}),e.installHint&&(0,N.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:e.installHint}),e.docsUrl&&(0,N.jsx)(`a`,{href:e.docsUrl,target:`_blank`,rel:`noreferrer`,className:`text-xs text-[var(--oh-muted)] hover:text-white hover:underline self-start transition-colors`,children:a(h.MCP$VIEW_DOCS)}),(0,N.jsx)(`div`,{className:`flex flex-col gap-3`,children:(()=>{if(E?.kind===`shttp`||E?.kind===`sse`){let e=it(w),t=Q(w),n=w?at(w):!1,r=w?.auth.credentialSecretName,i=$(w);return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(D,{testId:`mcp-install-field-url`,name:`url`,type:`url`,label:a(h.SETTINGS$MCP_URL),value:m.values.url??E.url,onChange:e=>k(`url`,e),isDisabled:!E.urlEditable,className:`w-full`}),m.errors.url&&(0,N.jsx)(`p`,{className:`text-xs text-red-500`,children:m.errors.url}),i.map(e=>(0,N.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(D,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:m.values[e.key]??``,onChange:t=>k(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,N.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(e.helperText)}),m.errors[e.key]&&(0,N.jsx)(`p`,{className:`text-xs text-red-500`,children:m.errors[e.key]}),e.key in m.savedAsSecret&&(0,N.jsx)(P,{fieldKey:e.key,checked:m.savedAsSecret[e.key]??!1,onToggle:t=>A(e.key,t)})]},e.key)),e?(0,N.jsxs)(`div`,{"data-testid":`mcp-install-oauth-info`,className:`flex flex-col gap-2 p-3 rounded-lg border border-[var(--oh-border)] bg-base-tertiary`,children:[(0,N.jsx)(`p`,{className:`text-sm text-secondary-light`,children:a(h.MCP$OAUTH_CONNECT_INFO)}),(0,N.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:a(h.MCP$OAUTH_CONNECT_HINT)})]}):t?(0,N.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(D,{testId:`mcp-install-field-api_key`,name:`api_key`,type:`password`,label:w?.auth.credentialLabel??a(h.SETTINGS$MCP_API_KEY),value:m.values.api_key??``,onChange:e=>k(`api_key`,e),placeholder:w?.auth.credentialPlaceholder??a(h.SETTINGS$MCP_API_KEY_PLACEHOLDER),showOptionalTag:n,required:!n,className:`w-full`}),w?.auth.credentialHelp&&(0,N.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(w.auth.credentialHelp)}),m.errors.api_key&&(0,N.jsx)(`p`,{className:`text-xs text-red-500`,children:m.errors.api_key}),r&&(0,N.jsx)(P,{fieldKey:r,checked:m.savedAsSecret.api_key??!1,onToggle:e=>A(`api_key`,e)})]}):null]})}if(E?.kind!==`stdio`)return null;let e=E;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(D,{testId:`mcp-install-field-command-readonly`,name:`command-readonly`,type:`text`,label:a(h.MCP$COMMAND_LABEL),value:`${e.command} ${e.args.join(` `)}`.trim(),onChange:()=>{},isDisabled:!0,className:`w-full`}),(e.envFields??[]).map(e=>(0,N.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(D,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:m.values[e.key]??``,onChange:t=>k(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,N.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(e.helperText)}),m.errors[e.key]&&(0,N.jsx)(`p`,{className:`text-xs text-red-500`,children:m.errors[e.key]}),e.key in m.savedAsSecret&&(0,N.jsx)(P,{fieldKey:e.key,checked:m.savedAsSecret[e.key],onToggle:t=>A(e.key,t)})]},e.key)),(e.argFields??[]).map(e=>(0,N.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(D,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:m.values[e.key]??``,onChange:t=>k(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,N.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(e.helperText)}),m.errors[e.key]&&(0,N.jsx)(`p`,{className:`text-xs text-red-500`,children:m.errors[e.key]})]},e.key))]})})()}),v&&(0,N.jsx)(`p`,{"data-testid":`mcp-install-modal-error`,className:`text-sm text-red-500 whitespace-pre-wrap`,children:v}),(0,N.jsxs)(`div`,{className:`flex justify-end gap-2 mt-2`,children:[(0,N.jsx)(T,{type:`button`,variant:`secondary`,onClick:n,testId:`mcp-install-cancel`,isDisabled:O,children:a(h.BUTTON$CANCEL)}),(0,N.jsx)(T,{type:`submit`,variant:`primary`,isDisabled:O,testId:`mcp-install-submit`,children:a(d||S?h.MCP$VERIFYING:s||b?h.SETTINGS$SAVING:h.MCP$INSTALL_BUTTON)})]})]})})}export{Qe as a,Ye as c,U as d,V as f,j as h,et as i,Ge as l,fe as m,X as n,$e as o,Pe as p,tt as r,Y as s,st as t,Ke as u};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,yt as r}from"./vendor-styling-Bcgpimp9.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~emdr2jt4-BrmgjeOw.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gy8zbn65-CGt6bWRT.js";import{t as o}from"./useInfiniteQuery-BLRVmVPU.js";import{t as s}from"./useMutation-CaSHLnX0.js";import{t as c}from"./useQuery-DiPh8LRJ.js";import{n as l}from"./use-is-creating-conversation-CAggrM75.js";import{A as u,At as d,Ht as f,M as p,N as m,Nt as h,R as g,Wt as _,k as v,kt as y,n as b,vt as x,zt as S}from"./active-backend-context-BiwzkzDy.js";import{A as C,F as w,N as T,T as E,a as D,b as O,c as k,f as A,g as j,h as M,k as N,l as ee,m as te,n as ne,o as re,p as ie,r as ae,s as oe,t as P,v as se,z as F}from"./utils-BgGG1znF.js";import{t as ce}from"./chat-send-button-CgbcjD97.js";import{t as le}from"./check-CPLXgluF.js";import{t as ue}from"./chevron-down-CP4QHvyc.js";import{c as I,l as L}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-sjx0x5ac.js";import{t as de}from"./circle-check-Dpy2_xSI.js";import{i as fe,n as R,r as pe,t as me}from"./vendor~index-home~home~conversation-panel~conversation-Bqp1ZqJM.js";import{a as he,c as ge,d as _e,l as ve,n as ye,o as be,r as xe,s as Se,t as Ce,u as z}from"./git-provider-icon-BZqqUPlm.js";import{t as we}from"./cloud-funnel-analytics-CEOl5Gxr.js";import{t as Te}from"./loader-circle-B4QDBARx.js";import{t as Ee}from"./plus-DrKuuvMe.js";import{t as De}from"./refresh-cw-BrM5ZAZD.js";import{t as Oe}from"./loading-spinner-DfZ_bhV7.js";import{t as ke}from"./use-config-CxlEdf_v.js";import{t as Ae}from"./settings-service.api-CZiPD8__.js";import{n as B}from"./use-settings-8nt3DGxW.js";import{t as je}from"./modal-backdrop-X-vKo61e.js";import{n as Me}from"./modal-body-CMsDpalT.js";import{r as Ne}from"./base-modal-BBuy0WQQ.js";import{_ as Pe,n as Fe,s as Ie,t as Le}from"./form-control-classes-DAfsCJTe.js";import{t as Re}from"./brand-button-DGN6Y9o6.js";import{n as ze}from"./navigation-context-BOGzIng3.js";import{t as Be}from"./navigation-link-Bxmn-pCs.js";import{t as Ve}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-B_L-gcOG.js";import{t as He}from"./styled-tooltip-C7grwnOX.js";import{c as Ue,i as We,r as Ge,u as Ke}from"./dropdown-classes-BB8rzqXL.js";import{n as qe}from"./combobox-caret-Bd2yySnF.js";import{t as Je}from"./dist-hOnv1nn2.js";import{c as Ye,f as Xe,i as Ze,o as Qe,r as $e,t as V}from"./conversation-store-C6hSXHw0.js";import{t as et}from"./modal-close-button-DyxBZaAb.js";import{d as tt,f as nt,t as H,u as rt}from"./agent-server-conversation-service.api-CYSWw-2g.js";import{t as it}from"./profiles-service.api-CukSFLzz.js";import{f as at,o as ot,s as st,u as ct}from"./acp-providers-C921BlYB.js";import{f as lt}from"./llm-subscription-DTqtBCWz.js";import{d as ut,f as dt,i as ft,l as pt,o as mt,s as ht}from"./conversation-state-store-F62HvuI1.js";import{t as gt}from"./use-click-outside-element-DKqpqEEm.js";import{t as _t}from"./use-llm-profiles-2Wc2db8u.js";import{n as vt,t as yt}from"./use-agent-profiles-TsOdIyw5.js";import{a as bt,i as xt,n as St,o as Ct,r as wt,t as Tt}from"./use-create-conversation-nOJ6Um5h.js";import{n as U,t as W}from"./context-menu-list-item-CrCrYuPF.js";import{r as Et,t as Dt}from"./use-can-manage-org-profiles-Bt1M71u5.js";import{t as Ot}from"./skills-CYFLsN5U.js";import{a as kt,n as At,s as jt}from"./home-store-Ch1ErdBc.js";import{t as Mt}from"./checkmark-CxdXtM3b.js";import{n as Nt,r as G}from"./typography-iYhzLlHO.js";import{n as Pt,t as Ft}from"./use-activate-agent-profile-CDHA52tC.js";import{G as It,J as K,K as q,V as Lt,a as Rt,c as zt,f as Bt,m as Vt,o as Ht,q as Ut,r as Wt,t as Gt,x as Kt,y as qt}from"./markdown-renderer-DgiLLhW6.js";import{t as Jt}from"./use-skills-CE6miQ3r.js";import{t as Yt}from"./syntax-highlighter-B92AFGMy.js";import{n as Xt,t as Zt}from"./link-external-BDBCz-_z.js";import{t as Qt}from"./merge-agent-profile-save-input-WcFmQVKK.js";import{t as $t}from"./settings-gear-TYXnELES.js";import{t as en}from"./u-robot-CJtSzy5X.js";import{r as tn}from"./settings-utils-BL_Z9uIe.js";import{a as nn,i as rn,n as an,o as on,r as sn,s as cn}from"./git-repo-dropdown-DEpOwUez.js";var J=e(t(),1),ln={"image/png":`png`,"image/jpeg":`jpg`,"image/jpg":`jpg`,"image/gif":`gif`,"image/webp":`webp`,"image/bmp":`bmp`};function un(e){if(e.name.trim())return e;let t=ln[e.type]??(e.type.startsWith(`image/`)?`png`:`bin`);return new File([e],`pasted-image-${Date.now()}.${t}`,{type:e.type,lastModified:e.lastModified})}function dn(e,t){let n=new Set(t),r=[],i=[];for(let t of e)n.has(t.name)?i.push(t):r.push(t);return{imagesToEmbed:r,imagesAsFiles:i}}function fn(e){let t=Array.from(e.files);if(t.length>0)return t.map(un);let n=[];for(let t=0;t<e.items.length;t+=1){let r=e.items[t];if(r.kind!==`file`)continue;let i=r.getAsFile();i&&n.push(un(i))}return n}var pn=e=>e?(e.innerText||e.textContent||``).trim()===``:!0,mn=e=>{e&&pn(e)&&(e.innerHTML=``,e.textContent=``)},Y=e=>e?.innerText||``,hn=e=>{e&&(e.textContent=``)},gn=e=>{e&&(e.value=``)},_n=e=>{if(!e)return;let t=window.getSelection();if(!t||t.rangeCount===0)return;let n=t.getRangeAt(0);if(!n.getBoundingClientRect||!e.getBoundingClientRect)return;let r=n.getBoundingClientRect(),i=e.getBoundingClientRect();r.bottom>i.bottom&&(e.scrollTop=e.scrollHeight-e.clientHeight)},vn=e=>{if(!e)return;e.focus();let t=window.getSelection();if(!t)return;let n=document.createRange();n.selectNodeContents(e),n.collapse(!1),t.removeAllRanges(),t.addRange(n),_n(e)},yn=e=>e.startsWith(`task-`),bn=500,X=`oh:home-prompt-draft`,xn=(e,t)=>{let{state:n,setDraftMessage:r}=Ye(e??``),i=(0,J.useRef)(null),a=(0,J.useRef)(!1),[o,s]=(0,J.useState)(!1),c=(0,J.useRef)(e),l=(0,J.useRef)(!0),u=(0,J.useRef)(``);(0,J.useEffect)(()=>{if(!e)return;let n=c.current,r=l.current;c.current=e,l.current=!1,i.current&&=(clearTimeout(i.current),null);let o=t.current;if(!r&&n&&n!==e){let t=yn(n),r=!yn(e);if(t&&r&&o){let t=Y(o).trim();if(t){Qe(e,{draftMessage:t}),a.current=!0,s(!0);return}}}o&&(o.textContent=``),a.current=!1,s(!1)},[e,t]),(0,J.useEffect)(()=>{if(a.current)return;let n=t.current;if(!n)return;if(!e){try{let e=sessionStorage.getItem(X);if(e&&Y(n).trim()===``){n.textContent=e;let t=window.getSelection(),r=document.createRange();r.selectNodeContents(n),r.collapse(!1),t?.removeAllRanges(),t?.addRange(r),u.current=e}}catch{}a.current=!0,s(!0);return}let{draftMessage:r}=Ze(e);r&&Y(n).trim()===``&&(n.textContent=r,vn(n)),a.current=!0,s(!0)},[t,e]);let d=(0,J.useCallback)(()=>{if(i.current&&clearTimeout(i.current),!e){let e=t.current;if(e){let t=Y(e).trim();u.current=t;try{t?sessionStorage.setItem(X,t):sessionStorage.removeItem(X)}catch{}}return}let a=e;i.current=setTimeout(()=>{if(a!==c.current)return;let e=t.current;if(!e)return;let i=Y(e).trim();i!==(n.draftMessage||``)&&r(i||null)},bn)},[t,n.draftMessage,r,e]),f=(0,J.useCallback)(()=>{if(i.current&&=(clearTimeout(i.current),null),!e){try{sessionStorage.removeItem(X)}catch{}return}r(null)},[e,r]);return(0,J.useEffect)(()=>()=>{if(i.current&&clearTimeout(i.current),!c.current){let e=u.current;try{e?sessionStorage.getItem(`oh:home-prompt-draft`)!==null&&sessionStorage.setItem(X,e):sessionStorage.removeItem(X)}catch{}}},[]),{saveDraft:d,clearDraft:f,isRestored:o,hasDraft:!!n.draftMessage}},Sn=()=>{let e=(0,J.useRef)(null),{conversationId:t}=K(),{messageToSend:n,messageRestoreIfEmpty:r,hasRightPanelToggled:i,setMessageToSend:a,clearMessageRestoreIfEmpty:o,setIsRightPanelShown:s}=V(),{saveDraft:c,clearDraft:l}=xn(t,e),u=t?n:null;return(0,J.useEffect)(()=>{!t||!r||(Y(e.current).trim().length===0&&a(r.text),o())},[t,r,a,o]),(0,J.useEffect)(()=>{t&&e.current&&(a(Y(e.current)),s(i))},[t,i,a,s]),{chatInputRef:e,messageToSend:u,checkIsContentEmpty:(0,J.useCallback)(()=>pn(e.current),[]),clearEmptyContentHandler:(0,J.useCallback)(()=>{mn(e.current)},[]),getCurrentMessage:(0,J.useCallback)(()=>Y(e.current),[]),saveDraft:c,clearDraft:l}},Cn=e=>{let t=(0,J.useRef)(null),n=(0,J.useRef)(null),[r,i]=(0,J.useState)(!1),a=(0,J.useCallback)((t,n)=>{e&&t.length>0&&e(t,n)},[e]);return(0,J.useEffect)(()=>{let e=e=>{let t=e.detail.files;t&&t.length>0&&a(t,{fromPaste:!0})};return document.addEventListener(`pasteFiles`,e),()=>{document.removeEventListener(`pasteFiles`,e)}},[a]),{fileInputRef:t,chatContainerRef:n,isDragOver:r,handleFileIconClick:(0,J.useCallback)(e=>{!e&&t.current&&t.current.click()},[]),handleFileInputChange:(0,J.useCallback)(e=>{a(Array.from(e.target.files||[]))},[a]),handleDragOver:(0,J.useCallback)((e,t)=>{t||(e.preventDefault(),i(!0))},[]),handleDragLeave:(0,J.useCallback)((e,t)=>{t||n.current?.contains(e.relatedTarget)||(e.preventDefault(),i(!1))},[]),handleDrop:(0,J.useCallback)((e,t)=>{t||(e.preventDefault(),i(!1),a(Array.from(e.dataTransfer.files)))},[a])}},wn=2,Tn=({elementRef:e,minHeight:t,maxHeight:n,onGripDragStart:r,onGripDragEnd:i,onHeightChange:a,onReachedMinHeight:o})=>{let s=e=>`touches`in e&&e.touches.length>0?e.touches[0].clientY:e.clientY,c=(e,t)=>{let n=document.getElementById(`resize-grip`);n&&(n.addEventListener(`touchmove`,e,{passive:!1,capture:!0}),n.addEventListener(`touchend`,t,{capture:!0}))},l=(e,t)=>{document.addEventListener(`mousemove`,e),document.addEventListener(`mouseup`,t)},u=u=>{let d=ie(),f=e.current?.offsetHeight||t,p=!1,m=i=>{if(i.preventDefault(),!p){let e=s(i);if(Math.abs(e-u)<wn)return;p=!0,r?.()}let c=s(i)-u,l=Math.max(t,Math.min(n,f-c)),d=e.current;if(!d)return;d.style.height=`${l}px`;let m=d.scrollHeight>l||l>=n;d.style.overflowY=m?`auto`:`hidden`,a&&a(l),o&&Math.abs(l-t)<=1.5&&o()},h=()=>{if(p&&i?.(),d){let e=document.getElementById(`resize-grip`);if(!e)return;e.removeEventListener(`mousemove`,m),e.removeEventListener(`mouseup`,h),e.removeEventListener(`touchmove`,m),e.removeEventListener(`touchend`,h)}else document.removeEventListener(`mousemove`,m),document.removeEventListener(`mouseup`,h),document.removeEventListener(`touchmove`,m),document.removeEventListener(`touchend`,h)};d?c(m,h):l(m,h)};return{handleGripMouseDown:e=>{e.preventDefault(),u(e.clientY)},handleGripTouchStart:e=>{e.preventDefault(),u(e.touches[0].clientY)}}},En=20,Dn=120,On=20,kn=50,An=()=>({hasUserResizedRef:(0,J.useRef)(!1),manualHeightRef:(0,J.useRef)(null)}),jn=(e,t,n)=>{let{minHeight:r,maxHeight:i}=n,a=Math.max(r,Math.min(t,i));return e.style.setProperty(`height`,`${a}px`),e.style.setProperty(`overflow-y`,a>=i?`auto`:`hidden`),a},Mn=(e,t,n=kn)=>e>t+n,Nn=(e,t)=>{let n=A(e,t),r=n;e.style.setProperty(`height`,`auto`);let i=e.scrollHeight;return j(e,n),{currentHeight:r,currentStyleHeight:n,contentHeight:i}},Pn=(e,t)=>{let{finalHeight:n,overflowY:r}=t,i=e;i.style.height=`${n}px`,i.style.overflowY=r},Z=(e,t)=>{t&&t(e)},Fn=(e,t={})=>{let n=(0,J.useRef)(null),{minHeight:r=En,maxHeight:i=Dn,enableManualResize:a=!1,value:o,onValueApplied:s,onGripDragStart:c,onGripDragEnd:l,onHeightChange:u}=t,d={minHeight:r,maxHeight:i},{hasUserResizedRef:f,manualHeightRef:p}=An(),m=()=>{f.current=!1,p.current=null},h=(0,J.useCallback)(e=>{u?.(e),f.current&&(p.current=e)},[u]),g=(0,J.useCallback)(()=>{f.current=!0,c?.()},[c]),_=(0,J.useCallback)(()=>{let t=e.current;if(t){let e=A(t,r);Math.abs(e-r)<=1.5&&(f.current=!1,p.current=null)}l?.()},[r,l]),{handleGripMouseDown:v,handleGripTouchStart:y}=Tn({elementRef:e,minHeight:r,maxHeight:i,onGripDragStart:a?g:void 0,onGripDragEnd:a?_:void 0,onHeightChange:h}),b=(0,J.useCallback)((e,t,n)=>{if(f.current&&t>r){Pn(e,{finalHeight:t,overflowY:`hidden`}),Z(t,u);return}let i=Math.max(n,r);Pn(e,{finalHeight:i,overflowY:`hidden`}),Z(i,u)},[r,u]),x=(0,J.useCallback)((e,t,n)=>{if(!Mn(t,n)){let t=Math.max(n,r);Pn(e,{finalHeight:t,overflowY:`hidden`}),Z(t,u);return}Pn(e,{finalHeight:t,overflowY:`auto`}),Z(t,u)},[r,u]),S=(0,J.useCallback)(e=>{Pn(e,{finalHeight:i,overflowY:`auto`}),Z(i,u)},[i,u]),C=(0,J.useCallback)(()=>{let t=e.current;if(!t)return;if((t.textContent??``).trim().length===0&&f.current&&p.current&&p.current>r+1.5){j(t,p.current),t.style.overflowY=`hidden`,Z(p.current,u);return}let{currentHeight:n,contentHeight:a}=Nn(t,r);if(a<=n){b(t,n,a);return}if(a<=i){x(t,n,a);return}S(t)},[e,r,i,u,b,x,S]),w=(0,J.useCallback)(()=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{n.current=null,C()})},[C]);return(0,J.useEffect)(()=>{if(o===void 0)return;let t=0,n=()=>{let t=e.current;return t?(t.textContent=o.text,w(),vn(t),s?.(),!0):!1};return n()||(t=requestAnimationFrame(()=>{n()})),()=>{t&&cancelAnimationFrame(t)}},[o,w,s]),(0,J.useEffect)(()=>{w()},[w]),{smartResize:w,handleGripMouseDown:v,handleGripTouchStart:y,increaseHeightForEmptyContent:()=>{let t=e.current;if(!t)return;let n=A(t,r),a=Math.min(n+On,i);if(a>n){let e=jn(t,a,d);Z(e,u),f.current=!0,p.current=e}},resetManualResize:m}},In=(e,t)=>{let[n,r]=(0,J.useState)(!1),[i,a]=(0,J.useState)(!1),{setShouldHideSuggestions:o,clearMessageToSend:s}=V(),c=(0,J.useRef)(null),l=(0,J.useRef)(!1),u=(0,J.useCallback)(()=>{a(!0)},[]),d=(0,J.useCallback)(()=>{a(!1),l.current=!0},[]),f=(0,J.useCallback)(e=>{if(l.current){l.current=!1,e.preventDefault(),e.stopPropagation();return}e.stopPropagation(),r(e=>!e)},[]),{smartResize:p,handleGripMouseDown:m,handleGripTouchStart:h,increaseHeightForEmptyContent:g,resetManualResize:_}=Fn(e,{minHeight:20,maxHeight:400,onHeightChange:(0,J.useCallback)(e=>{o(e>C.HEIGHT_THRESHOLD)},[o]),onGripDragStart:u,onGripDragEnd:d,value:t??void 0,onValueApplied:s,enableManualResize:!0});return{gripRef:c,isGripVisible:n,isGripDragging:i,handleTopEdgeClick:f,smartResize:p,handleGripMouseDown:m,handleGripTouchStart:h,increaseHeightForEmptyContent:g,resetManualResize:_}},Ln=(e,t,n,r,i,a,o)=>({handleInput:(0,J.useCallback)(()=>{t(),e.current&&mn(e.current),_n(e.current)},[t,e]),handlePaste:(0,J.useCallback)(e=>{e.preventDefault();let n=fn(e.clipboardData);if(n.length>0){let e=new CustomEvent(`pasteFiles`,{detail:{files:n}});document.dispatchEvent(e);return}let r=e.clipboardData.getData(`text/plain`);r&&(document.execCommand(`insertText`,!1,r),setTimeout(t,0))},[t]),handleKeyDown:(0,J.useCallback)((e,t,i)=>{if(e.key===`Enter`&&!e.nativeEvent.isComposing){if(r()){e.preventDefault(),n();return}!te()&&!e.shiftKey&&!t&&(e.preventDefault(),i())}},[r,n]),handleBlur:(0,J.useCallback)(()=>{e.current&&mn(e.current),o&&o()},[e,o]),handleFocus:(0,J.useCallback)(()=>{a&&a()},[a])}),Rn=(e,t,n,r,i)=>({handleSubmit:(0,J.useCallback)(()=>{let a=e.current?.innerText||``,o=a.trim(),{images:s,files:c}=V.getState(),l=s.length>0||c.length>0;!o&&!l||(r(a),hn(e.current),gn(t.current),n(),i?.())},[e,t,n,r,i]),handleStop:(0,J.useCallback)(e=>{e&&e()},[])}),zn=()=>Jt(q().data?.selected_workspace??void 0);function Bn(e){let t=window.getSelection();if(!t||t.rangeCount===0)return-1;let n=t.getRangeAt(0),r=n.cloneRange();return r.selectNodeContents(e),r.setEnd(n.startContainer,n.startOffset),r.toString().length}var Vn=e=>{let{data:t,isLoading:n}=zn(),r=b().backend.kind===`cloud`,{data:i,isLoading:a}=_t(),[o,s]=(0,J.useState)(!1),[c,l]=(0,J.useState)(``),[u,d]=(0,J.useState)(`command`),[f,p]=(0,J.useState)(0),m=(0,J.useMemo)(()=>{let e=N.filter(e=>e.command===`/new`?r:!0);return n||!t||t.forEach(t=>{let n=(t.triggers||[]).filter(e=>e.startsWith(`/`));n.length>0?n.forEach(n=>{e.push({skill:t,command:n})}):t.type===`agentskills`&&e.push({skill:t,command:`/${t.name}`})}),e},[t,n,r]),h=(0,J.useMemo)(()=>(i?.profiles??[]).map(e=>{let t=`${w} ${e.name}`;return{command:t,skill:{name:e.name,type:`agentskills`,content:e.model?`Switch to ${e.model}`:`Switch to this LLM profile`,triggers:[t]}}}),[i?.profiles]),g=(0,J.useMemo)(()=>{let e=u===`model-profile`?h:m;if(!c)return e;let t=c.toLowerCase();return e.filter(e=>e.command.toLowerCase().includes(t)||e.skill.name.toLowerCase().includes(t)||e.skill.content?.toLowerCase().includes(t))},[u,h,m,c]),_=(0,J.useRef)(o);_.current=o;let v=(0,J.useRef)(g);v.current=g;let y=(0,J.useRef)(f);y.current=f,(0,J.useEffect)(()=>{p(0)},[c]);let x=(0,J.useRef)(null),S=(0,J.useCallback)(()=>{let t=e.current;if(!t)return null;let n=(t.innerText||``).replace(/[\n\r]+$/,``),r=Bn(t);if(r<0)return null;let i=n.slice(0,r),a=i.match(/(^|\s)(\/model(?:\s+\S*)?)$/);if(a){let e=a[2],t=i.length-e.length,o=n.slice(r).match(/^\S*/),s=r+(o?o[0].length:0);return{kind:`model-profile`,text:e.replace(/^\/model(?:\s+)?/,``),start:t,end:s}}let o=i.match(/(^|\s)(\/\S*)$/);if(!o)return null;let s=o[2],c=i.length-s.length,l=n.slice(r).match(/^\S*/),u=r+(l?l[0].length:0);return{kind:`command`,text:s.slice(1),start:c,end:u}},[e]),C=(0,J.useCallback)(()=>{let e=S(),t=e?.kind===`model-profile`?h.length>0||a:m.length>0;e!==null&&t?(d(e.kind),l(e.text),x.current={start:e.start,end:e.end},s(!0)):(s(!1),l(``),d(`command`),x.current=null)},[S,a,h.length,m.length]),T=(0,J.useCallback)(t=>{let n=e.current;if(!n)return;let r=x.current,i=(n.innerText||``).replace(/[\n\r]+$/,``),a=`${t.command} `;if(r){n.textContent=i.slice(0,r.start)+a+i.slice(r.end);let e=r.start+a.length,t=n.firstChild;if(t){let n=document.createRange(),r=window.getSelection(),i=Math.min(e,t.textContent.length);n.setStart(t,i),n.collapse(!0),r?.removeAllRanges(),r?.addRange(n)}}else{n.textContent=a;let e=document.createRange(),t=window.getSelection();e.selectNodeContents(n),e.collapse(!1),t?.removeAllRanges(),t?.addRange(e)}s(!1),l(``),d(`command`),p(0),x.current=null,n.dispatchEvent(new InputEvent(`input`,{bubbles:!0})),n.focus()},[e]);return{isMenuOpen:o,filteredItems:g,selectedIndex:f,updateSlashMenu:C,selectItem:T,handleSlashKeyDown:(0,J.useCallback)(e=>{let t=v.current;if(!_.current||t.length===0)return!1;switch(e.key){case`ArrowDown`:return e.preventDefault(),p(e=>e<t.length-1?e+1:0),!0;case`ArrowUp`:return e.preventDefault(),p(e=>e>0?e-1:t.length-1),!0;case`Enter`:case`Tab`:{let n=t[y.current];return n?(e.preventDefault(),T(n),!0):!1}case`Escape`:return e.preventDefault(),s(!1),!0;case`ArrowLeft`:case`ArrowRight`:case`Home`:case`End`:return s(!1),!1;default:return!1}},[T]),closeMenu:(0,J.useCallback)(()=>s(!1),[])}},Q=r();function Hn({gripRef:e,isGripVisible:t,isGripDragging:n,handleTopEdgeClick:r,handleGripMouseDown:i,handleGripTouchStart:a}){return(0,Q.jsxs)(`div`,{className:`absolute top-0 left-0 w-full h-3 z-20 group`,id:`resize-grip`,onClick:r,children:[(0,Q.jsx)(`div`,{className:`absolute inset-0 z-[1] cursor-ns-resize select-none`,onMouseDown:i,onTouchStart:a,"aria-hidden":!0}),(0,Q.jsx)(`div`,{ref:e,className:P(`pointer-events-none absolute top-0 left-0 w-full h-px bg-white z-[2] transition-opacity duration-200`,t||n?`opacity-100`:`opacity-0 group-hover:opacity-100`)})]})}var Un=e=>(0,Q.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,Q.jsx)(`path`,{d:`M15.5 10C16.3284 10 17 9.32843 17 8.5C17 7.67157 16.3284 7 15.5 7C14.6716 7 14 7.67157 14 8.5C14 9.32843 14.6716 10 15.5 10Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M3 5C3 3.89543 3.89543 3 5 3H19C20.1046 3 21 3.89543 21 5V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5ZM19 5H5V12.9194L8.37534 10.2191C8.74056 9.92696 9.25951 9.92696 9.62473 10.2191L13.9258 13.66L15.2929 12.2929C15.6835 11.9024 16.3166 11.9024 16.7071 12.2929L19 14.5857V5ZM5 19H19V17.4142L16 14.4142L14.7071 15.7071C14.3468 16.0674 13.7732 16.0992 13.3753 15.7809L9.00004 12.2806L5 15.4807V19Z`,fill:`currentColor`})]}),Wn=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:17,height:17,viewBox:`0 0 17 17`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{d:`M14.2541 0.99075C15.0629 0.811957 15.8642 1.32275 16.0432 2.13138C16.222 2.94015 15.7113 3.74145 14.9026 3.92044C10.5163 4.8902 8.31751 8.22203 8.09593 11.8745L10.343 9.62942C10.863 9.10947 11.7057 9.10867 12.2258 9.62845C12.7459 10.1486 12.7459 10.9921 12.2258 11.5122L7.52073 16.2173C7.03316 16.7049 6.26163 16.7357 5.73851 16.3091L5.63694 16.2173L0.93089 11.5122C0.411068 10.9922 0.411047 10.1485 0.93089 9.62845C1.45095 9.10851 2.29457 9.10859 2.81468 9.62845L5.09691 11.9107C5.32362 7.06867 8.20704 2.32786 14.2541 0.99075Z`,fill:`currentColor`})});function Gn(){let{t:e}=a(`openhands`);return(0,Q.jsx)(`div`,{className:`drag-over`,children:(0,Q.jsxs)(`div`,{className:`drag-over-content-wrapper`,children:[(0,Q.jsxs)(`div`,{className:`relative`,children:[(0,Q.jsx)(Un,{width:36,height:36,className:`rotate-[-27deg] absolute top-[-40px] left-[-10px]`}),(0,Q.jsx)(Wn,{width:16,height:16,className:`absolute top-[-16px] left-[-20px]`})]}),(0,Q.jsx)(`div`,{className:`drag-over-content`,children:(0,Q.jsx)(`p`,{children:e(F.COMMON$DROP_YOUR_FILES_HERE)})})]})})}function Kn({onClick:e}){return(0,Q.jsx)(`button`,{type:`button`,onClick:e,className:P(`z-10 flex w-4 h-4 rounded-full items-center justify-center bg-[var(--oh-surface)] hover:bg-[var(--oh-muted)] cursor-pointer absolute top-1 right-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200`,ie()&&`opacity-100`),children:(0,Q.jsx)(he,{width:10,height:10,color:`#ffffff`})})}function qn({file:e,onRemove:t,isLoading:n=!1}){let r=oe(e.name);return(0,Q.jsxs)(`div`,{className:`group flex gap-2 rounded-lg bg-[var(--oh-interactive-hover)] max-w-[160px] px-3 py-1 relative`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col justify-center gap-0.25`,children:[(0,Q.jsx)(Kn,{onClick:t}),(0,Q.jsx)(`div`,{className:`flex items-center gap-2 w-full`,children:(0,Q.jsx)(`span`,{className:P(`text-sm font-normal leading-5 flex-1 max-w-[136px] truncate`,n?`max-w-[108px] text-[var(--oh-muted)]`:`text-white`),children:e.name})}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(Yt,{width:12,height:12,color:`var(--oh-muted)`}),(0,Q.jsx)(`span`,{className:`text-[9px] font-normal leading-5 text-[var(--oh-muted)]`,children:r})]})]}),n&&(0,Q.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,Q.jsx)(Te,{className:`animate-spin w-5 h-5`,color:`white`})})]})}function Jn({active:e,onToggle:t}){let{t:n}=a(`openhands`),r=n(F.CHAT_INTERFACE$UPLOAD_IMAGES_AS_FILES),i=n(F.CHAT_INTERFACE$DO_NOT_UPLOAD_AS_FILE),o=e?i:r;return(0,Q.jsx)(`div`,{className:`absolute bottom-2 left-1 z-10 h-4 w-4`,children:(0,Q.jsx)(He,{content:o,placement:`bottom`,offset:10,shouldFlip:!1,tooltipClassName:`bg-white text-black text-xs font-medium leading-5`,children:(0,Q.jsx)(`button`,{type:`button`,"aria-label":o,"aria-pressed":e,onClick:e=>{e.stopPropagation(),t()},className:P(`flex h-4 w-4 items-center justify-center rounded-full bg-[var(--oh-surface)] text-[var(--oh-foreground)] transition-colors cursor-pointer hover:bg-[var(--oh-muted)]`),children:e?(0,Q.jsx)(le,{width:10,height:10,strokeWidth:2.5,"aria-hidden":!0}):(0,Q.jsx)(pe,{width:10,height:10,strokeWidth:2.5,"aria-hidden":!0})})})})}function Yn({image:e,onRemove:t,isLoading:n=!1,showUploadAsFileToggle:r=!1,uploadAsFileActive:i=!1,onToggleUploadAsFile:a}){let[o,s]=J.useState(``);return J.useEffect(()=>{let t=URL.createObjectURL(e);return s(t),()=>{URL.revokeObjectURL(t)}},[e]),(0,Q.jsxs)(`div`,{className:`group relative flex h-[49px] w-[51px] min-h-[49px] min-w-[51px] items-center justify-center rounded-lg bg-[var(--oh-interactive-hover)]`,children:[n?(0,Q.jsx)(Te,{className:`animate-spin w-5 h-5`,color:`white`}):o&&(0,Q.jsx)(`img`,{src:o,alt:e.name,className:`h-full w-full rounded-lg object-cover`}),(0,Q.jsx)(Kn,{onClick:t}),r&&a&&(0,Q.jsx)(Jn,{active:i,onToggle:a})]})}function Xn(){let{images:e,files:t,loadingFiles:n,loadingImages:r,imagesMarkedUploadAsFile:i,removeFile:a,removeImage:o,toggleImageUploadAsFile:s}=V(),c=e=>{a(e)},l=e=>{o(e)};return e.length===0&&t.length===0&&n.length===0&&r.length===0?null:(0,Q.jsx)(`div`,{className:`flex w-full flex-col gap-2 pb-4`,children:(0,Q.jsxs)(`div`,{className:`flex w-full items-center gap-4 overflow-x-auto custom-scrollbar`,children:[t.map((e,t)=>(0,Q.jsx)(qn,{file:e,onRemove:()=>c(t),isLoading:n.includes(e.name)},`file-${t}-${e.name}`)),n.map((e,t)=>(0,Q.jsx)(qn,{file:new File([],e),onRemove:()=>{},isLoading:!0},`loading-file-${t}-${e}`)),e.map((e,t)=>(0,Q.jsx)(Yn,{image:e,onRemove:()=>l(t),isLoading:r.includes(e.name),showUploadAsFileToggle:!0,uploadAsFileActive:i.includes(e.name),onToggleUploadAsFile:()=>s(e.name)},`image-${t}-${e.name}`)),r.map((e,t)=>(0,Q.jsx)(Yn,{image:new File([],e),onRemove:()=>{},isLoading:!0,showUploadAsFileToggle:!0,uploadAsFileActive:i.includes(e),onToggleUploadAsFile:()=>s(e)},`loading-image-${t}-${e}`))]})})}function Zn({chatInputRef:e,disabled:t=!1,onInput:n,onPaste:r,onKeyDown:i,onFocus:o,onBlur:s}){let{t:c}=a(`openhands`),l=V(e=>e.conversationMode)===`plan`;return J.useEffect(()=>{t||vn(e.current)},[]),(0,Q.jsx)(`div`,{className:`box-border content-stretch flex flex-row items-center justify-start min-h-6 p-0 relative shrink-0 flex-1`,"data-name":`Text & caret`,children:(0,Q.jsx)(`div`,{className:`basis-0 flex flex-col font-normal grow justify-center leading-[0] min-h-px min-w-px overflow-ellipsis overflow-hidden relative shrink-0 text-[var(--oh-text-tertiary)] text-[16px] text-left`,children:(0,Q.jsx)(`div`,{ref:e,className:P(`chat-input bg-transparent text-white text-[16px] font-normal leading-[20px] outline-none resize-none custom-scrollbar min-h-[20px] max-h-[400px] [text-overflow:inherit] [text-wrap-mode:inherit] [white-space-collapse:inherit] block whitespace-pre-wrap`,t&&`cursor-not-allowed opacity-50`),contentEditable:!t,"data-placeholder":c(l?F.COMMON$LET_S_WORK_ON_A_PLAN:F.SUGGESTIONS$WHAT_TO_BUILD),"data-testid":`chat-input`,onInput:n,onPaste:r,onKeyDown:i,onFocus:o,onBlur:s})})})}function Qn({chatInputRef:e,isNewConversationPending:t=!1,onInput:n,onPaste:r,onKeyDown:i,onFocus:a,onBlur:o}){return(0,Q.jsx)(`div`,{className:`box-border content-stretch flex flex-row items-end justify-between p-0 relative shrink-0 w-full pb-[18px] gap-2`,children:(0,Q.jsx)(`div`,{className:`basis-0 box-border content-stretch flex flex-row gap-4 grow items-end justify-start min-h-px min-w-px p-0 relative shrink-0`,children:(0,Q.jsx)(Zn,{chatInputRef:e,disabled:t,onInput:n,onPaste:r,onKeyDown:i,onFocus:a,onBlur:o})})})}var $n=e(n(),1),er=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{d:`M9 6C9.55228 6 10 6.44772 10 7V17C10 17.5523 9.55228 18 9 18C8.44772 18 8 17.5523 8 17V7C8 6.44772 8.44772 6 9 6ZM15 6C15.5523 6 16 6.44772 16 7V17C16 17.5523 15.5523 18 15 18C14.4477 18 14 17.5523 14 17V7C14 6.44772 14.4477 6 15 6Z`,fill:`currentColor`})});function tr({handleStop:e}){return(0,Q.jsx)(`button`,{type:`button`,onClick:e,"data-testid":`stop-button`,className:`cursor-pointer`,children:(0,Q.jsx)(er,{className:`block max-w-none w-4 h-4 text-current`})})}var nr=e=>(0,Q.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Q.jsx)(`path`,{d:`M15 11H13V7C13 6.73478 12.8946 6.48043 12.7071 6.29289C12.5196 6.10536 12.2652 6 12 6C11.7348 6 11.4804 6.10536 11.2929 6.29289C11.1054 6.48043 11 6.73478 11 7V12C11 12.2652 11.1054 12.5196 11.2929 12.7071C11.4804 12.8946 11.7348 13 12 13H15C15.2652 13 15.5196 12.8946 15.7071 12.7071C15.8946 12.5196 16 12.2652 16 12C16 11.7348 15.8946 11.4804 15.7071 11.2929C15.5196 11.1054 15.2652 11 15 11ZM12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM12 20C10.4178 20 8.87104 19.5308 7.55544 18.6518C6.23985 17.7727 5.21447 16.5233 4.60897 15.0615C4.00347 13.5997 3.84504 11.9911 4.15372 10.4393C4.4624 8.88743 5.22433 7.46197 6.34315 6.34315C7.46197 5.22433 8.88743 4.4624 10.4393 4.15372C11.9911 3.84504 13.5997 4.00346 15.0615 4.60896C16.5233 5.21447 17.7727 6.23984 18.6518 7.55544C19.5308 8.87103 20 10.4177 20 12C20 14.1217 19.1572 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20Z`,fill:`currentColor`})}),rr=e=>(0,Q.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Q.jsx)(`path`,{d:`M8 8.37911C8 7.31633 9.15785 6.65415 10.0798 7.18966L16.3139 10.8105C17.2287 11.3419 17.2287 12.6581 16.3139 13.1895L10.0798 16.8103C9.15785 17.3459 8 16.6837 8 15.6209V8.37911Z`,fill:`currentColor`})});function ir({onAgentResumed:e,disabled:t=!1}){return(0,Q.jsx)(`button`,{type:`button`,onClick:e,"data-testid":`play-button`,disabled:t,className:P(`cursor-pointer`,t&&`cursor-not-allowed`),children:(0,Q.jsx)(rr,{className:`block max-w-none w-4 h-4 text-current`})})}function ar(){return(0,Q.jsx)(`div`,{"data-testid":`agent-loading-spinner`,children:(0,Q.jsx)(Te,{className:`animate-spin w-4 h-4 text-current`})})}function or(){let e=Rt();return e?e.connectionState:`CLOSED`}var sr=Xe()((e,t)=>({byTaskId:{},setPendingTaskAttachments:(t,n)=>e(e=>({byTaskId:{...e.byTaskId,[t]:n}})),consumePendingTaskAttachments:n=>{let r=t().byTaskId[n];return r?(e(e=>{let{[n]:t,...r}=e.byTaskId;return{byTaskId:r}}),r):null}}));function cr(e,t){sr.getState().setPendingTaskAttachments(e,t)}function lr(e){return sr.getState().consumePendingTaskAttachments(e)}var ur=e=>new Promise((t,n)=>{let r=new FileReader;r.onloadend=()=>{t(r.result)},r.onerror=n,r.readAsDataURL(e)}),dr=3*1024*1024,fr=3*1024*1024;function pr(e){let t=e.filter(e=>e.size>dr);if(t.length>0){let e=t.map(e=>e.name);return{isValid:!1,errorMessage:`Files exceeding 3MB are not allowed: ${e.join(`, `)}`,oversizedFiles:e}}return{isValid:!0}}function mr(e,t=[]){let n=t.reduce((e,t)=>e+t.size,0)+e.reduce((e,t)=>e+t.size,0);return n>fr?{isValid:!1,errorMessage:`Total file size would be ${(n/(1024*1024)).toFixed(1)}MB, exceeding the 3MB limit. Please select fewer or smaller files.`}:{isValid:!0}}function hr(e,t=[]){let n=pr(e);return n.isValid?mr(e,t):n}async function gr(e){let{conversationId:t,content:n,images:r,files:i,imagesMarkedUploadAsFile:a,t:o}=e,{imagesToEmbed:s,imagesAsFiles:c}=dn(r,a),l=[...i,...c],u=hr([...s,...l]);if(!u.isValid)throw Error(u.errorMessage??`Invalid attachments`);let d=await Promise.all(s.map(e=>ur(e))),f=await mt(t),{skipped_files:p,uploaded_files:m}=l.length>0?await ht(t,l):{skipped_files:[],uploaded_files:[]};p.forEach(e=>y(e.reason));let h=`${o(F.CHAT_INTERFACE$AUGMENTED_PROMPT_FILES_TITLE)}: ${m.join(`
|
|
2
|
-
|
|
3
|
-
`)}`,g=m.length>0?`${n}\n\n${h}`:n,_=new Date().toISOString(),v={role:`user`,content:[{type:`text`,text:g}]};return d.length>0&&v.content.push({type:`image`,image_urls:d}),await H.sendMessage(t,v,f),{text:n,content:g,imageUrls:d,fileUrls:m,timestamp:_}}async function _r(e,t){let n=lr(e);if(n)try{await _(),await gr({conversationId:t,content:n.content,images:n.images,files:n.files,imagesMarkedUploadAsFile:n.imagesMarkedUploadAsFile,t:f.getFixedT(null,S)})}catch(e){throw y(e instanceof Error?e.message:null),e}}var vr=new Map,yr=null;function br(e,t){vr.set(e,t)}function xr(e){vr.delete(e)}function Sr(e,t){yr={fromConversationId:e,toConversationId:t}}function Cr(e){if(yr?.toConversationId!==e)return null;let t=yr;return yr=null,t}function wr(e,t){return t===e?!0:vr.get(e)===t}var Tr=(e,t)=>{let n=e.request.plugins?.map(nt);if(!n?.length)return;let r=rt(t);tt(t,{...r,selected_repository:r?.selected_repository??e.request.selected_repository??null,selected_branch:r?.selected_branch??e.request.selected_branch??null,git_provider:r?.git_provider??e.request.git_provider??null,plugins:n})},Er=()=>{let{conversationId:e}=K(),t=!!e&&e.startsWith(`task-`),n=t?e.replace(`task-`,``):null,r=c({queryKey:[`start-task`,n],queryFn:async()=>n?H.getStartTask(n):null,enabled:!!n,refetchInterval:e=>{let t=e.state.data;return!t||t.status===`READY`||t.status===`ERROR`?!1:3e3},retry:!1});return{isTask:t,taskId:n,conversationId:t?null:e??null,task:r.data,taskStatus:r.data?.status,taskDetail:r.data?.detail,taskError:r.error,isLoadingTask:r.isLoading,repositoryInfo:{selectedRepository:r.data?.request?.selected_repository,selectedBranch:r.data?.request?.selected_branch,gitProvider:r.data?.request?.git_provider}}},Dr=()=>{let e=Er(),{task:t,taskId:n}=e,{conversationId:r}=K(),{navigate:i}=ze(),a=(0,J.useRef)(null);return(0,J.useLayoutEffect)(()=>{if(!r)return;let e=Cr(r);e&&(qt.getState().reassignPendingMessages(e.fromConversationId,e.toConversationId),xr(e.toConversationId))},[r]),(0,J.useEffect)(()=>{let e=t?.app_conversation_id;!n||t?.status!==`READY`||!e||a.current===n||(a.current=n,we(n,e),Tr(t,e),(async()=>{await _r(n,e);let t=`task-${n}`;br(e,t),Sr(t,e);let r=$e(n);r&&Qe(e,{draftMessage:r}),i(`/conversations/${e}`,{replace:!0})})())},[t,n,i]),e},Or=(e,t)=>{let n=c({queryKey:[`sub-conversation-task`,e],queryFn:async()=>e?H.getStartTask(e):null,enabled:!!e&&!!t,refetchInterval:e=>{let t=e.state.data;return!t||t.status===`READY`||t.status===`ERROR`?!1:3e3},retry:!1});return{task:n.data,taskStatus:n.data?.status,taskDetail:n.data?.detail,taskError:n.error,isLoadingTask:n.isLoading,subConversationId:n.data?.app_conversation_id}},kr=`/assets/notification-Cyeyy5ud.mp3`,Ar=[E.AWAITING_USER_INPUT,E.FINISHED,E.AWAITING_USER_CONFIRMATION];function jr(e){let{data:t}=B(),n=(0,J.useRef)(void 0),r=(0,J.useRef)(void 0);(0,J.useEffect)(()=>{typeof window<`u`&&!n.current&&(n.current=new Audio(kr),n.current.volume=.5)},[]);let i=t?.enable_sound_notifications??!1;(0,J.useEffect)(()=>{r.current!==e&&(r.current=e,Ar.includes(e)&&i&&n.current&&(n.current.currentTime=0,n.current.play().catch(()=>{})))},[e,i])}function Mr({className:e=``,handleStop:t,handleResumeAgent:n,disabled:r=!1,isPausing:i=!1}){let{t:o}=a(`openhands`),{setShouldShownAgentLoading:s}=V(),{curAgentState:c,executionStatus:l}=It();jr(c);let u=or(),{data:d}=q(),{taskStatus:f}=Er(),{subConversationTaskId:p}=V(),{taskStatus:m}=Or(p,d?.id||null),h=se(u,l??null,f,m),g=c===E.INIT||c===E.LOADING||u===`CONNECTING`&&f!==`ERROR`||M(f)||M(m),_=g||i,v=c===E.ERROR||c===E.RATE_LIMITED||u===`CLOSED`||f===`ERROR`,y=!v&&c===E.RUNNING,b=!v&&(c===E.STOPPED||c===E.PAUSED),x=!_&&(y||b),S=h===F.CHAT_INTERFACE$AGENT_FINISHED_MESSAGE,C=h===F.AGENT_STATUS$WAITING_FOR_TASK,w=S||C,[T,D]=(0,J.useState)(!0),[O,k]=(0,J.useState)(!1);return(0,J.useEffect)(()=>{s(!!g)},[g,s]),(0,J.useEffect)(()=>{if(!w){D(!0),k(!1);return}D(!0),k(!1);let e=window.setTimeout(()=>{k(!0)},1e3),t=window.setTimeout(()=>{D(!1)},1500);return()=>{window.clearTimeout(e),window.clearTimeout(t)}},[w]),w&&!T?null:(0,Q.jsxs)(`div`,{className:P(`flex items-center gap-1 min-w-0`,w&&`transition-opacity duration-500`,O&&`opacity-0`,e),children:[(0,Q.jsx)(`span`,{className:`text-[11px] text-[var(--oh-muted)] font-normal leading-5 min-w-0 max-w-full truncate`,title:o(h),children:o(h)}),(0,Q.jsxs)(`div`,{className:P(`box-border content-stretch flex flex-row gap-[3px] items-center justify-center overflow-clip px-0.5 py-1 relative rounded-[100px] shrink-0 size-6 transition-all duration-200 active:scale-95 bg-transparent text-[var(--oh-muted)] hover:bg-white/10 hover:text-white`,x?`cursor-pointer`:`cursor-default`),children:[_&&(0,Q.jsx)(ar,{}),!_&&y&&(0,Q.jsx)(tr,{handleStop:t}),!_&&b&&(0,Q.jsx)(ir,{onAgentResumed:n,disabled:r}),!_&&v&&(0,Q.jsx)(xe,{className:`w-4 h-4 text-current`,"data-testid":`circle-error-icon`}),!_&&!y&&!b&&!v&&(w?(0,Q.jsx)(de,{className:`w-4 h-4 text-current`}):(0,Q.jsx)(nr,{className:`w-4 h-4 text-current`}))]})]})}function Nr(e){return(0,Q.jsx)(`svg`,{viewBox:`0 0 257 183`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,...e,children:(0,Q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M151.663 5.36257C158.763 -1.73743 170.363 -1.83743 177.563 5.36257L250.663 78.4626C257.763 85.5626 257.863 97.1626 250.663 104.363L177.563 177.463C170.363 184.563 158.863 184.563 151.663 177.463C144.563 170.263 144.563 158.763 151.663 151.563L211.863 91.3626L151.663 31.1626C144.563 24.1626 144.563 12.5626 151.663 5.36257ZM104.463 5.36257C97.3626 -1.73743 85.7626 -1.83743 78.5626 5.36257L5.36257 78.4626C-1.73743 85.5626 -1.83743 97.1626 5.36257 104.363L78.4626 177.463C85.6626 184.563 97.1626 184.563 104.363 177.463C111.463 170.263 111.463 158.763 104.363 151.563L44.1626 91.4626L104.363 31.2626C111.563 24.1626 111.563 12.5626 104.463 5.36257Z`,fill:`currentColor`})})}function Pr({icon:e,text:t,className:n,iconClassName:r,isActive:i=!1}){return(0,Q.jsxs)(`div`,{className:P(`flex min-w-0 items-center`,Ue,n),children:[(0,Q.jsx)(e,{className:P(`h-4 w-4`,Ke,r)}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 leading-5`,children:t}),i&&(0,Q.jsx)(Mt,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]})}function Fr({icon:e,title:t,description:n,className:r,iconClassName:i,isActive:a=!1}){return(0,Q.jsxs)(`div`,{className:P(`flex min-w-0 w-full flex-col justify-center gap-1`,r),children:[(0,Q.jsx)(Pr,{icon:e,text:t,className:`px-0`,iconClassName:i,isActive:a}),(0,Q.jsx)(G.Text,{className:`text-[var(--oh-muted)] text-[10px] font-normal whitespace-pre-wrap break-words`,children:n})]})}function Ir({activeMode:e,onClose:t,onCodeClick:n,onPlanClick:r}){let{t:i}=a(`openhands`),o=gt(t);return(0,Q.jsxs)(U,{ref:o,testId:`change-agent-context-menu`,position:`top`,alignment:`left`,className:`min-h-fit mb-2 min-w-[195px] max-w-[195px]`,children:[(0,Q.jsx)(W,{testId:`code-option`,onClick:e=>{e.preventDefault(),e.stopPropagation(),n?.(e),t()},className:P(e===`code`&&`bg-[var(--oh-interactive-hover)]`),children:(0,Q.jsx)(Fr,{icon:Xt,title:i(F.COMMON$CODE),description:i(F.COMMON$CODE_AGENT_DESCRIPTION),isActive:e===`code`})}),(0,Q.jsx)(W,{testId:`plan-option`,onClick:e=>{e.preventDefault(),e.stopPropagation(),r?.(e),t()},className:P(e===`plan`&&`bg-[var(--oh-interactive-hover)]`),children:(0,Q.jsx)(Fr,{icon:Wt,title:i(F.COMMON$PLAN),description:i(F.COMMON$PLAN_AGENT_DESCRIPTION),isActive:e===`plan`})})]})}var Lr=()=>{let{t:e}=a(`openhands`),{setConversationMode:t,setSubConversationTaskId:n,subConversationTaskId:r}=V(),{data:i}=q(),{mutate:o,isPending:s}=St();return(0,J.useEffect)(()=>{if(!i?.id)return;let e=Ze(i.id);e.subConversationTaskId&&!r&&n(e.subConversationTaskId)},[i?.id,r,n]),{handlePlanClick:(0,J.useCallback)(a=>{a?.preventDefault(),a?.stopPropagation(),t(`plan`),!(i?.sub_conversation_ids&&i.sub_conversation_ids.length>0||!i?.id||r)&&o({parentConversationId:i.id,agentType:`plan`,entryPoint:`plan_sub_conversation`},{onSuccess:t=>{d(e(F.PLANNING_AGENTT$PLANNING_AGENT_INITIALIZED)),t.task_id&&(n(t.task_id),Qe(i.id,{subConversationTaskId:t.task_id}))}})},[i,o,t,n,r,e]),isCreatingConversation:s}};function Rr(){let[e,t]=(0,J.useState)(!1),{conversationMode:n,setConversationMode:r,subConversationTaskId:o}=V(),{conversationId:s}=K(),c=!s,l=or()===`OPEN`,{curAgentState:u}=It(),{t:d}=a(`openhands`),f=u===E.RUNNING,{data:p}=q(),m=i(),h=(0,J.useRef)(null),{taskStatus:g,subConversationId:_}=Or(o,p?.id||null);(0,J.useEffect)(()=>{g===`READY`&&_&&p?.id&&o&&h.current!==o&&(h.current=o,m.invalidateQueries({queryKey:[`user`,`conversation`,p.id]}))},[g,_,p?.id,o,m]);let{handlePlanClick:v,isCreatingConversation:y}=Lr();(0,J.useEffect)(()=>{(f||!l)&&e&&t(!1)},[f,e,l]);let b=c||f||y||!l;(0,J.useEffect)(()=>{if(b)return;let e=e=>{if(e.shiftKey&&e.key===`Tab`){e.preventDefault(),e.stopPropagation();let t=n===`code`?`plan`:`code`;t===`plan`?v(e):r(t)}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[b,n,r,v]);let x=n=>{n.preventDefault(),n.stopPropagation(),t(!e)},S=e=>{e.preventDefault(),e.stopPropagation(),r(`code`)},C=n===`code`,w=(0,J.useMemo)(()=>d(C?F.COMMON$CODE:F.COMMON$PLAN),[C,d]),T=(0,J.useMemo)(()=>C?(0,Q.jsx)(Nr,{className:`h-[11px] w-[11px] shrink-0`}):(0,Q.jsx)(Wt,{width:18,height:18,color:`currentColor`}),[C]),D=(0,Q.jsxs)(`div`,{className:`relative`,children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:x,disabled:b,className:P(`flex items-center rounded-[100px]`,Pe,C?`border border-transparent text-[var(--oh-muted)]`:`border border-[#597FF4] bg-[#4A67BD]`,!b&&C&&P(`cursor-pointer`,`hover:text-white hover:bg-white/10`),!b&&!C&&`cursor-pointer text-white hover:bg-[#597FF4]`,b&&P(`opacity-50 cursor-not-allowed`,C&&`border-transparent`)),children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 pl-1.5`,children:[T,(0,Q.jsx)(G.Text,{className:`text-2.75 not-italic font-normal leading-5`,children:w})]}),(0,Q.jsx)(qe,{isOpen:e})]}),e&&(0,Q.jsx)(Ir,{activeMode:n,onClose:()=>t(!1),onCodeClick:S,onPlanClick:v})]});return c?(0,Q.jsx)(He,{content:d(F.CHANGE_AGENT$SWITCH_AFTER_CONVERSATION),placement:`top`,children:D}):D}function zr(){let{data:e,isLoading:t}=yt(),n=e?.active_agent_profile_id??null;return{activeProfile:e?.profiles?.find(e=>e.id!=null&&e.id===n)??null,isLoading:t}}function Br(){let{activeProfile:e}=zr();return e?.agent_kind}var Vr=`/settings/agents`,Hr=`/settings/llm`;function Ur(){let{t:e}=a(`openhands`),{backend:t}=b(),{data:n}=q(),{data:r}=B(),i=Br(),o=n?.agent_kind===`acp`,s=!n&&(i??r?.agent_settings?.agent_kind)===`acp`,c=o||s;return{isActiveAcpConversation:o,isHomeAcp:s,isAcpContext:c,destinationPath:c?Vr:Hr,destinationLabel:e(c?F.SETTINGS$NAV_AGENT:t.kind===`cloud`?F.SETTINGS$LLM_SETTINGS:F.SETTINGS$LLM_PROFILES)}}function Wr(e,t,n){return[...v.all,e,t,`detail`,n]}function Gr(){let{backend:e,orgId:t}=b(),{conversationId:n}=K(),{activeProfile:r}=zr(),i=r?.agent_kind===`acp`?r.name:null,{data:a}=c({queryKey:Wr(e.id,t,i??``),queryFn:()=>vt.getProfile(i),enabled:!n&&i!=null,...p,...u,meta:{disableToast:!0}}),o=a?.profile;return o?.agent_kind===`acp`?o:null}function Kr(){let{data:e}=q(),{data:t}=B(),{conversationId:n}=K(),{backend:r}=b(),i=Dt(),a=Gr(),{isActiveAcpConversation:o,isHomeAcp:s,isAcpContext:c,destinationPath:l,destinationLabel:u}=Ur(),d=typeof t?.agent_settings?.acp_server==`string`?t.agent_settings.acp_server:null,f=o?e?.acp_server:s?a?.acp_server??d:null,p=c?st(f):void 0,m=typeof t?.agent_settings?.acp_model==`string`?t.agent_settings.acp_model:null,h=s&&a?a.acp_model:m,g=null;g=o?e?.llm_model??at({configured:h,providerDefault:ot(f)}):s?at({configured:h,providerDefault:ot(f)}):e?.llm_model??t?.llm_model??null;let _=g&&c?ct(f,g)??g:g,v=p?.available_models??[],y=!s||r.kind!==`cloud`||i,x=c&&v.length>0&&y;return{isAcpContext:c,displayModel:_,currentModelId:g,availableAcpModels:v,showAcpPicker:x,switchConversationId:o?n??null:null,destinationPath:l,destinationLabel:u}}var qr=()=>{let e=i(),{backend:t,orgId:n}=b();return s({mutationFn:async({conversationId:r,model:i})=>{if(r){await H.switchAcpModel(r,i);return}let a;try{a=await e.ensureQueryData({queryKey:[...v.all,t.id,n],queryFn:vt.listProfiles,...u})}catch{}let o=a?.profiles?.find(e=>e.id!=null&&e.id===a?.active_agent_profile_id);if(o?.agent_kind===`acp`){let r=await e.ensureQueryData({queryKey:Wr(t.id,n,o.name),queryFn:()=>vt.getProfile(o.name),...u});await vt.saveProfile(o.name,Qt(r.profile,{agent_kind:`acp`,acp_model:i}));return}await Ae.saveSettings({agent_settings_diff:{acp_model:i}})},onSuccess:(t,{conversationId:n})=>{n?pt(e,n):(Ae.invalidateCache(),e.invalidateQueries({queryKey:g.personal()}),e.invalidateQueries({queryKey:v.all}))}})},Jr=10,Yr=22;function Xr(e,t=Jr){return e.length<=t?e:`${e.slice(0,t)}…`}function Zr({model:e,onClose:t,dividerInset:n,settingsLinkClassName:r,settingsIconClassName:i}){let{t:o}=a(`openhands`),s=qr(),c=e.showAcpPicker||!!e.displayModel,l=n=>{n!==e.currentModelId&&s.mutate({conversationId:e.switchConversationId,model:n}),t()};return(0,Q.jsxs)(Q.Fragment,{children:[e.showAcpPicker?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`li`,{role:`presentation`,className:`px-2 pt-1 pb-0.5`,children:(0,Q.jsx)(G.Text,{className:`text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4`,children:o(F.MODEL$AVAILABLE_MODELS)})}),e.availableAcpModels.map(t=>{let n=t.id===e.currentModelId;return(0,Q.jsxs)(W,{testId:`chat-input-acp-model-option-${t.id}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),l(t.id)},className:P(`flex items-center gap-2`,n&&`bg-[var(--oh-interactive-hover)]`),children:[(0,Q.jsx)(`span`,{className:`flex-1 truncate text-sm leading-5`,title:t.label,children:t.label}),n&&(0,Q.jsx)(Mt,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]},t.id)})]}):e.displayModel?(0,Q.jsx)(`li`,{className:`text-sm`,children:(0,Q.jsx)(`div`,{className:`p-2 leading-5 text-[var(--oh-foreground)] break-all`,children:e.displayModel})}):null,c&&(0,Q.jsx)(z,{inset:n}),(0,Q.jsx)(`li`,{className:`text-sm`,children:(0,Q.jsxs)(Be,{to:e.destinationPath,onClick:t,className:P(`flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors`,r),children:[(0,Q.jsx)($t,{width:16,height:16,className:P(`shrink-0`,i),"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:e.destinationLabel})]})})]})}function Qr(){let e=Kr(),[t,n]=J.useState(!1),r=J.useRef(null),i=gt(()=>n(!1),r);if(!e.displayModel)return null;let a=Xr(e.displayModel,e.isAcpContext?Yr:Jr);return(0,Q.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,Q.jsxs)(`button`,{ref:r,type:`button`,className:Fe,title:e.displayModel,"data-testid":`chat-input-llm-model`,"aria-expanded":t,"aria-haspopup":`dialog`,onClick:e=>{e.preventDefault(),e.stopPropagation(),n(e=>!e)},children:[(0,Q.jsx)(`span`,{children:a}),(0,Q.jsx)(qe,{isOpen:t})]}),t&&(0,Q.jsx)(U,{ref:i,testId:`chat-input-llm-model-popover`,position:`top`,alignment:`left`,spacing:`none`,className:`z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto`,children:(0,Q.jsx)(Zr,{model:e,onClose:()=>n(!1)})})]})}var $r=[`switch-llm-profile`],ei=()=>{let e=i(),{t}=a();return s({mutationKey:$r,mutationFn:({conversationId:e,profileName:t})=>H.switchProfile(e,t),meta:{disableToast:!0},onMutate:({conversationId:e})=>({anchorEventId:e?zt():null}),onError:(e,{profileName:n})=>{let r=t(F.MODEL$SWITCH_FAILED,{name:n});y(h(e)||r)},onSuccess:(t,{conversationId:n,profileName:r},i)=>{if(e.invalidateQueries({queryKey:m.all}),n){pt(e,n),Ht(n,r,i?.anchorEventId??null);let t=rt(n);tt(n,{selected_repository:t?.selected_repository??null,selected_branch:t?.selected_branch??null,git_provider:t?.git_provider??null,selected_workspace:t?.selected_workspace??null,active_profile:r,plugins:t?.plugins??null})}else Ae.invalidateCache(),e.invalidateQueries({queryKey:g.personal()})}})};function ti(){let{mutate:e,isPending:t}=ei();return{switchAndLog:(0,J.useCallback)((t,n)=>{e({conversationId:t,profileName:n})},[e]),isPending:t}}function ni(){let{conversationId:e}=K(),{data:t}=q(),{data:n,isLoading:r}=_t(),i=Dt(),{switchAndLog:a}=ti(),o=l({mutationKey:$r})>0,s=Vt(t=>e?t.activeProfileByConversation[e]:void 0),c=n?.profiles??[],u=t?.llm_model??null,d=t?.active_profile??null,f=d&&c.some(e=>e.name===d)?d:null,p=s??f??(u?c.find(e=>e.model===u)?.name??null:n?.active_profile??null),m=c.find(e=>e.name===p)?.model??u??null,h=!(e?.startsWith(`task-`)??!1)&&(!!e||i);return{profiles:c,currentProfileName:p,currentProfileModel:m,isLoading:r,isSwitching:o,canSwitchProfile:h,selectProfile:(0,J.useCallback)(t=>{!h||t===p||a(e,t)},[h,e,p,a])}}var ri=18;function ii(e){return e.length<=ri?e:`${e.slice(0,ri)}…`}function ai({onClose:e,dividerInset:t,settingsLinkClassName:n,settingsIconClassName:r}){let{t:i}=a(`openhands`),{profiles:o,currentProfileName:s,currentProfileModel:c,canSwitchProfile:l,selectProfile:u}=ni(),d=l&&o.length>0,f=l?null:s,p=t=>{u(t),e()};return(0,Q.jsxs)(Q.Fragment,{children:[d&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`li`,{role:`presentation`,className:`px-2 pt-1 pb-0.5`,children:(0,Q.jsx)(G.Text,{className:`text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4`,children:i(F.SETTINGS$AVAILABLE_PROFILES)})}),o.map(t=>{let n=t.name===s;return(0,Q.jsxs)(W,{testId:`chat-input-llm-profile-option-${t.name}`,onClick:r=>{if(r.preventDefault(),r.stopPropagation(),n){e();return}p(t.name)},className:P(`flex flex-col items-stretch gap-0.5`,n&&`bg-[var(--oh-interactive-hover)]`),children:[(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`flex-1 truncate text-sm leading-5`,title:t.model??t.name,children:t.name}),n&&(0,Q.jsx)(Mt,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]}),t.model&&(0,Q.jsx)(`span`,{className:`block truncate text-xs leading-4 text-[var(--oh-muted)]`,children:t.model})]},t.name)})]}),f&&(0,Q.jsx)(`li`,{className:`text-sm`,"data-testid":`chat-input-llm-profile-current`,children:(0,Q.jsxs)(`div`,{className:`flex flex-col gap-0.5 p-2 leading-5 text-[var(--oh-foreground)]`,children:[(0,Q.jsx)(`span`,{className:`truncate`,title:f,children:f}),c&&(0,Q.jsx)(`span`,{className:`truncate text-xs leading-4 text-[var(--oh-muted)]`,children:c})]})}),(d||f)&&(0,Q.jsx)(z,{inset:t}),(0,Q.jsx)(`li`,{className:`text-sm`,children:(0,Q.jsxs)(Be,{to:`/settings/llm`,onClick:e,className:P(`flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors`,n),children:[(0,Q.jsx)($t,{width:16,height:16,className:P(`shrink-0`,r),"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:i(F.SETTINGS$LLM_PROFILES)})]})})]})}function oi(){let{t:e}=a(`openhands`),{profiles:t,currentProfileName:n,isLoading:r,isSwitching:i}=ni(),[o,s]=J.useState(!1),c=J.useRef(null),l=gt(()=>s(!1),c);if(r||t.length===0)return null;let u=n??e(F.LLM$SELECT_MODEL_PLACEHOLDER);return(0,Q.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,Q.jsxs)(`button`,{ref:c,type:`button`,className:P(Fe,`max-w-[200px]`),title:n??void 0,"data-testid":`chat-input-llm-profile`,"aria-expanded":o,"aria-haspopup":`dialog`,disabled:i,"aria-busy":i,onClick:e=>{e.preventDefault(),e.stopPropagation(),s(e=>!e)},children:[(0,Q.jsx)(`span`,{className:`truncate`,children:ii(u)}),(0,Q.jsx)(qe,{isOpen:o})]}),o&&(0,Q.jsx)(U,{ref:l,testId:`chat-input-llm-profile-popover`,position:`top`,alignment:`left`,spacing:`none`,className:`z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto`,children:(0,Q.jsx)(ai,{onClose:()=>s(!1)})})]})}function si({isLoadingHistory:e,hasUserEvents:t,hasPendingUserMessages:n,hasSubstantiveAgentActions:r,hasModelEntries:i}){return e||t||n||r||i}function ci({isAcp:e}){return e?`model`:`llm-profile`}var li=()=>{let e=i(),{t}=a();return s({mutationFn:e=>H.updateConversationPublicFlag(e.conversationId,e.isPublic),onMutate:async t=>{let n=[`user`,`conversation`,t.conversationId];await e.cancelQueries({queryKey:n});let r=e.getQueriesData({queryKey:n});return e.setQueriesData({queryKey:n},e=>e&&typeof e==`object`?{...e,public:t.isPublic}:e),{previousEntries:r}},onError:(n,r,i)=>{i?.previousEntries?.forEach(([t,n])=>{e.setQueryData(t,n)}),y(t(F.CONVERSATION$FAILED_TO_UPDATE_PUBLIC_SHARING))},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]}),e.invalidateQueries({queryKey:[`user`,`conversations`]})}})},ui=`<secret-hidden>`;function di(e){let t=/(<CUSTOM_SECRETS>)([\s\S]*?)(<\/CUSTOM_SECRETS>|$)/gi,n=/^(\s*[^=:\n]+?\s*[:=]\s*)(.+?)\s*$/gm;return e.replace(t,(e,t,r,i)=>`${t}${r.replace(n,(e,t,n)=>n===ui?e:`${t}${ui}`)}${i}`)}function fi(e){let t=e.find(Lt);if(!t)return null;let n=t.dynamic_context?.text;return{content:n?`${t.system_prompt.text.trimEnd()}\n\n${di(n)}`:t.system_prompt.text,tools:t.tools??null,openhands_version:null,agent_class:null}}function pi({conversationId:e,executionStatus:t,showOptions:n=!1,onContextMenuToggle:r}){let{t:i}=a(),{conversationId:o,navigate:s}=ze(),{backend:c}=b(),l=Kt(e=>e.events),{mutate:u}=ve(),{mutate:f}=ge(),{mutate:p}=li(),{data:m}=q(),h=Bt(),[g,_]=J.useState(!1),[v,y]=J.useState(!1),[x,S]=J.useState(!1),[C,w]=J.useState(!1),[T,E]=J.useState(!1),[D,k]=J.useState(!1),[A,j]=J.useState(!1),{mutateAsync:M}=ye(),N=fi(l),ee=e=>{e.preventDefault(),e.stopPropagation(),k(!0),r?.(!1)},te=e=>{e.preventDefault(),e.stopPropagation(),j(!0),r?.(!1)},ne=()=>{e&&u({conversationId:e},{onSuccess:()=>{e===o&&s(`/conversations`)}}),k(!1)},re=()=>{e&&f({conversationId:e}),j(!1)},ie=e=>{e.preventDefault(),e.stopPropagation(),r?.(!1)},ae=async t=>{t.preventDefault(),t.stopPropagation(),e&&await M(e),r?.(!1)},oe=e=>{e.stopPropagation(),_(!0),r?.(!1)},P=e=>{e.stopPropagation(),y(!0),r?.(!1)},se=e=>{e.stopPropagation(),S(!0),r?.(!1)},ce=e=>{e.stopPropagation(),w(!0),r?.(!1)},le=e=>{e.stopPropagation(),E(!0),r?.(!1)},ue=t=>{e&&m&&p({conversationId:e,isPublic:t??!m.public})},I=J.useMemo(()=>e?`${c.kind===`cloud`?c.host.replace(/\/+$/,``):window.location.origin}/shared/conversations/${e}`:``,[e,c.kind,c.host]);return{handleDelete:ee,handleStop:te,handleEdit:ie,handleDownloadConversation:ae,handleDisplayCost:oe,handleShowAgentTools:P,handleShowSkills:se,handleShowPlugins:ce,handleShowHooks:le,handleTogglePublic:ue,handleCopyShareLink:e=>{if(e.preventDefault(),e.stopPropagation(),!I){r?.(!1);return}navigator.clipboard.writeText(I),d(i(F.CONVERSATION$LINK_COPIED))},shareUrl:I,handleConfirmDelete:ne,handleConfirmStop:re,metricsModalVisible:g,setMetricsModalVisible:_,systemModalVisible:v,setSystemModalVisible:y,skillsModalVisible:x,setSkillsModalVisible:S,pluginsModalVisible:C,setPluginsModalVisible:w,hooksModalVisible:T,setHooksModalVisible:E,confirmDeleteModalVisible:D,setConfirmDeleteModalVisible:k,confirmStopModalVisible:A,setConfirmStopModalVisible:j,metrics:h,systemMessage:N,shouldShowStop:O(t),shouldShowDownloadConversation:!!(e&&n),shouldShowDisplayCost:n,shouldShowAgentTools:!!(n&&N),shouldShowSkills:!!(n&&e),shouldShowPlugins:!!(n&&e&&(rt(e)?.plugins?.length??0)>0),shouldShowHooks:!!(n&&e&&O(t))}}var mi=e=>(0,Q.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Q.jsx)(`path`,{d:`M17 6.05994C16.3065 6.0604 15.6345 6.30114 15.0985 6.74118C14.5625 7.18123 14.1954 7.7934 14.0599 8.47355C13.9243 9.1537 14.0286 9.85981 14.355 10.4717C14.6813 11.0837 15.2097 11.5636 15.85 11.8299C15.6978 12.1949 15.4408 12.5065 15.1115 12.7254C14.7822 12.9444 14.3954 13.0608 14 13.0599H10C9.29505 13.0629 8.604 13.2564 8.00001 13.6199V7.87994C8.66722 7.64405 9.22956 7.17987 9.58764 6.56946C9.94571 5.95905 10.0765 5.2417 9.9568 4.54421C9.83713 3.84671 9.47473 3.21398 8.93367 2.75784C8.3926 2.30169 7.70769 2.05151 7.00001 2.05151C6.29232 2.05151 5.60741 2.30169 5.06635 2.75784C4.52528 3.21398 4.16288 3.84671 4.04321 4.54421C3.92354 5.2417 4.0543 5.95905 4.41237 6.56946C4.77045 7.17987 5.33279 7.64405 6.00001 7.87994V16.2399C5.34099 16.4769 4.78566 16.937 4.43026 17.5405C4.07485 18.1439 3.94176 18.8527 4.05406 19.544C4.16635 20.2352 4.51695 20.8654 5.0451 21.3254C5.57325 21.7853 6.24567 22.0459 6.94581 22.0621C7.64596 22.0783 8.32971 21.8491 8.87857 21.4141C9.42744 20.9791 9.80683 20.3658 9.95099 19.6805C10.0952 18.9951 9.995 18.281 9.6679 17.6617C9.34079 17.0425 8.80735 16.5572 8.16001 16.2899C8.31158 15.9266 8.56704 15.616 8.89436 15.3972C9.22168 15.1784 9.60629 15.0611 10 15.0599H14C14.9148 15.0598 15.802 14.746 16.5135 14.171C17.225 13.5959 17.7179 12.7944 17.91 11.8999C18.5786 11.6728 19.1456 11.217 19.5113 10.613C19.8769 10.0089 20.0178 9.29524 19.9091 8.59754C19.8004 7.89984 19.449 7.26285 18.9169 6.79869C18.3848 6.33452 17.706 6.07292 17 6.05994ZM7.00001 4.05994C7.19779 4.05994 7.39113 4.11859 7.55558 4.22847C7.72003 4.33835 7.8482 4.49453 7.92389 4.67726C7.99957 4.85998 8.01938 5.06105 7.98079 5.25503C7.94221 5.44901 7.84697 5.6272 7.70711 5.76705C7.56726 5.9069 7.38908 6.00214 7.1951 6.04073C7.00112 6.07931 6.80005 6.05951 6.61732 5.98382C6.4346 5.90813 6.27842 5.77996 6.16854 5.61551C6.05866 5.45106 6.00001 5.25772 6.00001 5.05994C6.00001 4.79472 6.10536 4.54037 6.2929 4.35283C6.48044 4.1653 6.73479 4.05994 7.00001 4.05994ZM7.00001 20.0599C6.80222 20.0599 6.60889 20.0013 6.44444 19.8914C6.27999 19.7815 6.15181 19.6254 6.07613 19.4426C6.00044 19.2599 5.98064 19.0588 6.01922 18.8649C6.05781 18.6709 6.15305 18.4927 6.2929 18.3528C6.43275 18.213 6.61093 18.1177 6.80492 18.0792C6.9989 18.0406 7.19996 18.0604 7.38269 18.1361C7.56542 18.2117 7.72159 18.3399 7.83148 18.5044C7.94136 18.6688 8.00001 18.8622 8.00001 19.0599C8.00001 19.3252 7.89465 19.5795 7.70711 19.767C7.51958 19.9546 7.26522 20.0599 7.00001 20.0599ZM17 10.0599C16.8022 10.0599 16.6089 10.0013 16.4444 9.89141C16.28 9.78153 16.1518 9.62535 16.0761 9.44262C16.0004 9.2599 15.9806 9.05883 16.0192 8.86485C16.0578 8.67087 16.153 8.49269 16.2929 8.35283C16.4328 8.21298 16.6109 8.11774 16.8049 8.07916C16.9989 8.04057 17.2 8.06037 17.3827 8.13606C17.5654 8.21175 17.7216 8.33992 17.8315 8.50437C17.9414 8.66882 18 8.86216 18 9.05994C18 9.32516 17.8947 9.57951 17.7071 9.76705C17.5196 9.95458 17.2652 10.0599 17 10.0599Z`,fill:`currentColor`})}),hi=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{d:`M17 22H5C4.20435 22 3.44129 21.6839 2.87868 21.1213C2.31607 20.5587 2 19.7956 2 19V8.99997C2 8.20432 2.31607 7.44125 2.87868 6.87864C3.44129 6.31604 4.20435 5.99997 5 5.99997H6C6.01682 5.1526 6.30235 4.33248 6.81541 3.65789C7.32848 2.98331 8.04255 2.48911 8.85464 2.2466C9.66673 2.00408 10.5349 2.02578 11.3338 2.30856C12.1328 2.59134 12.8213 3.12059 13.3 3.81997C13.7484 4.45911 13.9925 5.21923 14 5.99997H17C17.2652 5.99997 17.5196 6.10532 17.7071 6.29286C17.8946 6.48039 18 6.73475 18 6.99997V9.99997C18.8474 10.0168 19.6675 10.3023 20.3421 10.8154C21.0167 11.3284 21.5109 12.0425 21.7534 12.8546C21.9959 13.6667 21.9742 14.5348 21.6914 15.3338C21.4086 16.1328 20.8794 16.8212 20.18 17.3C19.5409 17.7484 18.7807 17.9925 18 18V21C18 21.2652 17.8946 21.5195 17.7071 21.7071C17.5196 21.8946 17.2652 22 17 22ZM5 7.99997C4.73478 7.99997 4.48043 8.10532 4.29289 8.29286C4.10536 8.48039 4 8.73475 4 8.99997V19C4 19.2652 4.10536 19.5195 4.29289 19.7071C4.48043 19.8946 4.73478 20 5 20H16V16.82C15.9991 16.6596 16.0368 16.5014 16.1099 16.3587C16.183 16.216 16.2894 16.093 16.42 16C16.5502 15.9071 16.7008 15.8468 16.8592 15.8242C17.0175 15.8016 17.179 15.8173 17.33 15.87C17.615 15.9862 17.9254 16.0262 18.2305 15.9858C18.5357 15.9455 18.825 15.8263 19.07 15.64C19.3139 15.4913 19.523 15.292 19.6834 15.0557C19.8439 14.8194 19.9518 14.5515 20 14.27C20.0386 13.986 20.0157 13.6971 19.9329 13.4228C19.85 13.1485 19.7092 12.8951 19.52 12.68C19.2641 12.3691 18.9155 12.1481 18.5252 12.0491C18.1349 11.9502 17.7231 11.9785 17.35 12.13C17.199 12.1827 17.0375 12.1983 16.8792 12.1757C16.7208 12.1531 16.5702 12.0928 16.44 12C16.3094 11.907 16.203 11.7839 16.1299 11.6412C16.0568 11.4985 16.0191 11.3403 16.02 11.18V7.99997H12.82C12.6557 8.00928 12.4915 7.97788 12.3422 7.90855C12.1929 7.83922 12.0631 7.7341 11.9641 7.60253C11.8652 7.47096 11.8003 7.317 11.7752 7.15432C11.75 6.99164 11.7654 6.82526 11.82 6.66997C11.9363 6.38497 11.9762 6.07459 11.9359 5.76945C11.8955 5.46431 11.7763 5.17496 11.59 4.92997C11.4424 4.67913 11.2402 4.46473 10.9984 4.30266C10.7566 4.14058 10.4815 4.03499 10.1934 3.99369C9.90527 3.95239 9.61155 3.97645 9.33399 4.06409C9.05644 4.15173 8.80216 4.3007 8.59 4.49997C8.39298 4.69538 8.23877 4.92966 8.1372 5.1879C8.03562 5.44614 7.9889 5.72269 8 5.99997C8.00232 6.22934 8.04637 6.45637 8.13 6.66997C8.18287 6.82118 8.19863 6.98289 8.17597 7.14147C8.1533 7.30005 8.09287 7.45087 7.99976 7.58122C7.90665 7.71158 7.78358 7.81765 7.64093 7.89053C7.49827 7.9634 7.34019 8.00093 7.18 7.99997H5Z`,fill:`currentColor`})}),gi=e=>(0,Q.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...e,children:[(0,Q.jsx)(`path`,{d:`m17.586 11.414-5.93 5.93a1 1 0 0 1-8-8l3.137-3.137a.707.707 0 0 1 1.207.5V10`}),(0,Q.jsx)(`path`,{d:`M20.414 8.586 22 7`}),(0,Q.jsx)(`circle`,{cx:19,cy:10,r:2})]}),_i=e=>(0,Q.jsxs)(`svg`,{width:29,height:28,viewBox:`0 0 29 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,Q.jsx)(`path`,{d:`M14.5 18.375C12.085 18.375 10.125 16.415 10.125 14C10.125 11.585 12.085 9.625 14.5 9.625C16.915 9.625 18.875 11.585 18.875 14C18.875 16.415 16.915 18.375 14.5 18.375ZM14.5 11.375C13.0533 11.375 11.875 12.5533 11.875 14C11.875 15.4467 13.0533 16.625 14.5 16.625C15.9467 16.625 17.125 15.4467 17.125 14C17.125 12.5533 15.9467 11.375 14.5 11.375Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M18.245 25.8883C18 25.8883 17.755 25.8533 17.51 25.795C16.7867 25.5967 16.18 25.1417 15.795 24.5L15.655 24.2667C14.9667 23.0767 14.0217 23.0767 13.3333 24.2667L13.205 24.4883C12.82 25.1417 12.2133 25.6083 11.49 25.795C10.755 25.9933 9.99668 25.8883 9.35501 25.5033L7.34834 24.3483C6.63668 23.94 6.12334 23.275 5.90168 22.47C5.69168 21.665 5.79668 20.8367 6.20501 20.125C6.54334 19.53 6.63668 18.9933 6.43834 18.655C6.24001 18.3167 5.73834 18.1183 5.05001 18.1183C3.34668 18.1183 1.95834 16.73 1.95834 15.0267V12.9733C1.95834 11.27 3.34668 9.88168 5.05001 9.88168C5.73834 9.88168 6.24001 9.68334 6.43834 9.34501C6.63668 9.00668 6.55501 8.47001 6.20501 7.87501C5.79668 7.16334 5.69168 6.32334 5.90168 5.53001C6.11168 4.72501 6.62501 4.06001 7.34834 3.65168L9.36668 2.49668C10.685 1.71501 12.4233 2.17001 13.2167 3.51168L13.3567 3.74501C14.045 4.93501 14.99 4.93501 15.6783 3.74501L15.8067 3.52334C16.6 2.17001 18.3383 1.71501 19.6683 2.50834L21.675 3.66334C22.3867 4.07168 22.9 4.73668 23.1217 5.54168C23.3317 6.34668 23.2267 7.17501 22.8183 7.88668C22.48 8.48168 22.3867 9.01834 22.585 9.35668C22.7833 9.69501 23.285 9.89334 23.9733 9.89334C25.6767 9.89334 27.065 11.2817 27.065 12.985V15.0383C27.065 16.7417 25.6767 18.13 23.9733 18.13C23.285 18.13 22.7833 18.3283 22.585 18.6667C22.3867 19.005 22.4683 19.5417 22.8183 20.1367C23.2267 20.8483 23.3433 21.6883 23.1217 22.4817C22.9117 23.2867 22.3983 23.9517 21.675 24.36L19.6567 25.515C19.2133 25.76 18.735 25.8883 18.245 25.8883ZM14.5 21.5717C15.5383 21.5717 16.5067 22.225 17.1717 23.38L17.3 23.6017C17.44 23.8467 17.6733 24.0217 17.9533 24.0917C18.2333 24.1617 18.5133 24.1267 18.7467 23.9867L20.765 22.82C21.0683 22.645 21.3017 22.3533 21.395 22.0033C21.4883 21.6533 21.4417 21.2917 21.2667 20.9883C20.6017 19.845 20.52 18.6667 21.0333 17.7683C21.5467 16.87 22.6083 16.3567 23.9383 16.3567C24.685 16.3567 25.28 15.7617 25.28 15.015V12.9617C25.28 12.2267 24.685 11.62 23.9383 11.62C22.6083 11.62 21.5467 11.1067 21.0333 10.2083C20.52 9.31001 20.6017 8.13168 21.2667 6.98834C21.4417 6.68501 21.4883 6.32334 21.395 5.97334C21.3017 5.62334 21.08 5.34334 20.7767 5.15668L18.7583 4.00168C18.2567 3.69834 17.5917 3.87334 17.2883 4.38668L17.16 4.60834C16.495 5.76334 15.5267 6.41668 14.4883 6.41668C13.45 6.41668 12.4817 5.76334 11.8167 4.60834L11.6883 4.37501C11.3967 3.88501 10.7433 3.71001 10.2417 4.00168L8.22334 5.16834C7.92001 5.34334 7.68668 5.63501 7.59334 5.98501C7.50001 6.33501 7.54668 6.69668 7.72168 7.00001C8.38668 8.14334 8.46834 9.32168 7.95501 10.22C7.44168 11.1183 6.38001 11.6317 5.05001 11.6317C4.30334 11.6317 3.70834 12.2267 3.70834 12.9733V15.0267C3.70834 15.7617 4.30334 16.3683 5.05001 16.3683C6.38001 16.3683 7.44168 16.8817 7.95501 17.78C8.46834 18.6783 8.38668 19.8567 7.72168 21C7.54668 21.3033 7.50001 21.665 7.59334 22.015C7.68668 22.365 7.90834 22.645 8.21168 22.8317L10.23 23.9867C10.475 24.1383 10.7667 24.1733 11.035 24.1033C11.315 24.0333 11.5483 23.8467 11.7 23.6017L11.8283 23.38C12.4933 22.2367 13.4617 21.5717 14.5 21.5717Z`,fill:`currentColor`})]}),vi=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{d:`M18.2099 13.1289L9.98776 20.3232C9.01788 21.1719 7.5 20.4831 7.5 19.1943L7.5 4.80565C7.5 3.51691 9.01788 2.82815 9.98775 3.67678L18.2099 10.8711C18.8929 11.4688 18.8929 12.5312 18.2099 13.1289Z`,fill:`currentColor`})});function $({icon:e,text:t,rightIcon:n,className:r}){return(0,Q.jsxs)(`div`,{className:P(`flex min-w-0 w-full items-center justify-between`,Ue,r),children:[(0,Q.jsxs)(`div`,{className:P(`flex min-w-0 items-center`,Ue),children:[(0,Q.jsx)(`span`,{className:Ke,"aria-hidden":!0,children:e}),(0,Q.jsx)(`span`,{className:`text-sm font-normal leading-5`,children:t})]}),n?(0,Q.jsx)(`span`,{className:Ke,"aria-hidden":!0,children:n}):null]})}var yi=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M20.781 10.5L13.281 3H12.2205L4.72049 10.5L5.78099 11.5605L12 5.3415V21H13.5V5.34L19.719 11.5605L20.781 10.5Z`,fill:`currentColor`})}),bi=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4.72049 13.5L12.2205 21H13.281L20.781 13.5L19.7205 12.4395L13.5 18.6585V3H12V18.66L5.78099 12.438L4.72049 13.5Z`,fill:`currentcolor`})}),xi=e=>(0,Q.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 12 14`,fill:`none`,...e,children:[(0,Q.jsx)(`path`,{d:`M9.79249 10.1936C10.2876 10.1936 10.6902 10.5962 10.6902 11.0913C10.6902 11.5864 10.2876 11.989 9.79249 11.989C9.29739 11.989 8.89478 11.5864 8.89478 11.0913C8.89478 10.5962 9.29739 10.1936 9.79249 10.1936ZM9.79249 9.10547C8.69891 9.10547 7.80664 9.99774 7.80664 11.0913C7.80664 12.1849 8.69891 13.0772 9.79249 13.0772C10.8861 13.0772 11.7783 12.1849 11.7783 11.0913C11.7783 9.99774 10.8861 9.10547 9.79249 9.10547Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M2.23585 10.1936C2.73095 10.1936 3.13356 10.5962 3.13356 11.0913C3.13356 11.5864 2.73095 11.989 2.23585 11.989C1.74075 11.989 1.33814 11.5864 1.33814 11.0913C1.33814 10.5962 1.74075 10.1936 2.23585 10.1936ZM2.23585 9.10547C1.14227 9.10547 0.25 9.99774 0.25 11.0913C0.25 12.1849 1.14227 13.0772 2.23585 13.0772C3.32943 13.0772 4.2217 12.1849 4.2217 11.0913C4.2217 9.99774 3.32943 9.10547 2.23585 9.10547Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M2.23585 2.16846C2.73095 2.16846 3.13356 2.57107 3.13356 3.06617C3.13356 3.56128 2.73095 3.96389 2.23585 3.96389C1.74075 3.96389 1.33814 3.56128 1.33814 3.06617C1.33814 2.57107 1.74075 2.16846 2.23585 2.16846ZM2.23585 1.08032C1.14227 1.08032 0.25 1.97259 0.25 3.06617C0.25 4.15975 1.14227 5.05202 2.23585 5.05202C3.32943 5.05202 4.2217 4.15975 4.2217 3.06617C4.2217 1.97259 3.32943 1.08032 2.23585 1.08032Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M2.23633 9.17627V4.55713`,stroke:`currentColor`,strokeMiterlimit:10}),(0,Q.jsx)(`path`,{d:`M9.79304 9.17605V4.33928C9.79304 3.63743 9.22176 3.06616 8.51992 3.06616H7.38281`,stroke:`currentColor`,strokeMiterlimit:10}),(0,Q.jsx)(`path`,{d:`M7.38191 5.21531L5.23828 3.06624L7.38191 0.922607V5.21531Z`,fill:`currentColor`})]}),Si=`!w-auto whitespace-nowrap`;function Ci({onClose:e}){let{t}=a(`openhands`),{setMessageToSend:n}=V(),{data:r}=q(),i=r?.git_provider;return(0,Q.jsxs)(U,{testId:`git-tools-submenu`,className:`w-max`,children:[(0,Q.jsx)(W,{testId:`git-pull-button`,onClick:()=>{n(k()),e()},className:Si,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(bi,{width:16,height:16}),text:t(F.COMMON$GIT_PULL)})}),(0,Q.jsx)(W,{testId:`git-push-button`,onClick:()=>{n(ee(i)),e()},className:Si,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(yi,{width:16,height:16}),text:t(F.COMMON$GIT_PUSH)})}),(0,Q.jsx)(W,{testId:`create-pr-button`,onClick:()=>{n(re(i)),e()},className:Si,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(xi,{width:16,height:16}),text:t(F.COMMON$CREATE_PR)})}),(0,Q.jsx)(W,{testId:`create-new-branch-button`,onClick:()=>{n(D()),e()},className:Si,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(mi,{width:16,height:16}),text:t(F.COMMON$CREATE_NEW_BRANCH)})})]})}var wi=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:25,viewBox:`0 0 24 25`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{d:`M15.29 10.79L12.51 13.57C12.3436 13.5257 12.1723 13.5022 12 13.5C11.4696 13.5 10.9609 13.7107 10.5858 14.0858C10.2107 14.4609 10 14.9696 10 15.5C10.0023 15.6722 10.0258 15.8435 10.07 16.01L9.29003 16.79C9.1963 16.883 9.12191 16.9936 9.07114 17.1154C9.02037 17.2373 8.99423 17.368 8.99423 17.5C8.99423 17.632 9.02037 17.7627 9.07114 17.8846C9.12191 18.0064 9.1963 18.117 9.29003 18.21C9.38299 18.3037 9.49359 18.3781 9.61545 18.4289C9.73731 18.4797 9.86802 18.5058 10 18.5058C10.132 18.5058 10.2627 18.4797 10.3846 18.4289C10.5065 18.3781 10.6171 18.3037 10.71 18.21L11.49 17.43C11.6565 17.4743 11.8278 17.4978 12 17.5C12.5305 17.5 13.0392 17.2893 13.4142 16.9142C13.7893 16.5391 14 16.0304 14 15.5C13.9978 15.3278 13.9743 15.1565 13.93 14.99L16.71 12.21C16.8983 12.0217 17.0041 11.7663 17.0041 11.5C17.0041 11.2337 16.8983 10.9783 16.71 10.79C16.5217 10.6017 16.2663 10.4959 16 10.4959C15.7337 10.4959 15.4783 10.6017 15.29 10.79ZM12 4.5C10.6868 4.5 9.38645 4.75866 8.1732 5.2612C6.95994 5.76375 5.85755 6.50035 4.92896 7.42893C3.0536 9.3043 2.00003 11.8478 2.00003 14.5C1.99511 16.4806 2.58375 18.4172 3.69003 20.06C3.83855 20.2801 4.06844 20.4322 4.32911 20.4829C4.58979 20.5335 4.8599 20.4785 5.08003 20.33C5.30016 20.1815 5.45227 19.9516 5.50291 19.6909C5.55354 19.4302 5.49855 19.1601 5.35003 18.94C4.54455 17.7355 4.08131 16.3349 4.00978 14.8877C3.93826 13.4405 4.26113 12.001 4.94392 10.723C5.62671 9.44501 6.64378 8.37643 7.88653 7.63139C9.12928 6.88634 10.5511 6.49281 12 6.49281C13.449 6.49281 14.8708 6.88634 16.1135 7.63139C17.3563 8.37643 18.3734 9.44501 19.0561 10.723C19.7389 12.001 20.0618 13.4405 19.9903 14.8877C19.9188 16.3349 19.4555 17.7355 18.65 18.94C18.5763 19.0489 18.5248 19.1714 18.4985 19.3002C18.4722 19.4291 18.4716 19.5619 18.4966 19.691C18.5217 19.8201 18.572 19.943 18.6447 20.0527C18.7173 20.1623 18.8109 20.2566 18.92 20.33C19.0856 20.4412 19.2806 20.5004 19.48 20.5C19.6438 20.5002 19.8052 20.4603 19.9499 20.3835C20.0946 20.3068 20.2183 20.1957 20.31 20.06C21.4163 18.4172 22.005 16.4806 22 14.5C22 11.8478 20.9465 9.3043 19.0711 7.42893C17.1957 5.55357 14.6522 4.5 12 4.5Z`,fill:`currentColor`})}),Ti=e=>(0,Q.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 20 21`,fill:`none`,...e,children:[(0,Q.jsx)(`path`,{d:`M15.9532 15.8037C16.7679 15.8037 17.4304 16.4662 17.4304 17.2809C17.4304 18.0955 16.7679 18.758 15.9532 18.758C15.1385 18.758 14.4761 18.0955 14.4761 17.2809C14.4761 16.4662 15.1385 15.8037 15.9532 15.8037ZM15.9532 14.0132C14.1538 14.0132 12.6855 15.4814 12.6855 17.2809C12.6855 19.0803 14.1538 20.5485 15.9532 20.5485C17.7527 20.5485 19.2209 19.0803 19.2209 17.2809C19.2209 15.4814 17.7527 14.0132 15.9532 14.0132Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M3.51768 15.8037C4.33236 15.8037 4.99485 16.4662 4.99485 17.2809C4.99485 18.0955 4.33236 18.758 3.51768 18.758C2.703 18.758 2.04051 18.0955 2.04051 17.2809C2.04051 16.4662 2.703 15.8037 3.51768 15.8037ZM3.51768 14.0132C1.71822 14.0132 0.25 15.4814 0.25 17.2809C0.25 19.0803 1.71822 20.5485 3.51768 20.5485C5.31714 20.5485 6.78536 19.0803 6.78536 17.2809C6.78536 15.4814 5.31714 14.0132 3.51768 14.0132Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M3.51768 2.59862C4.33236 2.59862 4.99485 3.2611 4.99485 4.07579C4.99485 4.89047 4.33236 5.55296 3.51768 5.55296C2.703 5.55296 2.04051 4.89047 2.04051 4.07579C2.04051 3.2611 2.703 2.59862 3.51768 2.59862ZM3.51768 0.808105C1.71822 0.808105 0.25 2.27632 0.25 4.07579C0.25 5.87525 1.71822 7.34347 3.51768 7.34347C5.31714 7.34347 6.78536 5.87525 6.78536 4.07579C6.78536 2.27632 5.31714 0.808105 3.51768 0.808105Z`,fill:`currentColor`}),(0,Q.jsx)(`path`,{d:`M3.51758 14.1295V6.52881`,stroke:`currentColor`,strokeWidth:2,strokeMiterlimit:10}),(0,Q.jsx)(`path`,{d:`M15.9523 14.1294V6.17058C15.9523 5.0157 15.0123 4.07568 13.8574 4.07568H11.9863`,stroke:`currentColor`,strokeWidth:2,strokeMiterlimit:10}),(0,Q.jsx)(`path`,{d:`M11.9863 7.6119L8.45898 4.07565L11.9863 0.54834V7.6119Z`,fill:`currentColor`})]}),Ei=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Q.jsx)(`path`,{d:`M4 4C4 2.89543 4.89543 2 6 2H14C14.2652 2 14.5196 2.10536 14.7071 2.29289L19.7071 7.29289C19.8946 7.48043 20 7.73478 20 8V20C20 21.1046 19.1046 22 18 22H6C4.89543 22 4 21.1046 4 20V4ZM17.5858 8L14 4.41421V8H17.5858ZM12 4L6 4V20H18V10H13C12.4477 10 12 9.55228 12 9V4ZM8 13C8 12.4477 8.44772 12 9 12H15C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14H9C8.44772 14 8 13.5523 8 13ZM8 17C8 16.4477 8.44772 16 9 16H15C15.5523 16 16 16.4477 16 17C16 17.5523 15.5523 18 15 18H9C8.44772 18 8 17.5523 8 17Z`,fill:`currentColor`})}),Di=e=>(0,Q.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Q.jsx)(`path`,{d:`M2.71996 7.64998C2.91552 7.7074 3.10351 7.78797 3.27996 7.88998C3.89978 8.25991 4.60814 8.45523 5.32996 8.45523C6.05178 8.45523 6.76015 8.25991 7.37996 7.88998C7.77042 7.66914 8.21137 7.55307 8.65996 7.55307C9.10855 7.55307 9.5495 7.66914 9.93996 7.88998C10.5673 8.24867 11.2773 8.43735 12 8.43735C12.7226 8.43735 13.4327 8.24867 14.06 7.88998C14.4504 7.66914 14.8914 7.55307 15.34 7.55307C15.7885 7.55307 16.2295 7.66914 16.62 7.88998C17.2537 8.25217 17.97 8.44503 18.7 8.44998C19.4051 8.44852 20.0966 8.25492 20.7 7.88998C20.8764 7.78797 21.0644 7.7074 21.26 7.64998C21.5146 7.57572 21.7292 7.40336 21.8568 7.17081C21.9843 6.93827 22.0142 6.66459 21.94 6.40998C21.8657 6.15537 21.6933 5.94069 21.4608 5.81317C21.2282 5.68564 20.9546 5.65572 20.7 5.72998C20.3494 5.83818 20.0135 5.98932 19.7 6.17998C19.3814 6.36627 19.019 6.46446 18.65 6.46446C18.2809 6.46446 17.9185 6.36627 17.6 6.17998C16.9066 5.79105 16.1249 5.58679 15.33 5.58679C14.535 5.58679 13.7533 5.79105 13.06 6.17998C12.738 6.36703 12.3723 6.46556 12 6.46556C11.6276 6.46556 11.2619 6.36703 10.94 6.17998C10.2466 5.79105 9.46495 5.58679 8.66996 5.58679C7.87497 5.58679 7.09332 5.79105 6.39996 6.17998C6.08139 6.36627 5.719 6.46446 5.34996 6.46446C4.98092 6.46446 4.61853 6.36627 4.29996 6.17998C3.98645 5.98932 3.65057 5.83818 3.29996 5.72998C3.04535 5.65572 2.77167 5.68564 2.53913 5.81317C2.30658 5.94069 2.13422 6.15537 2.05996 6.40998C1.9857 6.66459 2.01562 6.93827 2.14315 7.17081C2.27067 7.40336 2.48535 7.57572 2.73996 7.64998H2.71996ZM20.72 15.73C20.3694 15.8382 20.0335 15.9893 19.72 16.18C19.4014 16.3663 19.039 16.4645 18.67 16.4645C18.3009 16.4645 17.9385 16.3663 17.62 16.18C16.9266 15.7911 16.1449 15.5868 15.35 15.5868C14.555 15.5868 13.7733 15.7911 13.08 16.18C12.758 16.367 12.3923 16.4656 12.02 16.4656C11.6476 16.4656 11.2819 16.367 10.96 16.18C10.2666 15.7911 9.48495 15.5868 8.68996 15.5868C7.89497 15.5868 7.11332 15.7911 6.41996 16.18C6.10139 16.3663 5.739 16.4645 5.36996 16.4645C5.00092 16.4645 4.63853 16.3663 4.31996 16.18C4.00645 15.9893 3.67057 15.8382 3.31996 15.73C3.19389 15.6932 3.06182 15.6816 2.93127 15.6959C2.80073 15.7102 2.67427 15.75 2.55913 15.8132C2.44398 15.8763 2.3424 15.9615 2.26019 16.0639C2.17797 16.1663 2.11673 16.2839 2.07996 16.41C2.04319 16.536 2.03161 16.6681 2.04589 16.7987C2.06016 16.9292 2.1 17.0557 2.16315 17.1708C2.22629 17.286 2.3115 17.3875 2.4139 17.4698C2.5163 17.552 2.63389 17.6132 2.75996 17.65C2.95552 17.7074 3.14351 17.788 3.31996 17.89C3.93978 18.2599 4.64814 18.4552 5.36996 18.4552C6.09178 18.4552 6.80015 18.2599 7.41996 17.89C7.81042 17.6691 8.25137 17.5531 8.69996 17.5531C9.14855 17.5531 9.5895 17.6691 9.97996 17.89C10.6073 18.2487 11.3173 18.4374 12.04 18.4374C12.7626 18.4374 13.4727 18.2487 14.1 17.89C14.4904 17.6691 14.9314 17.5531 15.38 17.5531C15.8285 17.5531 16.2695 17.6691 16.66 17.89C17.2937 18.2522 18.01 18.445 18.74 18.45C19.4451 18.4485 20.1366 18.2549 20.74 17.89C20.9164 17.788 21.1044 17.7074 21.3 17.65C21.5546 17.5757 21.7692 17.4034 21.8968 17.1708C22.0243 16.9383 22.0542 16.6646 21.98 16.41C21.9057 16.1554 21.7333 15.9407 21.5008 15.8132C21.2682 15.6856 20.9946 15.6557 20.74 15.73H20.72ZM20.72 10.73C20.3694 10.8382 20.0335 10.9893 19.72 11.18C19.4014 11.3663 19.039 11.4645 18.67 11.4645C18.3009 11.4645 17.9385 11.3663 17.62 11.18C16.9266 10.7911 16.1449 10.5868 15.35 10.5868C14.555 10.5868 13.7733 10.7911 13.08 11.18C12.758 11.367 12.3923 11.4656 12.02 11.4656C11.6476 11.4656 11.2819 11.367 10.96 11.18C10.2666 10.7911 9.48495 10.5868 8.68996 10.5868C7.89497 10.5868 7.11332 10.7911 6.41996 11.18C6.10139 11.3663 5.739 11.4645 5.36996 11.4645C5.00092 11.4645 4.63853 11.3663 4.31996 11.18C4.00645 10.9893 3.67057 10.8382 3.31996 10.73C3.18902 10.6805 3.04917 10.6591 2.90944 10.6672C2.76971 10.6752 2.63322 10.7125 2.5088 10.7766C2.38438 10.8406 2.2748 10.9301 2.18715 11.0393C2.0995 11.1484 2.03573 11.2747 1.99996 11.41C1.96319 11.536 1.95161 11.6681 1.96589 11.7987C1.98016 11.9292 2.02 12.0557 2.08315 12.1708C2.14629 12.286 2.2315 12.3875 2.3339 12.4698C2.4363 12.552 2.55389 12.6132 2.67996 12.65C2.87552 12.7074 3.06351 12.788 3.23996 12.89C3.85978 13.2599 4.56814 13.4552 5.28996 13.4552C6.01178 13.4552 6.72015 13.2599 7.33996 12.89C7.73042 12.6691 8.17137 12.5531 8.61996 12.5531C9.06855 12.5531 9.5095 12.6691 9.89996 12.89C10.5273 13.2487 11.2373 13.4374 11.96 13.4374C12.6826 13.4374 13.3927 13.2487 14.02 12.89C14.4104 12.6691 14.8514 12.5531 15.3 12.5531C15.7485 12.5531 16.1895 12.6691 16.58 12.89C17.2137 13.2522 17.93 13.445 18.66 13.45C19.3651 13.4485 20.0566 13.2549 20.66 12.89C20.8364 12.788 21.0244 12.7074 21.22 12.65C21.4746 12.5757 21.6892 12.4034 21.8168 12.1708C21.9443 11.9383 21.9742 11.6646 21.9 11.41C21.8257 11.1554 21.6533 10.9407 21.4208 10.8132C21.1882 10.6856 20.9146 10.6557 20.66 10.73H20.72Z`,fill:`currentColor`})}),Oi=`INCREASE_TEST_COVERAGE`,ki=`I want to increase the test coverage of the repository in the current directory.
|
|
4
|
-
|
|
5
|
-
Please investigate the repo to figure out what language is being used, and where tests are located, if there are any.
|
|
6
|
-
|
|
7
|
-
If there are no tests already in the repo, add a very basic test, using typical testing strategies for the language involved.
|
|
8
|
-
|
|
9
|
-
If there are existing tests, find a function or method which lacks adequate unit tests, and add unit tests for it. Be sure to respect the projects existing test structures.
|
|
10
|
-
|
|
11
|
-
Make sure the tests pass before you finish.`,Ai=`AUTO_MERGE_PRS`,ji=`Please add a GitHub action to this repository which automatically merges pull requests from Dependabot so long as the tests are passing.`,Mi=`FIX_README`,Ni=`Please look at the README and make the following improvements, if they make sense:
|
|
12
|
-
* correct any typos that you find
|
|
13
|
-
* add missing language annotations on codeblocks
|
|
14
|
-
* if there are references to other files or other sections of the README, turn them into links
|
|
15
|
-
* make sure the readme has an h1 title towards the top
|
|
16
|
-
* make sure any existing sections in the readme are appropriately separated with headings
|
|
17
|
-
|
|
18
|
-
If there are no obvious ways to improve the README, make at least one small change to make the wording clearer or friendlier`,Pi=`CLEAN_DEPENDENCIES`,Fi=`Examine the dependencies of the current codebase. Make sure you can run the code and any tests.
|
|
19
|
-
|
|
20
|
-
Then run any commands necessary to update all dependencies to the latest versions, and make sure the code continues to run correctly and the tests pass. If changes need to be made to the codebase, go ahead and make those changes. You can look up documentation for new versions using the browser if you need to.
|
|
21
|
-
|
|
22
|
-
If a particular dependency update is causing trouble (e.g. breaking changes that you can't fix), you can revert it and send a message to the user explaining why.
|
|
23
|
-
|
|
24
|
-
Additionally, if you're able to prune any dependencies that are obviously unused, please do so. You may use third party tools to check for unused dependencies.`,Ii=`ADD_DOCS`,Li=`Investigate the documentation in the root of the current repo. Please add a CODE_OF_CONDUCT.md and CONTRIBUTORS.md with good defaults if they are not present. Use information in the README to inform the CONTRIBUTORS doc. If there is no LICENSE currently in the repo, please add the Apache 2.0 license. Add links to all these documents into the README`,Ri=`ADD_DOCKERFILE`,zi=`Investigate the current repo to understand the installation instructions. Then create a Dockerfile that runs the application, using best practices like arguments and multi-stage builds wherever appropriate.
|
|
25
|
-
|
|
26
|
-
If there is an existing Dockerfile, and there are ways to improve it according to best practices, do so.`,Bi={[Oi]:ki,[Ai]:ji,[Mi]:Ni,[Pi]:Fi,[Ii]:Li,[Ri]:zi},Vi=`!w-auto whitespace-nowrap`;function Hi({onClose:e}){let{t}=a(`openhands`),{setMessageToSend:n}=V();return(0,Q.jsxs)(U,{testId:`macros-submenu`,className:`overflow-visible`,children:[(0,Q.jsx)(W,{testId:`increase-test-coverage-button`,onClick:()=>{n(Bi.INCREASE_TEST_COVERAGE),e()},className:Vi,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(wi,{width:16,height:16}),text:t(F.INCREASE_TEST_COVERAGE)})}),(0,Q.jsx)(W,{testId:`fix-readme-button`,onClick:()=>{n(Bi.FIX_README),e()},className:Vi,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(Ei,{width:16,height:16}),text:t(F.FIX_README)})}),(0,Q.jsx)(W,{testId:`auto-merge-prs-button`,onClick:()=>{n(Bi.AUTO_MERGE_PRS),e()},className:Vi,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(Ti,{width:16,height:16}),text:t(F.AUTO_MERGE_PRS)})}),(0,Q.jsx)(W,{testId:`clean-dependencies-button`,onClick:()=>{n(Bi.CLEAN_DEPENDENCIES),e()},className:Vi,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(Di,{width:16,height:16}),text:t(F.CLEAN_DEPENDENCIES)})})]})}function Ui(){let{conversationId:e,navigate:t}=ze(),{data:n,isLoading:r}=q(),{data:i,isLoading:a}=yt(),o=St(),s=Pt(),c=l({mutationKey:Ft}),u=l({mutationKey:Tt}),d=e?.startsWith(`task-`)??!1,f=d||c>0||u>0,p=i?.profiles??[],m=!!e,h=m?n?.launched_agent_profile?.agent_profile_id??i?.active_agent_profile_id??null:i?.active_agent_profile_id??null,g=p.find(e=>e.id!=null&&e.id===h)?.name??null,_=(0,J.useCallback)(r=>{if(d||!r.id||r.id===h)return;if(!m){s.mutate(r.id);return}let i=e?rt(e):null,a={agentProfileId:r.id,entryPoint:`blank_conversation_profile_picker`};n?.selected_repository&&(a.repository={name:n.selected_repository,gitProvider:n.git_provider??`github`,branch:n.selected_branch??void 0}),n?.selected_workspace&&(a.workingDir=n.selected_workspace,a.workspaceMode=i?.workspace_mode??`local_repo`),i?.plugins?.length&&(a.plugins=i.plugins),o.mutateAsync(a).then(e=>t(`/conversations/${e.conversation_id}`)).catch(()=>{})},[s,n,e,o,h,m,d,t]);return{profiles:p,currentProfileId:h,currentProfileName:g,isInConversation:m,isLoading:a||d||m&&r,isSwitching:f,selectProfile:_}}function Wi({onClose:e,dividerInset:t,settingsLinkClassName:n,settingsIconClassName:r}){let{t:i}=a(`openhands`),{profiles:o,currentProfileId:s,isInConversation:c,isSwitching:l,selectProfile:u}=Ui(),d=t=>{u(t),e()};return(0,Q.jsxs)(Q.Fragment,{children:[o.length>0&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`li`,{role:`presentation`,className:`px-2 pt-1 pb-0.5`,children:(0,Q.jsx)(G.Text,{className:`text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4`,children:i(F.SETTINGS$AVAILABLE_PROFILES)})}),o.map(t=>{let n=t.id!=null&&t.id===s;return(0,Q.jsxs)(W,{testId:`chat-input-agent-profile-option-${t.name}`,isDisabled:l,onClick:r=>{if(r.preventDefault(),r.stopPropagation(),n){e();return}d(t)},className:P(`flex items-center gap-2`,n&&`bg-[var(--oh-interactive-hover)]`),children:[(0,Q.jsx)(`span`,{className:`flex-1 truncate text-sm leading-5`,title:t.name,children:t.name}),n&&(0,Q.jsx)(Mt,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]},t.id??t.name)}),c&&(0,Q.jsx)(`li`,{role:`presentation`,className:`px-2 pt-0.5 pb-1`,children:(0,Q.jsx)(G.Text,{className:`text-[11px] text-[var(--oh-text-dim)] leading-4`,children:i(F.CHAT$START_NEW_WITH_PROFILE_HINT)})})]}),o.length>0&&(0,Q.jsx)(z,{inset:t}),(0,Q.jsx)(`li`,{className:`text-sm`,children:(0,Q.jsxs)(Be,{to:`/settings/agents`,onClick:e,className:P(`flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors`,n),children:[(0,Q.jsx)($t,{width:16,height:16,className:P(`shrink-0`,r),"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:i(F.CHAT$MANAGE_AGENT_PROFILES)})]})})]})}function Gi({isDisabled:e,children:t,placement:n=`right`}){let{t:r}=a(`openhands`);return e?(0,Q.jsx)(He,{content:r(F.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES),placement:n,tooltipClassName:`bg-white text-black text-xs font-medium leading-5`,children:(0,Q.jsx)(`span`,{className:`block w-full`,children:t})}):t}function Ki(){let{data:e}=q();return Se(e?.sandbox_status)}function qi({onClose:e,onShowSkills:t,onShowPlugins:n,onShowHooks:r,onShowAgentTools:i,shouldShowAgentTools:o=!0,shouldShowHooks:s=!1,shouldShowPlugins:c=!1,showAgentProfileSwitch:l=!1,footerAction:u}){let{t:d}=a(`openhands`),{data:f}=q(),{providers:p}=jt(),m=Ki(),[h,g]=(0,J.useState)(null),_=!!f?.selected_repository,v=p.length>0,y=_&&v,b=e=>{m||g(h===e?null:e)},x=()=>{g(null),e()};return(0,Q.jsxs)(U,{ref:gt(x),testId:`tools-context-menu`,position:`top`,alignment:`left`,className:`left-[-16px] mb-2 bottom-full overflow-visible min-w-[200px]`,children:[l&&(0,Q.jsxs)(`div`,{className:`relative group/agent-profile`,children:[(0,Q.jsx)(W,{testId:`switch-agent-profile-button`,onClick:()=>b(`agent-profile`),children:(0,Q.jsx)($,{icon:(0,Q.jsx)(en,{width:16,height:16,"aria-hidden":!0}),text:d(F.CHAT$SWITCH_AGENT_PROFILE),rightIcon:(0,Q.jsx)(vi,{width:10,height:10})})}),(0,Q.jsx)(`div`,{className:P(`absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/agent-profile:opacity-100 group-hover/agent-profile:visible group-hover/agent-profile:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,h===`agent-profile`&&`opacity-100 visible pointer-events-auto`),children:(0,Q.jsx)(U,{testId:`agent-profile-submenu`,className:`min-w-[220px] max-w-[320px] max-h-[60vh] overflow-y-auto gap-0`,children:(0,Q.jsx)(Wi,{onClose:x,dividerInset:`menu`})})})]}),y&&(0,Q.jsxs)(`div`,{className:`relative group/git`,children:[(0,Q.jsx)(Gi,{isDisabled:m,children:(0,Q.jsx)(W,{testId:`git-tools-button`,onClick:()=>b(`git`),isDisabled:m,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(mi,{width:16,height:16}),text:d(F.COMMON$GIT_TOOLS),rightIcon:(0,Q.jsx)(vi,{width:10,height:10})})})}),!m&&(0,Q.jsx)(`div`,{className:P(`absolute left-full top-[-6px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/git:opacity-100 group-hover/git:visible group-hover/git:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,h===`git`&&`opacity-100 visible pointer-events-auto`),children:(0,Q.jsx)(Ci,{onClose:x})})]}),(0,Q.jsxs)(`div`,{className:`relative group/macros`,children:[(0,Q.jsx)(Gi,{isDisabled:m,children:(0,Q.jsx)(W,{testId:`macros-button`,onClick:()=>b(`macros`),isDisabled:m,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(_i,{width:16,height:16}),text:d(F.COMMON$MACROS),rightIcon:(0,Q.jsx)(vi,{width:10,height:10})})})}),!m&&(0,Q.jsx)(`div`,{className:P(`absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/macros:opacity-100 group-hover/macros:visible group-hover/macros:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,h===`macros`&&`opacity-100 visible pointer-events-auto`),children:(0,Q.jsx)(Hi,{onClose:x})})]}),o&&(0,Q.jsx)(z,{inset:`menu`}),(0,Q.jsx)(Gi,{isDisabled:m,children:(0,Q.jsx)(W,{testId:`show-skills-button`,onClick:t,isDisabled:m,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(Ot,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:d(F.CONVERSATION$SHOW_SKILLS)})})}),c&&(0,Q.jsx)(Gi,{isDisabled:m,children:(0,Q.jsx)(W,{testId:`show-plugins-button`,onClick:n,isDisabled:m,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(hi,{width:16,height:16,"aria-hidden":!0}),text:d(F.CONVERSATION$SHOW_PLUGINS)})})}),s&&(0,Q.jsx)(Gi,{isDisabled:m,children:(0,Q.jsx)(W,{testId:`show-hooks-button`,onClick:r,isDisabled:m,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(gi,{width:16,height:16,"aria-hidden":!0}),text:d(F.CONVERSATION$SHOW_HOOKS)})})}),o&&(0,Q.jsx)(Gi,{isDisabled:m,children:(0,Q.jsx)(W,{testId:`show-agent-tools-button`,onClick:i,isDisabled:m,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(be,{width:16,height:16}),text:d(F.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})})}),u&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(z,{}),(0,Q.jsx)(W,{testId:u.testId,onClick:e=>{e.preventDefault(),e.stopPropagation(),u.onClick(),x()},children:(0,Q.jsx)($,{icon:u.icon,text:u.label})})]})]})}function Ji({agentClass:e,openhandsVersion:t,onClose:n}){let{t:r}=a(`openhands`);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(et,{onClose:n,testId:`close-system-message-modal`}),(0,Q.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col gap-2 pr-6`,children:[(0,Q.jsx)(Ne,{title:r(F.SYSTEM_MESSAGE_MODAL$TITLE)}),(e||t)&&(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e&&(0,Q.jsxs)(`div`,{className:`text-sm`,children:[(0,Q.jsx)(G.Text,{className:`font-semibold text-[var(--oh-text-tertiary)]`,children:r(F.SYSTEM_MESSAGE_MODAL$AGENT_CLASS)}),` `,(0,Q.jsx)(G.Text,{className:`font-medium text-content-2`,children:e})]}),t&&(0,Q.jsxs)(`div`,{className:`text-sm`,children:[(0,Q.jsx)(G.Text,{className:`font-semibold text-[var(--oh-text-tertiary)]`,children:r(F.SYSTEM_MESSAGE_MODAL$OPENHANDS_VERSION)}),` `,(0,Q.jsx)(G.Text,{className:`text-content-2`,children:t})]})]})]})]})}function Yi({isActive:e,children:t,onClick:n,className:r,disabled:i=!1}){return(0,Q.jsx)(`button`,{type:`button`,disabled:i,className:P(`px-4 py-2 font-normal border-b-2 transition-colors`,e?`border-foreground text-foreground`:`border-transparent text-[var(--oh-muted)] hover:text-[var(--oh-foreground)]`,i&&`opacity-50 cursor-not-allowed`,r),onClick:n,"aria-selected":e,role:`tab`,children:t})}function Xi({activeTab:e,onTabChange:t,hasTools:n}){let{t:r}=a(`openhands`);return(0,Q.jsxs)(`div`,{className:`mb-2 flex border-b border-[var(--oh-border)]`,role:`tablist`,children:[(0,Q.jsx)(Yi,{isActive:e===`system`,onClick:()=>t(`system`),children:r(F.SYSTEM_MESSAGE_MODAL$SYSTEM_MESSAGE_TAB)}),n&&(0,Q.jsx)(Yi,{isActive:e===`tools`,onClick:()=>t(`tools`),children:r(F.SYSTEM_MESSAGE_MODAL$TOOLS_TAB)})]})}var Zi=Je(`whitespace-pre-wrap`,{variants:{size:{default:`text-sm`,small:`text-xs`},font:{default:``,mono:`font-mono`},lineHeight:{default:``,relaxed:`leading-relaxed`},background:{default:``,dark:`bg-base`},textColor:{default:``,light:`text-[var(--oh-text-tertiary)]`},padding:{default:``,medium:`p-3`,large:`px-5`},borderRadius:{default:``,medium:`rounded-md`},shadow:{default:``,inner:`shadow-inner`},maxHeight:{default:``,small:`max-h-[400px]`,large:`max-h-[60vh]`},overflow:{default:``,auto:`overflow-auto`}},defaultVariants:{size:`default`,font:`default`,lineHeight:`default`,background:`default`,textColor:`default`,padding:`default`,borderRadius:`default`,shadow:`default`,maxHeight:`default`,overflow:`default`}});function Qi({size:e,font:t,lineHeight:n,background:r,textColor:i,padding:a,borderRadius:o,shadow:s,maxHeight:c,overflow:l,className:u,testId:d,children:f}){return(0,Q.jsx)(`pre`,{"data-testid":d,className:P(Zi({size:e,font:t,lineHeight:n,background:r,textColor:i,padding:a,borderRadius:o,shadow:s,maxHeight:c,overflow:l}),u),children:f})}function $i({content:e}){return(0,Q.jsx)(Qi,{size:`small`,font:`mono`,lineHeight:`relaxed`,padding:`medium`,className:`text-[var(--oh-text-tertiary)]`,children:e})}function ea({parameters:e}){let{t}=a(`openhands`);return(0,Q.jsxs)(`div`,{className:`mt-2`,"data-testid":`tool-parameters`,children:[(0,Q.jsx)(G.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)]`,children:t(F.SYSTEM_MESSAGE_MODAL$PARAMETERS)}),(0,Q.jsx)(`div`,{className:`text-sm mt-2 p-3 bg-base rounded-md overflow-auto text-[var(--oh-text-tertiary)] max-h-[400px] border border-[var(--oh-border)]`,children:(0,Q.jsx)(me,{name:!1,src:e,theme:T})})]})}function ta({title:e,isExpanded:t,onClick:n,className:r}){return(0,Q.jsxs)(`button`,{type:`button`,"data-testid":`toggle-button`,onClick:n,className:P(`w-full py-3 px-3 text-left flex items-center justify-between hover:bg-tertiary transition-colors`,r),children:[(0,Q.jsx)(`div`,{className:`flex items-center`,children:(0,Q.jsx)(G.Text,{className:`font-bold text-content-2`,children:e})}),(0,Q.jsx)(G.Text,{className:`text-[var(--oh-text-tertiary)]`,children:t?(0,Q.jsx)(ue,{size:18}):(0,Q.jsx)(L,{size:18})})]})}function na({tool:e,index:t,isExpanded:n,onToggle:r}){let i=e,a=i.function||i,o=i.title||i.annotations?.title||a.name||i.type===`function`&&i.function?.name||``,s=i.description||a.description||i.type===`function`&&i.function?.description||``,c=a.parameters||i.type===`function`&&i.function?.parameters||i.parameters||null;return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(ta,{title:String(o),isExpanded:n,onClick:()=>r(t)}),n&&(0,Q.jsxs)(`div`,{className:`px-3 pb-3 pt-1 border-t border-[var(--oh-border)]`,children:[(0,Q.jsx)(`div`,{className:`mt-2 mb-3 text-sm text-[var(--oh-text-tertiary)] leading-relaxed`,children:(0,Q.jsx)(Gt,{children:String(s)})}),c&&(0,Q.jsx)(ea,{parameters:c})]})]})}function ra({tools:e,expandedTools:t,onToggleTool:n}){return(0,Q.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:e.map((e,r)=>(0,Q.jsx)(na,{tool:e,index:r,isExpanded:t[r]||!1,onToggle:n},r))})}function ia(){let{t:e}=a(`openhands`);return(0,Q.jsx)(`div`,{className:`flex items-center justify-center h-full p-4`,children:(0,Q.jsx)(G.Text,{className:`text-[var(--oh-muted)]`,children:e(F.SYSTEM_MESSAGE_MODAL$NO_TOOLS)})})}function aa({activeTab:e,systemMessage:t,expandedTools:n,onToggleTool:r}){return e===`system`?(0,Q.jsx)($i,{content:t.content}):e===`tools`?t.tools&&t.tools.length>0?(0,Q.jsx)(ra,{tools:t.tools,expandedTools:n,onToggleTool:r}):(0,Q.jsx)(ia,{}):null}function oa({isOpen:e,onClose:t,systemMessage:n}){let[r,i]=(0,J.useState)(`system`),[a,o]=(0,J.useState)({});return n?e&&(0,Q.jsx)(je,{onClose:t,children:(0,Q.jsxs)(Me,{width:`lg`,className:`relative max-h-[80vh] flex flex-col items-start border border-[var(--oh-border)]`,testID:`system-message-modal`,children:[(0,Q.jsx)(Ji,{agentClass:n.agent_class,openhandsVersion:n.openhands_version,onClose:t}),(0,Q.jsxs)(`div`,{className:`w-full`,children:[(0,Q.jsx)(Xi,{activeTab:r,onTabChange:i,hasTools:!!(n.tools&&n.tools.length>0)}),(0,Q.jsx)(`div`,{className:`h-[60vh] overflow-auto rounded-md border border-[var(--oh-border)] bg-surface-raised custom-scrollbar-always`,children:(0,Q.jsx)(aa,{activeTab:r,systemMessage:n,expandedTools:a,onToggleTool:e=>{o(t=>({...t,[e]:!t[e]}))}})})]})]})}):null}var sa=[`project`,`personal`,`public`],ca=[`/.agents/skills/`,`/.openhands/skills/`,`/.openhands/microagents/`];function la(e){return e.replace(/\\/g,`/`)}function ua(e){let t=la(e).toLowerCase();return t===`public`?!0:t.includes(`public-skills`)||t.includes(`/.openhands/cache/skills/`)}function da(e){let t=la(e);return/^\/Users\/[^/]+\/\.(agents|openhands)\//.test(t)||/^\/home\/[^/]+\/\.(agents|openhands)\//.test(t)?!0:ca.some(e=>{let n=t.indexOf(e);if(n===-1)return!1;let r=t.slice(0,n);return/^\/Users\/[^/]+$/.test(r)||/^\/home\/[^/]+$/.test(r)})}function fa(e,t){let n=la(e);if(!ca.some(e=>n.includes(e))||da(e))return!1;if(t){let e=la(t).replace(/\/$/,``);if(n.startsWith(e))return!0}return!0}function pa(e,t){let n=e.source?.trim();if(!n)return e.type===`repo`?`project`:`public`;let r=n.toLowerCase();return ua(n)?`public`:r===`user`||r===`global`?`personal`:r===`project`||r===`repo`||r===`sandbox`?`project`:da(n)?`personal`:fa(n,t)?`project`:`public`}function ma(e,t){let n={project:[],personal:[],public:[]};for(let r of e)n[pa(r,t)].push(r);for(let e of sa)n[e].sort((e,t)=>e.name.localeCompare(t.name));return n}var ha=`rounded-md p-1 text-white hover:bg-tertiary cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed`;function ga({isLoading:e,isRefetching:t,onRefresh:n,onClose:r}){let{t:i}=a(`openhands`),o=i(F.BUTTON$REFRESH);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(et,{onClose:r,testId:`close-skills-modal`}),(0,Q.jsxs)(`div`,{className:`flex w-full items-start justify-between gap-4 pr-10`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[(0,Q.jsx)(Ne,{title:i(F.SKILLS_MODAL$TITLE)}),(0,Q.jsx)(G.Text,{className:`text-sm text-[var(--oh-muted)]`,children:i(F.SKILLS_MODAL$WARNING)})]}),(0,Q.jsx)(He,{content:o,placement:`bottom`,children:(0,Q.jsx)(`button`,{type:`button`,"data-testid":`refresh-skills`,onClick:n,disabled:e||t,"aria-label":o,className:ha,children:(0,Q.jsx)(De,{size:18,className:P(t&&`animate-spin`),"aria-hidden":!0})})})]})]})}function _a({title:e,count:t,children:n}){return(0,Q.jsxs)(`section`,{className:`w-full`,children:[(0,Q.jsx)(`div`,{className:`sticky top-0 z-10 border-b border-[var(--oh-border)] bg-surface-raised px-3 py-2`,children:(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,Q.jsx)(G.Text,{className:`text-xs font-medium tracking-[0.01em] text-tertiary-light`,children:e}),(0,Q.jsx)(`span`,{className:`inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`,children:t})]})}),(0,Q.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:n})]})}function va(){return(0,Q.jsx)(`div`,{className:`flex justify-center items-center py-8`,children:(0,Q.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-white`})})}function ya({isError:e}){let{t}=a(`openhands`);return(0,Q.jsx)(`div`,{className:`flex items-center justify-center h-full p-4`,children:(0,Q.jsx)(G.Text,{className:`text-[var(--oh-muted)]`,children:t(e?F.COMMON$FETCH_ERROR:F.CONVERSATION$NO_SKILLS)})})}function ba({triggers:e}){let{t}=a(`openhands`);return!e||e.length===0?null:(0,Q.jsxs)(`div`,{className:`mt-2 mb-3`,children:[(0,Q.jsx)(G.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)] mb-2`,children:t(F.COMMON$TRIGGERS)}),(0,Q.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:e.map(e=>(0,Q.jsx)(`span`,{className:`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`,children:e},e))})]})}function xa({content:e}){let{t}=a(`openhands`);return(0,Q.jsxs)(`div`,{className:`mt-2`,children:[(0,Q.jsx)(G.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)] mb-2`,children:t(F.COMMON$CONTENT)}),(0,Q.jsx)(Qi,{size:`small`,font:`mono`,lineHeight:`relaxed`,padding:`medium`,borderRadius:`medium`,maxHeight:`small`,overflow:`auto`,className:`mt-2 border border-[var(--oh-border)] bg-base text-[var(--oh-text-tertiary)]`,children:e||t(F.SKILLS_MODAL$NO_CONTENT)})]})}var Sa={knowledge:`Knowledge`,repo:`Repository`,agentskills:`AgentSkills`},Ca=`inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`;function wa({skill:e,isExpanded:t,onToggle:n}){return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>n(e.name),className:`w-full py-3 px-3 text-left flex items-center justify-between hover:bg-tertiary transition-colors`,children:[(0,Q.jsx)(`div`,{className:`flex items-center`,children:(0,Q.jsx)(G.Text,{className:`font-bold text-content-2`,children:e.name})}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:Ca,children:Sa[e.type]}),(0,Q.jsx)(G.Text,{className:`text-[var(--oh-text-tertiary)]`,children:t?(0,Q.jsx)(ue,{size:18}):(0,Q.jsx)(L,{size:18})})]})]}),t&&(0,Q.jsxs)(`div`,{className:`px-3 pb-3 pt-1 border-t border-[var(--oh-border)]`,children:[(0,Q.jsx)(ba,{triggers:e.triggers??[]}),(0,Q.jsx)(xa,{content:e.content??``})]})]})}var Ta={project:F.SKILLS_MODAL$SECTION_PROJECT,personal:F.SKILLS_MODAL$SECTION_USER,public:F.SKILLS_MODAL$SECTION_PUBLIC};function Ea({onClose:e}){let{t}=a(`openhands`),n=x(),[r,i]=(0,J.useState)({}),{data:o,isLoading:s,isError:c,refetch:l,isRefetching:u}=zn(),d=(0,J.useMemo)(()=>o?ma(o,n):null,[o,n]),f=e=>{i(t=>({...t,[e]:!t[e]}))};return(0,Q.jsx)(je,{onClose:e,children:(0,Q.jsxs)(Me,{width:`lg`,className:`relative max-h-[80vh] flex flex-col items-start border border-[var(--oh-border)]`,testID:`skills-modal`,children:[(0,Q.jsx)(ga,{isLoading:s,isRefetching:u,onRefresh:l,onClose:e}),(0,Q.jsx)(`div`,{className:`w-full h-[60vh] overflow-auto rounded-md border border-[var(--oh-border)] bg-surface-raised custom-scrollbar-always`,children:s?(0,Q.jsx)(va,{}):c||!o||o.length===0?(0,Q.jsx)(ya,{isError:c}):d&&(0,Q.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:sa.map(e=>{let n=d[e];return n.length===0?null:(0,Q.jsx)(_a,{title:t(Ta[e]),count:n.length,children:n.map(t=>(0,Q.jsx)(wa,{skill:t,isExpanded:r[t.name]||!1,onToggle:f},`${e}-${t.name}`))},e)})})})]})})}function Da(){let{conversationId:e}=K();return(0,J.useMemo)(()=>e?rt(e)?.plugins??[]:[],[e])}function Oa({onClose:e}){let{t}=a(`openhands`),n=Da();return(0,Q.jsx)(je,{onClose:e,children:(0,Q.jsxs)(Me,{width:`lg`,className:`relative flex max-h-[80vh] flex-col items-start border border-[var(--oh-border)]`,testID:`plugins-modal`,children:[(0,Q.jsx)(et,{onClose:e,testId:`close-plugins-modal`}),(0,Q.jsxs)(`div`,{className:`flex w-full flex-col gap-2 pr-10`,children:[(0,Q.jsx)(Ne,{title:t(F.PLUGINS_MODAL$TITLE)}),(0,Q.jsx)(G.Text,{className:`text-sm text-[var(--oh-muted)]`,children:t(F.PLUGINS_MODAL$DESCRIPTION)})]}),(0,Q.jsx)(`div`,{className:`w-full overflow-auto rounded-md border border-[var(--oh-border)] bg-surface-raised custom-scrollbar-always`,children:n.length===0?(0,Q.jsx)(`div`,{className:`flex items-center justify-center p-6`,children:(0,Q.jsx)(G.Text,{className:`text-[var(--oh-muted)]`,children:t(F.PLUGINS_MODAL$EMPTY)})}):(0,Q.jsx)(`ul`,{className:`divide-y divide-[var(--oh-border)]`,children:n.map(e=>(0,Q.jsxs)(`li`,{"data-testid":`active-plugin-${wt(e)}`,className:`flex flex-col gap-1 p-4`,children:[(0,Q.jsx)(G.Text,{className:`font-semibold text-white`,children:wt(e)}),(0,Q.jsx)(G.Text,{className:`text-xs text-tertiary-alt`,children:bt(e)?t(F.PLUGINS_MODAL$SOURCE_LOCAL):xt(e)})]},Ct(e)))})})]})})}var ka=()=>{let{conversationId:e}=Ut(),{curAgentState:t}=It();return c({queryKey:[`conversation`,e,`hooks`],queryFn:async()=>{if(!e)throw Error(`No conversation ID provided`);let{hooks:t}=await H.getHooks(e);return t},enabled:!!e&&t!==E.LOADING&&t!==E.INIT,staleTime:1e3*60*5,gcTime:1e3*60*15})},Aa=`rounded-md p-1 text-white hover:bg-tertiary cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed`;function ja({isLoading:e,isRefetching:t,onRefresh:n,onClose:r}){let{t:i}=a(`openhands`),o=i(F.BUTTON$REFRESH);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(et,{onClose:r,testId:`close-hooks-modal`}),(0,Q.jsxs)(`div`,{className:`flex w-full items-start justify-between gap-4 pr-10`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[(0,Q.jsx)(Ne,{title:i(F.HOOKS_MODAL$TITLE)}),(0,Q.jsx)(G.Text,{className:`text-sm text-[var(--oh-muted)]`,children:i(F.HOOKS_MODAL$WARNING)})]}),(0,Q.jsx)(He,{content:o,placement:`bottom`,children:(0,Q.jsx)(`button`,{type:`button`,"data-testid":`refresh-hooks`,onClick:n,disabled:e||t,"aria-label":o,className:Aa,children:(0,Q.jsx)(De,{size:18,className:P(t&&`animate-spin`),"aria-hidden":!0})})})]})]})}function Ma(){return(0,Q.jsx)(`div`,{className:`flex justify-center items-center py-8`,children:(0,Q.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-white`})})}function Na({isError:e}){let{t}=a(`openhands`);return(0,Q.jsx)(`div`,{className:`flex items-center justify-center h-full p-4`,children:(0,Q.jsx)(G.Text,{className:`text-[var(--oh-muted)]`,children:t(e?F.COMMON$FETCH_ERROR:F.CONVERSATION$NO_HOOKS)})})}var Pa=`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`;function Fa({matcher:e}){let{t}=a(`openhands`);return(0,Q.jsxs)(`div`,{className:`py-3`,children:[(0,Q.jsxs)(`div`,{className:`mb-2`,children:[(0,Q.jsx)(G.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)]`,children:t(F.HOOKS_MODAL$MATCHER)}),(0,Q.jsx)(`span`,{className:`ml-2 ${Pa}`,children:e.matcher})]}),(0,Q.jsxs)(`div`,{className:`mt-2`,children:[(0,Q.jsx)(G.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)] mb-2`,children:t(F.HOOKS_MODAL$COMMANDS)}),(e.hooks??[]).map((e,n)=>(0,Q.jsxs)(`div`,{className:`mt-2`,children:[(0,Q.jsx)(Qi,{size:`small`,font:`mono`,lineHeight:`relaxed`,padding:`medium`,borderRadius:`medium`,maxHeight:`small`,overflow:`auto`,className:`border border-[var(--oh-border)] bg-base text-[var(--oh-text-tertiary)]`,children:e.command}),(0,Q.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2 text-xs text-[var(--oh-muted)]`,children:[(0,Q.jsx)(`span`,{className:Pa,children:t(F.HOOKS_MODAL$TYPE,{type:e.type})}),(0,Q.jsx)(`span`,{className:Pa,children:t(F.HOOKS_MODAL$TIMEOUT,{timeout:e.timeout})}),e.async?(0,Q.jsx)(`span`,{className:Pa,children:t(F.HOOKS_MODAL$ASYNC)}):null]})]},`${e.command}-${n}`))]})]})}var Ia={pre_tool_use:F.HOOKS_MODAL$EVENT_PRE_TOOL_USE,post_tool_use:F.HOOKS_MODAL$EVENT_POST_TOOL_USE,user_prompt_submit:F.HOOKS_MODAL$EVENT_USER_PROMPT_SUBMIT,session_start:F.HOOKS_MODAL$EVENT_SESSION_START,session_end:F.HOOKS_MODAL$EVENT_SESSION_END,stop:F.HOOKS_MODAL$EVENT_STOP},La=`inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`,Ra=`HOOKS_MODAL$HOOK_COUNT`;function za({hookEvent:e,isExpanded:t,onToggle:n}){let{t:r}=a(`openhands`),i=Ia[e.event_type],o=i?r(i):e.event_type,s=e.matchers.reduce((e,t)=>e+(t.hooks??[]).length,0);return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>n(e.event_type),className:`w-full py-3 px-3 text-left flex items-center justify-between hover:bg-tertiary transition-colors`,children:[(0,Q.jsx)(`div`,{className:`flex items-center`,children:(0,Q.jsx)(G.Text,{className:`font-bold text-content-2`,children:o})}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:La,children:r(Ra,{count:s})}),(0,Q.jsx)(G.Text,{className:`text-[var(--oh-text-tertiary)]`,children:t?(0,Q.jsx)(ue,{size:18}):(0,Q.jsx)(L,{size:18})})]})]}),t&&(0,Q.jsx)(`div`,{className:`border-t border-[var(--oh-border)] px-3 pt-3 pb-3`,children:(0,Q.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:e.matchers.map((t,n)=>(0,Q.jsx)(Fa,{matcher:t},`${e.event_type}-${t.matcher}-${n}`))})})]})}function Ba({testId:e=`runtime-waiting`,messageKey:t=F.DIFF_VIEWER$WAITING_FOR_RUNTIME,className:n}){let{t:r}=a(`openhands`);return(0,Q.jsxs)(`div`,{"data-testid":e,className:P(`flex h-full w-full flex-col items-center justify-center gap-3 py-8 text-center`,n),children:[(0,Q.jsx)(Oe,{size:`small`}),(0,Q.jsx)(G.Text,{className:`text-sm text-[var(--oh-muted)]`,children:r(t)})]})}function Va({onClose:e}){let{curAgentState:t}=It(),[n,r]=(0,J.useState)({}),{data:i,isLoading:a,isError:o,refetch:s,isRefetching:c}=ka(),l=e=>{r(t=>({...t,[e]:!t[e]}))},u=![E.LOADING,E.INIT].includes(t);return(0,Q.jsx)(je,{onClose:e,children:(0,Q.jsxs)(Me,{width:`lg`,className:`relative max-h-[80vh] flex flex-col items-start border border-[var(--oh-border)]`,testID:`hooks-modal`,children:[(0,Q.jsx)(ja,{isLoading:a,isRefetching:c,onRefresh:s,onClose:e}),(0,Q.jsx)(`div`,{className:`w-full h-[60vh] overflow-auto rounded-md border border-[var(--oh-border)] bg-surface-raised custom-scrollbar-always`,children:u?a?(0,Q.jsx)(Ma,{}):o||!i||i.length===0?(0,Q.jsx)(Na,{isError:o}):(0,Q.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:i.map(e=>(0,Q.jsx)(za,{hookEvent:e,isExpanded:n[e.event_type]||!1,onToggle:l},e.event_type))}):(0,Q.jsx)(Ba,{testId:`hooks-runtime-waiting`})})]})})}function Ha({handleFileIconClick:e,disabled:t=!1,showAgentProfileSwitch:n=!1}){let{t:r}=a(`openhands`),{conversationId:i}=K(),{data:o}=q(),[s,c]=J.useState(!1),{handleShowAgentTools:l,handleShowSkills:u,handleShowPlugins:d,handleShowHooks:f,systemModalVisible:p,setSystemModalVisible:m,skillsModalVisible:h,setSkillsModalVisible:g,pluginsModalVisible:_,setPluginsModalVisible:v,hooksModalVisible:y,setHooksModalVisible:b,systemMessage:x,shouldShowAgentTools:S,shouldShowHooks:C,shouldShowPlugins:w}=pi({conversationId:i??void 0,executionStatus:o?.execution_status,showOptions:!0,onContextMenuToggle:c});return(0,Q.jsxs)(`div`,{className:`relative`,children:[(0,Q.jsx)(`button`,{type:`button`,className:P(Le,`relative shrink-0 size-6`,t?`cursor-not-allowed text-[var(--oh-text-subtle)]`:void 0,s&&!t&&`text-white bg-white/10`),"aria-label":r(F.CHAT_INTERFACE$PLUS_MENU),"aria-expanded":s,"aria-haspopup":`menu`,"data-testid":`chat-plus-button`,onClick:e=>{e.preventDefault(),e.stopPropagation(),!t&&c(e=>!e)},disabled:t,children:(0,Q.jsx)(`span`,{className:`flex h-full w-full items-center justify-center`,children:(0,Q.jsx)(Ee,{className:`h-[13px] w-[13px] shrink-0`,strokeWidth:2})})}),s&&(0,Q.jsx)(qi,{onClose:()=>c(!1),showAgentProfileSwitch:n,onShowSkills:u,onShowPlugins:d,onShowHooks:f,onShowAgentTools:l,shouldShowAgentTools:S,shouldShowHooks:C,shouldShowPlugins:w,footerAction:{testId:`add-files-and-images-button`,icon:(0,Q.jsx)(R,{className:`h-4 w-4 shrink-0`,strokeWidth:2,"aria-hidden":!0}),label:r(F.CHAT_INTERFACE$ADD_FILES_AND_IMAGES),onClick:e}}),(0,Q.jsx)(oa,{isOpen:p,onClose:()=>m(!1),systemMessage:x||null}),h&&(0,Q.jsx)(Ea,{onClose:()=>g(!1)}),_&&(0,Q.jsx)(Oa,{onClose:()=>v(!1)}),y&&(0,Q.jsx)(Va,{onClose:()=>b(!1)})]})}var Ua=()=>{let e=i();return s({mutationFn:e=>ut(e.conversationId),onMutate:async()=>(await e.cancelQueries({queryKey:[`user`,`conversations`]}),{previousConversations:e.getQueryData([`user`,`conversations`])}),onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]})}})},Wa=()=>{let e=i();return s({mutationFn:e=>dt(e.conversationId),onMutate:async()=>(await e.cancelQueries({queryKey:[`user`,`conversations`]}),{previousConversations:e.getQueryData([`user`,`conversations`])}),onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]}),e.invalidateQueries({queryKey:[`unified`,`vscode_url`]})}})};function Ga({disabled:e,canSubmit:t=!0,hasStartedConversation:n,onAddFileClick:r=()=>{},showButton:i=!0,buttonClassName:o=``,handleSubmit:s=()=>{}}){let{t:c}=a(`openhands`),l=ge(),u=Ua(),d=Wa(),{conversationId:f}=K(),{backend:p}=b(),m=p.kind===`cloud`,h=Kr(),g=!f||n===!1,_=yt({enabled:g}),v=g&&!(f?.startsWith(`task-`)??!1)&&(_.data?.profiles?.length??0)>0,y=m&&!h.isAcpContext,x=or(),{curAgentState:S}=It(),{conversationMode:C,setConversationMode:w}=V(),{handlePlanClick:T,isCreatingConversation:D}=Lr(),O=J.useRef(null),k=J.useRef(null),A=J.useRef(null),j=J.useRef(null),M=J.useRef(null),N=J.useRef(null),[ee,te]=J.useState(1/0),[ne,re]=J.useState(0),[ie,ae]=J.useState(32),[oe,se]=J.useState(96),[le,ue]=J.useState(120),[I,L]=J.useState(!1),[de,R]=J.useState(null),[pe,me]=J.useState();J.useEffect(()=>{let e=O.current,t=k.current,n=A.current,r=j.current,i=M.current;if(!e||!t||!n||!i||y&&!r||typeof ResizeObserver>`u`)return;let a=()=>{let a=e.getBoundingClientRect().width,o=t.getBoundingClientRect().width,s=n.getBoundingClientRect().width,c=i.getBoundingClientRect().width;if(a>0&&te(a),o>0&&re(o),s>0&&ae(s),c>0&&ue(c),r){let e=r.getBoundingClientRect().width;e>0&&se(e)}},o=new ResizeObserver(()=>{a()});return o.observe(e),o.observe(t),o.observe(n),o.observe(i),r&&o.observe(r),a(),()=>o.disconnect()},[y]);let he=()=>{f&&u.mutate({conversationId:f})},_e=()=>{f&&d.mutate({conversationId:f})},ve=l.isPending||u.isPending,ye=J.useCallback(e=>{let t=e,n={showCodeInline:!1,showModelInline:!1};return y&&t>=oe&&(n.showCodeInline=!0,t-=oe+12),t>=le&&(n.showModelInline=!0),n},[y,oe,le]),be=ee-ne-8-ie-12,xe=ye(be),Se=(!y||xe.showCodeInline)&&xe.showModelInline?xe:ye(be-28-12),Ce=y?Se.showCodeInline:!1,z=Se.showModelInline,we=ee>=360,Te=y&&!Ce||!z;J.useEffect(()=>{Te||(L(!1),R(null))},[Te]);let Ee=gt(()=>{L(!1),R(null)}),De=S===E.RUNNING||D||x!==`OPEN`,Oe=()=>{R(null),L(!1)},ke=ci({isAcp:h.isAcpContext}),Ae=P(`group`,Pe),B=P(`text-[var(--oh-muted)] group-hover:text-[var(--oh-foreground)]`,Pe);J.useLayoutEffect(()=>{if(!I||!N.current)return;let e=N.current,t=()=>{let t=e.getBoundingClientRect();me({position:`fixed`,top:t.top-8,left:t.left,transform:`translateY(-100%)`,zIndex:9999})};return t(),window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0)}},[I]);let je=(0,Q.jsxs)(U,{ref:Ee,testId:`chat-input-overflow-menu`,position:`top`,alignment:`left`,className:`!static !top-auto !bottom-auto !left-auto !right-auto !mt-0 overflow-visible min-w-[200px]`,children:[y&&!Ce&&(0,Q.jsxs)(`div`,{className:`relative group/overflow-agent`,children:[(0,Q.jsx)(W,{testId:`overflow-agent-button`,onClick:()=>R(e=>e===`agent`?null:`agent`),isDisabled:De,children:(0,Q.jsx)($,{icon:(0,Q.jsx)(Nr,{className:`h-[11px] w-[11px]`}),text:c(C===`code`?F.COMMON$CODE:F.COMMON$PLAN),rightIcon:(0,Q.jsx)(vi,{width:10,height:10})})}),!De&&(0,Q.jsx)(`div`,{className:P(`absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/overflow-agent:opacity-100 group-hover/overflow-agent:visible group-hover/overflow-agent:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,de===`agent`&&`opacity-100 visible pointer-events-auto`),children:(0,Q.jsxs)(U,{testId:`overflow-agent-submenu`,className:`overflow-visible min-w-[195px]`,children:[(0,Q.jsx)(W,{testId:`overflow-agent-code`,onClick:e=>{e.preventDefault(),e.stopPropagation(),w(`code`),Oe()},children:(0,Q.jsx)($,{icon:(0,Q.jsx)(Nr,{className:`h-[11px] w-[11px]`}),text:c(F.COMMON$CODE)})}),(0,Q.jsx)(W,{testId:`overflow-agent-plan`,onClick:e=>{T(e),Oe()},children:(0,Q.jsx)($,{icon:(0,Q.jsx)(Wt,{width:16,height:16,color:`currentColor`}),text:c(F.COMMON$PLAN)})})]})})]}),!z&&(0,Q.jsxs)(`div`,{className:`relative group/overflow-model`,children:[(0,Q.jsx)(W,{testId:`overflow-model-button`,onClick:()=>R(e=>e===`model`?null:`model`),children:(0,Q.jsx)($,{icon:(0,Q.jsx)(fe,{width:16,height:16,strokeWidth:2,"aria-hidden":!0}),text:c(F.SETTINGS$AGENT_MODEL),rightIcon:(0,Q.jsx)(vi,{width:10,height:10})})}),(0,Q.jsx)(`div`,{className:P(`absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/overflow-model:opacity-100 group-hover/overflow-model:visible group-hover/overflow-model:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,de===`model`&&`opacity-100 visible pointer-events-auto`),children:(0,Q.jsx)(U,{testId:`overflow-model-submenu`,className:`min-w-[220px] max-w-[320px] max-h-[60vh] overflow-y-auto gap-0`,children:ke===`model`?(0,Q.jsx)(Zr,{model:h,onClose:Oe,dividerInset:`menu`,settingsLinkClassName:Ae,settingsIconClassName:B}):(0,Q.jsx)(ai,{onClose:Oe,dividerInset:`menu`,settingsLinkClassName:Ae,settingsIconClassName:B})})})]})]});return(0,Q.jsxs)(`div`,{ref:O,className:`w-full min-w-0 flex items-center justify-between gap-2`,children:[(0,Q.jsx)(`div`,{className:`flex min-w-0 items-center gap-1`,children:(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,Q.jsx)(`div`,{ref:A,className:P(!1),children:(0,Q.jsx)(Ha,{disabled:e,handleFileIconClick:r,showAgentProfileSwitch:v})}),y&&(0,Q.jsx)(`div`,{ref:j,className:P(!Ce&&`hidden`),children:(0,Q.jsx)(Rr,{})}),(0,Q.jsx)(`div`,{ref:M,className:P(!z&&`hidden`),children:ke===`model`?(0,Q.jsx)(Qr,{}):(0,Q.jsx)(oi,{})}),Te&&(0,Q.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,Q.jsx)(`button`,{ref:N,type:`button`,className:P(Le,`size-6`),"aria-label":c(F.CHAT_INTERFACE$MORE_INPUT_ACTIONS),"aria-expanded":I,"aria-haspopup":`menu`,onClick:e=>{e.preventDefault(),e.stopPropagation(),L(e=>!e)},children:(0,Q.jsx)(Et,{width:16,height:16,color:`currentColor`})}),I&&typeof document<`u`&&pe&&$n.createPortal((0,Q.jsx)(`div`,{style:pe,children:je}),document.body)]})]})}),(0,Q.jsxs)(`div`,{ref:k,className:`ml-auto flex shrink-0 items-center gap-2`,children:[we&&f&&(0,Q.jsx)(Mr,{handleStop:he,handleResumeAgent:_e,disabled:e,isPausing:ve}),i&&(0,Q.jsx)(ce,{buttonClassName:o,handleSubmit:s,disabled:e||!t})]})]})}function Ka(e){return e.replace(/!\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\*{3}(.+?)\*{3}/g,`$1`).replace(/\*{2}(.+?)\*{2}/g,`$1`).replace(/\*(.+?)\*/g,`$1`).replace(/_{3}(.+?)_{3}/g,`$1`).replace(/_{2}(.+?)_{2}/g,`$1`).replace(/_(.+?)_/g,`$1`).replace(/`(.+?)`/g,`$1`).replace(/~~(.+?)~~/g,`$1`)}function qa(e){let t=e,n=e.match(/^---\s*\n([\s\S]*?)\n---/);if(n){let r=n[1].match(/^description:\s*(.+)$/m);if(r){let e=r[1].trim();return(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))&&(e=e.slice(1,-1)),Ka(e)}t=e.slice(n[0].length)}let r=t.split(`
|
|
27
|
-
`).map(e=>e.trim()).find(e=>e.length>0&&!e.startsWith(`#`)&&e!==`---`);if(!r)return null;let i=Ka(r);return i.match(/^[^.!?\n]*[.!?]/)?.[0]||i}function Ja({item:e,isSelected:t,onSelect:n,ref:r}){let i=(0,J.useMemo)(()=>`description`in e.skill&&e.skill.description?Ka(e.skill.description):`content`in e.skill&&e.skill.content?qa(e.skill.content):null,[e.skill]);return(0,Q.jsxs)(`button`,{role:`option`,"aria-selected":t,ref:r,type:`button`,className:P(`w-full px-3 py-2.5 text-left`,Ge,t?`bg-tertiary`:`hover:bg-[var(--oh-surface-raised)]`),onMouseDown:t=>{t.preventDefault(),n(e)},children:[(0,Q.jsx)(Nt,{className:`font-normal`,children:e.command}),i&&(0,Q.jsx)(Nt,{className:`text-xs text-[var(--oh-muted)] mt-0.5 truncate block`,children:i})]})}function Ya({items:e,selectedIndex:t,onSelect:n}){let{t:r}=a(`openhands`),i=(0,J.useRef)([]);return(0,J.useEffect)(()=>{i.current=i.current.slice(0,e.length)},[e.length]),(0,J.useEffect)(()=>{let e=i.current[t];e&&e.scrollIntoView({block:`nearest`})},[t]),e.length===0?null:(0,Q.jsxs)(`div`,{role:`listbox`,"aria-label":r(F.CHAT_INTERFACE$COMMANDS),className:`absolute bottom-full left-0 w-full mb-1 bg-[var(--oh-surface)] border border-[var(--oh-border-subtle)] rounded-lg shadow-lg max-h-[300px] overflow-y-auto custom-scrollbar z-50`,"data-testid":`slash-command-menu`,children:[(0,Q.jsx)(`div`,{className:`px-3 py-2 text-xs text-[var(--oh-muted)] border-b border-[var(--oh-border-subtle)]`,children:r(F.CHAT_INTERFACE$COMMANDS)}),(0,Q.jsx)(`div`,{className:We,children:e.map((e,r)=>(0,Q.jsx)(Ja,{item:e,isSelected:r===t,onSelect:n,ref:e=>{i.current[r]=e}},e.command))})]})}function Xa({chatContainerRef:e,isDragOver:t,disabled:n,canSubmit:r,hasStartedConversation:i,isNewConversationPending:a=!1,showButton:o,buttonClassName:s,chatInputRef:c,handleFileIconClick:l,handleSubmit:u,onDragOver:d,onDragLeave:f,onDrop:p,onInput:m,onPaste:h,onKeyDown:g,onFocus:_,onBlur:v,isSlashMenuOpen:y=!1,slashItems:b=[],slashSelectedIndex:x=0,onSlashSelect:S}){return(0,Q.jsxs)(`div`,{ref:e,className:P(`bg-[var(--oh-surface)] box-border content-stretch flex flex-col items-start justify-center p-4 relative rounded-[15px] w-full`,V(e=>e.conversationMode)===`plan`&&`border border-[#597FF4]`),onDragOver:e=>d(e,n),onDragLeave:e=>f(e,n),onDrop:e=>p(e,n),children:[t&&(0,Q.jsx)(Gn,{}),(0,Q.jsx)(Xn,{}),(0,Q.jsxs)(`div`,{className:`relative w-full`,children:[y&&S&&(0,Q.jsx)(Ya,{items:b,selectedIndex:x,onSelect:S}),(0,Q.jsx)(Qn,{chatInputRef:c,isNewConversationPending:a,onInput:m,onPaste:h,onKeyDown:g,onFocus:_,onBlur:v})]}),(0,Q.jsx)(Ga,{disabled:n,canSubmit:r,hasStartedConversation:i,onAddFileClick:()=>l(n),showButton:o,buttonClassName:s,handleSubmit:u})]})}function Za({fileInputRef:e,onChange:t}){return(0,Q.jsx)(`input`,{type:`file`,ref:e,multiple:!0,accept:`*/*`,className:`hidden`,onChange:t,"data-testid":`upload-image-input`})}function Qa({disabled:e=!1,isNewConversationPending:t=!1,hasStartedConversation:n,showButton:r=!0,onSubmit:i,onFocus:a,onBlur:o,onFilesPaste:s,className:c=``,buttonClassName:l=``}){let[u,d]=J.useState(!1),{submittedMessage:f,clearAllFiles:p,setShouldHideSuggestions:m,setSubmittedMessage:h,images:g,files:_}=V(),v=e,y=(0,J.useRef)(i);(0,J.useEffect)(()=>{y.current=i},[i]),(0,J.useEffect)(()=>{!f||e||(y.current(f),h(null))},[f,e,h]);let{chatInputRef:b,messageToSend:x,checkIsContentEmpty:S,clearEmptyContentHandler:C,saveDraft:w}=Sn(),T=J.useCallback(()=>{let e=b.current?.innerText??``,t=g.length>0||_.length>0;d(e.trim().length>0||t)},[b,g,_]),{fileInputRef:E,chatContainerRef:D,isDragOver:O,handleFileIconClick:k,handleFileInputChange:A,handleDragOver:j,handleDragLeave:M,handleDrop:N}=Cn(s),{gripRef:ee,isGripVisible:te,isGripDragging:ne,handleTopEdgeClick:re,smartResize:ie,handleGripMouseDown:ae,handleGripTouchStart:oe,increaseHeightForEmptyContent:se,resetManualResize:F}=In(b,x),{handleSubmit:ce}=Rn(b,E,ie,i,F),le=J.useCallback(()=>{ce(),T()},[ce,T]),{handleInput:ue,handlePaste:I,handleKeyDown:L,handleBlur:de,handleFocus:fe}=Ln(b,ie,se,S,C,a,o),{isMenuOpen:R,filteredItems:pe,selectedIndex:me,updateSlashMenu:he,selectItem:ge,handleSlashKeyDown:_e,closeMenu:ve}=Vn(b);return(0,J.useEffect)(()=>()=>{m(!1),p()},[m,p]),(0,J.useEffect)(()=>{T()},[T,g.length,_.length]),(0,Q.jsxs)(`div`,{className:P(`w-full`,c),children:[(0,Q.jsx)(Za,{fileInputRef:E,onChange:A}),(0,Q.jsxs)(`div`,{className:`relative w-full`,children:[(0,Q.jsx)(Hn,{gripRef:ee,isGripVisible:te,isGripDragging:ne,handleTopEdgeClick:re,handleGripMouseDown:ae,handleGripTouchStart:oe}),(0,Q.jsx)(Xa,{chatContainerRef:D,isDragOver:O,disabled:v,canSubmit:u,hasStartedConversation:n,isNewConversationPending:t,showButton:r,buttonClassName:l,chatInputRef:b,handleFileIconClick:k,handleSubmit:le,onDragOver:j,onDragLeave:M,onDrop:N,onInput:()=>{ue(),he(),w(),T()},onPaste:I,onKeyDown:e=>{_e(e)||L(e,v,le)},onFocus:fe,onBlur:()=>{de(),ve(),T()},isSlashMenuOpen:R,slashItems:pe,slashSelectedIndex:me,onSlashSelect:ge})]})]})}var $a=`${w} `,eo=(e,t)=>{let n=Vt(e=>e.show),r=i(),{switchAndLog:o}=ti(),{backend:s,orgId:c}=b(),{t:l}=a();return(0,J.useCallback)(i=>{let a=i.trim();if(!(a===`/model`||a.startsWith($a))){t(i);return}let u=a.slice(w.length).trim();if(u){o(e??null,u);return}if(!e)return;let d=zt();r.fetchQuery({queryKey:[...m.all,s.id,c],queryFn:it.listProfiles,staleTime:0}).then(({profiles:t})=>n(e,d,t)).catch(e=>{let t=l(F.MODEL$LIST_FAILED);y(e instanceof Error&&e.message?e.message:t)})},[e,t,n,r,o,s.id,c,l])};function to(){let{data:e,isLoading:t,isError:n}=B(),{data:r,isLoading:i,isError:a}=ke(),{data:o,isLoading:s,isError:l}=_t(),{backend:u,orgId:d}=b(),f=u.kind===`local`,{activeProfile:h,isLoading:g}=zr(),_=(h?.agent_kind??e?.agent_settings?.agent_kind)===`acp`,v=e?.llm_api_key_set===!0,y=h?.agent_kind===`openhands`&&!(f&&h.name==="default")?h.llm_profile_ref:void 0,x=(y?o?.profiles.find(e=>e.name===y):void 0)??o?.profiles.find(e=>e.name===o?.active_profile),S=x?.api_key_set===!0,C=f&&!!x&&!S,{data:w,isLoading:T,isError:E}=c({queryKey:[...m.all,u.id,d,`detail`,x?.name],queryFn:()=>it.getProfile(x.name),...p,enabled:C,meta:{disableToast:!0}}),D=C&<(w?.config),O=tn(`/settings/llm`,r?.feature_flags);return{isConfigured:_||O||(f?S||D:v),isLoading:t||n&&!e||i||a&&!r||s||l&&!o||g||C&&(T||E&&!w)}}var no=e=>e.type.startsWith(`image/`),ro=async e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{t()},r.onerror=()=>{n(Error(`Failed to read file: ${e.name}`))},r.onabort=()=>{n(Error(`File reading was aborted: ${e.name}`))},r.readAsArrayBuffer(e)}),io=async e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{t()},r.onerror=()=>{n(Error(`Failed to read image: ${e.name}`))},r.onabort=()=>{n(Error(`Image reading was aborted: ${e.name}`))},r.readAsDataURL(e)}),ao=async e=>{let t=await Promise.allSettled(e.map(async e=>(await ro(e),e))),n=[],r=[];return t.forEach((t,i)=>{t.status===`fulfilled`?n.push(t.value):r.push({file:e[i],error:t.reason})}),{successful:n,failed:r}},oo=async e=>{let t=await Promise.allSettled(e.map(async e=>(await io(e),e))),n=[],r=[];return t.forEach((t,i)=>{t.status===`fulfilled`?n.push(t.value):r.push({file:e[i],error:t.reason})}),{successful:n,failed:r}};function so(){let{images:e,files:t,addImages:n,addFiles:r,addFileLoading:i,removeFileLoading:a,addImageLoading:o,removeImageLoading:s,markImagesAsPasted:c}=V();return{handleUpload:(0,J.useCallback)(async(l,u)=>{let d=hr(l,[...e,...t]);if(!d.isValid){y(`Error: ${d.errorMessage}`);return}let f=l.filter(e=>!no(e)),p=l.filter(e=>no(e));p.length>0&&c(p.map(e=>e.name)),f.forEach(e=>i(e.name)),p.forEach(e=>o(e.name));try{let[e,t]=await Promise.all([ao(f),oo(p)]);e.successful.length>0&&(r(e.successful),e.successful.forEach(e=>a(e.name))),t.successful.length>0&&(n(t.successful),t.successful.forEach(e=>s(e.name))),e.failed.forEach(({file:e,error:t})=>{a(e.name),y(`Failed to process file ${e.name}: ${t.message}`)}),t.failed.forEach(({file:e,error:t})=>{s(e.name),y(`Failed to process image ${e.name}: ${t.message}`)})}catch{f.forEach(e=>a(e.name)),p.forEach(e=>s(e.name)),y(`An unexpected error occurred while processing files`)}},[e,t,n,r,i,a,o,s,c])}}function co({hasSelection:e,testId:t=`dropdown-loading`}){return(0,Q.jsx)(`div`,{className:P(`absolute top-1/2 transform -translate-y-1/2`,e?`right-11`:`right-6`),children:(0,Q.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`,"data-testid":t})})}function lo({providers:e,value:t,placeholder:n,className:r,errorMessage:i,disabled:o=!1,isLoading:s=!1,onChange:c,inputClassName:l,toggleButtonClassName:u,itemClassName:d}){let{t:f}=a(`openhands`),[p,m]=(0,J.useState)(``),[h,g]=(0,J.useState)(t||null),_=e=>{switch(e){case`github`:return`GitHub`;case`gitlab`:return`GitLab`;case`bitbucket`:return`Bitbucket`;case`bitbucket_data_center`:return`Bitbucket Data Center`;case`azure_devops`:return`Azure DevOps`;default:return e.charAt(0).toUpperCase()+e.slice(1)}},v=(0,J.useMemo)(()=>h&&p===_(h)||!p?.trim()?e:e.filter(e=>_(e).toLowerCase().includes(p.toLowerCase())),[e,p,h]),{isOpen:y,getToggleButtonProps:b,getMenuProps:x,getInputProps:S,highlightedIndex:C,getItemProps:w,selectedItem:T}=Ve({items:v,itemToString:e=>e?_(e):``,selectedItem:h,onSelectedItemChange:({selectedItem:e})=>{g(e||null),c?.(e||null)},onInputValueChange:({inputValue:e})=>{m(e||``)},inputValue:p});(0,J.useEffect)(()=>{t!==h&&g(t||null)},[t,h]),(0,J.useEffect)(()=>{T&&!y?m(_(T)):T||m(``)},[T,y]);let E=(e,t,n,r,i)=>(0,Q.jsx)(nn,{item:e,index:t,isSelected:e===r,getItemProps:i,getDisplayText:_,getItemKey:e=>e,isProviderDropdown:!0,itemClassName:d},e),D=e=>(0,Q.jsx)(rn,{inputValue:e,searchMessage:`No providers found`,emptyMessage:`No providers available`,testId:`git-provider-dropdown-empty`});return(0,Q.jsxs)(`div`,{className:P(`relative`,r),children:[(0,Q.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[T&&(0,Q.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:(0,Q.jsx)(Ce,{gitProvider:T,className:`min-w-[14px] min-h-[14px] w-[14px] h-[14px]`})}),(0,Q.jsx)(`input`,{...S({disabled:o,placeholder:n??f(F.COMMON$SELECT_PROVIDER_PLACEHOLDER),readOnly:!0,className:P(`w-29.5 h-6 py-0 border border-[var(--oh-border-input)] rounded shadow-none h-6 min-h-6 max-h-6 `,`text-inherit bg-tertiary placeholder:text-[var(--oh-muted)]`,`focus:outline-none focus:ring-0 focus:border-[var(--oh-border-input)]`,`disabled:bg-tertiary disabled:cursor-not-allowed disabled:opacity-60`,`pl-1.5 pr-[1px] cursor-pointer text-xs font-normal leading-5`,T&&`pl-6`,l)}),"data-testid":`git-provider-dropdown`}),(0,Q.jsx)(`div`,{className:`absolute right-0 top-1/2 transform -translate-y-1/2 flex items-center gap-1`,children:(0,Q.jsx)(on,{isOpen:y,disabled:o,getToggleButtonProps:b,iconClassName:u})}),s&&(0,Q.jsx)(co,{hasSelection:!!T})]}),(0,Q.jsx)(sn,{isOpen:y,filteredItems:v,inputValue:p,highlightedIndex:C,selectedItem:T,getMenuProps:x,getItemProps:w,renderItem:E,renderEmptyState:D,itemKey:e=>e}),(0,Q.jsx)(an,{isError:!!i,message:i})]})}var uo=(e,t=30,n)=>o({queryKey:[`repository`,e,`branches`,`paginated`,t,n],queryFn:async({pageParam:r})=>!e||!n?{items:[],next_page_id:null}:kt.getRepositoryBranches(e,n,``,r??void 0,t),enabled:!!e&&!!n,staleTime:1e3*60*5,getNextPageParam:e=>e.next_page_id?e.next_page_id:void 0,initialPageParam:null});function fo(e,t,n=30,r){return c({queryKey:[`repository`,e,`branches`,`search`,t,n,r],queryFn:async()=>!e||!t||!r?[]:(await kt.searchRepositoryBranches(e,r,t,void 0,n)).items,enabled:!!e&&!!t&&!!r,staleTime:1e3*60*5,gcTime:1e3*60*15})}function po(e,t,n,r,i,a){let{data:o,fetchNextPage:s,hasNextPage:c,isLoading:l,isFetchingNextPage:u,isError:d}=uo(e,30,t),{data:f,isLoading:p}=fo(e,r,30,t),m=(0,J.useMemo)(()=>o?.pages?.flatMap(e=>e.items)||[],[o]),h=(0,J.useMemo)(()=>n?m.find(e=>e.name===n):null,[m,n]),{data:g,isLoading:_}=fo(e,n&&!h&&m.length>0&&!r?n:``,30,t);return{branches:(0,J.useMemo)(()=>{let e=r&&f&&i!==a?.name,t=e?f:m;if(n){let r=e?t.find(e=>e.name===n):h;if(!r&&g&&g.length>0)r=g.find(e=>e.name===n),r&&(t=[r,...t]);else if(r){let e=t.filter(e=>e.name!==n);t=[r,...e]}}return t},[r,f,m,a,i,n,h,g]),allBranches:m,fetchNextPage:s,hasNextPage:c,isLoading:l||_,isFetchingNextPage:u,isError:d,isSearchLoading:p}}function mo({isOpen:e,filteredBranches:t,inputValue:n,highlightedIndex:r,selectedItem:i,getMenuProps:a,getItemProps:o,onScroll:s,menuRef:c}){return(0,Q.jsx)(`div`,{"data-testid":`git-branch-dropdown-menu`,children:(0,Q.jsx)(sn,{isOpen:e,filteredItems:t,inputValue:n,highlightedIndex:r,selectedItem:i,getMenuProps:a,getItemProps:o,onScroll:s,menuRef:c,renderItem:(e,t,n,r,i)=>(0,Q.jsx)(nn,{item:e,index:t,isSelected:r?.name===e.name,getItemProps:i,getDisplayText:e=>e.name,getItemKey:e=>e.name},e.name),renderEmptyState:e=>(0,Q.jsx)(`li`,{className:`px-3 py-2`,children:(0,Q.jsx)(rn,{inputValue:e,searchMessage:`No branches found`,emptyMessage:`No branches available`,testId:`git-branch-dropdown-empty`})}),itemKey:e=>e.name})})}function ho({repository:e,provider:t,selectedBranch:n,onBranchSelect:r,defaultBranch:i,placeholder:o,disabled:s=!1,className:c}){let{t:l}=a(`openhands`),[u,d]=(0,J.useState)(``),[f,p]=(0,J.useState)(!1),m=At(u,300),h=(0,J.useRef)(null),g=(0,J.useMemo)(()=>m.trim().length>0?m.trim():``,[m]),{branches:_,isLoading:v,isError:y,fetchNextPage:b,hasNextPage:x,isFetchingNextPage:S,isSearchLoading:C}=po(e,t,i||null,g,u,n),w=y?Error(`Failed to load branches`):null,T=(0,J.useCallback)(()=>{d(``),r(null),p(!0)},[r]),E=(0,J.useCallback)(e=>{r(e),d(``)},[r]),D=(0,J.useCallback)(e=>{let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;n-t<=r*1.5&&x&&!S&&b()},[x,S,b]),{isOpen:O,selectedItem:k,highlightedIndex:A,getInputProps:j,getItemProps:M,getMenuProps:N,getToggleButtonProps:ee}=Ve({items:_,selectedItem:n,itemToString:e=>e?.name||``,onSelectedItemChange:({selectedItem:e})=>{E(e||null)},inputValue:u,stateReducer:(e,t)=>t.type===Ve.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes});(0,J.useEffect)(()=>{e&&(r(null),p(!1))},[e,r]),(0,J.useEffect)(()=>{if(e&&i&&!n&&!f&&_.length>0&&!v){let e=_.find(e=>e.name===i);e&&r(e)}},[e,i,n,f,_,r,v]),(0,J.useEffect)(()=>{d(``)},[e]),(0,J.useEffect)(()=>{n&&!O?d(n.name):!n&&!O&&d(``)},[n,O]);let te=v||C||S;return(0,Q.jsxs)(`div`,{className:P(`relative`,c),children:[(0,Q.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[(0,Q.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:te?(0,Q.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`}):(0,Q.jsx)(mi,{width:16,height:16})}),(0,Q.jsx)(`input`,{...j({disabled:s||!e,placeholder:o??l(F.COMMON$SELECT_BRANCH_PLACEHOLDER),className:P(Ie,`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=>{d(e.target.value)}}),"data-testid":`git-branch-dropdown-input`}),(0,Q.jsxs)(`div`,{className:`absolute right-1 top-1/2 transform -translate-y-1/2 flex items-center`,children:[n&&(0,Q.jsx)(cn,{disabled:s,onClear:T}),(0,Q.jsx)(on,{isOpen:O,disabled:s||!e,getToggleButtonProps:ee})]})]}),(0,Q.jsx)(mo,{isOpen:O,filteredBranches:_,inputValue:u,highlightedIndex:A,selectedItem:k,getMenuProps:N,getItemProps:M,onScroll:D,menuRef:h}),(0,Q.jsx)(an,{isError:!!w})]})}function go({className:e}){return(0,Q.jsx)(`div`,{className:P(`w-3 h-3 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300 absolute right-0 top-1/2 -translate-y-1/2 h-full w-10.5 pr-2.5 justify-end git-external-link-icon`,e),children:(0,Q.jsx)(Zt,{width:12,height:12,color:`white`})})}function _o({selectedRepository:e,gitProvider:t,workspaceName:n,emptyStateLabel:r,onClick:i,disabled:o}){let{t:s}=a(`openhands`),{data:c}=B(),l=!!e&&!!t,u=t?c?.provider_tokens_set[t]:null,d=l?ae(t,e,u):void 0,f=!e&&!n,p=e||n||s(F.COMMON$CONNECT_REPO);return l?(0,Q.jsxs)(`a`,{href:d,target:`_blank`,rel:`noopener noreferrer`,className:P(`group flex flex-row items-center justify-between gap-2 pl-2.5 pr-2.5 py-1 rounded-[100px] flex-1 truncate relative`,`border border-[var(--oh-border)] bg-transparent hover:border-[var(--oh-border-subtle)] cursor-pointer`),children:[(0,Q.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center flex-shrink-0`,children:(0,Q.jsx)(Ce,{gitProvider:t,className:`w-3 h-3 inline-flex`})}),(0,Q.jsx)(`div`,{className:`font-normal text-white text-sm leading-5 truncate flex-1 min-w-0`,title:p,children:p}),(0,Q.jsx)(go,{})]}):(0,Q.jsxs)(`button`,{type:`button`,onClick:i,disabled:o,className:P(`group flex flex-row items-center justify-between gap-2 pl-2.5 pr-2.5 py-1 rounded-[100px] truncate relative`,`border border-[rgba(71,74,84,0.50)] bg-transparent`,o?`cursor-not-allowed opacity-50`:`cursor-pointer hover:border-[var(--oh-border-subtle)]`),children:[(0,Q.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center flex-shrink-0 text-white`,children:f?(0,Q.jsx)(_e,{className:`w-3 h-3`,strokeWidth:2,"aria-hidden":!0,"data-testid":`git-control-bar-connect-repo-icon`}):(0,Q.jsx)(ft,{width:12,height:12,color:`white`})}),(0,Q.jsx)(`div`,{className:`font-normal text-white text-sm leading-5 truncate flex-1 min-w-0`,title:p,children:p})]})}function vo({selectedBranch:e,selectedRepository:t,gitProvider:n}){let{t:r}=a(`openhands`),{data:i}=B(),o=n?i?.provider_tokens_set[n]:null,s=!!e&&!!t&&!!n,c=s?ne(n,t,e,o):void 0,l=e||r(F.COMMON$NO_BRANCH);return(0,Q.jsxs)(`a`,{href:s?c:void 0,target:`_blank`,rel:`noopener noreferrer`,className:P(`group flex flex-row items-center justify-between gap-2 pl-2.5 pr-2.5 py-1 rounded-[100px] w-fit flex-shrink-0 max-w-[200px] truncate relative`,s?`border border-[var(--oh-border)] bg-transparent hover:border-[var(--oh-border-subtle)] cursor-pointer`:`border border-[rgba(71,74,84,0.50)] bg-transparent cursor-not-allowed min-w-[108px]`),children:[(0,Q.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center flex-shrink-0`,children:(0,Q.jsx)(mi,{width:12,height:12,color:`white`})}),(0,Q.jsx)(`div`,{className:`font-normal text-white text-sm leading-5 truncate`,title:l,children:l}),s&&(0,Q.jsx)(go,{})]})}function yo(){let{t:e}=a(`openhands`),{navigate:t}=ze(),{isConfigured:n,isLoading:r}=to();return r||n?null:(0,Q.jsxs)(`div`,{"data-testid":`home-llm-not-configured-banner`,role:`alert`,className:`mt-3 flex w-full flex-col gap-3 rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] px-4 py-3 text-[var(--oh-foreground)] sm:flex-row sm:items-center sm:justify-between sm:py-4`,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-start sm:items-center`,children:[(0,Q.jsx)(`div`,{className:`flex-shrink-0`,children:(0,Q.jsx)(I,{className:`align-middle text-yellow-400`})}),(0,Q.jsx)(G.Text,{className:`ml-3 text-sm font-medium`,children:e(F.HOME$LLM_NOT_CONFIGURED_MESSAGE)})]}),(0,Q.jsx)(Re,{testId:`home-llm-not-configured-action`,type:`button`,variant:`primary`,className:`w-fit shrink-0 self-start whitespace-nowrap sm:self-auto`,onClick:()=>t(`/settings/llm`),children:e(F.HOME$LLM_NOT_CONFIGURED_ACTION)})]})}export{Er as A,yi as C,si as D,pi as E,ur as F,cr as I,or as L,wr as M,gr as N,Lr as O,hr as P,X as R,bi as S,hi as T,Di as _,lo as a,wi as b,eo as c,Ba as d,Ea as f,Bi as g,Gi as h,ho as i,Dr as j,Or as k,Qa as l,Ki as m,vo as n,so as o,oa as p,_o as r,to as s,yo as t,Va as u,Ei as v,gi as w,xi as x,Ti as y,dn as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./llm-settings-CXo8iPNW.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0bpqexo-CbTboogo.js";var t=e(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]);export{t};
|