@openhands/agent-canvas 1.17.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.windows.md +2 -2
- package/build/assets/acp-providers-BQ4o4vqy.js +1 -0
- package/build/assets/active-backend-context-BsLfwrXB.js +2 -0
- package/build/assets/{agent-context-settings-CJUrcBut.js → agent-context-settings-D9i6ezoJ.js} +1 -1
- package/build/assets/{agent-profiles-service.api-Biieml2L.js → agent-profiles-service.api-U-9YzDFU.js} +1 -1
- package/build/assets/agent-profiles-settings-D-bUV2PX.js +1 -0
- package/build/assets/agent-server-client-options-EHB23gyx.js +1 -0
- package/build/assets/agent-server-config-C_x8Otd9.js +1 -0
- package/build/assets/agent-server-conversation-service.api-BaVQ6NpE.js +88 -0
- package/build/assets/agent-settings-BZJHtaIK.js +2 -0
- package/build/assets/agent-settings-D4snDd6u.js +1 -0
- package/build/assets/alert-banner-BkVt_8Or.js +1 -0
- package/build/assets/{api-error-message-Ve79qDcN.js → api-error-message-BXo0lCI5.js} +1 -1
- package/build/assets/api-key-entry-screen-fAIld-n7.js +1 -0
- package/build/assets/app-settings-DITbrM2u.js +1 -0
- package/build/assets/automation-detail-DawHmaOl.js +3 -0
- package/build/assets/automation-disabled-reason-DtgC8Ppt.js +1 -0
- package/build/assets/{automation-export-DxY47m3T.js → automation-export-Kv6e0bHx.js} +1 -1
- package/build/assets/automation-git-sync-Dd98G_Oz.js +1 -0
- package/build/assets/automation-setup-route-Cdc109ZD.js +3 -0
- package/build/assets/{automation-templates-4C4PM8K7.js → automation-templates-Xhr-FDAB.js} +1 -1
- package/build/assets/automations-list-BeP1LuzQ.js +1 -0
- package/build/assets/{back-nav-button-B8tH0BEp.js → back-nav-button-DWNiN277.js} +1 -1
- package/build/assets/backend-form-modal-DeaUJIik.js +1 -0
- package/build/assets/backend-synced-settings-badge-Br85iWIY.js +1 -0
- package/build/assets/badge-Cdnei7Ly.js +1 -0
- package/build/assets/{base-modal-DTULovNc.js → base-modal-Ds7grR67.js} +1 -1
- package/build/assets/{bot-CLMxGFaq.js → bot-ByolqPEr.js} +1 -1
- package/build/assets/{brand-button-DxPO4Lf8.js → brand-button-mQq2Ld1I.js} +1 -1
- package/build/assets/browser-Bfum8fkE.js +46 -0
- package/build/assets/browser-tab-CmYT4j_r.js +1 -0
- package/build/assets/canvas-extension-page-CokKSVRG.js +1 -0
- package/build/assets/canvas-extensions-BoQEYG-2.js +1 -0
- package/build/assets/{canvas-extensions-runtime-DdnkgJXV.js → canvas-extensions-runtime-Du2M5iEX.js} +1 -1
- package/build/assets/{chat-send-button-B3SFSIg5.js → chat-send-button-DM3JgMc2.js} +1 -1
- package/build/assets/check-Bo8s5Ylg.js +1 -0
- package/build/assets/chevron-down-Cr6Fn_wS.js +1 -0
- package/build/assets/chevron-right-CfdfRn-8.js +1 -0
- package/build/assets/circle-check-5pH3qCji.js +1 -0
- package/build/assets/circle-plus-check-toggle-BbYBiUwv.js +1 -0
- package/build/assets/{cloud-funnel-analytics-BQanUEEC.js → cloud-funnel-analytics-D02kgq1s.js} +1 -1
- package/build/assets/{cog-VBlRo6iw.js → cog-Dy1eWbSZ.js} +1 -1
- package/build/assets/command-menu-mehU3Evb.js +1 -0
- package/build/assets/commits-tab-DhQW8CXi.js +1 -0
- package/build/assets/{condenser-settings-eVKFMvap.js → condenser-settings-eRk6Fkx6.js} +1 -1
- package/build/assets/confirmation-modal-BmVt_c0I.js +1 -0
- package/build/assets/{context-menu-list-item-DDROe12Z.js → context-menu-list-item-lx2zk9G7.js} +1 -1
- package/build/assets/{conversation-BnjJSFf5.js → conversation-BOj0ENI6.js} +8 -8
- package/build/assets/conversation-SouWlGvs.js +1 -0
- package/build/assets/conversation-panel-SouWlGvs.js +1 -0
- package/build/assets/conversation-state-store-C6YncQNo.js +1 -0
- package/build/assets/conversation-store-DC-JlJuq.js +6 -0
- package/build/assets/{conversation-tab-empty-state-DKlzAz5c.js → conversation-tab-empty-state-DIhwCC2J.js} +1 -1
- package/build/assets/copy-to-clipboard-button-DVNXLylP.js +1 -0
- package/build/assets/device-verify-LP-x7nra.js +1 -0
- package/build/assets/{dropdown-classes-B9kJVDIk.js → dropdown-classes-goDldkiu.js} +1 -1
- package/build/assets/edit-automation-modal-BJJR9wSW.js +1 -0
- package/build/assets/empty-state-Cd-TFe7i.js +1 -0
- package/build/assets/{entry.client-Ds8LVp-E.js → entry.client-CJdjIvMZ.js} +2 -2
- package/build/assets/enum-filter-dropdown-pocrz9AL.js +1 -0
- package/build/assets/environment-switch-overlay-Dwe78wRl.js +1 -0
- package/build/assets/error-state-SuWwztxV.js +1 -0
- package/build/assets/extensions-hub-O0esK3Er.js +1 -0
- package/build/assets/extensions-navigation-CgCVSXje.js +1 -0
- package/build/assets/{external-link-DQtv7eTh.js → external-link-Bd7Tga-1.js} +1 -1
- package/build/assets/files-tab-B_6t8ljw.js +1 -0
- package/build/assets/{form-control-classes-B-z85REi.js → form-control-classes-lQfLxzH4.js} +1 -1
- package/build/assets/format-model-name-Dfh9Udrx.js +1 -0
- package/build/assets/get-git-path-Bp5rsUkl.js +1 -0
- package/build/assets/git-repo-dropdown-CbD0_LPN.js +1 -0
- package/build/assets/git-repo-dropdown-DPQVumZg.js +1 -0
- package/build/assets/highlighted-source-view-Bp0sgK-f.js +1 -0
- package/build/assets/home-BghzJd-D.js +1 -0
- package/build/assets/home-CXZ8zawS.js +1 -0
- package/build/assets/home-automation-run-tooltip-BdpCckKO.js +1 -0
- package/build/assets/home-store-DNQpfIEO.js +1 -0
- package/build/assets/hooks-service-DkxnQa4N.js +1 -0
- package/build/assets/index-home-Ca6Q5CtT.js +1 -0
- package/build/assets/info-BcajzHn1.js +1 -0
- package/build/assets/install-server-modal-DvxxYKia.js +1 -0
- package/build/assets/{key-CfXbJa8w.js → key-CwTE6XJj.js} +1 -1
- package/build/assets/launch-jsRGPRBx.js +1 -0
- package/build/assets/link-external-B4gx3EeM.js +1 -0
- package/build/assets/list-filter-B8PQk3RA.js +1 -0
- package/build/assets/{list-todo-ByXMdY4W.js → list-todo-Caa8E1X_.js} +1 -1
- package/build/assets/llm-not-configured-banner-DMdL1vaX.js +27 -0
- package/build/assets/llm-settings-dkQ5Oq7W.js +1 -0
- package/build/assets/llm-settings-lNDerSlu.js +1 -0
- package/build/assets/{llm-subscription-service-aDNBQ7Gq.js → llm-subscription-service-BiQaZbvv.js} +1 -1
- package/build/assets/loader-circle-BxJgk73D.js +1 -0
- package/build/assets/{loading-spinner-DfHI77BA.js → loading-spinner-DK1sAwVg.js} +1 -1
- package/build/assets/manage-backends-modal-DqCJohsX.js +1 -0
- package/build/assets/manifest-ff93dc8c.js +1 -0
- package/build/assets/manifest-subpage-layout-sxuPqfUr.js +1 -0
- package/build/assets/{map-provider-DXvssjw9.js → map-provider-iRs80q_6.js} +1 -1
- package/build/assets/markdown-renderer-BH5pqDuJ.js +8 -0
- package/build/assets/mcp-BtaJDXnP.js +1 -0
- package/build/assets/mcp-installed-servers-Br4ZLsjr.js +1 -0
- package/build/assets/mcp-marketplace-utils-BwEnDYqm.js +1 -0
- package/build/assets/mcp-page-DwbnQpVs.js +9 -0
- package/build/assets/messages-DmFJlW6c.js +41 -0
- package/build/assets/{modal-body-DJw4xBki.js → modal-body-DBweM2EN.js} +1 -1
- package/build/assets/{modal-classes-Dg0ngBPO.js → modal-classes-jvG85nkU.js} +1 -1
- package/build/assets/modal-close-button-BrM5fNnn.js +1 -0
- package/build/assets/{mouse-pointer-click-DEhsSUpu.js → mouse-pointer-click-BXlRN92t.js} +1 -1
- package/build/assets/onboarding-CQ8T6T0U.js +1 -0
- package/build/assets/onboarding-modal-CnliiaSN.js +1 -0
- package/build/assets/{organization-service.api-Cyg1Tn03.js → organization-service.api-DmFUEmu5.js} +1 -1
- package/build/assets/parse-git-remote-url-BG8pcKL8.js +1 -0
- package/build/assets/{pencil-D5c47kyN.js → pencil-q-ihqDYv.js} +1 -1
- package/build/assets/{pin-C7vMagvf.js → pin-BdroVQdN.js} +1 -1
- package/build/assets/planner-tab-CXph_C9F.js +1 -0
- package/build/assets/{plug-CeaqeF6u.js → plug-7ACOEbMs.js} +1 -1
- package/build/assets/{plugins-management-service-Bh_pBuf-.js → plugins-management-service-CcEpfNKz.js} +1 -1
- package/build/assets/plus-C2e21TFC.js +1 -0
- package/build/assets/{profiles-service.api-BbOK0EkF.js → profiles-service.api-DdF_4Zhe.js} +1 -1
- package/build/assets/providers-BWRnl31s.js +1 -0
- package/build/assets/proxy-DbEf3Nqr.js +1 -0
- package/build/assets/{puzzle-DdAqbUrb.js → puzzle-LJYnuxKe.js} +1 -1
- package/build/assets/react-BX7IV650.js +1 -0
- package/build/assets/recommended-automations-launcher-r0oI91HN.js +1 -0
- package/build/assets/{refresh-cw-DEQdPCpH.js → refresh-cw-BtdC3T8P.js} +1 -1
- package/build/assets/root-j2fFRlWS.js +2 -0
- package/build/assets/root-layout-CfGgm2lo.js +2 -0
- package/build/assets/root-sEWn3ha1.css +1 -0
- package/build/assets/schema-field-c3Ncgm4x.js +1 -0
- package/build/assets/sdk-section-page-DFEiuiFQ.js +1 -0
- package/build/assets/secret-form-WXXNFqTM.js +1 -0
- package/build/assets/{secrets-service-Cr8g8xuv.js → secrets-service-DU6wh3wX.js} +1 -1
- package/build/assets/secrets-settings-BEqbPvjy.js +1 -0
- package/build/assets/settings-DjaSQwFh.js +1 -0
- package/build/assets/settings-dropdown-input-BRR2OZwi.js +1 -0
- package/build/assets/settings-index-DHv4XFcM.js +1 -0
- package/build/assets/settings-input-Cm4VxUon.js +1 -0
- package/build/assets/{settings-list-classes-Ds4jPBHK.js → settings-list-classes-CaUfKZ33.js} +1 -1
- package/build/assets/settings-modal-djXuAnBO.js +1 -0
- package/build/assets/settings-nav-DFb3hBMr.js +16 -0
- package/build/assets/{settings-service.api-9_xdv_mh.js → settings-service.api-Q9lKW1TX.js} +1 -1
- package/build/assets/settings-switch-seaSJc7t.js +1 -0
- package/build/assets/{settings-utils-8GIIgOQL.js → settings-utils-BTaaRhLZ.js} +1 -1
- package/build/assets/shared-conversation-x3rxVCon.js +1 -0
- package/build/assets/{shield-check-DO7wa_eu.js → shield-check-C3Rl0NF8.js} +1 -1
- package/build/assets/{sidebar-layout-EPfWxk11.js → sidebar-layout-B6mcvvdV.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-CEqS8KnA.js +1 -0
- package/build/assets/{sidebar-nav-link-_t4_Ef-9.js → sidebar-nav-link-BTHX11LG.js} +1 -1
- package/build/assets/{sidebar-onboarding-checklist-storage-DbDX-Wvj.js → sidebar-onboarding-checklist-storage-BP1kzn6p.js} +1 -1
- package/build/assets/sidebar-store-DAZVH-DR.js +1 -0
- package/build/assets/skill-card-pill-row-TD39nfP3.js +1 -0
- package/build/assets/{skill-filter-BBeZ4JEP.js → skill-filter-CdBbbwjm.js} +2 -2
- package/build/assets/{skill-icon-badge-BDhQ-tQ0.js → skill-icon-badge-vUEp7gsC.js} +1 -1
- package/build/assets/skill-scope-BTRBQt0-.js +1 -0
- package/build/assets/skills-plugins-k1tUNAw4.js +1 -0
- package/build/assets/skills-settings-CENviPT7.js +1 -0
- package/build/assets/{styled-tooltip-Pd22BIvr.js → styled-tooltip-DVAlWYnL.js} +1 -1
- package/build/assets/task-list-tab-BLKF_x9f.js +1 -0
- package/build/assets/{terminal-onXx0_Qz.js → terminal-Ckbnqb23.js} +1 -1
- package/build/assets/{toggle-switch-lwQtxDcm.js → toggle-switch-DeiG9Mf6.js} +1 -1
- package/build/assets/{trash-2-ZhKuTLiz.js → trash-2-Bb40zQzs.js} +1 -1
- package/build/assets/trash-CXN2R54L.js +1 -0
- package/build/assets/{triangle-alert-BajLPpQg.js → triangle-alert-DEdu-b_L.js} +1 -1
- package/build/assets/{typography-HLLg_FAn.js → typography-NarNyelM.js} +1 -1
- package/build/assets/usage-tab-Drd3O006.js +1 -0
- package/build/assets/use-acp-credential-form-CJ5wPsQm.js +1 -0
- package/build/assets/{use-activate-agent-profile-BLKML6vQ.js → use-activate-agent-profile-iQZ0U3qV.js} +1 -1
- package/build/assets/use-agent-profiles-LCvb5OXT.js +1 -0
- package/build/assets/{use-automation-health-BZkQNEA8.js → use-automation-health-DdgSa8sA.js} +1 -1
- package/build/assets/{use-automation-permissions-B_RpvL-s.js → use-automation-permissions-D3kEeieu.js} +1 -1
- package/build/assets/{use-automations-Cg0PDIZr.js → use-automations-CEubcYTD.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-BbN6KfDr.js → use-can-manage-org-profiles-CB8ybxFK.js} +1 -1
- package/build/assets/{use-canvas-extensions-CFUpHat6.js → use-canvas-extensions-BMacwi2v.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-Dk0rjr63.js → use-cloud-current-user-id-BEKRd6XZ.js} +1 -1
- package/build/assets/{use-config-DpafU_QP.js → use-config-3WYcJsgC.js} +1 -1
- package/build/assets/{use-create-conversation-1YgmAHt-.js → use-create-conversation-Be-eVpFp.js} +1 -1
- package/build/assets/use-create-secret-Bk9ZxTjl.js +1 -0
- package/build/assets/use-free-models-Ci3FkKEm.js +1 -0
- package/build/assets/{use-get-secrets-CQ4b0qK8.js → use-get-secrets-fqS0kxt6.js} +1 -1
- package/build/assets/use-is-authed-A2Yinlt0.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-DeYa1tFM.js → use-launch-skill-in-chat-QbXDhiHr.js} +1 -1
- package/build/assets/use-llm-configured-B71ZEVg2.js +1 -0
- package/build/assets/use-llm-profiles-xtCBMbef.js +1 -0
- package/build/assets/{use-manifest-capabilities-AOWGcu0j.js → use-manifest-capabilities-Bso6A_-A.js} +1 -1
- package/build/assets/{use-onboarding-completion-CoINurkm.js → use-onboarding-completion-CEgjL02y.js} +1 -1
- package/build/assets/{use-pinned-home-route-D6krwXjy.js → use-pinned-home-route-pK4IlJ-p.js} +1 -1
- package/build/assets/{use-plugins-marketplace-mLsIDhBv.js → use-plugins-marketplace-B8-ZEB34.js} +1 -1
- package/build/assets/use-save-agent-profile-D7hJuW_u.js +1 -0
- package/build/assets/{use-save-settings-3U5K9-8x.js → use-save-settings-CikTu5xV.js} +1 -1
- package/build/assets/{use-settings-Dn00UISA.js → use-settings-BWIH5EuN.js} +1 -1
- package/build/assets/use-settings-nav-items-DSKwLDnd.js +1 -0
- package/build/assets/use-tracking-ChnSFChv.js +3 -0
- package/build/assets/{use-user-conversation-ZWlXtbZb.js → use-user-conversation-C_l65DqW.js} +1 -1
- package/build/assets/{useInfiniteQuery-BzrRqjLg.js → useInfiniteQuery-CtSRG7uW.js} +1 -1
- package/build/assets/{useMutation-CJuK90oc.js → useMutation-Cszf8mKy.js} +1 -1
- package/build/assets/useQueries-pUohFMSP.js +1 -0
- package/build/assets/useQuery-DAAacS7O.js +1 -0
- package/build/assets/useTranslation-CCgUjPJF.js +1 -0
- package/build/assets/utils-D-gOfhmN.js +1 -0
- package/build/assets/{vendor~conversation-panel~conversation-4eJ0tml3.js → vendor~conversation-panel~conversation-C22sJuWZ.js} +1 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js +2 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js +185 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js +1 -0
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-CSFLzmTN.js → vendor~index-home~home~conversation-panel~conversation-UTl7gUo9.js} +1 -1
- package/build/assets/{vendor~root-layout-n8XCEXG8.js → vendor~root-layout-CcdIqs-C.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-3Idg1_U3.js → vendor~root-layout~conversation-panel~conversation-C3EBV3kp.js} +1 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BCe0JJVy.js +1 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-DgQ564nC.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BGGbPcYh.js} +1 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-BFRW8wt-.js +48 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BPjI-atc.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js} +1 -1
- package/build/assets/{verification-settings-u2POabjH.js → verification-settings-PKtoIUUY.js} +1 -1
- package/build/assets/{wrench-CkgI4rxA.js → wrench-B8Wg_nbp.js} +1 -1
- package/build/assets/{x-By6qCmtY.js → x-CX8lVGwm.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +16 -2
- package/build/locales/ca/openhands.json +16 -2
- package/build/locales/de/openhands.json +16 -2
- package/build/locales/en/openhands.json +16 -2
- package/build/locales/es/openhands.json +16 -2
- package/build/locales/fr/openhands.json +16 -2
- package/build/locales/it/openhands.json +16 -2
- package/build/locales/ja/openhands.json +16 -2
- package/build/locales/ko-KR/openhands.json +16 -2
- package/build/locales/no/openhands.json +16 -2
- package/build/locales/pt/openhands.json +16 -2
- package/build/locales/tr/openhands.json +16 -2
- package/build/locales/uk/openhands.json +16 -2
- package/build/locales/zh-CN/openhands.json +16 -2
- package/build/locales/zh-TW/openhands.json +16 -2
- package/config/defaults.json +3 -3
- package/dist/api/cloud/organization-service.api.cjs.map +1 -1
- package/dist/api/cloud/organization-service.api.d.ts +9 -1
- package/dist/api/cloud/organization-service.api.js.map +1 -1
- package/dist/api/config-service/config-service.api.cjs +1 -1
- package/dist/api/config-service/config-service.api.cjs.map +1 -1
- package/dist/api/config-service/config-service.api.js +6 -2
- package/dist/api/config-service/config-service.api.js.map +1 -1
- package/dist/api/config-service/config-service.types.d.ts +13 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.cjs +3 -3
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.js +12 -16
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.js.map +1 -1
- package/dist/components/features/automations/automation-card.cjs +1 -1
- package/dist/components/features/automations/automation-card.cjs.map +1 -1
- package/dist/components/features/automations/automation-card.js +39 -38
- package/dist/components/features/automations/automation-card.js.map +1 -1
- package/dist/components/features/automations/automation-list-row.cjs +1 -1
- package/dist/components/features/automations/automation-list-row.cjs.map +1 -1
- package/dist/components/features/automations/automation-list-row.js +73 -72
- package/dist/components/features/automations/automation-list-row.js.map +1 -1
- package/dist/components/features/automations/build-automation-menu-items.cjs +1 -1
- package/dist/components/features/automations/build-automation-menu-items.cjs.map +1 -1
- package/dist/components/features/automations/build-automation-menu-items.d.ts +3 -1
- package/dist/components/features/automations/build-automation-menu-items.js +12 -11
- package/dist/components/features/automations/build-automation-menu-items.js.map +1 -1
- package/dist/components/features/automations/detail/configuration-section.d.ts +7 -1
- package/dist/components/features/automations/detail/detail-header.d.ts +8 -5
- package/dist/components/features/automations/detail/disabled-reason-banner.d.ts +16 -0
- package/dist/components/features/backends/backend-selector.cjs +1 -1
- package/dist/components/features/backends/backend-selector.cjs.map +1 -1
- package/dist/components/features/backends/backend-selector.js +112 -112
- package/dist/components/features/backends/backend-selector.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +62 -61
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -1
- package/dist/components/features/chat/model-messages.cjs +1 -1
- package/dist/components/features/chat/model-messages.cjs.map +1 -1
- package/dist/components/features/chat/model-messages.js +27 -26
- package/dist/components/features/chat/model-messages.js.map +1 -1
- package/dist/components/features/conversation-panel/budget-display.cjs +1 -1
- package/dist/components/features/conversation-panel/budget-display.cjs.map +1 -1
- package/dist/components/features/conversation-panel/budget-display.d.ts +1 -2
- package/dist/components/features/conversation-panel/budget-display.js +12 -19
- package/dist/components/features/conversation-panel/budget-display.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js +45 -44
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
- package/dist/components/features/home/featured-automations/build-home-automation-menu-items.d.ts +1 -2
- package/dist/components/features/home/featured-automations/build-pinned-automation-menu-items.d.ts +0 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +38 -29
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
- package/dist/components/features/images/image-lightbox.cjs +2 -0
- package/dist/components/features/images/image-lightbox.cjs.map +1 -0
- package/dist/components/features/images/image-lightbox.d.ts +11 -0
- package/dist/components/features/images/image-lightbox.js +37 -0
- package/dist/components/features/images/image-lightbox.js.map +1 -0
- package/dist/components/features/images/image-preview.cjs +1 -1
- package/dist/components/features/images/image-preview.cjs.map +1 -1
- package/dist/components/features/images/image-preview.d.ts +2 -1
- package/dist/components/features/images/image-preview.js +33 -13
- package/dist/components/features/images/image-preview.js.map +1 -1
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +3 -4
- package/dist/components/features/settings/agent-profiles/profile-scope-list.d.ts +20 -0
- package/dist/components/features/settings/cloud-settings-link.cjs +1 -1
- package/dist/components/features/settings/cloud-settings-link.cjs.map +1 -1
- package/dist/components/features/settings/cloud-settings-link.d.ts +3 -1
- package/dist/components/features/settings/cloud-settings-link.js +22 -21
- package/dist/components/features/settings/cloud-settings-link.js.map +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +2 -1
- package/dist/components/features/settings/llm-profiles/profile-row.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/profile-row.js +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.d.ts +2 -1
- package/dist/components/features/sidebar/sidebar-rail-body.js +143 -142
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/components/features/sidebar/sidebar.cjs +1 -1
- package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar.js +28 -27
- package/dist/components/features/sidebar/sidebar.js.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.js +33 -29
- package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
- package/dist/components/shared/buttons/remove-button.cjs +1 -1
- package/dist/components/shared/buttons/remove-button.cjs.map +1 -1
- package/dist/components/shared/buttons/remove-button.d.ts +2 -1
- package/dist/components/shared/buttons/remove-button.js +2 -1
- package/dist/components/shared/buttons/remove-button.js.map +1 -1
- package/dist/components/shared/free-models-note.cjs +2 -0
- package/dist/components/shared/free-models-note.cjs.map +1 -0
- package/dist/components/shared/free-models-note.d.ts +3 -0
- package/dist/components/shared/free-models-note.js +20 -0
- package/dist/components/shared/free-models-note.js.map +1 -0
- package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
- package/dist/components/shared/modals/settings/model-selector.cjs.map +1 -1
- package/dist/components/shared/modals/settings/model-selector.js +102 -112
- package/dist/components/shared/modals/settings/model-selector.js.map +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/constants/acp-providers.cjs +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +7 -0
- package/dist/constants/acp-providers.js +20 -16
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/constants/profile-scope.d.ts +21 -0
- package/dist/hooks/chat/use-slash-command.cjs +1 -1
- package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
- package/dist/hooks/chat/use-slash-command.js +63 -62
- package/dist/hooks/chat/use-slash-command.js.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.js +3 -1
- package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
- package/dist/hooks/query/use-free-models.cjs +2 -0
- package/dist/hooks/query/use-free-models.cjs.map +1 -0
- package/dist/hooks/query/use-free-models.d.ts +23 -0
- package/dist/hooks/query/use-free-models.js +67 -0
- package/dist/hooks/query/use-free-models.js.map +1 -0
- package/dist/hooks/query/use-local-git-info.cjs.map +1 -1
- package/dist/hooks/query/use-local-git-info.js.map +1 -1
- package/dist/hooks/query/use-provider-models.cjs +1 -1
- package/dist/hooks/query/use-provider-models.cjs.map +1 -1
- package/dist/hooks/query/use-provider-models.js +34 -25
- package/dist/hooks/query/use-provider-models.js.map +1 -1
- package/dist/hooks/query/use-search-providers.cjs +1 -1
- package/dist/hooks/query/use-search-providers.cjs.map +1 -1
- package/dist/hooks/query/use-search-providers.js +31 -19
- package/dist/hooks/query/use-search-providers.js.map +1 -1
- package/dist/hooks/use-drag-resize.cjs +1 -1
- package/dist/hooks/use-drag-resize.cjs.map +1 -1
- package/dist/hooks/use-drag-resize.js +8 -9
- package/dist/hooks/use-drag-resize.js.map +1 -1
- package/dist/hooks/use-home-automation-actions.cjs +1 -1
- package/dist/hooks/use-home-automation-actions.cjs.map +1 -1
- package/dist/hooks/use-home-automation-actions.d.ts +1 -2
- package/dist/hooks/use-home-automation-actions.js +0 -1
- package/dist/hooks/use-home-automation-actions.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 +16 -2
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +3 -3
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +255 -17
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +16 -2
- package/dist/locales/ca/openhands.json +16 -2
- package/dist/locales/de/openhands.json +16 -2
- package/dist/locales/en/openhands.json +16 -2
- package/dist/locales/es/openhands.json +16 -2
- package/dist/locales/fr/openhands.json +16 -2
- package/dist/locales/it/openhands.json +16 -2
- package/dist/locales/ja/openhands.json +16 -2
- package/dist/locales/ko-KR/openhands.json +16 -2
- package/dist/locales/no/openhands.json +16 -2
- package/dist/locales/pt/openhands.json +16 -2
- package/dist/locales/tr/openhands.json +16 -2
- package/dist/locales/uk/openhands.json +16 -2
- package/dist/locales/zh-CN/openhands.json +16 -2
- package/dist/locales/zh-TW/openhands.json +16 -2
- package/dist/manifests/manifest-validation.cjs +1 -1
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js +2 -2
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js +15 -8
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js +11 -13
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js +6 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +3 -6
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.js +9 -12
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.js +41 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.js +3 -6
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/clients.js +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +199 -61
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.js +9 -8
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +5 -0
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +52 -47
- package/dist/routes/app-settings.js.map +1 -1
- package/dist/routes/llm-settings.cjs +1 -1
- package/dist/routes/llm-settings.cjs.map +1 -1
- package/dist/routes/llm-settings.js +137 -145
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/stores/free-models-store.cjs +2 -0
- package/dist/stores/free-models-store.cjs.map +1 -0
- package/dist/stores/free-models-store.d.ts +30 -0
- package/dist/stores/free-models-store.js +22 -0
- package/dist/stores/free-models-store.js.map +1 -0
- package/dist/types/automation.cjs.map +1 -1
- package/dist/types/automation.d.ts +23 -1
- package/dist/types/automation.js.map +1 -1
- package/dist/utils/automation-disabled-reason.cjs +2 -0
- package/dist/utils/automation-disabled-reason.cjs.map +1 -0
- package/dist/utils/automation-disabled-reason.d.ts +32 -0
- package/dist/utils/automation-disabled-reason.js +19 -0
- package/dist/utils/automation-disabled-reason.js.map +1 -0
- package/dist/utils/format-model-name.cjs +1 -1
- package/dist/utils/format-model-name.cjs.map +1 -1
- package/dist/utils/format-model-name.d.ts +27 -6
- package/dist/utils/format-model-name.js +14 -6
- package/dist/utils/format-model-name.js.map +1 -1
- package/dist/utils/parse-git-remote-url.cjs +1 -1
- package/dist/utils/parse-git-remote-url.cjs.map +1 -1
- package/dist/utils/parse-git-remote-url.d.ts +5 -1
- package/dist/utils/parse-git-remote-url.js +20 -13
- package/dist/utils/parse-git-remote-url.js.map +1 -1
- package/package.json +2 -2
- package/scripts/check-sdk-version-sync.mjs +79 -8
- package/scripts/dev-safe.mjs +1 -1
- package/scripts/static-server.mjs +24 -7
- package/build/assets/acp-providers-DrjNsPOH.js +0 -1
- package/build/assets/active-backend-context-rZiLJRUc.js +0 -2
- package/build/assets/agent-profiles-settings-x6RvPsq7.js +0 -1
- package/build/assets/agent-server-client-options-BikiNwTa.js +0 -1
- package/build/assets/agent-server-conversation-service.api-DYFsNHKf.js +0 -88
- package/build/assets/agent-settings-BJyovpJ_.js +0 -1
- package/build/assets/agent-settings-CpY3zObk.js +0 -2
- package/build/assets/alert-banner-vARz1idS.js +0 -1
- package/build/assets/api-key-entry-screen-CsMuBhoP.js +0 -1
- package/build/assets/app-settings-BaJ7nfHt.js +0 -1
- package/build/assets/automation-detail-CVoGDrKq.js +0 -3
- package/build/assets/automation-git-sync-CRMP9Bbm.js +0 -1
- package/build/assets/automation-setup-route-072beLz1.js +0 -3
- package/build/assets/automations-list-xuqTSQL4.js +0 -1
- package/build/assets/backend-form-modal-0aJmWdsa.js +0 -1
- package/build/assets/backend-synced-settings-badge-B7rKWBir.js +0 -1
- package/build/assets/badge-CcGx2TaV.js +0 -1
- package/build/assets/browser-C-_qBasq.js +0 -46
- package/build/assets/browser-tab-DZanIw5m.js +0 -1
- package/build/assets/canvas-extension-page-o_cWgE9B.js +0 -1
- package/build/assets/canvas-extensions-DSgNlCha.js +0 -1
- package/build/assets/check-fDEfgSzj.js +0 -1
- package/build/assets/chevron-down-CFrWHqu8.js +0 -1
- package/build/assets/chevron-right-C5roOrJu.js +0 -1
- package/build/assets/circle-check-ClTzJTdb.js +0 -1
- package/build/assets/circle-plus-check-toggle-Fr-h-mbL.js +0 -1
- package/build/assets/command-menu-BT3Ia5Ru.js +0 -1
- package/build/assets/commits-tab-2jhtaohl.js +0 -1
- package/build/assets/confirmation-modal-gIFHeZt6.js +0 -1
- package/build/assets/conversation-DZ578rOX.js +0 -1
- package/build/assets/conversation-panel-DZ578rOX.js +0 -1
- package/build/assets/conversation-state-store-D1_G_9I-.js +0 -1
- package/build/assets/conversation-store-DVVfkCsk.js +0 -6
- package/build/assets/copy-to-clipboard-button-B3w0X7WH.js +0 -1
- package/build/assets/device-verify-BfkCzyFB.js +0 -1
- package/build/assets/edit-automation-modal-BwhJ39JT.js +0 -1
- package/build/assets/empty-state-RZz0OfnY.js +0 -1
- package/build/assets/enum-filter-dropdown-C4pW0ORd.js +0 -1
- package/build/assets/environment-switch-overlay-P2ZAuzov.js +0 -1
- package/build/assets/error-state-B_5cgNPJ.js +0 -1
- package/build/assets/extensions-hub-DsaUr4ca.js +0 -1
- package/build/assets/extensions-navigation-CRMZd-FE.js +0 -1
- package/build/assets/files-tab-CCgAcVdc.js +0 -1
- package/build/assets/format-model-name-CasAP3nd.js +0 -1
- package/build/assets/get-git-path-EHrSDxTM.js +0 -1
- package/build/assets/git-repo-dropdown-D2WEQ97X.js +0 -1
- package/build/assets/git-repo-dropdown-DVeCUUXG.js +0 -1
- package/build/assets/highlighted-source-view-DjHO3SdW.js +0 -1
- package/build/assets/home-BorS_vdS.js +0 -1
- package/build/assets/home-aIMbHw5M.js +0 -1
- package/build/assets/home-automation-run-tooltip-CpHNFiFl.js +0 -1
- package/build/assets/home-store-DyXz0w6d.js +0 -1
- package/build/assets/hooks-service-C6dpRtZM.js +0 -1
- package/build/assets/index-home-zKFuKK2B.js +0 -1
- package/build/assets/info-CTIdjttz.js +0 -1
- package/build/assets/install-server-modal-DUiZMc8u.js +0 -1
- package/build/assets/kebab-menu-item-content-mm04SBD3.js +0 -1
- package/build/assets/launch-BSIf9KEg.js +0 -1
- package/build/assets/link-external-BNZzCM1I.js +0 -1
- package/build/assets/list-filter-CNpqTWVY.js +0 -1
- package/build/assets/llm-not-configured-banner-z_QRSeV0.js +0 -27
- package/build/assets/llm-settings-B-5AHMiX.js +0 -1
- package/build/assets/llm-settings-B3SjHDmA.js +0 -1
- package/build/assets/loader-circle-Dex47vVW.js +0 -1
- package/build/assets/manage-backends-modal-q1NdFisr.js +0 -1
- package/build/assets/manifest-8920b615.js +0 -1
- package/build/assets/manifest-subpage-layout-BQQy5ipR.js +0 -1
- package/build/assets/markdown-renderer-rivLvYh-.js +0 -8
- package/build/assets/mcp-CEXDhQWn.js +0 -1
- package/build/assets/mcp-marketplace-utils-Cn_NIMWM.js +0 -1
- package/build/assets/mcp-page-LGYIICMG.js +0 -9
- package/build/assets/messages-DUSeANAh.js +0 -41
- package/build/assets/modal-close-button-B9j4nasm.js +0 -1
- package/build/assets/onboarding-BjFebfs5.js +0 -1
- package/build/assets/onboarding-modal-DDTjOpyd.js +0 -1
- package/build/assets/parse-git-remote-url-DpDM9bK6.js +0 -1
- package/build/assets/planner-tab-D8f2Y3rn.js +0 -1
- package/build/assets/plus-B3wvU06-.js +0 -1
- package/build/assets/providers-2gIIkz2N.js +0 -1
- package/build/assets/proxy-CBgMd2zf.js +0 -1
- package/build/assets/recommended-automations-launcher-YLAQTp4s.js +0 -1
- package/build/assets/root-Bye_XmEL.js +0 -2
- package/build/assets/root-Cnwwzgo0.css +0 -1
- package/build/assets/root-layout-CSAwxBGM.js +0 -2
- package/build/assets/schema-field-CK0xYNbO.js +0 -1
- package/build/assets/sdk-section-page-Da73Rs_o.js +0 -1
- package/build/assets/secret-form-CB2VwYYg.js +0 -1
- package/build/assets/secrets-settings-Bh0udeKv.js +0 -1
- package/build/assets/settings-DmyIgRxO.js +0 -1
- package/build/assets/settings-dropdown-input-DVpyD87C.js +0 -1
- package/build/assets/settings-index-BSJUFmjE.js +0 -1
- package/build/assets/settings-input-C0dd8Utu.js +0 -1
- package/build/assets/settings-modal-yStgEh2o.js +0 -1
- package/build/assets/settings-switch-B78Khmyz.js +0 -1
- package/build/assets/shared-conversation-DM96X4KV.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-D5GR5xT9.js +0 -1
- package/build/assets/sidebar-store-CSDFK0W5.js +0 -1
- package/build/assets/skill-card-pill-row-989y15jV.js +0 -1
- package/build/assets/skill-scope-Dz3kPH3P.js +0 -1
- package/build/assets/skills-plugins-e3CYGdUJ.js +0 -1
- package/build/assets/skills-settings-3e-FuHw_.js +0 -1
- package/build/assets/task-list-tab-3Jg8ywch.js +0 -1
- package/build/assets/trash-B6OIe4yX.js +0 -1
- package/build/assets/usage-tab-Cm-9j3UK.js +0 -1
- package/build/assets/use-acp-credential-form-BARcvjYE.js +0 -1
- package/build/assets/use-agent-profiles-1P91KSXz.js +0 -1
- package/build/assets/use-create-secret-D8p9ybQj.js +0 -1
- package/build/assets/use-is-authed-BRPjCRKM.js +0 -1
- package/build/assets/use-llm-configured-DGm8FiRR.js +0 -1
- package/build/assets/use-llm-profiles-BTTtpW4z.js +0 -1
- package/build/assets/use-save-agent-profile-CxyO9YG-.js +0 -1
- package/build/assets/use-settings-nav-items-vrjxTqcu.js +0 -16
- package/build/assets/use-tracking-B9prBsrq.js +0 -3
- package/build/assets/useQueries-CykmpT-a.js +0 -1
- package/build/assets/useQuery-S6j94er1.js +0 -1
- package/build/assets/utils-BOco8mxR.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js +0 -2
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js +0 -185
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-DnDoaYNi.js +0 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-DkPlXWl9.js +0 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js +0 -48
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{r as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-DnDoaYNi.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{t as o}from"./useMutation-CJuK90oc.js";import{ct as s,dt as c,j as l,n as u,st as d}from"./active-backend-context-rZiLJRUc.js";import{K as f,t as p}from"./utils-BOco8mxR.js";import{p as m}from"./agent-server-client-options-BikiNwTa.js";import{n as h}from"./extensions-navigation-CRMZd-FE.js";import{t as g}from"./external-link-DQtv7eTh.js";import{t as _}from"./modal-backdrop-BSzNhM4r.js";import{n as v}from"./modal-classes-Dg0ngBPO.js";import{t as y}from"./brand-button-DxPO4Lf8.js";import{t as b}from"./modal-close-button-B9j4nasm.js";import{t as x}from"./settings-input-C0dd8Utu.js";import{t as S}from"./confirmation-modal-gIFHeZt6.js";import{t as C}from"./toggle-switch-lwQtxDcm.js";import{i as w,n as T,r as E,t as D}from"./use-canvas-extensions-CFUpHat6.js";import{a as O,i as k,n as A,o as j,t as M}from"./extension-module-card-classes-DpeaYhYo.js";import{n as N,t as P}from"./api-error-message-Ve79qDcN.js";import{n as F}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";var I=e(t(),1);function L(){let e=i();return()=>e.invalidateQueries({queryKey:l.all})}function R(){let e=L(),{t}=a(`openhands`);return o({meta:{disableToast:!0},mutationFn:e=>T.install(e),onSuccess:()=>{e(),s(t(f.SETTINGS$APPS_INSTALL_SUCCESS))},onError:e=>{d(P(e)?N(e,t(f.ERROR$GENERIC)):c(e)||t(f.ERROR$GENERIC))}})}function z(){let e=L();return o({mutationFn:({name:e,enabled:t})=>T.setEnabled(e,t),onSuccess:()=>void e()})}function B(){let e=L(),{t}=a(`openhands`);return o({mutationFn:e=>T.uninstall(e),onSuccess:()=>{e(),s(t(f.SETTINGS$APPS_UNINSTALL_SUCCESS))}})}var V=n();function H({onClose:e}){let{t}=a(`openhands`),n=R(),[r,i]=I.useState(``),[o,s]=I.useState(``),[c,l]=I.useState(``),u=r.trim(),d=u.length>0&&!n.isPending;return(0,V.jsx)(_,{onClose:e,"aria-label":t(f.SETTINGS$APPS_ADD_BUTTON),children:(0,V.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),d&&n.mutate({source:u,ref:o.trim()||null,repo_path:c.trim()||null},{onSuccess:e})},"data-testid":`add-canvas-extension-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,V.jsx)(b,{onClose:e,testId:`add-canvas-extension-modal-close`}),(0,V.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,V.jsx)(`h2`,{className:p(`pr-6`,v),children:t(f.SETTINGS$APPS_ADD_BUTTON)}),(0,V.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(f.SETTINGS$APPS_ADD_MODAL_INTRO)})]}),(0,V.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,V.jsx)(x,{testId:`add-canvas-extension-source-input`,label:t(f.SETTINGS$APPS_SOURCE_LABEL),type:`text`,value:r,onChange:i,placeholder:t(f.SETTINGS$PLUGINS_SOURCE_PLACEHOLDER),showRequiredTag:!0}),(0,V.jsx)(x,{testId:`add-canvas-extension-ref-input`,label:t(f.SETTINGS$PLUGINS_REF_LABEL),type:`text`,value:o,onChange:s,showOptionalTag:!0}),(0,V.jsx)(x,{testId:`add-canvas-extension-repo-path-input`,label:t(f.SETTINGS$PLUGINS_REPO_PATH_LABEL),type:`text`,value:c,onChange:l,showOptionalTag:!0})]}),(0,V.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,V.jsx)(y,{type:`button`,variant:`secondary`,onClick:e,testId:`add-canvas-extension-dismiss`,children:t(f.BUTTON$CLOSE)}),(0,V.jsx)(y,{type:`submit`,variant:`primary`,testId:`add-canvas-extension-submit`,isDisabled:!d,children:t(n.isPending?f.SETTINGS$PLUGINS_INSTALLING:f.SETTINGS$PLUGINS_INSTALL)})]})]})})}function U({extension:e,isBusy:t,onToggle:n,onUninstall:r}){let{t:i}=a(`openhands`),o=e.manifest?.contributes?.pages??[],s=e.manifest?.display_name||e.name;return(0,V.jsxs)(`article`,{"data-testid":`canvas-extension-card-${e.name}`,className:`flex min-w-0 flex-col gap-4 p-4 ${O}`,children:[(0,V.jsxs)(`header`,{className:`flex items-start justify-between gap-4`,children:[(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`h3`,{className:`truncate text-sm font-semibold text-white`,children:s}),(0,V.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-tertiary-alt`,children:e.source})]}),(0,V.jsx)(C,{enabled:e.enabled,label:i(e.enabled?f.COMMON$DISABLE:f.COMMON$ENABLE),onToggle:n,className:t?`pointer-events-none opacity-50`:void 0})]}),e.description||e.manifest?.description?(0,V.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:e.description||e.manifest?.description}):null,(0,V.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,V.jsx)(`span`,{className:k,children:e.enabled?i(f.SETTINGS$SKILLS_ENABLED):i(f.SETTINGS$SKILLS_DISABLED)}),(0,V.jsx)(`span`,{className:k,children:i(f.SETTINGS$SKILLS_VERSION,{version:e.version})}),o.length?(0,V.jsxs)(`span`,{className:k,children:[i(f.SETTINGS$APPS_PAGES),`: `,o.length]}):null]}),(0,V.jsxs)(`dl`,{className:`grid min-w-0 grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs`,children:[e.resolved_ref?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`dt`,{className:`text-tertiary-alt`,children:i(f.SETTINGS$PLUGINS_REF_LABEL)}),(0,V.jsx)(`dd`,{className:`min-w-0 truncate font-mono text-tertiary-light`,children:e.resolved_ref})]}):null,e.repo_path?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`dt`,{className:`text-tertiary-alt`,children:i(f.SETTINGS$PLUGINS_REPO_PATH_LABEL)}),(0,V.jsx)(`dd`,{className:`min-w-0 truncate text-tertiary-light`,children:e.repo_path})]}):null]}),o.length?(0,V.jsx)(`section`,{className:`flex min-w-0 flex-col gap-2`,children:(0,V.jsx)(`ul`,{className:`flex flex-wrap gap-2`,children:o.map(e=>(0,V.jsx)(`li`,{className:k,children:e.title},e.id))})}):null,(0,V.jsx)(`footer`,{className:`flex justify-end gap-2 border-t border-[var(--oh-border)] pt-3`,children:(0,V.jsx)(y,{type:`button`,variant:`ghost-danger`,testId:`canvas-extension-uninstall-${e.name}`,isDisabled:t,onClick:r,children:i(f.SETTINGS$PLUGINS_UNINSTALL)})})]})}var W=`https://docs.openhands.dev/openhands/usage/agent-canvas/canvas-extensions`,G=r(function(){let{t:e}=a(`openhands`),{backend:t}=u(),[n,r]=I.useState(!1),[i,o]=I.useState(null),s=D(),c=z(),l=B(),d=!m(t)&&t.kind===`local`,_=!d||w(s.error),v=c.isPending||l.isPending,b=()=>{i&&(i.type===`enable`?c.mutate({name:i.extension.name,enabled:!0},{onSuccess:()=>o(null)}):l.mutate(i.extension.name,{onSuccess:()=>o(null)}))},x=i?i.extension.manifest?.display_name||i.extension.name:``,C=i?.type===`enable`?e(f.SETTINGS$APPS_ENABLE_CONFIRM):i?.type===`uninstall`?e(f.SETTINGS$APPS_UNINSTALL_CONFIRM,{name:x}):``;return(0,V.jsxs)(`div`,{"data-testid":`canvas-extensions-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,V.jsx)(h,{}),(0,V.jsx)(`main`,{className:p(F,`h-full`),children:(0,V.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,V.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,V.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(f.SETTINGS$APPS_PAGE_TITLE)}),(0,V.jsx)(`p`,{className:`max-w-2xl text-sm text-tertiary-light`,children:e(f.SETTINGS$APPS_PAGE_DESCRIPTION)}),(0,V.jsxs)(`a`,{href:W,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-sm text-primary hover:underline`,children:[e(f.SETTINGS$APPS_BUILD_LINK),(0,V.jsx)(g,{className:`size-3.5`,"aria-hidden":!0})]})]}),(0,V.jsx)(y,{type:`button`,variant:`secondary`,testId:`canvas-extensions-add-button`,isDisabled:!d||_||s.isLoading,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>r(!0),children:e(f.SETTINGS$APPS_ADD_BUTTON)})]}),(0,V.jsx)(`div`,{className:`rounded-xl border border-amber-400/30 bg-amber-400/5 px-4 py-3 text-sm text-amber-100`,children:e(f.SETTINGS$APPS_TRUST_NOTICE)}),(0,V.jsx)(`h3`,{className:`text-base font-semibold text-foreground`,children:e(f.SETTINGS$APPS_INSTALLED)}),_?(0,V.jsxs)(`div`,{className:j,children:[(0,V.jsx)(`h3`,{className:`text-sm font-semibold text-white`,children:e(f.SETUP$UNAVAILABLE_TITLE)}),(0,V.jsx)(`p`,{className:`mt-2 text-sm text-tertiary-light`,children:w(s.error)?s.error.message:t.kind===`cloud`?new E(`cloud-backend`).message:new E(`no-backend`).message})]}):s.isLoading?(0,V.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2].map(e=>(0,V.jsx)(`div`,{className:`h-40 animate-pulse rounded-xl bg-base-secondary`},e))}):s.isError?(0,V.jsxs)(`div`,{className:j,children:[(0,V.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:s.error instanceof Error?s.error.message:e(f.ERROR$GENERIC)}),(0,V.jsx)(y,{type:`button`,variant:`secondary`,className:`mt-4`,onClick:()=>void s.refetch(),children:e(f.AUTOMATIONS$ERROR_RETRY)})]}):s.data?.length?(0,V.jsx)(`div`,{className:A,children:(0,V.jsx)(`div`,{className:M,children:s.data.map(e=>(0,V.jsx)(U,{extension:e,isBusy:v,onToggle:()=>{e.enabled?c.mutate({name:e.name,enabled:!1}):o({type:`enable`,extension:e})},onUninstall:()=>o({type:`uninstall`,extension:e})},e.name))})}):(0,V.jsx)(`div`,{className:j,children:(0,V.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(f.SETTINGS$APPS_EMPTY)})})]})}),n?(0,V.jsx)(H,{onClose:()=>r(!1)}):null,i?(0,V.jsx)(S,{text:C,onCancel:()=>o(null),onConfirm:b,confirmText:i.type===`enable`?e(f.SETTINGS$APPS_ENABLE_ACTION):void 0,isConfirming:v}):null]})});export{G as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";var t=e(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]);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-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{K as i,t as a}from"./utils-BOco8mxR.js";import{t as o}from"./styled-tooltip-Pd22BIvr.js";import{t as s}from"./checkmark-XZyokq_Y.js";import{t as c}from"./x-mark-BopmFoBq.js";var l=e(t()),u=n(),d=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 25 25`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M10.8696 23.3696V1.63043C10.8696 0.729971 11.5995 0 12.5 0C13.4005 0 14.1304 0.729971 14.1304 1.63043V23.3696C14.1304 24.27 13.4005 25 12.5 25C11.5995 25 10.8696 24.27 10.8696 23.3696Z`,fill:`currentColor`}),(0,u.jsx)(`path`,{d:`M1.63043 10.8641L23.3696 10.8641C24.27 10.8641 25 11.5941 25 12.4946C25 13.395 24.27 14.125 23.3696 14.125L1.63043 14.125C0.729971 14.125 -3.93605e-08 13.395 0 12.4946C3.93605e-08 11.5941 0.729971 10.8641 1.63043 10.8641Z`,fill:`currentColor`})]});function f({className:e,testId:t,tooltipKey:n=i.AUTOMATIONS$ADD_AUTOMATION}){let{t:s}=r(`openhands`);return(0,u.jsx)(o,{content:s(n),placement:`top`,children:(0,u.jsx)(`span`,{"aria-hidden":`true`,"data-testid":t,className:a(`inline-flex size-7 shrink-0 items-center justify-center rounded-full bg-surface-raised text-white transition-colors hover:bg-[var(--oh-interactive-hover)]`,e),children:(0,u.jsx)(d,{className:`size-3`})})})}function p({testId:e,isSelected:t,onToggle:n,isDisabled:f=!1,className:p,enableLabelKey:m=i.SETTINGS$SKILLS_ENABLE_SKILL,disableLabelKey:h=i.SETTINGS$SKILLS_DISABLE_SKILL,enableTooltipKey:g=i.COMMON$ENABLE,disableTooltipKey:_,removeTooltipKey:v=i.COMMON$REMOVE}){let{t:y}=r(`openhands`),[b,x]=l.useState(!1),S=e=>{e.stopPropagation(),!f&&(n(!t),e.currentTarget.blur())},C=t&&b,w=y(t?_??v:g),T=y(t?h:m);return(0,u.jsx)(o,{content:w,placement:`top`,children:(0,u.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":t,"data-testid":e,"data-showing-remove":C?`true`:`false`,disabled:f,"aria-label":T,onClick:S,onPointerEnter:()=>x(!0),onPointerLeave:()=>x(!1),className:a(`inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full p-0 transition-colors`,t&&(C?`border-0 bg-[rgba(248,113,113,0.14)] text-[#ef4444] hover:bg-[rgba(248,113,113,0.24)]`:`border border-white bg-transparent text-white [&_path]:fill-current`),!t&&`border-0 bg-surface-raised text-white hover:bg-[var(--oh-interactive-hover)]`,f&&`cursor-not-allowed opacity-50`,p),children:t?C?(0,u.jsx)(c,{"aria-hidden":!0,width:14,height:14,className:`stroke-[2.5]`}):(0,u.jsx)(s,{"aria-hidden":!0,width:14,height:14}):(0,u.jsx)(d,{"aria-hidden":!0,className:`size-3`})})})}export{p as n,f as t};
|
|
@@ -1 +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-Ck5D_A2Q.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{i as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";import{K as o,t as s}from"./utils-BOco8mxR.js";import{a as c}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BPjI-atc.js";import{t as l}from"./bot-CLMxGFaq.js";import{t as u}from"./wrench-CkgI4rxA.js";import{a as d,i as f,n as p,r as m,t as h}from"./sidebar-store-CSDFK0W5.js";import{o as g}from"./use-acp-credential-form-BARcvjYE.js";import{t as _}from"./list-todo-ByXMdY4W.js";import{n as v,t as y}from"./x-By6qCmtY.js";import{t as b}from"./shield-check-DO7wa_eu.js";import{r as x}from"./context-menu-list-item-DDROe12Z.js";import{A as S,C,P as w}from"./use-tracking-B9prBsrq.js";import{n as T}from"./navigation-context-CQZwH_tC.js";var E=a(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),D=e(n(),1),O=e(t(),1),k=r(),A=18,j={conversations:`/conversations`,customize:`/customize`,automations:C(),mcp:`/mcp`,settings:`/settings`,agentSettings:`/settings/agents`,llmSettings:`/settings/llm`,condenserSettings:`/settings/condenser`,verificationSettings:`/settings/verification`,appSettings:`/settings/app`,secretsSettings:`/settings/secrets`};function M(e,t,n){return e===void 0?t===void 0?``:n(t):e}var N={navigation:o.COMMAND_MENU$GROUP_NAVIGATION,settings:o.COMMAND_MENU$GROUP_SETTINGS,actions:o.COMMAND_MENU$GROUP_ACTIONS},P=[`navigation`,`settings`,`actions`],F=({toggleSidebar:e})=>[{id:`new-chat`,group:`navigation`,titleKey:o.COMMAND_MENU$NEW_CHAT_TITLE,descriptionKey:o.COMMAND_MENU$NEW_CHAT_DESCRIPTION,keywordsKey:o.COMMAND_MENU$NEW_CHAT_KEYWORDS,icon:(0,k.jsx)(d,{size:A}),to:j.conversations},{id:`customize`,group:`navigation`,titleKey:o.COMMAND_MENU$CUSTOMIZE_TITLE,descriptionKey:o.COMMAND_MENU$CUSTOMIZE_DESCRIPTION,keywordsKey:o.COMMAND_MENU$CUSTOMIZE_KEYWORDS,icon:(0,k.jsx)(c,{size:A}),to:j.customize},...w()?[{id:`automations`,group:`navigation`,title:S().commandMenuTitle,description:S().commandMenuDescription,keywords:S().commandMenuKeywords,icon:(0,k.jsx)(x,{size:A}),to:j.automations}]:[],{id:`mcp`,group:`navigation`,titleKey:o.COMMAND_MENU$MCP_TITLE,descriptionKey:o.COMMAND_MENU$MCP_DESCRIPTION,keywordsKey:o.COMMAND_MENU$MCP_KEYWORDS,icon:(0,k.jsx)(u,{size:A}),to:j.mcp},{id:`settings`,group:`settings`,titleKey:o.COMMAND_MENU$SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$SETTINGS_KEYWORDS,icon:(0,k.jsx)(m,{size:A}),to:j.settings},{id:`agent-settings`,group:`settings`,titleKey:o.COMMAND_MENU$AGENT_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$AGENT_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$AGENT_SETTINGS_KEYWORDS,icon:(0,k.jsx)(l,{size:A}),to:j.agentSettings},{id:`llm-settings`,group:`settings`,titleKey:o.COMMAND_MENU$LLM_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$LLM_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$LLM_SETTINGS_KEYWORDS,icon:(0,k.jsx)(v,{size:A}),to:j.llmSettings},{id:`condenser-settings`,group:`settings`,titleKey:o.COMMAND_MENU$CONDENSER_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$CONDENSER_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$CONDENSER_SETTINGS_KEYWORDS,icon:(0,k.jsx)(_,{size:A}),to:j.condenserSettings},{id:`verification-settings`,group:`settings`,titleKey:o.COMMAND_MENU$VERIFICATION_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$VERIFICATION_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$VERIFICATION_SETTINGS_KEYWORDS,icon:(0,k.jsx)(b,{size:A}),to:j.verificationSettings},{id:`app-settings`,group:`settings`,titleKey:o.COMMAND_MENU$APP_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$APP_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$APP_SETTINGS_KEYWORDS,icon:(0,k.jsx)(f,{size:A}),to:j.appSettings},{id:`secrets-settings`,group:`settings`,titleKey:o.COMMAND_MENU$SECRETS_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$SECRETS_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$SECRETS_SETTINGS_KEYWORDS,icon:(0,k.jsx)(g,{size:A}),to:j.secretsSettings},{id:`toggle-sidebar`,group:`actions`,titleKey:o.COMMAND_MENU$TOGGLE_SIDEBAR_TITLE,descriptionKey:o.COMMAND_MENU$TOGGLE_SIDEBAR_DESCRIPTION,keywordsKey:o.COMMAND_MENU$TOGGLE_SIDEBAR_KEYWORDS,icon:(0,k.jsx)(E,{size:A}),perform:e}],I=`command-menu-search`,L=`command-menu-results`,R=`command-menu-option`,z=`command-menu`,B=`k`,V=`ArrowDown`,H=`ArrowUp`,U=`Enter`,W=`Escape`,G=``,K=-1;function q(e){return`${R}-${e.id}`}function J({item:e,query:t,translate:n}){let r=t.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return!0;let i=[M(e.title,e.titleKey,n),M(e.description,e.descriptionKey,n),M(e.keywords,e.keywordsKey,n)].join(` `).toLocaleLowerCase();return r.every(e=>i.includes(e))}function Y(){let{t:e}=i(`openhands`),{navigate:t}=T(),n=p(e=>e.isOpen),r=p(e=>e.open),a=p(e=>e.close),[c,l]=O.useState(G),[u,d]=O.useState(0),f=O.useRef(null),m=O.useRef(new Map);O.useEffect(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLocaleLowerCase()===B&&(e.preventDefault(),r())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r]),O.useEffect(()=>{if(!n){l(G),d(0),m.current.clear();return}let e=requestAnimationFrame(()=>f.current?.focus());return()=>cancelAnimationFrame(e)},[n]);let g=O.useMemo(()=>F({toggleSidebar:()=>h.getState().toggleCollapsed()}),[]),_=O.useMemo(()=>g.filter(t=>J({item:t,query:c,translate:t=>e(t)})),[g,c,e]);O.useEffect(()=>{d(e=>_.length===0?K:Math.min(Math.max(e,0),_.length-1))},[_.length]),O.useEffect(()=>{let e=_[u];if(!e)return;let t=m.current.get(e.id);typeof t?.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`})},[u,_]);let b=O.useCallback(e=>{if(e){if(a(),e.to){t(e.to);return}e.perform?.()}},[a,t]),x=e=>{if(e.key===V){e.preventDefault(),d(e=>_.length===0?e:(e+1)%_.length);return}if(e.key===H){e.preventDefault(),d(e=>_.length===0?e:(e-1+_.length)%_.length);return}if(e.key===U){e.preventDefault(),b(_[u]);return}e.key===W&&(e.preventDefault(),a())};if(!n||typeof document>`u`)return null;let S=_[u];return(0,D.createPortal)((0,k.jsxs)(`div`,{className:`fixed inset-0 z-[70] flex items-start justify-center px-3 pt-[10vh] sm:px-6`,"data-testid":z,role:`dialog`,"aria-modal":`true`,"aria-label":e(o.COMMAND_MENU$ARIA_LABEL),children:[(0,k.jsx)(`button`,{type:`button`,className:`absolute inset-0 cursor-default bg-black/65 backdrop-blur-[2px]`,"aria-label":e(o.COMMAND_MENU$CLOSE_LABEL),onClick:a}),(0,k.jsxs)(`div`,{className:s(`relative flex max-h-[min(720px,78vh)] w-full max-w-2xl flex-col overflow-hidden rounded-2xl`,`border border-[var(--oh-border)] bg-[var(--oh-surface)]`,`shadow-[0_24px_90px_rgba(0,0,0,0.52),0_0_0_1px_rgba(255,255,255,0.03)_inset]`),children:[(0,k.jsxs)(`div`,{className:`relative flex items-center gap-3 border-b border-[var(--oh-border)] px-4 py-3`,children:[(0,k.jsx)(v,{className:`size-5 shrink-0 text-[var(--oh-text-dim)]`}),(0,k.jsx)(`input`,{ref:f,id:I,className:`h-11 min-w-0 flex-1 bg-transparent text-base text-white outline-none placeholder:text-[var(--oh-text-dim)]`,placeholder:e(o.COMMAND_MENU$PLACEHOLDER),"aria-label":e(o.COMMAND_MENU$SEARCH_LABEL),role:`combobox`,"aria-expanded":`true`,"aria-controls":L,"aria-activedescendant":S?q(S):void 0,value:c,onChange:e=>l(e.target.value),onKeyDown:x}),c?(0,k.jsx)(`button`,{type:`button`,className:`inline-flex size-8 items-center justify-center rounded-lg text-[var(--oh-muted)] hover:bg-[var(--oh-surface-raised)] hover:text-white`,"aria-label":e(o.COMMAND_MENU$CLEAR_SEARCH_LABEL),onClick:()=>{l(G),f.current?.focus()},children:(0,k.jsx)(y,{className:`size-4`})}):null,(0,k.jsx)(`kbd`,{className:`hidden rounded-md border border-[var(--oh-border)] bg-black/25 px-2 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--oh-text-dim)] sm:inline-flex`,children:e(o.COMMAND_MENU$SHORTCUT)})]}),(0,k.jsx)(`div`,{id:L,role:`listbox`,className:`relative min-h-0 flex-1 overflow-y-auto px-2 py-2 custom-scrollbar`,children:_.length===0?(0,k.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 px-6 py-16 text-center`,children:[(0,k.jsx)(`div`,{className:`flex size-11 items-center justify-center rounded-2xl border border-dashed border-[var(--oh-border)] text-[var(--oh-text-dim)]`,children:(0,k.jsx)(v,{className:`size-5`})}),(0,k.jsx)(`p`,{className:`text-sm font-medium text-white`,children:e(o.COMMAND_MENU$NO_RESULTS_TITLE)}),(0,k.jsx)(`p`,{className:`max-w-sm text-xs leading-5 text-[var(--oh-muted)]`,children:e(o.COMMAND_MENU$NO_RESULTS_DESCRIPTION)})]}):P.map(t=>{let n=_.filter(e=>e.group===t);return n.length===0?null:(0,k.jsxs)(`section`,{className:`py-1`,children:[(0,k.jsx)(`div`,{className:`px-3 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--oh-text-dim)]`,children:e(N[t])}),(0,k.jsx)(`div`,{className:`space-y-1`,children:n.map(t=>{let n=_.indexOf(t),r=n===u,i=t.to,a=e=>{e?m.current.set(t.id,e):m.current.delete(t.id)},c=s(`group flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left transition-colors duration-150`,r?`bg-white/[0.09] text-white shadow-[0_0_0_1px_rgba(255,255,255,0.08)_inset]`:`text-[var(--oh-muted)] hover:bg-white/[0.05] hover:text-white`),l=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{className:s(`flex size-9 shrink-0 items-center justify-center rounded-lg border transition-colors duration-150`,r?`border-[var(--oh-accent)] bg-[var(--oh-accent)]/15 text-white`:`border-[var(--oh-border)] bg-black/15 text-[var(--oh-text-dim)] group-hover:text-white`),"aria-hidden":`true`,children:t.icon}),(0,k.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,k.jsx)(`span`,{className:`block truncate text-sm font-medium text-current`,children:M(t.title,t.titleKey,e)}),(0,k.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-[var(--oh-text-dim)]`,children:M(t.description,t.descriptionKey,e)})]}),(0,k.jsx)(`span`,{className:`hidden shrink-0 rounded-md border border-[var(--oh-border)] px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.14em] text-[var(--oh-text-dim)] sm:inline-flex`,children:e(i?o.COMMAND_MENU$GO_HINT:o.COMMAND_MENU$RUN_HINT)})]});return i?(0,k.jsx)(`a`,{ref:a,id:q(t),href:i,role:`option`,"aria-selected":r,onMouseEnter:()=>d(n),onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),b(t))},className:c,children:l},t.id):(0,k.jsx)(`button`,{ref:a,id:q(t),type:`button`,role:`option`,"aria-selected":r,onMouseEnter:()=>d(n),onClick:()=>b(t),className:c,children:l},t.id)})})]},t)})}),(0,k.jsx)(`div`,{className:`border-t border-[var(--oh-border)] px-4 py-2.5 text-[11px] text-[var(--oh-text-dim)]`,children:e(o.COMMAND_MENU$FOOTER_HINT)})]})]}),document.body)}export{Y as CommandMenu};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,m as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{t as a}from"./useQuery-S6j94er1.js";import{A as o,K as s,t as c}from"./utils-BOco8mxR.js";import{P as l,i as u}from"./messages-DUSeANAh.js";import{t as d}from"./chevron-down-CFrWHqu8.js";import{t as f}from"./vendor~root-layout~conversation-panel~conversation-3Idg1_U3.js";import{t as p}from"./chevron-right-C5roOrJu.js";import{a as m,i as h,n as g,o as _,r as v,t as y}from"./vendor~conversation-panel~conversation-4eJ0tml3.js";import{t as b}from"./conversation-store-DVVfkCsk.js";import{t as x}from"./format-time-delta-BIR5Os7T.js";import{r as S}from"./typography-HLLg_FAn.js";import{m as C}from"./llm-not-configured-banner-z_QRSeV0.js";import{$ as w,nt as T,t as ee,tt as E}from"./markdown-renderer-rivLvYh-.js";import{a as D,o as O,s as k}from"./conversation-BnjJSFf5.js";import{n as A,t as j}from"./get-git-path-EHrSDxTM.js";import{t as M}from"./conversation-tab-empty-state-DKlzAz5c.js";import{n as te,t as ne}from"./vendor~commits-tab-BaO2Ce3e.js";var N=e(t(),1),P=(e,t)=>{let{conversationId:n}=T(),{data:r}=E(),i=A(),o=r?.conversation_url,s=r?.session_api_key,c=r?.selected_repository,l=r?.workspace?.working_dir?.trim(),u=N.useMemo(()=>j(c,l),[c,l]);return a({queryKey:[`commit_changes`,n,o,s,u,e],queryFn:async()=>{if(!n)throw Error(`No conversation ID`);return k.getCommitChanges(o,s,u,e)},staleTime:1/0,gcTime:1e3*60*15,retry:!1,enabled:t.enabled&&i&&!!n,meta:{disableToast:!0}})},F=r(),I={duration:.2,ease:`easeInOut`};function L({open:e,children:t,testId:r,className:i}){return l()?e?(0,F.jsx)(`div`,{"data-testid":r,className:i,children:t}):null:(0,F.jsx)(n,{initial:!1,children:e?(0,F.jsx)(f.div,{"data-testid":r,initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:I,className:c(`overflow-hidden`,i),children:t},`accordion-panel`):null})}var re=e=>{let{conversationId:t}=T(),{data:n}=E(),r=n?.conversation_url,i=n?.session_api_key,o=n?.selected_repository,s=n?.workspace?.working_dir?.trim(),c=N.useMemo(()=>`${j(o,s)}/${e.filePath}`,[o,e.filePath,s]),l=e.type===`D`;return a({queryKey:e.commit?[`commit_file_diff`,t,r,i,e.commit,c]:[`file_diff`,t,r,i,c],queryFn:async()=>{if(!t)throw Error(`No conversation ID`);return k.getGitChangeDiff(t,r,i,c,e.commit)},enabled:e.enabled&&(!l||!!e.commit),staleTime:e.commit?1/0:1e3*60*5,gcTime:1e3*60*15})};function R({className:e}){let{t}=i(`openhands`);return(0,F.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,F.jsx)(`div`,{className:c(`animate-spin rounded-full border-4 border-transparent border-t-white`,e),role:`status`,"aria-label":t(s.HOME$LOADING)})})}function ie({height:e,children:t,className:n}){return(0,F.jsx)(`div`,{"data-testid":`editor-container`,className:c(`w-full border-b border-[var(--oh-border)] overflow-hidden h-[var(--editor-height)]`,n),style:{"--editor-height":`${e}px`},children:t})}var ae=[{mode:`old`,icon:_},{mode:`diff`,icon:m},{mode:`new`,icon:y}],z={renderValidationDecorations:`off`,readOnly:!0,scrollBeyondLastLine:!1,minimap:{enabled:!1},automaticLayout:!0,scrollbar:{alwaysConsumeMouseWheel:!1}};function B(e){return Math.min(e,600)}var V={A:h,D:v,M:g,R:`Renamed`,U:`Untracked`},H=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 U({path:e,type:t,commit:n,isExpanded:r,onToggle:a}){let{t:o}=i(`openhands`),[l,f]=N.useState(!1),m=r!==void 0,h=m?r:l,g=!h,_=()=>{if(m){a?.();return}f(e=>!e)},[v,y]=N.useState(0),[b,x]=N.useState(!1),[C,w]=N.useState(`diff`),T=N.useRef(null),E=N.useRef(null),D=t===`A`||t===`U`,O=t===`D`,k=N.useMemo(()=>{if(t===`R`){let t=e.split(/\s+/).slice(1);return t[t.length-1]}return e},[e,t]),{data:A,isLoading:j,isSuccess:M,isRefetching:P}=re({filePath:k,type:t,enabled:!g,commit:n}),I=N.useCallback(()=>{if(!T.current)return;let e=T.current.getOriginalEditor(),t=T.current.getModifiedEditor();e&&t&&(y(B(Math.max(e.getContentHeight(),t.getContentHeight())+20)),x(!0))},[]),U=N.useCallback(()=>{E.current&&(y(B(E.current.getContentHeight()+20)),x(!0))},[]);N.useEffect(()=>{x(!1),y(0)},[g,C]);let W=e=>{T.current=e,I(),e.getOriginalEditor().onDidContentSizeChange(I),e.getModifiedEditor().onDidContentSizeChange(I)},G=e=>{E.current=e,U(),e.onDidContentSizeChange(U)},K=(t===`U`?V.A:V[t])||`?`,q=typeof K==`string`?(0,F.jsx)(S.Text,{children:K}):N.createElement(K,{className:`w-4 h-4 shrink-0`}),J=j||P,Y=u(k),X=Y===`markdown`,Z=C===`old`?A?.original??``:A?.modified??``,Q=!O,$=!g&&Q,oe=e=>(0,F.jsx)(`div`,{className:c(`relative w-full`,!b&&`h-0 overflow-hidden`),children:(0,F.jsx)(ie,{height:b?v:B(400),className:c(!b&&`absolute inset-x-0 top-0 invisible`),children:e})});return(0,F.jsxs)(`div`,{"data-testid":`file-diff-viewer-outer`,className:`w-full flex flex-col`,children:[(0,F.jsx)(`div`,{className:`flex h-10 items-center px-3 border-b border-[var(--oh-border)] hover:cursor-pointer`,onClick:_,children:(0,F.jsxs)(`span`,{className:`text-sm w-full text-content flex items-center gap-2 min-w-0`,children:[(0,F.jsx)(`span`,{className:`inline-flex w-4 h-4 shrink-0 items-center justify-center`,children:J?(0,F.jsx)(R,{className:`w-4 h-4`}):q}),(0,F.jsx)(`strong`,{className:`min-w-0 flex-1 truncate font-medium`,children:k}),Q&&(0,F.jsx)(`span`,{className:c(`flex items-center gap-0.5 shrink-0`,!$&&`invisible pointer-events-none`),onClick:e=>e.stopPropagation(),"aria-hidden":!$,children:ae.map(({mode:e,icon:t})=>(0,F.jsx)(`button`,{"data-testid":`view-mode-${e}`,type:`button`,tabIndex:$?0:-1,"aria-pressed":C===e,onClick:()=>w(e),className:c(`p-1 rounded transition-colors cursor-pointer`,C===e?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-white`),children:(0,F.jsx)(t,{className:`w-4 h-4`})},e))}),(0,F.jsx)(`button`,{"data-testid":`collapse`,type:`button`,className:`shrink-0 text-[var(--oh-muted)]`,children:g?(0,F.jsx)(p,{className:`w-4 h-4`,"aria-hidden":!0}):(0,F.jsx)(d,{className:`w-4 h-4`,"aria-hidden":!0})})]})}),(0,F.jsx)(L,{open:h,children:O&&!n?(0,F.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:o(s.DIFF_VIEWER$FILE_DELETED)}):M&&(C===`diff`?oe((0,F.jsx)(te,{"data-testid":`file-diff-viewer`,className:`w-full h-full`,language:Y,original:D?``:A?.original??``,modified:O?``:A?.modified??``,theme:`custom-diff-theme`,onMount:W,beforeMount:H,options:{...z,renderSideBySide:!D&&!O,hideUnchangedRegions:{enabled:!0}}})):X?(0,F.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`,style:{maxHeight:600},children:(0,F.jsx)(ee,{content:Z,includeStandard:!0,includeHeadings:!0})}):oe((0,F.jsx)(ne,{"data-testid":`file-single-viewer`,className:`w-full h-full`,language:Y,value:Z,theme:`custom-diff-theme`,beforeMount:H,onMount:G,options:z})))})]})}function W({changes:e,commit:t}){let[n,r]=(0,N.useState)(null);return(0,F.jsx)(`div`,{"data-testid":`diff-change-list`,className:`w-full flex flex-col`,children:e.map(e=>(0,F.jsx)(U,{path:e.path,type:e.status,commit:t,isExpanded:n===e.path,onToggle:()=>r(t=>t===e.path?null:e.path)},e.path))})}function G({commit:e,showAuthor:t,isExpanded:n,onToggle:r}){let{t:a}=i(`openhands`),{data:o,isLoading:c,isSuccess:l}=P(e.sha,{enabled:n});return(0,F.jsxs)(`div`,{"data-testid":`commit-row`,className:`w-full flex flex-col`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:r,"aria-expanded":n,"data-testid":`commit-row-toggle`,className:`w-full flex h-10 items-center gap-2 px-3 border-b border-[var(--oh-border)] text-sm text-content text-left hover:cursor-pointer`,children:[(0,F.jsx)(`code`,{className:`w-[7ch] flex-shrink-0 text-center font-mono text-xs text-[var(--oh-muted)]`,children:e.shortSha}),(0,F.jsx)(`strong`,{className:`flex-1 truncate font-medium`,children:e.subject}),t&&(0,F.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate max-w-32 flex-shrink-0`,children:e.author}),(0,F.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] flex-shrink-0`,children:`${x(e.timestamp)} ${a(s.CONVERSATION$AGO)}`}),n?(0,F.jsx)(d,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0}):(0,F.jsx)(p,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]}),(0,F.jsxs)(L,{open:n,testId:`commit-row-content`,className:`w-full flex flex-col pl-6`,children:[c&&(0,F.jsx)(`div`,{className:`p-3`,children:(0,F.jsx)(R,{className:`w-4 h-4`})}),l&&o&&o.length>0&&(0,F.jsx)(W,{changes:o,commit:e.sha})]})]})}var K=`-`,q=`DIFF_VIEWER$UNCOMMITTED_FILE_COUNT`;function J({changes:e,isExpanded:t,onToggle:n}){let{t:r}=i(`openhands`);return(0,F.jsxs)(`div`,{"data-testid":`uncommitted-changes-row`,className:`w-full flex flex-col`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:n,"aria-expanded":t,"data-testid":`uncommitted-changes-row-toggle`,className:`w-full flex h-10 items-center gap-2 px-3 border-b border-[var(--oh-border)] text-sm text-content text-left hover:cursor-pointer`,children:[(0,F.jsx)(`code`,{className:`w-[7ch] flex-shrink-0 text-center font-mono text-xs text-[var(--oh-muted)]`,children:K}),(0,F.jsx)(`strong`,{className:`flex-1 truncate font-medium`,children:r(s.DIFF_VIEWER$UNCOMMITTED)}),e.length>0?(0,F.jsx)(`span`,{"data-testid":`uncommitted-changes-count`,className:`text-xs text-[var(--oh-muted)] tabular-nums flex-shrink-0`,children:r(q,{count:e.length})}):null,t?(0,F.jsx)(d,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0}):(0,F.jsx)(p,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]}),(0,F.jsx)(L,{open:t,testId:`uncommitted-changes-row-content`,className:`w-full flex flex-col pl-6`,children:e.length>0?(0,F.jsx)(W,{changes:e}):null})]})}var Y=`uncommitted`;function X({commits:e,hasMore:t,uncommittedChanges:n,autoExpandUncommitted:r=!1,onAutoExpandHandled:a}){let{t:o}=i(`openhands`),[c,l]=N.useState(null);N.useEffect(()=>{r&&(l(Y),a?.())},[r,a]);let u=new Set(e.map(e=>e.author)).size>1;return(0,F.jsxs)(`section`,{"data-testid":`commit-list`,className:`w-full flex flex-col`,children:[(0,F.jsx)(J,{changes:n,isExpanded:c===Y,onToggle:()=>l(e=>e===Y?null:Y)}),e.map(e=>(0,F.jsx)(G,{commit:e,showAuthor:u,isExpanded:c===e.sha,onToggle:()=>l(t=>t===e.sha?null:e.sha)},e.sha)),t&&(0,F.jsx)(`div`,{"data-testid":`commit-list-cap-notice`,className:`px-3 py-2.5 text-xs text-[var(--oh-muted)]`,children:o(s.DIFF_VIEWER$COMMITS_CAP,{count:e.length})})]})}function Z(){return(0,F.jsx)(g,{"aria-hidden":!0,className:`size-full`})}function Q(){let{t:e}=i(`openhands`),{conversationId:t}=T(),{commits:n,hasMore:r,isUnsupported:a,isLoading:c,isSuccess:l}=D(),{data:u,isSuccess:d,isLoading:f}=O(),p=b(e=>e.commitsAutoExpandSection),m=b(e=>e.setCommitsAutoExpandSection),h=(0,N.useCallback)(()=>m(null),[m]),{curAgentState:g}=w(),_=!o.includes(g),v=l&&!a&&n.length>0,y=d&&(u?.length??0)>0,x=v||y,S=c||_&&f;return(0,F.jsx)(`main`,{className:`h-full w-full flex flex-col items-stretch`,children:x?(0,F.jsx)(`div`,{className:`h-full overflow-y-auto flex flex-col items-stretch custom-scrollbar-always`,children:(0,F.jsx)(X,{commits:v?n:[],hasMore:v?r:!1,uncommittedChanges:d?(u??[]).slice(0,100):[],autoExpandUncommitted:p===`uncommitted`,onAutoExpandHandled:h},t)}):(0,F.jsxs)(`div`,{className:`flex-1 flex items-center justify-center`,children:[!_&&(0,F.jsx)(C,{testId:`commits-tab-status`,messageKey:s.DIFF_VIEWER$WAITING_FOR_RUNTIME}),_&&S&&(0,F.jsx)(C,{testId:`commits-tab-status`,messageKey:s.DIFF_VIEWER$LOADING}),_&&!S&&(0,F.jsx)(M,{icon:(0,F.jsx)(Z,{}),children:e(s.DIFF_VIEWER$NO_COMMITS)})]})})}export{Q as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{K as n}from"./utils-BOco8mxR.js";import{t as r}from"./modal-backdrop-BSzNhM4r.js";import{t as i}from"./brand-button-DxPO4Lf8.js";var a=e();function o({text:e,onConfirm:o,onCancel:s,confirmText:c,isConfirming:l=!1}){let{t:u}=t(`openhands`);return(0,a.jsx)(r,{onClose:l?void 0:s,closeOnEscape:!l,children:(0,a.jsxs)(`div`,{"data-testid":`confirmation-modal`,className:`bg-base-secondary p-4 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)]`,children:[(0,a.jsx)(`p`,{children:e}),(0,a.jsxs)(`div`,{className:`w-full flex justify-end gap-2`,children:[(0,a.jsx)(i,{testId:`cancel-button`,type:`button`,onClick:s,variant:`secondary`,isDisabled:l,children:u(n.BUTTON$CANCEL)}),(0,a.jsx)(i,{testId:`confirm-button`,type:`button`,onClick:o,variant:`primary`,isDisabled:l,children:c??u(n.BUTTON$CONFIRM)})]})]})})}export{o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./conversation-BnjJSFf5.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./conversation-BnjJSFf5.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{E as n,c as r,n as i,r as a,x as o}from"./agent-server-client-options-BikiNwTa.js";import{l as s,y as c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js";import{a as l,i as u}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js";import{_ as d}from"./conversation-store-DVVfkCsk.js";import{A as f,E as p,S as m,t as h,v as g}from"./agent-server-conversation-service.api-DYFsNHKf.js";var _=async e=>{let t=(await h.batchGetAppConversations([e]))[0];if(!t)throw Error(`V1 conversation not found: ${e}`);return{conversationUrl:t.conversation_url,sessionApiKey:t.session_api_key,sandboxId:t.sandbox_id}},v=async e=>{let{conversationUrl:t,sessionApiKey:n,sandboxId:a}=await _(e);if(r().backend.kind===`cloud`){if(!a)throw Error(`Cannot stop runtime: cloud conversation ${e} has no sandbox_id.`);return await m(a),{success:!0}}return new c(i({conversationUrl:t,sessionApiKey:n})).interruptConversation(e)},y=async(e,t)=>{let{conversationUrl:n,sessionApiKey:r}=await _(e);return new c(i({conversationUrl:n,sessionApiKey:r})).askAgent(e,t)},b=async(e,t)=>{let{conversationUrl:n,sessionApiKey:r}=await _(e);await new c(i({conversationUrl:n,sessionApiKey:r})).startGoal(e,t)},x=async e=>{let{conversationUrl:t,sessionApiKey:n}=await _(e);await new c(i({conversationUrl:t,sessionApiKey:n})).stopGoal(e)},S=async e=>{let{conversationUrl:t,sessionApiKey:n}=await _(e);await new c(i({conversationUrl:t,sessionApiKey:n})).resumeGoal(e)},C=async e=>{let{conversationUrl:t,sessionApiKey:n}=await _(e);return new c(i({conversationUrl:t,sessionApiKey:n})).runConversation(e)},w=(e,t,n)=>{e.setQueriesData({queryKey:[`user`,`conversation`,t]},e=>e&&{...e,...n}),e.setQueriesData({queryKey:[`user`,`conversations`]},e=>e&&{...e,pages:e.pages.map(e=>({...e,items:e.items.map(e=>e.id===t?{...e,...n}:e)}))})},T=(e,t,n)=>w(e,t,{execution_status:n}),E=(e,t,n)=>w(e,t,{llm_model:n}),D=(e,t)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,t]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]}),e.invalidateQueries({queryKey:[`unified`,`vscode_url`]})},O=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function k(e){let t=e.split(/[\\/]+/).filter(Boolean),n=t[t.length-1];if(!n||n===`.`||n===`..`)throw Error(`Invalid file name`);return n}async function A(e,t={}){return f(e,t)}async function j(e,t,n={}){let r=k(e);return`${(await A(t,n)).replace(/[/\\]+$/,``)}/${r}`}async function M(e,t){if(t?.id===e&&t.workspace?.working_dir?.trim())return t.workspace.working_dir.trim();let r=p(e);return r?.selected_workspace?.trim()?r.selected_workspace.trim():O.test(e)?h.resolveConversationWorkingDir(e):n()}var N=5;async function P(e,t){if(t?.id===e&&t.conversation_url?.trim()&&t.session_api_key?.trim())return{conversationUrl:t.conversation_url.trim(),sessionApiKey:t.session_api_key.trim()};if(r().backend.kind===`cloud`){let[t]=await g([e]);return{conversationUrl:t?.conversation_url?.trim()??null,sessionApiKey:t?.session_api_key?.trim()??null}}return{conversationUrl:null,sessionApiKey:null}}function F(e){if(!e.conversationUrl||!e.sessionApiKey)throw Error(`Conversation sandbox is still starting. Wait for it to finish, then try again.`);return{conversationUrl:e.conversationUrl,sessionApiKey:e.sessionApiKey}}async function I(e,t,n){let i=await M(e,n),a=await P(e,n),o=r().backend.kind===`cloud`,s=n?.id===e?n.session_api_key??a.sessionApiKey:a.sessionApiKey,c=n?.id===e?n.conversation_url??a.conversationUrl:a.conversationUrl;if(o){let e=F({conversationUrl:c,sessionApiKey:s});return L({files:t,workingDir:i,conversationUrl:e.conversationUrl,sessionApiKey:e.sessionApiKey})}return L({files:t,workingDir:i,conversationUrl:c,sessionApiKey:s})}async function L(e){let{files:t,workingDir:n,conversationUrl:r,sessionApiKey:a}=e,o=new u(i({conversationUrl:r,sessionApiKey:a,workingDir:n})),s=async e=>{try{let t=k(e.name),i=await j(e.name,n,{conversationUrl:r,sessionApiKey:a});return await o.fileUpload(e,i),{uploadedFile:t,skippedFile:null}}catch(t){return{uploadedFile:null,skippedFile:{name:e.name,reason:t instanceof Error?t.message:`Upload failed`}}}},c=[];for(let e=0;e<t.length;e+=N){let n=t.slice(e,e+N);c.push(...await Promise.all(n.map(s)))}return{uploaded_files:c.flatMap(e=>e.uploadedFile?[e.uploadedFile]:[]),skipped_files:c.flatMap(e=>e.skippedFile?[e.skippedFile]:[])}}var R=class{static currentConversation=null;static setCurrentConversation(e){this.currentConversation=e}static getCurrentConversation(){return this.currentConversation}static getClientOverrides(){return{sessionApiKey:this.currentConversation?.session_api_key}}static async getVSCodeUrl(e){let t=this.currentConversation?.id===e?this.currentConversation?.workspace?.working_dir??n():n();return{vscode_url:await new s(i(this.getClientOverrides())).getUrl({baseUrl:typeof window<`u`?window.location.origin:void 0,workspaceDir:t})}}static async getTrajectory(e){return{trajectory:(await new l(a(this.getClientOverrides()),e).search({limit:1e4})).items??[]}}static async uploadFiles(e,t){return I(e,t,this.currentConversation)}};e();var z=t(),B=e=>(0,z.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,z.jsx)(`path`,{d:`M21.0004 6.00001C21.0016 5.43668 20.8441 4.88442 20.5459 4.40644C20.2478 3.92846 19.8212 3.54406 19.3148 3.29726C18.8084 3.05046 18.2428 2.95122 17.6826 3.0109C17.1224 3.07059 16.5904 3.28678 16.1474 3.63473C15.7044 3.98269 15.3683 4.44835 15.1776 4.97841C14.9869 5.50848 14.9493 6.08152 15.0691 6.63197C15.1888 7.18241 15.4612 7.688 15.8549 8.09088C16.2487 8.49375 16.7479 8.77762 17.2954 8.91001V10.5C17.2978 10.6372 17.261 10.7722 17.1892 10.8891C17.1175 11.006 17.0138 11.1 16.8904 11.16L12.7354 13.32L8.59544 11.22C8.46356 11.1544 8.35443 11.0507 8.28221 10.9223C8.21 10.7939 8.17802 10.6468 8.19044 10.5V8.91001C8.89743 8.72746 9.51358 8.29333 9.92339 7.689C10.3332 7.08467 10.5085 6.35161 10.4165 5.62725C10.3245 4.90289 9.97149 4.23695 9.42361 3.75426C8.87573 3.27157 8.17062 3.00527 7.44044 3.00527C6.71026 3.00527 6.00514 3.27157 5.45726 3.75426C4.90938 4.23695 4.55635 4.90289 4.46435 5.62725C4.37234 6.35161 4.54768 7.08467 4.95749 7.689C5.36729 8.29333 5.98344 8.72746 6.69044 8.91001V10.5C6.6913 10.9156 6.80651 11.323 7.02346 11.6776C7.24041 12.0321 7.55073 12.3201 7.92044 12.51L12.0004 14.61V16.59C11.2934 16.7726 10.6773 17.2067 10.2675 17.811C9.85768 18.4153 9.68234 19.1484 9.77435 19.8728C9.86635 20.5971 10.2194 21.2631 10.7673 21.7457C11.3151 22.2284 12.0203 22.4947 12.7504 22.4947C13.4806 22.4947 14.1857 22.2284 14.7336 21.7457C15.2815 21.2631 15.6345 20.5971 15.7265 19.8728C15.8185 19.1484 15.6432 18.4153 15.2334 17.811C14.8236 17.2067 14.2074 16.7726 13.5004 16.59V14.61L17.5504 12.57C17.9317 12.3784 18.2501 12.0816 18.468 11.7148C18.686 11.348 18.7944 10.9265 18.7804 10.5V8.88001C19.4147 8.70922 19.9755 8.33496 20.3765 7.81469C20.7776 7.29442 20.9967 6.6569 21.0004 6.00001ZM6.00044 6.00001C6.00044 5.60218 6.15847 5.22065 6.43978 4.93934C6.72108 4.65804 7.10261 4.5 7.50044 4.5C7.89826 4.5 8.27979 4.65804 8.5611 4.93934C8.8424 5.22065 9.00044 5.60218 9.00044 6.00001C9.00044 6.39783 8.8424 6.77936 8.5611 7.06067C8.27979 7.34197 7.89826 7.50001 7.50044 7.50001C7.10261 7.50001 6.72108 7.34197 6.43978 7.06067C6.15847 6.77936 6.00044 6.39783 6.00044 6.00001ZM14.2054 19.5C14.2054 19.8978 14.0474 20.2794 13.7661 20.5607C13.4848 20.842 13.1033 21 12.7054 21C12.3076 21 11.9261 20.842 11.6448 20.5607C11.3635 20.2794 11.2054 19.8978 11.2054 19.5C11.2054 19.1022 11.3635 18.7207 11.6448 18.4393C11.9261 18.158 12.3076 18 12.7054 18C13.1033 18 13.4848 18.158 13.7661 18.4393C14.0474 18.7207 14.2054 19.1022 14.2054 19.5ZM18.0004 7.50001C17.6026 7.50001 17.2211 7.34197 16.9398 7.06067C16.6585 6.77936 16.5004 6.39783 16.5004 6.00001C16.5004 5.60218 16.6585 5.22065 16.9398 4.93934C17.2211 4.65804 17.6026 4.5 18.0004 4.5C18.3983 4.5 18.7798 4.65804 19.0611 4.93934C19.3424 5.22065 19.5004 5.60218 19.5004 6.00001C19.5004 6.39783 19.3424 6.77936 19.0611 7.06067C18.7798 7.34197 18.3983 7.50001 18.0004 7.50001Z`,fill:`currentColor`})}),V=e=>{let t=e.match(/^\/workspace\/[^/]+\/(.*)$/);return t?t[1]:e};function H(e){let t=e.trim().replace(/\\/g,`/`).replace(/\/+$/,``);return t?t.startsWith(`/`)||/^[A-Za-z]:(\/|$)/.test(t)?t:`/${t}`:``}var U=(e,t)=>{let n=e.trim().replace(/\\/g,`/`);if(!n)return``;n=n.replace(/:(\d+)(-\d+)?$/,``);let r=[t,o].filter(e=>!!e?.trim());for(let e of r){let t=H(e);if(t){if(n===t)return``;if(n.startsWith(`${t}/`))return n.slice(t.length+1)}}return n.startsWith(`/`)?V(n).replace(/^\.\//,``):n.replace(/^\.\//,``)},W=/\.(md|txt|ts|tsx|js|jsx|mjs|cjs|py|json|html?|css|scss|ya?ml|toml|rs|go|java|kt|swift|c|cc|cpp|h|hpp|sh|bash|zsh|sql|xml|svg|pdf|env|rb|php|vue|svelte|lock|ini|cfg|docx?|xlsx?|pptx?|odt|rtf)$/i,G=e=>{let t=e.trim();if(!t||/\s/.test(t)||/^https?:\/\//i.test(t))return!1;let n=t.replace(/\\/g,`/`).replace(/^\.\//,``);if(n=n.replace(/:(\d+)(-\d+)?$/,``),/^(application|audio|image|text|video|font|multipart|message|model)\/[\w.+-]+$/i.test(n)||/^v?\d+(\.\d+){1,3}([-+][\w.]+)?$/i.test(n))return!1;let r=n.includes(`/`)?n.split(`/`).pop()??``:n;return W.test(r)},K=e=>{let t=e.trim();if(!t)return``;let n=t.replace(/[\\/]+$/,``);if(!n||/^[A-Za-z]:$/.test(n))return``;let r=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`));return r>=0?n.slice(r+1):n},q=d(e=>({executionStatusByConversation:{},setExecutionStatus:(t,n)=>e(e=>({executionStatusByConversation:{...e.executionStatusByConversation,[t]:n}})),reset:()=>e({executionStatusByConversation:{}})}));export{x as _,U as a,P as c,D as d,w as f,b as g,S as h,V as i,I as l,C as m,K as n,B as o,v as p,G as r,R as s,q as t,y as u,T as v,E as y};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Ck5D_A2Q.js";var n=e(t(),1),r=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},i=(e=>e?r(e):r),a=e=>e;function o(e,t=a){let r=n.useSyncExternalStore(e.subscribe,n.useCallback(()=>t(e.getState()),[e,t]),n.useCallback(()=>t(e.getInitialState()),[e,t]));return n.useDebugValue(r),r}var s=e=>{let t=i(e),n=e=>o(t,e);return Object.assign(n,t),n},c=(e=>e?s(e):s),l=e=>!!e.dispatchFromDevtools&&typeof e.dispatch==`function`,u=new Map,d=e=>{let t=u.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([e,t])=>[e,t.getState()])):{}},f=(e,t,n)=>{if(e===void 0)return{type:`untracked`,connection:t.connect(n)};let r=u.get(n.name);if(r)return{type:`tracked`,store:e,...r};let i={connection:t.connect(n),stores:{}};return u.set(n.name,i),{type:`tracked`,store:e,...i}},p=(e,t)=>{if(t===void 0)return;let n=u.get(e);n&&(delete n.stores[t],Object.keys(n.stores).length===0&&u.delete(e))},m=/.+ (.+) .+/,h=/^([^@]+)@/;function g(e){if(!e)return;let t=e.split(`
|
|
2
|
-
`),n=t.findIndex(e=>e.includes(`api.setState`));if(n<0)return;let r=t[n+1]?.trim()||``;return m.exec(r)?.[1]||h.exec(r)?.[1]}var _=(e,t={})=>(n,r,i)=>{let{enabled:a,anonymousActionType:o,store:s,...c}=t,u;try{u=(a??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return e(n,r,i);let{connection:m,...h}=f(s,u,c),_=!0;i.setState=((e,t,a)=>{let l=n(e,t);if(!_)return l;let u=a===void 0?{type:o||g(Error().stack)||`anonymous`}:typeof a==`string`?{type:a}:a;return s===void 0?(m?.send(u,r()),l):(m?.send({...u,type:`${s}/${u.type}`},{...d(c.name),[s]:i.getState()}),l)}),i.devtools={cleanup:()=>{m&&typeof m.unsubscribe==`function`&&m.unsubscribe(),p(c.name,s)}};let y=(...e)=>{let t=_;_=!1,n(...e),_=t},b=e(i.setState,r,i);if(h.type===`untracked`?m?.init(b):(h.stores[h.store]=i,m?.init(Object.fromEntries(Object.entries(h.stores).map(([e,t])=>[e,e===h.store?b:t.getState()])))),l(i)){let e=i.dispatch;i.dispatch=(...t)=>{e(...t)}}return m.subscribe(e=>{switch(e.type){case`ACTION`:if(typeof e.payload!=`string`){console.error(`[zustand devtools middleware] Unsupported action format`);return}return v(e.payload,e=>{if(e.type===`__setState`){if(s===void 0){y(e.state);return}Object.keys(e.state).length!==1&&console.error(`
|
|
3
|
-
[zustand devtools middleware] Unsupported __setState action format.
|
|
4
|
-
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
5
|
-
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
6
|
-
`);let t=e.state[s];if(t==null)return;JSON.stringify(i.getState())!==JSON.stringify(t)&&y(t);return}l(i)&&i.dispatch(e)});case`DISPATCH`:switch(e.payload.type){case`RESET`:return y(b),s===void 0?m?.init(i.getState()):m?.init(d(c.name));case`COMMIT`:if(s===void 0){m?.init(i.getState());return}return m?.init(d(c.name));case`ROLLBACK`:return v(e.state,e=>{if(s===void 0){y(e),m?.init(i.getState());return}y(e[s]),m?.init(d(c.name))});case`JUMP_TO_STATE`:case`JUMP_TO_ACTION`:return v(e.state,e=>{if(s===void 0){y(e);return}JSON.stringify(i.getState())!==JSON.stringify(e[s])&&y(e[s])});case`IMPORT_STATE`:{let{nextLiftedState:t}=e.payload,n=t.computedStates.slice(-1)[0]?.state;if(!n)return;y(s===void 0?n:n[s]),m?.send(null,t);return}case`PAUSE_RECORDING`:return _=!_}return}}),b},v=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error(`[zustand devtools middleware] Could not parse the received json`,e)}n!==void 0&&t(n)};function y(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var b=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return b(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return b(t)(e)}}}},x=(e,t)=>(n,r,i)=>{let a={storage:y(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return b(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},S={workspace:`workspace`,git:`git`},C=[S.workspace,S.git],w=new Set(C),T={changes:`changes`,repository:`repository`,branch:`branch`,commits:`commits`,pull_requests:`pull_requests`},E=[T.changes,T.repository,T.branch,T.commits,T.pull_requests],D=new Set(E),O=[],k=[],A=[{sections:[S.workspace]}];function j(e,t){return!t.includes(e)}function M(e,t){return!t.includes(e)}var N={CONVERSATION_STATE:`conversation-state`,PENDING_TASK_DRAFT:`pending-task-draft`},P=`conversation-state-updated`,F={selectedTab:`files`,unpinnedTabs:[],unpinnedOverviewSections:[...O],unpinnedOverviewGitParts:[...k],conversationMode:`code`,subConversationTaskId:null,draftMessage:null,rightPanelShown:!1,filesTabDiffView:null,filesTabContentViewMode:`rich`,filesTabTreeVisible:!0,filesTabOpenPaths:[],filesTabSelectedPath:null},I=new Set([`files`,`commits`,`browser`,`terminal`,`planner`,`tasklist`,`usage`]),L=new Set([`editor`,`served`,`app`,`vscode`]),R=new Set([`rich`,`plain`]);function z(e){let t=e;if(t.selectedTab!=null&&(L.has(t.selectedTab)||t.selectedTab===`changes`||!I.has(t.selectedTab))){let e=t.selectedTab;t={...t},e===`changes`?t.selectedTab=`commits`:delete t.selectedTab}if(t.unpinnedTabs){let e=t.unpinnedTabs.filter(e=>e!==`changes`&&!L.has(e));e.length!==t.unpinnedTabs.length&&(t={...t,unpinnedTabs:e})}if(t.unpinnedOverviewSections){let e=t.unpinnedOverviewSections.filter(e=>w.has(e));e.length!==t.unpinnedOverviewSections.length&&(t={...t,unpinnedOverviewSections:e})}if(t.unpinnedOverviewGitParts){let e=t.unpinnedOverviewGitParts.filter(e=>D.has(e));e.length!==t.unpinnedOverviewGitParts.length&&(t={...t,unpinnedOverviewGitParts:e})}if(t.filesTabContentViewMode!=null&&!R.has(t.filesTabContentViewMode)&&(t={...t},delete t.filesTabContentViewMode),t.rightPanelShown!=null&&typeof t.rightPanelShown!=`boolean`&&(t={...t},delete t.rightPanelShown),t.filesTabTreeVisible!=null&&typeof t.filesTabTreeVisible!=`boolean`&&(t={...t},delete t.filesTabTreeVisible),t.filesTabOpenPaths!=null)if(!Array.isArray(t.filesTabOpenPaths))t={...t},delete t.filesTabOpenPaths;else{let e=t.filesTabOpenPaths.filter(e=>typeof e==`string`&&e.length>0);e.length!==t.filesTabOpenPaths.length&&(t={...t,filesTabOpenPaths:e})}return t.filesTabSelectedPath!=null&&typeof t.filesTabSelectedPath!=`string`&&(t={...t},delete t.filesTabSelectedPath),t}function B(e){return e.startsWith(`task-`)}function V(e){return e===``||B(e)}function H(e){if(V(e))return F;try{let t=`${N.CONVERSATION_STATE}-${e}`,n=localStorage.getItem(t);return n===null?F:{...F,...z(JSON.parse(n))}}catch{return F}}function U(e,t){if(!V(e))try{let n=`${N.CONVERSATION_STATE}-${e}`,r={...H(e),...t};localStorage.setItem(n,JSON.stringify(r)),typeof window<`u`&&window.dispatchEvent(new CustomEvent(P,{detail:{conversationId:e}}))}catch(e){console.warn(`Failed to set conversation localStorage`,e)}}function W(e){return`${N.PENDING_TASK_DRAFT}-${e}`}function G(e,t){if(e)try{localStorage.setItem(W(e),t)}catch(e){console.warn(`Failed to store pending task draft`,e)}}function K(e){if(!e)return null;try{let t=W(e),n=localStorage.getItem(t);return localStorage.removeItem(t),n}catch(e){return console.warn(`Failed to consume pending task draft`,e),null}}function q(e){try{let t=`${N.CONVERSATION_STATE}-${e}`;localStorage.removeItem(t),typeof window<`u`&&window.dispatchEvent(new CustomEvent(P,{detail:{conversationId:e}}))}catch(t){console.warn(`Failed to clear conversation localStorage`,e,t)}}function J(e){let[t,r]=(0,n.useState)(()=>H(e));(0,n.useEffect)(()=>{if(typeof window>`u`)return;let t=`${N.CONVERSATION_STATE}-${e}`,n=()=>{r(H(e))},i=e=>{e.key===t&&n()},a=t=>{t.detail?.conversationId===e&&n()};return n(),window.addEventListener(`storage`,i),window.addEventListener(P,a),()=>{window.removeEventListener(`storage`,i),window.removeEventListener(P,a)}},[e]);let i=t=>{if(V(e)){r(e=>({...e,...t}));return}U(e,t)};return{state:t,setSelectedTab:e=>i({selectedTab:e}),setUnpinnedTabs:e=>i({unpinnedTabs:e}),setUnpinnedOverviewSections:e=>i({unpinnedOverviewSections:e}),setUnpinnedOverviewGitParts:e=>i({unpinnedOverviewGitParts:e}),setConversationMode:e=>i({conversationMode:e}),setDraftMessage:e=>i({draftMessage:e}),setRightPanelShown:e=>i({rightPanelShown:e}),setFilesTabDiffView:e=>i({filesTabDiffView:e}),setFilesTabContentViewMode:e=>i({filesTabContentViewMode:e}),setFilesTabTreeVisible:e=>i({filesTabTreeVisible:e}),setFilesTabOpenState:(e,t)=>i({filesTabOpenPaths:e,filesTabSelectedPath:t})}}var Y=()=>{if(typeof window>`u`)return null;let e=window.location.pathname.match(/\/conversations\/([^/]+)/);return e?e[1]:null},X=()=>{if(typeof window>`u`)return`code`;let e=Y();return e?H(e).conversationMode:`code`},Z=c()(_(e=>({isRightPanelShown:!1,isOverviewPanelShown:!1,isOverviewPanelPeeked:!1,selectedTab:`files`,commitsAutoExpandSection:null,images:[],files:[],imagesMarkedUploadAsFile:[],pastedImageNames:[],loadingFiles:[],loadingImages:[],messageToSend:null,messageRestoreIfEmpty:null,shouldShownAgentLoading:!1,submittedMessage:null,shouldHideSuggestions:!1,hasRightPanelToggled:!1,planContent:null,conversationMode:X(),subConversationTaskId:null,localPlanningConversationId:null,setIsRightPanelShown:t=>e({isRightPanelShown:t},!1,`setIsRightPanelShown`),setIsOverviewPanelShown:t=>e({isOverviewPanelShown:t,isOverviewPanelPeeked:!1},!1,`setIsOverviewPanelShown`),setIsOverviewPanelPeeked:t=>e({isOverviewPanelPeeked:t},!1,`setIsOverviewPanelPeeked`),setSelectedTab:t=>e({selectedTab:t},!1,`setSelectedTab`),setCommitsAutoExpandSection:t=>e({commitsAutoExpandSection:t},!1,`setCommitsAutoExpandSection`),setShouldShownAgentLoading:t=>e({shouldShownAgentLoading:t},!1,`setShouldShownAgentLoading`),setShouldHideSuggestions:t=>e({shouldHideSuggestions:t},!1,`setShouldHideSuggestions`),addImages:t=>e(e=>({images:[...e.images,...t]}),!1,`addImages`),addFiles:t=>e(e=>({files:[...e.files,...t]}),!1,`addFiles`),toggleImageUploadAsFile:t=>e(e=>{let n=new Set(e.imagesMarkedUploadAsFile);return n.has(t)?n.delete(t):n.add(t),{imagesMarkedUploadAsFile:[...n]}},!1,`toggleImageUploadAsFile`),markImagesAsPasted:t=>e(e=>({pastedImageNames:[...new Set([...e.pastedImageNames,...t])]}),!1,`markImagesAsPasted`),removeImage:t=>e(e=>{let n=e.images[t],r=[...e.images];return r.splice(t,1),{images:r,imagesMarkedUploadAsFile:n?e.imagesMarkedUploadAsFile.filter(e=>e!==n.name):e.imagesMarkedUploadAsFile,pastedImageNames:n?e.pastedImageNames.filter(e=>e!==n.name):e.pastedImageNames}},!1,`removeImage`),removeFile:t=>e(e=>{let n=[...e.files];return n.splice(t,1),{files:n}},!1,`removeFile`),clearImages:()=>e({images:[]},!1,`clearImages`),clearFiles:()=>e({files:[]},!1,`clearFiles`),clearAllFiles:()=>e({images:[],files:[],imagesMarkedUploadAsFile:[],pastedImageNames:[],loadingFiles:[],loadingImages:[]},!1,`clearAllFiles`),addFileLoading:t=>e(e=>e.loadingFiles.includes(t)?e:{loadingFiles:[...e.loadingFiles,t]},!1,`addFileLoading`),removeFileLoading:t=>e(e=>({loadingFiles:e.loadingFiles.filter(e=>e!==t)}),!1,`removeFileLoading`),addImageLoading:t=>e(e=>e.loadingImages.includes(t)?e:{loadingImages:[...e.loadingImages,t]},!1,`addImageLoading`),removeImageLoading:t=>e(e=>({loadingImages:e.loadingImages.filter(e=>e!==t)}),!1,`removeImageLoading`),clearAllLoading:()=>e({loadingFiles:[],loadingImages:[]},!1,`clearAllLoading`),setMessageToSend:t=>e({messageToSend:{text:t,timestamp:Date.now()}},!1,`setMessageToSend`),clearMessageToSend:()=>e({messageToSend:null},!1,`clearMessageToSend`),restoreMessageToInputIfEmpty:t=>e({messageRestoreIfEmpty:{text:t,timestamp:Date.now()}},!1,`restoreMessageToInputIfEmpty`),clearMessageRestoreIfEmpty:()=>e({messageRestoreIfEmpty:null},!1,`clearMessageRestoreIfEmpty`),setSubmittedMessage:t=>e({submittedMessage:t},!1,`setSubmittedMessage`),resetConversationState:()=>e({shouldHideSuggestions:!1,conversationMode:X(),subConversationTaskId:null,localPlanningConversationId:null,planContent:null},!1,`resetConversationState`),setHasRightPanelToggled:t=>e({hasRightPanelToggled:t},!1,`setHasRightPanelToggled`),setConversationMode:t=>{let n=Y();n&&U(n,{conversationMode:t}),e({conversationMode:t},!1,`setConversationMode`)},setSubConversationTaskId:t=>e({subConversationTaskId:t},!1,`setSubConversationTaskId`),setLocalPlanningConversationId:t=>e({localPlanningConversationId:t},!1,`setLocalPlanningConversationId`),setPlanContent:t=>e({planContent:t},!1,`setPlanContent`)}),{name:`conversation-store`}));export{c as _,B as a,J as c,A as d,M as f,x as g,_ as h,H as i,T as l,y as m,q as n,U as o,j as p,K as r,G as s,Z as t,S as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{K as n}from"./utils-BOco8mxR.js";import{t as r}from"./checkmark-XZyokq_Y.js";import{t as i}from"./copy-Drmhc2jD.js";var a=e();function o({isHidden:e,isDisabled:o,onClick:s,mode:c}){let{t:l}=t(`openhands`);return(0,a.jsxs)(`button`,{hidden:e,disabled:o,"data-testid":`copy-to-clipboard`,type:`button`,onClick:s,"aria-label":l(c===`copy`?n.BUTTON$COPY:n.BUTTON$COPIED),className:`button-base p-1 cursor-pointer`,children:[c===`copy`&&(0,a.jsx)(i,{width:15,height:15}),c===`copied`&&(0,a.jsx)(r,{width:15,height:15})]})}export{o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{H as r,U as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{K as o,t as s}from"./utils-BOco8mxR.js";import{t as c}from"./use-is-authed-BRPjCRKM.js";import{t as l}from"./typography-HLLg_FAn.js";var u=e(t(),1),d=n(),f=i(function(){let{t:e}=a(`openhands`),[t]=r(),{data:n,isLoading:i}=c(),[f,p]=(0,u.useState)(null),[m,h]=(0,u.useState)(!1),g=t.get(`user_code`),_=async e=>{try{h(!0),(await fetch(`/oauth/device/verify-authenticated`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:`user_code=${encodeURIComponent(e)}`,credentials:`include`})).ok?p({success:!0,messageKey:o.DEVICE$SUCCESS_MESSAGE}):p({success:!1,messageKey:o.DEVICE$ERROR_FAILED})}catch{p({success:!1,messageKey:o.DEVICE$ERROR_OCCURRED})}finally{h(!1)}};return f?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsx)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:s(`mb-4`,f.success?`text-green-600`:`text-red-600`),children:f.success?(0,d.jsx)(`svg`,{className:`w-12 h-12 mx-auto`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,d.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 13l4 4L19 7`})}):(0,d.jsx)(`svg`,{className:`w-12 h-12 mx-auto`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,d.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})}),(0,d.jsx)(`h2`,{className:`text-xl font-medium mb-2`,children:f.success?e(o.DEVICE$SUCCESS_TITLE):e(o.DEVICE$ERROR_TITLE)}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-4`,children:e(f.messageKey)}),!f.success&&(0,d.jsx)(`button`,{type:`button`,onClick:()=>window.location.reload(),className:`px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90`,children:e(o.DEVICE$TRY_AGAIN)})]})})}):m?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsx)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-b-2 border-white mx-auto mb-4`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(o.DEVICE$PROCESSING)})]})})}):n&&g?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background p-4`,children:(0,d.jsx)(`div`,{className:`flex flex-col items-center gap-6 w-full max-w-md`,children:(0,d.jsxs)(`div`,{className:`flex-1 min-w-0 max-w-md w-full mx-auto p-6 bg-card rounded-2xl shadow-lg border border-[var(--oh-border-subtle)]`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4 text-center`,children:e(o.DEVICE$AUTHORIZATION_REQUEST)}),(0,d.jsxs)(`div`,{className:`mb-6 p-4 bg-base rounded-lg border border-[var(--oh-border-subtle)]`,children:[(0,d.jsx)(`p`,{className:`text-xs text-[var(--oh-text-subtle)] mb-2 text-center uppercase tracking-wider`,children:e(o.DEVICE$CODE_LABEL)}),(0,d.jsx)(`p`,{className:`text-xl font-mono font-semibold text-center tracking-[0.3em]`,children:g})]}),(0,d.jsxs)(`div`,{className:`mb-6 p-4 bg-amber-950/50 border-l-2 border-amber-500 rounded-r-lg`,children:[(0,d.jsx)(`p`,{className:`text-sm font-medium text-amber-500 mb-1`,children:e(o.DEVICE$SECURITY_NOTICE)}),(0,d.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:e(o.DEVICE$SECURITY_WARNING)})]}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-6 text-center`,children:e(o.DEVICE$CONFIRM_PROMPT)}),(0,d.jsxs)(`div`,{className:`flex gap-3`,children:[(0,d.jsx)(`button`,{type:`button`,onClick:()=>window.close(),className:`flex-1 px-4 py-2 border border-[var(--oh-border)] rounded-md hover:bg-muted text-[var(--oh-text-tertiary)]`,children:e(o.DEVICE$CANCEL)}),(0,d.jsx)(`button`,{type:`button`,onClick:()=>_(g),className:`flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700`,children:e(o.DEVICE$AUTHORIZE)})]})]})})}):n&&!g?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4 text-center`,children:e(o.DEVICE$AUTHORIZATION_TITLE)}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-6 text-center`,children:e(o.DEVICE$ENTER_CODE_PROMPT)}),(0,d.jsxs)(`form`,{onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`user_code`);t&&n&&_(t)},children:[(0,d.jsxs)(`div`,{className:`mb-4`,children:[(0,d.jsx)(`label`,{htmlFor:`user_code`,className:`block text-sm font-medium mb-2`,children:e(o.DEVICE$CODE_INPUT_LABEL)}),(0,d.jsx)(`input`,{type:`text`,id:`user_code`,name:`user_code`,required:!0,className:`w-full px-3 py-2 border border-input rounded-md focus:outline-none focus:ring-2 focus:ring-ring`,placeholder:e(o.DEVICE$CODE_PLACEHOLDER)})]}),(0,d.jsx)(`button`,{type:`submit`,className:`w-full px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90`,children:e(o.DEVICE$CONTINUE)})]})]})}):i?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-b-2 border-white mx-auto mb-4`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(o.DEVICE$PROCESSING)})]})}):(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg text-center`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4`,children:e(o.DEVICE$AUTH_REQUIRED)}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(o.DEVICE$SIGN_IN_PROMPT)})]})})});export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{ct as i,st as a}from"./active-backend-context-rZiLJRUc.js";import{K as o,t as s}from"./utils-BOco8mxR.js";import{_ as c,g as l,h as u,m as d,p as f,v as p}from"./kebab-menu-item-content-mm04SBD3.js";import{A as m,T as h}from"./use-tracking-B9prBsrq.js";import{r as g}from"./modal-classes-Dg0ngBPO.js";import{f as ee,l as _}from"./form-control-classes-B-z85REi.js";import{t as v}from"./brand-button-DxPO4Lf8.js";import{t as y}from"./settings-dropdown-input-DVpyD87C.js";import{t as b}from"./settings-input-C0dd8Utu.js";import{t as x}from"./use-llm-profiles-BTTtpW4z.js";import{s as S}from"./use-automations-Cg0PDIZr.js";import{n as C}from"./api-error-message-Ve79qDcN.js";import{t as w}from"./x-mark-BopmFoBq.js";import{t as T}from"./use-manifest-capabilities-AOWGcu0j.js";var E=e(t(),1);function D(e,t){let n=e.trim();if(!n)return{value:null};let r=Number(n);return Number.isInteger(r)?r<=0?{errorKey:o.AUTOMATIONS$ERROR_TIMEOUT_POSITIVE}:t!==void 0&&r>t?{errorKey:o.AUTOMATIONS$ERROR_TIMEOUT_MAX_EXCEEDED}:{value:r}:{errorKey:o.AUTOMATIONS$ERROR_TIMEOUT_INVALID_NUMBER}}var O=n(),k=`__active__`,A=[o.AUTOMATIONS$WEEKDAY_SUN,o.AUTOMATIONS$WEEKDAY_MON,o.AUTOMATIONS$WEEKDAY_TUE,o.AUTOMATIONS$WEEKDAY_WED,o.AUTOMATIONS$WEEKDAY_THU,o.AUTOMATIONS$WEEKDAY_FRI,o.AUTOMATIONS$WEEKDAY_SAT];function j(e){let t=e.timeout==null?``:String(e.timeout);if(e.trigger.type===`event`)return{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:`custom`,weekday:1,timeOfDay:``,isCustomSchedule:!0,rawSchedule:``,timeout:t};let n=l(e.trigger.schedule);return n.kind===`custom`?{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:`custom`,weekday:1,timeOfDay:n.hour!==void 0&&n.minute!==void 0?u(n.hour,n.minute):``,isCustomSchedule:!0,rawSchedule:n.raw,timeout:t}:{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:n.kind,weekday:n.kind===`weekly`?n.weekday??1:1,timeOfDay:u(n.hour,n.minute),isCustomSchedule:!1,rawSchedule:e.trigger.schedule??``,timeout:t}}function M({automation:e,isOpen:t,onClose:n}){let{t:l}=r(`openhands`),u=S(),M=m().editTitle,N=h(`name`),P=h(`prompt`),F=h(`model`),I=h(`timeout`),L=h(`schedule`),{data:R}=T(),z=R?.maxAutomationTimeoutSeconds,B=z===void 0?void 0:Math.min(z,I.max??z),{data:V,isLoading:H}=x(),U=V?.profiles??[],W=[{key:k,label:l(o.COMMON$ACTIVE_PROFILE)},...U.map(e=>({key:e.name,label:e.name}))],G=(0,E.useMemo)(()=>j(e),[e]),[K,q]=(0,E.useState)(G),[J,Y]=(0,E.useState)(null),[X,Z]=(0,E.useState)(null),[Q,$]=(0,E.useState)(null);if((0,E.useEffect)(()=>{t&&(q(G),Y(null),Z(null),$(null))},[t,G]),!t)return null;let te=[{key:`daily`,label:l(o.AUTOMATIONS$FREQUENCY_DAILY)},{key:`weekdays`,label:l(o.AUTOMATIONS$FREQUENCY_WEEKDAYS)},{key:`weekly`,label:l(o.AUTOMATIONS$FREQUENCY_WEEKLY)},...K.isCustomSchedule?[{key:`custom`,label:l(o.AUTOMATIONS$FREQUENCY_CUSTOM)}]:[]],ne=A.map((e,t)=>({key:String(t),label:l(e)}));return(0,O.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,O.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`presentation`}),(0,O.jsxs)(`div`,{className:`relative w-full max-w-md rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,O.jsx)(`button`,{type:`button`,onClick:n,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":l(o.AUTOMATIONS$CANCEL),children:(0,O.jsx)(w,{className:`size-5`})}),(0,O.jsx)(`h2`,{className:g,children:M}),(0,O.jsxs)(`form`,{onSubmit:t=>{t.preventDefault();let r=K.name.trim();if(!r){Y(l(o.AUTOMATIONS$NAME_REQUIRED));return}Y(null);let s=D(K.timeout,B);if(`errorKey`in s){Z(l(s.errorKey,{max:B}));return}Z(null);let d={};r!==e.name&&(d.name=r);let m=K.prompt.trim();m!==(e.prompt??``).trim()&&(d.prompt=m.length===0?null:m);let h=K.model.trim();if(h!==(e.model??``)&&(d.model=h===``?null:h),(s.value??null)!==(e.timeout??null)&&(d.timeout=s.value),e.trigger.type!==`event`&&K.isCustomSchedule){if(K.rawSchedule.trim()!==(e.trigger.schedule??``).trim()){let t=p(K.rawSchedule);if(`errorKey`in t){$(l(t.errorKey));return}d.trigger={...e.trigger,schedule:t.schedule}}$(null)}else if(!K.isCustomSchedule&&K.frequency!==`custom`){let t=c(K.timeOfDay);if(t){let n=f({kind:K.frequency,hour:t.hour,minute:t.minute,weekday:K.frequency===`weekly`?K.weekday:void 0});n!==e.trigger.schedule&&(d.trigger={...e.trigger,schedule:n})}}if(Object.keys(d).length===0){n();return}u.mutate({id:e.id,body:d},{onSuccess:()=>{i(l(o.AUTOMATIONS$EDIT_SUCCESS)),n()},onError:e=>{a(C(e,l(o.AUTOMATIONS$EDIT_ERROR)))}})},noValidate:!0,className:`mt-4 flex flex-col gap-4`,"aria-label":M,children:[N.present&&(0,O.jsx)(b,{testId:`edit-automation-name`,name:`name`,type:`text`,label:N.label,value:K.name,onChange:e=>q(t=>({...t,name:e})),error:J??void 0,showRequiredTag:N.required}),P.present&&(0,O.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,O.jsx)(`span`,{className:`text-sm`,children:P.label}),(0,O.jsx)(`textarea`,{"data-testid":`edit-automation-prompt`,name:`prompt`,value:K.prompt,onChange:e=>q(t=>({...t,prompt:e.target.value})),rows:4,className:s(_,`placeholder:italic`)}),P.help!==null&&(0,O.jsx)(`span`,{className:`text-xs text-muted`,children:P.help})]}),F.present&&(H||U.length>0)&&(0,O.jsx)(y,{testId:`edit-automation-model`,name:`model`,label:F.label,items:W,selectedKey:K.model||k,isLoading:H,placeholder:l(o.COMMON$ACTIVE_PROFILE),onSelectionChange:e=>q(t=>({...t,model:e&&e!==k?String(e):``}))}),I.present&&(0,O.jsxs)(`div`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,O.jsx)(b,{testId:`edit-automation-timeout`,name:`timeout`,type:`number`,label:I.label,value:K.timeout,onChange:e=>q(t=>({...t,timeout:e})),error:X??void 0,showOptionalTag:!0,min:I.min??1,max:B,step:1,placeholder:`600`}),I.help!==null&&(0,O.jsx)(`span`,{"data-testid":`edit-automation-timeout-hint`,className:`text-xs text-muted`,children:I.help})]}),e.trigger.type===`event`?(0,O.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg bg-[var(--oh-surface-raised)] p-3`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:l(o.AUTOMATIONS$DETAIL$TRIGGER)}),(0,O.jsx)(`span`,{className:`text-sm text-content`,children:l(o.AUTOMATIONS$DETAIL$TRIGGER_EVENT)})]}),e.trigger.source&&(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:l(o.AUTOMATIONS$DETAIL$EVENT_SOURCE)}),(0,O.jsx)(`span`,{className:`text-sm text-content`,children:e.trigger.source})]}),e.trigger.on&&(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:l(o.AUTOMATIONS$DETAIL$EVENT_TYPE)}),(0,O.jsx)(`code`,{className:`text-xs font-mono text-content`,children:d(e.trigger.on)})]}),e.trigger.filter&&(0,O.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,O.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:l(o.AUTOMATIONS$DETAIL$EVENT_FILTER)}),(0,O.jsx)(`code`,{className:`text-xs font-mono text-content break-all`,children:e.trigger.filter})]})]}):L.present?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(y,{testId:`edit-automation-frequency`,name:`frequency`,label:L.label,items:te,selectedKey:K.frequency,isDisabled:K.isCustomSchedule,onSelectionChange:e=>{!e||K.isCustomSchedule||q(t=>({...t,frequency:e}))}}),K.frequency===`weekly`&&!K.isCustomSchedule&&(0,O.jsx)(y,{testId:`edit-automation-weekday`,name:`weekday`,label:l(o.AUTOMATIONS$WEEKDAY),items:ne,selectedKey:String(K.weekday),onSelectionChange:e=>{e!==null&&q(t=>({...t,weekday:Number(e)}))}}),(0,O.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,O.jsx)(`span`,{className:`text-sm`,children:l(o.AUTOMATIONS$TIME_OF_DAY)}),(0,O.jsx)(`input`,{"data-testid":`edit-automation-time`,name:`timeOfDay`,type:`time`,value:K.timeOfDay,onChange:e=>q(t=>({...t,timeOfDay:e.target.value})),disabled:K.isCustomSchedule,className:s(ee,`disabled:bg-[var(--oh-surface-raised)]`)}),e.timezone&&(0,O.jsxs)(`span`,{className:`text-xs text-muted`,children:[l(o.AUTOMATIONS$TIMEZONE),`: `,e.timezone]})]}),K.isCustomSchedule&&(0,O.jsx)(b,{testId:`edit-automation-cron`,name:`cron`,type:`text`,label:l(o.AUTOMATIONS$CRON_EXPRESSION),value:K.rawSchedule,onChange:e=>q(t=>({...t,rawSchedule:e})),error:Q??void 0,placeholder:`*/10 * * * *`})]}):null,(0,O.jsxs)(`div`,{className:`mt-2 flex justify-end gap-3`,children:[(0,O.jsx)(v,{testId:`edit-automation-cancel`,type:`button`,variant:`secondary`,onClick:n,isDisabled:u.isPending,children:l(o.AUTOMATIONS$CANCEL)}),(0,O.jsx)(v,{testId:`edit-automation-save`,type:`submit`,variant:`primary`,isDisabled:u.isPending,"aria-busy":u.isPending,children:u.isPending?l(o.AUTOMATIONS$SAVING):l(o.AUTOMATIONS$SAVE)})]})]})]})]})}export{M as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,i as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{i as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";import{n as o,t as s}from"./recommended-automations-launcher-YLAQTp4s.js";import{t as c}from"./vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-DkPlXWl9.js";import{n as l}from"./active-backend-context-rZiLJRUc.js";import{K as u,t as d}from"./utils-BOco8mxR.js";import{b as f,i as p,n as m,o as h,r as g,s as _,u as v}from"./kebab-menu-item-content-mm04SBD3.js";import{C as y,D as ee,E as b,F as x,S,a as C,b as w,d as te,i as ne,n as T,o as E,p as D,r as O,s as k,t as A,v as j,w as M,x as N,y as P}from"./home-automation-run-tooltip-CpHNFiFl.js";import{r as F}from"./context-menu-list-item-DDROe12Z.js";import{E as I,U as re,t as L}from"./use-tracking-B9prBsrq.js";import{t as R}from"./modal-backdrop-BSzNhM4r.js";import{n as z}from"./modal-classes-Dg0ngBPO.js";import{t as B}from"./brand-button-DxPO4Lf8.js";import{n as V}from"./navigation-context-CQZwH_tC.js";import{t as H}from"./navigation-link-Bxo3-4vo.js";import{t as U}from"./styled-tooltip-Pd22BIvr.js";import{t as W}from"./modal-close-button-B9j4nasm.js";import{t as G}from"./u-edit-DAkcF52u.js";import{n as K}from"./use-automation-health-BZkQNEA8.js";import{a as q,i as ie,n as J,o as Y,r as X,t as Z}from"./extension-module-card-classes-DpeaYhYo.js";import{n as ae}from"./skill-card-pill-row-989y15jV.js";import{n as oe,t as se}from"./use-automation-permissions-B_RpvL-s.js";import{n as ce,r as le,t as ue}from"./trash-B6OIe4yX.js";import{n as de,t as fe}from"./use-launch-skill-in-chat-DeYa1tFM.js";var pe=a(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),Q=r();function me(){return(0,Q.jsxs)(`div`,{"data-testid":`automation-card-skeleton`,className:`${q} border border-transparent p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,Q.jsx)(`div`,{className:`h-5 w-40 animate-pulse rounded bg-surface-raised`}),(0,Q.jsx)(`div`,{className:`size-8 animate-pulse rounded-md bg-surface-raised`})]}),(0,Q.jsx)(`div`,{className:`mt-2 h-4 w-72 animate-pulse rounded bg-surface-raised`}),(0,Q.jsxs)(`div`,{className:`mt-3 flex gap-2`,children:[(0,Q.jsx)(`div`,{className:`h-5 w-20 animate-pulse rounded-full bg-surface-raised`}),(0,Q.jsx)(`div`,{className:`h-5 w-24 animate-pulse rounded bg-surface-raised`})]}),(0,Q.jsxs)(`div`,{className:`mt-3 flex gap-2`,children:[(0,Q.jsx)(`div`,{className:`h-7 w-32 animate-pulse rounded-full bg-surface-raised`}),(0,Q.jsx)(`div`,{className:`h-7 w-28 animate-pulse rounded-full bg-surface-raised`}),(0,Q.jsx)(`div`,{className:`h-7 w-24 animate-pulse rounded-full bg-surface-raised`})]}),(0,Q.jsx)(`div`,{className:`mt-3 h-9 animate-pulse rounded-md bg-surface-raised`})]})}var he=e(t(),1);function ge({automation:e,t,canManage:n,onRunNow:r,isRunPending:i,onView:a,onExport:o,onEdit:s,onToggle:c,onDelete:l}){return[...n?[{label:t(u.AUTOMATIONS$RUN_NOW),icon:(0,Q.jsx)(g,{className:`size-4`}),onClick:()=>r(e.id),disabled:i||!e.enabled}]:[],{label:t(u.COMMON$VIEW),icon:(0,Q.jsx)(x,{className:`size-4`,"aria-hidden":!0}),onClick:a},{label:t(u.AUTOMATIONS$EXPORT),icon:(0,Q.jsx)(pe,{className:`size-4`,"aria-hidden":!0}),onClick:()=>o(e)},...n&&s?[{label:t(u.AUTOMATIONS$EDIT),icon:(0,Q.jsx)(G,{className:`size-4`}),onClick:()=>s(e.id)}]:[],...n?[{label:e.enabled?t(u.AUTOMATIONS$TURN_OFF):t(u.AUTOMATIONS$TURN_ON),icon:(0,Q.jsx)(m,{className:`size-4`}),onClick:()=>c(e.id,e.enabled)},{label:t(u.AUTOMATIONS$DELETE),icon:(0,Q.jsx)(ue,{className:`size-4`}),onClick:()=>l(e.id)}]:[]]}function _e({automation:e,onToggle:t,onRunNow:r,isRunPending:a=!1,onDelete:o,onExport:s,onEdit:c,insights:l}){let{navigate:m}=V(),{t:y,i18n:x}=i(`openhands`),{canManage:S}=se(),C=oe(e),w=S||C,T=e.trigger.schedule_human||e.trigger.type,E=(0,he.useMemo)(()=>j(e,T),[e,T]),O=()=>{m?.(`/automations/${e.id}`)},A=ge({automation:e,t:y,canManage:w,onRunNow:r,isRunPending:a,onView:O,onExport:s,onEdit:c,onToggle:t,onDelete:o}),M=te(l?.state),P=re(e,l?.state?.summary?.completedTotal??null),{latestRun:F,recentRuns:I,isLoading:L,isError:R}=M,z=F?N(F):null,B=F?f(F):null,H=B?.summary??null,W=H?b(H):null,G=H!=null&&W!=null&&ee(H,W),K=_(F?.status);return(0,Q.jsxs)(`div`,{role:`link`,tabIndex:0,"data-testid":`automation-card-${e.id}`,onClick:O,onKeyDown:e=>{e.key===`Enter`&&O()},className:d(`group relative flex min-w-0 flex-col overflow-hidden p-4 text-left`,q,X),children:[(0,Q.jsxs)(`header`,{className:`flex flex-col gap-1.5`,children:[(0,Q.jsxs)(`div`,{className:`flex h-8 items-center justify-between gap-3`,children:[(0,Q.jsx)(`h3`,{className:`min-w-0 flex-1 truncate text-sm font-semibold leading-none text-[var(--oh-foreground)]`,children:e.name}),(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5`,children:[w?(0,Q.jsx)(U,{content:y(u.AUTOMATIONS$RUN_NOW),placement:`top`,children:(0,Q.jsx)(`button`,{type:`button`,"data-testid":`automation-run-now-${e.id}`,"aria-label":y(u.AUTOMATIONS$RUN_NOW),"aria-busy":a,disabled:a||!e.enabled,onClick:t=>{t.stopPropagation(),r(e.id)},className:le,children:(0,Q.jsx)(g,{className:`size-4 shrink-0`,"aria-hidden":!0})})}):null,(0,Q.jsx)(ce,{items:A,triggerClassName:`opacity-70 group-hover:opacity-100`})]})]}),e.prompt?(0,Q.jsx)(`p`,{className:`line-clamp-2 text-xs leading-relaxed text-[var(--oh-text-secondary)]`,children:e.prompt}):null]}),E.length>0||I.length>0?(0,Q.jsxs)(`div`,{className:d(`mt-3 flex items-center gap-3`,E.length>0?`justify-between`:`justify-end`),children:[E.length>0?(0,Q.jsx)(`div`,{className:`min-w-0 flex-1 overflow-hidden`,children:(0,Q.jsx)(ae,{pills:E,testId:`automation-pills-${e.id}`})}):null,I.length>0?(0,Q.jsx)(ne,{automationId:e.id,runs:I,testId:`automation-activity-${e.id}`}):null]}):null,l?(0,Q.jsxs)(`div`,{className:k,children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 overflow-hidden`,children:[L?(0,Q.jsx)(`div`,{className:`h-3.5 w-3/4 animate-pulse rounded bg-surface-raised motion-reduce:animate-none`,"aria-hidden":`true`}):null,!L&&R?(0,Q.jsx)(`p`,{className:`truncate text-[var(--oh-text-secondary)]`,children:y(u.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE)}):null,!L&&!R&&!F?(0,Q.jsx)(`p`,{className:`truncate text-[var(--oh-text-secondary)]`,children:y(u.AUTOMATIONS$DETAIL$NO_RUNS)}):null,F?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(p,{status:B?.badgeStatus??F.status,iconOnly:!0,showLabel:!0}),K?(0,Q.jsx)(h,{status:F.status,code:F.phase_code,label:F.phase_label,updatedAt:F.phase_updated_at}):null,W?G&&H?(0,Q.jsx)(n,{content:(0,Q.jsx)(`p`,{className:`max-w-xs whitespace-pre-wrap break-words p-2 text-xs`,children:H}),placement:`top`,closeDelay:100,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,children:(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 cursor-default truncate text-[var(--oh-text-secondary)]`,children:W})}):(0,Q.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-[var(--oh-text-secondary)]`,children:W}):null]}):null]}),z?(0,Q.jsx)(`span`,{"data-testid":`automation-last-run-${e.id}`,className:`shrink-0 text-[var(--oh-text-secondary)]`,children:v(z,x.language,y)}):null]}):null,P?(0,Q.jsx)(`p`,{"data-testid":`automation-impact-${e.id}`,className:`mt-3 truncate text-xs text-[var(--oh-text-secondary)]`,children:P}):null,l?(0,Q.jsx)(`div`,{className:`mt-3`,children:(0,Q.jsx)(D,{state:l.state,copy:l.spec.stats})}):null]})}function ve({automation:e,onToggle:t,onRunNow:r,isRunPending:a=!1,onDelete:o,onExport:s,onEdit:c,insights:l}){let{navigate:m}=V(),{t:h,i18n:_}=i(`openhands`),{canManage:ee}=se(),b=oe(e),x=ee||b,C=ge({automation:e,t:h,canManage:x,onRunNow:r,isRunPending:a,onView:()=>{m?.(`/automations/${e.id}`)},onExport:s,onEdit:c,onToggle:t,onDelete:o}),D=e.trigger.type===`event`?F:K,k=S(e),j=y(e),I=M(e),L=!!(k||j||I),R=te(l?.state),z=P(R),B=re(e,l?.state?.summary?.completedTotal??null),W=R.latestRun,G=W?f(W):null,q=W?N(W):e.last_triggered_at,J=q?v(q,_.language,h):null,Y=L||!!J||!!W?.status,X=`/automations/${encodeURIComponent(e.id)}`,Z=T(R);return(0,Q.jsxs)(`li`,{"data-testid":`automation-list-row-${e.id}`,className:E,children:[(0,Q.jsx)(n,{content:(0,Q.jsx)(A,{automation:e,runState:R}),placement:`top-start`,closeDelay:100,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,children:(0,Q.jsx)(H,{to:X,"aria-label":`${e.name} ${h(Z)}`,className:`flex min-w-0 flex-1 items-center justify-between gap-3 px-3 py-2.5 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--oh-focus)]`,children:(0,Q.jsxs)(`div`,{className:`grid min-w-0 flex-1 grid-cols-[auto_minmax(0,1fr)] gap-x-2`,children:[(0,Q.jsx)(`span`,{"data-testid":`automation-health-${e.id}`,className:`inline-flex h-5 w-2.5 shrink-0 items-center justify-center`,children:(0,Q.jsx)(O,{health:z})}),(0,Q.jsx)(`span`,{className:`truncate text-sm font-medium leading-5 text-[var(--oh-foreground)]`,children:e.name}),Y?(0,Q.jsxs)(`span`,{className:`col-start-2 mt-0.5 flex min-w-0 items-center gap-1.5 text-xs leading-4 text-[var(--oh-text-secondary)]`,children:[(0,Q.jsx)(D,{className:`size-3 shrink-0`,"aria-hidden":`true`}),k?(0,Q.jsx)(`span`,{className:`truncate`,children:k}):null,j?(0,Q.jsx)(`span`,{className:`truncate`,children:j}):null,I?(0,Q.jsx)(`span`,{className:d(ie,`shrink-0 px-1.5 py-0 text-[var(--oh-text-secondary)]`),children:w(I)}):null,J?(0,Q.jsxs)(Q.Fragment,{children:[L?(0,Q.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:`·`}):null,(0,Q.jsx)(`span`,{"data-testid":`automation-last-run-${e.id}`,className:`truncate`,children:J})]}):null,W?(0,Q.jsxs)(Q.Fragment,{children:[L||J?(0,Q.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:`·`}):null,(0,Q.jsx)(p,{status:G?.badgeStatus??W.status,compact:!0})]}):null,B?(0,Q.jsxs)(Q.Fragment,{children:[L||J||W?(0,Q.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:`·`}):null,(0,Q.jsx)(`span`,{"data-testid":`automation-impact-${e.id}`,className:`truncate`,children:B})]}):null]}):null,(0,Q.jsx)(`span`,{className:`sr-only`,children:h(Z)})]})})}),(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5 pr-1.5`,children:[l?(0,Q.jsx)(ne,{automationId:e.id,runs:R.recentRuns,testId:`automation-activity-${e.id}`}):null,x?(0,Q.jsx)(U,{content:h(u.AUTOMATIONS$RUN_NOW),placement:`top`,children:(0,Q.jsx)(`button`,{type:`button`,"data-testid":`automation-run-now-${e.id}`,"aria-label":h(u.AUTOMATIONS$RUN_NOW),"aria-busy":a,disabled:a||!e.enabled,onClick:t=>{t.stopPropagation(),r(e.id)},className:le,children:(0,Q.jsx)(g,{className:`size-4 shrink-0`,"aria-hidden":!0})})}):null,(0,Q.jsx)(ce,{items:C,triggerClassName:`opacity-70 group-hover:opacity-100`})]})]})}function ye({title:e,count:t,automations:n,view:r,onToggle:i,onRunNow:a,runPendingId:s=null,onDelete:c,onExport:l,onEdit:u,insights:f}){return n.length===0?null:(0,Q.jsxs)(`section`,{children:[(0,Q.jsxs)(`div`,{className:`flex items-center`,children:[(0,Q.jsx)(`h2`,{className:`text-base font-semibold text-foreground`,children:e}),(0,Q.jsx)(o,{count:t})]}),r===`grid`?(0,Q.jsx)(`div`,{className:d(`mt-3`,J),children:(0,Q.jsx)(`div`,{className:Z,children:n.map(e=>(0,Q.jsx)(_e,{automation:e,onToggle:i,onRunNow:a,isRunPending:s===e.id,onDelete:c,onExport:l,onEdit:u,insights:f&&{spec:f.spec,state:f.byId.get(e.id)}},e.id))})}):(0,Q.jsx)(`ul`,{className:d(C,`mt-3`),children:n.map(e=>(0,Q.jsx)(ve,{automation:e,onToggle:i,onRunNow:a,isRunPending:s===e.id,onDelete:c,onExport:l,onEdit:u,insights:f&&{spec:f.spec,state:f.byId.get(e.id)}},e.id))})]})}var be=e=>(0,Q.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,Q.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m19.5 8.25-7.5 7.5-7.5-7.5`})});function xe({children:e}){return(0,Q.jsx)(`span`,{className:`whitespace-nowrap`,children:e})}function Se({children:e}){return(0,Q.jsx)(`code`,{"data-testid":`automations-create-instructions-example`,className:d(`mx-0.5 inline-block rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] px-1.5 py-0.5 align-baseline font-mono text-[11px] text-white`),children:e})}function Ce({children:e}){return(0,Q.jsx)(Q.Fragment,{children:e})}var we={example:(0,Q.jsx)(xe,{}),cmd:(0,Q.jsx)(Se,{}),punct:(0,Q.jsx)(Ce,{})};function $({onLaunch:e}={}){let{t}=i(`openhands`),n=fe(),r=l(),{trackAutomationCreatedButton:a}=L();return(0,Q.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,Q.jsxs)(`p`,{className:`text-sm leading-relaxed text-tertiary-light`,children:[(0,Q.jsx)(c,{ns:`openhands`,i18nKey:u.AUTOMATIONS$EMPTY_OPTION_CONVERSATION_DESC,components:we}),` `,t(u.AUTOMATIONS$CREATE_INSTRUCTIONS_GUIDANCE),` `,(0,Q.jsx)(`a`,{href:I(),target:`_blank`,rel:`noopener noreferrer`,className:`text-muted underline transition-colors hover:text-foreground`,children:t(u.AUTOMATIONS$EMPTY_LEARN_MORE)})]}),(0,Q.jsx)(`div`,{className:`flex justify-center`,children:(0,Q.jsx)(B,{type:`button`,variant:`primary`,testId:`automations-create-automation`,onClick:()=>{a({backendKind:r.backend.kind}),n(t(u.AUTOMATIONS$CREATE_AUTOMATION_PROMPT),e)},startContent:(0,Q.jsx)(de,{className:`size-4`,"aria-hidden":!0}),children:t(u.AUTOMATIONS$CREATE_AUTOMATION_BUTTON)})})]})}function Te({collapsible:e=!1}){let{t}=i(`openhands`),[n,r]=(0,he.useState)(!e);return e?(0,Q.jsxs)(`div`,{className:`w-full rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface)]`,children:[(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>r(!n),"aria-expanded":n,className:`flex w-full items-center justify-between rounded-lg p-4 text-left transition-colors hover:bg-surface-raised`,children:[(0,Q.jsx)(`span`,{className:`text-sm font-normal text-content`,children:t(u.AUTOMATIONS$EMPTY_HOW_TO_CREATE_TITLE)}),(0,Q.jsx)(be,{className:d(`size-5 text-muted transition-transform`,n&&`rotate-180`)})]}),n?(0,Q.jsx)(`div`,{className:`px-4 pb-4`,children:(0,Q.jsx)($,{})}):null]}):(0,Q.jsx)(`div`,{className:`w-full max-w-2xl`,children:(0,Q.jsx)($,{})})}function Ee({isOpen:e,onClose:t}){let{t:n}=i(`openhands`);return e?(0,Q.jsx)(R,{onClose:t,"aria-label":n(u.AUTOMATIONS$EMPTY_HOW_TO_CREATE_TITLE),children:(0,Q.jsxs)(`div`,{"data-testid":`add-automation-modal`,className:`relative flex w-full max-w-lg flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,Q.jsx)(W,{onClose:t,testId:`add-automation-modal-close`}),(0,Q.jsx)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:(0,Q.jsx)(`h2`,{id:`add-automation-modal-title`,className:d(`pr-6`,z),children:n(u.AUTOMATIONS$EMPTY_HOW_TO_CREATE_TITLE)})}),(0,Q.jsx)(`div`,{className:`px-6 pb-6`,children:(0,Q.jsx)($,{onLaunch:t})})]})}):null}function De(){let{t:e}=i(`openhands`);return(0,Q.jsxs)(`div`,{"data-testid":`automations-empty`,className:Y,children:[(0,Q.jsx)(`p`,{className:`text-sm text-white`,children:e(u.AUTOMATIONS$EMPTY)}),(0,Q.jsx)(`div`,{className:`mt-4 flex justify-center`,children:(0,Q.jsx)(Te,{})}),(0,Q.jsx)(`div`,{className:`mt-8 w-full text-left`,children:(0,Q.jsx)(s,{className:`pb-0`,variant:`rail`})})]})}export{me as i,Ee as n,ye as r,De as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{K as i,t as a}from"./utils-BOco8mxR.js";import{t as o}from"./check-fDEfgSzj.js";import{t as s}from"./chevron-down-CFrWHqu8.js";import{i as c,o as l,t as u}from"./dropdown-classes-B9kJVDIk.js";import{t as d}from"./use-click-outside-element-W6Os4Nlb.js";var f=e(t(),1),p=n();function m({testId:e,value:t,onChange:n,options:m,labelKeyByValue:h,labelByValue:g,ariaLabel:_,className:v,triggerClassName:y,fullWidth:b=!1,emphasizeNonDefault:x=!0}){let{t:S}=r(`openhands`),[C,w]=f.useState(!1),T=d(()=>w(!1)),E=e=>g?.[e]??(h?S(h[e]):e),D=_??S(i.CONVERSATION_PANEL$FILTER_LABEL),O=m[0],k=E(t);return(0,p.jsxs)(`div`,{ref:T,className:a(`relative shrink-0`,b?`w-full`:`w-auto`,v),"data-testid":e,children:[(0,p.jsxs)(`button`,{type:`button`,"data-testid":`dropdown-trigger`,"aria-haspopup":`menu`,"aria-expanded":C,"aria-label":D,onClick:()=>w(e=>!e),className:a(u,b&&`w-full justify-between`,x&&O&&t!==O&&`border-white/60 bg-white/10`,y),children:[(0,p.jsx)(`span`,{className:`whitespace-nowrap`,children:k}),(0,p.jsx)(s,{className:a(`h-4 w-4 shrink-0 text-tertiary-alt transition-transform`,C&&`rotate-180`),"aria-hidden":!0})]}),C?(0,p.jsx)(`div`,{role:`menu`,"data-testid":`${e}-menu`,"aria-label":D,className:a(`absolute right-0 top-full z-50 mt-1 min-w-full w-max`,`max-h-60 overflow-auto rounded-[6px] bg-tertiary p-1 context-menu-box-shadow`,c),children:m.map(r=>{let i=r===t;return(0,p.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":i,"data-testid":`${e}-${r}`,onClick:()=>{n(r),w(!1)},className:a(l,i&&`bg-[var(--oh-interactive-selected)]`),children:[(0,p.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:E(r)}),i?(0,p.jsx)(o,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0}):null]},r)})}):null]})}export{m as t};
|
|
@@ -1 +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-Ck5D_A2Q.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{K as a}from"./utils-BOco8mxR.js";import{a as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./environment-switch-store-DVQZLFbj.js";var p=e(t(),1),m=e(n(),1),h=r();function g({className:e}){return(0,h.jsxs)(`svg`,{viewBox:`0 0 74.17 22`,xmlns:`http://www.w3.org/2000/svg`,className:e,"aria-hidden":!0,children:[(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`rect`,{x:`1`,y:`1`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`rect`,{x:`1`,y:`13`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`line`,{x1:`5`,y1:`5`,x2:`5.01`,y2:`5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,h.jsx)(`line`,{x1:`5`,y1:`17`,x2:`5.01`,y2:`17`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}),(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`rect`,{x:`53.17`,y:`1`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`rect`,{x:`53.17`,y:`13`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`line`,{x1:`57.17`,y1:`5`,x2:`57.18`,y2:`5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,h.jsx)(`line`,{x1:`57.17`,y1:`17`,x2:`57.18`,y2:`17`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}),(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`path`,{d:`M43.09,7l4,4-4,4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,h.jsx)(`path`,{d:`M27.09,11h20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,h.jsx)(`path`,{d:`M31.09,7l-4,4,4,4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})]})}function _(){let{t:e}=i(`openhands`),{visible:t,target:n}=p.useSyncExternalStore(l,o,o);return!t||typeof document>`u`?null:(0,m.createPortal)((0,h.jsx)(`div`,{"data-testid":`environment-switch-overlay`,"data-target":n,className:`environment-switch-overlay pointer-events-none fixed inset-0 z-[2147483646] flex items-center justify-center`,"aria-live":`polite`,"aria-atomic":`true`,children:(0,h.jsxs)(`div`,{className:`pointer-events-none flex min-w-[280px] max-w-[420px] flex-col items-center gap-2 rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] px-5 py-4 text-[var(--oh-foreground)] shadow-2xl`,children:[(0,h.jsx)(g,{className:`mb-2 h-6 w-20 shrink-0 text-[var(--oh-foreground)]`}),(0,h.jsx)(`p`,{className:`text-center text-sm font-medium`,children:e(a.BACKEND$SWITCHING_TO,{environment:n})})]})}),document.body)}export{f as ENVIRONMENT_SWITCH_DURATION_MS,c as ENVIRONMENT_SWITCH_SETACTIVE_DELAY_MS,_ as EnvironmentSwitchOverlay,_ as default,u as __resetEnvironmentSwitchOverlayForTests,s as dismissEnvironmentSwitch,d as triggerEnvironmentSwitch};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{K as r}from"./utils-BOco8mxR.js";import{t as i}from"./brand-button-DxPO4Lf8.js";e();var a=t(),o=e=>(0,a.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:1.5,...e,children:(0,a.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z`})});function s({onRetry:e}){let{t}=n(`openhands`);return(0,a.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20 px-4`,children:[(0,a.jsx)(o,{className:`size-12 text-[var(--oh-warning)]`}),(0,a.jsx)(`h2`,{className:`mt-4 text-lg font-medium text-content`,children:t(r.AUTOMATIONS$BACKEND_UNAVAILABLE_TITLE)}),(0,a.jsx)(`p`,{className:`mt-2 text-sm text-muted text-center max-w-md`,children:t(r.AUTOMATIONS$BACKEND_UNAVAILABLE_MESSAGE)}),(0,a.jsx)(i,{type:`button`,variant:`secondary`,className:`mt-6`,onClick:e,children:t(r.AUTOMATIONS$BACKEND_UNAVAILABLE_RETRY)})]})}function c({onRetry:e}){let{t}=n(`openhands`);return(0,a.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20`,children:[(0,a.jsx)(o,{className:`size-12 text-danger`}),(0,a.jsx)(`p`,{className:`mt-4 text-sm text-muted`,children:t(r.AUTOMATIONS$ERROR_TITLE)}),(0,a.jsx)(`button`,{type:`button`,onClick:e,className:`mt-4 rounded-lg border border-[var(--oh-border)] px-4 py-2 text-sm text-white hover:bg-surface-raised`,children:t(r.AUTOMATIONS$ERROR_RETRY)})]})}export{s as n,o as r,c as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{U as t,f as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{r as i}from"./active-backend-context-rZiLJRUc.js";import{K as a,t as o}from"./utils-BOco8mxR.js";import{p as s}from"./agent-server-client-options-BikiNwTa.js";import{t as c}from"./extensions-navigation-CRMZd-FE.js";import{t as l}from"./external-link-DQtv7eTh.js";import{a as u,f as d,o as f,u as p}from"./sidebar-layout-EPfWxk11.js";import{t as m}from"./sidebar-nav-link-_t4_Ef-9.js";import{r as h}from"./typography-HLLg_FAn.js";import{t as g}from"./use-breakpoint-DWtihr9g.js";import{t as _}from"./backend-synced-settings-badge-B7rKWBir.js";var v=e(),y=`/skills`,b=new Set([`/plugins`,`/apps`]);function x(){let{t:e}=r(`openhands`),{active:t}=i(),{backend:n}=t,g=!s(n)&&n.kind===`cloud`;return(0,v.jsxs)(`div`,{"data-testid":`extensions-mobile-hub`,className:`flex flex-col gap-4 px-4 py-2 md:hidden`,children:[(0,v.jsx)(h.H2,{children:e(a.NAV$CUSTOMIZE)}),(0,v.jsx)(`nav`,{className:`flex flex-col gap-0.5`,children:c.filter(e=>!(b.has(e.to)&&g)).map(t=>{if(t.to===y&&g){let r=`${n.host.replace(/\/+$/,``)}/settings/skills`;return(0,v.jsxs)(`a`,{"data-testid":`sidebar-extensions-${t.to}`,href:r,target:`_blank`,rel:`noopener noreferrer`,className:o(d({collapsed:!1}),f.idle),children:[(0,v.jsx)(`span`,{className:u,children:t.icon}),(0,v.jsx)(`span`,{className:o(p(!1),`flex-1`),children:e(a.SIDEBAR$SKILLS_AND_PLUGINS_CLOUD_LINK)}),(0,v.jsx)(l,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]},t.to)}return(0,v.jsx)(m,{to:t.to,label:t.label,end:t.end,testId:`sidebar-extensions-${t.to}`,icon:t.icon,disabled:t.comingSoon},t.to)})}),(0,v.jsx)(`div`,{className:`pt-1`,children:(0,v.jsx)(_,{})})]})}var S=t(function(){return g(768)?(0,v.jsx)(x,{}):(0,v.jsx)(n,{to:`/mcp`,replace:!0})});export{S as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{i as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";import{r}from"./active-backend-context-rZiLJRUc.js";import{K as i,t as a}from"./utils-BOco8mxR.js";import{p as o}from"./agent-server-client-options-BikiNwTa.js";import{t as s}from"./external-link-DQtv7eTh.js";import{t as c}from"./navigation-link-Bxo3-4vo.js";import{f as l,o as u}from"./sidebar-layout-EPfWxk11.js";import{t as d}from"./skills-B0IliMxw.js";import{t as f}from"./server-process-C9RKzd1x.js";import{t as p}from"./backend-synced-settings-badge-B7rKWBir.js";var m=n(`blocks`,[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]),h=e(),g=`/skills`,_=new Set([`/plugins`,`/apps`]),v=[{to:`/mcp`,label:`MCP Servers`,icon:(0,h.jsx)(f,{width:16,height:16}),end:!0},{to:`/skills`,label:`Skills`,icon:(0,h.jsx)(d,{width:16,height:16,"aria-hidden":`true`}),end:!0},{to:`/plugins`,label:`Plugins`,icon:(0,h.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,width:16,height:16,"aria-hidden":`true`,children:[(0,h.jsx)(`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`}),(0,h.jsx)(`path`,{d:`m3.3 7 8.7 5 8.7-5`}),(0,h.jsx)(`path`,{d:`M12 22V12`})]}),end:!0},{to:`/apps`,label:`Apps`,icon:(0,h.jsx)(m,{width:16,height:16,"aria-hidden":`true`}),end:!0}];function y(){let{t:e}=t(`openhands`),{active:n}=r(),{backend:d}=n,f=!o(d)&&d.kind===`cloud`;return(0,h.jsxs)(`aside`,{"data-testid":`extensions-navbar-desktop`,className:`hidden md:flex md:w-[260px] md:shrink-0 md:flex-col md:gap-2 md:sticky md:top-8 md:self-start`,children:[(0,h.jsx)(`span`,{className:`px-2 text-sm font-normal text-white`,children:e(i.NAV$CUSTOMIZE)}),(0,h.jsx)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:v.filter(e=>!(_.has(e.to)&&f)).map(t=>{let n=t.to===g&&f,r=(0,h.jsx)(`span`,{className:`shrink-0 flex items-center justify-center`,children:t.icon}),o=(0,h.jsx)(`span`,{className:`truncate`,children:n?e(i.SIDEBAR$SKILLS_AND_PLUGINS_CLOUD_LINK):t.label}),p=t.comingSoon&&(0,h.jsx)(`span`,{className:`ml-auto shrink-0 rounded-full border border-white/20 bg-white/5 px-1.5 py-0.5 text-[10px] font-medium text-[var(--oh-text-dim)]`,children:e(i.NAV$COMING_SOON)});if(n){let e=`${d.host.replace(/\/+$/,``)}/settings/skills`;return(0,h.jsxs)(`a`,{"data-testid":`sidebar-extensions-${t.to}`,href:e,target:`_blank`,rel:`noopener noreferrer`,className:a(l(),`truncate`,u.idle),children:[r,o,(0,h.jsx)(s,{className:`ml-auto size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]},t.to)}return(0,h.jsxs)(c,{to:t.to,end:t.end,"data-testid":`sidebar-extensions-${t.to}`,className:({isActive:e})=>a(l(),`truncate`,e?u.active:u.idle),children:[r,o,p]},t.to)})}),(0,h.jsx)(`div`,{className:`px-2 pt-3`,children:(0,h.jsx)(p,{})})]})}export{y as n,v as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-DnDoaYNi.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{i as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";import{t as o}from"./useQuery-S6j94er1.js";import{K as s,t as c}from"./utils-BOco8mxR.js";import{c as l,n as u}from"./agent-server-client-options-BikiNwTa.js";import{C as d,r as f}from"./messages-DUSeANAh.js";import{i as p}from"./cloud-funnel-analytics-BQanUEEC.js";import{t as m}from"./mouse-pointer-click-DEhsSUpu.js";import{i as h}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js";import{c as g}from"./use-llm-configured-DGm8FiRR.js";import{c as ee,i as _}from"./conversation-store-DVVfkCsk.js";import{w as v}from"./agent-server-conversation-service.api-DYFsNHKf.js";import{t as y}from"./copy-to-clipboard-button-B3w0X7WH.js";import{rt as b,t as x,tt as S,x as C}from"./markdown-renderer-rivLvYh-.js";import{t as w}from"./link-external-BNZzCM1I.js";import{c as T,l as E,n as D,r as O,u as k}from"./conversation-BnjJSFf5.js";import{n as A,t as j}from"./get-git-path-EHrSDxTM.js";import{n as te,t as M}from"./highlighted-source-view-DjHO3SdW.js";import{t as N}from"./conversation-tab-empty-state-DKlzAz5c.js";var P=a(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),F=e(t(),1),I=n();function L(){let{t:e}=i(`openhands`);return(0,I.jsx)(N,{className:`h-full`,icon:(0,I.jsx)(m,{"aria-hidden":!0,strokeWidth:2,className:`size-full`}),children:e(s.FILES$NO_FILE_SELECTED)})}function R(){let{data:e}=S(),t=A(),n=e?.id,r=e?.conversation_url,i=e?.session_api_key,a=l().backend.kind===`local`,s=o({queryKey:[`workspace-session`,n,r,i],queryFn:async()=>({baseUrl:await new h(u({conversationUrl:r,sessionApiKey:i})).startWorkspaceSession(n)}),enabled:t&&!!n&&a,staleTime:1/0,gcTime:1/0,retry:!1});return{data:s.data??null,isLoading:s.isLoading,isError:s.isError,error:s.error??null}}function z(e,t){let n=(t??``).replace(/^\/+/,``);return n?`${e}${n.split(`/`).map(e=>encodeURIComponent(e)).join(`/`)}`:e}var B=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`bmp`,`ico`,`svg`,`avif`]),V=new Set([`pdf`]);function H(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function U(e){switch(H(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 W(e){let t=H(e);return B.has(t)?`image`:V.has(t)?`pdf`:`text`}function G(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 K(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 q(e){let{data:t}=S(),n=A(),{data:r}=R(),i=E(e=>e.count),a=t?.id,s=t?.conversation_url,c=t?.session_api_key,u=t?.selected_repository,d=t?.workspace?.working_dir?.trim(),f=r?.baseUrl,p=l().backend.kind===`cloud`,m=j(u,d),h=m.startsWith(`/`)?m:`/${m}`,g=e?`${h}/${e}`:null;return o({queryKey:[`workspace-file-content`,a,s,c,p?`cloud`:f,e,g,i],queryFn:async()=>{if(!e)throw Error(`No path`);let t=W(e),n=U(e);if(p){let r=await v(a,g);if(t===`text`){let t=new TextEncoder().encode(r);return G(t.buffer)?{path:e,kind:`binary`,text:null,staticUrl:`data:application/octet-stream;base64,${K(t.buffer)}`,mimeType:`application/octet-stream`}:{path:e,kind:`text`,text:r,staticUrl:`data:${n};charset=utf-8;base64,${K(t.buffer)}`,mimeType:n}}return{path:e,kind:t,text:null,staticUrl:`data:${n};base64,${K(new TextEncoder().encode(r).buffer)}`,mimeType:n}}if(!f)throw Error(`No workspace session`);let r=z(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 G(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}})}var J=`[scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden`;function Y({openPaths:e,selectedPath:t,onSelectFile:n,onCloseFile:r,isTreeVisible:a,onToggleTree:o,actions:l}){let{t:u}=i(`openhands`);return(0,I.jsxs)(`div`,{className:`flex h-[34px] shrink-0 items-stretch gap-1.5 overflow-y-hidden border-b border-[var(--oh-border)] px-2`,"data-testid":`file-quick-row`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:o,"data-testid":`file-quick-row-tree-toggle`,"aria-pressed":a,"aria-label":u(a?s.FILES$HIDE_FILE_TREE:s.FILES$SHOW_FILE_TREE),title:u(a?s.FILES$HIDE_FILE_TREE:s.FILES$SHOW_FILE_TREE),className:c(`shrink-0 self-center inline-flex items-center justify-center w-6 h-6 rounded-md cursor-pointer`,`text-[var(--oh-text-tertiary)] hover:bg-tertiary`,a&&`bg-[var(--oh-surface-raised)]`),children:(0,I.jsx)(P,{className:`w-3 h-3`,"aria-hidden":!0,strokeWidth:2})}),e.length>0?(0,I.jsx)(`div`,{role:`tablist`,"aria-label":u(s.COMMON$FILES),className:c(`flex min-h-0 min-w-0 flex-1 flex-nowrap items-stretch overflow-x-auto overflow-y-hidden overscroll-y-none`,J),children:e.map((e,i)=>{let a=t===e,o=e.split(`/`).pop()||e;return(0,I.jsxs)(`div`,{className:c(`group/file-tab relative flex shrink-0 items-stretch`,`border-r border-r-[var(--oh-border)]`,i===0&&`border-l border-l-[var(--oh-border)]`,`border-b-2 -mb-px transition-colors`,a?`border-b-white text-white`:`border-b-transparent text-[var(--oh-muted)] hover:text-white hover:border-b-white/25`),children:[(0,I.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":a,onClick:()=>n(e),title:e,"data-testid":`file-quick-row-item-${e}`,className:`flex min-w-0 max-w-[160px] items-center pl-2.5 pr-1 text-xs cursor-pointer text-inherit`,children:(0,I.jsx)(`span`,{className:`truncate`,children:o})}),(0,I.jsx)(`button`,{type:`button`,"data-testid":`file-quick-row-close-${e}`,"aria-label":u(s.FILES$CLOSE_TAB,{path:e}),title:u(s.FILES$CLOSE_TAB,{path:e}),className:c(`inline-flex items-center justify-center size-5 self-center mr-1 rounded-sm shrink-0 cursor-pointer`,`text-inherit hover:bg-white/10`,`opacity-100 transition-opacity`,`md:opacity-0 md:group-hover/file-tab:opacity-100 md:group-focus-within/file-tab:opacity-100`),onClick:()=>r(e),children:(0,I.jsx)(g,{width:10,height:10,"aria-hidden":!0})})]},e)})}):(0,I.jsx)(`div`,{className:`flex-1 min-w-0`}),l?(0,I.jsx)(`div`,{className:`ml-auto shrink-0 self-center flex items-center gap-1`,children:l}):null]})}var X=new Set([`html`,`htm`,`svg`]),Z={pptx:`PowerPoint`,ppt:`PowerPoint`,docx:`Word`,doc:`Word`,xlsx:`Excel`,xls:`Excel`};function Q(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function $({path:e}){let{t}=i(`openhands`),n=Z[Q(e)];return(0,I.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(s.FILES$UNSUPPORTED_DOCUMENT,{type:n}):t(s.FILES$BINARY_FALLBACK)})}function ne({path:e,viewMode:t}){let{t:n}=i(`openhands`),r=q(e),a=E(e=>e.count);if(r.isLoading)return(0,I.jsx)(`div`,{className:`flex h-full w-full items-center justify-center text-sm text-[var(--oh-muted)]`,children:n(s.FILES$LOADING_FILES)});if(r.isError||!r.data)return(0,I.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(s.FILES$LOAD_ERROR)});let{kind:o,text:c,staticUrl:l,mimeType:u}=r.data,d=k(l,a);return t===`plain`?o===`text`&&c!==null?(0,I.jsx)(M,{path:e,text:c,mimeType:u??void 0}):(0,I.jsx)($,{path:e}):o===`image`?(0,I.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,I.jsx)(`img`,{src:d,alt:e,className:`max-h-full max-w-full object-contain`})}):o===`pdf`?(0,I.jsx)(`iframe`,{title:e,src:d,"data-testid":`file-content-viewer-iframe`,className:`h-full w-full bg-white`}):o===`binary`?(0,I.jsx)($,{path:e}):u===`text/html`||X.has(Q(e))?(0,I.jsx)(`iframe`,{title:e,src:d,sandbox:`allow-same-origin`,"data-testid":`file-content-viewer-iframe`,className:`h-full w-full bg-white`}):o===`text`&&f(e)?(0,I.jsx)(`div`,{"data-testid":`file-content-viewer-markdown`,className:`h-full w-full overflow-auto bg-[var(--oh-surface)] text-white custom-scrollbar-always [--oh-scroll-fade-from:var(--oh-surface)]`,children:(0,I.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,I.jsx)(x,{content:c??``,includeStandard:!0,includeHeadings:!0})})}):o===`text`&&c!==null?(0,I.jsx)(M,{path:e,text:c,mimeType:u??void 0}):(0,I.jsx)($,{path:e})}function re({path:e}){let{t}=i(`openhands`),[n,r]=F.useState(!1),a=e?.trim();return F.useEffect(()=>{if(!n)return;let e=window.setTimeout(()=>r(!1),2e3);return()=>window.clearTimeout(e)},[n]),a?(0,I.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 border-b border-[var(--oh-border)] px-3 py-1.5 text-xs`,"data-testid":`files-tab-workspace-path`,children:[(0,I.jsxs)(`span`,{className:`shrink-0 text-[var(--oh-muted)]`,children:[t(s.WORKSPACE$TITLE),`:`]}),(0,I.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono`,"data-testid":`files-tab-workspace-path-value`,title:a,children:a}),(0,I.jsx)(y,{isHidden:!1,isDisabled:n,onClick:async()=>{await navigator.clipboard.writeText(a),r(!0)},mode:n?`copied`:`copy`})]}):null}var ie=`files-tab-tree-width`,ae=e=>(0,I.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 13 15`,fill:`none`,...e,children:(0,I.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`})});function oe(){let{t:e}=i(`openhands`);T();let{data:t}=S(),n=t?.workspace?.working_dir,{conversationId:a}=b(),{state:o,setFilesTabContentViewMode:c,setFilesTabTreeVisible:l}=ee(a??``),u=o.filesTabContentViewMode,f=o.filesTabTreeVisible??!0,m=(0,F.useCallback)(()=>{l?.(!f)},[f,l]),h=(0,F.useRef)(null),{drawerWidth:g,isDragging:v,handleMouseDown:y}=D({containerRef:h,defaultWidth:224,minWidth:160,maxWidth:480,storageKey:ie,enabled:f,edge:`left`}),x=d(),A=(0,F.useMemo)(()=>x.data??[],[x.data]),j=C(e=>e.selectedPath),M=C(e=>e.selectedConversationId),N=C(e=>e.openPaths),P=C(e=>e.setSelectedPath),R=C(e=>e.closeOpenPath),z=C(e=>e.hydrateForConversation),B=M===a?j:null,V=M===a?N:[],H=(0,F.useCallback)(e=>P(e,a),[a,P]),U=q(B),W=E(e=>e.count),G=k(U.data?.staticUrl??null,W);(0,F.useEffect)(()=>{if(!a||M===a)return;let e=_(a);z(a,e.filesTabOpenPaths??[],e.filesTabSelectedPath??null)},[a,M,z]);let K=r(),[J,X]=(0,F.useState)(!1),Z=(0,I.jsx)(`button`,{type:`button`,onClick:async()=>{X(!0);try{await Promise.all([K.invalidateQueries({queryKey:[`workspace-files`]}),K.invalidateQueries({queryKey:[`workspace-file-content`]})])}finally{X(!1)}},disabled:J,"aria-label":e(s.FILES$REFRESH),title:e(s.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,I.jsx)(ae,{width:12.75,height:15,color:`#ffffff`,className:J?`animate-spin`:``})});return(0,I.jsxs)(`main`,{className:`h-full w-full flex flex-col items-stretch`,"data-testid":`files-tab`,children:[(0,I.jsx)(re,{path:n}),x.isLoading?(0,I.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-sm text-[var(--oh-muted)]`,children:e(s.FILES$LOADING_FILES)}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Y,{openPaths:V,selectedPath:B,onSelectFile:H,onCloseFile:R,isTreeVisible:f,onToggleTree:m,actions:Z}),(0,I.jsxs)(`div`,{ref:h,className:`flex h-full min-h-0 flex-1`,children:[f&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`aside`,{className:`shrink-0 border-r border-[var(--oh-border)] overflow-y-auto custom-scrollbar-always`,"data-testid":`files-tab-tree`,style:{width:`${g}px`},children:(0,I.jsx)(te,{paths:A,selectedPath:B,onSelectFile:H})}),(0,I.jsx)(O,{testId:`files-tab-tree-resize-handle`,onMouseDown:y,isDragging:v})]}),(0,I.jsx)(`section`,{className:`flex h-full min-h-0 min-w-0 flex-1 flex-col`,"data-testid":`files-tab-content`,children:B?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-1.5 border-b border-[var(--oh-border)]`,children:[(0,I.jsx)(p,{ariaLabel:e(s.FILES$RICH),testId:`files-tab-content-mode-toggle`,value:u,options:[{value:`rich`,label:e(s.FILES$RICH)},{value:`plain`,label:e(s.FILES$PLAIN)}],onChange:c}),G?(0,I.jsx)(`a`,{href:G,target:`_blank`,rel:`noopener noreferrer`,"aria-label":e(s.FILES$OPEN_IN_NEW_WINDOW),title:e(s.FILES$OPEN_IN_NEW_WINDOW),"data-testid":`files-tab-open-in-new-window`,className:`ml-auto flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-white`,children:(0,I.jsx)(w,{width:14,height:14})}):null]}),(0,I.jsx)(ne,{path:B,viewMode:u})]}):(0,I.jsx)(L,{})})]})]})]})}export{oe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`Free`,t={"openhands/deepseek-v4-flash":`OpenHands DeepSeek V4 Flash (free)`},n=Object.keys(t),r=e=>!!e?.startsWith(`openhands/`),i=`Free OpenHands models: ${n.join(`, `)}. Other provider endpoints with similar model names may require separate billing.`,a=e=>!!(e&&e in t);function o(e){return e?a(e)?t[e]:e:null}function s(e){return e?a(e)?t[e]:e.split(`/`).pop()||e:null}export{a,s as i,i as n,r as o,o as r,e as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,j as t,w as n}from"./utils-BOco8mxR.js";import{x as r}from"./agent-server-client-options-BikiNwTa.js";import{$ as i,tt as a}from"./markdown-renderer-rivLvYh-.js";var o=({allowAgentError:r=!1}={})=>{let{data:o}=a(),{curAgentState:s}=i(),c=r?t:e;return n(o?.execution_status)&&!c.includes(s)};function s(e,t){let n=t?.trim();if(n)return n;if(!e)return r;let i=e.split(`/`);return`${r}/${i[i.length-1]}`}export{o as n,s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./git-repo-dropdown-DVeCUUXG.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{K as i,t as a}from"./utils-BOco8mxR.js";import{s as o}from"./form-control-classes-B-z85REi.js";import{t as s}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js";import{c,i as l,r as u,u as d}from"./dropdown-classes-B9kJVDIk.js";import{i as f,n as p}from"./settings-dropdown-input-DVpyD87C.js";import{a as m,c as h,i as g,n as _,r as v,t as y}from"./home-store-DyXz0w6d.js";import{r as b}from"./typography-HLLg_FAn.js";var x=e(t(),1),S=n();function C({disabled:e,onClear:t,testId:n=`dropdown-clear`}){let{t:o}=r(`openhands`);return(0,S.jsx)(`button`,{onClick:e=>{e.stopPropagation(),t()},disabled:e,className:a(`p-1 text-[#fff]`,`cursor-pointer disabled:cursor-not-allowed disabled:opacity-60`),type:`button`,"aria-label":o(i.COMMON$CLEAR_SELECTION),"data-testid":n,children:(0,S.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,S.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})}function w({isOpen:e,disabled:t,getToggleButtonProps:n,iconClassName:o}){let{t:s}=r(`openhands`);return(0,S.jsx)(`button`,{...n({disabled:t,className:a(f,`text-current`,e&&`rotate-180`,t&&`cursor-not-allowed opacity-60`)}),type:`button`,"aria-label":s(i.COMMON$TOGGLE_MENU),children:(0,S.jsx)(p,{className:o})})}function T({item:e,index:t,isSelected:n,getItemProps:r,getDisplayText:i,getItemKey:o,isProviderDropdown:s=!1,renderIcon:l,itemClassName:f,ariaLabel:p}){return(0,S.jsx)(`li`,{...r({index:t,item:e,...p?{"aria-label":p}:{},className:a(s?`group px-2 py-0 cursor-pointer text-xs rounded-md mx-0 my-0 h-6 flex items-center`:`group px-2 py-2 cursor-pointer text-sm rounded-md mx-0 my-0.5`,`text-white focus:outline-none font-normal`,u,{"bg-[var(--oh-interactive-selected)] text-white":n,"hover:bg-[var(--oh-interactive-hover)]":!n},f)}),children:(0,S.jsxs)(`div`,{className:a(`flex items-center`,c),children:[l?(0,S.jsx)(`span`,{className:d,children:l(e)}):null,(0,S.jsx)(`span`,{className:`font-normal`,children:i(e)})]})},o(e))}function E({inputValue:e,searchMessage:t=`No items found`,emptyMessage:n=`No items available`,testId:r=`dropdown-empty`}){return(0,S.jsx)(`li`,{className:`px-3 py-2 text-[var(--oh-text-secondary)] text-sm rounded-lg mx-0.5 my-0.5`,"data-testid":r,children:e?t:n})}function D({isOpen:e,filteredItems:t,inputValue:n,highlightedIndex:r,selectedItem:i,getMenuProps:o,getItemProps:s,onScroll:c,menuRef:u,renderItem:d,renderItemPrefix:f,renderEmptyState:p,stickyTopItem:m,stickyFooterItem:h,testId:g,numberOfRecentItems:_=0,itemKey:v}){let y=!(t.length>0)&&!m&&!h;return e?(0,S.jsx)(`div`,{className:`relative`,children:(0,S.jsxs)(`div`,{className:a(`absolute z-10 w-full bg-tertiary border border-[var(--oh-border-input)] rounded-lg shadow-none`,`focus:outline-none mt-1 z-[9999]`,`max-h-60`),children:[(0,S.jsx)(`ul`,{...o({ref:u,className:a(`w-full overflow-auto p-1 custom-scrollbar-always`,l,m||h?`max-h-[calc(15rem-3rem)]`:`max-h-60`),onScroll:c,"data-testid":g}),children:y?p(n):(0,S.jsxs)(S.Fragment,{children:[m,t.map((e,t)=>{let n=v(e);return(0,S.jsxs)(x.Fragment,{children:[f?.(e,t),d(e,t,r,i,s),_>0&&t===_-1&&(0,S.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,className:`border-b border-[var(--oh-border-input)] bg-tertiary pb-1 mb-1 h-[1px]`})]},n)})]})}),h&&(0,S.jsx)(`div`,{className:`border-t border-[var(--oh-border-input)] bg-tertiary p-1 rounded-b-lg`,children:h})]})}):(0,S.jsx)(`div`,{className:`relative`,children:(0,S.jsx)(`ul`,{...o({ref:u,className:`hidden`,"data-testid":g})})})}function O({isError:e,message:t=`Failed to load data`,testId:n=`dropdown-error`}){return e?(0,S.jsx)(`div`,{className:`text-red-500 text-sm mt-1`,"data-testid":n,children:t}):null}function k(e,t){let[n,r]=(0,x.useState)([]),[i,a]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{(async()=>{if(!t){r([]);return}if(e.startsWith(`https://`)){let n=e.match(/https:\/\/[^/]+\/([^/]+\/[^/]+)/);if(n){let e=n[1];a(!0);try{r((await m.searchGitRepositories(e,t,3)).items)}catch{r([])}finally{a(!1)}}else r([])}else r([])})()},[e,t]),{urlSearchResults:n,isUrlSearchLoading:i}}function ee(e,t,n,r,i,a,o){let{data:s,fetchNextPage:c,hasNextPage:l,isLoading:u,isFetchingNextPage:d,isError:f}=g({provider:e,enabled:!t}),{data:p,isLoading:m}=v(n,e,(0,x.useMemo)(()=>i===o,[o,i])),h=(0,x.useMemo)(()=>s?.pages?.flatMap(e=>e.items)||[],[s]),_=(0,x.useMemo)(()=>a&&[...h,...r,...p||[]].find(e=>e.id===a)||null,[h,r,p,a]),y=(0,x.useMemo)(()=>r.length>0?r:n&&p&&i!==_?.full_name?p:h,[r,n,p,h,_,i]);return(0,x.useEffect)(()=>{!t&&!u&&!d&&!m&&l&&!n&&r.length===0&&y.length>0&&y.length<10&&c()},[t,u,d,m,l,n,r.length,y.length,c]),{repositories:y,allRepositories:h,selectedRepository:_,fetchNextPage:c,hasNextPage:l,isLoading:u,isFetchingNextPage:d,isError:f,isSearchLoading:m}}function A({provider:e,value:t,repositoryName:n,placeholder:c,className:l,disabled:u=!1,onChange:d}){let{t:f}=r(`openhands`),{recentRepositories:p}=y(),[m,g]=(0,x.useState)(``),[v,A]=(0,x.useState)(null),j=_(m,300),M=(0,x.useRef)(null),N=(0,x.useMemo)(()=>{if(j.startsWith(`https://`)){let e=j.match(/https:\/\/[^/]+\/([^/]+\/[^/]+)/);return e?e[1]:j}return j},[j]),{urlSearchResults:P,isUrlSearchLoading:te}=k(m,e),{repositories:F,selectedRepository:I,fetchNextPage:L,hasNextPage:R,isLoading:z,isFetchingNextPage:B,isError:V,isSearchLoading:H}=ee(e,u,N,P,m,t,n),U=I??v,W=(0,x.useMemo)(()=>{let t=p.filter(t=>t.git_provider===e);if(!m?.trim())return t;let n=m.startsWith(`https://`)?N:m;return t.filter(e=>e.full_name.toLowerCase().includes(n.toLowerCase()))},[p,e,m,N]),G=(0,x.useCallback)(e=>{let t=new Set(W.map(e=>e.id)),n=e.filter(e=>!t.has(e.id));return[...W,...n]},[W]),K=(0,x.useMemo)(()=>{let e;if(P.length>0)e=F;else if(m===I?.full_name)e=F;else if(!m?.trim())e=F;else{let t=m.startsWith(`https://`)?N:m;e=F.filter(e=>e.full_name.toLowerCase().includes(t.toLowerCase()))}return G(e)},[F,m,I,P,N,G]),q=(0,x.useCallback)(e=>{A(e),d?.(e||void 0),e&&g(e.full_name)},[d]),J=(0,x.useCallback)(()=>{A(null),q(null),g(``)},[q]),Y=(0,x.useCallback)(e=>{let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;t+r>=n-10&&R&&!B&&L()},[R,B,L]),{isOpen:X,getToggleButtonProps:Z,getMenuProps:ne,getInputProps:re,highlightedIndex:ie,getItemProps:Q,selectedItem:$}=s({items:K,itemToString:e=>e?.full_name||``,selectedItem:v,onSelectedItemChange:({selectedItem:e})=>{q(e)},inputValue:m,stateReducer:(e,t)=>t.type===s.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes});(0,x.useEffect)(()=>{I?A(I):t===null&&A(null)},[I,t]),(0,x.useEffect)(()=>{X||g(U?.full_name??``)},[U,X]);let ae=z||H||B||te,oe=(e,t,n,r,i)=>(0,S.jsx)(T,{item:e,index:t,isSelected:r?.id===e.id,getItemProps:i,getDisplayText:e=>e.full_name,getItemKey:e=>e.id},e.id),se=e=>(0,S.jsx)(E,{inputValue:e,searchMessage:f(i.HOME$NO_REPOSITORY_FOUND),emptyMessage:f(i.COMMON$NO_REPOSITORY),testId:`git-repo-dropdown-empty`}),ce=(0,x.useMemo)(()=>W.length===0?null:(0,S.jsx)(`div`,{children:(0,S.jsx)(b.Text,{className:`text-xs text-content-2 font-semibold leading-4 pl-2`,children:f(i.COMMON$MOST_RECENT)})}),[W,v,Q,f]);return(0,S.jsxs)(`div`,{className:a(`relative`,l),children:[(0,S.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[(0,S.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:ae?(0,S.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`}):(0,S.jsx)(h,{width:16,height:16})}),(0,S.jsx)(`input`,{...re({disabled:u,placeholder:c??f(i.COMMON$SEARCH_REPOSITORIES_PLACEHOLDER),className:a(o,`text-inherit shadow-none pl-7 pr-16 text-sm font-normal leading-5`,`placeholder:text-[var(--oh-muted)]`,`disabled:cursor-not-allowed disabled:opacity-60`),onChange:e=>{g(e.target.value)}}),"data-testid":`git-repo-dropdown`}),(0,S.jsxs)(`div`,{className:`absolute right-1 top-1/2 transform -translate-y-1/2 flex items-center`,children:[U&&(0,S.jsx)(C,{disabled:u,onClear:J}),(0,S.jsx)(w,{isOpen:X,disabled:u,getToggleButtonProps:Z})]})]}),(0,S.jsx)(D,{isOpen:X,filteredItems:K,inputValue:m,highlightedIndex:ie,selectedItem:$,getMenuProps:ne,getItemProps:Q,onScroll:Y,menuRef:M,renderItem:oe,renderEmptyState:se,stickyTopItem:ce,testId:`git-repo-dropdown-menu`,numberOfRecentItems:W.length,itemKey:e=>e.id}),(0,S.jsx)(O,{isError:V})]})}export{T as a,E as i,O as n,w as o,D as r,C as s,A as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{K as i,t as a}from"./utils-BOco8mxR.js";import{t as o}from"./chevron-down-CFrWHqu8.js";import{t as s}from"./chevron-right-C5roOrJu.js";import{ot as c,st as l}from"./vendor-markdown-j0kYzV48.js";import{t as u}from"./folder-C1ou4_DT.js";import{t as d}from"./syntax-highlighter-BGDg_7w9.js";var f=e(t(),1);function p(e){e.children.sort((e,t)=>e.isDirectory===t.isDirectory?e.name.localeCompare(t.name):e.isDirectory?-1:1);for(let t of e.children)t.isDirectory&&p(t)}function m(e,t,n,r,i){let a=t.get(e);a||(a=new Map,t.set(e,a));let o=a.get(n);if(o)return!i&&!o.isDirectory&&(o.isDirectory=!0),o;let s={name:n,path:r,isDirectory:!i,children:[]};return e.children.push(s),a.set(n,s),s}function h(e){let t={name:``,path:``,isDirectory:!0,children:[]},n=new Map;for(let r of e){let e=r.split(`/`).filter(Boolean);if(e.length>0){let r=t,i=``;for(let t=0;t<e.length;t+=1){let a=e[t];i=i?`${i}/${a}`:a;let o=t===e.length-1;r=m(r,n,a,i,o)}}}return p(t),t}var g=n();function _({node:e,depth:t,selectedPath:n,onSelectFile:r}){let[i,c]=(0,f.useState)(!1),l=8+t*12;if(e.isDirectory)return(0,g.jsxs)(`li`,{children:[(0,g.jsxs)(`button`,{type:`button`,onClick:()=>c(e=>!e),"aria-expanded":i,"data-testid":`file-tree-dir-${e.path}`,className:a(`flex w-full items-center gap-1.5 py-1 pr-2 text-left text-sm text-white`,`hover:bg-tertiary cursor-pointer`),style:{paddingLeft:`${l}px`},children:[(0,g.jsx)(`span`,{"aria-hidden":!0,className:`inline-flex w-3.5 shrink-0 items-center justify-center text-[var(--oh-muted)]`,children:i?(0,g.jsx)(o,{className:`w-3.5 h-3.5`}):(0,g.jsx)(s,{className:`w-3.5 h-3.5`})}),(0,g.jsx)(u,{className:`w-3.5 h-3.5 shrink-0`}),(0,g.jsx)(`span`,{className:`truncate`,children:e.name})]}),i&&e.children.length>0&&(0,g.jsx)(`ul`,{children:e.children.map(e=>(0,g.jsx)(_,{node:e,depth:t+1,selectedPath:n,onSelectFile:r},e.path))})]});let p=n===e.path;return(0,g.jsx)(`li`,{children:(0,g.jsxs)(`button`,{type:`button`,onClick:()=>r(e.path),"data-testid":`file-tree-file-${e.path}`,className:a(`flex w-full items-center gap-1.5 py-1 pr-2 text-left text-sm`,`hover:bg-tertiary cursor-pointer`,p?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-text-tertiary)]`),style:{paddingLeft:`${l+16}px`},children:[(0,g.jsx)(d,{className:`w-3.5 h-3.5 shrink-0`}),(0,g.jsx)(`span`,{className:`truncate`,children:e.name})]})})}function v({paths:e,selectedPath:t,onSelectFile:n}){let{t:a}=r(`openhands`),o=(0,f.useMemo)(()=>h(e),[e]);return o.children.length===0?(0,g.jsx)(`div`,{className:`px-3 py-4 text-sm text-[var(--oh-muted)]`,children:a(i.FILES$NO_FILES)}):(0,g.jsx)(`ul`,{className:`py-1 custom-scrollbar-always`,"data-testid":`file-tree-view`,children:o.children.map(e=>(0,g.jsx)(_,{node:e,depth:0,selectedPath:t,onSelectFile:n},e.path))})}var y={js:`javascript`,jsx:`jsx`,mjs:`javascript`,cjs:`javascript`,ts:`typescript`,tsx:`tsx`,py:`python`,pyi:`python`,pyw:`python`,html:`markup`,htm:`markup`,svg:`markup`,xml:`markup`,css:`css`,scss:`scss`,sass:`sass`,less:`less`,json:`json`,json5:`json5`,yaml:`yaml`,yml:`yaml`,toml:`toml`,ini:`ini`,cfg:`ini`,properties:`properties`,conf:`ini`,env:`bash`,md:`markdown`,markdown:`markdown`,mdx:`markdown`,sh:`bash`,bash:`bash`,zsh:`bash`,fish:`bash`,bat:`batch`,cmd:`batch`,ps1:`powershell`,ps:`powershell`,c:`c`,h:`c`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,hpp:`cpp`,hh:`cpp`,cs:`csharp`,java:`java`,kt:`kotlin`,kts:`kotlin`,scala:`scala`,rs:`rust`,go:`go`,rb:`ruby`,php:`php`,swift:`swift`,m:`objectivec`,mm:`objectivec`,hs:`haskell`,ex:`elixir`,exs:`elixir`,erl:`erlang`,fs:`fsharp`,fsx:`fsharp`,ml:`ocaml`,mli:`ocaml`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,lua:`lua`,pl:`perl`,pm:`perl`,r:`r`,jl:`julia`,dart:`dart`,groovy:`groovy`,gradle:`groovy`,tf:`hcl`,hcl:`hcl`,dockerfile:`docker`,sql:`sql`,graphql:`graphql`,gql:`graphql`,proto:`protobuf`,diff:`diff`,patch:`diff`,nix:`nix`,sol:`solidity`},b={dockerfile:`docker`,makefile:`makefile`,gnumakefile:`makefile`,".bashrc":`bash`,".zshrc":`bash`,".profile":`bash`,".env":`bash`,".gitignore":`bash`,".dockerignore":`bash`};function x(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`)),n=e.slice(t+1),r=n.lastIndexOf(`.`);return r<=0?``:n.slice(r+1).toLowerCase()}function S(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return e.slice(t+1).toLowerCase()}function C(e,t){let n=b[S(e)];if(n)return n;let r=x(e);if(r&&y[r])return y[r];if(t){if(t===`text/html`)return`markup`;if(t===`text/css`)return`css`;if(t===`application/json`)return`json`;if(t===`text/markdown`)return`markdown`;if(t===`application/javascript`||t===`text/javascript`)return`javascript`;if(t===`application/x-yaml`||t===`text/yaml`)return`yaml`}return null}function w({path:e,text:t,mimeType:n}){let r=C(e,n);return r?(0,g.jsx)(`div`,{"data-testid":`file-content-viewer-highlighted`,"data-language":r,className:`h-full w-full overflow-auto bg-[var(--oh-surface)] custom-scrollbar-always`,children:(0,g.jsx)(c,{language:r,style:l,showLineNumbers:!0,wrapLongLines:!1,customStyle:{margin:0,padding:`1rem`,background:`transparent`,fontSize:`0.75rem`,lineHeight:`1.25rem`,minHeight:`100%`},codeTagProps:{style:{background:`transparent`,fontFamily:`inherit`}},lineNumberStyle:{color:`var(--oh-border)`,minWidth:`2.5em`,paddingRight:`1em`,userSelect:`none`},children:t})}):(0,g.jsx)(`pre`,{"data-testid":`file-content-viewer-plain`,className:`h-full w-full overflow-auto whitespace-pre-wrap break-words bg-[var(--oh-surface)] p-4 text-xs leading-5 text-white custom-scrollbar-always`,children:t})}export{v as n,w as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,i as r,yt as i}from"./vendor-styling-Ck5D_A2Q.js";import{F as a,U as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as s}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{i as c,n as l}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";import{i as u,r as d,t as f}from"./recommended-automations-launcher-YLAQTp4s.js";import{n as p,ot as m,st as h}from"./active-backend-context-rZiLJRUc.js";import{K as g,t as _}from"./utils-BOco8mxR.js";import{t as v}from"./chevron-down-CFrWHqu8.js";import{b as y,i as b,n as x,o as S,r as C,s as w,t as T,u as E}from"./kebab-menu-item-content-mm04SBD3.js";import{t as D}from"./external-link-DQtv7eTh.js";import{A as O,C as k,D as A,E as j,F as M,M as N,N as P,O as F,S as I,T as L,a as R,b as z,f as B,i as V,j as ee,k as H,n as te,o as U,p as ne,r as W,s as re,t as ie,u as ae,v as oe,w as se,x as ce,y as le}from"./home-automation-run-tooltip-CpHNFiFl.js";import{n as ue,t as de}from"./vendor~root-layout~index-home~home~conversation-panel~conversation-DgQ564nC.js";import{a as fe,c as pe,d as me,f as he,i as ge,l as _e,n as ve,o as ye,p as be,r as xe,s as Se,t as Ce,u as we}from"./onboarding-BjFebfs5.js";import{t as Te}from"./pin-C7vMagvf.js";import{t as Ee}from"./plus-B3wvU06-.js";import{n as De,t as Oe}from"./x-By6qCmtY.js";import{n as ke,r as Ae,t as je}from"./context-menu-list-item-DDROe12Z.js";import{D as Me}from"./use-tracking-B9prBsrq.js";import{t as Ne}from"./modal-backdrop-BSzNhM4r.js";import{n as Pe,r as Fe,t as Ie}from"./modal-body-DJw4xBki.js";import{r as Le}from"./base-modal-DTULovNc.js";import{r as Re}from"./modal-classes-Dg0ngBPO.js";import{_ as ze,i as Be,m as Ve,s as He}from"./form-control-classes-B-z85REi.js";import{t as Ue}from"./brand-button-DxPO4Lf8.js";import{n as We}from"./navigation-context-CQZwH_tC.js";import{t as G}from"./navigation-link-Bxo3-4vo.js";import{t as Ge}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js";import{t as Ke}from"./styled-tooltip-Pd22BIvr.js";import{i as qe,n as Je,o as Ye,u as Xe}from"./dropdown-classes-B9kJVDIk.js";import{t as Ze}from"./use-llm-configured-DGm8FiRR.js";import{t as Qe}from"./conversation-store-DVVfkCsk.js";import{t as $e}from"./modal-close-button-B9j4nasm.js";import{o as et}from"./conversation-state-store-D1_G_9I-.js";import{t as tt}from"./use-click-outside-element-W6Os4Nlb.js";import{n as nt}from"./use-create-conversation-1YgmAHt-.js";import{n as rt}from"./use-can-manage-org-profiles-BbN6KfDr.js";import{t as it}from"./u-edit-DAkcF52u.js";import{c as at,s as ot,t as st}from"./home-store-DyXz0w6d.js";import{t as ct}from"./folder-C1ou4_DT.js";import{n as lt,t as ut}from"./use-automation-health-BZkQNEA8.js";import{t as K}from"./automation-C_eCrGyP.js";import{t as dt}from"./use-automations-Cg0PDIZr.js";import{t as ft}from"./use-user-conversation-ZWlXtbZb.js";import{r as q}from"./typography-HLLg_FAn.js";import{a as pt,i as mt,n as ht,r as gt,t as _t}from"./extension-module-card-classes-DpeaYhYo.js";import{n as vt}from"./skill-card-pill-row-989y15jV.js";import{n as yt}from"./circle-plus-check-toggle-Fr-h-mbL.js";import{t as bt}from"./x-mark-BopmFoBq.js";import{H as xt,K as St,V as Ct,a as wt,c as Tt,i as Et,k as Dt,n as Ot,o as kt,q as At,r as jt,s as Mt,t as Nt,z as Pt}from"./llm-not-configured-banner-z_QRSeV0.js";import{T as Ft}from"./markdown-renderer-rivLvYh-.js";import{t as It}from"./use-plugins-marketplace-mLsIDhBv.js";import{t as Lt}from"./edit-automation-modal-BwhJ39JT.js";import{a as Rt,i as zt,o as Bt,r as Vt,s as Ht,t as Ut}from"./git-repo-dropdown-DVeCUUXG.js";import"./git-repo-dropdown-D2WEQ97X.js";var Wt=c(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),J=e(t(),1);async function Gt(e){let{imagesToEmbed:t}=At(e.images,e.imagesMarkedUploadAsFile),n=await Promise.all(t.map(e=>Ct(e)));Ft.getState().enqueuePendingMessage({conversationId:e.conversationId,text:e.text,content:e.text,imageUrls:n,fileUrls:[]})}var Kt=`local_repo`,qt=`openhands-last-local-workspace-mode`;function Jt(e){return e===`local_repo`||e===`new_worktree`}function Yt(){if(typeof window>`u`)return Kt;try{let e=window.localStorage.getItem(qt);return Jt(e)?e:Kt}catch{return Kt}}function Xt(e){if(!(typeof window>`u`))try{window.localStorage.setItem(qt,e)}catch{}}function Zt(e,t){return e===`new_worktree`?g.COMMON$WORKSPACE_MODE_NEW_WORKTREE:t===`cloud`?g.COMMON$WORKSPACE_MODE_CLOUD_REPO:g.COMMON$WORKSPACE_MODE_LOCAL_REPO}var Y=i();function Qt({plugin:e,isSelected:t,isDisabled:n=!1,onToggle:r}){return(0,Y.jsxs)(`div`,{"data-testid":`plugin-picker-card-${e.name}`,className:_(`flex min-w-0 items-start justify-between gap-3 rounded-lg bg-tertiary p-4`),children:[(0,Y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Y.jsx)(`h3`,{"data-testid":`plugin-picker-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),(0,Y.jsx)(`p`,{className:`mt-0.5 min-w-0 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),e.description?(0,Y.jsx)(`p`,{className:`mt-1 line-clamp-2 text-xs text-tertiary-light`,children:e.description}):null,e.repo_path||e.ref?(0,Y.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[e.repo_path?(0,Y.jsx)(`span`,{className:mt,children:e.repo_path}):null,e.ref?(0,Y.jsxs)(`span`,{className:mt,children:[`@`,e.ref]}):null]}):null]}),(0,Y.jsx)(yt,{testId:`plugin-picker-toggle-${e.name}`,isSelected:t,isDisabled:n,onToggle:r,enableLabelKey:g.BUTTON$ADD,disableLabelKey:g.COMMON$REMOVE,enableTooltipKey:g.BUTTON$ADD,disableTooltipKey:g.COMMON$REMOVE})]})}function X(e){return[e.source,e.ref??``,e.repo_path??``].join(`\0`)}function $t(e){return{source:e.source,ref:e.ref??null,repo_path:e.repo_path??null}}function en(e,t){let n=X(t);return e.some(e=>X(e)===n)}function tn(e,t){let n=X(t);return e.some(e=>X(e)===n)?e.filter(e=>X(e)!==n):[...e,$t(t)]}function nn(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 rn({selected:e,onChange:t,disabled:n=!1}){let{t:r}=s(`openhands`),{data:i,isLoading:a,isError:o}=It(),[c,l]=(0,J.useState)(``),u=(i??[]).filter(e=>nn(e,c));return(0,Y.jsxs)(`div`,{"data-testid":`plugin-picker`,className:`flex w-full flex-col gap-3`,children:[(0,Y.jsxs)(`div`,{className:_(`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,Y.jsx)(De,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,Y.jsx)(`input`,{"data-testid":`plugin-picker-search-input`,type:`search`,value:c,onChange:e=>l(e.target.value),placeholder:r(g.PLUGINS$PICKER_SEARCH_PLACEHOLDER),"aria-label":r(g.PLUGINS$PICKER_SEARCH_PLACEHOLDER),className:_(`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,Y.jsx)(`button`,{type:`button`,onClick:()=>l(``),"aria-label":r(g.MCP$SEARCH_CLEAR),className:`mr-2 cursor-pointer rounded p-1 text-tertiary-alt hover:text-white`,children:(0,Y.jsx)(Oe,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),a?(0,Y.jsx)(`p`,{"data-testid":`plugin-picker-loading`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(g.PLUGINS$PICKER_LOADING)}):o?(0,Y.jsx)(`p`,{"data-testid":`plugin-picker-error`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(g.PLUGINS$PICKER_ERROR)}):u.length===0?(0,Y.jsx)(`p`,{"data-testid":`plugin-picker-empty`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(g.PLUGINS$PICKER_EMPTY)}):(0,Y.jsx)(`div`,{className:ht,children:(0,Y.jsx)(`div`,{className:_t,children:u.map(r=>(0,Y.jsx)(Qt,{plugin:r,isSelected:en(e,r),isDisabled:n,onToggle:()=>t(tn(e,r))},`${r.source} ${r.ref??``} ${r.repo_path??``} ${r.name}`))})})]})}function an({selected:e,onChange:t,onClose:n}){let{t:r}=s(`openhands`);return(0,Y.jsx)(Ne,{onClose:n,children:(0,Y.jsxs)(`div`,{"data-testid":`plugin-picker-modal`,className:_(`relative flex max-h-[80vh] flex-col gap-4 rounded-xl border border-[var(--oh-border)] bg-base-secondary p-6`,Fe(`lg`),Ie),children:[(0,Y.jsx)($e,{onClose:n,testId:`plugin-picker-close`}),(0,Y.jsxs)(`div`,{className:`pr-6`,children:[(0,Y.jsx)(q.H2,{children:r(g.PLUGINS$PICKER_TITLE)}),(0,Y.jsx)(q.Text,{className:`mt-1 block text-sm text-tertiary-light`,children:r(g.PLUGINS$PICKER_SUBTITLE)})]}),(0,Y.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:(0,Y.jsx)(rn,{selected:e,onChange:t})}),(0,Y.jsxs)(`div`,{className:`flex items-center justify-between border-t border-[var(--oh-border-subtle)] pt-4`,children:[(0,Y.jsx)(q.Text,{className:`text-sm text-tertiary-light`,children:r(g.PLUGINS$PICKER_SELECTED_COUNT,{count:e.length})}),(0,Y.jsx)(Ue,{testId:`plugin-picker-done`,type:`button`,variant:`primary`,onClick:n,className:`px-4`,children:r(g.PLUGINS$PICKER_DONE)})]})]})})}function on({count:e,onClick:t,disabled:n=!1}){let{t:r}=s(`openhands`);return(0,Y.jsxs)(`button`,{type:`button`,"data-testid":`open-plugin-picker`,onClick:t,disabled:n,className:_(`flex flex-row items-center gap-2 rounded-full px-2.5 py-1 text-white`,Be,Ve,ze,n?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-surface-raised`),children:[(0,Y.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center`,children:(0,Y.jsx)(Dt,{width:16,height:16,className:`shrink-0`,"aria-hidden":!0})}),(0,Y.jsx)(`span`,{className:`text-sm font-normal leading-5`,children:r(g.PLUGINS$PICKER_TRIGGER)}),e>0?(0,Y.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]})}var sn={latestRun:null,recentRuns:[],isLoading:!0,isError:!1};function cn(){let e=N(),{data:t,isLoading:n}=ut(),r=t?.status===`ok`,{data:i,isError:a,isLoading:o}=dt({limit:50,offset:0,enabled:!e&&r}),s=e?F:i?.automations??[],c=s.filter(e=>e.enabled).slice(0,20),l=new Set(s.map(e=>e.id)),u=e?!0:i!=null&&s.length>=i.total,d=P(e?[]:c),f=e?O:d;return e?{isBackendHealthy:!0,isHealthLoading:!1,isError:!1,isAutomationsLoading:!1,enabledAutomations:c,knownAutomationIds:l,isAutomationListComplete:u,runStates:f}:{isBackendHealthy:r,isHealthLoading:n,isError:a,isAutomationsLoading:o,enabledAutomations:c,knownAutomationIds:l,isAutomationListComplete:u,runStates:f}}var ln=`oh:home-pinned-automations`;function un(e,t){return`${ln}:${e}:${t??`-`}`}function Z(e){if(!Array.isArray(e))return[];let t=new Set,n=[];for(let r of e)typeof r!=`string`||!r||t.has(r)||(t.add(r),n.push(r));return n}function Q(e,t){let n=new Set(e),r=[];for(let e of t)n.has(e)&&(r.push(e),n.delete(e));for(let t of e)n.has(t)&&r.push(t);return r}function dn(e,t,n,r=`after`){if(t===n)return[...e];let i=e.indexOf(t),a=e.indexOf(n);if(i<0||a<0)return[...e];let o=[...e];o.splice(i,1);let s=o.indexOf(n),c=r===`before`?s:s+1;return o.splice(c,0,t),o}function fn(){let e=N(),t=p(),[n,r]=de(un(t.backend.id,t.orgId),[]),[i,a]=(0,J.useState)(null),o=(0,J.useMemo)(()=>e?i?Q(H,i):[...H]:Z(n),[e,i,n]),s=(0,J.useCallback)(e=>o.includes(e),[o]),c=(0,J.useCallback)(t=>{if(e){a(e=>{let n=e?Q(H,e):[...H];return n.includes(t)?n:[...n,t]});return}r(e=>{let n=Z(e);return n.includes(t)?n:[...n,t]})},[e,r]),l=(0,J.useCallback)(t=>{if(e){a(e=>(e?Q(H,e):[...H]).filter(e=>e!==t));return}r(e=>Z(e).filter(e=>e!==t))},[e,r]);return{pinnedIds:o,isPinned:s,pin:c,unpin:l,togglePin:(0,J.useCallback)(e=>{if(s(e)){l(e);return}c(e)},[s,c,l]),reorder:(0,J.useCallback)((t,n,i=`after`)=>{if(e){a(e=>dn(e?Q(H,e):[...H],t,n,i));return}r(e=>dn(Z(e),t,n,i))},[e,r]),pruneMissing:(0,J.useCallback)(t=>{e||r(e=>{let n=Z(e),r=n.filter(e=>t.has(e));return r.length===n.length&&r.every((e,t)=>e===n[t])?n:r})},[e,r])}}function pn({automationName:e,isOpen:t,onConfirm:n,onCancel:r}){let{t:i}=s(`openhands`);return t?(0,Y.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,Y.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:r,onKeyDown:e=>{e.key===`Escape`&&r()},role:`presentation`}),(0,Y.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`turn-off-automation-title`,className:`relative w-full max-w-sm rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,Y.jsx)(`button`,{type:`button`,onClick:r,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":i(g.BUTTON$CLOSE),children:(0,Y.jsx)(bt,{className:`size-5`})}),(0,Y.jsx)(`h2`,{id:`turn-off-automation-title`,className:Re,children:i(g.AUTOMATIONS$TURN_OFF_CONFIRM_TITLE)}),(0,Y.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:i(g.AUTOMATIONS$TURN_OFF_CONFIRM_MESSAGE,{name:e})}),(0,Y.jsxs)(`div`,{className:`mt-6 flex justify-end gap-3`,children:[(0,Y.jsx)(`button`,{type:`button`,onClick:r,className:`rounded-lg border border-[var(--oh-border)] px-4 py-2 text-sm text-white hover:bg-surface-raised`,children:i(g.AUTOMATIONS$CANCEL)}),(0,Y.jsx)(`button`,{type:`button`,"data-testid":`turn-off-automation-confirm`,onClick:n,className:`rounded-lg bg-danger px-4 py-2 text-sm text-white hover:bg-danger/80`,children:i(g.AUTOMATIONS$TURN_OFF)})]})]})]}):null}function mn({automation:e,t,canManage:n,canEdit:r,isRunPending:i,isCancelPending:a,canCancel:o,testIdPrefix:s,pinTestId:c,isPinned:l,onRunNow:u,onCancelRun:d,onView:f,onEdit:p,onTurnOff:m,onTogglePin:h}){let _=[];return n&&_.push({kind:`item`,key:`run-now`,label:t(g.AUTOMATIONS$RUN_NOW),icon:(0,Y.jsx)(C,{className:`size-4`}),onClick:u,disabled:i||!e.enabled||o,testId:`${s}-run-${e.id}`}),n&&o&&_.push({kind:`item`,key:`cancel-run`,label:t(g.AUTOMATIONS$CANCEL_RUN),icon:(0,Y.jsx)(Wt,{className:`size-3.5 fill-current`,"aria-hidden":!0}),onClick:d,disabled:a,testId:`${s}-cancel-${e.id}`}),_.push({kind:`item`,key:`view`,label:t(g.COMMON$VIEW),icon:(0,Y.jsx)(M,{className:`size-4`,"aria-hidden":!0}),onClick:f,testId:`${s}-view-${e.id}`}),n&&r&&p&&_.push({kind:`item`,key:`edit`,label:t(g.AUTOMATIONS$EDIT),icon:(0,Y.jsx)(it,{className:`size-4`}),onClick:p,testId:`${s}-edit-${e.id}`}),n&&_.push({kind:`item`,key:`turn-off`,label:t(g.AUTOMATIONS$TURN_OFF),icon:(0,Y.jsx)(x,{className:`size-4`}),onClick:m,testId:`${s}-turn-off-${e.id}`}),_.push({kind:`separator`,key:`pin-separator`},{kind:`item`,key:`pin`,label:t(l?g.FEATURED_AUTOMATIONS$UNPIN:g.FEATURED_AUTOMATIONS$PIN),icon:(0,Y.jsx)(Te,{className:l?`size-3.5 fill-current`:`size-3.5`,"aria-hidden":`true`}),onClick:h,testId:c}),_}function hn({onUnpin:e,automation:t,...n}){return mn({...n,automation:t,testIdPrefix:`pinned-automation`,pinTestId:`unpin-automation-${t.id}`,isPinned:!0,onTogglePin:e})}var gn=e(n(),1);function _n({testId:e,panelTestId:t,ariaLabel:n,items:r,triggerClassName:i}){let[a,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(0),l=(0,J.useRef)(null),u=(0,J.useRef)([]),[,d]=(0,J.useReducer)(e=>e+1,0),f=()=>{o(!1),queueMicrotask(()=>l.current?.focus())},p=tt(f,l),m=r.map((e,t)=>e.kind===`item`&&!e.disabled?t:-1).filter(e=>e>=0);(0,J.useLayoutEffect)(()=>{if(!a)return;d(),c(m[0]??0);let e=0,t=()=>{e||=window.requestAnimationFrame(()=>{e=0,d()})};return window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0),e&&window.cancelAnimationFrame(e)}},[a]),(0,J.useEffect)(()=>{a&&u.current[s]?.focus()},[s,a]);let h=(()=>{if(!a||!l.current)return;let e=l.current.getBoundingClientRect(),t=window.innerWidth,n=window.innerHeight,i=r.reduce((e,t)=>e+(t.kind===`separator`?9:36),10),o=p.current?.getBoundingClientRect().height??i;return{position:`fixed`,...e.bottom+4+o+8>n?{bottom:n-e.top+4}:{top:e.bottom+4},right:Math.max(8,t-e.right),zIndex:1e5}})(),g=typeof document<`u`?document.body:null,_=e=>{m.length!==0&&c(m[(m.indexOf(s)+e+m.length)%m.length]??m[0])};return(0,Y.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,Y.jsx)(rt,{ref:l,testId:e,ariaLabel:n,className:i,onClick:e=>{e.preventDefault(),e.stopPropagation(),o(e=>!e)}}),a&&h&&g?(0,gn.createPortal)((0,Y.jsx)(ke,{ref:p,testId:t,theme:`popover`,position:`none`,alignment:`none`,spacing:`none`,style:h,className:`min-w-40`,onKeyDown:e=>{if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),f();return}if(e.key===`ArrowDown`){e.preventDefault(),_(1);return}e.key===`ArrowUp`&&(e.preventDefault(),_(-1))},children:r.map((e,t)=>e.kind===`separator`?(0,Y.jsx)(we,{},e.key):(0,Y.jsx)(`li`,{children:(0,Y.jsx)(je,{ref:e=>{u.current[t]=e},testId:e.testId,isDisabled:e.disabled,className:`group`,onClick:t=>{t.preventDefault(),t.stopPropagation(),!e.disabled&&(e.onClick(),f())},children:(0,Y.jsx)(T,{icon:e.icon,label:e.label})})},e.key))}),g):null]})}function vn({automation:e,runState:t,onUnpin:n,onDragStart:i,onDragOver:a,onDrop:o,onDragEnd:c,isDropTarget:l,dropPosition:u,isDragging:d}){let{t:f,i18n:p}=s(`openhands`),{latestRun:m,recentRuns:h,isLoading:v,isError:x}=t,C=ae(e,m),T=m?.conversation_id??null,O=T?ee(T):void 0,{data:k}=ft(O===void 0?T:null),M=O===void 0?k?.title??null:O,N=m?ce(m):null,P=m?.status===K.COMPLETED||m?.status===K.FAILED,F=e.trigger.schedule_human||e.trigger.type,I=(0,J.useMemo)(()=>oe(e,F),[e,F]),L=w(m?.status),R=m?y(m):null,z=R?.summary??null,H=z?j(z):null,te=z!=null&&H!=null&&A(z,H),U=(0,J.useRef)(null),W=Me()?.insights,ie=hn({automation:e,t:f,canManage:C.canManage,canEdit:C.canEdit,isRunPending:C.isRunPending,isCancelPending:C.isCancelPending,canCancel:C.canCancel,onRunNow:C.runNow,onCancelRun:C.cancelRun,onView:C.viewDetails,onEdit:C.canEdit?C.openEdit:void 0,onTurnOff:C.requestTurnOff,onUnpin:()=>n(e.id)});return(0,Y.jsxs)(`article`,{ref:U,role:`listitem`,"data-testid":`pinned-automation-card-${e.id}`,onDragOver:t=>{t.preventDefault();let{dataTransfer:n}=t;n.dropEffect=`move`;let r=t.currentTarget.getBoundingClientRect(),i=(t.clientX-r.left)/r.width,o=(t.clientY-r.top)/r.height,s=i<.3||i>.7?i<.5?`before`:`after`:o<.5?`before`:`after`;a(e.id,s)},onDrop:t=>{t.preventDefault(),o(e.id)},onDragEnd:c,className:_(`group relative flex min-w-0 flex-col overflow-hidden p-4 text-left`,pt,gt,d&&`opacity-50`,l&&u===`before`&&`shadow-[inset_0_2px_0_0_var(--oh-focus)]`,l&&u===`after`&&`shadow-[inset_0_-2px_0_0_var(--oh-focus)]`),children:[(0,Y.jsxs)(`header`,{className:`flex flex-col gap-1.5`,children:[(0,Y.jsxs)(`div`,{draggable:!0,"data-testid":`pinned-automation-drag-${e.id}`,"aria-label":f(g.FEATURED_AUTOMATIONS$REORDER_HANDLE,{name:e.name}),className:`-mx-4 -mt-4 flex cursor-grab items-center justify-between gap-3 px-4 pt-4 active:cursor-grabbing`,onDragStart:t=>{if(t.target?.closest(`[data-no-drag]`)){t.preventDefault();return}let{dataTransfer:n}=t;n.effectAllowed=`move`,n.setData(`text/plain`,e.id),U.current&&n.setDragImage(U.current,24,24),i(e.id)},onDragEnd:c,children:[(0,Y.jsx)(`span`,{role:`link`,tabIndex:0,title:f(g.FEATURED_AUTOMATIONS$VIEW_DETAILS),className:`h-8 min-w-0 flex-1 cursor-pointer truncate text-sm font-semibold leading-8 text-[var(--oh-foreground)] hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--oh-focus)]`,onClick:()=>C.viewDetails(),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),C.viewDetails())},children:e.name}),(0,Y.jsx)(`div`,{"data-no-drag":!0,className:`flex h-8 shrink-0 items-center`,children:(0,Y.jsx)(_n,{testId:`pinned-automation-menu-${e.id}`,panelTestId:`pinned-automation-menu-panel-${e.id}`,ariaLabel:f(g.FEATURED_AUTOMATIONS$ROW_MENU_LABEL,{name:e.name}),triggerClassName:`opacity-70 group-hover:opacity-100`,items:ie})})]}),e.prompt?(0,Y.jsx)(`p`,{className:`line-clamp-2 text-xs leading-relaxed text-[var(--oh-text-secondary)]`,children:e.prompt}):null]}),I.length>0||h.length>0?(0,Y.jsxs)(`div`,{className:_(`mt-3 flex items-center gap-3`,I.length>0?`justify-between`:`justify-end`),children:[I.length>0?(0,Y.jsx)(`div`,{className:`min-w-0 flex-1 overflow-hidden`,children:(0,Y.jsx)(vt,{pills:I,testId:`pinned-automation-pills-${e.id}`})}):null,h.length>0?(0,Y.jsx)(V,{automationId:e.id,runs:h,testId:`pinned-automation-activity-${e.id}`}):null]}):null,(0,Y.jsxs)(`div`,{className:re,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 overflow-hidden`,children:[v?(0,Y.jsx)(`div`,{className:`h-3.5 w-3/4 animate-pulse rounded bg-surface-raised motion-reduce:animate-none`,"aria-hidden":`true`}):null,!v&&x?(0,Y.jsx)(`p`,{className:`truncate text-[var(--oh-text-secondary)]`,children:f(g.FEATURED_AUTOMATIONS$STATUS_UNAVAILABLE)}):null,!v&&!x&&!m?(0,Y.jsx)(`p`,{className:`truncate text-[var(--oh-text-secondary)]`,children:f(g.AUTOMATIONS$DETAIL$NO_RUNS)}):null,m?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(b,{status:R?.badgeStatus??m.status,iconOnly:!0,showLabel:m.status===K.PENDING||m.status===K.RUNNING&&!M}),L?(0,Y.jsx)(S,{status:m.status,code:m.phase_code,label:m.phase_label,updatedAt:m.phase_updated_at}):null,H?te&&z?(0,Y.jsx)(r,{content:(0,Y.jsx)(`p`,{className:`max-w-xs whitespace-pre-wrap break-words p-2 text-xs`,children:z}),placement:`top`,closeDelay:100,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,children:(0,Y.jsx)(`span`,{className:`min-w-0 flex-1 cursor-default truncate text-[var(--oh-text-secondary)]`,children:H})}):(0,Y.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-[var(--oh-text-secondary)]`,children:H}):null,T&&M?(0,Y.jsxs)(G,{to:`/conversations/${T}`,"aria-label":M,title:M,className:`group/conversation inline-flex min-w-0 items-center gap-1 text-[var(--oh-foreground)] hover:text-[var(--oh-text-secondary)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--oh-focus)]`,children:[(0,Y.jsx)(`span`,{className:`truncate`,children:M}),(0,Y.jsx)(D,{className:`size-3 shrink-0 opacity-0 transition-opacity group-hover/conversation:opacity-100 group-focus-visible/conversation:opacity-100`,"aria-hidden":`true`})]}):null,!T&&P?(0,Y.jsx)(`p`,{className:`min-w-0 truncate text-[var(--oh-text-secondary)]`,children:f(g.AUTOMATIONS$DETAIL$NO_CONVERSATION)}):null]}):null]}),N?(0,Y.jsx)(`span`,{className:`shrink-0 text-[var(--oh-text-secondary)]`,children:E(N,p.language,f)}):null]}),W?(0,Y.jsx)(`div`,{className:`mt-3`,children:(0,Y.jsx)(ne,{state:B(t),copy:W.stats})}):null,C.editOpen?(0,Y.jsx)(Lt,{automation:e,isOpen:C.editOpen,onClose:()=>C.setEditOpen(!1)}):null,(0,Y.jsx)(pn,{automationName:e.name,isOpen:C.turnOffConfirmOpen,onConfirm:C.confirmTurnOff,onCancel:C.cancelTurnOff})]})}function yn(){let{t:e}=s(`openhands`),{pinnedIds:t,unpin:n,reorder:r,pruneMissing:i}=fn(),{isBackendHealthy:a,isHealthLoading:o,isError:c,enabledAutomations:l,knownAutomationIds:u,isAutomationListComplete:f,runStates:p}=cn(),[m,h]=(0,J.useState)(!1),[v,y]=(0,J.useState)(null),[b,x]=(0,J.useState)(null),[S,C]=(0,J.useState)(null);(0,J.useEffect)(()=>{!f||u.size===0||i(u)},[f,u,i]);let w=new Map(l.map(e=>[e.id,e])),T=t.map(e=>w.get(e)).filter(e=>!!e);if(o||!a||c||T.length===0)return null;let E=m||T.length<=6?T:T.slice(0,6),D=T.length>6;return(0,Y.jsxs)(`section`,{"data-testid":`pinned-automations-dashboard`,"aria-label":e(g.FEATURED_AUTOMATIONS$PINNED_DASHBOARD_LABEL),className:_(`w-full`,d),children:[(0,Y.jsx)(`h2`,{className:`mb-2 text-sm font-medium text-[var(--oh-foreground)]`,children:e(g.FEATURED_AUTOMATIONS$PINNED_TITLE)}),(0,Y.jsx)(`div`,{role:`list`,className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:E.map(e=>(0,Y.jsx)(vn,{automation:e,runState:p.get(e.id)??sn,onUnpin:n,onDragStart:y,onDragOver:(e,t)=>{x(e),C(t)},onDrop:e=>{v&&S&&r(v,e,S),y(null),x(null),C(null)},onDragEnd:()=>{y(null),x(null),C(null)},isDropTarget:b===e.id,dropPosition:b===e.id?S:null,isDragging:v===e.id},e.id))}),D?(0,Y.jsx)(`div`,{className:`mt-2 flex justify-start`,children:(0,Y.jsx)(`button`,{type:`button`,"data-testid":`pinned-automations-view-more`,onClick:()=>h(e=>!e),className:`text-xs text-[var(--oh-text-secondary)] hover:text-[var(--oh-foreground)]`,children:e(m?g.COMMON$VIEW_LESS:g.COMMON$VIEW_MORE)})}):null]})}function bn(e,t,n,r){let{latestRun:i}=t,a=i?ce(i):null,o=i?y(i):null;return{id:e.id,name:e.name,triggerSummary:L(e),status:o?.badgeStatus??null,whenLabel:a?E(a,n,r):null,conversationId:i?.conversation_id??null}}function xn(e,t){let n=t.get(e),r=n?.latestRun?.status;if(r===K.PENDING||r===K.RUNNING)return 2**53-1;let i=n?.latestRun?ce(n.latestRun):null;return i?new Date(i).getTime():0}function Sn(e,t,n,r,i){return[...e].map(e=>bn(e,t.get(e.id)??i,n,r)).sort((e,n)=>xn(n.id,t)-xn(e.id,t))}function Cn(e){return e.conversationId?`/conversations/${e.conversationId}`:`/automations/${e.id}`}function wn({item:e,automation:t,runState:n}){let{t:i}=s(`openhands`),{isPinned:a,togglePin:o}=fn(),c=ae(t,n.latestRun),l=a(e.id),u=t.trigger.type===`event`?Ae:lt,d=I(t),f=k(t),p=se(t),m=!!(d||f||p),h=m||!!e.whenLabel||!!e.status,v=le(n),y=te(n),x=mn({automation:t,t:i,canManage:c.canManage,canEdit:c.canEdit,isRunPending:c.isRunPending,isCancelPending:c.isCancelPending,canCancel:c.canCancel,testIdPrefix:`running-automation`,pinTestId:`running-automation-pin-${e.id}`,isPinned:l,onRunNow:c.runNow,onCancelRun:c.cancelRun,onView:c.viewDetails,onEdit:c.canEdit?c.openEdit:void 0,onTurnOff:c.requestTurnOff,onTogglePin:()=>o(e.id)});return(0,Y.jsxs)(`li`,{"data-testid":`running-automation-row-${e.id}`,className:U,children:[(0,Y.jsx)(r,{content:(0,Y.jsx)(ie,{automation:t,runState:n}),placement:`top-start`,closeDelay:100,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,children:(0,Y.jsx)(G,{to:Cn(e),"aria-label":`${e.name} ${i(y)}`,className:`flex min-w-0 flex-1 items-center justify-between gap-3 px-3 py-2.5 focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--oh-focus)]`,children:(0,Y.jsxs)(`div`,{className:`grid min-w-0 flex-1 grid-cols-[auto_minmax(0,1fr)] gap-x-2`,children:[(0,Y.jsx)(`span`,{className:`inline-flex h-5 w-2.5 shrink-0 items-center justify-center`,children:(0,Y.jsx)(W,{health:v})}),(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium leading-5 text-[var(--oh-foreground)]`,children:e.name}),h?(0,Y.jsxs)(`span`,{className:`col-start-2 mt-0.5 flex min-w-0 items-center gap-1.5 text-xs leading-4 text-[var(--oh-text-secondary)]`,children:[(0,Y.jsx)(u,{className:`size-3 shrink-0`,"aria-hidden":`true`}),d?(0,Y.jsx)(`span`,{className:`truncate`,children:d}):null,f?(0,Y.jsx)(`span`,{className:`truncate`,children:f}):null,p?(0,Y.jsx)(`span`,{className:_(mt,`shrink-0 px-1.5 py-0 text-[var(--oh-text-secondary)]`),children:z(p)}):null,e.whenLabel?(0,Y.jsxs)(Y.Fragment,{children:[m?(0,Y.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:`·`}):null,(0,Y.jsx)(`span`,{className:`truncate`,children:e.whenLabel})]}):null,e.status?(0,Y.jsxs)(Y.Fragment,{children:[m||e.whenLabel?(0,Y.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:`·`}):null,(0,Y.jsx)(b,{status:e.status,compact:!0})]}):null]}):null,(0,Y.jsx)(`span`,{className:`sr-only`,children:i(y)})]})})}),(0,Y.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5 pr-1.5`,children:[(0,Y.jsx)(V,{automationId:t.id,runs:n.recentRuns,testId:`running-automation-activity-${e.id}`}),(0,Y.jsx)(_n,{testId:`running-automation-menu-${e.id}`,panelTestId:`running-automation-menu-panel-${e.id}`,ariaLabel:i(g.FEATURED_AUTOMATIONS$ROW_MENU_LABEL,{name:e.name}),triggerClassName:`opacity-70 group-hover:opacity-100`,items:x})]}),c.editOpen?(0,Y.jsx)(Lt,{automation:t,isOpen:c.editOpen,onClose:()=>c.setEditOpen(!1)}):null,(0,Y.jsx)(pn,{automationName:t.name,isOpen:c.turnOffConfirmOpen,onConfirm:c.confirmTurnOff,onCancel:c.cancelTurnOff})]})}function Tn(){let{t:e,i18n:t}=s(`openhands`),[n,r]=(0,J.useState)(!1),{isBackendHealthy:i,isHealthLoading:a,isError:o,isAutomationsLoading:c,enabledAutomations:l,runStates:u}=cn(),d=t?.language??`en`,f=(0,J.useMemo)(()=>Sn(l,u,d,e,sn),[l,u,d,e]),p=(0,J.useMemo)(()=>new Map(l.map(e=>[e.id,e])),[l]),m=n?20:10,h=f.slice(0,m),_=!n&&f.length>10,v=n&&f.length>=20;if(a||!i||o||c)return null;let y=f.length===0;return(0,Y.jsxs)(`section`,{"aria-labelledby":`running-automations-heading`,"data-testid":`running-automations-list`,className:`w-full`,children:[(0,Y.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,Y.jsx)(`h2`,{id:`running-automations-heading`,className:`text-sm font-medium text-[var(--oh-foreground)]`,children:e(g.FEATURED_AUTOMATIONS$SECTION_TITLE)}),(0,Y.jsx)(Ke,{content:e(g.FEATURED_AUTOMATIONS$MANAGE),placement:`bottom`,children:(0,Y.jsxs)(G,{to:`/automations`,"data-testid":`home-automations-manage`,"aria-label":e(g.FEATURED_AUTOMATIONS$MANAGE),className:`inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-xs font-medium text-[var(--oh-text-secondary)] transition-colors hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--oh-focus)]`,children:[(0,Y.jsx)(Ee,{className:`size-3`,"aria-hidden":`true`}),e(g.BUTTON$ADD)]})})]}),y?(0,Y.jsx)(`p`,{"data-testid":`running-automations-empty-hint`,className:`rounded-xl border border-[var(--oh-border-subtle)] bg-[var(--oh-surface)] px-4 py-3 text-xs text-[var(--oh-text-secondary)]`,children:e(g.FEATURED_AUTOMATIONS$EMPTY_HINT)}):(0,Y.jsx)(`ul`,{"aria-label":e(g.FEATURED_AUTOMATIONS$RECENT_GROUP_LABEL),className:R,children:h.map(e=>{let t=p.get(e.id);return t?(0,Y.jsx)(wn,{item:e,automation:t,runState:u.get(e.id)??sn},e.id):null})}),_?(0,Y.jsx)(`div`,{className:`mt-2 flex justify-start`,children:(0,Y.jsx)(`button`,{type:`button`,"data-testid":`home-automations-view-more`,onClick:()=>r(!0),className:`rounded-md px-1.5 py-0.5 text-xs font-medium text-[var(--oh-text-secondary)] transition-colors hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--oh-focus)]`,children:e(g.COMMON$VIEW_MORE)})}):null,v?(0,Y.jsx)(`div`,{className:`mt-2 flex justify-start`,children:(0,Y.jsx)(G,{to:`/automations`,"data-testid":`home-automations-view-all`,className:`rounded-md px-1.5 py-0.5 text-xs font-medium text-[var(--oh-text-secondary)] transition-colors hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--oh-focus)]`,children:e(g.FEATURED_AUTOMATIONS$VIEW_ALL)})}):null]})}function En(){let{t:e}=s(`openhands`);return(0,Y.jsx)(`div`,{className:`flex w-full items-center justify-center py-2`,children:(0,Y.jsx)(q.H1,{className:`w-full text-center leading-normal`,children:e(g.HOME$LETS_START_BUILDING)})})}function Dn({kind:e,onClick:t,disabled:n=!1,disabledTooltip:r}){let{t:i}=s(`openhands`),a=e===`local`,o=i(a?g.HOME$OPEN_WORKSPACE:g.COMMON$OPEN_REPOSITORY),c=(0,Y.jsxs)(`button`,{type:`button`,"data-testid":a?`open-workspace-button`:`open-repository-button`,onClick:t,disabled:n,className:_(`flex flex-row items-center gap-2 rounded-full px-2.5 py-1 text-white`,Be,Ve,ze,n?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-surface-raised`),children:[(0,Y.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center`,children:a?(0,Y.jsx)(be,{"aria-hidden":!0,className:`h-4 w-4`,strokeWidth:2}):(0,Y.jsx)(et,{width:16,height:16,className:`shrink-0`})}),(0,Y.jsx)(`span`,{className:`text-sm font-normal leading-5`,children:o})]});return r?(0,Y.jsx)(Ke,{content:r,placement:`top`,children:(0,Y.jsx)(`span`,{className:`inline-flex`,children:c})}):c}var $=`__ungrouped__`;function On({workspaces:e,parents:t=[],value:n,placeholder:r,className:i,disabled:a=!1,disabledTooltip:o,showManage:c,onChange:l,onAddClick:u,onManageClick:d}){let{t:f}=s(`openhands`),[p,m]=(0,J.useState)(n?.name??``),h=(0,J.useRef)(null),v=(0,J.useMemo)(()=>{let t=p.trim().toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t)):e},[e,p]),y=(0,J.useCallback)(e=>e.parentPath??$,[]),b=(0,J.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,J.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===$?f(g.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,f]),T=(0,J.useCallback)(e=>{l(e),e&&m(e.name)},[l]),E=(0,J.useCallback)(()=>{T(null),m(``)},[T]),{isOpen:D,getToggleButtonProps:O,getMenuProps:k,getInputProps:A,highlightedIndex:j,getItemProps:M,selectedItem:N,closeMenu:P}=Ge({items:x,itemToString:e=>e?.name??``,selectedItem:n,onSelectedItemChange:({selectedItem:e})=>{T(e??null)},inputValue:p,onIsOpenChange:({isOpen:e,selectedItem:t})=>{m(e?``:t?.name??``)},stateReducer:(e,t)=>t.type===Ge.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes}),F=(e,t,n,r,i)=>(0,Y.jsx)(Rt,{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,Y.jsx)(zt,{inputValue:e,searchMessage:f(g.HOME$NO_WORKSPACES),emptyMessage:f(g.HOME$NO_WORKSPACES),testId:`workspace-dropdown-empty`}),L=(0,J.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),R=(0,J.useCallback)(e=>{L(e),P(),u()},[P,u,L]),z=(0,J.useCallback)(e=>{L(e),P(),u()},[P,u,L]),B=(0,J.useCallback)(e=>{L(e),P(),d()},[P,d,L]),V=(0,J.useCallback)(e=>{L(e),P(),d()},[P,d,L]),ee=(0,J.useMemo)(()=>(0,Y.jsxs)(`div`,{className:qe,children:[(0,Y.jsx)(`button`,{type:`button`,"data-testid":`add-workspaces-button`,className:_(Je,`cursor-pointer`),onMouseDown:L,onTouchStart:L,onTouchEnd:z,onClick:R,children:f(g.HOME$ADD_WORKSPACES)}),(c??e.length>0)&&(0,Y.jsx)(`button`,{type:`button`,"data-testid":`manage-workspaces-button`,className:_(Je,`cursor-pointer`),onMouseDown:L,onTouchStart:L,onTouchEnd:V,onClick:B,children:f(g.HOME$MANAGE_WORKSPACES)})]}),[R,z,B,V,L,f,e.length,c]),H=(0,Y.jsxs)(`div`,{className:_(`relative`,i),children:[(0,Y.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[(0,Y.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:(0,Y.jsx)(at,{width:16,height:16})}),(0,Y.jsx)(`input`,{...A({disabled:a,placeholder:D&&n?n.name:r??f(g.HOME$WORKSPACE_PLACEHOLDER),className:_(He,`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=>{m(e.target.value)}}),"data-testid":`workspace-dropdown`}),(0,Y.jsxs)(`div`,{className:`absolute right-1 top-1/2 transform -translate-y-1/2 flex items-center`,children:[n&&(0,Y.jsx)(Ht,{disabled:a,onClear:E}),(0,Y.jsx)(Bt,{isOpen:D,disabled:a,getToggleButtonProps:O})]})]}),(0,Y.jsx)(Vt,{isOpen:D,filteredItems:x,inputValue:p,highlightedIndex:j,selectedItem:N,getMenuProps:k,getItemProps:M,menuRef:h,renderItem:F,renderItemPrefix:S?(e,t)=>{let n=C.get(t);return n?(0,Y.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:ee,testId:`workspace-dropdown-menu`,itemKey:e=>e.id})]});return o?(0,Y.jsx)(Ke,{content:o,placement:`top`,children:(0,Y.jsx)(`span`,{className:`block`,children:H})}):H}var kn=`oh:home-selected-workspace-path`;function An(){if(typeof window>`u`)return null;try{let e=window.sessionStorage.getItem(kn);return e&&e.length>0?e:null}catch{return null}}function jn(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem(kn,e):window.sessionStorage.removeItem(kn)}catch{}}function Mn({isLoadingSettings:e=!1,onConfirm:t}){let{t:n}=s(`openhands`),{navigate:r}=We(),{data:i,error:a}=he(),o=i?.workspaceParents??[],{mutate:c}=Se(),{mutate:l}=pe(),{mutate:d}=ye(),{mutate:f}=_e(),{workspaces:p,parents:m,isLoading:h,isError:_,error:v}=me(),y=fe(a??v,n),[b,x]=J.useState(null),[S,C]=J.useState(!1),[w,T]=J.useState(!1),{mutate:E,isPending:D,isSuccess:O}=nt(),k=u(),A=D||O||k,j=J.useCallback(e=>{x(e),jn(e?.path??null)},[]);J.useEffect(()=>{let e=An();if(!e)return;let t=p.find(t=>t.path===e);if(t){x(e=>e?.path===t.path?e:t);return}!h&&!_&&!y&&(jn(null),x(t=>t?.path===e?null:t))},[_,h,p,y]);let M=o.length>0||!!y,N=null;y?N=y:h?N=n(g.HOME$LOADING):_&&(N=n(g.HOME$WORKSPACE_SCAN_ERROR));let P=!!y||e||h&&p.length===0;return(0,Y.jsxs)(`div`,{className:`flex flex-col`,children:[!t&&(0,Y.jsxs)(`div`,{className:`flex items-center gap-[10px] pb-4`,children:[(0,Y.jsx)(ct,{width:24,height:24}),(0,Y.jsx)(`span`,{className:`leading-5 font-bold text-base text-white`,children:n(g.HOME$WORKSPACES_TAB)})]}),(0,Y.jsxs)(`div`,{className:`flex flex-col gap-[10px] pb-4`,children:[(0,Y.jsx)(On,{workspaces:p,parents:m,value:b,placeholder:y?n(g.HOME$WORKSPACES_UNSUPPORTED_PLACEHOLDER):P?n(g.HOME$LOADING):void 0,disabled:P,disabledTooltip:y,showManage:p.length>0||o.length>0,onChange:j,onAddClick:()=>C(!0),onManageClick:()=>T(!0),className:`max-w-auto`},b?.path??`empty-workspace-selection`),M&&N&&(0,Y.jsx)(`p`,{className:`px-1 text-xs text-[var(--oh-text-secondary)]`,"data-testid":`workspace-status-message`,children:N})]}),(0,Y.jsx)(Ue,{testId:`workspace-launch-button`,variant:`primary`,type:`button`,isDisabled:!b||!t&&A||e,onClick:()=>{if(b){if(t){t(b);return}E({workingDir:b.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?g.BUTTON$CONFIRM:A?g.HOME$LOADING:g.BUTTON$LAUNCH)}),(0,Y.jsx)(ge,{isOpen:S,onClose:()=>C(!1),onAdd:e=>{let t=e[e.length-1];c(e,{onSuccess:()=>{t&&j(t)}})},onAddParent:e=>d(e)}),(0,Y.jsx)(xe,{isOpen:w,workspaces:p,workspaceParents:o,onClose:()=>T(!1),onRemove:e=>{b?.path===e&&j(null),l(e)},onRemoveParent:e=>{b?.parentPath===e&&j(null),f(e)}})]})}function Nn({isOpen:e,onClose:t,onConfirm:n}){let{t:r}=s(`openhands`),{isLoadingSettings:i}=ot();return e?(0,Y.jsx)(Ne,{onClose:t,children:(0,Y.jsxs)(Pe,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,Y.jsx)($e,{onClose:t,testId:`close-open-workspace-dialog`}),(0,Y.jsx)(`div`,{className:`w-full pr-6`,children:(0,Y.jsx)(Le,{title:r(g.HOME$OPEN_WORKSPACE)})}),(0,Y.jsx)(`div`,{className:`w-full`,"data-testid":`open-workspace-dialog-body`,children:(0,Y.jsx)(Mn,{isLoadingSettings:i,onConfirm:e=>{n(e),t()}})})]})}):null}function Pn({onRepoSelection:e,isLoadingSettings:t=!1,onConfirm:n}){let{navigate:r}=We(),[i,a]=J.useState(null),[o,c]=J.useState(null),[l,d]=J.useState(null),{providers:f}=ot(),{addRecentRepository:p,setLastSelectedProvider:m,getLastSelectedProvider:h}=st(),{mutate:_,isPending:v,isSuccess:y}=nt(),b=u(),{t:x}=s(`openhands`);J.useEffect(()=>{if(f.length!==0){if(f.length===1&&!l){d(f[0]);return}if(f.length>1&&!l){let e=h();e&&f.includes(e)&&d(e)}}},[f,l,h]);let S=v||y||b,C=t=>{t!==l&&(d(t),m(t),a(null),c(null),e?.(null))},w=J.useCallback(e=>{c(e)},[]);return(0,Y.jsxs)(`div`,{className:`flex flex-col`,children:[!n&&(0,Y.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,Y.jsxs)(`div`,{className:`flex items-center gap-[10px] pb-4`,children:[(0,Y.jsx)(et,{width:24,height:24}),(0,Y.jsx)(`span`,{className:`leading-5 font-bold text-base text-white`,children:x(g.COMMON$OPEN_REPOSITORY)})]})}),(0,Y.jsxs)(`div`,{className:`flex flex-col gap-[10px] pb-4`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Y.jsx)(`span`,{className:`text-sm text-white font-normal leading-[22px]`,children:x(g.HOME$SELECT_OR_INSERT_URL)}),f.length<=1?null:(0,Y.jsx)(wt,{providers:f,value:l,className:`max-w-[500px]`,onChange:C,disabled:t})]}),(0,Y.jsx)(Ut,{provider:l||f[0],value:i?.id||null,repositoryName:i?.full_name||null,placeholder:`user/repo`,disabled:!l||t,onChange:t=>{t?(e?.(t),a(t)):(e?.(null),a(null),c(null))},className:`max-w-auto`}),(()=>{let e=i?.main_branch||null;return(0,Y.jsx)(Et,{repository:i?.full_name||null,provider:l||f[0],selectedBranch:o,onBranchSelect:w,defaultBranch:e,className:`max-w-full`,disabled:!i||t})})()]}),(0,Y.jsx)(Ue,{testId:`repo-launch-button`,variant:`primary`,type:`button`,isDisabled:!i||!o||!n&&S||f.length>1&&!l||t,onClick:()=>{if(!(!i||!o)){if(p(i),n){n({repository:i,branch:o,provider:l});return}_({repository:{name:i.full_name||``,gitProvider:i.git_provider||`github`,branch:o.name||`main`},entryPoint:`home_repo_form`},{onSuccess:e=>r(`/conversations/${e.conversation_id}`)})}},className:`w-full`,children:x(n?g.BUTTON$CONFIRM:S?g.HOME$LOADING:g.BUTTON$LAUNCH)})]})}function Fn({isOpen:e,onClose:t,onConfirm:n}){let{t:r}=s(`openhands`),{isLoadingSettings:i}=ot();return e?(0,Y.jsx)(Ne,{onClose:t,children:(0,Y.jsxs)(Pe,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,Y.jsx)($e,{onClose:t,testId:`close-open-repository-dialog`}),(0,Y.jsx)(`div`,{className:`w-full pr-6`,children:(0,Y.jsx)(Le,{title:r(g.COMMON$OPEN_REPOSITORY)})}),(0,Y.jsx)(`div`,{className:`w-full`,"data-testid":`open-repository-dialog-body`,children:(0,Y.jsx)(Pn,{isLoadingSettings:i,onConfirm:e=>{n(e),t()}})})]})}):null}function In({mode:e}){return e===`new_worktree`?(0,Y.jsx)(ue,{className:`size-3`,strokeWidth:2,"aria-hidden":!0}):(0,Y.jsx)(et,{width:12,height:12,color:`white`,"aria-hidden":!0})}var Ln=[`local_repo`,`new_worktree`];function Rn({value:e,backendKind:t,onChange:n,disabled:r=!1,testId:i=`workspace-mode-selector`}){let{t:a}=s(`openhands`),[o,c]=(0,J.useState)(!1),l=(0,J.useRef)(null),u=a(Zt(e,t));return(0,J.useEffect)(()=>{if(!o)return;let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[o]),(0,J.useEffect)(()=>{if(!o)return;let e=e=>{e.key===`Escape`&&c(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[o]),(0,Y.jsxs)(`div`,{ref:l,className:`relative inline-flex`,children:[(0,Y.jsxs)(`button`,{type:`button`,"data-testid":i,"aria-haspopup":`menu`,"aria-expanded":o,"aria-label":u,disabled:r,onClick:()=>c(e=>!e),className:_(`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,Y.jsx)(`span`,{className:`flex size-3 shrink-0 items-center justify-center`,children:(0,Y.jsx)(In,{mode:e})}),(0,Y.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-normal leading-5`,children:u}),(0,Y.jsx)(v,{className:`size-3 shrink-0 text-white`,"aria-hidden":!0})]}),o?(0,Y.jsx)(`div`,{role:`menu`,"data-testid":`${i}-menu`,className:_(`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`,qe),children:Ln.map(r=>{let o=a(Zt(r,t));return(0,Y.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":r===e,"data-testid":`${i}-option-${r}`,onClick:()=>{n(r),c(!1)},className:Ye,children:[(0,Y.jsx)(`span`,{className:Xe,children:(0,Y.jsx)(In,{mode:r})}),(0,Y.jsx)(`span`,{className:`truncate`,children:o})]},r)})}):null]})}function zn({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,Y.jsxs)(`div`,{className:`flex flex-row gap-2.5 items-center flex-wrap`,"data-testid":`home-git-control-bar-preview`,children:[(0,Y.jsx)(jt,{selectedRepository:t?.full_name??null,gitProvider:r??null,workspaceName:c,onClick:o}),e?(0,Y.jsx)(Rn,{value:i,backendKind:a,onChange:s}):null,n?(0,Y.jsx)(Ot,{selectedBranch:n.name,selectedRepository:t?.full_name??null,gitProvider:r??null}):null]})}function Bn(){let{t:e}=s(`openhands`),{backend:t}=p(),{navigate:n}=We(),r=t.kind===`local`,[i,a]=(0,J.useState)(!1),[o,c]=(0,J.useState)(null),[d,_]=(0,J.useState)(null),[v,y]=(0,J.useState)(null),[b,x]=(0,J.useState)(null),[S,C]=(0,J.useState)(()=>Yt()),[w,T]=(0,J.useState)([]),[E,D]=(0,J.useState)(!1),{mutateAsync:O,isPending:k}=nt(),A=u(),j=k||A,{isConfigured:M,isLoading:N}=Ze(),P=!N&&!M,{images:F,files:I,imagesMarkedUploadAsFile:L,clearAllFiles:R}=Qe(),{handleUpload:z}=kt(),{error:B}=he({enabled:r}),V=r?fe(B,e):null,ee=e=>{C(e),r&&Xt(e)},H=r?!!o:!!d&&!!v,te=Mt(null,t=>{let i=t.trim(),a=F.length>0||I.length>0;if(!i&&!a||j||P)return;let s={images:[...F],files:[...I]},c={query:a?void 0:i||void 0,entryPoint:`home_chat_launcher`};r&&o?c={...c,workingDir:o.path,workspaceMode:S}:!r&&d&&v&&(c={...c,repository:{name:d.full_name,gitProvider:d.git_provider,branch:v.name}}),w.length>0&&(c={...c,plugins:w});let u=l.loading(e(g.HOME$CREATING_CONVERSATION),m);(async()=>{try{let t=await O(c);l.dismiss(u);try{sessionStorage.removeItem(St)}catch{}let o=t.conversation_id,d=o.startsWith(`task-`);if(a)if(!r||d){let e=t.task_id??(d?o.slice(5):null);if(!e){h(null);return}xt(e,{content:i,images:s.images,files:s.files,imagesMarkedUploadAsFile:[...L]}),R(),await Gt({conversationId:o,text:i,images:s.images,imagesMarkedUploadAsFile:L}),n(`/conversations/${o}`);return}else try{await Pt({conversationId:o,content:i,images:s.images,files:s.files,imagesMarkedUploadAsFile:L,t:e}),R()}catch(e){h(e instanceof Error?e.message:null);return}d&&i&&await Gt({conversationId:o,text:i,images:[],imagesMarkedUploadAsFile:[]}),n(`/conversations/${o}`)}catch(e){l.dismiss(u),h(e instanceof Error?e.message:null)}})()});return(0,Y.jsxs)(`div`,{"data-testid":`home-chat-launcher`,className:`flex w-full flex-col items-center pt-[max(4rem,28vh)] pb-10`,children:[(0,Y.jsxs)(`div`,{className:`flex w-full max-w-[800px] flex-col gap-4 md:px-4`,children:[(0,Y.jsx)(`div`,{className:`flex w-full justify-center`,children:(0,Y.jsx)(En,{})}),(0,Y.jsx)(`div`,{className:`w-full`,children:(0,Y.jsx)(Tt,{onSubmit:te,onFilesPaste:z,disabled:j||P})}),(0,Y.jsxs)(`div`,{className:`flex items-center justify-start gap-2`,children:[H?(0,Y.jsx)(zn,{workspace:o,repository:d,branch:v,provider:b,workspaceMode:S,backendKind:t.kind,onRepoClick:()=>a(!0),onWorkspaceModeChange:ee}):(0,Y.jsx)(Dn,{kind:r?`local`:`cloud`,onClick:()=>a(!0),disabled:j||!!V,disabledTooltip:V}),(0,Y.jsx)(on,{count:w.length,onClick:()=>D(!0),disabled:j})]}),(0,Y.jsxs)(`div`,{className:`mt-8 flex w-full flex-col gap-8`,children:[(0,Y.jsx)(f,{variant:`rail`}),(0,Y.jsx)(yn,{}),(0,Y.jsx)(Tn,{})]})]}),r?(0,Y.jsx)(Nn,{isOpen:i,onClose:()=>a(!1),onConfirm:e=>{c(e),_(null),y(null),x(null)}}):(0,Y.jsx)(Fn,{isOpen:i,onClose:()=>a(!1),onConfirm:({repository:e,branch:t,provider:n})=>{_(e),y(t),x(n??e.git_provider),c(null),C(`local_repo`)}}),E&&(0,Y.jsx)(an,{selected:w,onChange:T,onClose:()=>D(!1)})]})}function Vn(){let e=ve(a().search);return(0,Y.jsxs)(`div`,{"data-testid":`home-screen`,className:`custom-scrollbar-always h-full overflow-y-auto rounded-xl bg-transparent px-4 md:px-0 lg:px-[42px]`,children:[(0,Y.jsx)(`div`,{className:`md:px-4 lg:px-0`,children:(0,Y.jsx)(Nt,{})}),(0,Y.jsx)(Bn,{}),e?null:(0,Y.jsx)(Ce,{})]})}var Hn=o(Vn);export{Hn as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./home-BorS_vdS.js";export{e as default};
|