@openhands/agent-canvas 1.7.2 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.windows.md +2 -2
- package/build/assets/{Trans-DP5rcauH.js → Trans-B7lYw4uD.js} +1 -1
- package/build/assets/{acp-providers-BHKZvEm5.js → acp-providers-WUD4tfSq.js} +1 -1
- package/build/assets/active-backend-context-mY7Gff5c.js +2 -0
- package/build/assets/{agent-context-settings-CTaN-Iw9.js → agent-context-settings-BTUmWEzL.js} +1 -1
- package/build/assets/{agent-profiles-settings-CR4VTqv_.js → agent-profiles-settings-Ilqid_R5.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-C_7YnjzP.js +41 -0
- package/build/assets/{agent-settings-BIOsUglV.js → agent-settings-BGTyoT6X.js} +2 -2
- package/build/assets/agent-settings-CxfT4ksO.js +1 -0
- package/build/assets/{alert-banner-C1nzoXBC.js → alert-banner-eRyIwDyU.js} +1 -1
- package/build/assets/api-key-entry-screen-JOx3SH1-.js +1 -0
- package/build/assets/app-settings-D53QZy5p.js +1 -0
- package/build/assets/automation-detail-nEflClmc.js +2 -0
- package/build/assets/{automation-export-Bu-r-EzL.js → automation-export-BO_kfqC8.js} +1 -1
- package/build/assets/{automations-list-CYw7_6FR.js → automations-list-BYncC7gv.js} +1 -1
- package/build/assets/{back-nav-button-Be_L157B.js → back-nav-button-C02hGa8t.js} +1 -1
- package/build/assets/backend-form-modal-CKrBF80P.js +1 -0
- package/build/assets/{backend-synced-settings-badge-BNpEylNP.js → backend-synced-settings-badge-CQ9xtNWm.js} +1 -1
- package/build/assets/{badge-DwgrwohM.js → badge-CzXbf7tR.js} +1 -1
- package/build/assets/{base-modal-CSHhJTSr.js → base-modal-DkVyzFMt.js} +1 -1
- package/build/assets/{brand-button-CQO8oqVo.js → brand-button-BUlDL-mz.js} +1 -1
- package/build/assets/{browser-BUDJnBg4.js → browser-3QjrEr1D.js} +1 -1
- package/build/assets/{browser-tab-CEApjoEV.js → browser-tab-BijpUbdt.js} +1 -1
- package/build/assets/{chat-send-button-D4614wUz.js → chat-send-button-BKsVjhtA.js} +1 -1
- package/build/assets/check-CrxQfJZ2.js +1 -0
- package/build/assets/chevron-down-D_LsyTA7.js +1 -0
- package/build/assets/circle-check-DZn9HkLE.js +1 -0
- package/build/assets/{circle-plus-check-toggle-E3Ecb_gg.js → circle-plus-check-toggle-DdjUiOo1.js} +1 -1
- package/build/assets/cloud-funnel-analytics-NlmDoeo2.js +1 -0
- package/build/assets/{combobox-caret-C8_eGdp2.js → combobox-caret-Dl9UtvD6.js} +1 -1
- package/build/assets/{command-menu-N_BriUy8.js → command-menu-CvLPs7dg.js} +1 -1
- package/build/assets/{condenser-settings-Czi8cKxV.js → condenser-settings-C4Y9CzQV.js} +1 -1
- package/build/assets/{confirmation-modal-gZtbojCm.js → confirmation-modal-CRBJSllP.js} +1 -1
- package/build/assets/{context-menu-list-item-BTHGFhIx.js → context-menu-list-item-FGaafXGh.js} +1 -1
- package/build/assets/conversation-D_ORtpKC.js +1 -0
- package/build/assets/conversation-Dpc5nmGi.js +90 -0
- package/build/assets/conversation-panel-D_ORtpKC.js +1 -0
- package/build/assets/conversation-state-store-CGRQemtx.js +1 -0
- package/build/assets/{conversation-tab-empty-state-BCMHkGQk.js → conversation-tab-empty-state-CDjvNgpG.js} +1 -1
- package/build/assets/{copy-B8Y5ufoR.js → copy-Drwu97Gx.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-C4l3CMSd.js → copy-to-clipboard-button-NbN1clVr.js} +1 -1
- package/build/assets/{device-verify-C_M7Z8xs.js → device-verify-CDm_WrVu.js} +1 -1
- package/build/assets/{dropdown-classes-DQlj-MpS.js → dropdown-classes-CqA2BTCL.js} +1 -1
- package/build/assets/{entry.client-DETaouwO.js → entry.client-BO2KQj0y.js} +2 -2
- package/build/assets/{enum-filter-dropdown-paB-lFSP.js → enum-filter-dropdown-DSqPZnsD.js} +1 -1
- package/build/assets/{environment-switch-overlay-D0FgCMqs.js → environment-switch-overlay-mGl2pqqx.js} +1 -1
- package/build/assets/extensions-hub-Br3Lgynp.js +1 -0
- package/build/assets/extensions-navigation-BQmstKDZ.js +1 -0
- package/build/assets/{external-link-Cnnd6ikC.js → external-link-D9B2QMPf.js} +1 -1
- package/build/assets/files-tab-4c9HFSLo.js +1 -0
- package/build/assets/{form-control-classes-CSPevi7c.js → form-control-classes-CtVAktAy.js} +1 -1
- package/build/assets/{format-time-delta-DuhE50B-.js → format-time-delta-DICE64sz.js} +1 -1
- package/build/assets/git-provider-icon-0PqmIS_S.js +1 -0
- package/build/assets/{highlighted-source-view-suUKd5if.js → highlighted-source-view-KMsA9c4a.js} +1 -1
- package/build/assets/home-D9JsyEmE.js +1 -0
- package/build/assets/{home-sN90Xcxp.js → home-TFhnmZLx.js} +1 -1
- package/build/assets/index-home-D9JsyEmE.js +1 -0
- package/build/assets/install-server-modal-BgGRnqA0.js +1 -0
- package/build/assets/{launch-Ccnhte5b.js → launch-DjkKw55l.js} +1 -1
- package/build/assets/{list-todo-_BXQzOiB.js → list-todo-BpAf7aOT.js} +1 -1
- package/build/assets/{llm-not-configured-banner-DTWzISnk.js → llm-not-configured-banner-Y4W9-sar.js} +4 -4
- package/build/assets/llm-settings-D8zNkIlP.js +1 -0
- package/build/assets/llm-settings-nPwv7hKu.js +1 -0
- package/build/assets/{llm-subscription-service-W5BprsNA.js → llm-subscription-service-COTgZc1C.js} +1 -1
- package/build/assets/loader-circle-CGD6-Vak.js +1 -0
- package/build/assets/{loading-spinner-CcpnCr_d.js → loading-spinner-DRFyh6Iy.js} +1 -1
- package/build/assets/manage-backends-modal-DiRWE3tJ.js +1 -0
- package/build/assets/manifest-1cf33a7b.js +1 -0
- package/build/assets/markdown-renderer-U40HF0Ak.js +8 -0
- package/build/assets/mcp-xDMaHzOw.js +9 -0
- package/build/assets/{messages-DINDkPNK.js → messages-CdNfZPgd.js} +2 -2
- package/build/assets/{modal-body-DQhiw-AR.js → modal-body-C3bGicn4.js} +1 -1
- package/build/assets/{modal-classes-YaEEa5eZ.js → modal-classes-DFFO6BMU.js} +1 -1
- package/build/assets/{modal-close-button-turIYn0t.js → modal-close-button-vxkAIRyZ.js} +1 -1
- package/build/assets/{onboarding-BegDrOKn.js → onboarding-DWuFieEA.js} +1 -1
- package/build/assets/onboarding-modal-C8m72Dpb.js +1 -0
- package/build/assets/organization-service.api-CQ73CB-S.js +1 -0
- package/build/assets/{pencil-8_lvWDoZ.js → pencil-DzW2GB2M.js} +1 -1
- package/build/assets/{planner-tab-w6HT0N_A.js → planner-tab-YG0bGxDY.js} +1 -1
- package/build/assets/plugins-management-service-ijhH8OSh.js +1 -0
- package/build/assets/plus-CTGLo3aa.js +1 -0
- package/build/assets/profiles-service.api-C32pPm70.js +1 -0
- package/build/assets/providers-DuSn9s2i.js +1 -0
- package/build/assets/proxy-BiyDhMBd.js +1 -0
- package/build/assets/{puzzle-DXWdfaa7.js → puzzle-DlqT0yvr.js} +1 -1
- package/build/assets/{recommended-automations-launcher-BF2mtAKw.js → recommended-automations-launcher-Dru1yN46.js} +2 -2
- package/build/assets/{refresh-cw-D7CYLy-d.js → refresh-cw-Br5254f4.js} +1 -1
- package/build/assets/root-DOLLQteU.js +2 -0
- package/build/assets/root-layout-xmylWoew.js +3 -0
- package/build/assets/schema-field-htfNouTG.js +1 -0
- package/build/assets/{sdk-section-page-BW-i45yr.js → sdk-section-page-D0K1dBQY.js} +1 -1
- package/build/assets/search-BrpWXWUi.js +1 -0
- package/build/assets/secrets-service-Dbv5Zb8G.js +1 -0
- package/build/assets/{secrets-settings-D7U1ErCH.js → secrets-settings-Da4SSaX9.js} +1 -1
- package/build/assets/{segmented-toggle-DbbD3Tve.js → segmented-toggle-CZKOdIly.js} +1 -1
- package/build/assets/settings-F4a09IxY.js +1 -0
- package/build/assets/{settings-dropdown-input-Dx6vlkgf.js → settings-dropdown-input-jOiv5Yrk.js} +1 -1
- package/build/assets/{settings-index-COAdxm2Q.js → settings-index-CyJBf5NA.js} +1 -1
- package/build/assets/{settings-input-BjW_zyTN.js → settings-input-BEaTCem1.js} +1 -1
- package/build/assets/{settings-list-classes-gQdBahdt.js → settings-list-classes-VqMzkYYt.js} +1 -1
- package/build/assets/{settings-modal-CFnbQ8_4.js → settings-modal-C-S1NpbC.js} +1 -1
- package/build/assets/settings-service.api-CTJRrvMu.js +1 -0
- package/build/assets/{settings-switch-UNSf8K8I.js → settings-switch-B405oU_v.js} +1 -1
- package/build/assets/{shared-conversation-CnMxy7p_.js → shared-conversation-BvWtTwES.js} +1 -1
- package/build/assets/{sidebar-layout-DXHtbEj1.js → sidebar-layout-BGMuyC86.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-U78hQRJ1.js → sidebar-mobile-menu-toggle-xiKoUfGa.js} +1 -1
- package/build/assets/{sidebar-nav-link-pvUivfK2.js → sidebar-nav-link-DA4_ct9G.js} +1 -1
- package/build/assets/{sidebar-store-DwrYKwYr.js → sidebar-store-FRJ3rADB.js} +1 -1
- package/build/assets/{skill-card-pill-row-D7XCz5uk.js → skill-card-pill-row-BMdhr_sd.js} +1 -1
- package/build/assets/{skill-icon-badge-HqBWZ2Eq.js → skill-icon-badge-CGUkgcVH.js} +1 -1
- package/build/assets/{skills-plugins-BPhaNpfx.js → skills-plugins-C5eJnyft.js} +1 -1
- package/build/assets/{skills-settings-CcwMtnnJ.js → skills-settings-pUxMr6WZ.js} +1 -1
- package/build/assets/{styled-tooltip-DsjDnR_W.js → styled-tooltip-B3kIdVyH.js} +1 -1
- package/build/assets/{task-list-tab-BmaTwjaS.js → task-list-tab-B3k4W1cK.js} +1 -1
- package/build/assets/{terminal-BRcoba5B.js → terminal-CBI_41Zc.js} +1 -1
- package/build/assets/{toggle-switch-BptY3XRG.js → toggle-switch-DYRr9CAR.js} +1 -1
- package/build/assets/{trash-2-Bq4lHbTB.js → trash-2-gZPlx23R.js} +1 -1
- package/build/assets/{typography-C6fuRTTT.js → typography-B1UxuuEC.js} +1 -1
- package/build/assets/{use-acp-credential-form-B0_pZ_uS.js → use-acp-credential-form-CjSvKWFH.js} +1 -1
- package/build/assets/use-activate-agent-profile-DCRf47e-.js +1 -0
- package/build/assets/use-agent-profiles-DmT9zxAN.js +1 -0
- package/build/assets/{use-can-manage-org-profiles-CrG1km7R.js → use-can-manage-org-profiles-vBiP7rHF.js} +1 -1
- package/build/assets/use-cloud-current-user-id-BMq9gw93.js +1 -0
- package/build/assets/use-config-C959QcRC.js +1 -0
- package/build/assets/{use-create-conversation-Dsa4nzU9.js → use-create-conversation-CakhLF0X.js} +1 -1
- package/build/assets/{use-create-secret-BnxuAjDt.js → use-create-secret-RT4QtSS9.js} +1 -1
- package/build/assets/use-llm-profiles-CdaxVpyY.js +1 -0
- package/build/assets/use-onboarding-completion-CJU4MNAY.js +1 -0
- package/build/assets/use-plugins-marketplace-D-93nqtJ.js +1 -0
- package/build/assets/{use-save-agent-profile-2Mk9ZX37.js → use-save-agent-profile-DGJ3-u0M.js} +1 -1
- package/build/assets/{use-save-settings-BRh9p_fv.js → use-save-settings--C6LZXfI.js} +1 -1
- package/build/assets/use-settings-DIAo5KFk.js +1 -0
- package/build/assets/use-settings-nav-items-DPK5sxvR.js +16 -0
- package/build/assets/use-skills-D_mLhYNa.js +1 -0
- package/build/assets/use-tracking-COqZLobY.js +1 -0
- package/build/assets/{use-user-conversation-GnGhs_Ob.js → use-user-conversation-DhcAEyJX.js} +1 -1
- package/build/assets/{useMutation-DyQXZFEF.js → useMutation-DHLpZ6J0.js} +1 -1
- package/build/assets/utils-DsWhWn2F.js +1 -0
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js} +1 -1
- package/build/assets/{vendor~files-tab-vm3f67Pz.js → vendor~files-tab-atebg0iG.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-kX4LrGQC.js → vendor~index-home~home~conversation-panel~conversation-G9DMrR7m.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-DpA6fir3.js → vendor~root-layout~conversation-panel~conversation-DEhW1h3I.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-EShpjxey.js → vendor~root-layout~index-home~home~conversation-panel~conversation-Acmf1sKj.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DD_UNO02.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CmzCY1BT.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-Be63Q2Ln.js → vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C7Yh77RT.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-Bw4AuHN1.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-VFnwct3q.js} +1 -1
- package/build/assets/{verification-settings-CaCzojbc.js → verification-settings-Vr5cN4md.js} +1 -1
- package/build/assets/x-Dx_JbpHA.js +1 -0
- package/build/favicon-16x16.png +0 -0
- package/build/favicon-32x32.png +0 -0
- package/build/favicon.ico +0 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +2 -0
- package/build/locales/ca/openhands.json +2 -0
- package/build/locales/de/openhands.json +2 -0
- package/build/locales/en/openhands.json +2 -0
- package/build/locales/es/openhands.json +2 -0
- package/build/locales/fr/openhands.json +2 -0
- package/build/locales/it/openhands.json +2 -0
- package/build/locales/ja/openhands.json +2 -0
- package/build/locales/ko-KR/openhands.json +2 -0
- package/build/locales/no/openhands.json +2 -0
- package/build/locales/pt/openhands.json +2 -0
- package/build/locales/tr/openhands.json +2 -0
- package/build/locales/uk/openhands.json +2 -0
- package/build/locales/zh-CN/openhands.json +2 -0
- package/build/locales/zh-TW/openhands.json +2 -0
- package/config/defaults.json +4 -4
- package/dist/api/agent-server-adapter.cjs +1 -1
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.js +7 -7
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.js +95 -95
- package/dist/api/automation-service/automation-service.api.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 +1 -1
- package/dist/api/backend-registry/storage.js.map +1 -1
- package/dist/api/backend-registry/types.d.ts +2 -0
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.js +22 -22
- package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.js +19 -19
- package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.js +26 -12
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +16 -16
- package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
- package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.d.ts +2 -2
- package/dist/components/features/mcp-page/installed-server-card.js +6 -7
- package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
- package/dist/components/features/mcp-page/installed-servers-section.cjs +1 -1
- package/dist/components/features/mcp-page/installed-servers-section.cjs.map +1 -1
- package/dist/components/features/mcp-page/installed-servers-section.d.ts +2 -2
- package/dist/components/features/mcp-page/installed-servers-section.js +2 -2
- package/dist/components/features/mcp-page/installed-servers-section.js.map +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.cjs +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.js +4 -4
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/contexts/active-backend-context.cjs +1 -1
- package/dist/contexts/active-backend-context.cjs.map +1 -1
- package/dist/contexts/active-backend-context.d.ts +3 -2
- package/dist/contexts/active-backend-context.js +55 -42
- package/dist/contexts/active-backend-context.js.map +1 -1
- package/dist/favicon-16x16.png +0 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.js +5 -5
- package/dist/hooks/query/use-cloud-current-user-id.cjs +1 -1
- package/dist/hooks/query/use-cloud-current-user-id.cjs.map +1 -1
- package/dist/hooks/query/use-cloud-current-user-id.js +7 -5
- package/dist/hooks/query/use-cloud-current-user-id.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.js +5 -1
- package/dist/hooks/query/use-cloud-organizations.js.map +1 -1
- package/dist/hooks/use-can-manage-org-profiles.cjs +1 -1
- package/dist/hooks/use-can-manage-org-profiles.cjs.map +1 -1
- package/dist/hooks/use-can-manage-org-profiles.js +2 -1
- package/dist/hooks/use-can-manage-org-profiles.js.map +1 -1
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.js +9 -9
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +2 -0
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +1 -1
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +34 -0
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +2 -0
- package/dist/locales/ca/openhands.json +2 -0
- package/dist/locales/de/openhands.json +2 -0
- package/dist/locales/en/openhands.json +2 -0
- package/dist/locales/es/openhands.json +2 -0
- package/dist/locales/fr/openhands.json +2 -0
- package/dist/locales/it/openhands.json +2 -0
- package/dist/locales/ja/openhands.json +2 -0
- package/dist/locales/ko-KR/openhands.json +2 -0
- package/dist/locales/no/openhands.json +2 -0
- package/dist/locales/pt/openhands.json +2 -0
- package/dist/locales/tr/openhands.json +2 -0
- package/dist/locales/uk/openhands.json +2 -0
- package/dist/locales/zh-CN/openhands.json +2 -0
- package/dist/locales/zh-TW/openhands.json +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.js +9 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.js +5 -5
- package/dist/routes/mcp.cjs +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.js +73 -82
- package/dist/routes/mcp.js.map +1 -1
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.d.ts +8 -0
- package/dist/services/telemetry.js +163 -116
- package/dist/services/telemetry.js.map +1 -1
- package/dist/types/mcp-server.d.ts +5 -0
- package/dist/types/settings.d.ts +3 -0
- package/dist/utils/mcp-config.cjs +1 -1
- package/dist/utils/mcp-config.cjs.map +1 -1
- package/dist/utils/mcp-config.d.ts +8 -0
- package/dist/utils/mcp-config.js +25 -20
- package/dist/utils/mcp-config.js.map +1 -1
- package/dist/utils/mcp-installed-servers.cjs +1 -1
- package/dist/utils/mcp-installed-servers.cjs.map +1 -1
- package/dist/utils/mcp-installed-servers.js +6 -3
- package/dist/utils/mcp-installed-servers.js.map +1 -1
- package/package.json +2 -2
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +2 -2
- package/build/assets/active-backend-context-BlZPzZNU.js +0 -1
- package/build/assets/agent-server-conversation-service.api-Btmi4q6d.js +0 -41
- package/build/assets/agent-settings-KQs-occT.js +0 -1
- package/build/assets/api-key-entry-screen-BhR24gkM.js +0 -1
- package/build/assets/app-settings-Bs4sY8WP.js +0 -1
- package/build/assets/automation-detail-CwDnJbYR.js +0 -2
- package/build/assets/backend-form-modal-Ce-KRHOJ.js +0 -1
- package/build/assets/check-BMOG005H.js +0 -1
- package/build/assets/chevron-down-CV1zZP_K.js +0 -1
- package/build/assets/circle-check-lvN_jFN5.js +0 -1
- package/build/assets/client-source-1v-kWLNU.js +0 -1
- package/build/assets/cloud-funnel-analytics-CasMM7EO.js +0 -1
- package/build/assets/conversation-C25pc2dT.js +0 -1
- package/build/assets/conversation-CObLYSJd.js +0 -90
- package/build/assets/conversation-panel-C25pc2dT.js +0 -1
- package/build/assets/conversation-state-store-DTq4hFoP.js +0 -1
- package/build/assets/extensions-hub-BKftOQ-X.js +0 -1
- package/build/assets/extensions-navigation-DF24q1H1.js +0 -1
- package/build/assets/files-tab-SAiFCnS5.js +0 -1
- package/build/assets/git-provider-icon-BREx-yUX.js +0 -1
- package/build/assets/home-EPNFgzUh.js +0 -1
- package/build/assets/index-home-EPNFgzUh.js +0 -1
- package/build/assets/install-server-modal-BI8yUfmr.js +0 -1
- package/build/assets/llm-settings-BXk5_Pac.js +0 -1
- package/build/assets/llm-settings-C1vpgWam.js +0 -1
- package/build/assets/loader-circle-6zlEYCJw.js +0 -1
- package/build/assets/manage-backends-modal-DhflyGTf.js +0 -1
- package/build/assets/manifest-8082e879.js +0 -1
- package/build/assets/markdown-renderer-CvOO0YIr.js +0 -8
- package/build/assets/mcp-CxLPda-W.js +0 -9
- package/build/assets/onboarding-modal-DdvE6rzw.js +0 -1
- package/build/assets/organization-service.api-CT2OQlLz.js +0 -1
- package/build/assets/plugins-management-service-DVkoM3eA.js +0 -1
- package/build/assets/plus-vIbGD459.js +0 -1
- package/build/assets/profiles-service.api-CBafmAPO.js +0 -1
- package/build/assets/providers-9UzRB9mT.js +0 -1
- package/build/assets/proxy-C79PCMjo.js +0 -1
- package/build/assets/root-Sj7W28yE.js +0 -2
- package/build/assets/root-layout-DbhKVoc7.js +0 -3
- package/build/assets/schema-field-CV6bFnoL.js +0 -1
- package/build/assets/search-sKuYKllf.js +0 -1
- package/build/assets/secrets-service-BjK-bPN2.js +0 -1
- package/build/assets/settings-Bj5Oo45A.js +0 -1
- package/build/assets/settings-service.api-DryhKdSr.js +0 -1
- package/build/assets/telemetry-cmCL3o6Z.js +0 -2
- package/build/assets/use-activate-agent-profile-DH33MvVj.js +0 -1
- package/build/assets/use-agent-profiles-Dmd_4H8q.js +0 -1
- package/build/assets/use-cloud-current-user-id-B6DP3s47.js +0 -1
- package/build/assets/use-config-Csy8EAP9.js +0 -1
- package/build/assets/use-llm-profiles-BMQoc612.js +0 -1
- package/build/assets/use-onboarding-completion-B-2BTS-y.js +0 -1
- package/build/assets/use-plugins-marketplace-PBc_XNz_.js +0 -1
- package/build/assets/use-settings-DBI44RnH.js +0 -1
- package/build/assets/use-settings-nav-items-Cva28C-c.js +0 -16
- package/build/assets/use-skills-RQsCtdzN.js +0 -1
- package/build/assets/use-tracking-CN1nIMnY.js +0 -1
- package/build/assets/utils-qjs_KuS4.js +0 -1
- package/build/assets/x-EjvKGawc.js +0 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/files-tab-4c9HFSLo.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/vendor-styling-Bcgpimp9.js","assets/active-backend-context-mY7Gff5c.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js","assets/utils-DsWhWn2F.js","assets/vendor~files-tab-atebg0iG.js","assets/iconBase-B2rQun3J.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-VFnwct3q.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js","assets/useQuery-B38jBavx.js","assets/messages-CdNfZPgd.js","assets/vendor-markdown-BML7QbqS.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CmzCY1BT.js","assets/useMutation-DHLpZ6J0.js","assets/Trans-B7lYw4uD.js","assets/markdown-renderer-U40HF0Ak.js","assets/v4-DDdyfk2q.js","assets/conversation-store-C6hSXHw0.js","assets/agent-server-conversation-service.api-C_7YnjzP.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~eywn6ulz-BKxxr74w.js","assets/proxy-BiyDhMBd.js","assets/profiles-service.api-C32pPm70.js","assets/settings-service.api-CTJRrvMu.js","assets/settings-Chfn5xTD.js","assets/llm-subscription-service-COTgZc1C.js","assets/llm-subscription-DTqtBCWz.js","assets/acp-providers-WUD4tfSq.js","assets/conversation-state-store-CGRQemtx.js","assets/syntax-highlighter-B92AFGMy.js","assets/copy-to-clipboard-button-NbN1clVr.js","assets/checkmark-CxdXtM3b.js","assets/copy-z7idLzWO.js","assets/navigation-context-BOGzIng3.js","assets/use-user-conversation-DhcAEyJX.js","assets/chevron-down-D_LsyTA7.js","assets/loader-circle-CGD6-Vak.js","assets/vendor~root-layout~conversation-panel~conversation~shared-conversation-DRblkyXD.js","assets/use-config-C959QcRC.js","assets/styled-tooltip-B3kIdVyH.js","assets/use-settings-DIAo5KFk.js","assets/close-CDAVqnTn.js","assets/skills-CYFLsN5U.js","assets/u-check-circle-DBEvndTS.js","assets/typography-B1UxuuEC.js","assets/dist-hOnv1nn2.js","assets/form-control-classes-CtVAktAy.js","assets/format-time-delta-DICE64sz.js","assets/git-provider-icon-0PqmIS_S.js","assets/use-tracking-COqZLobY.js","assets/use-is-authed-BsS4XwSL.js","assets/llm-not-configured-banner-Y4W9-sar.js","assets/vendor~index-home~home~conversation-panel~conversation-G9DMrR7m.js","assets/use-is-creating-conversation-CIAcnd8M.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation-Acmf1sKj.js","assets/chat-send-button-BKsVjhtA.js","assets/check-CrxQfJZ2.js","assets/circle-check-DZn9HkLE.js","assets/plus-CTGLo3aa.js","assets/refresh-cw-Br5254f4.js","assets/use-agent-profiles-DmT9zxAN.js","assets/use-skills-D_mLhYNa.js","assets/context-menu-list-item-FGaafXGh.js","assets/dropdown-classes-CqA2BTCL.js","assets/use-can-manage-org-profiles-vBiP7rHF.js","assets/organization-service.api-CQ73CB-S.js","assets/merge-agent-profile-save-input-WcFmQVKK.js","assets/brand-button-BUlDL-mz.js","assets/base-modal-DkVyzFMt.js","assets/modal-body-C3bGicn4.js","assets/modal-classes-DFFO6BMU.js","assets/loading-spinner-DRFyh6Iy.js","assets/modal-backdrop-X-vKo61e.js","assets/modal-close-button-vxkAIRyZ.js","assets/navigation-link-Bxmn-pCs.js","assets/use-activate-agent-profile-DCRf47e-.js","assets/use-create-conversation-CakhLF0X.js","assets/plugins-management-service-ijhH8OSh.js","assets/use-llm-profiles-CdaxVpyY.js","assets/use-click-outside-element-DKqpqEEm.js","assets/link-external-BDBCz-_z.js","assets/settings-gear-TYXnELES.js","assets/u-robot-CJtSzy5X.js","assets/cloud-funnel-analytics-NlmDoeo2.js","assets/combobox-caret-Dl9UtvD6.js","assets/settings-utils-BL_Z9uIe.js","assets/map-provider-CXU6issd.js","assets/conversation-tab-empty-state-CDjvNgpG.js","assets/highlighted-source-view-KMsA9c4a.js","assets/folder-C86qXV7M.js","assets/segmented-toggle-CZKOdIly.js","assets/browser-tab-BijpUbdt.js","assets/external-link-D9B2QMPf.js","assets/vendor~browser-tab-_-VCXq8n.js","assets/planner-tab-YG0bGxDY.js","assets/list-todo-BpAf7aOT.js","assets/task-list-tab-B3k4W1cK.js","assets/terminal-CBI_41Zc.js","assets/vendor~terminal-BVSbSr6V.js","assets/vendor~terminal-T4IDBjWs.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{$ as t,St as n,a as r,bt as i,gt as a,ht as o,m as s,xt as c,yt as l}from"./vendor-styling-Bcgpimp9.js";import{F as u,I as d,R as f,U as p}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js";import{n as m}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t as h}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{E as g,T as _,w as v}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";import{t as y}from"./useMutation-DHLpZ6J0.js";import{t as b}from"./useQuery-B38jBavx.js";import{t as x}from"./use-is-creating-conversation-CIAcnd8M.js";import{t as S}from"./Trans-B7lYw4uD.js";import{$ as C,Bt as w,Dt as T,Et as E,Ot as D,n as O,ot as k}from"./active-backend-context-mY7Gff5c.js";import{C as ee,D as A,E as j,M,O as N,R as P,S as F,T as I,b as L,c as R,d as te,h as ne,i as re,l as ie,o as ae,t as z,u as oe,x as se,z as B}from"./utils-DsWhWn2F.js";import{C as ce,D as V,E as le,O as ue,S as de,T as fe,_ as pe,b as me,c as he,d as ge,f as _e,g as ve,h as ye,l as be,m as xe,n as Se,o as Ce,s as we,t as Te,v as Ee,w as De,x as Oe,y as ke}from"./messages-CdNfZPgd.js";import{t as Ae}from"./check-CrxQfJZ2.js";import{n as je,t as H}from"./vendor~root-layout~conversation-panel~conversation-DEhW1h3I.js";import{t as Me}from"./copy-Drwu97Gx.js";import{t as Ne}from"./external-link-D9B2QMPf.js";import{t as Pe}from"./list-todo-BpAf7aOT.js";import{t as Fe}from"./loader-circle-CGD6-Vak.js";import{t as Ie}from"./x-Dx_JbpHA.js";import{t as Le}from"./proxy-BiyDhMBd.js";import{t as Re}from"./loading-spinner-DRFyh6Iy.js";import{t as ze}from"./use-tracking-COqZLobY.js";import{n as Be}from"./use-settings-DIAo5KFk.js";import{t as Ve}from"./modal-backdrop-X-vKo61e.js";import{n as He}from"./modal-body-C3bGicn4.js";import{n as Ue,r as We}from"./base-modal-DkVyzFMt.js";import{t as Ge}from"./brand-button-BUlDL-mz.js";import{n as Ke}from"./navigation-context-BOGzIng3.js";import{t as qe}from"./styled-tooltip-B3kIdVyH.js";import{r as Je,u as Ye}from"./dropdown-classes-CqA2BTCL.js";import{c as Xe,g as Ze,m as Qe,n as $e,p as et,v as tt}from"./git-provider-icon-0PqmIS_S.js";import{a as nt,c as rt,f as it,t as U,u as at}from"./conversation-store-C6hSXHw0.js";import{t as ot}from"./modal-close-button-vxkAIRyZ.js";import{t as st}from"./v4-DDdyfk2q.js";import{l as ct,t as lt,u as ut}from"./agent-server-conversation-service.api-C_7YnjzP.js";import{t as dt}from"./use-is-authed-BsS4XwSL.js";import{a as ft,c as pt,f as mt,g as ht,l as gt,m as _t,s as vt,t as yt}from"./conversation-state-store-CGRQemtx.js";import{c as bt,d as xt,f as St,i as Ct,l as wt,n as Tt,r as Et,s as Dt,t as Ot,u as kt}from"./sidebar-mobile-menu-toggle-xiKoUfGa.js";import{t as At}from"./use-click-outside-element-DKqpqEEm.js";import{n as jt}from"./use-create-conversation-CakhLF0X.js";import{n as Mt,t as W}from"./context-menu-list-item-FGaafXGh.js";import{a as G,i as Nt,n as Pt}from"./use-can-manage-org-profiles-vBiP7rHF.js";import{t as Ft}from"./u-edit-809W9D9T.js";import{t as It}from"./skills-CYFLsN5U.js";import{t as Lt}from"./use-user-conversation-DhcAEyJX.js";import{t as Rt}from"./copy-z7idLzWO.js";import{r as zt}from"./typography-B1UxuuEC.js";import{A as Bt,B as Vt,C as Ht,D as Ut,E as Wt,F as Gt,G as Kt,I as qt,L as Jt,M as Yt,N as Xt,O as Zt,R as Qt,S as $t,T as en,U as tn,V as nn,a as rn,b as an,f as on,g as sn,h as cn,i as ln,k as un,m as dn,n as fn,o as pn,p as mn,r as hn,t as gn,v as _n,w as vn,x as yn,y as bn}from"./llm-not-configured-banner-Y4W9-sar.js";import{A as xn,B as Sn,C as Cn,D as wn,E as Tn,F as En,G as K,I as Dn,J as On,K as q,L as kn,M as An,N as jn,O as Mn,P as Nn,S as Pn,V as Fn,W as In,a as Ln,b as Rn,d as zn,f as Bn,g as Vn,i as Hn,k as Un,l as Wn,m as Gn,p as Kn,q as J,s as qn,u as Jn,v as Yn,w as Xn,x as Y,y as X,z as Zn}from"./markdown-renderer-U40HF0Ak.js";import{t as Qn}from"./use-breakpoint-DA7JqsRN.js";import{t as $n}from"./vendor~conversation-panel~conversation~alert-banner-BNzz5FuZ.js";var er=g(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),tr=g(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),nr=g(`square-chevron-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`m10 8 4 4-4 4`,key:`1wy4r4`}]]),rr=e=>!e.isLayoutDirty&&e.willUpdate(!1);function ir(){let e=new Set,t=new WeakMap,n=()=>e.forEach(rr);return{add:r=>{e.add(r),t.set(r,r.addEventListener(`willUpdate`,n))},remove:r=>{e.delete(r);let i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}var Z=l(),Q=e(n(),1),ar=(0,Q.createContext)(null);function or(){let e=(0,Q.useRef)(!1);return o(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function sr(){let e=or(),[n,r]=(0,Q.useState)(0),i=(0,Q.useCallback)(()=>{e.current&&r(n+1)},[n]);return[(0,Q.useCallback)(()=>t.postRender(i),[i]),n]}var cr=e=>e===!0,lr=e=>cr(e===!0)||e===`id`,ur=({children:e,id:t,inherit:n=!0})=>{let r=(0,Q.useContext)(a),i=(0,Q.useContext)(ar),[o,s]=sr(),c=(0,Q.useRef)(null),l=r.id||i;c.current===null&&(lr(n)&&l&&(t=t?l+`-`+t:l),c.current={id:t,group:cr(n)&&r.group||ir()});let u=(0,Q.useMemo)(()=>({...c.current,forceRender:o}),[s]);return(0,Z.jsx)(a.Provider,{value:u,children:e})},dr={curAgentState:I.LOADING},fr=it(e=>({...dr,setCurrentAgentState:t=>e({curAgentState:t}),reset:()=>e(dr)})),pr=`openhands-last-conversation-by-backend`;function mr(e,t){return t?`${e}::${t}`:e}function hr(){if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(pr);if(!e)return{};let t=JSON.parse(e);if(typeof t!=`object`||!t)return{};let n={};for(let[e,r]of Object.entries(t))typeof r==`string`&&r.length>0&&(n[e]=r);return n}catch{return{}}}function gr(e){if(!(typeof window>`u`))try{window.localStorage.setItem(pr,JSON.stringify(e))}catch{}}function _r(e,t,n){if(!n)return;let r=hr();r[mr(e,t)]=n,gr(r)}function vr(e,t){let n=hr(),r=mr(e,t);r in n&&(delete n[r],gr(n))}var yr=e=>({action:V.CHANGE_AGENT_STATE,args:{agent_state:e}}),br=e=>`error`in e,xr=e=>`type`in e&&e.type===`error`,Sr=()=>{let{send:e}=le(),t=Y(e=>e.events);Q.useEffect(()=>{if(!t.length)return;let n=t[t.length-1];if(!(xn(n)&&Un(n))){if(br(n)){if(n.error_code===401){T(`Session expired.`);return}typeof n.error==`string`?T(n.error):T(n.message);return}xr(n)&&`${n.message??``}`.startsWith(`Agent reached maximum`)&&e(yr(I.PAUSED))}},[t.length])},Cr=()=>{let{curAgentState:e}=K();return{runtimeActive:!j.includes(e)}};function wr({children:e}){return Sr(),Cr(),e}var Tr=`ACPAuthRequired`,Er={ACPAuthRequired:B.ERROR$ACP_AUTH_REQUIRED_TITLE,ACPSpawnError:B.CHAT_INTERFACE$AGENT_ERROR_MESSAGE,ACPInitError:B.CHAT_INTERFACE$AGENT_ERROR_MESSAGE,ACPPromptError:B.CHAT_INTERFACE$AGENT_ERROR_MESSAGE,UsagePolicyRefusal:B.CHAT_INTERFACE$AGENT_ERROR_MESSAGE};function Dr(e){return e?Er[e]??null:null}function Or(e){return e===Tr}var kr={entriesByConversation:{}},Ar=(e,t,n)=>({entriesByConversation:{...e.entriesByConversation,[t]:n(e.entriesByConversation[t]??[])}}),jr=it()(at(e=>({...kr,addPending:(t,n)=>{let r=st();return e(e=>Ar(e,t,e=>[...e,{id:r,question:n,status:`pending`}])),r},resolve:(t,n,r)=>e(e=>Ar(e,t,e=>e.map(e=>e.id===n?{...e,response:r,status:`done`}:e))),fail:(t,n,r)=>e(e=>Ar(e,t,e=>e.map(e=>e.id===n?{...e,response:r,status:`error`}:e))),dismiss:(t,n)=>e(e=>Ar(e,t,e=>e.filter(e=>e.id!==n)))}),{name:`BtwStore`}));function Mr({onClick:e}){let{t}=h(`openhands`);return(0,Z.jsxs)(`button`,{type:`button`,onClick:e,className:`flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-normal text-success bg-success/10 hover:bg-success/20 border border-success/30 transition-colors`,children:[(0,Z.jsx)(ce,{className:`w-3.5 h-3.5 fill-success`}),(0,Z.jsx)(`span`,{children:t(B.CHAT_INTERFACE$BTW_GOT_IT)})]})}function Nr({conversationId:e}){let{t}=h(`openhands`),n=jr(e=>e.entriesByConversation),r=jr(e=>e.dismiss),i=e?n[e]??[]:[];return!e||i.length===0?null:(0,Z.jsx)(`div`,{"data-testid":`btw-messages`,className:`flex flex-col w-full`,children:i.map(n=>{let i=n.status===`pending`;return(0,Z.jsx)(De,{title:(0,Z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`opacity-60`,children:t(B.CHAT_INTERFACE$BTW_PREFIX)}),(0,Z.jsx)(`span`,{children:n.question}),i&&(0,Z.jsx)(`span`,{"data-testid":`btw-spinner`,className:`inline-block w-3.5 h-3.5 ml-2 rounded-full border-2 border-transparent border-t-[var(--oh-border-input)] animate-spin`})]}),details:i?t(B.CHAT_INTERFACE$BTW_WAITING_FOR_ANSWER):n.response??``,initiallyExpanded:!i,chevronPosition:`before`,titleTrailing:!i&&(0,Z.jsx)(Mr,{onClick:()=>r(e,n.id)})},n.id)})})}function Pr({conversationId:e}){let t=Vn(e=>e.statusByConversation),n=e?t[e]:void 0;return n?.active?(0,Z.jsx)(de,{status:n}):null}var Fr=`${N} `,Ir=(e,t)=>{let n=jr(e=>e.addPending),r=jr(e=>e.resolve),i=jr(e=>e.fail);return(0,Q.useCallback)(a=>{let o=a.trim(),s=o===`/btw`||o.startsWith(Fr);if(!e||!s){t(a);return}let c=o.slice(N.length).trim();if(!c)return;let l=n(e,c);pt(e,c).then(({response:t})=>r(e,l,t)).catch(t=>i(e,l,t?.message??`Failed to ask agent`))},[e,t,n,r,i])},Lr=`${M} `,Rr=/^--max(?:=|\s+)(\d+)\s*/,zr=(e,t)=>{let{t:n}=h();return(0,Q.useCallback)(r=>{let i=r.trim(),a=i===`/goal`||i.startsWith(Lr);if(!e||!a){t(r);return}let o=i.slice(M.length).trim(),s,c=o.match(Rr);c&&(s=parseInt(c[1],10),o=o.slice(c[0].length).trim());let l=o;if(!l){T(n(B.GOAL$OBJECTIVE_REQUIRED));return}let u={objective:l};s&&s>=1&&(u.max_iterations=s),_t(e,u).catch(e=>{let t=n(B.GOAL$START_FAILED);T(e instanceof Error&&e.message?e.message:t)})},[e,t,n])},Br=`flex flex-row gap-1 items-center justify-center rounded-[100px]`;function Vr(e){return z(Br,e?`bg-[var(--oh-surface)] hover:bg-tertiary cursor-pointer text-white`:`bg-[var(--oh-surface)] cursor-not-allowed opacity-50 text-[var(--oh-muted)]`)}function Hr(e){return e?`white`:`var(--oh-muted)`}var Ur=`font-normal text-sm leading-5 truncate`;function Wr({onSuggestionsClick:e,hasRepository:t,providerTokensReady:n,isConversationReady:r=!0}){let{t:i}=h(`openhands`),{trackPullButtonClick:a}=ze(),o=n&&t&&r;return(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>{a(),e(R())},disabled:!o,className:z(Vr(o),`px-0.5 py-1 w-[76px] min-w-[76px]`),children:[(0,Z.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center`,children:(0,Z.jsx)(Zt,{width:12,height:12,color:Hr(o)})}),(0,Z.jsx)(`div`,{className:z(Ur,`max-w-[76px]`),title:i(B.COMMON$PULL),children:i(B.COMMON$PULL)})]})}function Gr({onSuggestionsClick:e,hasRepository:t,providerTokensReady:n,currentGitProvider:r,isConversationReady:i=!0}){let{t:a}=h(`openhands`),{trackPushButtonClick:o}=ze(),s=n&&t&&i;return(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>{o(),e(ie(r))},disabled:!s,className:z(Vr(s),`px-2 py-1 w-[77px] min-w-[77px]`),children:[(0,Z.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center`,children:(0,Z.jsx)(un,{width:12,height:12,color:Hr(s)})}),(0,Z.jsx)(`div`,{className:z(Ur,`max-w-[77px]`),title:a(B.COMMON$PUSH),children:a(B.COMMON$PUSH)})]})}function Kr({onSuggestionsClick:e,hasRepository:t,providerTokensReady:n,currentGitProvider:r,isConversationReady:i=!0}){let{t:a}=h(`openhands`),{trackCreatePrButtonClick:o}=ze(),s=n&&t&&i;return(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>{o(),e(ae(r))},disabled:!s,className:z(Vr(s),`px-2 py-1 w-[126px] min-w-[126px] h-7`),children:[(0,Z.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center`,children:(0,Z.jsx)(Ut,{width:12,height:12,color:Hr(s)})}),(0,Z.jsx)(`div`,{className:z(Ur,`max-w-[126px]`),title:a(B.COMMON$PULL_REQUEST),children:a(B.COMMON$PULL_REQUEST)})]})}var qr=({allowAgentError:e=!1}={})=>{let{data:t}=q(),{curAgentState:n}=K(),r=e?A:j;return L(t?.execution_status)&&!r.includes(n)};function Jr(e){return e.kind===`BashCommand`}function Yr(e){return e.kind===`BashOutput`}function Xr(e){return e.kind===`BashError`}function Zr(e,t,n){let r=(0,Q.useRef)(null),i=(0,Q.useRef)(null),a=(0,Q.useRef)([]),o=(0,Q.useRef)([]),s=(0,Q.useRef)(new Map);return(0,Q.useEffect)(()=>{if(!n)return;let c=C(e),l=new WebSocket(c);r.current=l,i.current=null,l.onopen=()=>{In(l,t),i.current=l;for(let{command:e,cwd:t,timeout:n,resolve:r,reject:i}of a.current)o.current.push({resolve:r,reject:i}),l.send(JSON.stringify({command:e,cwd:t,timeout:n}));a.current=[]},l.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}if(Jr(t)){let e=o.current.shift();e&&s.current.set(t.id,{...e,stdout:[],stderr:[]})}else if(Yr(t)&&t.command_id){let e=s.current.get(t.command_id);e&&(t.stdout&&e.stdout.push(t.stdout),t.stderr&&e.stderr.push(t.stderr),t.exit_code!=null&&(s.current.delete(t.command_id),e.resolve({exit_code:t.exit_code,stdout:e.stdout.join(``),stderr:e.stderr.join(``)})))}else Xr(t)&&u(`Bash error: ${t.code}: ${t.detail}`)};function u(e){let t=Error(e);for(let{reject:e}of a.current)e(t);a.current=[];for(let e of o.current)e.reject(t);o.current=[];for(let e of s.current.values())e.reject(t);s.current.clear()}return l.onclose=()=>{r.current=null,i.current=null,u(`Bash WebSocket closed`)},l.onerror=()=>{r.current=null,i.current=null,u(`Bash WebSocket error`)},()=>{l.onclose=null,l.onerror=null,l.close(),r.current=null,i.current=null,u(`Bash WebSocket unmounted`)}},[n,e,t]),(0,Q.useCallback)((e,t,n)=>new Promise((s,c)=>{let l=r.current;if(!l||l.readyState===WebSocket.CLOSED||l.readyState===WebSocket.CLOSING){c(Error(`Bash WebSocket not available`));return}l.readyState!==WebSocket.OPEN||i.current!==l?a.current.push({command:e,cwd:t,timeout:n,resolve:s,reject:c}):(o.current.push({resolve:s,reject:c}),l.send(JSON.stringify({command:e,cwd:t,timeout:n})))}),[])}var Qr={"github.com":`github`,"gitlab.com":`gitlab`,"bitbucket.org":`bitbucket`,"dev.azure.com":`azure_devops`};function $r(e){return e.replace(/\.git$/,``)}function ei(e){return e?Qr[e.toLowerCase()]??null:null}function ti(e){let t=e.split(`/`).filter(Boolean),n=t.indexOf(`_git`);return n===-1?t.join(`/`):[...t.slice(0,n),...t.slice(n+1)].join(`/`)}function ni(e,t,n){let r=$r(n.replace(/^\/+/,``)),i=ei(t);return{url:e,host:t,repository:(i===`azure_devops`?ti(r):r)||null,provider:i}}function ri(e){let t=e?.trim();if(!t)return null;let n=t.match(/^[^@\s]+@([^:\s]+):(.+)$/);if(n){let e=n[1];return ni(t,e,n[2])}try{let e=new URL(t);return ni(t,e.hostname||null,e.pathname)}catch{return null}}var ii={repository:null,branch:null,provider:null,remoteUrl:null},ai=[`r=$(git remote get-url origin 2>/dev/null)`,`b=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)`,`if [ -z "$r$b" ]; then`,`n=$(find . -mindepth 2 -maxdepth 4 -name .git 2>/dev/null | cut -c3- | sed 's|/.git$||' | sort -u)`,`c=$(printf '%s\\n' "$n" | grep -c '[^[:space:]]')`,`if [ "$c" = "1" ] && [ -n "$n" ]; then`,`r=$(git -C "$n" remote get-url origin 2>/dev/null)`,`b=$(git -C "$n" rev-parse --abbrev-ref HEAD 2>/dev/null)`,`fi`,`fi`,`printf '%s\\n%s' "$r" "$b"`].join(`
|
|
3
|
+
`);async function oi(e,t){let n=await e(ai,t,10);if(n.exit_code!==0)return ii;let r=n.stdout.indexOf(`
|
|
4
|
+
`),i=(r>=0?n.stdout.slice(0,r):n.stdout).trim(),a=(r>=0?n.stdout.slice(r+1):``).trim(),o=a&&a!==`HEAD`?a:null;if(!i&&!o)return ii;let s=ri(i);return{repository:s?.repository??null,provider:s?.provider??null,remoteUrl:i||null,branch:o}}var si=()=>{let{data:e}=q(),t=qr(),{backend:n}=O(),r=n.kind===`local`,i=e?.id,a=e?.conversation_url,o=e?.session_api_key,s=e?.workspace?.working_dir?.trim(),c=!!e?.selected_repository,l=!!e?.git_provider,u=!!e?.selected_branch,d=r&&t&&!!i&&!!s&&(!c||!l||!u),f=Zr(a,o,d),p=(0,Q.useRef)(f);return p.current=f,b({queryKey:[`local-git-info`,i,a,o,s],queryFn:async()=>oi((e,t,n)=>p.current(e,t,n),s),enabled:d,retry:!1,staleTime:1e4,refetchInterval:1e4,gcTime:1e3*60*5,meta:{disableToast:!0}})},ci=()=>{let e=m(),{t}=h(`openhands`);return y({mutationFn:e=>lt.updateConversationRepository(e.conversationId,e.repository,e.branch,e.gitProvider),onMutate:async t=>{let n=[`user`,`conversation`,t.conversationId];await e.cancelQueries({queryKey:n});let r=e.getQueriesData({queryKey:n});return e.setQueriesData({queryKey:n},e=>e&&{...e,selected_repository:t.repository,selected_branch:t.branch??null,git_provider:t.gitProvider??null}),{previousEntries:r}},onError:(n,r,i)=>{i?.previousEntries.forEach(([t,n])=>{e.setQueryData(t,n)}),T(t(B.CONVERSATION$FAILED_TO_UPDATE_REPOSITORY))},onSuccess:()=>{D(t(B.CONVERSATION$REPOSITORY_UPDATED))},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`local-git-info`,r.conversationId]})}})};function li({children:e,tooltipMessage:t,testId:n,shouldShowTooltip:r}){return r?(0,Z.jsx)(qe,{content:t,placement:`top`,showArrow:!0,tooltipClassName:`bg-white text-black`,children:(0,Z.jsx)(`span`,{"data-testid":n,className:`hover:opacity-100`,children:e})}):e}function ui({isOpen:e,onClose:t,onLaunch:n,defaultProvider:r=`github`}){let{t:i}=h(`openhands`),{providers:a}=Xe(),[o,s]=(0,Q.useState)(null),[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(null);(0,Q.useEffect)(()=>{a.length===1&&!o?s(a[0]):a.length>1&&!o&&r&&a.includes(r)&&s(r)},[a,o,r]);let f=(0,Q.useCallback)(e=>{e!==o&&(s(e),l(null),d(null))},[o]),p=(0,Q.useCallback)(e=>{e?(l(e),d(null)):(l(null),d(null))},[]),m=(0,Q.useCallback)(e=>{d(e)},[]),g=()=>{!c||!u||(n(c,u),l(null),d(null),t())},_=()=>{s(null),l(null),d(null),t()};if(!e)return null;let v=c?.git_provider||o||r,y=!!c&&!!u;return(0,Z.jsx)(Ve,{onClose:_,children:(0,Z.jsxs)(He,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,Z.jsx)(ot,{onClose:_,testId:`close-open-repository-modal`}),(0,Z.jsx)(`div`,{className:`w-full pr-6`,children:(0,Z.jsx)(We,{title:i(B.CONVERSATION$OPEN_REPOSITORY)})}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-4 w-full`,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:i(B.CONVERSATION$SELECT_OR_INSERT_LINK)}),a.length>1&&(0,Z.jsx)(pn,{providers:a,value:o,onChange:f})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-[10px] w-full`,children:[(0,Z.jsx)(ln,{provider:v,value:c?.id||null,repositoryName:c?.full_name||null,onChange:p,className:`w-full`}),(0,Z.jsx)(rn,{repository:c?.full_name||null,provider:v,selectedBranch:u,onBranchSelect:m,defaultBranch:c?.main_branch||null,disabled:!c,className:`w-full`})]})]}),(0,Z.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,Z.jsx)(Ge,{type:`button`,variant:`secondary`,onClick:_,children:i(B.BUTTON$CANCEL)}),(0,Z.jsx)(Ge,{type:`button`,variant:`primary`,onClick:g,isDisabled:!y,children:i(B.BUTTON$LAUNCH)})]})]})})}function di({onSuggestionsClick:e}){let{t}=h(`openhands`),{conversationId:n}=J(),[r,i]=(0,Q.useState)(!1),[a,o]=(0,Q.useState)(!1),s=(0,Q.useRef)(null),{addRecentRepository:c}=$e(),l=X(e=>e.enqueuePendingMessage),u=X(e=>e.markPendingMessageError),{backend:d}=O(),f=d.kind===`local`,{providers:p}=Xe(),m=f||p.length>0,{data:g}=q(),{repositoryInfo:_}=qt(),{data:v}=si(),y=tn(),b=Ln()?.isLoadingHistory??!1,x=(0,Q.useRef)(y);(0,Q.useEffect)(()=>{x.current=y},[y]);let{send:S}=le(),C=(0,Q.useRef)(S);(0,Q.useEffect)(()=>{C.current=S},[S]);let w=ke(),{mutate:E}=ci(),{mutate:D,isPending:k}=jt(),ee=g?.selected_repository||_?.selectedRepository,A=g?.git_provider||_?.gitProvider,j=g?.selected_branch||_?.selectedBranch,M=ee||v?.repository||void 0,N=A||v?.provider,P=j||v?.branch||void 0,F=(g?.id?ut(g.id):null)?.selected_workspace??null,I=F&&F.replace(/\/+$/,``).split(`/`).pop()||null,L=!!M&&!!N,R=!!g&&y===`OPEN`&&!b;(0,Q.useEffect)(()=>{if(!a)return;let e=e=>{s.current&&!s.current.contains(e.target)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[a]),(0,Q.useEffect)(()=>{if(!a)return;let e=e=>{e.key===`Escape`&&o(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[a]);let te=(e,r)=>{n&&(c(e),E({conversationId:n,repository:e.full_name,branch:r.name,gitProvider:e.git_provider},{onSuccess:()=>{if(x.current!==`OPEN`){T(t(B.CONVERSATION$CLONE_COMMAND_FAILED_DISCONNECTED));return}let i=e.git_provider.charAt(0).toUpperCase()+e.git_provider.slice(1),a=`Clone ${e.full_name} from ${i} and checkout branch ${r.name}.`,o=n?l({conversationId:n,text:a}):null;w?.scrollDomToBottom(),Promise.resolve(C.current({action:`message`,args:{content:a,timestamp:new Date().toISOString()}})).catch(e=>{o&&u(o,e instanceof Error?e.message:t(B.CHAT_INTERFACE$FAILED_TO_SEND_MESSAGE))})}}))},ne=!f||!!M||!!I,re=f&&!L;return ne||P||L?(0,Z.jsxs)(`div`,{className:`flex flex-row items-center`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-row gap-2.5 items-center overflow-x-auto flex-nowrap relative scrollbar-hide`,children:[ne?(0,Z.jsx)(hn,{selectedRepository:M,gitProvider:N,workspaceName:I,onClick:()=>i(!0),disabled:!R||re}):null,P?(0,Z.jsx)(fn,{selectedBranch:P,selectedRepository:M,gitProvider:N}):null,L?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(li,{tooltipMessage:t(B.COMMON$GIT_TOOLS_DISABLED_CONTENT),testId:`git-control-bar-pull-button-tooltip`,shouldShowTooltip:!L,children:(0,Z.jsx)(Wr,{onSuggestionsClick:e,hasRepository:L,providerTokensReady:m,isConversationReady:R})}),(0,Z.jsx)(li,{tooltipMessage:t(B.COMMON$GIT_TOOLS_DISABLED_CONTENT),testId:`git-control-bar-push-button-tooltip`,shouldShowTooltip:!L,children:(0,Z.jsx)(Gr,{onSuggestionsClick:e,hasRepository:L,providerTokensReady:m,currentGitProvider:N,isConversationReady:R})}),(0,Z.jsx)(li,{tooltipMessage:t(B.COMMON$GIT_TOOLS_DISABLED_CONTENT),testId:`git-control-bar-pr-button-tooltip`,shouldShowTooltip:!L,children:(0,Z.jsx)(Kr,{onSuggestionsClick:e,hasRepository:L,providerTokensReady:m,currentGitProvider:N,isConversationReady:R})})]}):null]}),(0,Z.jsx)(ui,{isOpen:r,onClose:()=>i(!1),onLaunch:te,defaultProvider:N})]}):null}function fi({onSubmit:e,disabled:t=!1,hasStartedConversation:n}){let{images:r,files:i,imagesMarkedUploadAsFile:a,clearAllFiles:o,subConversationTaskId:s}=U(),{curAgentState:c}=K(),{data:l}=q(),{conversationId:u}=On(),d=u??l?.id??null,{taskStatus:f}=Gt(s,l?.id||null),{handleUpload:p}=on(),m=dn(d,zr(d,Ir(d,t=>{let{imagesToEmbed:n,imagesAsFiles:s}=Kt(r,a);e(t,n,[...i,...s]),o()})));return(0,Z.jsxs)(`div`,{"data-testid":`interactive-chat-box`,children:[(0,Z.jsx)(cn,{disabled:t||c===I.AWAITING_USER_CONFIRMATION||ne(f),isNewConversationPending:t,hasStartedConversation:n,onSubmit:m,onFilesPaste:p}),(0,Z.jsx)(`div`,{className:`mt-3 pb-3`,children:(0,Z.jsx)(di,{onSuggestionsClick:e=>{m(e)}})})]})}function pi(){let e=Y(e=>e.events),t=Y(e=>e.uiEvents),n=Q.useMemo(()=>t.filter(Jn),[t]),r=Q.useMemo(()=>e,[e]),i=Q.useMemo(()=>n.length,[n]),a=Q.useMemo(()=>r.some(e=>e.source===`agent`&&!Fn(e)&&!An(e)),[r]),o=Wn(r);return{storeEvents:e,uiEvents:t,renderableEvents:n,allConversationEvents:r,totalEvents:i,hasSubstantiveAgentActions:a,conversationUserEventsExist:o,userEventsExist:o}}var mi=e=>`timestamp`in e?e.timestamp:void 0,hi=e=>{let t=!!e&&nt(e),n=t?void 0:e,{data:r}=Lt(e??null),{data:i,isFetched:a}=zn(n??void 0),o=Y(e=>e.addEvents),[s,c]=Q.useState(!1),[l,u]=Q.useState(!0),d=Q.useRef(!1),f=Q.useRef(!0);return Q.useEffect(()=>{if(d.current=!1,c(!1),t){f.current=!1,u(!1);return}f.current=!0,u(!0)},[e,t]),Q.useEffect(()=>{t||!a||!i||i.hasMore||(f.current=!1,u(!1))},[t,a,i?.hasMore,n]),{isLoading:s,hasMore:l,loadOlder:Q.useCallback(async()=>{if(!e||nt(e)||d.current||!f.current||!r)return;let{events:t}=Y.getState(),n=t[0];if(!n)return;let i=mi(n);if(!i){f.current=!1,u(!1);return}d.current=!0,c(!0);try{let t=await Kn.searchEvents(e,r?.conversation_url??null,r?.session_api_key??null,{limit:50,sortOrder:`TIMESTAMP_DESC`,timestampLt:i});if(!Array.isArray(t.items))throw Error(`Invalid older-events response: expected page.items to be an array.`);let n=[...t.items].reverse();n.length>0&&(o(n),qn(e,Y.getState().uiEvents)),(!t.next_page_id||t.items.length<50)&&(f.current=!1,u(!1))}finally{d.current=!1,c(!1)}},[e,r,r?.conversation_url,r?.session_api_key,o])}};function gi(){return(0,Z.jsxs)(`div`,{className:`flex items-center space-x-1.5 rounded-full bg-[var(--oh-surface)] px-3 py-1.5`,children:[(0,Z.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-[var(--oh-muted)] animate-[bounce_0.5s_infinite] translate-y-[1px] [animation-delay:0ms]`}),(0,Z.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-[var(--oh-muted)] animate-[bounce_0.5s_infinite] translate-y-[1px] [animation-delay:75ms]`}),(0,Z.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-[var(--oh-muted)] animate-[bounce_0.5s_infinite] translate-y-[1px] [animation-delay:150ms]`})]})}function _i({suggestion:e,onClick:t}){let{t:n}=h(`openhands`);return(0,Z.jsxs)(`button`,{type:`button`,className:`list-none border border-[var(--oh-border)] rounded-[15px] hover:bg-surface-raised hover:border-[var(--oh-interactive-hover)] transition-colors flex-1 flex items-center justify-center cursor-pointer gap-[10px] h-[55px] px-4`,onClick:()=>t(e.value),children:[(0,Q.useMemo)(()=>{switch(e.label){case`INCREASE_TEST_COVERAGE`:return(0,Z.jsx)(Wt,{width:24,height:24,color:`#fff`});case`AUTO_MERGE_PRS`:return(0,Z.jsx)(en,{width:19,height:20,color:`#fff`});case`FIX_README`:return(0,Z.jsx)(vn,{width:24,height:24,color:`#fff`});case`CLEAN_DEPENDENCIES`:return(0,Z.jsx)(Ht,{width:24,height:24,color:`#fff`});default:return null}},[e]),(0,Z.jsx)(`span`,{"data-testid":`suggestion`,className:`text-[15px] font-normal leading-5 text-white text-center cursor-pointer`,children:n(e.label)})]})}function vi({suggestions:e,onSuggestionClick:t}){return(0,Z.jsx)(`div`,{"data-testid":`suggestions`,className:`grid grid-cols-2 gap-5 max-w-fit`,children:e.map((e,n)=>(0,Z.jsx)(_i,{suggestion:e,onClick:t},n))})}var yi=B.SUGGESTIONS$HACKER_NEWS,bi=`Please write a bash script which displays the top story on Hacker News. It should show the title, the link, and the number of points.
|
|
5
|
+
The script should only use tools that are widely available on unix systems, like curl and grep.`,xi=B.SUGGESTIONS$HELLO_WORLD,Si=`I want to create a Hello World app in Javascript that:
|
|
6
|
+
* Displays Hello World in the middle.
|
|
7
|
+
* Has a button that when clicked, changes the greeting with a bouncing animation to fun versions of Hello.
|
|
8
|
+
* Has a counter for how many times the button has been clicked.
|
|
9
|
+
* Has another button that changes the app's background color.`,Ci=B.SUGGESTIONS$TODO_APP,wi=`I want to create a VueJS app that allows me to:
|
|
10
|
+
* See all the items on my todo list
|
|
11
|
+
* add a new item to the list
|
|
12
|
+
* mark an item as done
|
|
13
|
+
* totally remove an item from the list
|
|
14
|
+
* change the text of an item
|
|
15
|
+
* set a due date on the item
|
|
16
|
+
|
|
17
|
+
This should be a client-only app with no backend. The list should persist in localStorage.`,Ti={repo:$t,"non-repo":{[yi]:bi,[xi]:Si,[Ci]:wi}};function Ei({onSuggestionsClick:e}){let{t}=h(`openhands`),{shouldHideSuggestions:n}=U();return(0,Z.jsx)(s,{children:!n&&(0,Z.jsxs)(H.div,{"data-testid":`chat-suggestions`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,ease:`easeInOut`},className:`pointer-events-auto absolute inset-x-4 bottom-[151px] top-0 flex flex-col items-center justify-center md:inset-x-8`,children:[(0,Z.jsx)(`div`,{className:`flex flex-col items-center p-4 rounded-xl w-full`,children:(0,Z.jsx)(`span`,{className:`pb-6 text-[32px] font-medium leading-5 text-white`,children:t(B.LANDING$TITLE)})}),(0,Z.jsx)(vi,{suggestions:Object.entries(Ti.repo).slice(0,4).map(([e,t])=>({label:e,value:t})),onSuggestionClick:e})]})})}var Di={files:[],initialPrompt:null,selectedRepository:null,selectedRepositoryProvider:null,replayJson:null},Oi=it(e=>({...Di,addFile:t=>e(e=>({files:[...e.files,t]})),removeFile:t=>e(e=>({files:e.files.filter((e,n)=>n!==t)})),clearFiles:()=>e(()=>({files:[]})),setInitialPrompt:t=>e(()=>({initialPrompt:t})),clearInitialPrompt:()=>e(()=>({initialPrompt:null})),setSelectedRepository:t=>e(()=>({selectedRepository:t})),clearSelectedRepository:()=>e(()=>({selectedRepository:null})),setSelectedRepositoryProvider:t=>e(()=>({selectedRepositoryProvider:t})),setReplayJson:t=>e(()=>({replayJson:t})),reset:()=>e(()=>Di)})),ki=e=>(0,Z.jsx)(`svg`,{width:12,height:17,viewBox:`0 0 12 17`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11.5304 6.46978L10.4697 7.53044L6.75006 3.81077L6.75006 17.0001H5.25006L5.25006 3.81077L1.53039 7.53044L0.469727 6.46978L6.00006 0.939453L11.5304 6.46978Z`,fill:`currentColor`})});function Ai({onClick:e}){return(0,Z.jsx)(`button`,{type:`button`,onClick:e,"data-testid":`scroll-to-bottom`,className:`flex items-center justify-center size-8 rounded-full bg-[var(--oh-surface)] text-[var(--oh-muted)] hover:bg-tertiary hover:text-white rotate-180 cursor-pointer transition-colors`,children:(0,Z.jsx)(ki,{width:15,height:15})})}var ji=[{width:`w-[25%]`,height:`h-4`,align:`justify-end`},{width:`w-[60%]`,height:`h-4`,align:`justify-start`},{width:`w-[45%]`,height:`h-4`,align:`justify-start`},{width:`w-[65%]`,height:`h-20`,align:`justify-start`},{width:`w-[35%]`,height:`h-4`,align:`justify-end`},{width:`w-[50%]`,height:`h-4`,align:`justify-start`},{width:`w-[30%]`,height:`h-4`,align:`justify-end`},{width:`w-[75%]`,height:`h-4`,align:`justify-start`},{width:`w-[55%]`,height:`h-4`,align:`justify-start`}];function Mi({width:e,height:t}){return(0,Z.jsx)(`div`,{className:z(`rounded-md bg-foreground/5 animate-pulse`,e,t)})}function Ni(){let{t:e}=h(`openhands`);return(0,Z.jsx)(`div`,{className:`flex flex-col gap-6 p-4 w-full h-full overflow-hidden`,"data-testid":`chat-messages-skeleton`,"aria-label":e(B.CHAT_INTERFACE$LOADING_CONVERSATION),children:ji.map((e,t)=>(0,Z.jsx)(`div`,{className:z(`flex w-full`,e.align),children:(0,Z.jsx)(Mi,{width:e.width,height:e.height})},t))})}var Pi=220;function Fi({message:e,code:t,onDismiss:n,onRetry:r,onReauth:i}){let{t:a,i18n:o}=h(`openhands`),s=Dr(t),[c,l]=Q.useState(!1),[u,d]=Q.useState(!1),[f,p]=Q.useState(!1),m=Q.useRef(null),g=o.exists(e,{ns:`openhands`}),v=g?String(a(e)):e,y=v.length>Pi,b=y&&!c;return Q.useEffect(()=>{if(!f)return;let e=setTimeout(()=>{p(!1)},2e3);return()=>clearTimeout(e)},[f]),Q.useEffect(()=>{p(!1)},[v]),Q.useLayoutEffect(()=>{let e=m.current;if(!e)return;let t=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight);if(!Number.isFinite(t)||t<=0){d(!1);return}d(e.getBoundingClientRect().height>t*1.5)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[v,b,c,e]),(0,Z.jsxs)(`div`,{className:z(`flex w-full gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]`,u?`items-start`:`items-center`),"data-testid":`error-message-banner`,children:[(0,Z.jsx)(_,{"aria-hidden":!0,className:`h-4 w-4 shrink-0`,strokeWidth:2,style:{color:P},"data-testid":`error-message-banner-icon`}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[s&&(0,Z.jsx)(`div`,{className:`text-sm font-medium text-[var(--oh-foreground)]`,"data-testid":`error-message-banner-header`,children:a(s)}),(0,Z.jsx)(`div`,{ref:m,className:z(`whitespace-pre-wrap break-words text-sm text-[var(--oh-muted)]`,b&&`line-clamp-3`),"data-testid":`error-message-banner-content`,children:g?(0,Z.jsx)(S,{ns:`openhands`,i18nKey:e}):e}),i&&(0,Z.jsx)(`button`,{type:`button`,onClick:i,className:`mt-2 cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`error-message-banner-reauth`,children:a(B.ERROR$ACP_UPDATE_CREDENTIALS)}),y&&(0,Z.jsx)(`button`,{type:`button`,className:`mt-1 cursor-pointer text-xs font-normal text-[var(--oh-foreground)] underline`,onClick:()=>l(e=>!e),"data-testid":`error-message-banner-toggle`,children:a(c?B.COMMON$VIEW_LESS:B.COMMON$VIEW_MORE)})]}),(0,Z.jsxs)(`div`,{className:z(`flex shrink-0 gap-1`,u?`self-start`:`items-center`),children:[r&&(0,Z.jsx)(`button`,{type:`button`,onClick:r,className:`cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`error-message-banner-retry`,children:a(B.CHAT_INTERFACE$MESSAGE_RETRY)}),(0,Z.jsx)(`button`,{type:`button`,onClick:async()=>{try{await navigator.clipboard.writeText(v),p(!0)}catch{T(a(B.CHAT_INTERFACE$CHAT_MESSAGE_COPY_FAILED))}},className:`shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]`,"aria-label":a(f?B.BUTTON$COPIED:B.BUTTON$COPY),"data-testid":`error-message-banner-copy`,children:f?(0,Z.jsx)(Ae,{className:`h-4 w-4`,"aria-hidden":!0}):(0,Z.jsx)(Me,{className:`h-4 w-4`,"aria-hidden":!0})}),n&&(0,Z.jsx)(`button`,{type:`button`,onClick:n,className:`shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]`,"aria-label":a(B.BUTTON$CLOSE),"data-testid":`error-message-banner-dismiss`,children:(0,Z.jsx)(Ie,{className:`h-4 w-4`,"aria-hidden":!0})})]})]})}var Ii={dismissedEventIds:{}},Li=it()(at(e=>({...Ii,dismiss:t=>e(e=>({dismissedEventIds:{...e.dismissedEventIds,...Object.fromEntries(t.map(e=>[e,!0]))}}))}),{name:`SkillInstallBannerStore`})),Ri=/^✅ Successfully installed '([^']+)' to (.+)$/m;function zi(e){let t=new Map;for(let n of e){if(!jn(n))continue;let e=n.observation.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
18
|
+
`).match(Ri);if(!e)continue;let r=e[1],i=e[2].replace(/\\/g,`/`).replace(/\/+$/,``),a=`/.agents/skills/${r}`;if(!i.endsWith(a))continue;let o=i.slice(0,-a.length);if(!o)continue;let s=`${o}::${r}`;t.delete(s),t.set(s,{eventId:n.id,skillName:r,workspacePath:o})}return[...t.values()]}var Bi=e=>{let t=Y(e=>e.events),n=Y(e=>e.loadedConversationId),r=Li(e=>e.dismissedEventIds),i=Li(e=>e.dismiss),a=(0,Q.useMemo)(()=>!e||e!==n?[]:zi(t).filter(e=>!r[e.eventId]),[e,n,t,r]);return{installs:a,dismissAll:(0,Q.useCallback)(()=>i(a.map(e=>e.eventId)),[i,a])}};function Vi({conversationId:e}){let{t}=h(`openhands`),{installs:n,dismissAll:r}=Bi(e),{backend:i}=O(),{mutate:a,isPending:o}=jt(),s=x(),{navigate:c}=Ke(),{data:l}=q();if(i.kind!==`local`||n.length===0)return null;let u=n[n.length-1],d=n.filter(e=>e.workspacePath===u.workspacePath).map(e=>e.skillName);return(0,Z.jsxs)(`div`,{className:`flex w-full items-start gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]`,"data-testid":`skill-install-restart-banner`,children:[(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsx)(`p`,{className:`text-sm text-[var(--oh-foreground)]`,children:t(B.SKILLS$INSTALL_BANNER_MESSAGE,{skills:d.join(`, `)})}),(0,Z.jsx)(`button`,{type:`button`,onClick:()=>{o||s||a({workingDir:u.workspacePath,workspaceMode:`local_repo`,repository:l?.selected_repository&&l?.git_provider?{name:l.selected_repository,gitProvider:l.git_provider,branch:l.selected_branch??void 0}:void 0,entryPoint:`skill_install_restart_banner`},{onSuccess:e=>c(`/conversations/${e.conversation_id}`),onError:e=>T(e.message)})},disabled:o||s,className:`mt-2 cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] disabled:cursor-not-allowed disabled:opacity-50`,"data-testid":`skill-install-restart-action`,children:t(B.SKILLS$INSTALL_BANNER_ACTION)})]}),(0,Z.jsx)(`button`,{type:`button`,onClick:r,className:`shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]`,"aria-label":t(B.BUTTON$CLOSE),"data-testid":`skill-install-restart-dismiss`,children:(0,Z.jsx)(Ie,{className:`h-4 w-4`,"aria-hidden":!0})})]})}function Hi(){let{t:e}=h(`openhands`),{conversationId:t}=On(),n=X(e=>e.pendingMessages),r=X(e=>e.markPendingMessageError),i=X(e=>e.markPendingMessageSending),a=X(e=>e.removePendingMessage),o=U(e=>e.restoreMessageToInputIfEmpty),{send:s}=le(),c=Q.useMemo(()=>t?n.filter(e=>Qt(t,e.conversationId)):[],[n,t]),l=Q.useCallback(async t=>{let n=X.getState().pendingMessages.find(e=>e.id===t);if(n){i(t);try{await s(fe(n.text,n.imageUrls,n.fileUrls,n.timestamp))}catch(n){r(t,n instanceof Error?n.message:e(B.CHAT_INTERFACE$FAILED_TO_SEND_MESSAGE))}}},[s,r,i,e]),u=Q.useCallback((e,t)=>{o(t),a(e)},[o,a]);return c.length===0?null:(0,Z.jsx)(Z.Fragment,{children:c.map(e=>(0,Z.jsx)(ye,{type:`user`,message:e.text,pendingStatus:e.status,onRetry:e.status===`error`?()=>l(e.id):void 0,onStop:e.status===`sending`?()=>u(e.id,e.text):void 0,children:e.imageUrls.length>0&&(0,Z.jsx)(_e,{size:`small`,images:e.imageUrls})},e.id))})}var Ui=()=>{let{data:e}=q();return y({mutationKey:[`unified-upload-files`],mutationFn:async t=>{let{conversationId:n,files:r}=t;return vt(n,r,e)},meta:{disableToast:!0}})},Wi=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 3.25C9.92893 3.25 8.25 4.92893 8.25 7V10H7C6.44772 10 6 10.4477 6 11V19C6 19.5523 6.44772 20 7 20H17C17.5523 20 18 19.5523 18 19V11C18 10.4477 17.5523 10 17 10H15.75V7C15.75 4.92893 14.0711 3.25 12 3.25ZM14.25 10V7C14.25 5.75736 13.2426 4.75 12 4.75C10.7574 4.75 9.75 5.75736 9.75 7V10H14.25Z`,fill:`currentColor`})});function Gi(){let{t:e}=h(`openhands`),{data:t}=Be();return t?.confirmation_mode?(0,Z.jsx)(qe,{closeDelay:100,content:e(B.COMMON$CONFIRMATION_MODE_ENABLED),tooltipClassName:`bg-white text-black hover:bg-transparent`,children:(0,Z.jsx)(`div`,{className:`flex items-center justify-center w-[26px] h-[26px] rounded-lg bg-[var(--oh-surface)]`,children:(0,Z.jsx)(Wi,{width:15,height:15})})}):null}var Ki=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.jsx)(`path`,{d:`M15 12C15 12.7956 14.6839 13.5587 14.1213 14.1213C13.5587 14.6839 12.7956 15 12 15C11.2044 15 10.4413 14.6839 9.87868 14.1213C9.31607 13.5587 9 12.7956 9 12C9 11.2044 9.31607 10.4413 9.87868 9.87868C10.4413 9.31607 11.2044 9 12 9C12.7956 9 13.5587 9.31607 14.1213 9.87868C14.6839 10.4413 15 11.2044 15 12Z`,fill:`currentColor`})});function qi({status:e,statusColor:t}){return(0,Z.jsx)(`div`,{"data-testid":`chat-status-indicator`,className:r(`w-full max-w-full rounded-[100px] p-1 bg-[var(--oh-surface)] flex items-center gap-1`),children:(0,Z.jsxs)(s,{mode:`wait`,children:[(0,Z.jsx)(H.span,{className:`flex-shrink-0 animate-[pulse_1.2s_ease-in-out_infinite]`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:(0,Z.jsx)(Ki,{className:`w-4 h-4`,color:t})},`dot-${e}`),(0,Z.jsx)(H.span,{initial:{opacity:0,y:-2},animate:{opacity:1,y:0},exit:{opacity:0,y:2},transition:{duration:.3},className:`pr-1.5 font-normal text-[11px] leading-[16px] normal-case break-words whitespace-normal`,children:e},`text-${e}`)]})})}var Ji=()=>{let e=m(),{navigate:t}=Ke(),{t:n}=h(`openhands`),{data:r}=q(),{trackConversationCreated:i}=ze();return y({mutationFn:async()=>{if(!r?.id)throw Error(`No active conversation`);let e=await lt.createConversation(void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,r.sandbox_id??void 0);if(e.status===`ERROR`)throw Error(e.detail||`Failed to create new conversation`);return{newConversationId:e.app_conversation_id?e.app_conversation_id:`task-${e.id}`,oldConversationId:r.id,taskId:e.id}},onMutate:()=>{v.loading(n(B.CONVERSATION$CLEARING),{...E,id:`clear-conversation`})},onSuccess:r=>{i({conversationId:r.newConversationId,taskId:r.taskId,hasRepository:!1,hasWorkspace:!1,hasInitialQuery:!1,hasParentConversation:!1,entryPoint:`new_command`}),v.dismiss(`clear-conversation`),D(n(B.CONVERSATION$CLEAR_SUCCESS)),t(`/conversations/${r.newConversationId}`),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]})},onError:e=>{v.dismiss(`clear-conversation`);let t=n(B.CONVERSATION$CLEAR_UNKNOWN_ERROR);e instanceof Error?t=e.message:typeof e==`string`&&(t=e),T(n(B.CONVERSATION$CLEAR_FAILED,{error:t}))}})};function Yi(e,t){return e?`github`:t?`replay`:`direct`}function Xi(){let{trackInitialQuerySubmitted:e,trackUserMessageSent:t}=ze(),{setMessageToSend:n}=U(),{errorMessage:r,errorCode:i,removeErrorMessage:a,setErrorMessage:o}=Rn(),s=f(),{isTask:c,taskStatus:l,taskDetail:u}=qt(),d=c,p=Ln(),{send:m}=le(),{renderableEvents:g,allConversationEvents:_,totalEvents:v,hasSubstantiveAgentActions:y,userEventsExist:b}=pi(),x=X(e=>e.enqueuePendingMessage),S=X(e=>e.markPendingMessageError),C=X(e=>e.pendingMessages),{t:w}=h(`openhands`),E=Q.useRef(null),{scrollDomToBottom:D,onChatBodyScroll:O,hitBottom:k,autoScroll:ee,setAutoScroll:A,setHitBottom:j}=me(E),{mutate:M,isPending:N}=Ji(),{curAgentState:P}=K(),{handleBuildPlanClick:F}=pe(),{data:L}=q(),R=L?.sandbox_status??null,ne=an(),{isConfigured:re,isLoading:ie}=mn(),ae=!ie&&!re,z=P===I.RUNNING||P===I.LOADING;Q.useEffect(()=>{if(z)return;let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),F(e),D())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[z,F,D]);let{selectedRepository:se,replayJson:ce}=Oi(),{conversationId:V}=On(),ue=Vn(e=>{let t=V?e.statusByConversation[V]:void 0;return t?.active?`${t.iteration}:${t.status}`:null}),{mutateAsync:de}=Ui(),{isLoading:he,hasMore:ge,loadOlder:_e}=hi(V),ve=Q.useRef(null),ye=Q.useCallback(e=>{if(d||he||!ge)return;let t=e.scrollTop<=80,n=e.scrollHeight<=e.clientHeight+80;!t&&!n||(ve.current={scrollHeight:e.scrollHeight,scrollTop:e.scrollTop},_e().catch(e=>{ve.current=null,o(e instanceof Error&&e.message?e.message:w(B.ERROR$GENERIC))}))},[ge,he,d,_e,o,w]),be=Q.useCallback(e=>{e.deltaY<0&&e.currentTarget.scrollTop<=0&&ye(e.currentTarget)},[ye]),xe=Q.useMemo(()=>V?C.some(e=>Qt(V,e.conversationId)):!1,[C,V]),Se=Gn(e=>V?(e.entriesByConversation[V]?.length??0)>0:!1),Ce=Xt({isLoadingHistory:p?.isLoadingHistory===!0,hasUserEvents:b,hasPendingUserMessages:xe,hasSubstantiveAgentActions:y,hasModelEntries:Se}),we=_.length>0||xe||!p?.isLoadingHistory,De=!!V,ke=!we&&!c,Ae=async(r,i,a)=>{if(r.trim()===`/new`){if(!V){T(w(B.CONVERSATION$CLEAR_NO_ID));return}if(v===0){T(w(B.CONVERSATION$CLEAR_EMPTY));return}if(N)return;M();return}let o=[...i],s=[...a];v===0?e({entryPoint:Yi(se!==null,ce!==null),queryCharacterLength:r.length,replayJsonSize:ce?.length}):t({sessionMessageCount:v,currentMessageLength:r.length});let c=Vt([...o,...s]);if(!c.isValid){T(`Error: ${c.errorMessage}`);return}let l=o.map(e=>nn(e)),u=await Promise.all(l),d=new Date().toISOString(),{skipped_files:f,uploaded_files:p}=s.length>0?await de({conversationId:V,files:s}):{skipped_files:[],uploaded_files:[]};f.forEach(e=>T(e.reason));let h=`${w(B.CHAT_INTERFACE$AUGMENTED_PROMPT_FILES_TITLE)}: ${p.join(`
|
|
19
|
+
|
|
20
|
+
`)}`,g=p.length>0?`${r}\n\n${h}`:r,_=x({conversationId:V,text:r,content:g,imageUrls:u,fileUrls:p,timestamp:d});D(),n(``);try{await m(fe(g,u,p,d))}catch(e){S(_,e instanceof Error?e.message:w(B.CHAT_INTERFACE$FAILED_TO_SEND_MESSAGE))}};Q.useEffect(()=>{if(ve.current&&E.current){let{scrollHeight:e,scrollTop:t}=ve.current,n=E.current,r=n.scrollHeight-e;r>0&&(n.scrollTop=t+r),ve.current=null;return}ee&&D()},[g.length,xe,ue,D]);let je=Q.useRef(ye);Q.useEffect(()=>{je.current=ye}),Q.useEffect(()=>{let e=E.current;e&&je.current(e)},[g.length,ge]);let H={scrollRef:E,autoScroll:ee,setAutoScroll:A,scrollDomToBottom:D,hitBottom:k,setHitBottom:j,onChatBodyScroll:O},Me=P===I.LOADING||P===I.INIT,Ne=P===I.STOPPED,Pe=P===I.PAUSED,Fe=oe({isPausing:Pe,isTask:c,taskStatus:l,isStartingStatus:Me,isStopStatus:Ne,curAgentState:P}),Ie=te({isPausing:Pe,isTask:c,taskStatus:l,taskDetail:u,isStartingStatus:Me,isStopStatus:Ne,curAgentState:P,errorMessage:r,t:w});return(0,Z.jsx)(Ee,{value:H,children:(0,Z.jsxs)(`div`,{className:`relative flex h-full flex-col justify-between px-4`,"data-testid":`chat-interface`,children:[!y&&!xe&&!b&&!Se&&!ke&&!d&&v===0&&!ne&&!ae&&(0,Z.jsx)(Ei,{onSuggestionsClick:e=>n(e)}),(0,Z.jsxs)(`div`,{ref:E,"data-testid":`chat-scroll-container`,onScroll:e=>{O(e.currentTarget),ye(e.currentTarget)},onWheel:be,className:`custom-scrollbar-always flex min-h-0 grow flex-col gap-2 overflow-x-hidden overflow-y-auto px-0 pt-4 pb-8 md:px-4`,children:[ke&&De&&(0,Z.jsx)(Ni,{}),ke&&!De&&(0,Z.jsx)(`div`,{className:`flex justify-center`,"data-testid":`loading-spinner`,children:(0,Z.jsx)(Re,{size:`small`})}),he&&(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-3 text-sm text-neutral-400`,"data-testid":`loading-older-events`,children:[(0,Z.jsx)(Re,{size:`small`}),(0,Z.jsx)(`span`,{children:w(B.CHAT_INTERFACE$FETCHING_OLDER_MESSAGES)})]}),(0,Z.jsx)(Oe,{conversationId:V,anchorEventId:null}),we&&g.length>0&&(0,Z.jsx)(Te,{messages:g,allEvents:_}),(0,Z.jsx)(Hi,{}),(0,Z.jsx)(Pr,{conversationId:V})]}),(0,Z.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-[6px] pb-4`,children:[(0,Z.jsx)(Vi,{conversationId:V}),(0,Z.jsx)(Nr,{conversationId:V}),r&&(0,Z.jsx)(Fi,{message:r,code:i,onDismiss:a,onRetry:r===`Unable to connect to server`?()=>p?.reconnect():void 0,onReauth:Or(i)?()=>s(`/settings/agents`):void 0}),ae&&!ne&&(0,Z.jsx)(gn,{}),ne?(0,Z.jsxs)(`div`,{"data-testid":`archived-conversation-banner`,className:`mx-1 px-4 py-3 rounded-lg bg-[var(--oh-surface)] border border-[var(--oh-border-subtle)]`,children:[(0,Z.jsx)(`p`,{className:`text-xs font-semibold text-[var(--oh-foreground)]`,children:w(R===`ERROR`?B.CHAT_INTERFACE$ERROR_SANDBOX_TITLE:B.CHAT_INTERFACE$ARCHIVED_SANDBOX_TITLE)}),(0,Z.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] mt-0.5`,children:w(R===`ERROR`?B.CHAT_INTERFACE$ERROR_SANDBOX_DESCRIPTION:B.CHAT_INTERFACE$ARCHIVED_SANDBOX_DESCRIPTION)})]}):(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-full mb-1 z-20`,children:(0,Z.jsxs)(`div`,{className:`flex justify-between relative`,children:[(0,Z.jsxs)(`div`,{className:`flex items-end gap-1 pointer-events-auto`,children:[(0,Z.jsx)(Gi,{}),Me&&(0,Z.jsx)(qi,{statusColor:Fe,status:Ie})]}),k?P===I.RUNNING&&(0,Z.jsx)(`div`,{className:`absolute left-1/2 transform -translate-x-1/2 bottom-0 pointer-events-auto`,children:(0,Z.jsx)(gi,{})}):(0,Z.jsx)(`div`,{className:`absolute left-1/2 transform -translate-x-1/2 bottom-0 pointer-events-auto`,children:(0,Z.jsx)(Ai,{onClick:D})})]})}),(0,Z.jsx)(fi,{onSubmit:Ae,disabled:N||ae,hasStartedConversation:Ce})]})]})]})})}function Zi({isRightPanelShown:e}){return(0,Z.jsx)(`div`,{className:`flex justify-center w-full h-full`,children:(0,Z.jsx)(`div`,{className:`w-full min-w-0 max-w-[800px] h-full flex flex-col min-h-0 transition-all duration-300 ease-in-out`,children:(0,Z.jsx)(Xi,{})})})}function Qi({children:e}){return(0,Z.jsx)(`div`,{className:`absolute inset-0`,children:e})}function $i({children:e}){return(0,Z.jsx)(`div`,{className:`flex flex-col h-full w-full`,children:e})}function ea({children:e}){return(0,Z.jsx)(`div`,{className:`overflow-hidden flex-grow h-full w-full relative`,children:e})}function ta({className:e}){let{t}=h(`openhands`);return(0,Z.jsxs)(`div`,{className:z(`bg-[var(--oh-surface)] flex h-full w-full flex-col items-center justify-center gap-3`,e),children:[(0,Z.jsx)(Fe,{className:`h-8 w-8 shrink-0 animate-spin text-tertiary-light`,"aria-hidden":!0}),(0,Z.jsx)(ve,{as:`p`,role:`status`,"aria-live":`polite`,className:`block w-full text-center text-base font-normal leading-5`,duration:1,spread:2,children:t(B.HOME$LOADING)})]})}function na({children:e,onReady:t}){return(0,Q.useLayoutEffect)(()=>{t()},[t]),e}function ra({onPending:e}){return(0,Q.useLayoutEffect)(()=>{e()},[e]),(0,Z.jsx)(ta,{})}var ia={duration:.35,ease:`easeInOut`};function aa({showAgentLoading:e,tabKey:t,children:n}){let r=ue(),[i,a]=(0,Q.useState)(!1);(0,Q.useLayoutEffect)(()=>{a(!1)},[t]);let o=(0,Q.useCallback)(()=>{a(!0)},[]),c=(0,Q.useCallback)(()=>{a(!1)},[]),l=e||i;return r?(0,Z.jsx)(`div`,{className:`relative h-full w-full overflow-hidden`,children:l?(0,Z.jsx)(ta,{}):(0,Z.jsx)(Q.Suspense,{fallback:(0,Z.jsx)(ra,{onPending:o}),children:(0,Z.jsx)(na,{onReady:c,children:n})})}):(0,Z.jsxs)(`div`,{className:`relative h-full w-full overflow-hidden`,children:[(0,Z.jsx)(H.div,{className:`absolute inset-0 h-full w-full`,initial:!1,animate:{opacity:+!l},transition:ia,"aria-hidden":l,children:(0,Z.jsx)(Q.Suspense,{fallback:(0,Z.jsx)(ra,{onPending:o}),children:(0,Z.jsx)(na,{onReady:c,children:n})})}),(0,Z.jsx)(s,{children:l?(0,Z.jsx)(H.div,{className:`absolute inset-0 z-10 h-full w-full`,initial:{opacity:1},animate:{opacity:1},exit:{opacity:0},transition:ia,children:(0,Z.jsx)(ta,{})},`conversation-tab-loading-overlay`):null})]})}var oa=(0,Q.lazy)(()=>c(()=>import(`./files-tab-4c9HFSLo.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92]))),sa=(0,Q.lazy)(()=>c(()=>import(`./browser-tab-BijpUbdt.js`),__vite__mapDeps([93,2,1,11,5,6,18,3,4,7,14,10,15,12,9,16,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,94,95,89]))),ca=(0,Q.lazy)(()=>c(()=>import(`./planner-tab-YG0bGxDY.js`),__vite__mapDeps([96,1,2,11,5,6,13,3,4,7,14,15,12,9,16,17,18,10,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,97,53,54,55,56,57,58,59,60,61,62,50,51,52,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89]))),la=(0,Q.lazy)(()=>c(()=>import(`./task-list-tab-B3k4W1cK.js`),__vite__mapDeps([98,1,2,11,5,6,13,3,4,7,14,15,12,9,16,17,18,10,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,89]))),ua=(0,Q.lazy)(()=>c(()=>import(`./terminal-CBI_41Zc.js`),__vite__mapDeps([99,1,2,11,5,6,100,101,18,3,4,7,14,10,15,12,9,16,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,53,54,55,47,56,57,58,37,59,38,60,61,62,50,51,52,42,63,40,64,65,48,66,67,68,69,70,71,72,41,73,74,75,76,77,78,79,80,81,82,83,44,84,85,86,46,87,88,89]))),da={tasklist:{component:la},files:{component:oa},browser:{component:sa},terminal:{component:ua},planner:{component:ca}};function fa(){let{selectedTab:e,shouldShownAgentLoading:t}=U(),{conversationId:n}=J(),r=(0,Q.useMemo)(()=>da[e]??da.files,[e]).component,i=e===`terminal`?`${e}-${n}`:e??`files`;return(0,Z.jsx)($i,{children:(0,Z.jsx)(ea,{children:(0,Z.jsx)(aa,{showAgentLoading:t,tabKey:i,children:(0,Z.jsx)(Qi,{children:(0,Z.jsx)(r,{})},i)})})})}var pa=()=>{let e=m(),t=Rn(e=>e.removeErrorMessage);return y({mutationKey:[`start-conversation`],mutationFn:async e=>mt(e.conversationId),onMutate:async()=>(await e.cancelQueries({queryKey:[`user`,`conversations`]}),{previousConversations:e.getQueryData([`user`,`conversations`])}),onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:(t,n,r)=>{gt(e,r.conversationId)},onSuccess:(n,r)=>{t(),ht(e,r.conversationId,ee.RUNNING)}})},ma=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM10 9H14A1 1 0 0 1 15 10V14A1 1 0 0 1 14 15H10A1 1 0 0 1 9 14V10A1 1 0 0 1 10 9Z`,fill:`currentColor`})}),ha=e=>(0,Z.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,Z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.9 1.50004C15.3 1.65004 17.55 2.85004 19.2 4.50004C21.15 6.60004 22.2 9.15004 22.2 12.15C22.2 14.55 21.3 16.8 19.8 18.75C18.3 20.55 16.2 21.9 13.8 22.35C11.4 22.8 9 22.5 6.9 21.3C4.8 20.1 3.15 18.3 2.25 16.05C1.35 13.8 1.2 11.25 1.95 9.00004C2.7 6.60004 4.05 4.65004 6.15 3.30004C8.1 1.95004 10.5 1.35004 12.9 1.50004ZM13.65 20.85C15.6 20.4 17.4 19.35 18.75 17.7C19.95 16.05 20.7 14.1 20.55 12C20.55 9.60004 19.65 7.20004 18 5.55004C16.5 4.05004 14.7 3.15004 12.6 3.00004C10.65 2.85004 8.55 3.30004 6.9 4.50004C5.25 5.70004 4.05 7.35004 3.45 9.45004C2.85 11.4 2.85 13.5 3.75 15.45C4.65 17.4 6 18.9 7.8 19.95C9.6 21 11.7 21.3 13.65 20.85Z`,fill:`currentColor`}),(0,Z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9 7.49998L10.1655 6.87598L16.9155 11.376V12.624L10.1655 17.124L9 16.5V7.49998ZM10.5 8.90098V15.099L15.1485 12L10.5 8.90098Z`,fill:`currentColor`})]});function ga({icon:e,text:t,onClick:n,testId:r}){return(0,Z.jsx)(W,{testId:r,onClick:n,children:(0,Z.jsxs)(`div`,{className:`flex min-w-0 w-full items-center justify-between gap-2`,children:[(0,Z.jsx)(`span`,{className:`min-w-0 truncate`,children:t}),(0,Z.jsx)(`span`,{className:Ye,"aria-hidden":!0,children:e})]})})}function _a({className:e=``,executionStatus:t,isPausing:n=!1}){let{curAgentState:r}=K(),{isTask:i,taskStatus:a,taskDetail:o}=qt(),{t:s}=h(`openhands`),{errorMessage:c}=Rn(),l=r===I.LOADING||r===I.INIT,u=se(t)||F(t),d=oe({isPausing:n,isTask:i,taskStatus:a,isStartingStatus:l,isStopStatus:u,curAgentState:r}),f=te({isPausing:n,isTask:i,taskStatus:a,taskDetail:o,isStartingStatus:l,isStopStatus:u,curAgentState:r,errorMessage:c,t:s});return(0,Z.jsx)(`div`,{className:e,"data-testid":`server-status`,children:(0,Z.jsxs)(`div`,{className:`flex items-center`,children:[(0,Z.jsx)(Ki,{className:`w-6 h-6 shrink-0`,color:d}),(0,Z.jsx)(`span`,{className:`text-[13px] text-white font-normal`,children:f})]})})}function va({onClose:e,onStopServer:t,onStartServer:n,executionStatus:r,position:i=`top`,className:a=``,isPausing:o=!1}){let{t:s}=h(`openhands`),c=At(e),l=L(r),u=F(r),d=l||u;return(0,Z.jsxs)(Mt,{ref:c,testId:`server-status-context-menu`,position:i,alignment:`left`,size:`default`,className:z(`left-2 w-fit min-w-42`,a),children:[(0,Z.jsx)(_a,{executionStatus:r,isPausing:o,className:`pl-0 pr-2 py-1`}),d&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(tt,{inset:`menu`}),l&&t&&(0,Z.jsx)(ga,{icon:(0,Z.jsx)(ma,{width:18,height:18}),text:s(B.COMMON$STOP_RUNTIME),onClick:t,testId:`stop-server-button`}),u&&n&&(0,Z.jsx)(ga,{icon:(0,Z.jsx)(ha,{width:18,height:18}),text:s(B.COMMON$START_RUNTIME),onClick:n,testId:`start-server-button`})]})]})}var ya=e(i(),1);function ba({isPublic:e,onToggle:t,ariaLabel:n}){return(0,Z.jsxs)(`label`,{className:`relative inline-flex shrink-0 cursor-pointer items-center`,children:[(0,Z.jsx)(`input`,{hidden:!0,type:`checkbox`,"data-testid":`share-publicly-button`,checked:e,"aria-label":n,onChange:e=>t(e.target.checked)}),(0,Z.jsx)(`span`,{"aria-hidden":!0,className:z(`inline-flex h-3.5 w-7 items-center rounded-full px-0.5 py-px transition-colors duration-200 ease-in-out`,e?`bg-white`:`bg-base-secondary`),children:(0,Z.jsx)(`span`,{className:z(`block h-2 w-2 shrink-0 rounded-full transition-transform duration-200 ease-in-out`,e?`translate-x-[calc(1rem-1px)] bg-base-secondary`:`translate-x-px bg-tertiary-light`)})})]})}function xa({onClose:e,onRename:t,onDelete:n,onStop:r,onDisplayCost:i,onShowAgentTools:a,onShowSkills:o,onShowHooks:s,onTogglePublic:c,onCopyShareLink:l,onExportTranscript:u,onDownloadConversation:d,shareUrl:f,position:p=`bottom`,anchorRef:m}){let g=Qn(),{t:_}=h(`openhands`),{backend:v}=O(),{data:y}=q(),b=an(),x=At(e),S=m?.current??null,[C,w]=Q.useState();Q.useLayoutEffect(()=>{if(!S)return;let e=()=>{let e=S.getBoundingClientRect();if(!e)return;let t={position:`fixed`,zIndex:9999};p===`top`?t.bottom=window.innerHeight-e.top+8:t.top=e.bottom+8,t.left=e.left,w(t)};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[S,p]);let T=!!(a||o||s),E=!!i,D=!!(r||n),k=v.kind===`cloud`?B.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME:B.COMMON$STOP_CONVERSATION,ee=v.kind===`cloud`&&!!c,A=y?.public||!1,j=!!S,M=(0,Z.jsxs)(Mt,{ref:x,testId:`conversation-name-context-menu`,position:p,alignment:`left`,className:z(g?`right-0 translate-x-[34%] left-auto`:``,j?`!static !top-auto !bottom-auto !left-auto !right-auto !mt-0`:``),children:[t&&(0,Z.jsx)(W,{testId:`rename-button`,onClick:t,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(Ft,{width:16,height:16}),text:_(B.BUTTON$RENAME)})}),T&&(0,Z.jsx)(tt,{testId:`separator-tools`,inset:`menu`}),o&&(0,Z.jsx)(yn,{isDisabled:b,children:(0,Z.jsx)(W,{testId:`show-skills-button`,onClick:o,isDisabled:b,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(It,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:_(B.CONVERSATION$SHOW_SKILLS)})})}),s&&(0,Z.jsx)(yn,{isDisabled:b,children:(0,Z.jsx)(W,{testId:`show-hooks-button`,onClick:s,isDisabled:b,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(Bt,{width:16,height:16,"aria-hidden":!0}),text:_(B.CONVERSATION$SHOW_HOOKS)})})}),a&&(0,Z.jsx)(yn,{isDisabled:b,children:(0,Z.jsx)(W,{testId:`show-agent-tools-button`,onClick:a,isDisabled:b,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(Qe,{width:16,height:16}),text:_(B.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})})}),u&&(0,Z.jsx)(W,{testId:`export-transcript-button`,onClick:u,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(bt,{width:16,height:16}),text:_(B.BUTTON$EXPORT_TRANSCRIPT)})}),d&&(0,Z.jsx)(W,{testId:`download-trajectory-button`,onClick:d,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(bt,{width:16,height:16}),text:_(B.BUTTON$DOWNLOAD_CONVERSATION_DATA)})}),(E||D)&&(0,Z.jsx)(tt,{testId:`separator-info-control`,inset:`menu`}),i&&(0,Z.jsx)(W,{testId:`display-cost-button`,onClick:i,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(Dt,{width:16,height:16}),text:_(B.BUTTON$DISPLAY_COST)})}),ee&&c&&(0,Z.jsxs)(`li`,{className:`flex w-full items-center gap-2 rounded px-2 py-2 hover:bg-[var(--oh-interactive-hover)]`,children:[(0,Z.jsx)(`span`,{className:`flex shrink-0 items-center text-[var(--oh-muted)]`,"aria-hidden":!0,children:(0,Z.jsx)(tr,{size:16})}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,children:_(B.CONVERSATION$SHARE_PUBLICLY)}),(0,Z.jsxs)(`div`,{className:`flex shrink-0 items-center`,children:[A&&f&&l&&(0,Z.jsxs)(`div`,{className:`mr-2 flex items-center gap-0.5`,children:[(0,Z.jsx)(`button`,{type:`button`,"data-testid":`copy-share-link-button`,onClick:l,className:`rounded p-0.5 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current`,title:_(B.BUTTON$COPY_TO_CLIPBOARD),children:(0,Z.jsx)(Rt,{width:14,height:14})}),(0,Z.jsx)(`a`,{"data-testid":`open-share-link-button`,href:f,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>e.stopPropagation(),className:`rounded p-0.5 text-[var(--oh-muted)] no-underline visited:text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-selected)] hover:text-[var(--oh-foreground)] cursor-pointer [&_svg]:text-current`,title:_(B.BUTTON$OPEN_IN_NEW_TAB),children:(0,Z.jsx)(Ne,{size:14,"aria-hidden":!0})})]}),(0,Z.jsx)(ba,{isPublic:A,onToggle:c,ariaLabel:_(B.CONVERSATION$SHARE_PUBLICLY)})]})]}),r&&(0,Z.jsx)(yn,{isDisabled:b,children:(0,Z.jsx)(W,{testId:`stop-button`,onClick:r,isDisabled:b,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(et,{width:16,height:16}),text:_(k)})})}),n&&(0,Z.jsx)(W,{testId:`delete-button`,onClick:n,children:(0,Z.jsx)(G,{icon:(0,Z.jsx)(Nt,{width:16,height:16}),text:_(B.COMMON$DELETE_CONVERSATION)})})]});return j?typeof document>`u`||!C?null:ya.createPortal((0,Z.jsx)(`div`,{style:C,children:M}),document.body):M}function Sa({onClose:e}){let{t}=h(`openhands`);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ot,{onClose:e,testId:`close-metrics-modal`}),(0,Z.jsx)(`div`,{className:`w-full pr-6`,children:(0,Z.jsx)(We,{title:t(B.CONVERSATION$METRICS_INFO)})})]})}function Ca({currentCost:e,maxBudget:t}){let n=e/t*100;return(0,Z.jsx)(`div`,{className:`w-full h-1.5 bg-tertiary rounded-full overflow-hidden mt-1`,children:(0,Z.jsx)(`div`,{className:z(`h-full transition-all duration-300`,n>80?`bg-red-500`:`bg-blue-500`),style:{width:`${Math.min(100,n)}%`}})})}function wa({currentCost:e,maxBudget:t}){let{t:n}=h(`openhands`),r=e/t*100;return(0,Z.jsx)(`div`,{className:`flex justify-end`,children:(0,Z.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:n(B.CONVERSATION$BUDGET_USAGE_FORMAT,{currentCost:`$${e.toFixed(4)}`,maxBudget:`$${t.toFixed(4)}`,usagePercentage:r.toFixed(2),used:n(B.CONVERSATION$USED)})})})}function Ta({cost:e,maxBudgetPerTask:t}){let{t:n}=h(`openhands`);return e===null?null:(0,Z.jsx)(`div`,{className:`border-b border-[var(--oh-border-subtle)]`,children:t!==null&&t>0?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ca,{currentCost:e,maxBudget:t}),(0,Z.jsx)(wa,{currentCost:e,maxBudget:t})]}):(0,Z.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:n(B.CONVERSATION$NO_BUDGET_LIMIT)})})}function Ea({cost:e,maxBudgetPerTask:t}){let{t:n}=h(`openhands`);return e===null?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`flex justify-between items-center pb-2`,children:[(0,Z.jsx)(`span`,{className:`text-lg font-semibold`,children:n(B.CONVERSATION$TOTAL_COST)}),(0,Z.jsxs)(`span`,{className:`font-semibold`,children:[`$`,e.toFixed(4)]})]}),(0,Z.jsx)(Ta,{cost:e,maxBudgetPerTask:t})]})}function Da({label:e,value:t,labelClassName:n=``,valueClassName:r=`font-semibold`}){return(0,Z.jsxs)(`div`,{className:`flex justify-between items-center border-b border-[var(--oh-border-subtle)] pb-2`,children:[(0,Z.jsx)(`span`,{className:n,children:e}),(0,Z.jsx)(`span`,{className:r,children:t})]})}function Oa({usage:e}){let{t}=h(`openhands`);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Da,{label:t(B.CONVERSATION$INPUT),value:e.prompt_tokens.toLocaleString()}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 pl-4 text-sm`,children:[(0,Z.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:t(B.CONVERSATION$CACHE_HIT)}),(0,Z.jsx)(`span`,{className:`text-right`,children:e.cache_read_tokens.toLocaleString()}),(0,Z.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:t(B.CONVERSATION$CACHE_WRITE)}),(0,Z.jsx)(`span`,{className:`text-right`,children:e.cache_write_tokens.toLocaleString()})]}),(0,Z.jsx)(Da,{label:t(B.CONVERSATION$OUTPUT),value:e.completion_tokens.toLocaleString()}),(0,Z.jsx)(Da,{label:t(B.CONVERSATION$TOTAL),value:(e.prompt_tokens+e.completion_tokens).toLocaleString(),labelClassName:`font-semibold`,valueClassName:`font-bold`})]})}function ka({perTurnToken:e,contextWindow:t}){let{t:n}=h(`openhands`),r=t>0?e/t*100:0,i=Math.min(100,r);return(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,Z.jsx)(`span`,{className:`font-semibold`,children:n(B.CONVERSATION$CONTEXT_WINDOW)})}),(0,Z.jsx)(`div`,{className:`w-full h-1.5 bg-tertiary rounded-full overflow-hidden`,children:(0,Z.jsx)(`div`,{className:`h-full bg-foreground transition-all duration-300`,style:{width:`${i}%`}})}),(0,Z.jsx)(`div`,{className:`flex justify-end`,children:(0,Z.jsxs)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:[e.toLocaleString(),` / `,t.toLocaleString(),` (`,r.toFixed(2),`% `,n(B.CONVERSATION$USED),`)`]})})]})}function Aa(){let{t:e}=h(`openhands`);return(0,Z.jsx)(`div`,{className:`text-center`,children:(0,Z.jsx)(`p`,{className:`text-[var(--oh-muted)]`,children:e(B.CONVERSATION$NO_METRICS)})})}function ja(e){let{stats:t}=e;if(!t?.usage_to_metrics)return{accumulated_cost:0,max_budget_per_task:null,accumulated_token_usage:null};let n=0,r=null,i=null;for(let e of Object.values(t.usage_to_metrics))n+=e.accumulated_cost,r===null&&e.max_budget_per_task!==null&&(r=e.max_budget_per_task),e.accumulated_token_usage&&(i=i===null?{...e.accumulated_token_usage}:{prompt_tokens:i.prompt_tokens+e.accumulated_token_usage.prompt_tokens,completion_tokens:i.completion_tokens+e.accumulated_token_usage.completion_tokens,cache_read_tokens:i.cache_read_tokens+e.accumulated_token_usage.cache_read_tokens,cache_write_tokens:i.cache_write_tokens+e.accumulated_token_usage.cache_write_tokens,context_window:Math.max(i.context_window,e.accumulated_token_usage.context_window),per_turn_token:Math.max(i.per_turn_token,e.accumulated_token_usage.per_turn_token)});return{accumulated_cost:n,max_budget_per_task:r,accumulated_token_usage:i}}var Ma=(e,t,n,r=!0)=>{let i=b({queryKey:[`conversation-metrics`,e,t,n],queryFn:async()=>{if(!e)throw Error(`Conversation ID is required`);return ja(await lt.getRuntimeConversation(e,t,n))},enabled:r&&!!e&&!!t,staleTime:1e3*30,gcTime:1e3*60*5,refetchInterval:1e3*30,retry:!1});return{data:i.data,isLoading:i.isLoading,error:i.error}};function Na({isOpen:e,onOpenChange:t}){let n=Bn(),{data:r}=q(),i=r?.id,a=r?.conversation_url,o=r?.session_api_key,{data:s}=Ma(i,a,o,e),c=(0,Q.useMemo)(()=>s?{cost:s.accumulated_cost,max_budget_per_task:s.max_budget_per_task,usage:s.accumulated_token_usage?{prompt_tokens:s.accumulated_token_usage.prompt_tokens??0,completion_tokens:s.accumulated_token_usage.completion_tokens??0,cache_read_tokens:s.accumulated_token_usage.cache_read_tokens??0,cache_write_tokens:s.accumulated_token_usage.cache_write_tokens??0,context_window:s.accumulated_token_usage.context_window??0,per_turn_token:s.accumulated_token_usage.per_turn_token??0}:null}:n,[s,n]);return e?(0,Z.jsx)(Ve,{onClose:()=>t(!1),children:(0,Z.jsxs)(He,{testID:`metrics-modal`,className:`relative items-start border border-[var(--oh-border)]`,children:[(0,Z.jsx)(Sa,{onClose:()=>t(!1)}),(0,Z.jsxs)(`div`,{className:`w-full`,children:[(c?.cost!==null||c?.usage!==null)&&(0,Z.jsx)(`div`,{className:`rounded-md border border-[var(--oh-border)] bg-surface-raised p-3`,children:(0,Z.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Z.jsx)(Ea,{cost:c?.cost??null,maxBudgetPerTask:c?.max_budget_per_task??null}),c?.usage!==null&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Oa,{usage:c.usage}),(0,Z.jsx)(ka,{perTurnToken:c.usage.per_turn_token,contextWindow:c.usage.context_window})]})]})}),!c?.cost&&!c?.usage&&(0,Z.jsx)(`div`,{className:`rounded-md border border-[var(--oh-border)] bg-surface-raised p-3`,children:(0,Z.jsx)(Aa,{})})]})]})}):null}var Pa=new Set([`BrowserClickAction`,`BrowserCloseTabAction`,`BrowserGetContentAction`,`BrowserGetStateAction`,`BrowserGoBackAction`,`BrowserListTabsAction`,`BrowserNavigateAction`,`BrowserScrollAction`,`BrowserSwitchTabAction`,`BrowserTypeAction`,`ExecuteBashAction`,`FileEditorAction`,`GlobAction`,`GrepAction`,`InvokeSkillAction`,`MCPToolAction`,`StrReplaceEditorAction`,`TaskAction`,`TaskTrackerAction`,`TerminalAction`,`ThinkAction`]),Fa=new Set([`BrowserObservation`,`CanvasUIObservation`,`ExecuteBashObservation`,`FileEditorObservation`,`GlobObservation`,`GrepObservation`,`InvokeSkillObservation`,`MCPToolObservation`,`StrReplaceEditorObservation`,`SwitchLLMObservation`,`TaskTrackerObservation`,`TaskObservation`,`TerminalObservation`]),Ia=e=>e.replace(/[\r\n]+/g,` `).replace(/\s+/g,` `).trim(),La=(e,t=100)=>e.length>t?`${e.slice(0,t)}…`:e,Ra=e=>{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toISOString()},$=e=>e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`).replaceAll(`'`,`'`),za=e=>e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replace(/(!?)\[([^\]]*)\]\(\s*((?:javascript|data|vbscript):[^)]*)\)/gi,`$1\\[$2\\]($3)`).replace(/^(\s{0,3})\[([^\]]+)\]:(\s*<?(?:javascript|data|vbscript):)/gim,`$1\\[$2\\]:$3`),Ba=e=>Ia(e||w.t(B.TRANSCRIPT_EXPORT$DEFAULT_TITLE))||w.t(B.TRANSCRIPT_EXPORT$DEFAULT_TITLE),Va=(e,t)=>Ia(w.t(e,t).replace(/<\/?(?:cmd|path)>/g,``)),Ha=e=>/^[a-z][a-z0-9_]*\s*:\s*[[{]/i.test(e),Ua=e=>e.replace(/(?:Action|Observation)$/,``).replace(/([a-z])([A-Z])/g,`$1 $2`).trim(),Wa=e=>{let t=Ia(e.summary||``);return t&&!Ha(t)?t:Ia(e.tool_name)||Ua(e.action.kind)},Ga=(e,t)=>t?Wa(t):Ia(e.tool_name)||Ua(e.observation.kind),Ka=e=>e.filter(e=>e.type===`text`&&typeof e.text==`string`).map(e=>e.text).join(`
|
|
21
|
+
`),qa=e=>[`${w.t(B.TASK$SUBAGENT)}: ${e.subagent_type}`,`${w.t(B.TASK$QUERY)}:\n${e.prompt}`].join(`
|
|
22
|
+
|
|
23
|
+
`),Ja=(e,t)=>{let n=t?.action.kind===`TaskAction`?t.action:void 0;return[`${w.t(B.TASK$SUBAGENT)}: ${e.subagent}`,`${w.t(B.TASK$TASK_ID)}: ${e.task_id}`,n?`${w.t(B.TASK$QUERY)}:\n${n.prompt}`:``,`${w.t(B.TASK$RESULT)}:\n${Ka(e.content)}`].filter(Boolean).join(`
|
|
24
|
+
|
|
25
|
+
`)},Ya=e=>e.action.kind===`TaskAction`?qa(e.action):Pa.has(e.action.kind)?be(e):``,Xa=(e,t)=>e.observation.kind===`TaskObservation`?Ja(e.observation,t):Fa.has(e.observation.kind)?he(e):``,Za=e=>En(e)?[e.reason,e.error,e.stdout,e.stderr].filter(e=>!!e?.trim()).join(`
|
|
26
|
+
|
|
27
|
+
`):``,Qa=e=>[Xn(e),Cn(e)].map(e=>e.trim()).filter(Boolean).join(`
|
|
28
|
+
|
|
29
|
+
`),$a=e=>![`FinishAction`,`SwitchLLMAction`,`ThinkAction`].includes(e.action.kind),eo=(e,t)=>{let n=e.reduce((e,t)=>{try{return Pn(t,e)}catch{return e}},[]),r=new Map(e.filter(Mn).map(e=>[e.id,e])),i=[],a=new Set,o=Se(n.filter(e=>Sn(e)&&!e.observation.is_error||Jn(e)),2**53-1,e),s=e=>{if(a.has(e.id)||!$a(e))return;a.add(e.id);let t=Qa(e);t&&i.push({kind:`message`,author:`assistant`,content:t,timestamp:e.timestamp})};for(let e of o){if(e.kind===`group`)continue;if(e.kind===`thought`){s(e.action);continue}let{event:n}=e;try{let e=Mn(n)?n:kn(n)?r.get(n.action_id):void 0;if(e&&s(e),Sn(n)&&!n.observation.is_error){i.push({kind:`note`,summary:Va(B.MODEL$SWITCHED_TO_PROFILE,{name:n.observation.profile_name}),content:[n.observation.active_model?`${w.t(B.TRANSCRIPT_EXPORT$MODEL)}: ${n.observation.active_model}`:``,n.observation.reason?`${w.t(B.TRANSCRIPT_EXPORT$REASON)}: ${n.observation.reason}`:``].filter(Boolean).join(`
|
|
30
|
+
`),timestamp:n.timestamp});continue}if(Dn(n)){let e=ge(n).trim();if(n.source===`agent`){let{reasoning:t,message:r}=Tn(e);[t,r].filter(Boolean).forEach(e=>{i.push({kind:`message`,author:`assistant`,content:e,timestamp:n.timestamp})})}else e&&i.push({kind:`message`,author:`user`,content:e,timestamp:n.timestamp});continue}if(Zn(n)){let{reasoning:e,message:t}=Tn(n.content??``,{streaming:!0}),r=[n.reasoning_content?.trim()||``,e].filter(Boolean).join(`
|
|
31
|
+
|
|
32
|
+
`);r&&i.push({kind:`message`,author:`assistant`,content:r,timestamp:n.timestamp}),t.trim()&&i.push({kind:`message`,author:`assistant`,content:t.trim(),timestamp:n.timestamp});continue}if(Un(n)){i.push({kind:`error`,content:n.error,timestamp:n.timestamp});continue}if(Mn(n)){if(n.action.kind===`FinishAction`){let e=n.action.message.trim();e&&i.push({kind:`message`,author:`assistant`,content:e,timestamp:n.timestamp})}else i.push({kind:`tool`,summary:Wa(n),details:t?Ya(n):``,timestamp:n.timestamp});continue}if(kn(n)){let e=r.get(n.action_id);i.push({kind:`tool`,summary:Ga(n,e),details:t?Xa(n,e):``,timestamp:n.timestamp});continue}if(wn(n)){i.push({kind:`tool`,summary:we(n)||w.t(B.ACTION_MESSAGE$ACP_TOOL),details:t?Ce(n):``,timestamp:n.timestamp});continue}if(En(n)){i.push({kind:`tool`,summary:w.t(B.TRANSCRIPT_EXPORT$HOOK,{command:La(Ia(n.hook_command),100)}),details:t?Za(n):``,timestamp:n.timestamp});continue}An(n)&&Nn(n)&&i.push({kind:`note`,summary:`${w.t(B.GOAL$PREFIX)} ${w.t({running:B.GOAL$STATUS_RUNNING,complete:B.GOAL$STATUS_COMPLETE,capped:B.GOAL$STATUS_CAPPED,interrupted:B.GOAL$STATUS_INTERRUPTED}[n.value.status])}`,content:[n.value.objective,n.value.verdict?.missing||``].filter(Boolean).join(`
|
|
33
|
+
|
|
34
|
+
`),timestamp:n.timestamp})}catch{}}return i},to=(e,t)=>t.includeTimestamps?`<sub>${$(Ra(e.timestamp))}</sub>\n\n`:``,no=e=>{let t=Math.max(0,...Array.from(e.matchAll(/`+/g),e=>e[0].length)),n="`".repeat(Math.max(3,t+1));return`${n}text\n${e}\n${n}`},ro=(e,t)=>{let n=[`# ${za(Ba(t.title))}`,``];t.model&&n.push(`**${w.t(B.TRANSCRIPT_EXPORT$MODEL)}:** ${za(Ia(t.model))}`,``);for(let r of eo(e,t.includeToolDetails)){let e=to(r,t);if(r.kind===`message`){let t=r.author===`user`?w.t(B.TRANSCRIPT_EXPORT$USER):w.t(B.CHAT_INTERFACE$ASSISTANT);n.push(`## ${t}`,``,e+za(r.content),``)}else if(r.kind===`error`){let t=r.content.split(`
|
|
35
|
+
`).map(e=>`> ${za(e)}`).join(`
|
|
36
|
+
`);n.push(`## ${w.t(B.COMMON$ERROR)}`,``,e+t,``)}else if(r.kind===`note`)n.push(`> **${$(r.summary)}**`,``,e+za(r.content),``);else if(t.includeToolDetails&&r.details)n.push(`<details>`,`<summary><strong>${$(w.t(B.TRANSCRIPT_EXPORT$TOOL))}:</strong> ${$(r.summary)}</summary>`,``,e+no(r.details),``,`</details>`,``);else{let t=e?`<br>${e.trimEnd()}`:``;n.push(`<p><strong>${$(w.t(B.TRANSCRIPT_EXPORT$TOOL))}:</strong> ${$(r.summary)}${t}</p>`,``)}}return`${n.join(`
|
|
37
|
+
`).trim()}\n`},io=(e,t)=>{if(!t.includeTimestamps)return``;let n=Ra(e.timestamp);return`<time datetime="${$(n)}">${$(n)}</time>`},ao=(e,t)=>{let n=Ba(t.title),r=eo(e,t.includeToolDetails).map(e=>{let n=io(e,t);if(e.kind===`message`){let t=e.author===`user`?w.t(B.TRANSCRIPT_EXPORT$USER):w.t(B.CHAT_INTERFACE$ASSISTANT);return`<section class="message ${e.author.toLowerCase()}">
|
|
38
|
+
<header><h2>${$(t)}</h2>${n}</header>
|
|
39
|
+
<div class="content">${$(e.content)}</div>
|
|
40
|
+
</section>`}return e.kind===`error`?`<section class="message error">
|
|
41
|
+
<header><h2>${$(w.t(B.COMMON$ERROR))}</h2>${n}</header>
|
|
42
|
+
<div class="content">${$(e.content)}</div>
|
|
43
|
+
</section>`:e.kind===`note`?`<aside class="note">
|
|
44
|
+
<header><strong>${$(e.summary)}</strong>${n}</header>
|
|
45
|
+
${e.content?`<div class="content">${$(e.content)}</div>`:``}
|
|
46
|
+
</aside>`:t.includeToolDetails&&e.details?`<details>
|
|
47
|
+
<summary><strong>${$(w.t(B.TRANSCRIPT_EXPORT$TOOL))}:</strong> ${$(e.summary)}${n}</summary>
|
|
48
|
+
<pre>${$(e.details)}</pre>
|
|
49
|
+
</details>`:`<div class="tool-summary"><strong>${$(w.t(B.TRANSCRIPT_EXPORT$TOOL))}:</strong> ${$(e.summary)}${n}</div>`}).join(`
|
|
50
|
+
`),i=t.model?`<p class="model"><strong>${$(w.t(B.TRANSCRIPT_EXPORT$MODEL))}:</strong> ${$(Ia(t.model))}</p>`:``;return`<!doctype html>
|
|
51
|
+
<html lang="${$(w.resolvedLanguage||w.language||`en`)}">
|
|
52
|
+
<head>
|
|
53
|
+
<meta charset="utf-8">
|
|
54
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
55
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data:">
|
|
56
|
+
<title>${$(n)}</title>
|
|
57
|
+
<style>
|
|
58
|
+
:root { color-scheme: light dark; font-family: ui-sans-serif, system-ui, sans-serif; }
|
|
59
|
+
body { margin: 0; background: #111827; color: #e5e7eb; line-height: 1.55; }
|
|
60
|
+
main { box-sizing: border-box; width: min(860px, 100%); margin: 0 auto; padding: 48px 24px 80px; }
|
|
61
|
+
h1 { margin: 0; font-size: 2rem; }
|
|
62
|
+
h2 { margin: 0; font-size: 1rem; }
|
|
63
|
+
.model { margin: 8px 0 32px; color: #9ca3af; }
|
|
64
|
+
.message, details, .tool-summary, .note { margin: 16px 0; border: 1px solid #374151; border-radius: 10px; padding: 16px; background: #1f2937; }
|
|
65
|
+
.user { border-left: 4px solid #60a5fa; }
|
|
66
|
+
.assistant { border-left: 4px solid #34d399; }
|
|
67
|
+
.error { border-left: 4px solid #f87171; }
|
|
68
|
+
.note { border-left: 4px solid #a78bfa; }
|
|
69
|
+
header, summary, .tool-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
|
|
70
|
+
summary { cursor: pointer; }
|
|
71
|
+
time { flex: none; color: #9ca3af; font-size: .75rem; font-weight: 400; }
|
|
72
|
+
.content { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
73
|
+
pre { margin: 14px 0 0; padding: 14px; overflow-x: auto; border-radius: 7px; background: #111827; color: #d1d5db; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
74
|
+
@media (prefers-color-scheme: light) {
|
|
75
|
+
body { background: #f9fafb; color: #111827; }
|
|
76
|
+
.message, details, .tool-summary, .note { border-color: #d1d5db; background: #fff; }
|
|
77
|
+
pre { background: #f3f4f6; color: #1f2937; }
|
|
78
|
+
.model, time { color: #6b7280; }
|
|
79
|
+
}
|
|
80
|
+
</style>
|
|
81
|
+
</head>
|
|
82
|
+
<body>
|
|
83
|
+
<main>
|
|
84
|
+
<h1>${$(n)}</h1>
|
|
85
|
+
${i}
|
|
86
|
+
${r}
|
|
87
|
+
</main>
|
|
88
|
+
</body>
|
|
89
|
+
</html>
|
|
90
|
+
`},oo=(e,t)=>e.timestamp.localeCompare(t.timestamp),so=async(e,t,n)=>{let r=[],i=new Set,a=new Set,o,s,c=!1,l=!1;for(;;){let e=await t({limit:100,sortOrder:`TIMESTAMP_DESC`,strictPagination:!0,...s?{pageId:s}:{},...o?{timestampLt:o}:{}});if(!Array.isArray(e.items))throw Error(`Invalid transcript history response: expected page.items to be an array.`);r.push(...e.items);let u,d=!1;if(e.items.forEach(e=>{i.has(e.id)||(i.add(e.id),d=!0),(!u||e.timestamp<u)&&(u=e.timestamp)}),e.next_page_id){if(a.has(e.next_page_id))throw Error(`Transcript history pagination repeated a page cursor.`);a.add(e.next_page_id),s=e.next_page_id,o=void 0,c=!0;continue}if(c&&!l||e.items.length<100)break;if(n===void 0)throw Error(`Transcript history pagination cannot prove that all events were loaded.`);if(!u||o&&(!d||u>=o))throw Error(`Transcript history pagination did not advance.`);s=void 0,o=u,l=!0}let u=new Map;r.slice().reverse().forEach(e=>{u.has(e.id)||u.set(e.id,e)}),e.forEach(e=>{u.has(e.id)||u.set(e.id,e)});let d=[...u.values()].sort(oo);if(n!==void 0&&i.size<n)throw Error(`Transcript history is incomplete: expected ${n} persisted events, received ${i.size}.`);return d},co=`transcript-export-format`;function lo({conversationId:e,conversationUrl:t,sessionApiKey:n,conversationTitle:r,model:i,onClose:a}){let{t:o}=h(`openhands`),{trackConversationExported:s}=ze(),[c,l]=Q.useState(`markdown`),[u,d]=Q.useState(!0),[f,p]=Q.useState(!0),[m,g]=Q.useState(!1),_=Q.useRef(!1),v=Q.useRef(!1),y=Q.useRef(!0);Q.useEffect(()=>(y.current=!0,()=>{y.current=!1,v.current=!0}),[]);let b=()=>{_.current&&(v.current=!0),a()};return(0,Z.jsx)(Ve,{onClose:b,"aria-label":o(B.TRANSCRIPT_EXPORT$TITLE),children:(0,Z.jsxs)(He,{testID:`transcript-export-modal`,className:`relative items-start border border-[var(--oh-border)]`,children:[(0,Z.jsx)(ot,{onClose:b,testId:`close-transcript-export-modal`,className:`absolute right-4 top-4`}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 pr-8`,children:[(0,Z.jsx)(We,{title:o(B.TRANSCRIPT_EXPORT$TITLE)}),(0,Z.jsx)(Ue,{description:o(B.TRANSCRIPT_EXPORT$DESCRIPTION)})]}),(0,Z.jsxs)(`fieldset`,{className:`flex w-full flex-col gap-2`,children:[(0,Z.jsx)(`legend`,{className:`mb-2 text-sm font-medium text-white`,children:o(B.TRANSCRIPT_EXPORT$FORMAT)}),(0,Z.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-md border border-[var(--oh-border)] px-3 py-2 text-sm text-white`,children:[(0,Z.jsx)(`input`,{type:`radio`,name:co,value:`markdown`,disabled:m,checked:c===`markdown`,onChange:()=>l(`markdown`)}),o(B.TRANSCRIPT_EXPORT$MARKDOWN)]}),(0,Z.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-md border border-[var(--oh-border)] px-3 py-2 text-sm text-white`,children:[(0,Z.jsx)(`input`,{type:`radio`,name:co,value:`html`,disabled:m,checked:c===`html`,onChange:()=>l(`html`)}),o(B.TRANSCRIPT_EXPORT$HTML)]})]}),(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-3 text-sm text-white`,children:[(0,Z.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,disabled:m,checked:u,onChange:e=>d(e.target.checked)}),o(B.TRANSCRIPT_EXPORT$INCLUDE_TOOL_DETAILS)]}),(0,Z.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,disabled:m,checked:f,onChange:e=>p(e.target.checked)}),o(B.TRANSCRIPT_EXPORT$INCLUDE_TIMESTAMPS)]})]}),(0,Z.jsxs)(`div`,{className:`flex w-full justify-end gap-2`,children:[(0,Z.jsx)(Ge,{type:`button`,variant:`secondary`,onClick:b,testId:`cancel-transcript-export`,children:o(B.BUTTON$CANCEL)}),(0,Z.jsx)(Ge,{type:`button`,variant:`primary`,onClick:async()=>{if(!_.current){v.current=!1,_.current=!0,g(!0);try{let o=await Kn.getEventCount(e,t??``,n).catch(()=>void 0);if(v.current)return;let l=Y.getState(),d=await so(l.loadedConversationId===e?l.events:[],r=>Kn.searchEvents(e,t,n,r),o);if(v.current)return;let p={includeToolDetails:u,includeTimestamps:f,title:r,model:i},m=c===`markdown`,h=m?ro(d,p):ao(d,p),g=m?`md`:`html`;re(new Blob([h],{type:m?`text/markdown;charset=utf-8`:`text/html;charset=utf-8`}),`conversation-${e}.${g}`),s(c),a()}catch{v.current||T(o(B.ERROR$GENERIC))}finally{_.current=!1,y.current&&g(!1)}}},testId:`confirm-transcript-export`,isDisabled:m,"aria-busy":m,children:o(B.BUTTON$EXPORT_CONVERSATION)})]})]})})}function uo(){let{t:e}=h(`openhands`),{conversationId:t}=J(),{data:n}=q(),{mutate:r}=kt(),[i,a]=Q.useState(`view`),[o,s]=Q.useState(!1),[c,l]=Q.useState(!1),u=Q.useRef(null),d=Q.useRef(null),{handleDelete:f,handleStop:p,handleDownloadConversation:m,handleDisplayCost:g,handleShowAgentTools:_,handleShowSkills:v,handleShowHooks:y,handleTogglePublic:b,handleCopyShareLink:x,shareUrl:S,handleConfirmDelete:C,handleConfirmStop:w,metricsModalVisible:T,setMetricsModalVisible:E,systemModalVisible:O,setSystemModalVisible:k,skillsModalVisible:ee,setSkillsModalVisible:A,hooksModalVisible:j,setHooksModalVisible:M,confirmDeleteModalVisible:N,setConfirmDeleteModalVisible:P,confirmStopModalVisible:F,setConfirmStopModalVisible:I,systemMessage:L,shouldShowStop:R,shouldShowDownloadConversation:te,shouldShowDisplayCost:ne,shouldShowAgentTools:re,shouldShowSkills:ie,shouldShowHooks:ae}=Yt({conversationId:t,executionStatus:n?.execution_status,showOptions:!0,onContextMenuToggle:s});return Q.useEffect(()=>{i===`edit`&&u.current?.focus()},[i]),n?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 h-[22px] text-base font-normal text-left pl-0 lg:pl-1 min-w-0`,"data-testid":`conversation-name`,children:[i===`edit`?(0,Z.jsx)(`input`,{ref:u,"data-testid":`conversation-name-input`,onClick:e=>{i===`edit`&&(e.preventDefault(),e.stopPropagation())},onBlur:()=>{if(u.current?.value&&t){let i=u.current.value.trim();i!==n?.title&&r({conversationId:t,newTitle:i},{onSuccess:()=>{D(e(B.CONVERSATION$TITLE_UPDATED))}})}else u.current&&(u.current.value=n?.title??``);a(`view`)},onKeyUp:e=>{e.nativeEvent.isComposing||e.key===`Enter`&&e.currentTarget.blur()},type:`text`,defaultValue:n.title||``,className:`text-white leading-5 bg-transparent border-none outline-none text-base font-normal w-fit max-w-fit field-sizing-content`}):(0,Z.jsx)(`div`,{className:`text-white leading-5 truncate`,"data-testid":`conversation-name-title`,onDoubleClick:()=>{a(`edit`)},title:n.title||``,children:n.title}),i!==`edit`&&(0,Z.jsxs)(`div`,{ref:d,className:`relative flex items-center shrink-0`,children:[(0,Z.jsx)(Pt,{onClick:e=>{e.preventDefault(),e.stopPropagation(),s(!o)}}),o&&(0,Z.jsx)(xa,{onClose:()=>s(!1),onRename:e=>{e.preventDefault(),e.stopPropagation(),a(`edit`),s(!1)},onDelete:f,onStop:R?p:void 0,onDisplayCost:ne?g:void 0,onShowAgentTools:re?_:void 0,onShowSkills:ie?v:void 0,onShowHooks:ae?y:void 0,onTogglePublic:b,onCopyShareLink:x,shareUrl:S,onExportTranscript:e=>{e.preventDefault(),e.stopPropagation(),l(!0),s(!1)},onDownloadConversation:te?m:void 0,position:`bottom`,anchorRef:d})]})]}),(0,Z.jsx)(Na,{isOpen:T,onOpenChange:E}),c&&t&&(0,Z.jsx)(lo,{conversationId:t,conversationUrl:n.conversation_url,sessionApiKey:n.session_api_key,conversationTitle:n.title,model:n.llm_model,onClose:()=>l(!1)}),(0,Z.jsx)(bn,{isOpen:O,onClose:()=>k(!1),systemMessage:L||null}),ee&&(0,Z.jsx)(_n,{onClose:()=>A(!1)}),j&&(0,Z.jsx)(sn,{onClose:()=>M(!1)}),N&&(0,Z.jsx)(St,{onConfirm:C,onCancel:()=>P(!1),conversationTitle:n?.title||``}),F&&(0,Z.jsx)(xt,{onConfirm:w,onCancel:()=>I(!1)})]}):null}function fo({children:e,tooltip:t,ariaLabel:n}){return(0,Z.jsx)(qe,{content:t,placement:`bottom`,tooltipClassName:`bg-white text-black text-xs font-medium leading-5`,children:(0,Z.jsx)(`span`,{"data-aria-label":n,children:e})})}function po({className:e}){let{t}=h(`openhands`),n=Qn(),r=an(),i=f(),{conversationId:a}=J(),{isRightPanelShown:o,setHasRightPanelToggled:s,setIsRightPanelShown:c,setSelectedTab:l}=U(),u=()=>{if(r)return;if(n){if(!a)return;s(!0),c(!0);let{selectedTab:e}=U.getState();e||l(`files`),i(`/conversations/${a}/panel`);return}let e=!o;if(s(e),c(e),e){let{selectedTab:e}=U.getState();e||l(`files`)}},d=t(r?B.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES:n?B.COMMON$SHOW_PANEL:o?B.COMMON$HIDE_PANEL:B.COMMON$SHOW_PANEL),p=n?!1:o;return(0,Z.jsx)(fo,{tooltip:d,ariaLabel:d,children:(0,Z.jsx)(`button`,{type:`button`,onClick:u,disabled:r,className:z(Et,r&&`cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]`,e),"aria-label":d,"aria-pressed":p,"aria-disabled":r,"data-testid":`right-panel-toggle`,children:(0,Z.jsx)(Tt,{className:`w-5 h-5 -scale-x-100`})})})}function mo(){let{conversationId:e}=J(),{data:t}=q(),{curAgentState:n}=K(),{isTask:r,taskStatus:i}=qt(),{mutate:a}=Ze(),{mutate:o}=pa(),{providers:s}=Xe(),c=t?.execution_status??null,l=oe({isPausing:!1,isTask:r,taskStatus:i,isStartingStatus:n===I.LOADING||n===I.INIT,isStopStatus:se(c),curAgentState:n});return(0,Z.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center min-w-0`,children:[(0,Z.jsxs)(`div`,{className:`group relative shrink-0`,children:[(0,Z.jsx)(Ki,{className:`ml-[3.5px] w-6 h-6 cursor-pointer`,color:l}),(0,Z.jsx)(va,{onClose:()=>{},onStopServer:L(c)?t=>{t.preventDefault(),t.stopPropagation(),e&&a({conversationId:e})}:void 0,onStartServer:F(c)?t=>{t.preventDefault(),t.stopPropagation(),e&&o({conversationId:e,providers:s})}:void 0,executionStatus:c,position:`bottom`,className:`opacity-0 invisible pointer-events-none group-hover:opacity-100 group-hover:visible group-hover:pointer-events-auto bottom-full left-0 mt-0 min-h-fit`,isPausing:!1})]}),(0,Z.jsx)(uo,{})]}),(0,Z.jsx)(po,{className:`mr-2`})]})}var ho=e=>(0,Z.jsxs)(`svg`,{width:20,height:20,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,Z.jsx)(`path`,{d:`M3 10.5L6.5 14L14 6`,stroke:`currentColor`,strokeWidth:2.2,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,Z.jsx)(`path`,{d:`M7 10.5L10.5 14L18 6`,stroke:`currentColor`,strokeWidth:2.2,strokeLinecap:`round`,strokeLinejoin:`round`})]}),go=160,_o={duration:.22,ease:[.4,0,.2,1]};function vo({tabValue:e,icon:t,onClick:n,isActive:r,label:i,className:a,measureOnly:o,suppressLayoutAnimation:s=!1}){let c=ue(),l=o||c||!1,u=!l&&!s,d=z(`flex items-center rounded-md cursor-pointer`,`pl-1.5 pr-2 py-1 lg:py-1.5`,`text-[var(--oh-muted)] bg-transparent`,r&&`bg-[var(--oh-interactive-active)] text-white`,r?`hover:text-white hover:bg-[var(--oh-interactive-hover)]`:`hover:text-white hover:bg-white/5`,r?`focus-within:text-white`:`focus-within:text-[var(--oh-muted)]`,a),f=(0,Z.jsx)(t,{className:z(`h-4 w-4 shrink-0 text-inherit`)}),p=i&&r?(0,Z.jsx)(`span`,{className:`whitespace-nowrap text-sm font-normal`,children:i}):null,m=i?(0,Z.jsx)(H.span,{initial:!1,animate:{maxWidth:r?go:0,opacity:+!!r,marginLeft:r?8:0},transition:_o,className:`block overflow-hidden whitespace-nowrap text-sm font-normal`,"aria-hidden":!r,children:i}):null;return l?(0,Z.jsxs)(`button`,{type:`button`,onClick:n,...o?{}:{"data-testid":`conversation-tab-${e}`},"data-tab-measure":o?`true`:void 0,className:z(d,`gap-2`),children:[f,p]}):(0,Z.jsxs)(H.button,{layout:u?`position`:!1,type:`button`,onClick:n,...o?{}:{"data-testid":`conversation-tab-${e}`},"data-tab-measure":o?`true`:void 0,className:d,transition:u?{layout:_o}:void 0,children:[f,m]})}var yo=e=>(0,Z.jsx)(`svg`,{viewBox:`0 0 128 128`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Z.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M90.767 127.126a7.968 7.968 0 0 0 6.35-.244l26.353-12.681a8 8 0 0 0 4.53-7.209V21.009a8 8 0 0 0-4.53-7.21L97.117 1.12a7.97 7.97 0 0 0-9.093 1.548l-50.45 46.026L15.6 32.013a5.328 5.328 0 0 0-6.807.302l-7.048 6.411a5.335 5.335 0 0 0-.006 7.888L20.796 64 1.74 81.387a5.336 5.336 0 0 0 .006 7.887l7.048 6.411a5.327 5.327 0 0 0 6.807.303l21.974-16.68 50.45 46.025a7.96 7.96 0 0 0 2.743 1.793Zm5.252-92.183L57.74 64l38.28 29.058V34.943Z`})});function bo(){let e=k().backend;if(e.kind!==`cloud`)throw Error(`Cloud sandboxes call requires a cloud backend.`);return e}async function xo(e){if(e.length===0)return[];let t=bo(),n=new URLSearchParams;for(let t of e)n.append(`id`,t);return await Le({backend:t,method:`GET`,path:`/api/v1/sandboxes?${n.toString()}`})??[]}var So=e=>{let t=O(),n=t.backend.kind===`cloud`;return b({queryKey:[`cloud`,`sandbox`,t.backend.id,t.orgId,e],queryFn:async()=>{if(!e)return null;let[t]=await xo([e]);return t??null},enabled:n&&!!e,staleTime:1e3*60*5,gcTime:1e3*60*15})},Co=`VSCODE`,wo=()=>{let{t:e}=h(`openhands`),{conversationId:t}=J(),n=qr({allowAgentError:!0}),{data:r}=q(),i=O(),a=r?.conversation_url??null,o=r?.session_api_key??null,s=r?.sandbox_id??null,c=i.backend.kind===`cloud`,l=So(c?s:null),u=b({queryKey:[`unified`,`vscode_url`,`local`,t,a,o],queryFn:async()=>{if(!t)throw Error(`No conversation ID`);return{url:wt((await lt.getVSCodeUrl(t,a,o).catch(()=>ft.getVSCodeUrl(t))).vscode_url)}},enabled:!c&&n&&!!t,refetchOnMount:!0,retry:3}),d,f,p,m,g,_,v;if(c){let e=l.data?.exposed_urls?.find(e=>e.name===Co)?.url??null;d=l.isSuccess?{url:wt(e)}:void 0,f=l.isLoading,p=l.isError,m=l.isSuccess,g=l.status,_=l.error,v=async()=>{let e=await l.refetch(),t=e.data?.exposed_urls?.find(e=>e.name===Co)?.url??null;return{data:e.data?{url:wt(t)}:void 0}}}else d=u.data,f=u.isLoading,p=u.isError,m=u.isSuccess,g=u.status,_=u.error,v=async()=>({data:(await u.refetch()).data});let y=d&&!d.url?e(B.VSCODE$URL_NOT_AVAILABLE):null;return{data:d?{...d,error:y}:void 0,error:_,isLoading:f,isError:p,isSuccess:m,status:g,refetch:v}};function To(){let{t:e}=h(`openhands`),{curAgentState:t}=K(),{data:n,refetch:r,isLoading:i}=wo(),a=A.includes(t);return(0,Z.jsxs)(`button`,{type:`button`,onClick:async()=>{let e=n?.url;e||=(await r()).data?.url??null,e&&window.open(e,`_blank`,`noopener,noreferrer`)},disabled:i||a,"aria-label":e(B.VSCODE$OPEN),title:e(B.VSCODE$OPEN),"data-testid":`drawer-vscode-link`,className:z(`inline-flex items-center gap-1.5 rounded-[7px] border border-[var(--oh-border)] bg-base-secondary px-2 py-1 text-xs`,`text-[var(--oh-muted)] transition-colors hover:enabled:bg-surface-raised hover:enabled:text-white`,`cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed`),children:[(0,Z.jsx)(yo,{className:`h-[15px] w-[15px] shrink-0`,"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:e(B.FILES$VSCODE)}),(0,Z.jsx)(Ne,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0,strokeWidth:2})]})}var Eo=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7.13832 8.76476C8.25957 8.17949 9.52697 7.9727 10.7515 8.14436L14.9025 2.52826L21.4717 9.09737L15.8555 13.2484C16.0272 14.4729 15.8204 15.7403 15.2351 16.8616C15.1872 16.9535 15.1366 17.0444 15.0836 17.1343C14.8318 17.5605 14.5228 17.9624 14.1566 18.3286L10.4443 14.6163L4.75207 20.3085H3.69141V19.2478L9.38361 13.5556L5.6713 9.84332C6.03755 9.47708 6.43936 9.16808 6.86562 8.91632C6.95547 8.86326 7.04641 8.81274 7.13832 8.76476ZM15.0735 4.82054L19.1794 8.92641L14.2461 12.5727L14.3701 13.4567C14.492 14.3266 14.3596 15.2233 13.9758 16.0265L7.97338 10.0241C8.77665 9.64035 9.67335 9.50789 10.5432 9.62984L11.4272 9.75376L15.0735 4.82054Z`,fill:`currentColor`})}),Do=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.jsx)(`path`,{d:`M10.9706 10.1586C10.2819 10.0621 9.56905 10.1784 8.93842 10.5075C8.88672 10.5345 8.83557 10.5629 8.78504 10.5928C8.54529 10.7344 8.3193 10.9082 8.11331 11.1142L9.83702 12.8372L7.00054 15.75L7 17H8.25064L11.1628 14.1632L12.8857 15.8865C13.0917 15.6805 13.2655 15.4545 13.4071 15.2147C13.437 15.1642 13.4654 15.1131 13.4924 15.0614C13.8215 14.4308 13.9378 13.718 13.8413 13.0293L17 10.6946L13.3053 7L10.9706 10.1586Z`,fill:`currentColor`})});function Oo(e){if(kn(e)&&e.observation.kind===`TaskTrackerObservation`){let t=e.observation;if(t.command===`plan`)return t.task_list.map((e,t)=>({id:String(t+1),title:e.title,status:e.status,notes:e.notes||void 0}))}return null}function ko(){let e=Y(e=>e.events);return(0,Q.useMemo)(()=>{for(let t=e.length-1;t>=0;--t){let n=Oo(e[t]);if(n)return{taskList:n,hasTaskList:n.length>0}}return{taskList:[],hasTaskList:!1}},[e])}function Ao({isOpen:e,onClose:t,ignoreOutsideClickRef:n,anchorRef:r}){let i=At(t,n),[a,o]=(0,Q.useState)();(0,Q.useLayoutEffect)(()=>{if(!e||!r?.current){o(void 0);return}let t=()=>{let e=r.current?.getBoundingClientRect();e&&o({position:`fixed`,zIndex:9999,top:e.bottom+8,left:e.left})};return t(),window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0)}},[e,r]);let{t:s}=h(`openhands`),{conversationId:c}=J(),{state:l,setUnpinnedTabs:u,setSelectedTab:d}=rt(c),{selectedTab:f,isRightPanelShown:p,setSelectedTab:m}=U(),{navigateToTab:g}=xe(),{hasTaskList:_}=ko(),{backend:v}=O(),y=an(),b=[{tab:`planner`,icon:Pe,i18nKey:B.COMMON$PLANNER},{tab:`files`,icon:vn,i18nKey:B.COMMON$FILES},{tab:`terminal`,icon:nr,i18nKey:B.COMMON$TERMINAL},{tab:`browser`,icon:er,i18nKey:B.COMMON$BROWSER}];_&&b.unshift({tab:`tasklist`,icon:ho,i18nKey:B.COMMON$TASK_LIST});let x=b.filter(({tab:e})=>e!==`planner`||v.kind===`cloud`),S=e=>{y||(g(e),t())},C=(e,t)=>{if(y){t.preventDefault(),t.stopPropagation();return}if(t.preventDefault(),t.stopPropagation(),l.unpinnedTabs.includes(e))u(l.unpinnedTabs.filter(t=>t!==e));else{let t=[...l.unpinnedTabs,e];if(u(t),f===e&&p){let n=x.find(({tab:n})=>n!==e&&!t.includes(n));n&&(m(n.tab),d(n.tab))}}};if(!e)return null;let w=!!(r?.current&&a),T=(0,Z.jsx)(Mt,{ref:i,theme:w?`popover`:`default`,position:w?`none`:`bottom`,alignment:w?`none`:`left`,spacing:w?`none`:`default`,className:z(`z-[9999] w-fit`,w?`mt-0`:`mt-2`),children:x.map(({tab:e,icon:t,i18nKey:n})=>{let r=!l.unpinnedTabs.includes(e);return(0,Z.jsx)(`li`,{className:`list-none`,children:(0,Z.jsx)(yn,{isDisabled:y,children:(0,Z.jsxs)(`div`,{className:z(`group flex h-[30px] w-full min-w-0 items-stretch rounded`,!y&&`hover:bg-[var(--oh-interactive-hover)]`,y&&`opacity-50`),children:[(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`conversation-tabs-menu-open-${e}`,disabled:y,className:z(`flex min-w-0 flex-1 items-center gap-2 rounded-l p-2 text-start text-white`,Je,y?`cursor-not-allowed`:`cursor-pointer`),onClick:()=>S(e),children:[(0,Z.jsx)(`span`,{className:Ye,"aria-hidden":!0,children:(0,Z.jsx)(t,{className:`h-4 w-4`})}),(0,Z.jsx)(`span`,{className:`text-sm`,children:s(n)})]}),(0,Z.jsx)(`button`,{type:`button`,"data-testid":`conversation-tabs-menu-pin-${e}`,disabled:y,className:z(`flex shrink-0 items-center justify-center rounded-r px-2 text-white`,Je,y?`cursor-not-allowed`:`cursor-pointer hover:bg-white/10`),"aria-pressed":r,"aria-label":s(r?B.CONVERSATION$UNPIN_TAB:B.CONVERSATION$PIN_TAB),onClick:t=>C(e,t),children:r?(0,Z.jsx)(`span`,{className:z(`-mr-[5px] ml-auto`,Ye),"aria-hidden":!0,children:(0,Z.jsx)(Do,{className:`h-7 w-7`})}):(0,Z.jsx)(`span`,{className:z(`ml-auto`,Ye),"aria-hidden":!0,children:(0,Z.jsx)(Eo,{className:`h-4.5 w-4.5`})})})]})})},e)})});return w&&a&&typeof document<`u`?ya.createPortal((0,Z.jsx)(`div`,{style:a,children:T}),document.body):T}function jo({variant:e=`default`,isPanelResizing:t=!1}){let{conversationId:n}=J(),{setSelectedTab:r,planContent:i}=U(),[a,o]=(0,Q.useState)(!1),{state:s}=rt(n),{hasTaskList:c}=ko(),{backend:l}=O(),{handleBuildPlanClick:u}=pe(),{curAgentState:d}=K(),{selectTab:f,isTabActive:p,onTabChange:m,selectedTab:g,isRightPanelShown:_}=xe();(0,Q.useEffect)(()=>{r(s.selectedTab)},[r,s.selectedTab]),(0,Q.useEffect)(()=>{_&&(g||m(`files`))},[_,g,m]);let{t:v,i18n:y}=h(`openhands`),b=[{tabValue:`files`,isActive:p(`files`),icon:vn,onClick:()=>f(`files`),tooltipContent:v(B.COMMON$FILES),tooltipAriaLabel:v(B.COMMON$FILES),label:v(B.COMMON$FILES)},{tabValue:`planner`,isActive:p(`planner`),icon:Pe,onClick:()=>f(`planner`),tooltipContent:v(B.COMMON$PLANNER),tooltipAriaLabel:v(B.COMMON$PLANNER),label:v(B.COMMON$PLANNER)},{tabValue:`terminal`,isActive:p(`terminal`),icon:nr,onClick:()=>f(`terminal`),tooltipContent:v(B.COMMON$TERMINAL),tooltipAriaLabel:v(B.COMMON$TERMINAL),label:v(B.COMMON$TERMINAL),className:`pl-2`},{tabValue:`browser`,isActive:p(`browser`),icon:er,onClick:()=>f(`browser`),tooltipContent:v(B.COMMON$BROWSER),tooltipAriaLabel:v(B.COMMON$BROWSER),label:v(B.COMMON$BROWSER)}];c&&b.splice(1,0,{tabValue:`tasklist`,isActive:p(`tasklist`),icon:ho,onClick:()=>f(`tasklist`),tooltipContent:v(B.COMMON$TASK_LIST),tooltipAriaLabel:v(B.COMMON$TASK_LIST),label:v(B.COMMON$TASK_LIST)});let x=b.filter(e=>e.tabValue===`planner`&&l.kind!==`cloud`?!1:s.unpinnedTabs.includes(e.tabValue)?g===e.tabValue:!0),S=s.unpinnedTabs.join(`,`),C=d===I.RUNNING||d===I.LOADING||!i,w=(0,Q.useRef)(null),T=(0,Q.useRef)(null),E=(0,Q.useRef)(null),D=(0,Q.useRef)(null),k=(0,Q.useRef)(null),[ee,A]=(0,Q.useState)(x.length);(0,Q.useLayoutEffect)(()=>{let e=w.current,t=T.current,n=E.current,r=D.current;if(!e||!t||!n||!r)return;let i=()=>{let i=t.querySelectorAll(`[data-tab-measure="true"]`),a=i.length,o=e.getBoundingClientRect().width;if(o===0){A(a);return}let s=Array.from(i).map(e=>e.getBoundingClientRect().width);if(s.length!==a||a===0){A(Math.max(0,a));return}let c=n.getBoundingClientRect().width,l=r.getBoundingClientRect().width,u=getComputedStyle(e).columnGap||getComputedStyle(e).gap,d=parseFloat(u)||6,f=0;for(let e=a;e>=0;--e){let t=c+l;for(let n=0;n<e;n+=1)t+=s[n]??0;if(e>0&&(t+=e*d),t<=o+.5){f=e;break}}A(e=>e===f?e:f)};if(i(),typeof ResizeObserver>`u`)return;let a=new ResizeObserver(i);return a.observe(e),()=>a.disconnect()},[S,x.length,c,l.kind,g,_,y.language]);let j=Math.min(ee,x.length);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:z(`relative w-full min-w-0`,e===`compact`?`flex h-full min-h-0 items-center py-0 pl-0 pr-1`:`min-h-10 p-1`),children:[(0,Z.jsx)(`div`,{ref:T,"aria-hidden":!0,className:`pointer-events-none absolute top-0 left-[-10000px] flex flex-nowrap items-center gap-1.5`,children:x.map(({tabValue:e,icon:t,isActive:n,tooltipContent:r,tooltipAriaLabel:i,label:a,className:o},s)=>(0,Z.jsx)(fo,{tooltip:r,ariaLabel:i,children:(0,Z.jsx)(vo,{tabValue:e,icon:t,onClick:()=>{},isActive:n,label:a,className:z(o,`shrink-0`),measureOnly:!0})},`measure-${e}-${s}`))}),(0,Z.jsxs)(`div`,{ref:w,className:`flex w-full min-w-0 flex-nowrap items-center justify-start`,children:[(0,Z.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center justify-start overflow-hidden`,children:(0,Z.jsxs)(`div`,{className:`flex w-fit max-w-full min-w-0 items-center gap-1.5`,children:[(0,Z.jsx)(ur,{id:`conversation-drawer-tabs`,children:(0,Z.jsx)(`div`,{className:`flex w-fit max-w-full min-w-0 flex-nowrap items-center gap-1.5 overflow-x-hidden`,children:x.slice(0,j).map(({tabValue:e,icon:n,onClick:r,isActive:i,tooltipContent:a,tooltipAriaLabel:o,label:s,className:c},l)=>(0,Z.jsx)(fo,{tooltip:a,ariaLabel:o,children:(0,Z.jsx)(vo,{tabValue:e,icon:n,onClick:r,isActive:i,label:s,className:z(c,`shrink-0`),suppressLayoutAnimation:t})},`${e}-${l}`))})}),(0,Z.jsxs)(`div`,{ref:E,className:`relative shrink-0`,children:[(0,Z.jsx)(Pt,{ref:k,onClick:()=>o(!a),ariaLabel:v(B.COMMON$MORE_OPTIONS),iconClassName:e===`compact`?Ct:void 0}),(0,Z.jsx)(Ao,{isOpen:a,onClose:()=>o(!1),ignoreOutsideClickRef:k,anchorRef:k})]})]})}),(0,Z.jsx)(`div`,{ref:D,className:z(`ml-auto shrink-0`,l.kind===`cloud`&&`pr-1`),children:l.kind===`cloud`&&(0,Z.jsx)(To,{})})]})]}),p(`planner`)&&(0,Z.jsx)(`div`,{className:z(`flex h-10 min-h-10 shrink-0 items-center border-t border-[var(--oh-border)] pl-[10px] pr-1`),children:(0,Z.jsx)(`button`,{type:`button`,onClick:u,disabled:C,className:z(`flex h-5 min-w-17 items-center justify-center rounded bg-white px-2 transition-opacity`,C?`cursor-not-allowed opacity-50`:`cursor-pointer hover:opacity-90`),"data-testid":`planner-tab-build-button`,children:(0,Z.jsxs)(zt.Text,{className:`text-[11px] font-normal leading-5 text-black`,children:[v(B.COMMON$BUILD),` ⌘↩`]})})})]})}function Mo({onMouseDown:e,className:t,isDragging:n=!1}){let[r,i]=(0,Q.useState)(!1),a=n||r;return(0,Z.jsxs)(`div`,{className:z(`relative z-10 w-0 shrink-0 self-stretch`,t),"aria-hidden":!0,children:[(0,Z.jsx)(`div`,{className:`absolute inset-y-0 left-1/2 w-3 min-w-[12px] -translate-x-1/2 cursor-ew-resize`,onMouseDown:e,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)}),(0,Z.jsx)(`div`,{className:z(`pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 transition-colors`,a?`bg-white`:`bg-transparent`),"aria-hidden":!0})]})}var No=200;function Po({defaultLeftWidth:e=50,minLeftWidth:t=30,maxLeftWidth:n=80,storageKey:r=`desktop-layout-panel-width`}={}){let[i,a]=$n(r,e),o=(0,Q.useCallback)(e=>Math.max(t,Math.min(n,e)),[t,n]),[s,c]=(0,Q.useState)(()=>o(i)),[l,u]=(0,Q.useState)(!1),d=(0,Q.useRef)(null),f=(0,Q.useCallback)(e=>{e.preventDefault(),u(!0)},[]),p=(0,Q.useCallback)(e=>{if(!l||!d.current)return;let t=d.current.getBoundingClientRect();c(o((e.clientX-t.left)/t.width*100))},[l,o]),m=(0,Q.useCallback)(()=>{l&&(u(!1),a(s))},[l,s,a]);return(0,Q.useLayoutEffect)(()=>{if(!l)return;let e=document.createElement(`div`);return e.setAttribute(`aria-hidden`,`true`),e.dataset.panelDragShield=``,Object.assign(e.style,{position:`fixed`,inset:`0`,zIndex:String(No),cursor:`ew-resize`}),document.body.appendChild(e),document.addEventListener(`mousemove`,p),document.addEventListener(`mouseup`,m),document.body.style.cursor=`ew-resize`,document.body.style.userSelect=`none`,()=>{document.removeEventListener(`mousemove`,p),document.removeEventListener(`mouseup`,m),document.body.style.cursor=``,document.body.style.userSelect=``,e.remove()}},[l,p,m]),{leftWidth:s,rightWidth:100-s,isDragging:l,containerRef:d,handleMouseDown:f}}function Fo(e){return e?`translate-x-0 opacity-100`:`w-0 translate-x-full opacity-0`}function Io(){let e=Qn(),t=Qn(767),{isRightPanelShown:n}=U(),{leftWidth:r,rightWidth:i,isDragging:a,containerRef:o,handleMouseDown:s}=Po({defaultLeftWidth:50,minLeftWidth:30,maxLeftWidth:80,storageKey:`desktop-layout-panel-width`});return(0,Z.jsx)(`div`,{className:z(e?`relative min-h-0 flex-1 flex flex-col`:`h-full flex flex-col overflow-hidden`),children:(0,Z.jsxs)(`div`,{ref:o,className:z(`flex flex-1 overflow-hidden`,e?`flex-col`:`transition-all duration-300 ease-in-out`),style:e?void 0:{transitionProperty:a?`none`:`all`},children:[(0,Z.jsxs)(`div`,{className:z(`flex flex-col bg-base overflow-hidden`,e?`flex-1`:`transition-all duration-300 ease-in-out`),style:e?void 0:{width:n?`${r}%`:`100%`,transitionProperty:a?`none`:`all`},children:[(0,Z.jsxs)(`div`,{"data-testid":`chat-pane-header`,className:z(`flex h-10 min-h-10 shrink-0 items-center`,t&&`gap-2 pl-2.5`),children:[t?(0,Z.jsx)(Ot,{}):null,(0,Z.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,Z.jsx)(mo,{})})]}),(0,Z.jsx)(`div`,{className:`flex-1 min-h-0 flex flex-col`,children:(0,Z.jsx)(Zi,{isRightPanelShown:!e&&n})})]}),!e&&n&&(0,Z.jsx)(Mo,{onMouseDown:s,isDragging:a}),!e&&(0,Z.jsx)(`div`,{className:z(`transition-all duration-300 ease-in-out overflow-hidden`,Fo(n)),style:{width:n?`${i}%`:`0%`,transitionProperty:a?`opacity, transform`:`all`},children:(0,Z.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col flex-1 min-h-0 bg-[var(--oh-surface)] border-l border-[var(--oh-border)] overflow-hidden`,children:[(0,Z.jsx)(`div`,{"data-testid":`tabs-pane-header`,className:`flex shrink-0 flex-col border-b border-[var(--oh-border)]`,children:(0,Z.jsx)(jo,{isPanelResizing:a})}),(0,Z.jsx)(`div`,{className:`flex-1 min-h-0 flex flex-col`,children:(0,Z.jsx)(fa,{})})]})})})]})})}function Lo({onNavigateBack:e}){let{t}=h(`openhands`),{setIsRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=U();return Q.useLayoutEffect(()=>(n(!0),r(!0),U.getState().selectedTab||i(`files`),()=>{n(!1),r(!1)}),[n,r,i]),(0,Z.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col bg-[var(--oh-surface)]`,children:[(0,Z.jsxs)(`div`,{"data-testid":`conversation-mobile-panel-top`,className:`flex h-10 min-h-10 shrink-0 items-center gap-1.5 border-b border-[var(--oh-border)] pl-2.5`,children:[(0,Z.jsx)(`button`,{type:`button`,"data-testid":`conversation-mobile-panel-back`,onClick:()=>{e()},"aria-label":t(B.COMMON$BACK),className:Et,children:(0,Z.jsx)(je,{size:20,className:Ct,"aria-hidden":!0,strokeWidth:2})}),(0,Z.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 items-center self-stretch`,children:(0,Z.jsx)(`div`,{"data-testid":`tabs-pane-header`,className:`flex h-full min-h-0 w-full min-w-0 flex-col justify-center`,children:(0,Z.jsx)(jo,{variant:`compact`})})})]}),(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-[var(--oh-surface)]`,children:(0,Z.jsx)(fa,{})})]})}var Ro=1e3*60*5,zo=1e3*60*15,Bo=e=>{let t=e||[],n=O();return b({queryKey:[`v1`,`sub-conversations`,t,n.backend.id,n.orgId],queryFn:async()=>t.length===0?[]:lt.batchGetAppConversations(t),enabled:t.length>0,staleTime:Ro,gcTime:zo,retry:!1})};function Vo({children:e,conversationId:t}){let{data:n}=q(),{data:r}=Bo(n?.sub_conversation_ids??[]),i=r?.filter(e=>e!==null);return(0,Z.jsx)(Hn,{conversationId:t,conversationUrl:n?.sandbox_status===`PAUSED`?null:n?.conversation_url,sessionApiKey:n?.session_api_key,subConversationIds:n?.sub_conversation_ids,subConversations:i,children:e})}function Ho(){let{t:e}=h(`openhands`),{conversationId:t}=J(),n=d(`/conversations/:conversationId/panel`),{isTask:r,taskStatus:i,taskDetail:a}=Jt(),o=O(),s=Q.useRef(o.backend.id),c=Q.useRef(o.orgId),l=s.current!==o.backend.id||c.current!==o.orgId,{data:p,isFetched:m}=q(),{data:g}=dt(),{resetConversationState:_}=U(),v=f(),y=u(),b=Yn(e=>e.clearTerminal),x=yt(e=>e.reset),S=fr(e=>e.setCurrentAgentState),C=Rn(e=>e.removeErrorMessage);Q.useEffect(()=>{b(),_(),x(),S(I.LOADING),C()},[t,b,_,x,S,C]),Q.useEffect(()=>{if(r&&i===`ERROR`){T(a||e(B.CONVERSATION$FAILED_TO_START_FROM_TASK));let t=y.state?.resumedFromConversationId;v(t?`/conversations/${t}`:`/conversations`,{replace:!0})}},[r,i,a,e,v,y.state]),Q.useEffect(()=>{!m||!g||l||p||(vr(o.backend.id,o.orgId),T(e(B.CONVERSATION$NOT_EXIST_OR_NO_PERMISSION)),v(`/conversations`))},[p,m,g,v,e,l,o.backend.id,o.orgId]),Q.useEffect(()=>{l||t&&(t.startsWith(`task-`)||_r(o.backend.id,o.orgId,t))},[t,l,o.backend.id,o.orgId]);let w=Q.useRef(null);return Q.useEffect(()=>{!m||!p||o.backend.kind===`cloud`&&p.sandbox_status===`PAUSED`&&p.sandbox_id&&w.current!==p.id&&(w.current=p.id,ct(p.sandbox_id).catch(()=>{T(e(B.CONVERSATION$FAILED_TO_START_FROM_TASK))}))},[m,p?.id,p?.sandbox_status,p?.sandbox_id,o.backend.kind,e]),l?null:(0,Z.jsx)(Vo,{conversationId:t,children:(0,Z.jsx)(wr,{children:(0,Z.jsx)(`div`,{"data-testid":`app-route`,className:`flex h-full flex-col`,children:n?(0,Z.jsx)(Lo,{onNavigateBack:()=>v(`/conversations/${t}`)}):(0,Z.jsx)(Io,{})})})})}function Uo(){return(0,Z.jsx)(Ho,{})}var Wo=p(Uo);export{nr as i,ko as n,qr as r,Wo as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./conversation-Dpc5nmGi.js";export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Bcgpimp9.js";import{_ as n,c as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";import{Q as i,Z as a,gt as o,ot as s}from"./active-backend-context-mY7Gff5c.js";import{a as c,i as l}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-VFnwct3q.js";import{f as u}from"./conversation-store-C6hSXHw0.js";import{o as d,p as f,s as p,t as m,u as h}from"./agent-server-conversation-service.api-C_7YnjzP.js";var g=async e=>{let t=(await m.batchGetAppConversations([e]))[0];if(!t)throw Error(`V1 conversation not found: ${e}`);return{conversationUrl:t.conversation_url,sessionApiKey:t.session_api_key,sandboxId:t.sandbox_id}},_=async e=>{let{conversationUrl:t,sessionApiKey:r,sandboxId:i}=await g(e);if(s().backend.kind===`cloud`){if(!i)throw Error(`Cannot stop runtime: cloud conversation ${e} has no sandbox_id.`);return await p(i),{success:!0}}return new n(a({conversationUrl:t,sessionApiKey:r})).interruptConversation(e)},v=async(e,t)=>{let{conversationUrl:r,sessionApiKey:i}=await g(e);return new n(a({conversationUrl:r,sessionApiKey:i})).askAgent(e,t)},y=async(e,t)=>{let{conversationUrl:r,sessionApiKey:i}=await g(e);await new n(a({conversationUrl:r,sessionApiKey:i})).startGoal(e,t)},b=async e=>{let{conversationUrl:t,sessionApiKey:r}=await g(e);await new n(a({conversationUrl:t,sessionApiKey:r})).stopGoal(e)},x=async e=>{let{conversationUrl:t,sessionApiKey:r}=await g(e);await new n(a({conversationUrl:t,sessionApiKey:r})).resumeGoal(e)},S=async e=>{let{conversationUrl:t,sessionApiKey:r}=await g(e);return new n(a({conversationUrl:t,sessionApiKey:r})).runConversation(e)},C=(e,t,n)=>{e.setQueriesData({queryKey:[`user`,`conversation`,t]},e=>e&&{...e,...n}),e.setQueriesData({queryKey:[`user`,`conversations`]},e=>e&&{...e,pages:e.pages.map(e=>({...e,items:e.items.map(e=>e.id===t?{...e,...n}:e)}))})},w=(e,t,n)=>C(e,t,{execution_status:n}),T=(e,t,n)=>C(e,t,{llm_model:n}),E=(e,t)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,t]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]}),e.invalidateQueries({queryKey:[`unified`,`vscode_url`]})},D=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function O(e){let t=e.split(/[\\/]+/).filter(Boolean),n=t[t.length-1];if(!n||n===`.`||n===`..`)throw Error(`Invalid file name`);return n}async function k(e,t={}){return f(e,t)}async function A(e,t,n={}){let r=O(e);return`${(await k(t,n)).replace(/[/\\]+$/,``)}/${r}`}async function j(e,t){if(t?.id===e&&t.workspace?.working_dir?.trim())return t.workspace.working_dir.trim();let n=h(e);return n?.selected_workspace?.trim()?n.selected_workspace.trim():D.test(e)?m.resolveConversationWorkingDir(e):o()}var M=5;async function N(e,t){if(t?.id===e&&t.conversation_url?.trim()&&t.session_api_key?.trim())return{conversationUrl:t.conversation_url.trim(),sessionApiKey:t.session_api_key.trim()};if(s().backend.kind===`cloud`){let[t]=await d([e]);return{conversationUrl:t?.conversation_url?.trim()??null,sessionApiKey:t?.session_api_key?.trim()??null}}return{conversationUrl:null,sessionApiKey:null}}function P(e){if(!e.conversationUrl||!e.sessionApiKey)throw Error(`Conversation sandbox is still starting. Wait for it to finish, then try again.`);return{conversationUrl:e.conversationUrl,sessionApiKey:e.sessionApiKey}}async function F(e,t,n){let r=await j(e,n),i=await N(e,n),a=s().backend.kind===`cloud`,o=n?.id===e?n.session_api_key??i.sessionApiKey:i.sessionApiKey,c=n?.id===e?n.conversation_url??i.conversationUrl:i.conversationUrl;if(a){let e=P({conversationUrl:c,sessionApiKey:o});return I({files:t,workingDir:r,conversationUrl:e.conversationUrl,sessionApiKey:e.sessionApiKey})}return I({files:t,workingDir:r,conversationUrl:c,sessionApiKey:o})}async function I(e){let{files:t,workingDir:n,conversationUrl:r,sessionApiKey:i}=e,o=new l(a({conversationUrl:r,sessionApiKey:i,workingDir:n})),s=async e=>{try{let t=O(e.name),a=await A(e.name,n,{conversationUrl:r,sessionApiKey:i});return await o.fileUpload(e,a),{uploadedFile:t,skippedFile:null}}catch(t){return{uploadedFile:null,skippedFile:{name:e.name,reason:t instanceof Error?t.message:`Upload failed`}}}},c=[];for(let e=0;e<t.length;e+=M){let n=t.slice(e,e+M);c.push(...await Promise.all(n.map(s)))}return{uploaded_files:c.flatMap(e=>e.uploadedFile?[e.uploadedFile]:[]),skipped_files:c.flatMap(e=>e.skippedFile?[e.skippedFile]:[])}}var L=class{static currentConversation=null;static setCurrentConversation(e){this.currentConversation=e}static getCurrentConversation(){return this.currentConversation}static getClientOverrides(){return{sessionApiKey:this.currentConversation?.session_api_key}}static async getVSCodeUrl(e){let t=this.currentConversation?.id===e?this.currentConversation?.workspace?.working_dir??o():o();return{vscode_url:await new r(a(this.getClientOverrides())).getUrl({baseUrl:typeof window<`u`?window.location.origin:void 0,workspaceDir:t})}}static async getTrajectory(e){return{trajectory:(await new c(i(this.getClientOverrides()),e).search({limit:1e4})).items??[]}}static async uploadFiles(e,t){return F(e,t,this.currentConversation)}};e();var R=t(),z=e=>(0,R.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,R.jsx)(`path`,{d:`M21.0004 6.00001C21.0016 5.43668 20.8441 4.88442 20.5459 4.40644C20.2478 3.92846 19.8212 3.54406 19.3148 3.29726C18.8084 3.05046 18.2428 2.95122 17.6826 3.0109C17.1224 3.07059 16.5904 3.28678 16.1474 3.63473C15.7044 3.98269 15.3683 4.44835 15.1776 4.97841C14.9869 5.50848 14.9493 6.08152 15.0691 6.63197C15.1888 7.18241 15.4612 7.688 15.8549 8.09088C16.2487 8.49375 16.7479 8.77762 17.2954 8.91001V10.5C17.2978 10.6372 17.261 10.7722 17.1892 10.8891C17.1175 11.006 17.0138 11.1 16.8904 11.16L12.7354 13.32L8.59544 11.22C8.46356 11.1544 8.35443 11.0507 8.28221 10.9223C8.21 10.7939 8.17802 10.6468 8.19044 10.5V8.91001C8.89743 8.72746 9.51358 8.29333 9.92339 7.689C10.3332 7.08467 10.5085 6.35161 10.4165 5.62725C10.3245 4.90289 9.97149 4.23695 9.42361 3.75426C8.87573 3.27157 8.17062 3.00527 7.44044 3.00527C6.71026 3.00527 6.00514 3.27157 5.45726 3.75426C4.90938 4.23695 4.55635 4.90289 4.46435 5.62725C4.37234 6.35161 4.54768 7.08467 4.95749 7.689C5.36729 8.29333 5.98344 8.72746 6.69044 8.91001V10.5C6.6913 10.9156 6.80651 11.323 7.02346 11.6776C7.24041 12.0321 7.55073 12.3201 7.92044 12.51L12.0004 14.61V16.59C11.2934 16.7726 10.6773 17.2067 10.2675 17.811C9.85768 18.4153 9.68234 19.1484 9.77435 19.8728C9.86635 20.5971 10.2194 21.2631 10.7673 21.7457C11.3151 22.2284 12.0203 22.4947 12.7504 22.4947C13.4806 22.4947 14.1857 22.2284 14.7336 21.7457C15.2815 21.2631 15.6345 20.5971 15.7265 19.8728C15.8185 19.1484 15.6432 18.4153 15.2334 17.811C14.8236 17.2067 14.2074 16.7726 13.5004 16.59V14.61L17.5504 12.57C17.9317 12.3784 18.2501 12.0816 18.468 11.7148C18.686 11.348 18.7944 10.9265 18.7804 10.5V8.88001C19.4147 8.70922 19.9755 8.33496 20.3765 7.81469C20.7776 7.29442 20.9967 6.6569 21.0004 6.00001ZM6.00044 6.00001C6.00044 5.60218 6.15847 5.22065 6.43978 4.93934C6.72108 4.65804 7.10261 4.5 7.50044 4.5C7.89826 4.5 8.27979 4.65804 8.5611 4.93934C8.8424 5.22065 9.00044 5.60218 9.00044 6.00001C9.00044 6.39783 8.8424 6.77936 8.5611 7.06067C8.27979 7.34197 7.89826 7.50001 7.50044 7.50001C7.10261 7.50001 6.72108 7.34197 6.43978 7.06067C6.15847 6.77936 6.00044 6.39783 6.00044 6.00001ZM14.2054 19.5C14.2054 19.8978 14.0474 20.2794 13.7661 20.5607C13.4848 20.842 13.1033 21 12.7054 21C12.3076 21 11.9261 20.842 11.6448 20.5607C11.3635 20.2794 11.2054 19.8978 11.2054 19.5C11.2054 19.1022 11.3635 18.7207 11.6448 18.4393C11.9261 18.158 12.3076 18 12.7054 18C13.1033 18 13.4848 18.158 13.7661 18.4393C14.0474 18.7207 14.2054 19.1022 14.2054 19.5ZM18.0004 7.50001C17.6026 7.50001 17.2211 7.34197 16.9398 7.06067C16.6585 6.77936 16.5004 6.39783 16.5004 6.00001C16.5004 5.60218 16.6585 5.22065 16.9398 4.93934C17.2211 4.65804 17.6026 4.5 18.0004 4.5C18.3983 4.5 18.7798 4.65804 19.0611 4.93934C19.3424 5.22065 19.5004 5.60218 19.5004 6.00001C19.5004 6.39783 19.3424 6.77936 19.0611 7.06067C18.7798 7.34197 18.3983 7.50001 18.0004 7.50001Z`,fill:`currentColor`})}),B=e=>{let t=e.match(/^\/workspace\/[^/]+\/(.*)$/);return t?t[1]:e},V=e=>{let t=e.trim();if(!t)return``;let n=t.replace(/[\\/]+$/,``);if(!n||/^[A-Za-z]:$/.test(n))return``;let r=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`));return r>=0?n.slice(r+1):n},H=u(e=>({execution_status:null,setExecutionStatus:t=>e({execution_status:t}),reset:()=>e({execution_status:null})}));export{T as _,L as a,v as c,_ as d,S as f,w as g,b as h,z as i,E as l,y as m,V as n,N as o,x as p,B as r,F as s,H as t,C as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Bcgpimp9.js";import{t}from"./utils-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Bcgpimp9.js";import{t}from"./utils-DsWhWn2F.js";var n=e();function r({icon:e,children:r,action:i,className:a}){return(0,n.jsxs)(`div`,{className:t(`flex flex-col items-center justify-center w-full h-full p-10 gap-4 text-center`,a),children:[(0,n.jsx)(`div`,{className:`shrink-0 text-[var(--oh-muted)] [&_svg]:size-10 [&_svg]:max-h-10 [&_svg]:max-w-10 [&_svg]:shrink-0`,"aria-hidden":!0,children:e}),(0,n.jsx)(`p`,{className:`max-w-sm text-center text-sm font-normal leading-5 text-[var(--oh-muted)]`,children:r}),i?(0,n.jsx)(`div`,{className:`flex justify-center pt-1`,children:i}):null]})}export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-
|
|
1
|
+
import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";var t=e(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]);export{t};
|
package/build/assets/{copy-to-clipboard-button-C4l3CMSd.js → copy-to-clipboard-button-NbN1clVr.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Bcgpimp9.js";import{t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{z as n}from"./utils-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Bcgpimp9.js";import{t}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{z as n}from"./utils-DsWhWn2F.js";import{t as r}from"./checkmark-CxdXtM3b.js";import{t as i}from"./copy-z7idLzWO.js";var a=e();function o({isHidden:e,isDisabled:o,onClick:s,mode:c}){let{t:l}=t(`openhands`);return(0,a.jsxs)(`button`,{hidden:e,disabled:o,"data-testid":`copy-to-clipboard`,type:`button`,onClick:s,"aria-label":l(c===`copy`?n.BUTTON$COPY:n.BUTTON$COPIED),className:`button-base p-1 cursor-pointer`,children:[c===`copy`&&(0,a.jsx)(i,{width:15,height:15}),c===`copied`&&(0,a.jsx)(r,{width:15,height:15})]})}export{o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{H as r,U as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as o,z as s}from"./utils-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{H as r,U as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as o,z as s}from"./utils-DsWhWn2F.js";import{t as c}from"./use-is-authed-BsS4XwSL.js";import{t as l}from"./typography-B1UxuuEC.js";var u=e(t(),1),d=n(),f=i(function(){let{t:e}=a(`openhands`),[t]=r(),{data:n,isLoading:i}=c(),[f,p]=(0,u.useState)(null),[m,h]=(0,u.useState)(!1),g=t.get(`user_code`),_=async e=>{try{h(!0),(await fetch(`/oauth/device/verify-authenticated`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:`user_code=${encodeURIComponent(e)}`,credentials:`include`})).ok?p({success:!0,messageKey:s.DEVICE$SUCCESS_MESSAGE}):p({success:!1,messageKey:s.DEVICE$ERROR_FAILED})}catch{p({success:!1,messageKey:s.DEVICE$ERROR_OCCURRED})}finally{h(!1)}};return f?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsx)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:o(`mb-4`,f.success?`text-green-600`:`text-red-600`),children:f.success?(0,d.jsx)(`svg`,{className:`w-12 h-12 mx-auto`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,d.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 13l4 4L19 7`})}):(0,d.jsx)(`svg`,{className:`w-12 h-12 mx-auto`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,d.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})}),(0,d.jsx)(`h2`,{className:`text-xl font-medium mb-2`,children:f.success?e(s.DEVICE$SUCCESS_TITLE):e(s.DEVICE$ERROR_TITLE)}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-4`,children:e(f.messageKey)}),!f.success&&(0,d.jsx)(`button`,{type:`button`,onClick:()=>window.location.reload(),className:`px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90`,children:e(s.DEVICE$TRY_AGAIN)})]})})}):m?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsx)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-b-2 border-white mx-auto mb-4`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(s.DEVICE$PROCESSING)})]})})}):n&&g?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background p-4`,children:(0,d.jsx)(`div`,{className:`flex flex-col items-center gap-6 w-full max-w-md`,children:(0,d.jsxs)(`div`,{className:`flex-1 min-w-0 max-w-md w-full mx-auto p-6 bg-card rounded-2xl shadow-lg border border-[var(--oh-border-subtle)]`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4 text-center`,children:e(s.DEVICE$AUTHORIZATION_REQUEST)}),(0,d.jsxs)(`div`,{className:`mb-6 p-4 bg-base rounded-lg border border-[var(--oh-border-subtle)]`,children:[(0,d.jsx)(`p`,{className:`text-xs text-[var(--oh-text-subtle)] mb-2 text-center uppercase tracking-wider`,children:e(s.DEVICE$CODE_LABEL)}),(0,d.jsx)(`p`,{className:`text-xl font-mono font-semibold text-center tracking-[0.3em]`,children:g})]}),(0,d.jsxs)(`div`,{className:`mb-6 p-4 bg-amber-950/50 border-l-2 border-amber-500 rounded-r-lg`,children:[(0,d.jsx)(`p`,{className:`text-sm font-medium text-amber-500 mb-1`,children:e(s.DEVICE$SECURITY_NOTICE)}),(0,d.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:e(s.DEVICE$SECURITY_WARNING)})]}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-6 text-center`,children:e(s.DEVICE$CONFIRM_PROMPT)}),(0,d.jsxs)(`div`,{className:`flex gap-3`,children:[(0,d.jsx)(`button`,{type:`button`,onClick:()=>window.close(),className:`flex-1 px-4 py-2 border border-[var(--oh-border)] rounded-md hover:bg-muted text-[var(--oh-text-tertiary)]`,children:e(s.DEVICE$CANCEL)}),(0,d.jsx)(`button`,{type:`button`,onClick:()=>_(g),className:`flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700`,children:e(s.DEVICE$AUTHORIZE)})]})]})})}):n&&!g?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4 text-center`,children:e(s.DEVICE$AUTHORIZATION_TITLE)}),(0,d.jsx)(`p`,{className:`text-muted-foreground mb-6 text-center`,children:e(s.DEVICE$ENTER_CODE_PROMPT)}),(0,d.jsxs)(`form`,{onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`user_code`);t&&n&&_(t)},children:[(0,d.jsxs)(`div`,{className:`mb-4`,children:[(0,d.jsx)(`label`,{htmlFor:`user_code`,className:`block text-sm font-medium mb-2`,children:e(s.DEVICE$CODE_INPUT_LABEL)}),(0,d.jsx)(`input`,{type:`text`,id:`user_code`,name:`user_code`,required:!0,className:`w-full px-3 py-2 border border-input rounded-md focus:outline-none focus:ring-2 focus:ring-ring`,placeholder:e(s.DEVICE$CODE_PLACEHOLDER)})]}),(0,d.jsx)(`button`,{type:`submit`,className:`w-full px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90`,children:e(s.DEVICE$CONTINUE)})]})]})}):i?(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`text-center`,children:[(0,d.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-b-2 border-white mx-auto mb-4`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(s.DEVICE$PROCESSING)})]})}):(0,d.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-background`,children:(0,d.jsxs)(`div`,{className:`max-w-md w-full mx-auto p-6 bg-card rounded-lg shadow-lg text-center`,children:[(0,d.jsx)(l,{className:`text-2xl mb-4`,children:e(s.DEVICE$AUTH_REQUIRED)}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:e(s.DEVICE$SIGN_IN_PROMPT)})]})})});export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./utils-
|
|
1
|
+
import{t as e}from"./utils-DsWhWn2F.js";import{p as t}from"./form-control-classes-CtVAktAy.js";var n=`transition-none`,r=`gap-0.5`,i=`gap-2`,a=e(`flex flex-col`,r),o=e(`bg-tertiary border border-[var(--oh-border-input)] rounded p-2`,`flex items-center gap-2`,t,n,`group w-full gap-2 px-3 text-[var(--oh-muted)] hover:text-white`),s=e(`group flex w-full cursor-pointer items-center rounded px-2 py-2 text-left text-sm font-normal text-white`,i,`hover:bg-[var(--oh-interactive-hover)] disabled:cursor-not-allowed disabled:opacity-60`,n),c=e(`group flex w-full cursor-pointer items-center rounded px-2 py-2 text-start text-sm font-normal`,i,`text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,`disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent`,n),l=e(`shrink-0 text-[var(--oh-muted)] group-hover:text-white group-focus-visible:text-white`,n),u=e(`flex size-4 shrink-0 items-center justify-center [&_svg]:text-current`,l),d=e(`inline-flex cursor-pointer items-center gap-1.5 rounded-lg border px-3 py-2 text-sm font-medium`,`border-[var(--oh-border)] bg-base-secondary text-white`,`focus-visible:border-white/40 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white/20`,n);e(a,`overflow-y-auto custom-scrollbar-always`,`max-h-[13.875rem]`);var f=e(`overflow-y-auto custom-scrollbar`,`max-h-[min(60vh,calc(100dvh-5rem))]`),p=e(`group flex w-full items-center rounded-md px-2 py-2 text-sm font-normal text-white`,i,`hover:bg-[var(--oh-interactive-hover)]`,n);export{r as a,i as c,f as d,o as f,a as i,l,p as n,s as o,n as r,c as s,d as t,u};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browser-
|
|
2
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,xt as n,yt as r}from"./vendor-styling-Bcgpimp9.js";import{n as i}from"./vendor~entry.client-BfviqoVc.js";import{t as a}from"./vendor~entry.client-Di4qO77Y.js";import{n as o,t as s}from"./providers-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browser-3QjrEr1D.js","assets/vendor~browser-CIoZCqGs.js","assets/vendor~browser-jaN4ilxM.js","assets/llm-subscription-DTqtBCWz.js","assets/utils-DsWhWn2F.js","assets/vendor-styling-Bcgpimp9.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/settings-Chfn5xTD.js","assets/automation-BGP_I1RR.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,xt as n,yt as r}from"./vendor-styling-Bcgpimp9.js";import{n as i}from"./vendor~entry.client-BfviqoVc.js";import{t as a}from"./vendor~entry.client-Di4qO77Y.js";import{n as o,t as s}from"./providers-DuSn9s2i.js";import{Ht as c}from"./active-backend-context-mY7Gff5c.js";var l=e(t(),1),u=a();function d({mockApi:e=void 0,hasWindow:t=typeof window<`u`}={}){return t&&e===`true`}var f=r();async function p(){if(await c(),d()){let{worker:e}=await n(async()=>{let{worker:e}=await import(`./browser-3QjrEr1D.js`);return{worker:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]));await e.start({onUnhandledRequest:`bypass`})}}p().then(()=>(0,l.startTransition)(()=>{(0,u.hydrateRoot)(document,(0,f.jsx)(l.StrictMode,{children:(0,f.jsx)(s,{analytics:o,withStyleRoot:!1,children:(0,f.jsx)(i,{})})}))}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as i,z as a}from"./utils-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as i,z as a}from"./utils-DsWhWn2F.js";import{t as o}from"./check-CrxQfJZ2.js";import{t as s}from"./chevron-down-D_LsyTA7.js";import{i as c,o as l,t as u}from"./dropdown-classes-CqA2BTCL.js";import{t as d}from"./use-click-outside-element-DKqpqEEm.js";var f=e(t(),1),p=n();function m({testId:e,value:t,onChange:n,options:m,labelKeyByValue:h}){let{t:g}=r(`openhands`),[_,v]=f.useState(!1),y=d(()=>v(!1)),b=m[0],x=g(h[t]);return(0,p.jsxs)(`div`,{ref:y,className:`relative shrink-0 w-auto`,"data-testid":e,children:[(0,p.jsxs)(`button`,{type:`button`,"data-testid":`dropdown-trigger`,"aria-haspopup":`menu`,"aria-expanded":_,"aria-label":g(a.CONVERSATION_PANEL$FILTER_LABEL),onClick:()=>v(e=>!e),className:i(u,b&&t!==b&&`border-white/60 bg-white/10`),children:[(0,p.jsx)(`span`,{className:`whitespace-nowrap`,children:x}),(0,p.jsx)(s,{className:i(`h-4 w-4 shrink-0 text-tertiary-alt transition-transform`,_&&`rotate-180`),"aria-hidden":!0})]}),_?(0,p.jsx)(`div`,{role:`menu`,"data-testid":`${e}-menu`,"aria-label":g(a.CONVERSATION_PANEL$FILTER_LABEL),className:i(`absolute right-0 top-full z-50 mt-1 min-w-full w-max`,`max-h-60 overflow-auto rounded-[6px] bg-tertiary p-1 context-menu-box-shadow`,c),children:m.map(r=>{let a=r===t;return(0,p.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":a,"data-testid":`${e}-${r}`,onClick:()=>{n(r),v(!1)},className:i(l,a&&`bg-[var(--oh-interactive-selected)]`),children:[(0,p.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:g(h[r])}),a?(0,p.jsx)(o,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0}):null]},r)})}):null]})}export{m as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,yt as r}from"./vendor-styling-Bcgpimp9.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{z as a}from"./utils-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,yt as r}from"./vendor-styling-Bcgpimp9.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{z as a}from"./utils-DsWhWn2F.js";import{a as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./environment-switch-store-DVQZLFbj.js";var p=e(t(),1),m=e(n(),1),h=r();function g({className:e}){return(0,h.jsxs)(`svg`,{viewBox:`0 0 74.17 22`,xmlns:`http://www.w3.org/2000/svg`,className:e,"aria-hidden":!0,children:[(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`rect`,{x:`1`,y:`1`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`rect`,{x:`1`,y:`13`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`line`,{x1:`5`,y1:`5`,x2:`5.01`,y2:`5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,h.jsx)(`line`,{x1:`5`,y1:`17`,x2:`5.01`,y2:`17`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}),(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`rect`,{x:`53.17`,y:`1`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`rect`,{x:`53.17`,y:`13`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`line`,{x1:`57.17`,y1:`5`,x2:`57.18`,y2:`5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,h.jsx)(`line`,{x1:`57.17`,y1:`17`,x2:`57.18`,y2:`17`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}),(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`path`,{d:`M43.09,7l4,4-4,4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,h.jsx)(`path`,{d:`M27.09,11h20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,h.jsx)(`path`,{d:`M31.09,7l-4,4,4,4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})]})}function _(){let{t:e}=i(`openhands`),{visible:t,target:n}=p.useSyncExternalStore(l,o,o);return!t||typeof document>`u`?null:(0,m.createPortal)((0,h.jsx)(`div`,{"data-testid":`environment-switch-overlay`,"data-target":n,className:`environment-switch-overlay pointer-events-none fixed inset-0 z-[2147483646] flex items-center justify-center`,"aria-live":`polite`,"aria-atomic":`true`,children:(0,h.jsxs)(`div`,{className:`pointer-events-none flex min-w-[280px] max-w-[420px] flex-col items-center gap-2 rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] px-5 py-4 text-[var(--oh-foreground)] shadow-2xl`,children:[(0,h.jsx)(g,{className:`mb-2 h-6 w-20 shrink-0 text-[var(--oh-foreground)]`}),(0,h.jsx)(`p`,{className:`text-center text-sm font-medium`,children:e(a.BACKEND$SWITCHING_TO,{environment:n})})]})}),document.body)}export{f as ENVIRONMENT_SWITCH_DURATION_MS,c as ENVIRONMENT_SWITCH_SETACTIVE_DELAY_MS,_ as EnvironmentSwitchOverlay,_ as default,u as __resetEnvironmentSwitchOverlayForTests,s as dismissEnvironmentSwitch,d as triggerEnvironmentSwitch};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{yt as e}from"./vendor-styling-Bcgpimp9.js";import{U as t,p as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{lt as i,r as a}from"./active-backend-context-mY7Gff5c.js";import{t as o,z as s}from"./utils-DsWhWn2F.js";import{t as c}from"./external-link-D9B2QMPf.js";import{a as l,f as u,o as d,u as f}from"./sidebar-layout-BGMuyC86.js";import{t as p}from"./sidebar-nav-link-DA4_ct9G.js";import{r as m}from"./typography-B1UxuuEC.js";import{t as h}from"./use-breakpoint-DA7JqsRN.js";import{t as g}from"./backend-synced-settings-badge-CQ9xtNWm.js";import{t as _}from"./extensions-navigation-BQmstKDZ.js";var v=e(),y=`/skills`,b=`/plugins`;function x(){let{t:e}=r(`openhands`),{active:t}=a(),{backend:n}=t,h=!i(n)&&n.kind===`cloud`;return(0,v.jsxs)(`div`,{"data-testid":`extensions-mobile-hub`,className:`flex flex-col gap-4 px-4 py-2 md:hidden`,children:[(0,v.jsx)(m.H2,{children:e(s.NAV$CUSTOMIZE)}),(0,v.jsx)(`nav`,{className:`flex flex-col gap-0.5`,children:_.filter(e=>!(e.to===b&&h)).map(t=>{if(t.to===y&&h){let r=`${n.host.replace(/\/+$/,``)}/settings/skills`;return(0,v.jsxs)(`a`,{"data-testid":`sidebar-extensions-${t.to}`,href:r,target:`_blank`,rel:`noopener noreferrer`,className:o(u({collapsed:!1}),d.idle),children:[(0,v.jsx)(`span`,{className:l,children:t.icon}),(0,v.jsx)(`span`,{className:o(f(!1),`flex-1`),children:e(s.SIDEBAR$SKILLS_AND_PLUGINS_CLOUD_LINK)}),(0,v.jsx)(c,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]},t.to)}return(0,v.jsx)(p,{to:t.to,label:t.label,end:t.end,testId:`sidebar-extensions-${t.to}`,icon:t.icon,disabled:t.comingSoon},t.to)})}),(0,v.jsx)(`div`,{className:`pt-1`,children:(0,v.jsx)(g,{})})]})}var S=t(function(){return h(768)?(0,v.jsx)(x,{}):(0,v.jsx)(n,{to:`/skills`,replace:!0})});export{S as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Bcgpimp9.js";import{t as n}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{lt as r,r as i}from"./active-backend-context-mY7Gff5c.js";import{t as a,z as o}from"./utils-DsWhWn2F.js";import{t as s}from"./external-link-D9B2QMPf.js";import{t as c}from"./navigation-link-Bxmn-pCs.js";import{f as l,o as u}from"./sidebar-layout-BGMuyC86.js";import{t as d}from"./skills-CYFLsN5U.js";import{t as f}from"./backend-synced-settings-badge-CQ9xtNWm.js";e();var p=t(),m=e=>(0,p.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,p.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.25 3H21.75L22.5 3.75V13.5H21V9H3V19.5H13.5V21H2.25L1.5 20.25V3.75L2.25 3ZM3 7.5H21V4.5H3V7.5ZM10.5 18V16.359C10.2451 16.2664 10.0074 16.132 9.7965 15.9615L8.379 16.77L7.629 15.48L9.0345 14.6595C8.98649 14.3881 8.98649 14.1104 9.0345 13.839L7.629 13.02L8.379 11.73L9.7965 12.54C10.023 12.36 10.2585 12.2265 10.5 12.141V10.5H12V12.141C12.2568 12.2293 12.4953 12.3641 12.7035 12.5385L14.121 11.73L14.871 13.02L13.4655 13.8405C13.5133 14.1114 13.5133 14.3886 13.4655 14.6595L14.871 15.48L14.121 16.77L12.7035 15.96C12.4903 16.1274 12.2531 16.2619 12 16.359V18H10.5ZM10.125 14.25C10.125 14.562 10.2345 14.8275 10.4535 15.0465C10.5568 15.1528 10.6807 15.2367 10.8177 15.2932C10.9547 15.3497 11.1018 15.3776 11.25 15.375C11.3982 15.3776 11.5453 15.3497 11.6823 15.2932C11.8193 15.2367 11.9432 15.1528 12.0465 15.0465C12.1528 14.9432 12.2367 14.8193 12.2932 14.6823C12.3497 14.5453 12.3776 14.3982 12.375 14.25C12.3776 14.1018 12.3497 13.9547 12.2932 13.8177C12.2367 13.6807 12.1528 13.5568 12.0465 13.4535C11.9432 13.3472 11.8193 13.2633 11.6823 13.2068C11.5453 13.1503 11.3982 13.1224 11.25 13.125C11.1018 13.1224 10.9547 13.1503 10.8177 13.2068C10.6807 13.2633 10.5568 13.3472 10.4535 13.4535C10.3472 13.5568 10.2633 13.6807 10.2068 13.8177C10.1503 13.9547 10.1224 14.1018 10.125 14.25ZM18.126 22.5V20.859C17.8711 20.7663 17.6334 20.632 17.4225 20.4615L16.005 21.27L15.255 19.98L16.662 19.1595C16.614 18.8881 16.614 18.6104 16.662 18.339L15.255 17.52L16.005 16.23L17.4225 17.04C17.649 16.86 17.8845 16.7265 18.1275 16.641V15H19.6275V16.641C19.8837 16.7297 20.1216 16.8644 20.3295 17.0385L21.747 16.23L22.497 17.52L21.0915 18.3405C21.1396 18.6114 21.1396 18.8886 21.0915 19.1595L22.497 19.98L21.747 21.27L20.3295 20.46C20.1163 20.6275 19.8791 20.762 19.626 20.859V22.5H18.126ZM17.751 18.75C17.751 19.062 17.8605 19.3275 18.0795 19.5465C18.1828 19.6528 18.3067 19.7367 18.4437 19.7932C18.5807 19.8497 18.7278 19.8776 18.876 19.875C19.0242 19.8776 19.1713 19.8497 19.3083 19.7932C19.4453 19.7367 19.5692 19.6528 19.6725 19.5465C19.779 19.4434 19.8633 19.3195 19.9201 19.1825C19.9768 19.0455 20.0049 18.8983 20.0025 18.75C20.0049 18.6017 19.9768 18.4545 19.9201 18.3175C19.8633 18.1805 19.779 18.0566 19.6725 17.9535C19.5694 17.8474 19.4457 17.7636 19.309 17.7071C19.1722 17.6506 19.0254 17.6226 18.8775 17.625C18.7291 17.6222 18.5817 17.65 18.4444 17.7065C18.3072 17.763 18.183 17.847 18.0795 17.9535C17.9732 18.0568 17.8893 18.1807 17.8328 18.3177C17.7763 18.4547 17.7484 18.6018 17.751 18.75Z`,fill:`currentColor`})}),h=`/skills`,g=`/plugins`,_=[{to:`/skills`,label:`Skills`,icon:(0,p.jsx)(d,{width:16,height:16,"aria-hidden":`true`}),end:!0},{to:`/mcp`,label:`MCP Servers`,icon:(0,p.jsx)(m,{width:16,height:16}),end:!0},{to:`/plugins`,label:`Plugins`,icon:(0,p.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,width:16,height:16,"aria-hidden":`true`,children:[(0,p.jsx)(`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`}),(0,p.jsx)(`path`,{d:`m3.3 7 8.7 5 8.7-5`}),(0,p.jsx)(`path`,{d:`M12 22V12`})]}),end:!0}];function v(){let{t:e}=n(`openhands`),{active:t}=i(),{backend:d}=t,m=!r(d)&&d.kind===`cloud`;return(0,p.jsxs)(`aside`,{"data-testid":`extensions-navbar-desktop`,className:`hidden md:flex md:w-[260px] md:shrink-0 md:flex-col md:gap-2 md:sticky md:top-8 md:self-start`,children:[(0,p.jsx)(`span`,{className:`px-2 text-sm font-normal text-white`,children:e(o.NAV$CUSTOMIZE)}),(0,p.jsx)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:_.filter(e=>!(e.to===g&&m)).map(t=>{let n=t.to===h&&m,r=(0,p.jsx)(`span`,{className:`shrink-0 flex items-center justify-center`,children:t.icon}),i=(0,p.jsx)(`span`,{className:`truncate`,children:n?e(o.SIDEBAR$SKILLS_AND_PLUGINS_CLOUD_LINK):t.label}),f=t.comingSoon&&(0,p.jsx)(`span`,{className:`ml-auto shrink-0 rounded-full border border-white/20 bg-white/5 px-1.5 py-0.5 text-[10px] font-medium text-[var(--oh-text-dim)]`,children:e(o.NAV$COMING_SOON)});if(n){let e=`${d.host.replace(/\/+$/,``)}/settings/skills`;return(0,p.jsxs)(`a`,{"data-testid":`sidebar-extensions-${t.to}`,href:e,target:`_blank`,rel:`noopener noreferrer`,className:a(l(),`truncate`,u.idle),children:[r,i,(0,p.jsx)(s,{className:`ml-auto size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]},t.to)}return(0,p.jsxs)(c,{to:t.to,end:t.end,"data-testid":`sidebar-extensions-${t.to}`,className:({isActive:e})=>a(l(),`truncate`,e?u.active:u.idle),children:[r,i,f]},t.to)})}),(0,p.jsx)(`div`,{className:`px-2 pt-3`,children:(0,p.jsx)(f,{})})]})}export{v as n,_ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-
|
|
1
|
+
import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";var t=e(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]);export{t};
|