@openhands/agent-canvas 1.4.0 → 1.5.1
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 +11 -12
- package/README.windows.md +4 -2
- package/build/assets/{Trans-Ch-OVWEA.js → Trans-DqF_OEZB.js} +1 -1
- package/build/assets/{acp-providers-Sy2LKyMa.js → acp-providers-DerAmTyY.js} +1 -1
- package/build/assets/active-backend-context-B8rMv0X9.js +1 -0
- package/build/assets/{add-backend-modal-Bgy8anoR.js → add-backend-modal-CxC7BNEc.js} +1 -1
- package/build/assets/{agent-profiles-settings-3mmXljZX.js → agent-profiles-settings-BJb8YXR1.js} +1 -1
- package/build/assets/agent-server-compatibility-BWN-EIQn.js +1 -0
- package/build/assets/agent-server-conversation-service.api-DSPIkMwJ.js +41 -0
- package/build/assets/{agent-settings-B-W10B4E.js → agent-settings-CgCnqaAA.js} +2 -2
- package/build/assets/agent-settings-DDkSavD7.js +1 -0
- package/build/assets/{alert-banner-Bpf2NQJq.js → alert-banner-Dh51WURQ.js} +1 -1
- package/build/assets/api-key-entry-screen-iZc7n8AI.js +1 -0
- package/build/assets/app-settings-B5zyipxJ.js +1 -0
- package/build/assets/automation-detail-CZsu2CoM.js +2 -0
- package/build/assets/automation-export-BwRX6H32.js +2 -0
- package/build/assets/automations-list-lHAVzMoA.js +1 -0
- package/build/assets/{back-nav-button-CUS2mi-U.js → back-nav-button-DVknCcSP.js} +1 -1
- package/build/assets/backend-form-modal-RGcu909r.js +1 -0
- package/build/assets/{backend-synced-settings-badge-D9hZx05w.js → backend-synced-settings-badge-BSfN0AZA.js} +1 -1
- package/build/assets/{base-modal-BuF2f0YL.js → base-modal-CIF_785P.js} +1 -1
- package/build/assets/{bot-D7eUAuSB.js → bot-C-EA6685.js} +1 -1
- package/build/assets/{brand-button-vMVuyDXu.js → brand-button-B1izLAdR.js} +1 -1
- package/build/assets/{browser-BifzWIBd.js → browser-DKaeq_sT.js} +3 -3
- package/build/assets/{browser-tab-CkkqJnqw.js → browser-tab-qb_ftCxW.js} +1 -1
- package/build/assets/canvas-ui-COgjltGz.js +1 -0
- package/build/assets/{chat-send-button-B_jc5z5C.js → chat-send-button-BZHG2hAW.js} +1 -1
- package/build/assets/check-TbOEtHKj.js +1 -0
- package/build/assets/{chevron-down-CI8A6tet.js → chevron-down-D7IvFMBM.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-C5YxjxvI.js → circle-plus-check-toggle-DoFIjVE0.js} +1 -1
- package/build/assets/client-source-BZK8vRs2.js +1 -0
- package/build/assets/cloud-funnel-analytics-Zcv57hfT.js +1 -0
- package/build/assets/{color-themes-DPBzNtVg.js → color-themes-CHizm1xF.js} +1 -1
- package/build/assets/{combobox-caret-DoObzqf4.js → combobox-caret-CxZpqoSR.js} +1 -1
- package/build/assets/{command-menu-D-JV3Wqm.js → command-menu-oTvKDU3Y.js} +1 -1
- package/build/assets/condenser-settings-BGlWn93P.js +1 -0
- package/build/assets/{confirmation-modal-BGLu6XJN.js → confirmation-modal-DGBWM2Ls.js} +1 -1
- package/build/assets/{context-menu-list-item-BD5_EaKN.js → context-menu-list-item-6psNyl7X.js} +1 -1
- package/build/assets/conversation-BoCYx8n2.js +89 -0
- package/build/assets/conversation-DgHqMjnY.js +1 -0
- package/build/assets/conversation-panel-78Rxh_-I.js +1 -0
- package/build/assets/conversation-service.api-_f9GlIEi.js +1 -0
- package/build/assets/{conversation-tab-empty-state-B2dDYEwf.js → conversation-tab-empty-state-CNUmIms2.js} +1 -1
- package/build/assets/{copy-3JCw_XFB.js → copy-D1YGjP-C.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-CaR52OnA.js → copy-to-clipboard-button-CFzH_NOX.js} +1 -1
- package/build/assets/declaration-BGsHjPEW.js +1 -0
- package/build/assets/{device-verify-Dj6I4Iqe.js → device-verify-WBSjJBLH.js} +1 -1
- package/build/assets/{dropdown-classes-DJSXeLqc.js → dropdown-classes-D3wMJlXT.js} +1 -1
- package/build/assets/{ellipsis-button-C5Z-tPFp.js → ellipsis-button-CbNnHlIq.js} +1 -1
- package/build/assets/{entry.client-2_3ePAm0.js → entry.client-DNlPGxsu.js} +2 -2
- package/build/assets/{enum-filter-dropdown-DXbVwiNZ.js → enum-filter-dropdown-JLYv1t8L.js} +1 -1
- package/build/assets/{environment-switch-overlay-DZQfRGTx.js → environment-switch-overlay-B1PFO8P8.js} +1 -1
- package/build/assets/{extensions-hub-CLjmOGqS.js → extensions-hub-CCbLA7IM.js} +1 -1
- package/build/assets/{extensions-navigation-B5MeUiMq.js → extensions-navigation-CPNjMNvR.js} +1 -1
- package/build/assets/{external-link-D2zJjE9G.js → external-link-lhdITPqq.js} +1 -1
- package/build/assets/files-tab-y4K7EXBO.js +1 -0
- package/build/assets/{form-control-classes-ChpNBe9n.js → form-control-classes-CbdN5aO3.js} +1 -1
- package/build/assets/format-time-delta-DhDbkD7V.js +1 -0
- package/build/assets/git-provider-icon-ITvsH4Ko.js +1 -0
- package/build/assets/home-BwbeOWwU.js +1 -0
- package/build/assets/home-DKPGQ5P3.js +1 -0
- package/build/assets/index-home-Bko2Itv5.js +1 -0
- package/build/assets/install-server-modal-Qk1gwyI8.js +1 -0
- package/build/assets/{launch-V_3Rp7WS.js → launch-CAGavYl-.js} +1 -1
- package/build/assets/lesson-plan-DMCPdtrf.js +4 -0
- package/build/assets/{list-todo-BfH6yYUK.js → list-todo-CAtvkzcy.js} +1 -1
- package/build/assets/llm-not-configured-banner-C1ktyb3C.js +27 -0
- package/build/assets/llm-settings-BBsZFi9l.js +1 -0
- package/build/assets/llm-settings-DFkJQr_w.js +1 -0
- package/build/assets/llm-subscription-service-Casyzgn1.js +1 -0
- package/build/assets/loader-circle-CsAsfLIs.js +1 -0
- package/build/assets/{loading-spinner-BLdswi6q.js → loading-spinner-BcdnT0mN.js} +1 -1
- package/build/assets/manage-backends-modal-CKQ46rvw.js +1 -0
- package/build/assets/manifest-03478bbf.js +1 -0
- package/build/assets/{map-provider-BM2SJarp.js → map-provider-BbIb12oh.js} +1 -1
- package/build/assets/{markdown-renderer-DMT7Zkpd.js → markdown-renderer-B4V2OMFP.js} +1 -1
- package/build/assets/{mcp-BQufNPZ6.js → mcp-BapoJsDc.js} +2 -2
- package/build/assets/{messages-BnJCqnFf.js → messages-CUBFMY5o.js} +26 -26
- package/build/assets/{modal-body-DouOE5KH.js → modal-body-Cc2zp0xb.js} +1 -1
- package/build/assets/{modal-classes-Cf-4tbHz.js → modal-classes-3qT9Ap7Q.js} +1 -1
- package/build/assets/{modal-close-button-B6CfxxJj.js → modal-close-button-BcIBUdSq.js} +1 -1
- package/build/assets/model-selector-DJrMrFAr.js +1 -0
- package/build/assets/onboarding-6NMkdNxV.js +1 -0
- package/build/assets/onboarding-modal-Q4AnpIdg.js +1 -0
- package/build/assets/organization-service.api-vrRNwOma.js +1 -0
- package/build/assets/path-utils-PNfCKQDV.js +1 -0
- package/build/assets/{pencil-Dj2XjKmI.js → pencil-CWhApFIT.js} +1 -1
- package/build/assets/{plan-components-CcCBmCzW.js → plan-components-BdZXPyZU.js} +1 -1
- package/build/assets/{planner-tab-Dhyqcqmb.js → planner-tab-ByOw1he8.js} +1 -1
- package/build/assets/plugins-management-service-B75jyC56.js +1 -0
- package/build/assets/profiles-service.api-BQTklD5D.js +1 -0
- package/build/assets/providers-DfTB2gPd.js +1 -0
- package/build/assets/proxy-B3tCGf0X.js +1 -0
- package/build/assets/{recommended-automations-launcher-CTcGTl4d.js → recommended-automations-launcher-Bj7PuHY1.js} +1 -1
- package/build/assets/{refresh-cw-DM82EIyx.js → refresh-cw-B9B7-vsy.js} +1 -1
- package/build/assets/root-CDnuTToz.js +2 -0
- package/build/assets/root-CYWeTrWE.css +1 -0
- package/build/assets/root-layout-DfYVlcRG.js +2 -0
- package/build/assets/{runtime-waiting-state-BsXLElvN.js → runtime-waiting-state-CnyVhX4T.js} +1 -1
- package/build/assets/schema-field-CUwk4wrQ.js +1 -0
- package/build/assets/sdk-section-page-DLLNrYjI.js +1 -0
- package/build/assets/{sdk-settings-schema-Cv7M9eSe.js → sdk-settings-schema-CLR01YIK.js} +1 -1
- package/build/assets/search-dIQ09UY2.js +1 -0
- package/build/assets/secrets-service-CvyPWJhg.js +1 -0
- package/build/assets/{secrets-settings-Cx6yJlyb.js → secrets-settings-CHy72A5C.js} +1 -1
- package/build/assets/{segmented-toggle-DyQqPhoD.js → segmented-toggle-kzwZkLaj.js} +1 -1
- package/build/assets/settings-B9S8UVQr.js +1 -0
- package/build/assets/{settings-dropdown-input-BjunGXJb.js → settings-dropdown-input-Dhx9ErGd.js} +1 -1
- package/build/assets/{settings-index-D6sxWSRk.js → settings-index-BKDl2CQ-.js} +1 -1
- package/build/assets/{settings-input-bD6npsDm.js → settings-input-BsgQWS5R.js} +1 -1
- package/build/assets/{settings-list-classes-Dp_OgzN0.js → settings-list-classes-DSJJX99U.js} +1 -1
- package/build/assets/settings-modal-DeK11CyT.js +1 -0
- package/build/assets/settings-service.api-DXk5TdeJ.js +1 -0
- package/build/assets/{settings-switch-5cuxl8Dc.js → settings-switch-Bes8dIlV.js} +1 -1
- package/build/assets/{settings-utils-BMdG65By.js → settings-utils-DzCVfiR3.js} +1 -1
- package/build/assets/shared-conversation-9atDzTR4.js +1 -0
- package/build/assets/{sidebar-layout-DuzJMMw-.js → sidebar-layout-Bm7pa3Vk.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-VvvX32iF.js → sidebar-mobile-menu-toggle-giMMZctn.js} +1 -1
- package/build/assets/{sidebar-nav-link-5AlTT5-j.js → sidebar-nav-link-CHqyFXwV.js} +1 -1
- package/build/assets/{sidebar-store-CZuE8AH5.js → sidebar-store-uiUXBU1N.js} +1 -1
- package/build/assets/{skill-card-pill-row-eTIkE4nz.js → skill-card-pill-row-BPYKQ3IN.js} +1 -1
- package/build/assets/skills-plugins-Tropusio.js +1 -0
- package/build/assets/{skills-settings-BUv04tSc.js → skills-settings-BvzBBCWk.js} +2 -2
- package/build/assets/{square-chevron-right-Czw3FFWc.js → square-chevron-right-DE-JN-2Z.js} +1 -1
- package/build/assets/{styled-tooltip-CgX2oRaK.js → styled-tooltip-B14i_Uac.js} +1 -1
- package/build/assets/{suspense-BO1Tl_Vf.js → suspense-DmZ3MSSh.js} +1 -1
- package/build/assets/{task-list-tab-0k9PhuqO.js → task-list-tab-DyfgG4MC.js} +1 -1
- package/build/assets/telemetry-C5JMEfqB.js +2 -0
- package/build/assets/{terminal-B61WrJdS.js → terminal-DRXt2Lr4.js} +1 -1
- package/build/assets/{toggle-switch-2j5wwR85.js → toggle-switch-DX_k418f.js} +1 -1
- package/build/assets/{trash-2-Be_7y3Mn.js → trash-2-BU6BlW4i.js} +1 -1
- package/build/assets/{typography-D8mHDeNG.js → typography-CzfoD9DY.js} +1 -1
- package/build/assets/use-acp-credential-form-Bm8qXdlc.js +1 -0
- package/build/assets/{use-activate-agent-profile-20v1xU0H.js → use-activate-agent-profile-DlykqEfN.js} +1 -1
- package/build/assets/{use-active-agent-profile-BkJN7Xsy.js → use-active-agent-profile-hI-x-UBa.js} +1 -1
- package/build/assets/{use-active-conversation-DOZVSVtU.js → use-active-conversation-2qeez40F.js} +1 -1
- package/build/assets/use-agent-profiles-0pr5bLS7.js +1 -0
- package/build/assets/{use-agent-state-DHZO1obC.js → use-agent-state-C6peDXUm.js} +1 -1
- package/build/assets/use-backends-health-CLHPitJM.js +1 -0
- package/build/assets/{use-can-manage-org-profiles-C-OhWVBS.js → use-can-manage-org-profiles-Ck_bsNbH.js} +1 -1
- package/build/assets/use-cloud-current-user-id-DUCSxNjY.js +1 -0
- package/build/assets/use-config-B5r8erYt.js +1 -0
- package/build/assets/use-create-conversation-r1JHfKO5.js +1 -0
- package/build/assets/{use-create-secret-D0HCOZFu.js → use-create-secret-Cf2N11d2.js} +1 -1
- package/build/assets/{use-event-store-DjgU4wfO.js → use-event-store-Bbaz51GR.js} +1 -1
- package/build/assets/{use-handle-plan-click-DyRASKMC.js → use-handle-plan-click-CsAW3FlH.js} +1 -1
- package/build/assets/use-is-authed-BezEyfeh.js +1 -0
- package/build/assets/use-llm-profiles-Dr5__SlZ.js +1 -0
- package/build/assets/use-plugins-marketplace-BplU65ae.js +1 -0
- package/build/assets/use-runtime-is-ready-vCFOcLFa.js +1 -0
- package/build/assets/use-save-agent-profile-RqUGqTv6.js +1 -0
- package/build/assets/use-save-settings-Chvzeu2s.js +1 -0
- package/build/assets/use-settings-CyxSlyTQ.js +1 -0
- package/build/assets/use-settings-nav-items-zEkSO_Bf.js +16 -0
- package/build/assets/use-skills-xrVoKYrF.js +1 -0
- package/build/assets/{use-task-list-AVBLbbcR.js → use-task-list-CfisapBW.js} +1 -1
- package/build/assets/use-tracking-D2Qg5Lpd.js +1 -0
- package/build/assets/{use-user-conversation-zpx7I18x.js → use-user-conversation-CnE4zhOA.js} +1 -1
- package/build/assets/{useMutation-DrCAVg5w.js → useMutation-u8UgRgDK.js} +1 -1
- package/build/assets/{useMutationState-D8QN0ZCy.js → useMutationState-OnAsCLA_.js} +1 -1
- package/build/assets/{useQueries-DClgUTc7.js → useQueries-BpIlT8Mt.js} +1 -1
- package/build/assets/{useQuery-CRBP8vIS.js → useQuery-D5pEZbY0.js} +1 -1
- package/build/assets/{useTranslation-CDRCKC9-.js → useTranslation-Cbf5AGg_.js} +1 -1
- package/build/assets/{utils-D3U3rlqr.js → utils-DB9LsAzA.js} +1 -1
- package/build/assets/{vendor~browser-tab-Di0kh5Zw.js → vendor~browser-tab-CsMb-pta.js} +1 -1
- package/build/assets/{vendor~browser-Cvg7jXCP.js → vendor~browser-wXQ-WZEC.js} +1 -1
- package/build/assets/{vendor~entry.client-9tWQ_Ugw.js → vendor~entry.client-DDuH4--y.js} +1 -1
- package/build/assets/{vendor~entry.client-D6BtSOtn.js → vendor~entry.client-DQGrNspu.js} +1 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js +2 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js +185 -0
- package/build/assets/{vendor~files-tab-B02k3xvx.js → vendor~files-tab-B-5fBohe.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation-CYMF9JYB.js → vendor~index-home~home~conversation-panel~conversation-ChmYLVgz.js} +1 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD7v71DM.js +2 -0
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD0GaRGa.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BT05Osu4.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-D7EUmQ8Y.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-d8aETPbZ.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DqZatR3B.js} +1 -1
- package/build/assets/{vendor~launch-CHXA9cJu.js → vendor~launch-_Km3J77E.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~ivvrgjsa-BlIZPCXX.js → vendor~module-D5a_AClf.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-CpiTHpHl.js → vendor~root-layout~conversation-panel~conversation-8tIsyrPj.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-_TdZcNMD.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-BrguKXCn.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-Cn2jwSga.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CZM4hwUT.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~enjl5xdm-B0EIDu4M.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js} +2 -2
- package/build/assets/{verification-settings-D576N2xa.js → verification-settings-CfkrXoSa.js} +1 -1
- package/build/assets/x-ZE4iplpF.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +9 -0
- package/build/locales/ca/openhands.json +9 -0
- package/build/locales/de/openhands.json +9 -0
- package/build/locales/en/openhands.json +9 -0
- package/build/locales/es/openhands.json +9 -0
- package/build/locales/fr/openhands.json +9 -0
- package/build/locales/it/openhands.json +9 -0
- package/build/locales/ja/openhands.json +9 -0
- package/build/locales/ko-KR/openhands.json +9 -0
- package/build/locales/no/openhands.json +9 -0
- package/build/locales/pt/openhands.json +9 -0
- package/build/locales/tr/openhands.json +9 -0
- package/build/locales/uk/openhands.json +9 -0
- package/build/locales/zh-CN/openhands.json +9 -0
- package/build/locales/zh-TW/openhands.json +9 -0
- package/config/defaults.json +5 -4
- package/dist/api/agent-server-adapter.cjs +3 -3
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.d.ts +9 -1
- package/dist/api/agent-server-adapter.js +105 -102
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/agent-server-config.cjs +1 -1
- package/dist/api/agent-server-config.cjs.map +1 -1
- package/dist/api/agent-server-config.d.ts +3 -0
- package/dist/api/agent-server-config.js +45 -23
- package/dist/api/agent-server-config.js.map +1 -1
- package/dist/api/backend-registry/auth.cjs +1 -1
- package/dist/api/backend-registry/auth.cjs.map +1 -1
- package/dist/api/backend-registry/auth.js +1 -1
- package/dist/api/backend-registry/auth.js.map +1 -1
- package/dist/api/backend-registry/default-backend.cjs +1 -1
- package/dist/api/backend-registry/default-backend.cjs.map +1 -1
- package/dist/api/backend-registry/default-backend.d.ts +3 -0
- package/dist/api/backend-registry/default-backend.js +22 -10
- package/dist/api/backend-registry/default-backend.js.map +1 -1
- package/dist/api/backend-registry/storage.cjs +1 -1
- package/dist/api/backend-registry/storage.cjs.map +1 -1
- package/dist/api/backend-registry/storage.js +38 -33
- package/dist/api/backend-registry/storage.js.map +1 -1
- package/dist/api/backend-registry/types.d.ts +2 -0
- package/dist/api/canvas-ui-client-tool.cjs +38 -0
- package/dist/api/canvas-ui-client-tool.cjs.map +1 -0
- package/dist/api/canvas-ui-client-tool.d.ts +14 -0
- package/dist/api/canvas-ui-client-tool.js +47 -0
- package/dist/api/canvas-ui-client-tool.js.map +1 -0
- package/dist/api/client-source.cjs +2 -0
- package/dist/api/client-source.cjs.map +1 -0
- package/dist/api/client-source.d.ts +9 -0
- package/dist/api/client-source.js +10 -0
- package/dist/api/client-source.js.map +1 -0
- package/dist/api/cloud/client.cjs +2 -0
- package/dist/api/cloud/client.cjs.map +1 -0
- package/dist/api/cloud/client.d.ts +4 -0
- package/dist/api/cloud/client.js +38 -0
- package/dist/api/cloud/client.js.map +1 -0
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
- package/dist/api/cloud/conversation-service.api.js +35 -33
- package/dist/api/cloud/conversation-service.api.js.map +1 -1
- package/dist/api/cloud/organization-service.api.cjs +1 -1
- package/dist/api/cloud/organization-service.api.cjs.map +1 -1
- package/dist/api/cloud/organization-service.api.js +11 -10
- package/dist/api/cloud/organization-service.api.js.map +1 -1
- package/dist/api/cloud/proxy.cjs +1 -1
- package/dist/api/cloud/proxy.cjs.map +1 -1
- package/dist/api/cloud/proxy.d.ts +2 -40
- package/dist/api/cloud/proxy.js +14 -39
- package/dist/api/cloud/proxy.js.map +1 -1
- package/dist/api/conversation-metadata-store.cjs +1 -1
- package/dist/api/conversation-metadata-store.cjs.map +1 -1
- package/dist/api/conversation-metadata-store.d.ts +2 -9
- package/dist/api/conversation-metadata-store.js +13 -9
- package/dist/api/conversation-metadata-store.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +2 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +98 -88
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.types.d.ts +5 -0
- package/dist/api/device-flow-client.cjs +1 -1
- package/dist/api/device-flow-client.cjs.map +1 -1
- package/dist/api/device-flow-client.d.ts +4 -58
- package/dist/api/device-flow-client.js +8 -98
- package/dist/api/device-flow-client.js.map +1 -1
- package/dist/api/git-service/agent-server-git-service.api.cjs +1 -1
- package/dist/api/git-service/agent-server-git-service.api.cjs.map +1 -1
- package/dist/api/git-service/agent-server-git-service.api.d.ts +10 -2
- package/dist/api/git-service/agent-server-git-service.api.js +107 -40
- package/dist/api/git-service/agent-server-git-service.api.js.map +1 -1
- package/dist/api/open-hands.types.d.ts +11 -0
- package/dist/api/option-service/option-service.api.cjs +1 -1
- package/dist/api/option-service/option-service.api.cjs.map +1 -1
- package/dist/api/option-service/option-service.api.js +0 -1
- package/dist/api/option-service/option-service.api.js.map +1 -1
- package/dist/api/option-service/option.types.d.ts +0 -1
- package/dist/api/secrets-service.cjs +1 -1
- package/dist/api/secrets-service.cjs.map +1 -1
- package/dist/api/secrets-service.js +15 -14
- package/dist/api/secrets-service.js.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +73 -64
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.cjs +2 -2
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.js +2 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-observation-content.js.map +1 -1
- package/dist/components/features/backends/backend-form-modal.cjs +1 -1
- package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
- package/dist/components/features/backends/backend-form-modal.d.ts +4 -2
- package/dist/components/features/backends/backend-form-modal.js +108 -101
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/features/backends/backend-row.cjs +1 -1
- package/dist/components/features/backends/backend-row.cjs.map +1 -1
- package/dist/components/features/backends/backend-row.js +2 -1
- package/dist/components/features/backends/backend-row.js.map +1 -1
- 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 +51 -51
- package/dist/components/features/backends/backend-selector.js.map +1 -1
- package/dist/components/features/backends/device-flow-auth.cjs +1 -1
- package/dist/components/features/backends/device-flow-auth.cjs.map +1 -1
- package/dist/components/features/backends/device-flow-auth.d.ts +4 -1
- package/dist/components/features/backends/device-flow-auth.js +38 -38
- package/dist/components/features/backends/device-flow-auth.js.map +1 -1
- package/dist/components/features/chat/chat-interface.cjs +2 -2
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +173 -165
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-actions.js +44 -43
- package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-container.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-container.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-container.d.ts +2 -1
- package/dist/components/features/chat/components/chat-input-container.js +20 -19
- package/dist/components/features/chat/components/chat-input-container.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-profile-picker.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-profile-picker.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-profile-picker.js +44 -32
- package/dist/components/features/chat/components/chat-input-profile-picker.js.map +1 -1
- package/dist/components/features/chat/components/resolve-picker-kind.cjs +1 -1
- package/dist/components/features/chat/components/resolve-picker-kind.cjs.map +1 -1
- package/dist/components/features/chat/components/resolve-picker-kind.d.ts +10 -22
- package/dist/components/features/chat/components/resolve-picker-kind.js +6 -3
- package/dist/components/features/chat/components/resolve-picker-kind.js.map +1 -1
- package/dist/components/features/chat/custom-chat-input.cjs +1 -1
- package/dist/components/features/chat/custom-chat-input.cjs.map +1 -1
- package/dist/components/features/chat/custom-chat-input.d.ts +2 -1
- package/dist/components/features/chat/custom-chat-input.js +52 -51
- package/dist/components/features/chat/custom-chat-input.js.map +1 -1
- package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
- package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
- package/dist/components/features/chat/interactive-chat-box.d.ts +2 -1
- package/dist/components/features/chat/interactive-chat-box.js +9 -8
- package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
- package/dist/components/features/diff-viewer/commit-list.cjs +2 -0
- package/dist/components/features/diff-viewer/commit-list.cjs.map +1 -0
- package/dist/components/features/diff-viewer/commit-list.d.ts +13 -0
- package/dist/components/features/diff-viewer/commit-list.js +27 -0
- package/dist/components/features/diff-viewer/commit-list.js.map +1 -0
- package/dist/components/features/diff-viewer/commit-row.cjs +2 -0
- package/dist/components/features/diff-viewer/commit-row.cjs.map +1 -0
- package/dist/components/features/diff-viewer/commit-row.d.ts +14 -0
- package/dist/components/features/diff-viewer/commit-row.js +59 -0
- package/dist/components/features/diff-viewer/commit-row.js.map +1 -0
- package/dist/components/features/diff-viewer/file-diff-viewer.cjs +1 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.cjs.map +1 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.d.ts +7 -1
- package/dist/components/features/diff-viewer/file-diff-viewer.js +40 -39
- package/dist/components/features/diff-viewer/file-diff-viewer.js.map +1 -1
- package/dist/components/features/plugins/plugin-detail-modal.d.ts +2 -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.d.ts +4 -2
- package/dist/components/providers/agent-server-ui-providers.js +9 -2
- package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
- package/dist/components/providers/index.cjs +1 -1
- package/dist/components/providers/index.d.ts +1 -2
- package/dist/components/providers/index.js +0 -1
- package/dist/components/providers/telemetry-provider.cjs +2 -0
- package/dist/components/providers/telemetry-provider.cjs.map +1 -0
- package/dist/components/providers/telemetry-provider.d.ts +6 -0
- package/dist/components/providers/telemetry-provider.js +64 -0
- package/dist/components/providers/telemetry-provider.js.map +1 -0
- package/dist/components/shared/modals/settings/settings-modal.cjs +1 -1
- package/dist/components/shared/modals/settings/settings-modal.cjs.map +1 -1
- package/dist/components/shared/modals/settings/settings-modal.js +23 -22
- package/dist/components/shared/modals/settings/settings-modal.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +5 -4
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +1 -1
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/constants/canvas-ui.cjs +2 -0
- package/dist/constants/canvas-ui.cjs.map +1 -0
- package/dist/constants/canvas-ui.d.ts +8 -0
- package/dist/constants/canvas-ui.js +6 -0
- package/dist/constants/canvas-ui.js.map +1 -0
- package/dist/contexts/conversation-websocket-context.cjs +3 -3
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.js +197 -204
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.d.ts +2 -1
- package/dist/hooks/mutation/use-create-conversation.js +52 -52
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs.map +1 -1
- package/dist/hooks/mutation/use-save-settings.d.ts +3 -1
- package/dist/hooks/mutation/use-save-settings.js +6 -5
- package/dist/hooks/mutation/use-save-settings.js.map +1 -1
- package/dist/hooks/query/query-keys.cjs +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +2 -0
- package/dist/hooks/query/query-keys.js +4 -1
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-backends-health.cjs +1 -1
- package/dist/hooks/query/use-backends-health.cjs.map +1 -1
- package/dist/hooks/query/use-backends-health.js +50 -48
- package/dist/hooks/query/use-backends-health.js.map +1 -1
- package/dist/hooks/query/use-cloud-organizations.cjs +1 -1
- package/dist/hooks/query/use-cloud-organizations.cjs.map +1 -1
- package/dist/hooks/query/use-cloud-organizations.d.ts +1 -0
- package/dist/hooks/query/use-cloud-organizations.js +5 -2
- package/dist/hooks/query/use-cloud-organizations.js.map +1 -1
- package/dist/hooks/query/use-commit-changes.cjs +2 -0
- package/dist/hooks/query/use-commit-changes.cjs.map +1 -0
- package/dist/hooks/query/use-commit-changes.d.ts +5 -0
- package/dist/hooks/query/use-commit-changes.js +34 -0
- package/dist/hooks/query/use-commit-changes.js.map +1 -0
- package/dist/hooks/query/use-task-polling.cjs +1 -1
- package/dist/hooks/query/use-task-polling.cjs.map +1 -1
- package/dist/hooks/query/use-task-polling.d.ts +3 -2
- package/dist/hooks/query/use-task-polling.js +53 -40
- package/dist/hooks/query/use-task-polling.js.map +1 -1
- package/dist/hooks/query/use-unified-git-commits.cjs +2 -0
- package/dist/hooks/query/use-unified-git-commits.cjs.map +1 -0
- package/dist/hooks/query/use-unified-git-commits.d.ts +10 -0
- package/dist/hooks/query/use-unified-git-commits.js +41 -0
- package/dist/hooks/query/use-unified-git-commits.js.map +1 -0
- package/dist/hooks/query/use-unified-git-diff.cjs +1 -1
- package/dist/hooks/query/use-unified-git-diff.cjs.map +1 -1
- package/dist/hooks/query/use-unified-git-diff.d.ts +5 -0
- package/dist/hooks/query/use-unified-git-diff.js +11 -4
- package/dist/hooks/query/use-unified-git-diff.js.map +1 -1
- package/dist/hooks/use-acp-model-context.cjs +1 -1
- package/dist/hooks/use-acp-model-context.cjs.map +1 -1
- package/dist/hooks/use-acp-model-context.d.ts +4 -1
- package/dist/hooks/use-acp-model-context.js +9 -8
- package/dist/hooks/use-acp-model-context.js.map +1 -1
- package/dist/hooks/use-auto-refresh-files-on-edit.cjs +1 -1
- package/dist/hooks/use-auto-refresh-files-on-edit.cjs.map +1 -1
- package/dist/hooks/use-auto-refresh-files-on-edit.js +1 -1
- package/dist/hooks/use-auto-refresh-files-on-edit.js.map +1 -1
- package/dist/hooks/use-chat-input-model-state.cjs.map +1 -1
- package/dist/hooks/use-chat-input-model-state.d.ts +2 -1
- package/dist/hooks/use-chat-input-model-state.js.map +1 -1
- package/dist/hooks/use-chat-input-profile-state.cjs +1 -1
- package/dist/hooks/use-chat-input-profile-state.cjs.map +1 -1
- package/dist/hooks/use-chat-input-profile-state.d.ts +1 -10
- package/dist/hooks/use-chat-input-profile-state.js +42 -15
- package/dist/hooks/use-chat-input-profile-state.js.map +1 -1
- package/dist/hooks/use-device-flow.cjs +1 -1
- package/dist/hooks/use-device-flow.cjs.map +1 -1
- package/dist/hooks/use-device-flow.d.ts +4 -1
- package/dist/hooks/use-device-flow.js +42 -40
- package/dist/hooks/use-device-flow.js.map +1 -1
- package/dist/hooks/use-telemetry.cjs +1 -1
- package/dist/hooks/use-telemetry.cjs.map +1 -1
- package/dist/hooks/use-telemetry.d.ts +3 -3
- package/dist/hooks/use-telemetry.js +16 -22
- package/dist/hooks/use-telemetry.js.map +1 -1
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +5 -5
- package/dist/hooks/use-tracking.js +37 -37
- package/dist/hooks/use-tracking.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +9 -0
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.js +19 -18
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/translation.cjs +2 -2
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +153 -0
- package/dist/i18n/translation.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +32 -32
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.d.ts +2 -2
- package/dist/lib/index.js +1 -1
- package/dist/locales/ar/openhands.json +9 -0
- package/dist/locales/ca/openhands.json +9 -0
- package/dist/locales/de/openhands.json +9 -0
- package/dist/locales/en/openhands.json +9 -0
- package/dist/locales/es/openhands.json +9 -0
- package/dist/locales/fr/openhands.json +9 -0
- package/dist/locales/it/openhands.json +9 -0
- package/dist/locales/ja/openhands.json +9 -0
- package/dist/locales/ko-KR/openhands.json +9 -0
- package/dist/locales/no/openhands.json +9 -0
- package/dist/locales/pt/openhands.json +9 -0
- package/dist/locales/tr/openhands.json +9 -0
- package/dist/locales/uk/openhands.json +9 -0
- package/dist/locales/zh-CN/openhands.json +9 -0
- package/dist/locales/zh-TW/openhands.json +9 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.js +351 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/cloud-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.js +106 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/device-flow-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js +69 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/clients.js +3 -0
- 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 +18 -2
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js.map +1 -1
- package/dist/node_modules/axios/index.cjs +1 -1
- package/dist/node_modules/axios/index.js +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +3 -3
- package/dist/package.js.map +1 -1
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +59 -60
- package/dist/routes/app-settings.js.map +1 -1
- package/dist/routes/commits-tab.cjs +2 -0
- package/dist/routes/commits-tab.cjs.map +1 -0
- package/dist/routes/commits-tab.d.ts +8 -0
- package/dist/routes/commits-tab.js +45 -0
- package/dist/routes/commits-tab.js.map +1 -0
- package/dist/routes/files-tab.cjs +1 -1
- package/dist/routes/files-tab.cjs.map +1 -1
- package/dist/routes/files-tab.js +148 -127
- package/dist/routes/files-tab.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 +4 -1
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/services/cloud-funnel-analytics.cjs +2 -0
- package/dist/services/cloud-funnel-analytics.cjs.map +1 -0
- package/dist/services/cloud-funnel-analytics.d.ts +4 -0
- package/dist/services/cloud-funnel-analytics.js +39 -0
- package/dist/services/cloud-funnel-analytics.js.map +1 -0
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.d.ts +46 -9
- package/dist/services/telemetry.js +182 -71
- package/dist/services/telemetry.js.map +1 -1
- package/dist/themes/color-themes.cjs.map +1 -1
- package/dist/themes/color-themes.d.ts +3 -6
- package/dist/themes/color-themes.js.map +1 -1
- package/dist/types/agent-server/core/base/action.d.ts +5 -4
- package/dist/types/agent-server/core/base/base.d.ts +3 -2
- package/dist/types/agent-server/core/base/observation.d.ts +1 -1
- package/dist/types/agent-server/type-guards.cjs +1 -1
- package/dist/types/agent-server/type-guards.cjs.map +1 -1
- package/dist/types/agent-server/type-guards.d.ts +3 -5
- package/dist/types/agent-server/type-guards.js +2 -1
- package/dist/types/agent-server/type-guards.js.map +1 -1
- package/dist/types/automation.d.ts +5 -0
- package/dist/utils/api-error-message.d.ts +11 -0
- package/dist/utils/automation-timeout.d.ts +19 -0
- package/dist/utils/base-path.cjs +2 -0
- package/dist/utils/base-path.cjs.map +1 -0
- package/dist/utils/base-path.d.ts +2 -0
- package/dist/utils/base-path.js +23 -0
- package/dist/utils/base-path.js.map +1 -0
- package/dist/utils/error-handler.cjs +1 -1
- package/dist/utils/error-handler.cjs.map +1 -1
- package/dist/utils/error-handler.d.ts +1 -4
- package/dist/utils/error-handler.js +6 -7
- package/dist/utils/error-handler.js.map +1 -1
- package/dist/utils/map-provider.cjs +1 -1
- package/dist/utils/map-provider.cjs.map +1 -1
- package/dist/utils/map-provider.d.ts +1 -0
- package/dist/utils/map-provider.js +2 -1
- package/dist/utils/map-provider.js.map +1 -1
- package/package.json +3 -3
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +7 -8
- package/scripts/dev-static.mjs +3 -0
- package/scripts/dev-with-automation.mjs +3 -0
- package/scripts/docker-build.mjs +4 -0
- package/scripts/static-server.mjs +93 -7
- package/tools/canvas_ui_tool.py +14 -8
- package/build/assets/active-backend-context-hxq31W25.js +0 -1
- package/build/assets/agent-server-client-options-DVLRd9sw.js +0 -1
- package/build/assets/agent-server-conversation-service.api-CuSdr4Qb.js +0 -5
- package/build/assets/agent-settings-D_yOy8XB.js +0 -1
- package/build/assets/api-key-entry-screen-Dl0qVYi4.js +0 -1
- package/build/assets/app-settings-yVizGXox.js +0 -1
- package/build/assets/automation-detail-dvJfLs5u.js +0 -2
- package/build/assets/automation-export-BPcgLqPD.js +0 -2
- package/build/assets/automations-list-CUXogTe0.js +0 -1
- package/build/assets/backend-form-modal-CQJGmItq.js +0 -1
- package/build/assets/check-Bvi71siz.js +0 -1
- package/build/assets/condenser-settings-Ca8fYZ_Z.js +0 -1
- package/build/assets/conversation-9NBSRoR9.js +0 -1
- package/build/assets/conversation-BXg6Oti2.js +0 -89
- package/build/assets/conversation-panel-CZri9Rup.js +0 -1
- package/build/assets/conversation-service.api-DPBQvTKD.js +0 -1
- package/build/assets/declaration-gq8V5eTU.js +0 -1
- package/build/assets/files-tab-UVoray88.js +0 -1
- package/build/assets/git-provider-icon-o6hdnJUB.js +0 -1
- package/build/assets/handle-capture-consent-CPMXU29K.js +0 -1
- package/build/assets/home-D1IHvGTN.js +0 -1
- package/build/assets/index-redirect-CUUJiNki.js +0 -1
- package/build/assets/install-server-modal-BbuQaA2w.js +0 -1
- package/build/assets/lesson-plan-jC0HBoe6.js +0 -4
- package/build/assets/llm-not-configured-banner-DoARbcdL.js +0 -27
- package/build/assets/llm-settings-4JMLV8mq.js +0 -1
- package/build/assets/llm-settings-D91gMw3U.js +0 -1
- package/build/assets/llm-subscription-service-CKyaV24y.js +0 -1
- package/build/assets/loader-circle-BEykUKYG.js +0 -1
- package/build/assets/manage-backends-modal-DkWAMSle.js +0 -1
- package/build/assets/manifest-aa5c29f6.js +0 -1
- package/build/assets/model-selector-BfqpMkSJ.js +0 -1
- package/build/assets/mouse-pointer-click-PdEQPL6v.js +0 -1
- package/build/assets/onboarding-Bu-HN1ze.js +0 -1
- package/build/assets/onboarding-modal-CZgjs5Bx.js +0 -1
- package/build/assets/option-service.api-BrZ5q87N.js +0 -1
- package/build/assets/organization-service.api-Bk4pCGU1.js +0 -1
- package/build/assets/path-utils-CSmuZoix.js +0 -1
- package/build/assets/plugins-management-service-BRBLxvUl.js +0 -1
- package/build/assets/profiles-service.api-BMXQ9pZC.js +0 -1
- package/build/assets/providers-BpO967xS.js +0 -1
- package/build/assets/proxy-BgJLtxu7.js +0 -1
- package/build/assets/root-BM5WgQ4_.js +0 -2
- package/build/assets/root-V8fkplMy.css +0 -1
- package/build/assets/root-layout-BdoyoobY.js +0 -2
- package/build/assets/schema-field-BSHrUMme.js +0 -1
- package/build/assets/sdk-section-page-t82gsOqa.js +0 -1
- package/build/assets/search-4DHskuhE.js +0 -1
- package/build/assets/secrets-service-B2GqPV0N.js +0 -1
- package/build/assets/settings-DmPLkgq0.js +0 -1
- package/build/assets/settings-modal-CwrZKrTq.js +0 -1
- package/build/assets/settings-service.api-Ce-ub11I.js +0 -1
- package/build/assets/shared-conversation-BDREQPnE.js +0 -1
- package/build/assets/skills-plugins-2Y44YHbO.js +0 -1
- package/build/assets/use-acp-credential-form-MzZM6D7D.js +0 -1
- package/build/assets/use-agent-profiles-DwZxnwO5.js +0 -1
- package/build/assets/use-backends-health-CRHzuvxO.js +0 -1
- package/build/assets/use-cloud-current-user-id-utFreJ0i.js +0 -1
- package/build/assets/use-config-mJrtZHP1.js +0 -1
- package/build/assets/use-create-conversation-DdqsP78F.js +0 -1
- package/build/assets/use-is-authed-B6M0mcGL.js +0 -1
- package/build/assets/use-llm-profiles-RC-PkpBl.js +0 -1
- package/build/assets/use-plugins-marketplace-FHlbeQ4c.js +0 -1
- package/build/assets/use-runtime-is-ready-RKj2WmEh.js +0 -1
- package/build/assets/use-save-agent-profile-tvDP15mh.js +0 -1
- package/build/assets/use-save-settings-BGlSfuYn.js +0 -1
- package/build/assets/use-settings-CH5LzXD8.js +0 -1
- package/build/assets/use-settings-nav-items-Dwktv8wo.js +0 -16
- package/build/assets/use-skills-CSzSL6HG.js +0 -1
- package/build/assets/use-tracking-BIXzagSI.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~lf310vj7-CSVPGId3.js +0 -10
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~nfpll1wp-BCpa95De.js +0 -177
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jewnulst-C57fm7C-.js +0 -1
- package/build/assets/vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CqXiHwjU.js +0 -2
- package/build/assets/x-Cb0WAtak.js +0 -1
- package/dist/components/providers/posthog-wrapper.cjs +0 -2
- package/dist/components/providers/posthog-wrapper.cjs.map +0 -1
- package/dist/components/providers/posthog-wrapper.d.ts +0 -4
- package/dist/components/providers/posthog-wrapper.js +0 -49
- package/dist/components/providers/posthog-wrapper.js.map +0 -1
- package/dist/node_modules/posthog-js/react/dist/esm/index.cjs +0 -2
- package/dist/node_modules/posthog-js/react/dist/esm/index.cjs.map +0 -1
- package/dist/node_modules/posthog-js/react/dist/esm/index.js +0 -113
- package/dist/node_modules/posthog-js/react/dist/esm/index.js.map +0 -1
- package/dist/utils/handle-capture-consent.cjs +0 -2
- package/dist/utils/handle-capture-consent.cjs.map +0 -1
- package/dist/utils/handle-capture-consent.d.ts +0 -7
- package/dist/utils/handle-capture-consent.js +0 -8
- package/dist/utils/handle-capture-consent.js.map +0 -1
- /package/build/assets/{__vite-browser-external-4xJsU2-u.js → __vite-browser-external-BQUj0sYu.js} +0 -0
- /package/build/assets/{agent-server-ui-style-scope-COnDHTm5.js → agent-server-ui-style-scope-qhnhZHBV.js} +0 -0
- /package/build/assets/{automation-BU8zu-FP.js → automation-LZB0MjdV.js} +0 -0
- /package/build/assets/{close-p3Op5lxI.js → close-DLFb5kfv.js} +0 -0
- /package/build/assets/{common-Dh7OqABE.js → common-CxbUL3nR.js} +0 -0
- /package/build/assets/{createLucideIcon-CVAsW2Yo.js → createLucideIcon-D4Tak8A1.js} +0 -0
- /package/build/assets/{folder-mMWFvaw0.js → folder-Bk311brm.js} +0 -0
- /package/build/assets/{get-language-from-path-CPNnuVhI.js → get-language-from-path-DBqBsCWH.js} +0 -0
- /package/build/assets/{git-status-mapper-BI8FyUVp.js → git-status-mapper-DnL9OC8_.js} +0 -0
- /package/build/assets/{iconBase-DaTRRUjy.js → iconBase-Dz51Zn5x.js} +0 -0
- /package/build/assets/{link-external-DfKQroKX.js → link-external-CaBmUEs_.js} +0 -0
- /package/build/assets/{search-BsjCEFNf.js → search-BgOCR7_c.js} +0 -0
- /package/build/assets/{settings-like-page-layout-classes-DENKlZpD.js → settings-like-page-layout-classes-Cdl6jOe5.js} +0 -0
- /package/build/assets/{skills-9cDZONKh.js → skills-EqzxYBvT.js} +0 -0
- /package/build/assets/{terminal-BuLtIrb9.js → terminal-Cgf___rK.js} +0 -0
- /package/build/assets/{u-check-circle-half-LiwZkuFe.js → u-check-circle-half-MsShT8Ec.js} +0 -0
- /package/build/assets/{u-edit-DJ90xc8Z.js → u-edit-DL5LgKon.js} +0 -0
- /package/build/assets/{use-breakpoint-B-O0lQ84.js → use-breakpoint-BP3lqLMx.js} +0 -0
- /package/build/assets/{use-click-outside-element-Bf4Omzot.js → use-click-outside-element-D9BYdANT.js} +0 -0
- /package/build/assets/{use-launch-skill-in-chat-BnoDgvAy.js → use-launch-skill-in-chat-DJWEfVc5.js} +0 -0
- /package/build/assets/{vendor~browser-Dqd33JyP.js → vendor~browser-By2MVv_N.js} +0 -0
- /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js → vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~epa72zsm-B4rXs7Zd.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js} +0 -0
- /package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-9UMeuPV6.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js} +0 -0
- /package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DTzw2x50.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-FghQ3Z1a.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~ki5qnp0d-rV6d1Iv_.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~mcp~automations-list~onboarding-modal-CXyYYvYh.js → vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js} +0 -0
- /package/build/assets/{vendor~terminal-aeP3PnKf.js → vendor~terminal-CnKZILnC.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r,k as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{r as a}from"./path-utils-PNfCKQDV.js";import{n as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js";import{t as s}from"./useTranslation-Cbf5AGg_.js";import{t as c}from"./declaration-BGsHjPEW.js";import{S as l,n as u,x as d}from"./active-backend-context-B8rMv0X9.js";import{t as f}from"./chevron-down-D7IvFMBM.js";import{t as p}from"./vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js";import{a as m,c as h,d as g,f as _,i as v,l as y,n as b,o as x,p as S,r as C,s as w,t as T,u as E}from"./onboarding-6NMkdNxV.js";import{t as D}from"./search-dIQ09UY2.js";import{t as O}from"./x-ZE4iplpF.js";import{t as k}from"./utils-DB9LsAzA.js";import{t as A}from"./modal-backdrop-zVwfOJZr.js";import{n as j,r as M,t as N}from"./modal-body-Cc2zp0xb.js";import{r as P}from"./base-modal-CIF_785P.js";import{_ as F,i as I,m as L,s as R}from"./form-control-classes-CbdN5aO3.js";import{t as z}from"./brand-button-B1izLAdR.js";import{n as B}from"./navigation-context-DPs2G0X8.js";import{t as V}from"./styled-tooltip-B14i_Uac.js";import{i as H,n as U,o as W,u as G}from"./dropdown-classes-D3wMJlXT.js";import{c as ee,n as K,s as q}from"./git-provider-icon-ITvsH4Ko.js";import{t as J}from"./conversation-store-LptbOvKa.js";import{t as te}from"./modal-close-button-BcIBUdSq.js";import{n as ne}from"./use-create-conversation-r1JHfKO5.js";import{r as re}from"./recommended-automations-launcher-Bj7PuHY1.js";import{t as ie}from"./folder-Bk311brm.js";import{r as Y}from"./typography-CzfoD9DY.js";import{i as ae,n as oe,t as se}from"./extension-module-card-classes-9V3J9J_b.js";import{n as ce}from"./circle-plus-check-toggle-DoFIjVE0.js";import{A as le,H as ue,I as de,R as fe,V as pe,a as me,c as he,d as ge,f as _e,h as ve,i as ye,l as be,m as xe,n as Se,o as Ce,p as we,r as Te,s as Ee,t as De,u as Oe,z as ke}from"./llm-not-configured-banner-C1ktyb3C.js";import{m as Ae}from"./lesson-plan-DMCPdtrf.js";import{t as je}from"./use-plugins-marketplace-BplU65ae.js";var X=e(t(),1);async function Me(e){let{imagesToEmbed:t}=ue(e.images,e.imagesMarkedUploadAsFile),n=await Promise.all(t.map(e=>fe(e)));Ae.getState().enqueuePendingMessage({conversationId:e.conversationId,text:e.text,content:e.text,imageUrls:n,fileUrls:[]})}var Z=n();function Ne({plugin:e,isSelected:t,isDisabled:n=!1,onToggle:r}){return(0,Z.jsxs)(`div`,{"data-testid":`plugin-picker-card-${e.name}`,className:k(`flex min-w-0 items-start justify-between gap-3 rounded-lg bg-tertiary p-4`),children:[(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsx)(`h3`,{"data-testid":`plugin-picker-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),(0,Z.jsx)(`p`,{className:`mt-0.5 min-w-0 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),e.description?(0,Z.jsx)(`p`,{className:`mt-1 line-clamp-2 text-xs text-tertiary-light`,children:e.description}):null,e.repo_path||e.ref?(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[e.repo_path?(0,Z.jsx)(`span`,{className:ae,children:e.repo_path}):null,e.ref?(0,Z.jsxs)(`span`,{className:ae,children:[`@`,e.ref]}):null]}):null]}),(0,Z.jsx)(ce,{testId:`plugin-picker-toggle-${e.name}`,isSelected:t,isDisabled:n,onToggle:r,enableLabelKey:c.BUTTON$ADD,disableLabelKey:c.COMMON$REMOVE,enableTooltipKey:c.BUTTON$ADD,disableTooltipKey:c.COMMON$REMOVE})]})}function Q(e){return[e.source,e.ref??``,e.repo_path??``].join(`\0`)}function Pe(e){return{source:e.source,ref:e.ref??null,repo_path:e.repo_path??null}}function Fe(e,t){let n=Q(t);return e.some(e=>Q(e)===n)}function Ie(e,t){let n=Q(t);return e.some(e=>Q(e)===n)?e.filter(e=>Q(e)!==n):[...e,Pe(t)]}function Le(e,t){let n=t.trim().toLowerCase();return n?[e.name,e.description,e.source,e.repo_path,e.ref].filter(e=>typeof e==`string`&&e.length>0).some(e=>e.toLowerCase().includes(n)):!0}function Re({selected:e,onChange:t,disabled:n=!1}){let{t:r}=s(`openhands`),{data:i,isLoading:a,isError:o}=je(),[l,u]=(0,X.useState)(``),d=(i??[]).filter(e=>Le(e,l));return(0,Z.jsxs)(`div`,{"data-testid":`plugin-picker`,className:`flex w-full flex-col gap-3`,children:[(0,Z.jsxs)(`div`,{className:k(`relative flex min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`transition-colors focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`),children:[(0,Z.jsx)(D,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,Z.jsx)(`input`,{"data-testid":`plugin-picker-search-input`,type:`search`,value:l,onChange:e=>u(e.target.value),placeholder:r(c.PLUGINS$PICKER_SEARCH_PLACEHOLDER),"aria-label":r(c.PLUGINS$PICKER_SEARCH_PLACEHOLDER),className:k(`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`)}),l?(0,Z.jsx)(`button`,{type:`button`,onClick:()=>u(``),"aria-label":r(c.MCP$SEARCH_CLEAR),className:`mr-2 cursor-pointer rounded p-1 text-tertiary-alt hover:text-white`,children:(0,Z.jsx)(O,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),a?(0,Z.jsx)(`p`,{"data-testid":`plugin-picker-loading`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(c.PLUGINS$PICKER_LOADING)}):o?(0,Z.jsx)(`p`,{"data-testid":`plugin-picker-error`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(c.PLUGINS$PICKER_ERROR)}):d.length===0?(0,Z.jsx)(`p`,{"data-testid":`plugin-picker-empty`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(c.PLUGINS$PICKER_EMPTY)}):(0,Z.jsx)(`div`,{className:oe,children:(0,Z.jsx)(`div`,{className:se,children:d.map(r=>(0,Z.jsx)(Ne,{plugin:r,isSelected:Fe(e,r),isDisabled:n,onToggle:()=>t(Ie(e,r))},`${r.source} ${r.ref??``} ${r.repo_path??``} ${r.name}`))})})]})}function ze({selected:e,onChange:t,onClose:n}){let{t:r}=s(`openhands`);return(0,Z.jsx)(A,{onClose:n,children:(0,Z.jsxs)(`div`,{"data-testid":`plugin-picker-modal`,className:k(`relative flex max-h-[80vh] flex-col gap-4 rounded-xl border border-[var(--oh-border)] bg-base-secondary p-6`,M(`lg`),N),children:[(0,Z.jsx)(te,{onClose:n,testId:`plugin-picker-close`}),(0,Z.jsxs)(`div`,{className:`pr-6`,children:[(0,Z.jsx)(Y.H2,{children:r(c.PLUGINS$PICKER_TITLE)}),(0,Z.jsx)(Y.Text,{className:`mt-1 block text-sm text-tertiary-light`,children:r(c.PLUGINS$PICKER_SUBTITLE)})]}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:(0,Z.jsx)(Re,{selected:e,onChange:t})}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between border-t border-[var(--oh-border-subtle)] pt-4`,children:[(0,Z.jsx)(Y.Text,{className:`text-sm text-tertiary-light`,children:r(c.PLUGINS$PICKER_SELECTED_COUNT,{count:e.length})}),(0,Z.jsx)(z,{testId:`plugin-picker-done`,type:`button`,variant:`primary`,onClick:n,className:`px-4`,children:r(c.PLUGINS$PICKER_DONE)})]})]})})}function Be({count:e,onClick:t,disabled:n=!1}){let{t:r}=s(`openhands`);return(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`open-plugin-picker`,onClick:t,disabled:n,className:k(`flex flex-row items-center gap-2 rounded-full px-2.5 py-1 text-white`,I,L,F,n?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-surface-raised`),children:[(0,Z.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center`,children:(0,Z.jsx)(le,{width:16,height:16,className:`shrink-0`,"aria-hidden":!0})}),(0,Z.jsx)(`span`,{className:`text-sm font-normal leading-5`,children:r(c.PLUGINS$PICKER_TRIGGER)}),e>0?(0,Z.jsx)(`span`,{"data-testid":`plugin-picker-count`,className:`inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white px-1 text-[11px] font-semibold leading-none text-black`,children:e}):null]})}function Ve(){let{t:e}=s(`openhands`);return(0,Z.jsx)(`div`,{className:`flex min-h-[80px] w-full items-center justify-center py-2`,children:(0,Z.jsx)(Y.H1,{className:`w-full text-center leading-normal`,children:e(c.HOME$LETS_START_BUILDING)})})}function He({kind:e,onClick:t,disabled:n=!1,disabledTooltip:r}){let{t:i}=s(`openhands`),o=e===`local`,l=i(o?c.HOME$OPEN_WORKSPACE:c.COMMON$OPEN_REPOSITORY),u=(0,Z.jsxs)(`button`,{type:`button`,"data-testid":o?`open-workspace-button`:`open-repository-button`,onClick:t,disabled:n,className:k(`flex flex-row items-center gap-2 rounded-full px-2.5 py-1 text-white`,I,L,F,n?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-surface-raised`),children:[(0,Z.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center`,children:o?(0,Z.jsx)(S,{"aria-hidden":!0,className:`h-4 w-4`,strokeWidth:2}):(0,Z.jsx)(a,{width:16,height:16,className:`shrink-0`})}),(0,Z.jsx)(`span`,{className:`text-sm font-normal leading-5`,children:l})]});return r?(0,Z.jsx)(V,{content:r,placement:`top`,children:(0,Z.jsx)(`span`,{className:`inline-flex`,children:u})}):u}var $=`__ungrouped__`;function Ue({workspaces:e,parents:t=[],value:n,placeholder:r,className:i,disabled:a=!1,disabledTooltip:o,showManage:l,onChange:u,onAddClick:d,onManageClick:f}){let{t:m}=s(`openhands`),[h,g]=(0,X.useState)(n?.name??``),_=(0,X.useRef)(null),v=(0,X.useMemo)(()=>{let t=h.trim().toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t)):e},[e,h]),y=(0,X.useCallback)(e=>e.parentPath??$,[]),b=(0,X.useMemo)(()=>{let e=new Map;return t.forEach(t=>e.set(t.path,t.name)),e},[t]),{groupedWorkspaces:x,isGrouped:S,headerByFirstIndex:C,groupLabelByIndex:w}=(0,X.useMemo)(()=>{let e=[],t=new Map;v.forEach(n=>{let r=y(n);t.has(r)||(t.set(r,[]),e.push(r)),t.get(r)?.push(n)}),e.sort((e,t)=>e===$?1:t===$?-1:0);let n=e.length>1,r=[],i=new Map,a=new Map;return e.forEach(e=>{let o=e===$?m(c.HOME$WORKSPACE_GROUP_OTHER):b.get(e)||e.split(`/`).filter(Boolean).pop()||e;n&&i.set(r.length,o),(t.get(e)??[]).forEach(e=>{a.set(r.length,o),r.push(e)})}),{groupedWorkspaces:r,isGrouped:n,headerByFirstIndex:i,groupLabelByIndex:a}},[v,y,b,m]),T=(0,X.useCallback)(e=>{u(e),e&&g(e.name)},[u]),E=(0,X.useCallback)(()=>{T(null),g(``)},[T]),{isOpen:D,getToggleButtonProps:O,getMenuProps:A,getInputProps:j,highlightedIndex:M,getItemProps:N,selectedItem:P,closeMenu:F}=p({items:x,itemToString:e=>e?.name??``,selectedItem:n,onSelectedItemChange:({selectedItem:e})=>{T(e??null)},inputValue:h,onIsOpenChange:({isOpen:e,selectedItem:t})=>{g(e?``:t?.name??``)},stateReducer:(e,t)=>t.type===p.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes}),I=(e,t,n,r,i)=>(0,Z.jsx)(be,{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),L=e=>(0,Z.jsx)(he,{inputValue:e,searchMessage:m(c.HOME$NO_WORKSPACES),emptyMessage:m(c.HOME$NO_WORKSPACES),testId:`workspace-dropdown-empty`}),z=(0,X.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),B=(0,X.useCallback)(e=>{z(e),F(),d()},[F,d,z]),W=(0,X.useCallback)(e=>{z(e),F(),d()},[F,d,z]),G=(0,X.useCallback)(e=>{z(e),F(),f()},[F,f,z]),K=(0,X.useCallback)(e=>{z(e),F(),f()},[F,f,z]),q=(0,X.useMemo)(()=>(0,Z.jsxs)(`div`,{className:H,children:[(0,Z.jsx)(`button`,{type:`button`,"data-testid":`add-workspaces-button`,className:k(U,`cursor-pointer`),onMouseDown:z,onTouchStart:z,onTouchEnd:W,onClick:B,children:m(c.HOME$ADD_WORKSPACES)}),(l??e.length>0)&&(0,Z.jsx)(`button`,{type:`button`,"data-testid":`manage-workspaces-button`,className:k(U,`cursor-pointer`),onMouseDown:z,onTouchStart:z,onTouchEnd:K,onClick:G,children:m(c.HOME$MANAGE_WORKSPACES)})]}),[B,W,G,K,z,m,e.length,l]),J=(0,Z.jsxs)(`div`,{className:k(`relative`,i),children:[(0,Z.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[(0,Z.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:(0,Z.jsx)(ee,{width:16,height:16})}),(0,Z.jsx)(`input`,{...j({disabled:a,placeholder:D&&n?n.name:r??m(c.HOME$WORKSPACE_PLACEHOLDER),className:k(R,`text-inherit shadow-none pl-7 pr-16 text-sm font-normal leading-5`,`placeholder:text-[var(--oh-muted)]`,`disabled:cursor-not-allowed disabled:opacity-60`),onChange:e=>{g(e.target.value)}}),"data-testid":`workspace-dropdown`}),(0,Z.jsxs)(`div`,{className:`absolute right-1 top-1/2 transform -translate-y-1/2 flex items-center`,children:[n&&(0,Z.jsx)(ge,{disabled:a,onClear:E}),(0,Z.jsx)(Oe,{isOpen:D,disabled:a,getToggleButtonProps:O})]})]}),(0,Z.jsx)(Ee,{isOpen:D,filteredItems:x,inputValue:h,highlightedIndex:M,selectedItem:P,getMenuProps:A,getItemProps:N,menuRef:_,renderItem:I,renderItemPrefix:S?(e,t)=>{let n=C.get(t);return n?(0,Z.jsx)(`li`,{role:`presentation`,"aria-hidden":`true`,"data-testid":`workspace-group-header`,className:`px-2 pt-2 pb-1 text-xs font-medium text-[var(--oh-muted)] select-none`,children:n}):null}:void 0,renderEmptyState:L,stickyFooterItem:q,testId:`workspace-dropdown-menu`,itemKey:e=>e.id})]});return o?(0,Z.jsx)(V,{content:o,placement:`top`,children:(0,Z.jsx)(`span`,{className:`block`,children:J})}):J}var We=`oh:home-selected-workspace-path`;function Ge(){if(typeof window>`u`)return null;try{let e=window.sessionStorage.getItem(We);return e&&e.length>0?e:null}catch{return null}}function Ke(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem(We,e):window.sessionStorage.removeItem(We)}catch{}}function qe({isLoadingSettings:e=!1,onConfirm:t}){let{t:n}=s(`openhands`),{navigate:r}=B(),{data:i,error:a}=w(),o=i?.workspaceParents??[],{mutate:l}=y(),{mutate:u}=E(),{mutate:d}=h(),{mutate:f}=g(),{workspaces:p,parents:_,isLoading:b,isError:S,error:T}=x(),D=m(a??T,n),[O,k]=X.useState(null),[A,j]=X.useState(!1),[M,N]=X.useState(!1),{mutate:P,isPending:F,isSuccess:I}=ne(),L=re(),R=F||I||L,V=X.useCallback(e=>{k(e),Ke(e?.path??null)},[]);X.useEffect(()=>{let e=Ge();if(!e)return;let t=p.find(t=>t.path===e);if(t){k(e=>e?.path===t.path?e:t);return}!b&&!S&&!D&&(Ke(null),k(t=>t?.path===e?null:t))},[S,b,p,D]);let H=o.length>0||!!D,U=null;D?U=D:b?U=n(c.HOME$LOADING):S&&(U=n(c.HOME$WORKSPACE_SCAN_ERROR));let W=!!D||e||b&&p.length===0;return(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[!t&&(0,Z.jsxs)(`div`,{className:`flex items-center gap-[10px] pb-4`,children:[(0,Z.jsx)(ie,{width:24,height:24}),(0,Z.jsx)(`span`,{className:`leading-5 font-bold text-base text-white`,children:n(c.HOME$WORKSPACES_TAB)})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-[10px] pb-4`,children:[(0,Z.jsx)(Ue,{workspaces:p,parents:_,value:O,placeholder:D?n(c.HOME$WORKSPACES_UNSUPPORTED_PLACEHOLDER):W?n(c.HOME$LOADING):void 0,disabled:W,disabledTooltip:D,showManage:p.length>0||o.length>0,onChange:V,onAddClick:()=>j(!0),onManageClick:()=>N(!0),className:`max-w-auto`},O?.path??`empty-workspace-selection`),H&&U&&(0,Z.jsx)(`p`,{className:`px-1 text-xs text-[var(--oh-text-secondary)]`,"data-testid":`workspace-status-message`,children:U})]}),(0,Z.jsx)(z,{testId:`workspace-launch-button`,variant:`primary`,type:`button`,isDisabled:!O||!t&&R||e,onClick:()=>{if(O){if(t){t(O);return}P({workingDir:O.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?c.BUTTON$CONFIRM:R?c.HOME$LOADING:c.BUTTON$LAUNCH)}),(0,Z.jsx)(v,{isOpen:A,onClose:()=>j(!1),onAdd:e=>{let t=e[e.length-1];l(e,{onSuccess:()=>{t&&V(t)}})},onAddParent:e=>d(e)}),(0,Z.jsx)(C,{isOpen:M,workspaces:p,workspaceParents:o,onClose:()=>N(!1),onRemove:e=>{O?.path===e&&V(null),u(e)},onRemoveParent:e=>{O?.parentPath===e&&V(null),f(e)}})]})}function Je({isOpen:e,onClose:t,onConfirm:n}){let{t:r}=s(`openhands`),{isLoadingSettings:i}=q();return e?(0,Z.jsx)(A,{onClose:t,children:(0,Z.jsxs)(j,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,Z.jsx)(te,{onClose:t,testId:`close-open-workspace-dialog`}),(0,Z.jsx)(`div`,{className:`w-full pr-6`,children:(0,Z.jsx)(P,{title:r(c.HOME$OPEN_WORKSPACE)})}),(0,Z.jsx)(`div`,{className:`w-full`,"data-testid":`open-workspace-dialog-body`,children:(0,Z.jsx)(qe,{isLoadingSettings:i,onConfirm:e=>{n(e),t()}})})]})}):null}function Ye({onRepoSelection:e,isLoadingSettings:t=!1,onConfirm:n}){let{navigate:r}=B(),[i,o]=X.useState(null),[l,u]=X.useState(null),[d,f]=X.useState(null),{providers:p}=q(),{addRecentRepository:m,setLastSelectedProvider:h,getLastSelectedProvider:g}=K(),{mutate:_,isPending:v,isSuccess:y}=ne(),b=re(),{t:x}=s(`openhands`);X.useEffect(()=>{if(p.length!==0){if(p.length===1&&!d){f(p[0]);return}if(p.length>1&&!d){let e=g();e&&p.includes(e)&&f(e)}}},[p,d,g]);let S=v||y||b,C=t=>{t!==d&&(f(t),h(t),o(null),u(null),e?.(null))},w=X.useCallback(e=>{u(e)},[]);return(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[!n&&(0,Z.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,Z.jsxs)(`div`,{className:`flex items-center gap-[10px] pb-4`,children:[(0,Z.jsx)(a,{width:24,height:24}),(0,Z.jsx)(`span`,{className:`leading-5 font-bold text-base text-white`,children:x(c.COMMON$OPEN_REPOSITORY)})]})}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-[10px] pb-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(`span`,{className:`text-sm text-white font-normal leading-[22px]`,children:x(c.HOME$SELECT_OR_INSERT_URL)}),p.length<=1?null:(0,Z.jsx)(Ce,{providers:p,value:d,className:`max-w-[500px]`,onChange:C,disabled:t})]}),(0,Z.jsx)(ye,{provider:d||p[0],value:i?.id||null,repositoryName:i?.full_name||null,placeholder:`user/repo`,disabled:!d||t,onChange:t=>{t?(e?.(t),o(t)):(e?.(null),o(null),u(null))},className:`max-w-auto`}),(()=>{let e=i?.main_branch||null;return(0,Z.jsx)(me,{repository:i?.full_name||null,provider:d||p[0],selectedBranch:l,onBranchSelect:w,defaultBranch:e,className:`max-w-full`,disabled:!i||t})})()]}),(0,Z.jsx)(z,{testId:`repo-launch-button`,variant:`primary`,type:`button`,isDisabled:!i||!l||!n&&S||p.length>1&&!d||t,onClick:()=>{if(!(!i||!l)){if(m(i),n){n({repository:i,branch:l,provider:d});return}_({repository:{name:i.full_name||``,gitProvider:i.git_provider||`github`,branch:l.name||`main`},entryPoint:`home_repo_form`},{onSuccess:e=>r(`/conversations/${e.conversation_id}`)})}},className:`w-full`,children:x(n?c.BUTTON$CONFIRM:S?c.HOME$LOADING:c.BUTTON$LAUNCH)})]})}function Xe({isOpen:e,onClose:t,onConfirm:n}){let{t:r}=s(`openhands`),{isLoadingSettings:i}=q();return e?(0,Z.jsx)(A,{onClose:t,children:(0,Z.jsxs)(j,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,Z.jsx)(te,{onClose:t,testId:`close-open-repository-dialog`}),(0,Z.jsx)(`div`,{className:`w-full pr-6`,children:(0,Z.jsx)(P,{title:r(c.COMMON$OPEN_REPOSITORY)})}),(0,Z.jsx)(`div`,{className:`w-full`,"data-testid":`open-repository-dialog-body`,children:(0,Z.jsx)(Ye,{isLoadingSettings:i,onConfirm:e=>{n(e),t()}})})]})}):null}function Ze(e,t){return e===`new_worktree`?c.COMMON$WORKSPACE_MODE_NEW_WORKTREE:t===`cloud`?c.COMMON$WORKSPACE_MODE_CLOUD_REPO:c.COMMON$WORKSPACE_MODE_LOCAL_REPO}function Qe({mode:e}){return e===`new_worktree`?(0,Z.jsx)(_,{className:`size-3`,strokeWidth:2,"aria-hidden":!0}):(0,Z.jsx)(a,{width:12,height:12,color:`white`,"aria-hidden":!0})}var $e=[`local_repo`,`new_worktree`];function et({value:e,backendKind:t,onChange:n,disabled:r=!1,testId:i=`workspace-mode-selector`}){let{t:a}=s(`openhands`),[o,c]=(0,X.useState)(!1),l=(0,X.useRef)(null),u=a(Ze(e,t));return(0,X.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,X.useEffect)(()=>{if(!o)return;let e=e=>{e.key===`Escape`&&c(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[o]),(0,Z.jsxs)(`div`,{ref:l,className:`relative inline-flex`,children:[(0,Z.jsxs)(`button`,{type:`button`,"data-testid":i,"aria-haspopup":`menu`,"aria-expanded":o,"aria-label":u,disabled:r,onClick:()=>c(e=>!e),className:k(`group flex flex-row items-center justify-between gap-2 pl-2.5 pr-2 py-1 rounded-[100px] truncate relative`,`border border-[rgba(71,74,84,0.50)] bg-transparent text-white`,r?`cursor-not-allowed opacity-50`:`cursor-pointer hover:border-[var(--oh-border-subtle)]`),children:[(0,Z.jsx)(`span`,{className:`flex size-3 shrink-0 items-center justify-center`,children:(0,Z.jsx)(Qe,{mode:e})}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-normal leading-5`,children:u}),(0,Z.jsx)(f,{className:`size-3 shrink-0 text-white`,"aria-hidden":!0})]}),o?(0,Z.jsx)(`div`,{role:`menu`,"data-testid":`${i}-menu`,className:k(`absolute left-0 top-full z-50 mt-1 min-w-[180px] rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface)] p-1 shadow-lg`,H),children:$e.map(r=>{let o=a(Ze(r,t));return(0,Z.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":r===e,"data-testid":`${i}-option-${r}`,onClick:()=>{n(r),c(!1)},className:W,children:[(0,Z.jsx)(`span`,{className:G,children:(0,Z.jsx)(Qe,{mode:r})}),(0,Z.jsx)(`span`,{className:`truncate`,children:o})]},r)})}):null]})}function tt({workspace:e,repository:t,branch:n,provider:r,workspaceMode:i,backendKind:a,onRepoClick:o,onWorkspaceModeChange:s}){let c=e?e.path.replace(/\/+$/,``).split(`/`).pop()||e.path:null;return(0,Z.jsxs)(`div`,{className:`flex flex-row gap-2.5 items-center flex-wrap`,"data-testid":`home-git-control-bar-preview`,children:[(0,Z.jsx)(Te,{selectedRepository:t?.full_name??null,gitProvider:r??null,workspaceName:c,onClick:o}),e?(0,Z.jsx)(et,{value:i,backendKind:a,onChange:s}):null,n?(0,Z.jsx)(Se,{selectedBranch:n.name,selectedRepository:t?.full_name??null,gitProvider:r??null}):null]})}function nt(){let{t:e}=s(`openhands`),{backend:t}=u(),{navigate:n}=B(),r=t.kind===`local`,[i,a]=(0,X.useState)(!1),[f,p]=(0,X.useState)(null),[h,g]=(0,X.useState)(null),[_,v]=(0,X.useState)(null),[y,b]=(0,X.useState)(null),[x,S]=(0,X.useState)(`local_repo`),[C,T]=(0,X.useState)([]),[E,D]=(0,X.useState)(!1),{mutateAsync:O,isPending:k}=ne(),A=re(),j=k||A,{isConfigured:M,isLoading:N}=we(),P=!N&&!M,{images:F,files:I,imagesMarkedUploadAsFile:L,clearAllFiles:R}=J(),{handleUpload:z}=_e(),{error:V}=w({enabled:r}),H=r?m(V,e):null,U=r?!!f:!!h&&!!_,W=xe(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]},u={query:a?void 0:i||void 0,entryPoint:`home_chat_launcher`};r&&f?u={...u,workingDir:f.path,workspaceMode:x}:!r&&h&&_&&(u={...u,repository:{name:h.full_name,gitProvider:h.git_provider,branch:_.name}}),C.length>0&&(u={...u,plugins:C});let p=o.loading(e(c.HOME$CREATING_CONVERSATION),d);(async()=>{try{let t=await O(u);o.dismiss(p);try{sessionStorage.removeItem(pe)}catch{}let c=t.conversation_id,d=c.startsWith(`task-`);if(a)if(!r||d){let e=t.task_id??(d?c.slice(5):null);if(!e){l(null);return}ke(e,{content:i,images:s.images,files:s.files,imagesMarkedUploadAsFile:[...L]}),R(),await Me({conversationId:c,text:i,images:s.images,imagesMarkedUploadAsFile:L}),n(`/conversations/${c}`);return}else try{await de({conversationId:c,content:i,images:s.images,files:s.files,imagesMarkedUploadAsFile:L,t:e}),R()}catch(e){l(e instanceof Error?e.message:null);return}d&&i&&await Me({conversationId:c,text:i,images:[],imagesMarkedUploadAsFile:[]}),n(`/conversations/${c}`)}catch(e){o.dismiss(p),l(e instanceof Error?e.message:null)}})()});return(0,Z.jsxs)(`div`,{"data-testid":`home-chat-launcher`,className:`flex w-full max-w-[800px] flex-col gap-4 md:px-4`,children:[(0,Z.jsx)(`div`,{className:`flex w-full justify-center`,children:(0,Z.jsx)(Ve,{})}),(0,Z.jsx)(`div`,{className:`w-full`,children:(0,Z.jsx)(ve,{onSubmit:W,onFilesPaste:z,disabled:j||P})}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-start gap-2`,children:[U?(0,Z.jsx)(tt,{workspace:f,repository:h,branch:_,provider:y,workspaceMode:x,backendKind:t.kind,onRepoClick:()=>a(!0),onWorkspaceModeChange:S}):(0,Z.jsx)(He,{kind:r?`local`:`cloud`,onClick:()=>a(!0),disabled:j||!!H,disabledTooltip:H}),(0,Z.jsx)(Be,{count:C.length,onClick:()=>D(!0),disabled:j})]}),r?(0,Z.jsx)(Je,{isOpen:i,onClose:()=>a(!1),onConfirm:e=>{p(e),g(null),v(null),b(null),S(`local_repo`)}}):(0,Z.jsx)(Xe,{isOpen:i,onClose:()=>a(!1),onConfirm:({repository:e,branch:t,provider:n})=>{g(e),v(t),b(n??e.git_provider),p(null),S(`local_repo`)}}),E&&(0,Z.jsx)(ze,{selected:C,onChange:T,onClose:()=>D(!1)})]})}function rt(){let e=b(i().search);return(0,Z.jsxs)(`div`,{"data-testid":`home-screen`,className:`custom-scrollbar-always flex h-full flex-col overflow-y-auto rounded-xl bg-transparent px-4 md:px-0 lg:px-[42px]`,children:[(0,Z.jsx)(`div`,{className:`md:px-4 lg:px-0`,children:(0,Z.jsx)(De,{})}),(0,Z.jsx)(`div`,{className:`flex flex-1 min-h-0 flex-col items-center justify-center`,children:(0,Z.jsx)(nt,{})}),e?null:(0,Z.jsx)(T,{})]})}var it=r(rt);export{it as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./home-BwbeOWwU.js";export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./home-BwbeOWwU.js";export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as i}from"./useMutation-u8UgRgDK.js";import{t as a}from"./useTranslation-Cbf5AGg_.js";import{t as o}from"./declaration-BGsHjPEW.js";import{C as s,E as c,S as l,f as u}from"./active-backend-context-B8rMv0X9.js";import{t as d}from"./bot-C-EA6685.js";import{t as f}from"./utils-DB9LsAzA.js";import{_ as p,b as m,d as h}from"./agent-server-compatibility-BWN-EIQn.js";import{p as g}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{t as ee}from"./modal-backdrop-zVwfOJZr.js";import{n as te}from"./modal-classes-3qT9Ap7Q.js";import{t as ne}from"./brand-button-B1izLAdR.js";import{t as _}from"./styled-tooltip-B14i_Uac.js";import{t as re}from"./modal-close-button-BcIBUdSq.js";import{t as v}from"./settings-input-BsgQWS5R.js";import{a as y,c as b,d as ie,i as x,o as S,r as C,s as w,t as T}from"./settings-service.api-DXk5TdeJ.js";import{r as E}from"./use-settings-CyxSlyTQ.js";import{t as ae}from"./v4-DbCkTSoU.js";import{t as D}from"./secrets-service-CvyPWJhg.js";import{t as O}from"./vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js";function k(e){return[...e.sse_servers.map((e,t)=>({id:`sse-${t}`,type:`sse`,name:typeof e==`object`?e.name:void 0,url:typeof e==`string`?e:e.url,headers:typeof e==`object`?e.headers:void 0,auth:typeof e==`object`?e.auth:void 0})),...e.stdio_servers.map((e,t)=>({id:`stdio-${t}`,type:`stdio`,name:e.name,command:e.command,args:e.args,env:e.env})),...e.shttp_servers.map((e,t)=>({id:`shttp-${t}`,type:`shttp`,name:typeof e==`object`?e.name:void 0,url:typeof e==`string`?e:e.url,headers:typeof e==`object`?e.headers:void 0,timeout:typeof e==`object`?e.timeout:void 0,auth:typeof e==`object`?e.auth:void 0}))]}var A=e(t()),j=n();function M(e){return e.connectionOptions.filter(e=>e.provider===`mcp`&&!!e.transport)}function N(e){return M(e)[0]}function oe(e){if(e.auth.strategy!==`oauth2`)return!0;let t=e.auth.oauth;return t?!t.authorizationUrl&&!t.tokenUrl&&!t.registrationUrl&&!t.additionalAuthorizationParams&&!t.additionalTokenParams:!1}function se(e){return M(e).find(oe)}function P(e){return N(e)?.transport}function ce(e){switch(e){case`none`:return`none`;case`body`:return`client_secret_post`;case`basic`:return`client_secret_basic`;default:return}}function le(e){if(e.auth.strategy!==`oauth2`)return;let t={type:`oauth`},n=ce(e.auth.oauth?.clientAuthentication);return n&&(t.client_auth_method=n),e.auth.oauth?.scopes?.length&&(t.scopes=e.auth.oauth.scopes),Object.keys(t).length>1?t:void 0}function F(e){return e.filter(e=>!!N(e))}var I=e=>{try{return new URL(e)}catch{return null}};function L(e,t){let n=typeof e==`string`?e:``,r=typeof t==`string`?t:``;if(!n||!r)return!1;let i=I(n),a=I(r);return!i||!a?n.replace(/\/+$/,``)===r.replace(/\/+$/,``):i.protocol===a.protocol&&i.host===a.host&&i.pathname.replace(/\/+$/,``)===a.pathname.replace(/\/+$/,``)}function ue(e,t){return t.find(t=>R(e,t))??null}function de(e,t){for(let n of M(e)){let e=ue(n.transport,t);if(e)return e}return null}function R(e,t){if(e.kind===`shttp`){let n=e.url;return t.type===`shttp`&&!!t.url&&L(t.url,n)}if(e.kind===`sse`){let n=e.url;return t.type===`sse`&&!!t.url&&L(t.url,n)}return t.type===`stdio`&&t.name===e.serverName}function z(e){return e.trim().toLowerCase()}function fe(e){return e.map((e,t)=>({entry:e,index:t})).sort((e,t)=>(t.entry.popularityRank??0)-(e.entry.popularityRank??0)||e.index-t.index).map(({entry:e})=>e)}function pe(e,t){return t.find(t=>t.id===e)}function me(e,t){let n=z(t);return n?[e.name,e.description,e.id,...e.keywords??[]].join(` `).toLowerCase().includes(n):!0}function he(e,t,n){let r=z(n);return r?[e.type,`name`in e?e.name:void 0,`command`in e?e.command:void 0,`args`in e?e.args?.join(` `):void 0,`url`in e?e.url:void 0,t?.name,t?.description,t?.id,...t?.keywords??[]].filter(Boolean).join(` `).toLowerCase().includes(r):!0}function B(e,t){return t.find(t=>M(t).some(t=>R(t.transport,e)))}function V({fieldKey:e,checked:t,onToggle:n}){let{t:r}=a(`openhands`);return(0,j.jsxs)(`label`,{"data-testid":`mcp-install-save-secret-${e}`,className:f(`flex items-center gap-2 px-3 py-2 mt-0.5 rounded-lg border cursor-pointer transition-colors`,t?`border-green-500/35 bg-green-500/10`:`border-[var(--oh-border)] bg-transparent hover:bg-white/[0.03]`),children:[(0,j.jsx)(`input`,{className:`sr-only`,id:`mcp-save-secret-checkbox-${e}`,type:`checkbox`,checked:t,onChange:e=>n(e.target.checked)}),(0,j.jsx)(`span`,{"aria-hidden":`true`,className:f(`relative inline-flex h-[22px] w-[40px] shrink-0 items-center rounded-full border transition-colors duration-200`,t?`border-green-500 bg-green-500`:`border-[var(--oh-border)] bg-surface-raised`),children:(0,j.jsx)(`span`,{className:f(`inline-block size-4 rounded-full transition-transform duration-200`,t?`translate-x-[21px] bg-white`:`translate-x-[2px] bg-[var(--oh-muted)]`)})}),(0,j.jsx)(`span`,{className:`text-sm`,children:r(o.MCP$ALSO_SAVE_AS_SECRET)}),(0,j.jsx)(`code`,{className:f(`ml-auto text-[11px] font-mono tracking-tight border rounded px-1.5 py-0.5`,t?`text-green-500 border-green-500/35 bg-white/[0.04]`:`text-tertiary-alt border-[var(--oh-border)]`),children:e}),(0,j.jsx)(_,{content:r(o.MCP$SAVE_AS_SECRET_TOOLTIP),placement:`top`,children:(0,j.jsx)(`button`,{type:`button`,"aria-label":r(o.MCP$SAVE_AS_SECRET_TOOLTIP),className:`flex items-center justify-center size-[15px] shrink-0 rounded-full border border-[var(--oh-muted)] text-tertiary-alt text-[9px] font-bold cursor-help`,onClick:e=>e.preventDefault(),children:`?`})})]})}var ge=e=>(0,j.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,j.jsx)(`path`,{d:`M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z`,fill:`currentColor`})}),_e={xs:`h-4 w-4 rounded [&>svg]:h-2.5 [&>svg]:w-2.5`,sm:`h-5 w-5 rounded-md [&>svg]:h-3 [&>svg]:w-3`,md:`h-10 w-10 rounded-lg [&>svg]:h-5 [&>svg]:w-5`},ve={slack:ge};function H({entry:e,size:t=`md`,className:n,fallback:r,testId:i}){let a=e?ve[e.id]:void 0;return(0,j.jsx)(`span`,{"aria-hidden":`true`,title:e?.name,"data-testid":i,className:f(`inline-flex shrink-0 items-center justify-center overflow-hidden`,`border border-white/10 shadow-[inset_0_1px_0_rgba(255,255,255,0.18)]`,_e[t],n),style:{backgroundColor:e?.iconBg??`var(--oh-color-tertiary)`,color:e?.iconColor??`#FFFFFF`},children:a?(0,j.jsx)(a,{}):e?.logoUrl?(0,j.jsx)(`img`,{src:e.logoUrl,alt:`${e.name} logo`,className:`h-full w-full object-contain p-[22%]`,onError:e=>{let t=e.currentTarget;t.style.display=`none`}}):r??(0,j.jsx)(d,{className:`h-5 w-5`,strokeWidth:2.25})})}function U(){let e=r(),{data:t}=E();return i({mutationFn:async e=>{if(!t)return;let n=x(t.agent_settings?.mcp_config),r={sse_servers:[...n.sse_servers],stdio_servers:[...n.stdio_servers],shttp_servers:[...n.shttp_servers]};e.type===`sse`?r.sse_servers.push(S(e)):e.type===`stdio`?r.stdio_servers.push(w(e)):e.type===`shttp`&&r.shttp_servers.push(y(e)),await T.saveSettings({agent_settings_diff:{mcp_config:b(r)}})},onSuccess:()=>{e.invalidateQueries({queryKey:u.personal()})}})}var ye=new Set([`invalid_auth`,`not_authed`,`account_inactive`,`token_revoked`,`token_expired`]),be={slack:{toolCall:{name:`slack_list_channels`,arguments:{limit:1}},interpret:e=>{if(e.is_error)return e.text||`tool call failed`;try{let t=JSON.parse(e.text);if(t?.ok===!1&&ye.has(t.error))return String(t.error)}catch{}return null}}};function W(e){let t=B(e,F(O));return t?be[t.id]:void 0}var xe=[`none`,`api_key`,`bearer`,`basic`,`header`,`oauth2`],Se=e=>!!e&&typeof e==`object`&&!Array.isArray(e),Ce=e=>Se(e)&&typeof e.strategy==`string`&&xe.includes(e.strategy),G=e=>!!e&&typeof e==`object`&&!Array.isArray(e),we=e=>{if(!G(e))return;let t=Object.entries(e).filter(e=>typeof e[1]==`string`);return t.length>0?Object.fromEntries(t):void 0},Te=e=>!!e&&Object.values(e).some(e=>e===`**********`),Ee=(e,t)=>e===`sse`?t===`sse`:e===`shttp`?t===void 0||t===`http`||t===`shttp`||t===`streamable-http`:!1,De=e=>{if(!e)return;let t=/^stdio-(\d+)$/.exec(e);return t?Number.parseInt(t[1],10):void 0},Oe=(e,t)=>{let n=De(e);if(n!==void 0)return Object.entries(t).filter(([,e])=>!e.url)[n]?.[1]},ke=(e,t)=>e.type===`stdio`?Oe(e.id,t)??(e.name?t[e.name]:void 0):e.name&&t[e.name]?t[e.name]:Object.values(t).find(t=>t.url===e.url&&Ee(e.type,t.transport));async function Ae(e){let t=(await T.fetchSettingsFromApi(`encrypted`)).agent_settings?.mcp_config;if(G(t))return ke(e,t)}async function K(e){let t=e.type===`stdio`&&Te(e.env),n=(e.type===`sse`||e.type===`shttp`)&&C(e.auth);if(!t&&!n)return e;try{let r=await Ae(e);if(!r)return e;if(t){let t=we(r.env)??{},n=Object.fromEntries(Object.entries(e.env??{}).map(([e,n])=>[e,n===`**********`&&typeof t[e]==`string`?t[e]:n]));return{...e,env:n}}return n&&Ce(r.auth)?{...e,auth:r.auth}:e}catch{return e}}var q=120;function je(e){return e.type===`stdio`?{transport:`stdio`,command:e.command,...e.args?.length&&{args:e.args},...e.env&&Object.keys(e.env).length>0&&{env:e.env}}:{transport:e.type===`sse`?`sse`:`http`,url:e.url,...e.headers&&Object.keys(e.headers).length>0&&{headers:e.headers},...e.auth?{auth:e.auth}:{}}}function Me(e){return e.auth?.strategy===`oauth2`?q:e.timeout}async function Ne(e){let t=W(e),n=je(await K(e)),r=Me(e);return{server:n,...e.name?{name:e.name}:{},...r===void 0?{}:{timeout:r},...t?{tool_call:t.toolCall}:{}}}function Pe(){if(p().backend.kind===`local`){let{host:e,apiKey:t}=h();return{host:e,...t?{apiKey:t}:{}}}let e=m().find(e=>e.kind===`local`&&e.host);if(e)return{host:e.host.replace(/\/+$/,``),...e.apiKey?{apiKey:e.apiKey}:{}};throw Error(`OAuth authorization requires a reachable local backend.`)}function J(){let{host:e,apiKey:t}=Pe();return new g({host:e,...t?{apiKey:t}:{},timeout:q*1e3+5e3})}function Fe(e){return e.status===`succeeded`?{ok:!0,tools:e.tools??[],...e.tool_result!==void 0&&{tool_result:e.tool_result},...e.oauth_state!==void 0&&{oauth_state:e.oauth_state}}:{ok:!1,error:e.error||`OAuth authorization did not complete`,error_kind:e.error_kind||`unknown`}}var Ie=e=>new Promise(t=>{window.setTimeout(t,e)}),Y=class e{static async testServer(e){if(p().backend.kind===`cloud`)return{ok:!0,tools:[]};let t=W(e),{host:n,apiKey:r}=h(),i=new g({host:n,...r?{apiKey:r}:{}});try{let n=await Ne(e),r=await i.testServer(n);if(r.ok&&t&&r.tool_result){let e=t.interpret(r.tool_result);if(e)return{ok:!1,error:e,error_kind:`credentials`}}return r}finally{i.close()}}static async startOAuth(t){let n=J();try{return await e.startOAuthWithClient(n,t)}finally{n.close()}}static async getOAuthStatus(t){let n=J();try{return await e.getOAuthStatusWithClient(n,t)}finally{n.close()}}static async submitOAuthCallback(t,n){let r=J();try{return await e.submitOAuthCallbackWithClient(r,t,n)}finally{r.close()}}static async authorizeOAuth(t){let n=window.open(`about:blank`,`_blank`),r=J();try{let i=await e.startOAuthWithClient(r,t);if(!i.ok||!i.job_id||!i.authorization_url)return n?.close(),{ok:!1,error:i.error||`Could not start OAuth authorization`,error_kind:i.error_kind||`unknown`};let a=await e.getOAuthStatusWithClient(r,i.job_id);for(let t=0;t<20;t+=1){if(a.status===`succeeded`||a.status===`failed`)return n?.close(),Fe(a);if(a.callback_ready)break;await Ie(250),a=await e.getOAuthStatusWithClient(r,i.job_id)}n&&(n.location.href=i.authorization_url);for(let t=0;t<q;t+=1)if(await Ie(1e3),a=await e.getOAuthStatusWithClient(r,i.job_id),a.status===`succeeded`||a.status===`failed`)return n?.close(),Fe(a);return{ok:!1,error:`OAuth authorization timed out`,error_kind:`timeout`}}finally{r.close()}}static async startOAuthWithClient(e,t){let n=await Ne(t);return e.startOAuth(n)}static async getOAuthStatusWithClient(e,t){return e.getOAuthStatus(t)}static async submitOAuthCallbackWithClient(e,t,n){return e.submitOAuthCallback(t,{callback_url:n})}};function Le(){return i({mutationFn:e=>Y.testServer(e)})}function X(e){return e.length<=3?e.join(`, `):`${e.slice(0,3).join(`, `)} … (+${e.length-3})`}function Re(){let{t:e}=a(`openhands`),t=r();return(0,A.useCallback)((n,r,i)=>{let a=n.filter(e=>i[e.key]&&(r[e.key]??``).trim());return a.length===0?Promise.resolve():Promise.allSettled(a.map(e=>D.createSecret(e.key,r[e.key].trim(),e.label))).then(n=>{let r=a.filter((e,t)=>n[t].status===`fulfilled`).map(e=>e.key),i=a.filter((e,t)=>n[t].status===`rejected`).map(e=>e.key);r.length>0&&(t.invalidateQueries({queryKey:[`secrets-search`]}),t.invalidateQueries({queryKey:[`secrets`]}),s(e(o.MCP$SECRETS_SAVED,{keys:X(r)}))),i.length>0&&l(e(o.MCP$SECRETS_SAVE_FAILED,{keys:X(i)}))})},[e,t])}function Z(e){let t=/\[([^\]]+)\]\(([^)]+)\)/g,n=[],r=0;for(let i of e.matchAll(t))i.index>r&&n.push(e.slice(r,i.index)),n.push((0,j.jsx)(`a`,{href:/^https?:\/\//i.test(i[2])?i[2]:`#`,target:`_blank`,rel:`noreferrer`,className:`underline hover:text-white transition-colors`,children:i[1]},i.index)),r=i.index+i[0].length;return r<e.length&&n.push(e.slice(r)),n}function Q(e){return e?.transport.kind!==`shttp`&&e?.transport.kind!==`sse`?!1:[`api_key`,`bearer`].includes(e.auth.strategy)}function ze(e){return!!e&&e.auth.strategy===`oauth2`}function Be(e){return e.transport.kind===`stdio`?e.auth.apiKeyOptional??!1:e.auth.apiKeyOptional??e.transport.apiKeyOptional??!1}function $(e){return e?.transport.kind!==`shttp`&&e?.transport.kind!==`sse`?[]:e.transport.headerFields??[]}function Ve(e){let t={},n={},r=se(e),i=r?.transport;if(i?.kind===`stdio`){for(let e of i.envFields??[])t[e.key]=``,n[e.key]=e.type===`password`;for(let e of i.argFields??[])t[e.key]=``}else if(i?.kind===`shttp`||i?.kind===`sse`){t.url=i.url;for(let e of $(r))t[e.key]=``,n[e.key]=e.type===`password`;Q(r)&&(t.api_key=``,r?.auth.credentialSecretName&&(n.api_key=r.auth.saveCredentialAsSecretByDefault??!1))}return{values:t,errors:{},savedAsSecret:n}}function He({entry:e,onClose:t,onSuccess:n}){let{t:r}=a(`openhands`),{mutate:i,isPending:l}=U(),{mutate:u,isPending:d}=Le(),f=Re(),[p,m]=A.useState(()=>Ve(e)),h=A.useRef(p);h.current=p;let[g,_]=A.useState(null),[y,b]=A.useState(!1),[x,S]=A.useState(!1),C=se(e),w=C?.transport,T=d||x||l||y,E=(e,t)=>{m(n=>({...n,values:{...n.values,[e]:t},errors:{...n.errors,[e]:null}})),_(null)},D=(e,t)=>{m(n=>({...n,savedAsSecret:{...n.savedAsSecret,[e]:t}}))},O=()=>{let e=C?.auth.credentialSecretName,t=h.current.values.api_key?.trim();return!e||!t||!h.current.savedAsSecret.api_key?Promise.resolve():f([{key:e,label:C.auth.credentialLabel??e,type:`password`}],{[e]:t},{[e]:!0})},k=()=>w?.kind===`stdio`?f(w.envFields??[],h.current.values,h.current.savedAsSecret):w?.kind===`shttp`||w?.kind===`sse`?Promise.all([O(),f($(C),h.current.values,h.current.savedAsSecret)]).then(()=>void 0):Promise.resolve(),M=e=>{switch(e.error_kind){case`timeout`:return r(o.MCP$TEST_ERROR_TIMEOUT);case`connection`:return r(o.MCP$TEST_ERROR_CONNECTION);case`credentials`:return r(o.MCP$TEST_ERROR_CREDENTIALS,{error:e.error});default:return r(o.MCP$TEST_ERROR_UNKNOWN,{error:e.error})}},N=a=>{if(a.auth?.strategy===`oauth2`){S(!0),Y.authorizeOAuth(a).then(l=>{if(!l.ok){_(M(l));return}i(l.oauth_state?{...a,auth:{...a.auth,state:l.oauth_state}}:a,{onSuccess:()=>{s(r(o.MCP$INSTALL_SUCCESS)),b(!0),(async()=>{try{await k()}finally{n?.(e),t()}})()},onError:e=>{_(c(e)||r(o.ERROR$GENERIC))}})}).catch(e=>{_(c(e)||r(o.ERROR$GENERIC))}).finally(()=>S(!1));return}u(a,{onSuccess:l=>{if(!l.ok){_(M(l));return}i(l.oauth_state&&a.auth?.strategy===`oauth2`?{...a,auth:{...a.auth,state:l.oauth_state}}:a,{onSuccess:()=>{s(r(o.MCP$INSTALL_SUCCESS)),b(!0),(async()=>{try{await k()}finally{n?.(e),t()}})()},onError:e=>{_(c(e)||r(o.ERROR$GENERIC))}})},onError:e=>{_(c(e)||r(o.ERROR$GENERIC))}})},oe=()=>{if(w?.kind!==`shttp`&&w?.kind!==`sse`||!C)return;let t=p.values.api_key?.trim()??``,n=w.urlEditable?p.values.url?.trim()??``:w.url,i=ze(C),a=Q(C),s=$(C),c={};if(!n)c.url=r(o.SETTINGS$MCP_ERROR_URL_REQUIRED);else try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(c.url=r(o.SETTINGS$MCP_ERROR_URL_INVALID_PROTOCOL))}catch{c.url=r(o.SETTINGS$MCP_ERROR_URL_INVALID)}for(let e of s)e.required&&!(p.values[e.key]??``).trim()&&(c[e.key]=r(o.MCP$ERROR_FIELD_REQUIRED));if(!i&&a&&!Be(C)&&!t&&(c.api_key=r(o.MCP$ERROR_FIELD_REQUIRED)),Object.values(c).some(Boolean)){m(e=>({...e,errors:c}));return}let l=i?le(C):void 0,u=Object.fromEntries(s.map(e=>[e.key,p.values[e.key]?.trim()??``]).filter(([,e])=>e)),d=Object.keys(u).length>0,f;i?f={strategy:`oauth2`,...l&&{authentication:l}}:a&&t?f=C.auth.strategy===`api_key`?{strategy:`api_key`,value:t,...C.auth.apiKeyHeaderName&&{header_name:C.auth.apiKeyHeaderName}}:{strategy:`bearer`,value:t}:d&&(f={strategy:`header`,headers:u}),N({id:`${w.kind}-${ae()}`,type:w.kind,name:ie(e.id),url:n,...f&&{auth:f},...d&&f?.strategy!==`header`&&{headers:u}})},P=()=>{if(w?.kind!==`stdio`)return;let e=w,t={};for(let n of e.envFields??[])n.required&&!(p.values[n.key]??``).trim()&&(t[n.key]=r(o.MCP$ERROR_FIELD_REQUIRED));for(let n of e.argFields??[])n.required&&!(p.values[n.key]??``).trim()&&(t[n.key]=r(o.MCP$ERROR_FIELD_REQUIRED));if(Object.values(t).some(Boolean)){m(e=>({...e,errors:t}));return}let n={};for(let t of e.envFields??[]){let e=p.values[t.key]?.trim();e&&(n[t.key]=e)}let i=[];for(let t of e.argFields??[]){let e=p.values[t.key]?.trim();if(e)for(let t of e.split(/\s+/))t&&i.push(t)}N({id:`stdio-${ae()}`,type:`stdio`,name:e.serverName,command:e.command,args:[...e.args,...i],...Object.keys(n).length>0&&{env:n}})};return(0,j.jsx)(ee,{onClose:t,"aria-label":e.name,children:(0,j.jsxs)(`form`,{"data-testid":`mcp-install-modal`,"data-marketplace-id":e.id,onSubmit:e=>(e.preventDefault(),_(null),w?.kind===`shttp`||w?.kind===`sse`?oe():P()),className:`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[85vh] overflow-y-auto custom-scrollbar`,children:[(0,j.jsx)(re,{onClose:t,testId:`mcp-install-modal-close`,disabled:T}),(0,j.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,j.jsx)(H,{entry:e}),(0,j.jsxs)(`div`,{className:`flex flex-col flex-1`,children:[(0,j.jsx)(`h2`,{className:te,children:e.name}),(0,j.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:e.description})]})]}),e.installHint&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:e.installHint}),e.docsUrl&&(0,j.jsx)(`a`,{href:e.docsUrl,target:`_blank`,rel:`noreferrer`,className:`text-xs text-[var(--oh-muted)] hover:text-white hover:underline self-start transition-colors`,children:r(o.MCP$VIEW_DOCS)}),(0,j.jsx)(`div`,{className:`flex flex-col gap-3`,children:(()=>{if(w?.kind===`shttp`||w?.kind===`sse`){let e=ze(C),t=Q(C),n=C?Be(C):!1,i=C?.auth.credentialSecretName,a=$(C);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(v,{testId:`mcp-install-field-url`,name:`url`,type:`url`,label:r(o.SETTINGS$MCP_URL),value:p.values.url??w.url,onChange:e=>E(`url`,e),isDisabled:!w.urlEditable,className:`w-full`}),p.errors.url&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:p.errors.url}),a.map(e=>(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(v,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:p.values[e.key]??``,onChange:t=>E(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(e.helperText)}),p.errors[e.key]&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:p.errors[e.key]}),e.key in p.savedAsSecret&&(0,j.jsx)(V,{fieldKey:e.key,checked:p.savedAsSecret[e.key]??!1,onToggle:t=>D(e.key,t)})]},e.key)),e?(0,j.jsxs)(`div`,{"data-testid":`mcp-install-oauth-info`,className:`flex flex-col gap-2 p-3 rounded-lg border border-[var(--oh-border)] bg-base-tertiary`,children:[(0,j.jsx)(`p`,{className:`text-sm text-secondary-light`,children:r(o.MCP$OAUTH_CONNECT_INFO)}),(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:r(o.MCP$OAUTH_CONNECT_HINT)})]}):t?(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(v,{testId:`mcp-install-field-api_key`,name:`api_key`,type:`password`,label:C?.auth.credentialLabel??r(o.SETTINGS$MCP_API_KEY),value:p.values.api_key??``,onChange:e=>E(`api_key`,e),placeholder:C?.auth.credentialPlaceholder??r(o.SETTINGS$MCP_API_KEY_PLACEHOLDER),showOptionalTag:n,required:!n,className:`w-full`}),C?.auth.credentialHelp&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(C.auth.credentialHelp)}),p.errors.api_key&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:p.errors.api_key}),i&&(0,j.jsx)(V,{fieldKey:i,checked:p.savedAsSecret.api_key??!1,onToggle:e=>D(`api_key`,e)})]}):null]})}if(w?.kind!==`stdio`)return null;let e=w;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(v,{testId:`mcp-install-field-command-readonly`,name:`command-readonly`,type:`text`,label:r(o.MCP$COMMAND_LABEL),value:`${e.command} ${e.args.join(` `)}`.trim(),onChange:()=>{},isDisabled:!0,className:`w-full`}),(e.envFields??[]).map(e=>(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(v,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:p.values[e.key]??``,onChange:t=>E(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(e.helperText)}),p.errors[e.key]&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:p.errors[e.key]}),e.key in p.savedAsSecret&&(0,j.jsx)(V,{fieldKey:e.key,checked:p.savedAsSecret[e.key],onToggle:t=>D(e.key,t)})]},e.key)),(e.argFields??[]).map(e=>(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(v,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:p.values[e.key]??``,onChange:t=>E(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(e.helperText)}),p.errors[e.key]&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:p.errors[e.key]})]},e.key))]})})()}),g&&(0,j.jsx)(`p`,{"data-testid":`mcp-install-modal-error`,className:`text-sm text-red-500 whitespace-pre-wrap`,children:g}),(0,j.jsxs)(`div`,{className:`flex justify-end gap-2 mt-2`,children:[(0,j.jsx)(ne,{type:`button`,variant:`secondary`,onClick:t,testId:`mcp-install-cancel`,isDisabled:T,children:r(o.BUTTON$CANCEL)}),(0,j.jsx)(ne,{type:`submit`,variant:`primary`,isDisabled:T,testId:`mcp-install-submit`,children:r(d||x?o.MCP$VERIFYING:l||y?o.SETTINGS$SAVING:o.MCP$INSTALL_BUTTON)})]})]})})}export{U as a,de as c,pe as d,F as f,k as h,K as i,P as l,me as m,Le as n,H as o,he as p,Y as r,B as s,He as t,fe as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{I as r,L as i,M as a}from"./vendor~entry.client~root~root-layout~index-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{I as r,L as i,M as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{t as o}from"./useTranslation-Cbf5AGg_.js";import{t as s}from"./declaration-BGsHjPEW.js";import{t as c}from"./utils-DB9LsAzA.js";import{t as l}from"./modal-backdrop-zVwfOJZr.js";import{r as u,t as d}from"./modal-body-Cc2zp0xb.js";import{t as f}from"./brand-button-B1izLAdR.js";import{t as p}from"./modal-close-button-BcIBUdSq.js";import{t as m}from"./settings-input-BsgQWS5R.js";import{n as h}from"./use-create-conversation-r1JHfKO5.js";import{r as g}from"./typography-CzfoD9DY.js";import{n as _,t as v}from"./vendor~launch-_Km3J77E.js";var y=e(t(),1),b=n();function x({pluginIndex:e,paramKey:t,paramValue:n,onParameterChange:r}){let i=`plugin-${e}-param-${t}`;return typeof n==`boolean`?(0,b.jsxs)(`label`,{htmlFor:i,className:`flex w-full cursor-pointer items-center gap-2.5`,children:[(0,b.jsx)(`input`,{id:i,"data-testid":i,type:`checkbox`,checked:n,onChange:n=>r(e,t,n.target.checked),className:`h-4 w-4 shrink-0 rounded`}),(0,b.jsx)(`span`,{className:`text-sm`,children:t})]}):typeof n==`number`?(0,b.jsx)(m,{testId:i,name:`plugin-${e}-param-${t}`,type:`number`,label:t,value:String(n),className:`w-full`,onChange:n=>r(e,t,n===``?0:parseFloat(n)||0)}):(0,b.jsx)(m,{testId:i,name:`plugin-${e}-param-${t}`,type:`text`,label:t,value:String(n??``),className:`w-full`,onChange:n=>r(e,t,n)})}function S({plugin:e,originalIndex:t,isExpanded:n,onToggle:r,getPluginDisplayName:i,onParameterChange:a}){let{t:c}=o(`openhands`);return e.parameters&&Object.keys(e.parameters).length>0?(0,b.jsxs)(`div`,{className:`rounded-lg border border-[var(--oh-border)] bg-tertiary`,children:[(0,b.jsxs)(`button`,{type:`button`,onClick:r,className:`flex w-full items-center justify-between px-4 py-3 text-left hover:bg-base-tertiary rounded-t-lg cursor-pointer`,"data-testid":`plugin-section-${t}`,children:[(0,b.jsx)(g.Text,{className:`text-base font-normal`,children:i(e)}),n?(0,b.jsx)(v,{className:`h-5 w-5 text-white`}):(0,b.jsx)(_,{className:`h-5 w-5 text-white`})]}),n&&(0,b.jsxs)(`div`,{className:`border-t border-[var(--oh-border-subtle)] px-4 pb-3`,children:[e.ref&&(0,b.jsxs)(`div`,{className:`mb-2 text-sm text-white`,children:[c(s.LAUNCH$PLUGIN_REF),` `,e.ref]}),e.repo_path&&(0,b.jsxs)(`div`,{className:`mb-2 text-sm text-white`,children:[c(s.LAUNCH$PLUGIN_PATH),` `,e.repo_path]}),(0,b.jsx)(`div`,{className:`flex flex-col gap-4`,children:Object.entries(e.parameters||{}).map(([e,n])=>(0,b.jsx)(x,{pluginIndex:t,paramKey:e,paramValue:n,onParameterChange:a},e))})]})]}):null}function C({plugins:e,message:t,isLoading:n=!1,onStartConversation:r,onClose:i}){let{t:a}=o(`openhands`),[m,h]=y.useState(e),[_,v]=y.useState(()=>{let t={};return e.forEach((e,n)=>{e.parameters&&Object.keys(e.parameters).length>0&&(t[n]=!0)}),t}),[x,C]=y.useState(!1),w=m.filter(e=>e.parameters&&Object.keys(e.parameters).length>0),T=m.filter(e=>!e.parameters||Object.keys(e.parameters).length===0),E=e=>{v(t=>({...t,[e]:!t[e]}))},D=(e,t,n)=>{h(r=>{let i=[...r],a={...i[e]};return a.parameters={...a.parameters,[t]:n},i[e]=a,i})},O=e=>{let{source:t,repo_path:n}=e;if(n){let e=n.split(`/`);return e[e.length-1]}if(t.startsWith(`github:`))return t.replace(`github:`,``);if(t.includes(`/`)){let e=t.split(`/`);return e[e.length-1].replace(`.git`,``)}return t},k=e=>{let{source:t}=e;return t.startsWith(`github:`)?t.replace(`github:`,``):t.includes(`github.com/`)&&t.split(`github.com/`)[1]?.replace(`.git`,``)||t},A=()=>{let e=m.map(e=>k(e));return[...new Set(e)]},j=()=>{r(m,t)},M=m.length===1?O(m[0]):a(s.LAUNCH$MODAL_TITLE_GENERIC);return(0,b.jsx)(l,{onClose:i,children:(0,b.jsxs)(`div`,{"data-testid":`plugin-launch-modal`,className:c(`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] max-h-[80vh]`,u(`md`),d),children:[(0,b.jsx)(p,{onClose:i,testId:`close-button`}),(0,b.jsxs)(g.H2,{className:`pr-6`,children:[a(s.LAUNCH$MODAL_TITLE),` `,M]}),t&&(0,b.jsx)(`p`,{className:`text-sm text-white`,children:t}),(0,b.jsxs)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:[w.length>0&&(0,b.jsx)(`div`,{className:`space-y-3`,children:m.map((e,t)=>(0,b.jsx)(S,{plugin:e,originalIndex:t,isExpanded:!!_[t],onToggle:()=>E(t),getPluginDisplayName:O,onParameterChange:D},`plugin-${t}`))}),T.length>0&&(0,b.jsxs)(`div`,{className:c(w.length>0&&`mt-4`),children:[(0,b.jsx)(g.H3,{className:`mb-2 text-white`,children:w.length>0?a(s.LAUNCH$ADDITIONAL_PLUGINS):a(s.LAUNCH$PLUGINS)}),(0,b.jsx)(`div`,{className:`space-y-2`,children:T.map((e,t)=>(0,b.jsxs)(`div`,{className:`rounded-md bg-tertiary px-3 py-2 text-sm`,children:[(0,b.jsx)(`div`,{className:`font-medium`,children:O(e)}),(0,b.jsxs)(`div`,{className:`text-xs text-white mt-1`,children:[k(e),e.repo_path&&(0,b.jsxs)(`span`,{className:`ml-1`,children:[`/ `,e.repo_path]}),e.ref&&(0,b.jsxs)(`span`,{className:`ml-2`,children:[`@ `,e.ref]})]})]},`simple-plugin-${t}`))})]})]}),(0,b.jsxs)(`div`,{className:`pt-4 border-t border-[var(--oh-border-subtle)]`,children:[(0,b.jsxs)(`div`,{className:`flex items-start gap-3 mb-4`,children:[(0,b.jsx)(`input`,{id:`trust-checkbox`,"data-testid":`trust-checkbox`,type:`checkbox`,checked:x,onChange:e=>C(e.target.checked),className:`mt-1 h-4 w-4 flex-shrink-0`}),(0,b.jsx)(`label`,{htmlFor:`trust-checkbox`,className:`text-sm text-white`,children:a(s.LAUNCH$TRUST_SKILL_CHECKBOX,{sources:A().join(`, `),interpolation:{escapeValue:!1}})})]}),(0,b.jsx)(`div`,{className:`flex w-full justify-end mt-8`,children:(0,b.jsx)(f,{testId:`start-conversation-button`,type:`button`,variant:`primary`,onClick:j,isDisabled:n||!x,className:`px-4`,children:a(n?s.LAUNCH$STARTING:s.LAUNCH$START_CONVERSATION)})})]})]})})}function w(e){if(e)return e.replace(/<[^>]*>/g,``).slice(0,500)||void 0}function T(e){let t=e.get(`plugins`);if(t)try{let n=atob(t),r=JSON.parse(n);if(!Array.isArray(r))return{plugins:[],error:`invalid_format`};let i=[];for(let e of r){if(typeof e!=`object`||!e||typeof e.source!=`string`)return{plugins:[],error:`invalid_format`};i.push({source:e.source,ref:e.ref??null,repo_path:e.repo_path??null,parameters:e.parameters??null})}return i.length===0?{plugins:[],error:`no_plugins`}:{plugins:i,message:w(e.get(`message`))}}catch{return{plugins:[],error:`invalid_format`}}let n=e.get(`plugin_source`);return n?{plugins:[{source:n,ref:e.get(`plugin_ref`)??null,repo_path:e.get(`plugin_repo_path`)??null,parameters:null}],message:w(e.get(`message`))}:{plugins:[],error:`no_plugins`}}function E({errorType:e,onGoHome:t,onTryAgain:n}){let{t:r}=o(`openhands`),i={no_plugins:r(s.LAUNCH$ERROR_NO_PLUGINS),invalid_format:r(s.LAUNCH$ERROR_INVALID_FORMAT),creation_failed:r(s.LAUNCH$ERROR_CREATION_FAILED)};return(0,b.jsx)(`div`,{className:`flex h-full items-center justify-center`,"data-testid":`launch-error`,children:(0,b.jsxs)(`div`,{className:`max-w-md rounded-lg bg-[var(--oh-surface)] p-6 text-center`,children:[(0,b.jsx)(`h2`,{className:`mb-4 text-xl font-medium text-red-400`,children:r(s.LAUNCH$ERROR_TITLE)}),(0,b.jsx)(`p`,{className:`mb-6 text-[var(--oh-text-tertiary)]`,children:i[e]}),(0,b.jsxs)(`div`,{className:`flex justify-center gap-3`,children:[(0,b.jsx)(`button`,{type:`button`,onClick:t,className:`rounded-md bg-tertiary px-4 py-2 text-sm text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`go-home-button`,children:r(s.LAUNCH$GO_HOME)}),n&&(0,b.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-md bg-blue-600 px-4 py-2 text-sm text-white hover:bg-blue-700`,"data-testid":`try-again-button`,children:r(s.LAUNCH$TRY_AGAIN)})]})]})})}var D=i(function(){let[e]=r(),t=a(),{t:n}=o(`openhands`),i=h(),[c,l]=y.useState(null),u=y.useMemo(()=>T(e),[e]),d=async(e,r)=>{l(null);try{t(`/conversations/${(await i.mutateAsync({plugins:e,query:r,entryPoint:`launch_deeplink`})).conversation_id}`)}catch{l(n(s.LAUNCH$ERROR_CREATION_UNKNOWN))}},f=()=>{t(`/conversations`)};return u.error?(0,b.jsx)(E,{errorType:u.error,onGoHome:f}):c?(0,b.jsx)(E,{errorType:`creation_failed`,onGoHome:f,onTryAgain:()=>{l(null),window.location.reload()}}):(0,b.jsx)(`div`,{className:`h-full`,"data-testid":`launch-route`,children:(0,b.jsx)(C,{plugins:u.plugins,message:u.message,isLoading:i.isPending,onStartConversation:d,onClose:f})})});export{D as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{a as i,n as a,p as o}from"./path-utils-PNfCKQDV.js";import{t as s}from"./useMutation-u8UgRgDK.js";import{t as c}from"./useQuery-D5pEZbY0.js";import{_ as l,d as u,f as d,h as f,m as p}from"./agent-server-compatibility-BWN-EIQn.js";import{_ as m}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{f as h}from"./telemetry-C5JMEfqB.js";import{a as g}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js";import{t as _}from"./proxy-B3tCGf0X.js";import{t as v}from"./react-DPDgL6du.js";import{n as y}from"./middleware-DYHYNAnP.js";import{a as ee}from"./conversation-local-storage-F6zVMM--.js";import{t as b}from"./conversation-store-LptbOvKa.js";import{t as x}from"./v4-DbCkTSoU.js";import{o as te,s as ne,t as re}from"./agent-server-conversation-service.api-DSPIkMwJ.js";import{t as S}from"./use-user-conversation-CnE4zhOA.js";import{t as ie}from"./conversation-state-store-B2Bp32XI.js";import{t as ae}from"./files-tab-store-DJsPxYdg.js";import{C,D as oe,E as w,S as T,T as se,_ as ce,b as le,c as ue,d as de,f as fe,g as pe,h as E,k as D,l as O,m as me,p as he,s as k,t as A,u as ge,v as _e,w as ve,x as j,y as ye}from"./use-event-store-Bbaz51GR.js";import{t as be}from"./command-store-D8J5LMW1.js";import{t as M}from"./browser-store-BI6uklCG.js";var N=e(t(),1),xe=(e,t)=>{let[n,r]=N.useState(!1),[i,a]=N.useState(null),[o,s]=N.useState(null),[c,l]=N.useState(!1),u=N.useRef(null),d=N.useRef(0),f=N.useRef(null),p=N.useRef(!0),m=N.useRef(new WeakSet),h=N.useRef(t);N.useEffect(()=>{h.current=t},[t]);let g=N.useCallback(()=>{let t=e;if(h.current?.queryParams){let n=Object.entries(h.current.queryParams).reduce((e,[t,n])=>(e[t]=String(n),e),{});t=`${e}?${new URLSearchParams(n).toString()}`}let n=new WebSocket(t);u.current=n,m.current.add(n),n.onopen=e=>{r(!0),s(null),l(!1),d.current=0,h.current?.onOpen?.(e)},n.onmessage=e=>{a(e.data),h.current?.onMessage?.(e)},n.onclose=e=>{let t=m.current.has(n);r(!1),e.code!==1e3&&(s(Error(`WebSocket closed with code ${e.code}: ${e.reason||`Connection closed unexpectedly`}`)),t&&h.current?.onError?.(e)),h.current?.onClose?.(e);let i=h.current?.reconnect?.enabled??!1,a=h.current?.reconnect?.maxAttempts??1/0;i&&t&&p.current&&d.current<a?(l(!0),d.current+=1,f.current=setTimeout(()=>{g()},3e3)):l(!1)},n.onerror=e=>{r(!1),h.current?.onError?.(e)}},[e]);N.useEffect(()=>(p.current=!0,d.current=0,e&&e.trim()!==``&&g(),()=>{if(p.current=!1,f.current&&=(clearTimeout(f.current),null),u.current){let{readyState:e}=u.current;m.current.delete(u.current),(e===WebSocket.CONNECTING||e===WebSocket.OPEN)&&u.current.close(),u.current=null}}),[e,g]);let _=N.useCallback(e=>{u.current?.readyState===WebSocket.OPEN&&u.current.send(e)},[]),v=N.useCallback(()=>{p.current=!1,l(!1),f.current&&=(clearTimeout(f.current),null),u.current&&(m.current.delete(u.current),u.current.close())},[]),y=N.useCallback(()=>{if(p.current=!0,d.current=0,l(!0),s(null),f.current&&=(clearTimeout(f.current),null),u.current){let e=u.current;m.current.delete(e),u.current=null,(e.readyState===WebSocket.CONNECTING||e.readyState===WebSocket.OPEN)&&e.close()}g()},[g]);return{isConnected:n,lastMessage:i,error:o,socket:u.current,sendMessage:_,isReconnecting:c,attemptCount:d.current,disconnect:v,reconnect:y}},P=`Unable to connect to server`,F={errorMessage:null,errorType:null,errorCode:null},Se=v(e=>({...F,setErrorMessage:(t,n=`conversation`,r=null)=>e(()=>({errorMessage:t,errorType:n,errorCode:r})),removeErrorMessage:()=>e(()=>({...F})),clearConnectionError:()=>e(e=>e.errorType===`connection`?{...F}:e)})),I=15e4,L={pendingMessages:[]},R=()=>`pending-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,Ce=v((e,t)=>({...L,enqueuePendingMessage:n=>{let r=R(),i={id:r,conversationId:n.conversationId,text:n.text,content:n.content??n.text,status:`sending`,imageUrls:n.imageUrls??[],fileUrls:n.fileUrls??[],timestamp:n.timestamp??new Date().toISOString()};return e(e=>({pendingMessages:[...e.pendingMessages,i]})),setTimeout(()=>{t().pendingMessages.find(e=>e.id===r)?.status===`sending`&&t().markPendingMessageError(r,`Send timed out`)},I),r},markPendingMessageError:(t,n)=>e(e=>({pendingMessages:e.pendingMessages.map(e=>e.id===t?{...e,status:`error`,errorMessage:n}:e)})),markPendingMessageSending:t=>e(e=>({pendingMessages:e.pendingMessages.map(e=>e.id===t?{...e,status:`sending`,errorMessage:void 0}:e)})),removePendingMessage:t=>e(e=>({pendingMessages:e.pendingMessages.filter(e=>e.id!==t)})),consumeMatchingPendingMessage:(t,n)=>{let r=null;return e(e=>{let i=e.pendingMessages.map((e,t)=>({m:e,i:t})).filter(({m:e})=>e.status===`sending`&&e.conversationId===t);if(i.length===0)return e;let a=i.find(({m:e})=>e.content===n)??i[0];return r=a.m,{pendingMessages:[...e.pendingMessages.slice(0,a.i),...e.pendingMessages.slice(a.i+1)]}}),r},clearPendingMessages:()=>e(()=>({...L})),reassignPendingMessages:(t,n)=>e(e=>({pendingMessages:e.pendingMessages.map(e=>e.conversationId===t?{...e,conversationId:n}:e)}))})),we={statusByConversation:{}},Te=v()(y(e=>({...we,setStatus:(t,n)=>e(e=>({statusByConversation:{...e.statusByConversation,[t]:n}}))}),{name:`GoalStore`})),z=new Set([`files`,`browser`,`terminal`,`planner`,`tasklist`]);function B(e){let t=b.getState();t.setSelectedTab(e),t.isRightPanelShown||(t.setHasRightPanelToggled(!0),t.setIsRightPanelShown(!0))}function V(e){return z.has(e)}function Ee(e,t=null){switch(e.command){case`navigate_to_file`:case`show_preview`:B(`files`),e.path&&ae.getState().setSelectedPath(e.path,t);return;case`open_tab`:e.tab===`vscode`?B(`files`):e.tab&&V(e.tab)?B(e.tab):e.tab&&console.warn(`[canvas_ui] Ignoring open_tab with unknown tab: ${e.tab}`);return}}var H=(e,t,n)=>({entriesByConversation:{...e.entriesByConversation,[t]:[...e.entriesByConversation[t]??[],n]}}),U=v()(y(e=>({entriesByConversation:{},activeProfileByConversation:{},show:(t,n,r)=>e(e=>H(e,t,{id:x(),anchorEventId:n,profiles:r})),recordSwitch:(t,n,r)=>e(e=>({...H(e,t,{id:x(),anchorEventId:n,profiles:[],switchedTo:r}),activeProfileByConversation:{...e.activeProfileByConversation,[t]:r}})),seedSwitches:(t,n)=>e(e=>{let r=e.entriesByConversation[t]??[],i=new Set(r.map(e=>e.id)),a=n.filter(e=>!i.has(e.id)).map(e=>({id:e.id,anchorEventId:e.anchorEventId,profiles:[],switchedTo:e.profileName}));return a.length===0?e:{entriesByConversation:{...e.entriesByConversation,[t]:[...r,...a]}}}),clearActiveProfile:t=>e(e=>{if(!(t in e.activeProfileByConversation))return e;let n={...e.activeProfileByConversation};return delete n[t],{activeProfileByConversation:n}}),clear:t=>e(e=>{let n={...e.entriesByConversation};delete n[t];let r={...e.activeProfileByConversation};return delete r[t],{entriesByConversation:n,activeProfileByConversation:r}}),clearAll:()=>e({entriesByConversation:{},activeProfileByConversation:{}})}),{name:`ModelStore`})),De=(e,t,n)=>{let{action:r}=e;if((r.kind===`StrReplaceEditorAction`||r.kind===`FileEditorAction`||r.kind===`ExecuteBashAction`)&&n.invalidateQueries({queryKey:[`file_changes`,t]},{cancelRefetch:!1}),(r.kind===`StrReplaceEditorAction`||r.kind===`FileEditorAction`)&&r.path){let e=a(r.path);n.invalidateQueries({queryKey:[`file_diff`,t,e]})}e.tool_name===`SwitchLLMTool`&&(n.invalidateQueries({queryKey:[`user`,`conversation`,t]}),U.getState().clearActiveProfile(t))},Oe=class{static async respondToConfirmation(e,t,n,r){let i=l().backend;return i.kind===`cloud`?_({backend:i,method:`POST`,hostOverride:p(t),path:`/api/conversations/${e}/events/respond_to_confirmation`,body:n,authMode:`session-api-key`,sessionApiKey:r}):new m(u({conversationUrl:t,sessionApiKey:r})).respondToConfirmation(e,n)}static async getEventCount(e,t,n){let r=l().backend;return r.kind===`cloud`?_({backend:r,method:`GET`,hostOverride:p(t),path:`/api/conversations/${e}/events/count`,authMode:`session-api-key`,sessionApiKey:n}):new m(u({conversationUrl:t,sessionApiKey:n})).getEventCount(e)}static async searchEvents(e,t,n,r={}){let i=l().backend,a=r.limit??100;if(i.kind===`cloud`){let t=Math.min(a,100),n=!!(r.sortOrder||r.pageId||r.timestampGte||r.timestampLt),o=new URLSearchParams;o.set(`limit`,String(t)),r.sortOrder&&o.set(`sort_order`,r.sortOrder),r.pageId&&o.set(`page_id`,r.pageId),r.timestampGte&&o.set(`timestamp__gte`,r.timestampGte),r.timestampLt&&o.set(`timestamp__lt`,r.timestampLt);let s=t=>_({backend:i,method:`GET`,path:`/api/v1/conversation/${e}/events/search?${t.toString()}`});try{let e=await s(o);return{items:e?.items??[],next_page_id:e?.next_page_id??null}}catch(e){if(!n||r.strictPagination)throw e;return console.warn(`[EventService] Cloud backend doesn't support pagination filters. Falling back to initial load only. Server needs OpenHands/OpenHands#14399.`),{items:[],next_page_id:null}}}let o=await new g(d({conversationUrl:t,sessionApiKey:n}),e).search({limit:a,...r.pageId?{page_id:r.pageId}:{},...r.sortOrder?{sort_order:r.sortOrder}:{},...r.timestampGte?{timestamp__gte:r.timestampGte}:{},...r.timestampLt?{timestamp__lt:r.timestampLt}:{}});return{items:o?.items??[],next_page_id:o?.next_page_id??null}}};function W({message:e,source:t,metadata:n={}}){h(Error(e),{error_source:t||`unknown`,...n})}var ke=()=>s({mutationKey:[`read-conversation-file`],mutationFn:async({conversationId:e,filePath:t})=>re.readConversationFile(e,t)}),Ae=v(e=>({cost:null,max_budget_per_task:null,usage:null,setMetrics:t=>e(t)})),je=e=>{let{data:t}=S(e??null);return c({queryKey:[`conversation-history`,e,t?.conversation_url??null,t?.session_api_key??null],enabled:!!e&&!!t,queryFn:async()=>{if(!e)return{events:[],hasMore:!1,nextPageId:null};let n=await Oe.searchEvents(e,t?.conversation_url??null,t?.session_api_key??null,{limit:50,sortOrder:`TIMESTAMP_DESC`});if(!Array.isArray(n.items))throw Error(`Invalid conversation history response: expected page.items to be an array.`);return{events:[...n.items].reverse(),hasMore:!!n.next_page_id||n.items.length>=50,nextPageId:n.next_page_id??null}},staleTime:0,gcTime:1800*1e3,refetchOnMount:`always`,refetchOnWindowFocus:!1})},G=[`The goal is NOT yet complete (audit iteration`,`Resuming a goal that was paused or interrupted.`],K=e=>{if(e.llm_message?.role!==`user`)return!1;let t=e.llm_message.content,n=Array.isArray(t)?t.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
2
|
+
`):``;return G.some(e=>n.startsWith(e))},q=e=>{if(E(e))return le(e)&&!e.value.active;if(ue(e)){let t=e.action.kind;return!(!t||t===`ExecuteBashAction`&&e.source===`user`||t===`PlanningFileEditorAction`||t===`SwitchLLMAction`)}return C(e)?!(e.observation.kind===`SwitchLLMObservation`&&!e.observation.is_error):T(e)?!K(e):O(e)||j(e)||k(e)?!0:w(e)?e.content!==null||e.reasoning_content!==null:!1},Me=e=>e.some(e=>e.source===`user`),J=()=>{let{uiEvents:e}=A.getState();for(let t=e.length-1;t>=0;--t){let n=e[t];if(q(n))return String(n.id)}return null};function Ne(e,t,n=J()){U.getState().recordSwitch(e,n,t)}function Pe(e,t){let n=[],r=null;for(let e of t)oe(e)&&!e.observation.is_error&&n.push({id:`history-switch:${e.id}`,anchorEventId:r,profileName:e.observation.profile_name}),q(e)&&(r=String(e.id));n.length>0&&U.getState().seedSwitches(e,n)}var Y=n(),Fe=(0,N.createContext)(void 0);function Ie(e){return e.llm_message.content.filter(e=>e.type===`text`).map(e=>e.text).join(``)}function Le({children:e,conversationId:t,conversationUrl:n,sessionApiKey:a,subConversations:s,subConversationIds:c}){let[l,d]=(0,N.useState)(`CONNECTING`),[p,h]=(0,N.useState)(`CONNECTING`),g=N.useRef(!1),_=N.useRef(!1),v=r(),y=A(e=>e.addEvent),x=A(e=>e.addEvents),re=A(e=>e.clearEventsForConversation),{setErrorMessage:S,removeErrorMessage:ae,clearConnectionError:C}=Se(),w=Ce(e=>e.consumeMatchingPendingMessage),{setExecutionStatus:T}=ie(),{appendInput:k,appendOutput:j}=be(),F=M(e=>e.reset),[I,L]=(0,N.useState)(!0),[R,we]=(0,N.useState)(null),{setPlanContent:z}=b(),{mutate:B}=ke(),V=(0,N.useRef)(0),H=(0,N.useRef)(null),U=e=>e?.toUpperCase().endsWith(`PLAN.MD`)??!1,G=(0,N.useCallback)(()=>{C()},[C]),K=(0,N.useCallback)(e=>{if(e.value.usage_to_metrics?.agent){let t=e.value.usage_to_metrics.agent,n={cost:t.accumulated_cost,max_budget_per_task:t.max_budget_per_task??null,usage:t.accumulated_token_usage?{prompt_tokens:t.accumulated_token_usage.prompt_tokens,completion_tokens:t.accumulated_token_usage.completion_tokens,cache_read_tokens:t.accumulated_token_usage.cache_read_tokens,cache_write_tokens:t.accumulated_token_usage.cache_write_tokens,context_window:t.accumulated_token_usage.context_window,per_turn_token:t.accumulated_token_usage.per_turn_token}:null};Ae.getState().setMetrics(n)}},[]),{data:q,isPending:Me,isFetching:J,isError:Le}=je(t),Re=!!t&&Me;(0,N.useLayoutEffect)(()=>{let e=t??null;A.getState().loadedConversationId!==e&&(re(e),F())},[t,re,F]),(0,N.useLayoutEffect)(()=>{if(!(!q||q.events.length===0)&&(x(q.events),t)){Pe(t,A.getState().uiEvents);for(let e of q.events)D(e)&&w(t,Ie(e))}},[q,x,t,w]);let X=(0,N.useMemo)(()=>{if(J)return null;let e=q?.events??[],t=e[e.length-1];return!t||!(`timestamp`in t)||!t.timestamp?null:t.timestamp},[q,J]),ze=(0,N.useMemo)(()=>!t||!n||J&&!Le?null:f(t,n),[t,n,J,Le]),Z=(0,N.useMemo)(()=>{if(!s?.length)return null;let e=s[0];return!e?.id||!e.conversation_url?null:f(e.id,e.conversation_url)},[s]),Be=(0,N.useMemo)(()=>Z?l===`CONNECTING`||p===`CONNECTING`?`CONNECTING`:l===`OPEN`&&p===`OPEN`?`OPEN`:l===`CLOSED`&&p===`CLOSED`?`CLOSED`:l===`CLOSING`||p===`CLOSING`?`CLOSING`:`CLOSED`:l,[l,p,Z]);(0,N.useEffect)(()=>{R!==null&&V.current>=R&&I&&L(!1)},[R,I,V]),(0,N.useEffect)(()=>{if(!I&&H.current){let{path:e,conversationId:t}=H.current;B({conversationId:t,filePath:e},{onSuccess:e=>{z(e)},onError:e=>{console.warn(`Failed to read conversation file:`,e)}}),H.current=null}},[I,B,z]),(0,N.useEffect)(()=>{g.current=!1,L(!!c?.length),we(null),V.current=0,H.current=null},[c]),(0,N.useEffect)(()=>{g.current=!1,_.current=!1,H.current=null},[t]);let Ve=(0,N.useMemo)(()=>Re||I,[Re,I]),He=(0,N.useCallback)(e=>{try{let n=JSON.parse(e.data);if(ge(n)){let e=!A.getState().eventIds.has(n.id)&&oe(n)?n:null;if(y(n),pe(n)){let e=n;W({message:e.detail,source:`conversation`,metadata:{eventId:e.id,errorCode:e.code}}),S(e.detail,`conversation`,e.code)}else G();if(O(n)&&W({message:n.error,source:`agent`,metadata:{eventId:n.id,toolName:n.tool_name,toolCallId:n.tool_call_id}}),D(n)&&t&&(w(t,Ie(n)),ee(t,{draftMessage:null})),ue(n)&&De(n,t||`test-conversation-id`,v),E(n)&&(ye(n)&&T(n.value.execution_status),de(n)&&T(n.value),se(n)&&K(n),le(n)&&t&&Te.getState().setStatus(t,n.value)),ce(n)&&k(n.action.command),_e(n)&&j(n.observation.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
3
|
+
`)),he(n)){let{screenshot_data:e}=n.observation;if(e){let t=e.startsWith(`data:`)?e:`data:image/png;base64,${e}`;M.getState().setScreenshotSrc(t)}}if(fe(n)&&M.getState().setUrl(n.action.url),t&&e&&!e.observation.is_error){Ne(t,e.observation.profile_name);let n=te(t);ne(t,{selected_repository:n?.selected_repository??null,selected_branch:n?.selected_branch??null,git_provider:n?.git_provider??null,selected_workspace:n?.selected_workspace??null,active_profile:e.observation.profile_name,plugins:n?.plugins??null}),e.observation.active_model&&o(v,t,e.observation.active_model),i(v,t)}me(n)&&Ee(n.action,t??null)}}catch(e){console.warn(`Failed to parse WebSocket message as JSON:`,e)}},[y,S,w,v,t,T,k,j,K,G]),Ue=(0,N.useCallback)(e=>{try{let n=JSON.parse(e.data);if(I&&(V.current+=1,R!==null&&V.current>=R&&L(!1)),ge(n)){if(y({...n,isFromPlanningAgent:!0}),pe(n)){let e=n;W({message:e.detail,source:`planning_conversation`,metadata:{eventId:e.id,errorCode:e.code}}),S(e.detail,`conversation`,e.code)}else G();if(O(n)&&W({message:n.error,source:`planning_agent`,metadata:{eventId:n.id,toolName:n.tool_name,toolCallId:n.tool_call_id}}),D(n)&&t&&(w(t,Ie(n)),ee(t,{draftMessage:null})),ue(n)&&De(n,s?.[0]?.id||`test-conversation-id`,v),E(n)&&(ye(n)&&T(n.value.execution_status),de(n)&&T(n.value),se(n)&&K(n),le(n)&&t&&Te.getState().setStatus(t,n.value)),ce(n)&&k(n.action.command),_e(n)&&j(n.observation.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
4
|
+
`)),ve(n)){let{path:e}=n.observation;if(U(e)){let t=s?.[0]?.id;t&&e&&(I?H.current={path:e,conversationId:t}:B({conversationId:t,filePath:e},{onSuccess:e=>{z(e)},onError:e=>{console.warn(`Failed to read conversation file:`,e)}}))}}}}catch(e){console.warn(`Failed to parse WebSocket message as JSON:`,e)}},[y,I,R,S,w,v,s,t,T,k,j,B,z,K,G]),We=(0,N.useMemo)(()=>{let e=X?{resend_mode:`since`,after_timestamp:X}:{resend_mode:`all`};return a&&(e.session_api_key=a),{queryParams:e,reconnect:{enabled:!0},onOpen:()=>{d(`OPEN`),g.current=!0,C()},onClose:()=>{d(`CLOSED`)},onError:()=>{d(`CLOSED`),g.current&&S(P,`connection`)},onMessage:He}},[He,S,C,a,X]),Ge=(0,N.useMemo)(()=>{let e={resend_all:!0};a&&(e.session_api_key=a);let t=s?.[0];return{queryParams:e,reconnect:{enabled:!0},onOpen:async()=>{if(h(`OPEN`),_.current=!0,C(),t?.id&&t.conversation_url)try{let e=await Oe.getEventCount(t.id,t.conversation_url,t.session_api_key);we(e),e===0&&L(!1)}catch{L(!1)}},onClose:()=>{h(`CLOSED`)},onError:()=>{h(`CLOSED`),_.current&&S(P,`connection`)},onMessage:Ue}},[Ue,S,C,a,s]),{socket:Q,reconnect:Ke}=xe(ze||``,We),{socket:$,reconnect:qe}=xe(Z||``,Ge),Je=(0,N.useCallback)(()=>{if(ae(),b.getState().conversationMode===`plan`&&Z){qe();return}Ke()},[Z,Ke,qe,ae]),Ye=(0,N.useCallback)(async e=>{let n=b.getState().conversationMode===`plan`?$:Q;if(n?.readyState!==WebSocket.OPEN){if(!t){let e=Error(`No conversation ID available`);throw S(e.message),e}try{return await new m(u()).sendEvent(t,{role:`user`,content:e.content},{run:!0}),{queued:!0}}catch(e){throw S(e instanceof Error?e.message:`Failed to queue message for delivery`),e}}try{return n.send(JSON.stringify({...e,run:!0})),{queued:!1}}catch(e){throw S(e instanceof Error?e.message:`Failed to send message`),e}},[Q,$,S,t]);(0,N.useEffect)(()=>{Q&&ze&&(()=>{switch(Q.readyState){case WebSocket.CONNECTING:d(`CONNECTING`);break;case WebSocket.OPEN:d(`OPEN`);break;case WebSocket.CLOSING:d(`CLOSING`);break;case WebSocket.CLOSED:d(`CLOSED`);break;default:d(`CLOSED`);break}})()},[Q,ze]),(0,N.useEffect)(()=>{$&&Z&&(()=>{switch($.readyState){case WebSocket.CONNECTING:h(`CONNECTING`);break;case WebSocket.OPEN:h(`OPEN`);break;case WebSocket.CLOSING:h(`CLOSING`);break;case WebSocket.CLOSED:h(`CLOSED`);break;default:h(`CLOSED`);break}})()},[$,Z]);let Xe=(0,N.useMemo)(()=>({connectionState:Be,sendMessage:Ye,isLoadingHistory:Ve,reconnect:Je}),[Be,Ye,Ve,Je]);return(0,Y.jsx)(Fe.Provider,{value:Xe,children:e})}var Re=()=>(0,N.useContext)(Fe)||null,X=e=>(0,Y.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:109,height:109,viewBox:`0 0 109 109`,fill:`none`,...e,children:[(0,Y.jsx)(`path`,{d:`M40.1979 21.8969L34.7311 17.832L25.2691 30.5574L20.2094 26.784L16.1367 32.2451L26.6653 40.0969L40.1979 21.8969Z`,fill:`currentColor`}),(0,Y.jsx)(`path`,{d:`M90.8342 35.1983H50.4639V28.3858H90.8342V35.1983Z`,fill:`currentColor`}),(0,Y.jsx)(`path`,{d:`M90.8342 57.9067H50.4638V51.0942H90.8342V57.9067Z`,fill:`currentColor`}),(0,Y.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M27.2508 63.5837C32.2674 63.5837 36.3342 59.517 36.3342 54.5004C36.3342 49.4838 32.2674 45.4171 27.2508 45.4171C22.2342 45.4171 18.1675 49.4838 18.1675 54.5004C18.1675 59.517 22.2342 63.5837 27.2508 63.5837ZM27.2508 59.0421C29.7591 59.0421 31.7925 57.0087 31.7925 54.5004C31.7925 51.9921 29.7591 49.9587 27.2508 49.9587C24.7425 49.9587 22.7092 51.9921 22.7092 54.5004C22.7092 57.0087 24.7425 59.0421 27.2508 59.0421Z`,fill:`currentColor`}),(0,Y.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M36.3342 77.2087C36.3342 82.2253 32.2674 86.2921 27.2508 86.2921C22.2342 86.2921 18.1675 82.2253 18.1675 77.2087C18.1675 72.1922 22.2342 68.1254 27.2508 68.1254C32.2674 68.1254 36.3342 72.1922 36.3342 77.2087ZM31.7925 77.2087C31.7925 79.717 29.7591 81.7504 27.2508 81.7504C24.7425 81.7504 22.7092 79.717 22.7092 77.2087C22.7092 74.7005 24.7425 72.6671 27.2508 72.6671C29.7591 72.6671 31.7925 74.7005 31.7925 77.2087Z`,fill:`currentColor`}),(0,Y.jsx)(`path`,{d:`M50.4637 80.615H90.834V73.8025H50.4637V80.615Z`,fill:`currentColor`})]});export{Pe as a,q as c,Oe as d,U as f,P as g,Se as h,Ne as i,je as l,Ce as m,Le as n,J as o,Te as p,Re as r,Me as s,X as t,Ae as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-
|
|
1
|
+
import{t as e}from"./createLucideIcon-D4Tak8A1.js";var t=e(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]);export{t};
|